/* ============================================
   DemaJi – Main CSS Design System
   Dark Islamic Luxury Theme
   ============================================ */

/* Google Fonts */
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700;800;900&family=Amiri:wght@400;700&display=swap');

/* ============================================ */
/* CSS Variables (Design Tokens)               */
/* ============================================ */
:root {
    /* Colors */
    --bg-primary: #0a0e1a;
    --bg-secondary: #111827;
    --bg-card: #1a2035;
    --bg-card-hover: #1f2842;
    --bg-input: #0f1629;
    
    --gold-primary: #c9a84c;
    --gold-light: #f0d78c;
    --gold-dark: #a08530;
    --gold-gradient: linear-gradient(135deg, #c9a84c, #e8c860, #c9a84c);
    
    --green-primary: #10b981;
    --green-dark: #059669;
    --blue-primary: #3b82f6;
    --red-primary: #ef4444;
    --orange-primary: #f59e0b;
    
    --text-primary: #f1f5f9;
    --text-secondary: #94a3b8;
    --text-muted: #64748b;
    --text-dark: #1a1a2e;
    
    --border-color: rgba(201, 168, 76, 0.15);
    --border-light: rgba(255, 255, 255, 0.06);
    
    /* Shadows */
    --shadow-sm: 0 2px 8px rgba(0, 0, 0, 0.3);
    --shadow-md: 0 4px 20px rgba(0, 0, 0, 0.4);
    --shadow-lg: 0 8px 40px rgba(0, 0, 0, 0.5);
    --shadow-gold: 0 4px 25px rgba(201, 168, 76, 0.2);
    --glow-gold: 0 0 30px rgba(201, 168, 76, 0.15);
    
    /* Typography */
    --font-main: 'Inter', system-ui, -apple-system, sans-serif;
    --font-arabic: 'Amiri', serif;
    
    /* Sizes */
    --radius-sm: 8px;
    --radius-md: 12px;
    --radius-lg: 16px;
    --radius-xl: 24px;
    --radius-full: 50px;
    
    /* Transitions */
    --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

/* ============================================ */
/* Reset & Base                                 */
/* ============================================ */
*, *::before, *::after {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
    -webkit-text-size-adjust: 100%;
}

body {
    font-family: var(--font-main);
    background: var(--bg-primary);
    color: var(--text-primary);
    line-height: 1.6;
    min-height: 100vh;
    overflow-x: hidden;
    -webkit-font-smoothing: antialiased;
}

a {
    color: var(--gold-primary);
    text-decoration: none;
    transition: var(--transition);
}

a:hover {
    color: var(--gold-light);
}

img {
    max-width: 100%;
    height: auto;
    display: block;
}

/* ============================================ */
/* Layout                                       */
/* ============================================ */
.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 1.5rem;
}

.container-sm {
    max-width: 640px;
    margin: 0 auto;
    padding: 0 1.5rem;
}

.section {
    padding: 5rem 0;
}

.text-center { text-align: center; }
.text-gold { color: var(--gold-primary); }

/* ============================================ */
/* Buttons                                      */
/* ============================================ */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    padding: 0.85rem 2rem;
    border: none;
    border-radius: var(--radius-full);
    font-family: var(--font-main);
    font-size: 1rem;
    font-weight: 700;
    cursor: pointer;
    transition: var(--transition);
    text-decoration: none;
    line-height: 1.2;
    white-space: nowrap;
}

.btn-primary {
    background: var(--gold-gradient);
    color: var(--text-dark);
    box-shadow: var(--shadow-gold);
}

.btn-primary:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 35px rgba(201, 168, 76, 0.35);
    color: var(--text-dark);
}

.btn-secondary {
    background: transparent;
    color: var(--gold-primary);
    border: 2px solid var(--gold-primary);
}

.btn-secondary:hover {
    background: rgba(201, 168, 76, 0.1);
    transform: translateY(-2px);
}

.btn-success {
    background: linear-gradient(135deg, #10b981, #34d399);
    color: white;
}

.btn-danger {
    background: linear-gradient(135deg, #ef4444, #f87171);
    color: white;
}

.btn-sm {
    padding: 0.5rem 1.2rem;
    font-size: 0.85rem;
}

.btn-lg {
    padding: 1.1rem 3rem;
    font-size: 1.15rem;
}

.btn-block {
    display: flex;
    width: 100%;
}

.btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
    transform: none !important;
}

/* ============================================ */
/* Cards                                        */
/* ============================================ */
.card {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    padding: 2rem;
    transition: var(--transition);
}

.card:hover {
    border-color: rgba(201, 168, 76, 0.3);
    box-shadow: var(--glow-gold);
}

.card-glass {
    background: rgba(26, 32, 53, 0.7);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 1px solid rgba(201, 168, 76, 0.1);
    border-radius: var(--radius-lg);
    padding: 2rem;
}

/* ============================================ */
/* Forms                                        */
/* ============================================ */
.form-group {
    margin-bottom: 1.5rem;
}

.form-group label {
    display: block;
    color: var(--text-secondary);
    font-size: 0.9rem;
    font-weight: 500;
    margin-bottom: 0.5rem;
}

.form-control {
    width: 100%;
    padding: 0.85rem 1.2rem;
    background: var(--bg-input);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    color: var(--text-primary);
    font-family: var(--font-main);
    font-size: 1rem;
    transition: var(--transition);
    outline: none;
}

.form-control:focus {
    border-color: var(--gold-primary);
    box-shadow: 0 0 0 3px rgba(201, 168, 76, 0.15);
}

.form-control::placeholder {
    color: var(--text-muted);
}

select.form-control {
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath fill='%2394a3b8' d='M6 8L1 3h10z'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 1rem center;
    padding-right: 2.5rem;
}

textarea.form-control {
    min-height: 120px;
    resize: vertical;
}

/* ============================================ */
/* Alerts & Flash Messages                      */
/* ============================================ */
.alert {
    padding: 1rem 1.5rem;
    border-radius: var(--radius-md);
    margin-bottom: 1.5rem;
    font-size: 0.95rem;
    display: flex;
    align-items: center;
    gap: 0.75rem;
    animation: slideDown 0.3s ease;
}

.alert-success {
    background: rgba(16, 185, 129, 0.15);
    border: 1px solid rgba(16, 185, 129, 0.3);
    color: #34d399;
}

.alert-error {
    background: rgba(239, 68, 68, 0.15);
    border: 1px solid rgba(239, 68, 68, 0.3);
    color: #f87171;
}

.alert-info {
    background: rgba(59, 130, 246, 0.15);
    border: 1px solid rgba(59, 130, 246, 0.3);
    color: #60a5fa;
}

.alert-warning {
    background: rgba(245, 158, 11, 0.15);
    border: 1px solid rgba(245, 158, 11, 0.3);
    color: #fbbf24;
}

/* ============================================ */
/* Badges                                       */
/* ============================================ */
.badge {
    display: inline-flex;
    align-items: center;
    padding: 0.3rem 0.8rem;
    border-radius: var(--radius-full);
    font-size: 0.75rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: white;
}

/* ============================================ */
/* Navigation                                   */
/* ============================================ */
.navbar {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1000;
    padding: 1rem 0;
    transition: var(--transition);
    background: rgba(10, 14, 26, 0.8);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-bottom: 1px solid transparent;
}

.navbar.scrolled {
    border-bottom-color: var(--border-color);
    padding: 0.75rem 0;
}

.navbar .container {
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.navbar-brand {
    font-size: 1.5rem;
    font-weight: 900;
    background: var(--gold-gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    letter-spacing: -0.02em;
}

.navbar-nav {
    display: flex;
    align-items: center;
    gap: 2rem;
    list-style: none;
}

.navbar-nav a {
    color: var(--text-secondary);
    font-weight: 500;
    font-size: 0.95rem;
}

.navbar-nav a:hover {
    color: var(--gold-primary);
}

/* ============================================ */
/* Footer                                       */
/* ============================================ */
.footer {
    background: var(--bg-secondary);
    border-top: 1px solid var(--border-color);
    padding: 3rem 0 2rem;
    text-align: center;
}

.footer-brand {
    font-size: 1.3rem;
    font-weight: 800;
    color: var(--gold-primary);
    margin-bottom: 0.5rem;
}

.footer p {
    color: var(--text-muted);
    font-size: 0.9rem;
}

/* ============================================ */
/* Tables                                       */
/* ============================================ */
.table-responsive {
    overflow-x: auto;
    border-radius: var(--radius-md);
}

table {
    width: 100%;
    border-collapse: collapse;
}

table th {
    background: rgba(201, 168, 76, 0.08);
    color: var(--gold-primary);
    font-weight: 600;
    font-size: 0.85rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    padding: 1rem;
    text-align: left;
    border-bottom: 1px solid var(--border-color);
}

table td {
    padding: 0.85rem 1rem;
    border-bottom: 1px solid var(--border-light);
    font-size: 0.9rem;
    color: var(--text-secondary);
}

table tr:hover td {
    background: rgba(201, 168, 76, 0.03);
}

/* ============================================ */
/* Animations                                   */
/* ============================================ */
@keyframes slideDown {
    from { opacity: 0; transform: translateY(-10px); }
    to { opacity: 1; transform: translateY(0); }
}

@keyframes fadeInUp {
    from { opacity: 0; transform: translateY(30px); }
    to { opacity: 1; transform: translateY(0); }
}

@keyframes pulse {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.7; }
}

@keyframes shimmer {
    0% { background-position: -200% center; }
    100% { background-position: 200% center; }
}

.animate-fade-in {
    animation: fadeInUp 0.6s ease forwards;
    opacity: 0;
}

.animate-delay-1 { animation-delay: 0.1s; }
.animate-delay-2 { animation-delay: 0.2s; }
.animate-delay-3 { animation-delay: 0.3s; }
.animate-delay-4 { animation-delay: 0.4s; }

/* ============================================ */
/* Responsive                                   */
/* ============================================ */
@media (max-width: 768px) {
    .container { padding: 0 1rem; }
    .section { padding: 3rem 0; }
    
    .navbar-nav {
        display: none;
    }
    
    .btn-lg {
        padding: 0.9rem 2rem;
        font-size: 1rem;
    }
    
    h1 { font-size: 2rem !important; }
    h2 { font-size: 1.5rem !important; }
}

/* ============================================ */
/* Hero Section (Landing)                       */
/* ============================================ */
.hero {
    min-height: 100vh;
    display: flex;
    align-items: center;
    position: relative;
    overflow: hidden;
    padding-top: 5rem;
}

.hero::before {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: radial-gradient(circle at 30% 20%, rgba(201, 168, 76, 0.06) 0%, transparent 50%),
                radial-gradient(circle at 70% 80%, rgba(201, 168, 76, 0.04) 0%, transparent 50%);
    animation: pulse 8s ease-in-out infinite;
}

.hero-content {
    position: relative;
    z-index: 1;
    max-width: 700px;
}

.hero-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.5rem 1.2rem;
    background: rgba(201, 168, 76, 0.1);
    border: 1px solid rgba(201, 168, 76, 0.2);
    border-radius: var(--radius-full);
    color: var(--gold-primary);
    font-size: 0.85rem;
    font-weight: 600;
    margin-bottom: 1.5rem;
}

.hero h1 {
    font-size: 3.5rem;
    font-weight: 900;
    line-height: 1.15;
    margin-bottom: 1.5rem;
    letter-spacing: -0.03em;
}

.hero h1 .highlight {
    background: var(--gold-gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.hero p {
    font-size: 1.2rem;
    color: var(--text-secondary);
    margin-bottom: 2rem;
    line-height: 1.7;
}

.hero-cta {
    display: flex;
    gap: 1rem;
    flex-wrap: wrap;
}

/* Geometric decoration */
.hero-decoration {
    position: absolute;
    right: -5%;
    top: 50%;
    transform: translateY(-50%);
    width: 500px;
    height: 500px;
    opacity: 0.1;
    z-index: 0;
}

.geo-pattern {
    width: 100%;
    height: 100%;
    border: 2px solid var(--gold-primary);
    border-radius: 30% 70% 70% 30% / 30% 30% 70% 70%;
    animation: morph 15s ease-in-out infinite;
    position: relative;
}

.geo-pattern::before {
    content: '';
    position: absolute;
    inset: 30px;
    border: 1px solid var(--gold-primary);
    border-radius: 70% 30% 30% 70% / 70% 70% 30% 30%;
    animation: morph 12s ease-in-out infinite reverse;
}

@keyframes morph {
    0%, 100% { border-radius: 30% 70% 70% 30% / 30% 30% 70% 70%; }
    25% { border-radius: 58% 42% 75% 25% / 76% 16% 84% 24%; }
    50% { border-radius: 50% 50% 33% 67% / 55% 27% 73% 45%; }
    75% { border-radius: 33% 67% 58% 42% / 63% 68% 32% 37%; }
}

/* ============================================ */
/* Benefits Section                             */
/* ============================================ */
.benefits-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 1.5rem;
    margin-top: 3rem;
}

.benefit-card {
    text-align: center;
    padding: 2.5rem 2rem;
}

.benefit-icon {
    width: 64px;
    height: 64px;
    margin: 0 auto 1.2rem;
    background: rgba(201, 168, 76, 0.1);
    border-radius: var(--radius-lg);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.8rem;
}

.benefit-card h3 {
    font-size: 1.15rem;
    font-weight: 700;
    margin-bottom: 0.7rem;
}

.benefit-card p {
    color: var(--text-secondary);
    font-size: 0.9rem;
    line-height: 1.6;
}

/* ============================================ */
/* Pricing Section                              */
/* ============================================ */
.pricing-card {
    max-width: 480px;
    margin: 3rem auto 0;
    text-align: center;
    padding: 3rem;
    border: 2px solid var(--gold-primary);
    position: relative;
    overflow: hidden;
}

.pricing-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: var(--gold-gradient);
}

.pricing-card .price {
    font-size: 3rem;
    font-weight: 900;
    color: var(--gold-primary);
    margin: 1.5rem 0;
}

.pricing-card .price small {
    font-size: 1rem;
    color: var(--text-muted);
    font-weight: 400;
}

.pricing-features {
    list-style: none;
    margin: 2rem 0;
    text-align: left;
}

.pricing-features li {
    padding: 0.6rem 0;
    color: var(--text-secondary);
    display: flex;
    align-items: center;
    gap: 0.75rem;
    font-size: 0.95rem;
}

.pricing-features li::before {
    content: '✓';
    color: var(--green-primary);
    font-weight: 700;
    font-size: 1.1rem;
    flex-shrink: 0;
}

/* ============================================ */
/* Testimonials                                 */
/* ============================================ */
.testimonials-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 1.5rem;
    margin-top: 3rem;
}

.testimonial-card {
    padding: 2rem;
}

.testimonial-card .stars {
    color: var(--gold-primary);
    margin-bottom: 1rem;
    font-size: 1.1rem;
}

.testimonial-card blockquote {
    color: var(--text-secondary);
    font-size: 0.95rem;
    line-height: 1.7;
    margin-bottom: 1.5rem;
    font-style: italic;
}

.testimonial-author {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.testimonial-avatar {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: var(--gold-gradient);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--text-dark);
    font-weight: 700;
    font-size: 0.9rem;
}

.testimonial-name {
    font-weight: 600;
    font-size: 0.9rem;
}

/* ============================================ */
/* Section Headers                              */
/* ============================================ */
.section-header {
    text-align: center;
    max-width: 600px;
    margin: 0 auto 1rem;
}

.section-header h2 {
    font-size: 2.2rem;
    font-weight: 800;
    margin-bottom: 1rem;
    letter-spacing: -0.02em;
}

.section-header p {
    color: var(--text-secondary);
    font-size: 1.05rem;
    line-height: 1.6;
}

/* ============================================ */
/* Form Pages (Daftar, Checkout, etc.)          */
/* ============================================ */
.form-page {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 6rem 1rem 3rem;
}

.form-card {
    width: 100%;
    max-width: 500px;
    padding: 2.5rem;
}

.form-card h1 {
    font-size: 1.8rem;
    font-weight: 800;
    text-align: center;
    margin-bottom: 0.5rem;
}

.form-card .subtitle {
    text-align: center;
    color: var(--text-secondary);
    margin-bottom: 2rem;
}

/* Payment method selector */
.payment-methods {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
    margin-bottom: 1.5rem;
}

.payment-method {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 1rem 1.2rem;
    background: var(--bg-input);
    border: 2px solid var(--border-color);
    border-radius: var(--radius-md);
    cursor: pointer;
    transition: var(--transition);
}

.payment-method:hover {
    border-color: rgba(201, 168, 76, 0.3);
}

.payment-method.selected {
    border-color: var(--gold-primary);
    background: rgba(201, 168, 76, 0.05);
}

.payment-method input[type="radio"] {
    accent-color: var(--gold-primary);
    width: 18px;
    height: 18px;
}

.payment-method-info h4 {
    font-size: 0.95rem;
    font-weight: 600;
    color: var(--text-primary);
}

.payment-method-info p {
    font-size: 0.8rem;
    color: var(--text-muted);
}

/* Coupon input */
.coupon-group {
    display: flex;
    gap: 0.5rem;
    margin-bottom: 1.5rem;
}

.coupon-group .form-control {
    flex: 1;
    text-transform: uppercase;
}

.coupon-result {
    padding: 0.75rem 1rem;
    border-radius: var(--radius-sm);
    margin-bottom: 1rem;
    font-size: 0.9rem;
}

.coupon-result.valid {
    background: rgba(16, 185, 129, 0.1);
    border: 1px solid rgba(16, 185, 129, 0.3);
    color: #34d399;
}

.coupon-result.invalid {
    background: rgba(239, 68, 68, 0.1);
    border: 1px solid rgba(239, 68, 68, 0.3);
    color: #f87171;
}

/* Order summary */
.order-summary {
    background: var(--bg-input);
    border-radius: var(--radius-md);
    padding: 1.5rem;
    margin-bottom: 2rem;
}

.order-summary .line {
    display: flex;
    justify-content: space-between;
    padding: 0.5rem 0;
    font-size: 0.95rem;
}

.order-summary .line.discount {
    color: var(--green-primary);
}

.order-summary .line.total {
    border-top: 1px solid var(--border-color);
    margin-top: 0.5rem;
    padding-top: 1rem;
    font-size: 1.15rem;
    font-weight: 700;
    color: var(--gold-primary);
}

/* ============================================ */
/* Invoice Page                                 */
/* ============================================ */
.invoice-card {
    max-width: 600px;
    margin: 0 auto;
    padding: 2.5rem;
}

.invoice-status {
    text-align: center;
    margin-bottom: 2rem;
}

.invoice-status .status-icon {
    width: 72px;
    height: 72px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 1rem;
    font-size: 2rem;
}

.invoice-status .status-icon.pending {
    background: rgba(245, 158, 11, 0.15);
    border: 2px solid rgba(245, 158, 11, 0.3);
}

.invoice-status .status-icon.paid {
    background: rgba(16, 185, 129, 0.15);
    border: 2px solid rgba(16, 185, 129, 0.3);
}

.invoice-status .status-icon.waiting {
    background: rgba(59, 130, 246, 0.15);
    border: 2px solid rgba(59, 130, 246, 0.3);
}

.invoice-details {
    margin: 2rem 0;
}

.invoice-details .detail-row {
    display: flex;
    justify-content: space-between;
    padding: 0.75rem 0;
    border-bottom: 1px solid var(--border-light);
}

.invoice-details .detail-row .label {
    color: var(--text-muted);
    font-size: 0.9rem;
}

.invoice-details .detail-row .value {
    font-weight: 600;
    font-size: 0.95rem;
}

.bank-info {
    background: rgba(201, 168, 76, 0.05);
    border: 1px dashed var(--gold-primary);
    border-radius: var(--radius-md);
    padding: 1.5rem;
    margin: 1.5rem 0;
}

.bank-info h4 {
    color: var(--gold-primary);
    margin-bottom: 0.75rem;
    font-size: 0.9rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.bank-info .bank-detail {
    display: flex;
    justify-content: space-between;
    padding: 0.4rem 0;
    font-size: 0.95rem;
}

.bank-info .account-number {
    font-size: 1.3rem;
    font-weight: 800;
    color: var(--gold-primary);
    letter-spacing: 0.1em;
    margin: 0.5rem 0;
    cursor: pointer;
}

.copy-btn {
    display: inline-flex;
    align-items: center;
    gap: 0.3rem;
    padding: 0.3rem 0.8rem;
    background: rgba(201, 168, 76, 0.1);
    border: 1px solid rgba(201, 168, 76, 0.3);
    border-radius: var(--radius-sm);
    color: var(--gold-primary);
    font-size: 0.8rem;
    cursor: pointer;
    transition: var(--transition);
}

.copy-btn:hover {
    background: rgba(201, 168, 76, 0.2);
}

/* ============================================ */
/* Utility                                      */
/* ============================================ */
.mt-1 { margin-top: 0.5rem; }
.mt-2 { margin-top: 1rem; }
.mt-3 { margin-top: 1.5rem; }
.mt-4 { margin-top: 2rem; }
.mb-1 { margin-bottom: 0.5rem; }
.mb-2 { margin-bottom: 1rem; }
.mb-3 { margin-bottom: 1.5rem; }
.mb-4 { margin-bottom: 2rem; }
.gap-1 { gap: 0.5rem; }
.d-flex { display: flex; }
.flex-wrap { flex-wrap: wrap; }
.justify-between { justify-content: space-between; }
.align-center { align-items: center; }
.hidden { display: none; }
