@import url('https://fonts.googleapis.com/css2?family=Amiri:ital,wght@0,400;0,700;1,400&family=Cormorant+Garamond:ital,wght@0,500;0,600;0,700;1,500&family=Plus+Jakarta+Sans:wght@400;500;600;700;800&display=swap');

:root {
    --primary: #0c4a38;
    --primary-dark: #062a20;
    --primary-light: #1a6b52;
    --primary-glow: rgba(26, 107, 82, 0.25);
    --accent: #c9a227;
    --accent-light: #e8c547;
    --accent-dark: #9a7b1a;
    --bg: #f8f6f0;
    --bg-warm: #f0ebe0;
    --bg-card: #ffffff;
    --bg-dark: #041a14;
    --text: #1a2e28;
    --text-muted: #5c7268;
    --border: #ddd5c4;
    --border-gold: rgba(201, 162, 39, 0.35);
    --success: #15803d;
    --error: #b91c1c;
    --shadow-sm: 0 2px 12px rgba(6, 42, 32, 0.06);
    --shadow: 0 12px 40px rgba(6, 42, 32, 0.1);
    --shadow-lg: 0 24px 64px rgba(6, 42, 32, 0.14);
    --shadow-gold: 0 8px 32px rgba(201, 162, 39, 0.2);
    --radius: 16px;
    --radius-lg: 24px;
    --radius-xl: 32px;
    --nav-h: 76px;
    --transition: 0.35s cubic-bezier(0.4, 0, 0.2, 1);
    --font-body: 'Plus Jakarta Sans', -apple-system, sans-serif;
    --font-display: 'Cormorant Garamond', Georgia, serif;
    --font-arabic: 'Amiri', serif;
    --pattern: url("data:image/svg+xml,%3Csvg width='60' height='60' viewBox='0 0 60 60' xmlns='http://www.w3.org/2000/svg'%3E%3Cg fill='none' fill-rule='evenodd'%3E%3Cg fill='%23c9a227' fill-opacity='0.07'%3E%3Cpath d='M30 0l5 10 10 5-10 5-5 10-5-10-10-5 10-5z'/%3E%3C/g%3E%3C/g%3E%3C/svg%3E");
}

*, *::before, *::after { margin: 0; padding: 0; box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body {
    font-family: var(--font-body);
    background: var(--bg);
    color: var(--text);
    line-height: 1.7;
    overflow-x: hidden;
}
body.nav-open { overflow: hidden; }
a { color: var(--primary); text-decoration: none; transition: color var(--transition); }
a:hover { color: var(--primary-light); }

/* ── Ornaments ── */
.section-ornament {
    display: block;
    font-family: var(--font-arabic);
    font-size: 1.4rem;
    color: var(--accent);
    opacity: 0.85;
    margin-bottom: 0.75rem;
    letter-spacing: 0.05em;
}
.gold-line {
    width: 60px;
    height: 3px;
    background: linear-gradient(90deg, transparent, var(--accent), transparent);
    margin: 1rem auto;
    border-radius: 2px;
}

/* ── Navbar ── */
.navbar {
    position: fixed;
    top: 0; left: 0; right: 0;
    z-index: 1000;
    height: var(--nav-h);
    background: linear-gradient(135deg, #041a14 0%, #0a3d2e 45%, #0c4a38 100%);
    border-bottom: 1px solid rgba(134, 239, 172, 0.22);
    padding: 0 clamp(1rem, 4vw, 2.5rem);
    display: flex;
    align-items: center;
    justify-content: space-between;
    transition: all var(--transition);
    box-shadow: 0 4px 28px rgba(4, 26, 20, 0.35);
}
.navbar::after {
    content: '';
    position: absolute;
    bottom: 0; left: 0; right: 0;
    height: 2px;
    background: linear-gradient(90deg, transparent, var(--accent), #86efac, var(--accent), transparent);
    opacity: 0.65;
}
.navbar.scrolled {
    background: linear-gradient(135deg, #031510 0%, #062e23 100%);
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.35);
}
.nav-brand {
    display: flex;
    align-items: center;
    gap: 12px;
    font-family: var(--font-display);
    font-size: 1.45rem;
    font-weight: 700;
    color: #fff;
    z-index: 1001;
    text-decoration: none;
}
.nav-brand:hover { color: #fff; opacity: 0.95; }
.brand-logo {
    flex-shrink: 0;
    display: block;
    object-fit: contain;
}
.brand-logo-nav {
    height: 44px;
    width: auto;
    max-width: 52px;
    padding: 5px;
    border-radius: 12px;
    background: #fff;
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.2);
}
.brand-logo-footer {
    height: 34px;
    width: auto;
    max-width: 40px;
    padding: 4px;
    border-radius: 10px;
    background: rgba(255, 255, 255, 0.95);
}
.brand-icon {
    width: 42px;
    height: 42px;
    border-radius: 12px;
    background: linear-gradient(135deg, var(--primary-dark), var(--primary));
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.3rem;
    box-shadow: 0 4px 16px var(--primary-glow);
    border: 1px solid var(--border-gold);
}
.brand-text { color: #fff; letter-spacing: -0.02em; }
.brand-text span, .nav-brand .brand-text span { color: #fde047; }
.nav-links { display: flex; align-items: center; gap: clamp(0.25rem, 1.2vw, 1rem); list-style: none; }
.nav-links a {
    color: rgba(255, 255, 255, 0.88);
    font-weight: 500;
    font-size: 0.86rem;
    padding: 8px 12px;
    border-radius: 8px;
    position: relative;
    white-space: nowrap;
    transition: all var(--transition);
}
.nav-links a:hover, .nav-links a.active {
    color: #fff;
    background: rgba(255, 255, 255, 0.12);
}
.nav-free {
    color: #052e22 !important;
    font-weight: 700 !important;
    background: linear-gradient(135deg, #bbf7d0, #86efac) !important;
    border: 1px solid rgba(255, 255, 255, 0.4) !important;
    padding: 8px 16px !important;
    border-radius: 50px !important;
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.15);
}
.nav-free:hover { background: #dcfce7 !important; color: #052e22 !important; }
.nav-cta {
    background: linear-gradient(135deg, #eab308, #facc15) !important;
    color: #052e22 !important;
    padding: 10px 22px !important;
    border-radius: 50px !important;
    font-weight: 700 !important;
    box-shadow: 0 4px 20px rgba(234, 179, 8, 0.4);
    border: 1px solid rgba(255, 255, 255, 0.35) !important;
}
.nav-cta:hover {
    color: #041a14 !important;
    background: linear-gradient(135deg, #facc15, #fde047) !important;
    transform: translateY(-1px);
}
.nav-toggle {
    display: none;
    flex-direction: column;
    gap: 5px;
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 10px;
    cursor: pointer;
    padding: 10px;
    z-index: 1001;
}
.nav-toggle span {
    display: block;
    width: 24px;
    height: 2.5px;
    background: #fff;
    border-radius: 2px;
    transition: all var(--transition);
}
.nav-toggle.active span:nth-child(1) { transform: rotate(45deg) translate(5px, 5px); }
.nav-toggle.active span:nth-child(2) { opacity: 0; }
.nav-toggle.active span:nth-child(3) { transform: rotate(-45deg) translate(5px, -5px); }
.nav-overlay { display: none; position: fixed; inset: 0; background: rgba(4, 26, 20, 0.6); z-index: 999; backdrop-filter: blur(4px); }
.nav-overlay.active { display: block; }

/* ── Buttons ── */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 14px 30px;
    border-radius: 50px;
    font-weight: 600;
    font-size: 0.95rem;
    border: none;
    cursor: pointer;
    transition: all var(--transition);
    text-decoration: none;
    font-family: inherit;
    letter-spacing: 0.02em;
}
.btn-primary {
    background: linear-gradient(135deg, var(--accent), var(--accent-light));
    color: var(--primary-dark);
    box-shadow: var(--shadow-gold);
    border: 1px solid rgba(201, 162, 39, 0.4);
}
.btn-primary:hover { transform: translateY(-2px); box-shadow: 0 12px 40px rgba(201, 162, 39, 0.35); color: var(--primary-dark); }
.btn-outline {
    background: transparent;
    color: white;
    border: 2px solid rgba(255, 255, 255, 0.4);
}
.btn-outline:hover { background: white; color: var(--primary); border-color: white; }
.btn-outline-dark {
    background: var(--bg);
    color: var(--primary);
    border: 1px solid var(--border);
}
.btn-outline-dark:hover { border-color: var(--primary); background: white; }
.btn-ghost { background: var(--bg-warm); color: var(--primary); border: 1px solid var(--border); }
.btn-ghost:hover { background: white; border-color: var(--primary); }
.btn-block { width: 100%; }
.btn-sm { padding: 9px 18px; font-size: 0.85rem; }
.btn-danger { background: var(--error); color: white; }

/* ── Layout ── */
.section { padding: clamp(70px, 9vw, 110px) clamp(1rem, 4vw, 2rem); position: relative; }
.container { max-width: 1200px; margin: 0 auto; padding-left: clamp(1rem, 4vw, 2rem); padding-right: clamp(1rem, 4vw, 2rem); }
.section-header { text-align: center; margin-bottom: clamp(2.5rem, 5vw, 4rem); }
.section-header h2 {
    font-family: var(--font-display);
    font-size: clamp(2rem, 4.5vw, 2.8rem);
    font-weight: 700;
    color: var(--primary-dark);
    margin-bottom: 0.75rem;
    line-height: 1.2;
}
.section-header p { color: var(--text-muted); font-size: clamp(0.95rem, 2vw, 1.1rem); max-width: 620px; margin: 0 auto; }
.section-label {
    display: inline-block;
    background: linear-gradient(135deg, rgba(201, 162, 39, 0.15), rgba(201, 162, 39, 0.05));
    color: var(--accent-dark);
    border: 1px solid var(--border-gold);
    padding: 6px 18px;
    border-radius: 50px;
    font-size: 0.75rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.12em;
    margin-bottom: 1rem;
}

/* ── Home Hero ── */
.home-hero {
    position: relative;
    padding: calc(var(--nav-h) + 50px) 0 48px;
    overflow: hidden;
    background: var(--primary-dark);
    color: white;
    border-bottom: 1px solid rgba(134, 239, 172, 0.18);
}
.home-hero-compact {
    padding: calc(var(--nav-h) + 20px) 0 24px;
}
.home-hero-bg {
    position: absolute;
    inset: 0;
    background:
        var(--pattern),
        radial-gradient(ellipse 70% 55% at 75% 15%, rgba(201, 162, 39, 0.2), transparent),
        radial-gradient(ellipse 50% 45% at 5% 85%, rgba(26, 107, 82, 0.45), transparent),
        linear-gradient(165deg, #041a14 0%, #0c4a38 45%, #145a42 100%);
}
.home-hero-bg::after {
    display: none;
}
.home-hero-inner {
    position: relative;
    display: grid;
    grid-template-columns: 1fr;
    gap: 3rem;
    align-items: center;
}
.home-hero-compact .home-hero-inner {
    grid-template-columns: 1fr;
    gap: 0;
    align-items: center;
}
@media (max-width: 768px) {
    .home-hero-compact .home-hero-inner {
        grid-template-columns: 1fr;
        gap: 1rem;
    }
    .home-hero-stats { justify-content: flex-start; }
}
@media (min-width: 960px) { .home-hero-inner:not(.home-hero-compact .home-hero-inner) { grid-template-columns: 1.05fr 0.95fr; } }
.home-pill {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background: rgba(255, 255, 255, 0.08);
    border: 1px solid rgba(201, 162, 39, 0.35);
    padding: 8px 18px;
    border-radius: 50px;
    font-size: 0.82rem;
    font-weight: 500;
    margin-bottom: 1.5rem;
    backdrop-filter: blur(8px);
}
.home-hero-text h1 {
    font-family: var(--font-display);
    font-size: clamp(2.2rem, 5.5vw, 3.6rem);
    font-weight: 700;
    line-height: 1.1;
    margin-bottom: 1.25rem;
}
.home-hero-compact .home-hero-text h1 {
    font-size: clamp(1.35rem, 3.5vw, 1.85rem);
    margin-bottom: 0.4rem;
}
.home-hero-text h1 .gold { color: var(--accent-light); font-style: italic; }
.home-hero-text p { font-size: 1.05rem; opacity: 0.9; max-width: 520px; margin-bottom: 2rem; line-height: 1.75; }
.home-hero-compact .home-hero-text p {
    font-size: 0.88rem;
    margin-bottom: 0.85rem;
    opacity: 0.85;
    max-width: 480px;
}
.home-hero-actions { display: flex; gap: 1rem; flex-wrap: wrap; margin-bottom: 2.5rem; }
.home-hero-compact .home-hero-actions { margin-bottom: 0; gap: 0.6rem; }
.home-hero-stats {
    display: flex;
    gap: 1.25rem;
    flex-wrap: wrap;
    align-items: center;
}
.home-hero-stats span {
    font-size: 0.8rem;
    opacity: 0.85;
    padding: 8px 14px;
    background: rgba(255, 255, 255, 0.08);
    border: 1px solid rgba(255, 255, 255, 0.12);
    border-radius: 10px;
    white-space: nowrap;
}
.home-hero-stats strong {
    color: var(--accent-light);
    font-family: var(--font-display);
    font-size: 1.1rem;
    margin-right: 4px;
}
.hero-btn-light {
    background: rgba(255, 255, 255, 0.08) !important;
    color: white !important;
    border: 1px solid rgba(255, 255, 255, 0.25) !important;
    backdrop-filter: blur(8px);
}
.hero-btn-light:hover { background: white !important; color: var(--primary) !important; }
.home-trust {
    display: flex;
    gap: clamp(1.5rem, 4vw, 2.5rem);
    flex-wrap: wrap;
    padding-top: 1.5rem;
    border-top: 1px solid rgba(255, 255, 255, 0.12);
}
.home-trust div { text-align: center; min-width: 72px; }
.home-trust strong { display: block; font-family: var(--font-display); font-size: 2rem; color: var(--accent-light); font-weight: 700; }
.home-trust span { font-size: 0.78rem; opacity: 0.7; text-transform: uppercase; letter-spacing: 0.08em; }
.hero-api-preview {
    background: rgba(0, 0, 0, 0.4);
    border: 1px solid rgba(201, 162, 39, 0.25);
    border-radius: var(--radius-lg);
    overflow: hidden;
    backdrop-filter: blur(16px);
    box-shadow: 0 24px 64px rgba(0, 0, 0, 0.3);
}
.preview-top {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 14px 18px;
    background: rgba(0, 0, 0, 0.35);
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}
.preview-top .dot { width: 10px; height: 10px; border-radius: 50%; background: rgba(255, 255, 255, 0.2); }
.preview-top .dot:first-child { background: #ef4444; }
.preview-top .dot:nth-child(2) { background: #eab308; }
.preview-top .dot:nth-child(3) { background: #22c55e; }
.preview-top code { margin-left: auto; font-size: 0.68rem; opacity: 0.75; word-break: break-all; color: var(--accent-light); }
.hero-api-preview pre {
    padding: 1.5rem;
    font-family: 'Consolas', 'Monaco', monospace;
    font-size: 0.78rem;
    line-height: 1.6;
    color: #a7f3d0;
    margin: 0;
    max-height: 300px;
    overflow: auto;
}

/* ── Language Strip ── */
.lang-strip {
    background: white;
    border-bottom: 1px solid var(--border);
    padding: 1.5rem 0;
    position: relative;
}
.lang-strip-compact {
    padding: 0.75rem 0;
    background: var(--bg);
    border-bottom: none;
}
.lang-strip-compact::before { display: none; }
.lang-strip::before {
    content: '';
    position: absolute;
    top: 0; left: 0; right: 0;
    height: 3px;
    background: linear-gradient(90deg, transparent, var(--accent), transparent);
}
.lang-strip p { text-align: center; font-size: 0.82rem; color: var(--text-muted); margin-bottom: 1rem; text-transform: uppercase; letter-spacing: 0.1em; font-weight: 600; }
.lang-grid { display: flex; flex-wrap: wrap; gap: 0.6rem; justify-content: center; }
.lang-chip {
    padding: 9px 18px;
    background: var(--bg);
    border: 1px solid var(--border);
    border-radius: 50px;
    font-size: 0.85rem;
    font-weight: 500;
    transition: all var(--transition);
}
.lang-strip-compact .lang-chip {
    padding: 5px 12px;
    font-size: 0.78rem;
    background: white;
}
.lang-chip:hover { border-color: var(--accent); background: rgba(201, 162, 39, 0.08); transform: translateY(-2px); }

.section-compact { padding: 28px clamp(1rem, 4vw, 2rem) 40px; }

/* ── API Cards ── */
.home-apis { background: var(--bg); }
.api-filter-tabs { display: flex; flex-wrap: wrap; gap: 0.4rem; justify-content: flex-start; margin-bottom: 1.25rem; }
.filter-tab {
    padding: 8px 16px;
    border-radius: 10px;
    border: 1px solid var(--border);
    background: white;
    font-family: inherit;
    font-size: 0.82rem;
    font-weight: 500;
    cursor: pointer;
    transition: all var(--transition);
}
.filter-tab:hover, .filter-tab.active {
    background: var(--primary-dark);
    color: white;
    border-color: var(--primary-dark);
    box-shadow: none;
}
.home-api-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 300px), 1fr)); gap: 1.25rem; }
.home-api-card {
    background: white;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 1.35rem 1.35rem 1.15rem;
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
    transition: transform var(--transition), border-color var(--transition), box-shadow var(--transition);
    box-shadow: var(--shadow-sm);
    position: relative;
    overflow: hidden;
}
.home-api-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: linear-gradient(90deg, var(--primary-dark), var(--accent));
    opacity: 0;
    transition: opacity var(--transition);
}
.home-api-card:hover {
    transform: translateY(-4px);
    border-color: var(--border-gold);
    box-shadow: var(--shadow);
}
.home-api-card:hover::before { opacity: 1; }
.home-api-card-head {
    display: flex;
    align-items: flex-start;
    gap: 14px;
}
.home-api-card-meta {
    flex: 1;
    min-width: 0;
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 4px;
    padding-right: 4.5rem;
}
.home-api-card .api-card-icon {
    width: 48px;
    height: 48px;
    border-radius: 14px;
    font-size: 1.25rem;
    margin-bottom: 0;
    flex-shrink: 0;
    background: linear-gradient(135deg, var(--primary-dark), var(--primary));
    display: flex;
    align-items: center;
    justify-content: center;
    border: 1px solid var(--border-gold);
    box-shadow: 0 4px 14px var(--primary-glow);
}
.api-card-category {
    font-size: 0.68rem;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: var(--primary-light);
}
.home-api-card h3 {
    font-family: var(--font-display);
    font-size: 1.05rem;
    font-weight: 700;
    color: var(--primary-dark);
    line-height: 1.3;
}
.home-api-card p {
    color: var(--text-muted);
    font-size: 0.84rem;
    flex: 1;
    line-height: 1.55;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
    margin: 0;
}
.home-api-card > .api-badge {
    position: absolute;
    top: 1rem;
    right: 1rem;
    margin-bottom: 0;
    padding: 4px 10px;
    font-size: 0.62rem;
    z-index: 1;
}
.api-card-footer {
    margin-top: auto;
    padding-top: 0.85rem;
    border-top: 1px solid var(--border);
}
.api-card-link {
    font-size: 0.82rem;
    font-weight: 600;
    color: var(--primary);
    display: inline-flex;
    align-items: center;
    gap: 6px;
    transition: gap var(--transition), color var(--transition);
}
.api-card-link::after {
    content: '→';
    transition: transform var(--transition);
}
.home-api-card:hover .api-card-link {
    color: var(--primary-light);
    gap: 10px;
}
.home-api-card:hover .api-card-link::after {
    transform: translateX(3px);
}
.home-api-actions {
    display: flex;
    gap: 0.5rem;
    margin-top: auto;
    padding-top: 0.85rem;
    border-top: 1px solid var(--border);
}
.home-api-actions .btn { flex: 1; justify-content: center; padding: 9px 12px; font-size: 0.8rem; }

.api-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 300px), 1fr)); gap: 1.5rem; }
.api-card {
    background: white;
    border-radius: var(--radius-lg);
    padding: 1.75rem;
    border: 1px solid var(--border);
    transition: all var(--transition);
    cursor: pointer;
    position: relative;
    overflow: hidden;
    box-shadow: var(--shadow-sm);
}
.api-card::after {
    content: '';
    position: absolute;
    bottom: 0; right: 0;
    width: 80px; height: 80px;
    background: radial-gradient(circle, rgba(201, 162, 39, 0.1), transparent);
    pointer-events: none;
}
.api-card:hover { transform: translateY(-6px); box-shadow: var(--shadow-lg); border-color: var(--border-gold); }
.api-card-icon {
    width: 54px; height: 54px;
    border-radius: 16px;
    background: linear-gradient(135deg, var(--primary-dark), var(--primary));
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    margin-bottom: 1rem;
    border: 1px solid var(--border-gold);
    box-shadow: 0 4px 16px var(--primary-glow);
}
.api-card h3 { font-family: var(--font-display); font-size: 1.2rem; font-weight: 700; margin-bottom: 0.5rem; }
.api-card p { color: var(--text-muted); font-size: 0.88rem; margin-bottom: 1rem; }
.api-badge {
    display: inline-block;
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 0.68rem;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    margin-bottom: 0.75rem;
}
.badge-free { background: #dcfce7; color: #166534; border: 1px solid #86efac; }
.badge-premium { background: linear-gradient(135deg, #fef3c7, #fde68a); color: #92400e; border: 1px solid #fcd34d; }
.api-endpoint {
    font-family: 'Consolas', monospace;
    font-size: 0.72rem;
    background: var(--bg);
    padding: 10px 14px;
    border-radius: 10px;
    color: var(--primary);
    word-break: break-all;
    border: 1px solid var(--border);
}

/* ── Pricing ── */
.home-pricing { background: white; border-top: 1px solid var(--border); }
.home-pricing-title {
    font-family: var(--font-display);
    font-size: 1.35rem;
    font-weight: 700;
    color: var(--primary-dark);
    text-align: center;
    margin-bottom: 1.25rem;
}
.pricing-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 280px), 1fr)); gap: 1.75rem; max-width: 1050px; margin: 0 auto; }
.pricing-grid-simple {
    grid-template-columns: repeat(3, 1fr);
    gap: 1rem;
    max-width: 720px;
}
@media (max-width: 640px) { .pricing-grid-simple { grid-template-columns: 1fr; max-width: 280px; } }
.pricing-card {
    background: white;
    border-radius: var(--radius-xl);
    padding: clamp(2rem, 4vw, 2.75rem);
    border: 2px solid var(--border);
    text-align: center;
    position: relative;
    transition: all var(--transition);
    box-shadow: var(--shadow-sm);
}
.pricing-card-simple {
    border-radius: 14px;
    padding: 1.25rem 1rem;
    border: 1px solid var(--border);
    box-shadow: none;
}
.pricing-card-simple:hover { border-color: var(--primary); box-shadow: 0 4px 16px rgba(6, 42, 32, 0.06); transform: none; }
.pricing-card-simple h3 {
    font-family: var(--font-body);
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.06em;
    margin-bottom: 0.5rem;
}
.pricing-card-simple .pricing-price {
    font-family: var(--font-display);
    font-size: 2rem;
    margin: 0.25rem 0 1rem;
}
.pricing-card-simple.featured {
    border-color: var(--accent);
    background: #fffef8;
}
.pricing-card-simple.featured::before {
    content: 'Popular';
    position: absolute;
    top: -10px;
    left: 50%;
    transform: translateX(-50%);
    background: var(--accent);
    color: var(--primary-dark);
    padding: 3px 12px;
    border-radius: 20px;
    font-size: 0.62rem;
    font-weight: 700;
    letter-spacing: 0.05em;
}
.pricing-card:hover { transform: translateY(-4px); box-shadow: var(--shadow); }
.pricing-card h3 { font-family: var(--font-display); font-size: 1.5rem; font-weight: 700; color: var(--primary-dark); }
.pricing-card.featured {
    border-color: var(--accent);
    box-shadow: var(--shadow-gold);
    background: linear-gradient(180deg, #fffef8, white);
}
.pricing-card.featured::before {
    content: 'BEST VALUE';
    position: absolute;
    top: -14px; left: 50%;
    transform: translateX(-50%);
    background: linear-gradient(135deg, var(--accent), var(--accent-light));
    color: var(--primary-dark);
    padding: 5px 20px;
    border-radius: 20px;
    font-size: 0.68rem;
    font-weight: 800;
    letter-spacing: 0.08em;
    box-shadow: var(--shadow-gold);
}
.pricing-price {
    font-family: var(--font-display);
    font-size: clamp(2.8rem, 6vw, 3.5rem);
    font-weight: 700;
    color: var(--primary);
    margin: 1.25rem 0;
}
.pricing-price span { font-size: 1rem; color: var(--text-muted); font-weight: 400; font-family: var(--font-body); }
.pricing-features { list-style: none; margin: 1.5rem 0; text-align: left; }
.pricing-features li { padding: 11px 0; border-bottom: 1px solid var(--border); font-size: 0.9rem; color: var(--text-muted); }
.pricing-features li::before { content: '✦ '; color: var(--accent); font-weight: 800; }

/* ── Page Hero ── */
.page-hero {
    position: relative;
    padding: calc(var(--nav-h) + 50px) clamp(1rem, 4vw, 2rem) 48px;
    background: linear-gradient(165deg, var(--primary-dark), var(--primary) 60%, #145a42);
    color: white;
    text-align: center;
    overflow: hidden;
    border-bottom: 1px solid rgba(134, 239, 172, 0.18);
}
.page-hero-pattern {
    position: absolute;
    inset: 0;
    background: var(--pattern);
    opacity: 0.5;
}
.page-hero-content { position: relative; }
.page-hero h1 {
    font-family: var(--font-display);
    font-size: clamp(2rem, 5vw, 3rem);
    font-weight: 700;
    margin-bottom: 0.75rem;
}
.page-hero p { opacity: 0.88; font-size: 1.05rem; max-width: 560px; margin: 0 auto; }

/* ── API Detail ── */
.api-detail-header {
    position: relative;
    padding: calc(var(--nav-h) + 40px) clamp(1rem, 4vw, 2rem) 40px;
    background: linear-gradient(165deg, var(--primary-dark), var(--primary));
    color: white;
    overflow: hidden;
    border-bottom: 1px solid rgba(134, 239, 172, 0.18);
}
.api-detail-header-compact {
    padding: calc(var(--nav-h) + 14px) clamp(1rem, 4vw, 2rem) 20px;
}
.api-detail-header-pattern {
    position: absolute;
    inset: 0;
    background: var(--pattern);
    opacity: 0.4;
}
.api-detail-header-inner { position: relative; max-width: 1200px; margin: 0 auto; }
.api-detail-top-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    margin-bottom: 0.5rem;
}
.back-link {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    color: rgba(255, 255, 255, 0.7);
    font-size: 0.8rem;
    transition: color var(--transition);
}
.back-link:hover { color: var(--accent-light); }
.api-detail-header h1 {
    font-family: var(--font-display);
    font-size: clamp(1.8rem, 4vw, 2.8rem);
    font-weight: 700;
    margin: 0.75rem 0 0.5rem;
}
.api-detail-header-compact h1 {
    font-size: clamp(1.2rem, 3vw, 1.55rem);
    margin: 0 0 0.35rem;
    line-height: 1.25;
}
.api-detail-desc { opacity: 0.88; font-size: 1.05rem; max-width: 640px; }
.api-detail-header-compact .api-detail-desc {
    font-size: 0.82rem;
    opacity: 0.8;
    margin-bottom: 0.6rem;
    max-width: 100%;
}
.api-detail-meta {
    list-style: none;
    display: flex;
    flex-wrap: wrap;
    gap: 0.4rem;
    margin-bottom: 0.65rem;
}
.api-detail-meta li {
    font-size: 0.72rem;
    padding: 4px 10px;
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(201, 162, 39, 0.3);
    border-radius: 6px;
    color: rgba(255, 255, 255, 0.9);
}
.api-detail-header-compact .api-badge { margin-bottom: 0; font-size: 0.62rem; padding: 3px 10px; }
.api-endpoint-hero {
    display: block;
    background: rgba(0, 0, 0, 0.25);
    border: 1px solid rgba(201, 162, 39, 0.3);
    color: var(--accent-light);
    font-family: monospace;
    font-size: 0.7rem;
    padding: 8px 12px;
    border-radius: 8px;
    word-break: break-all;
}
.api-detail-body { max-width: 1200px; margin: 0 auto; padding: 1.25rem clamp(1rem, 4vw, 2rem) 2rem; }

.upgrade-banner {
    display: none;
    align-items: center;
    gap: 0.75rem;
    background: linear-gradient(135deg, #fffbeb, #fef3c7);
    border: 1px solid var(--accent);
    border-radius: 10px;
    padding: 0.65rem 1rem;
    margin-bottom: 1rem;
    flex-wrap: wrap;
}
.upgrade-banner-icon { font-size: 1.1rem; line-height: 1; flex-shrink: 0; }
.upgrade-banner-text {
    flex: 1;
    min-width: 0;
    display: flex;
    flex-direction: column;
    gap: 1px;
}
.upgrade-banner-text strong {
    font-size: 0.85rem;
    font-weight: 700;
    color: var(--primary-dark);
    line-height: 1.3;
}
.upgrade-banner-text span {
    font-size: 0.75rem;
    color: var(--text-muted);
    line-height: 1.3;
}
.upgrade-banner .btn {
    margin-left: auto;
    flex-shrink: 0;
    padding: 8px 16px;
    font-size: 0.8rem;
}

.download-bar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    background: white;
    padding: 1rem 1.25rem;
    border-radius: 12px;
    border: 1px solid var(--border);
    margin-bottom: 1rem;
    flex-wrap: wrap;
    gap: 0.75rem;
    box-shadow: var(--shadow-sm);
}
.download-bar-text strong { font-family: var(--font-display); font-size: 1.15rem; color: var(--primary-dark); }
.download-bar-text p { font-size: 0.85rem; color: var(--text-muted); margin-top: 4px; }
.live-fetch { display: flex; gap: 0.75rem; flex-wrap: wrap; align-items: center; }
.live-fetch select {
    padding: 11px 16px;
    border: 1px solid var(--border);
    border-radius: 12px;
    font-size: 0.9rem;
    background: var(--bg);
    font-family: inherit;
    flex: 1;
    min-width: 150px;
    cursor: pointer;
}
.live-fetch select:focus { outline: none; border-color: var(--primary); }

.panel {
    background: white;
    border-radius: var(--radius-lg);
    border: 1px solid var(--border);
    overflow: hidden;
    box-shadow: var(--shadow-sm);
    margin-bottom: 1.5rem;
}
.panel-header {
    padding: 1rem 1.5rem;
    background: linear-gradient(180deg, var(--bg), white);
    border-bottom: 1px solid var(--border);
    display: flex;
    align-items: center;
    justify-content: space-between;
    font-weight: 600;
    font-size: 0.95rem;
    flex-wrap: wrap;
    gap: 0.5rem;
    color: var(--primary-dark);
}
.live-badge { font-size: 0.78rem; color: var(--success); font-weight: 600; }
.panel-body { padding: 1.5rem; }
.panel-json .json-preview { max-height: 520px; }
.json-preview {
    background: #0a1628;
    color: #e2e8f0;
    padding: 1.5rem;
    font-family: 'Consolas', 'Monaco', monospace;
    font-size: 0.82rem;
    overflow: auto;
    white-space: pre-wrap;
    word-break: break-word;
    margin: 0;
    line-height: 1.65;
}

.code-tabs {
    display: flex;
    overflow-x: auto;
    border-bottom: 1px solid var(--border);
    background: var(--bg);
    -webkit-overflow-scrolling: touch;
}
.code-lang-tabs {
    display: flex;
    flex-wrap: wrap;
    gap: 0.35rem;
    padding: 0.85rem 1rem;
    background: #f4f7f5;
    border-bottom: 1px solid var(--border);
}
.code-lang-tab {
    padding: 6px 12px;
    border-radius: 8px;
    border: 1px solid var(--border);
    background: white;
    font-family: inherit;
    font-size: 0.75rem;
    font-weight: 500;
    cursor: pointer;
    color: var(--text-muted);
    transition: all var(--transition);
}
.code-lang-tab:hover { border-color: var(--primary); color: var(--primary); }
.code-lang-tab.active {
    background: var(--primary-dark);
    color: white;
    border-color: var(--primary-dark);
}
.code-section-hint {
    padding: 0.75rem 1.25rem 0;
    font-size: 0.8rem;
    color: var(--text-muted);
    margin: 0;
}
.code-url-bar {
    padding: 0.65rem 1.25rem;
    background: #0d1f18;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
    font-size: 0.75rem;
    color: #94a3b8;
    word-break: break-all;
}
.code-url-bar code { color: #a7f3d0; font-family: monospace; }
.code-url-bar span { color: var(--accent-light); font-weight: 600; margin-right: 6px; }
.code-tab {
    padding: 12px 18px;
    background: none;
    border: none;
    cursor: pointer;
    font-weight: 500;
    font-size: 0.85rem;
    color: var(--text-muted);
    border-bottom: 2px solid transparent;
    white-space: nowrap;
    font-family: inherit;
    transition: all var(--transition);
}
.code-tab.active { color: var(--primary); border-bottom-color: var(--accent); background: white; font-weight: 600; }
.code-tab:hover { color: var(--primary); }
.code-block {
    background: #0a1628;
    color: #e2e8f0;
    padding: 1.5rem;
    font-family: monospace;
    font-size: 0.82rem;
    overflow-x: auto;
    position: relative;
    min-height: 200px;
}
.copy-btn {
    position: absolute;
    top: 12px; right: 12px;
    background: rgba(201, 162, 39, 0.2);
    color: var(--accent-light);
    border: 1px solid rgba(201, 162, 39, 0.4);
    padding: 7px 16px;
    border-radius: 8px;
    cursor: pointer;
    font-size: 0.8rem;
    font-weight: 600;
    transition: all var(--transition);
}
.copy-btn:hover { background: var(--accent); color: var(--primary-dark); }

/* ── Content ── */
.content-block { max-width: 820px; margin: 0 auto; padding: clamp(2.5rem, 5vw, 4.5rem) clamp(1rem, 4vw, 2rem); }
.content-block h2 {
    font-family: var(--font-display);
    font-size: 1.75rem;
    color: var(--primary-dark);
    margin: 2.5rem 0 1rem;
    padding-bottom: 0.5rem;
    border-bottom: 2px solid var(--border);
}
.content-block p, .content-block li { color: var(--text-muted); margin-bottom: 0.75rem; }
.content-block ul { padding-left: 1.5rem; }
.content-block strong { color: var(--text); }
.content-block code {
    background: var(--bg-warm);
    padding: 2px 8px;
    border-radius: 6px;
    font-size: 0.88rem;
    color: var(--primary);
    border: 1px solid var(--border);
}

.feature-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 260px), 1fr)); gap: 1.5rem; margin-top: 2rem; }
.feature-card {
    background: white;
    padding: 2rem;
    border-radius: var(--radius-lg);
    border: 1px solid var(--border);
    text-align: center;
    transition: all var(--transition);
    box-shadow: var(--shadow-sm);
    position: relative;
    overflow: hidden;
}
.feature-card::before {
    content: '';
    position: absolute;
    top: 0; left: 0; right: 0;
    height: 3px;
    background: linear-gradient(90deg, var(--primary), var(--accent));
}
.feature-card:hover { box-shadow: var(--shadow-lg); transform: translateY(-5px); border-color: var(--border-gold); }
.feature-card .icon { font-size: 2.75rem; margin-bottom: 1rem; }
.feature-card h3 { font-family: var(--font-display); font-size: 1.25rem; color: var(--primary-dark); margin-bottom: 0.5rem; }
.feature-card p { color: var(--text-muted); font-size: 0.9rem; }

.contact-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 280px), 1fr)); gap: 1.5rem; }
.contact-card {
    background: white;
    padding: 2.25rem;
    border-radius: var(--radius-lg);
    border: 1px solid var(--border);
    text-align: center;
    transition: all var(--transition);
    box-shadow: var(--shadow-sm);
}
.contact-card:hover { border-color: var(--accent); box-shadow: var(--shadow); transform: translateY(-4px); }
.contact-card .icon { font-size: 2.5rem; margin-bottom: 1rem; }
.contact-card h3 { font-family: var(--font-display); font-size: 1.2rem; color: var(--primary-dark); margin-bottom: 0.5rem; }

/* ── Forms ── */
.form-group { margin-bottom: 1.25rem; }
.form-group label { display: block; margin-bottom: 7px; font-weight: 600; font-size: 0.88rem; color: var(--primary-dark); }
.form-group input, .form-group textarea, .form-group select {
    width: 100%;
    padding: 13px 16px;
    border: 1px solid var(--border);
    border-radius: 12px;
    font-size: 0.95rem;
    font-family: inherit;
    background: var(--bg);
    transition: all var(--transition);
}
.form-group input:focus, .form-group textarea:focus, .form-group select:focus {
    outline: none;
    border-color: var(--primary);
    background: white;
    box-shadow: 0 0 0 4px var(--primary-glow);
}
.form-row { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 1rem; }

.modal {
    position: fixed;
    inset: 0;
    display: flex;
    align-items: flex-end;
    justify-content: center;
    z-index: 2000;
}
.modal-backdrop {
    position: absolute;
    inset: 0;
    background: rgba(4, 26, 20, 0.65);
    backdrop-filter: blur(6px);
}
.modal-content,
.modal-content-lg {
    position: relative;
    z-index: 1;
}
@media (min-width: 600px) { .modal { align-items: center; padding: 1rem; } }
.modal-content {
    background: white;
    border-radius: var(--radius-xl) var(--radius-xl) 0 0;
    padding: clamp(1.75rem, 4vw, 2.5rem);
    width: 100%;
    max-width: 500px;
    max-height: 90vh;
    max-height: 90dvh;
    overflow-y: auto;
    border-top: 3px solid var(--accent);
    -webkit-overflow-scrolling: touch;
}
@media (min-width: 600px) { .modal-content { border-radius: var(--radius-xl); } }
.modal-content h2 { font-family: var(--font-display); font-size: 1.75rem; color: var(--primary-dark); margin-bottom: 0.5rem; }
.modal-sub { color: var(--text-muted); margin-bottom: 1.5rem; font-size: 0.9rem; }
.alert { padding: 12px 16px; border-radius: 12px; margin-bottom: 1rem; font-size: 0.9rem; }
.alert-success { background: #dcfce7; color: #166534; }
.alert-error { background: #fee2e2; color: #991b1b; }

/* ── CTA ── */
.cta-section {
    position: relative;
    background: linear-gradient(165deg, var(--primary-dark), var(--primary));
    color: white;
    text-align: center;
    padding: clamp(70px, 9vw, 100px) clamp(1rem, 4vw, 2rem);
    overflow: hidden;
}
.cta-section::before {
    content: '';
    position: absolute;
    inset: 0;
    background: var(--pattern);
    opacity: 0.35;
}
.cta-section > * { position: relative; }
.cta-section h2 { font-family: var(--font-display); font-size: clamp(1.8rem, 4vw, 2.5rem); margin-bottom: 0.75rem; }
.cta-section p { opacity: 0.88; margin-bottom: 2rem; max-width: 520px; margin-left: auto; margin-right: auto; }
.cta-section-light {
    background: var(--bg-warm);
    color: var(--text);
}
.cta-section-light::before { display: none; }
.cta-section-light h2 { color: var(--primary-dark); }
.cta-section-light p { color: var(--text-muted); }

/* ── Footer ── */
.footer {
    background: linear-gradient(180deg, #041a14 0%, #062a20 100%);
    color: rgba(255, 255, 255, 0.72);
    position: relative;
    overflow: hidden;
    margin-top: 2rem;
}
.footer::before {
    content: '';
    position: absolute;
    top: 0; left: 0; right: 0;
    height: 3px;
    background: linear-gradient(90deg, transparent, var(--accent), transparent);
}
.footer-bismillah {
    text-align: center;
    padding: 1.25rem 1rem 0;
    font-family: var(--font-arabic);
    font-size: 1.25rem;
    color: var(--accent);
    opacity: 0.85;
    position: relative;
}
.footer-pattern {
    position: absolute;
    inset: 0;
    background: var(--pattern);
    opacity: 0.12;
    pointer-events: none;
}
.footer-top { padding: 2rem clamp(1rem, 4vw, 2rem) 2.5rem; position: relative; }
.footer-grid {
    max-width: 1100px;
    margin: 0 auto;
    display: grid;
    grid-template-columns: 1.5fr repeat(3, 1fr);
    gap: 2rem;
}
@media (max-width: 768px) { .footer-grid { grid-template-columns: 1fr 1fr; gap: 1.5rem; } }
@media (max-width: 480px) { .footer-grid { grid-template-columns: 1fr; } }
.footer-brand {
    font-family: var(--font-display);
    font-size: 1.35rem;
    font-weight: 700;
    color: white;
    margin-bottom: 0.75rem;
    display: flex;
    align-items: center;
    gap: 10px;
}
.footer-brand-icon {
    width: 36px; height: 36px;
    border-radius: 10px;
    background: linear-gradient(135deg, var(--primary), var(--primary-light));
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.1rem;
    border: 1px solid var(--border-gold);
}
.footer-brand span { color: var(--accent-light); }
.footer-desc { font-size: 0.85rem; line-height: 1.65; margin-bottom: 1.25rem; max-width: 280px; }
.footer-col h4 {
    color: white;
    font-size: 0.8rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    margin-bottom: 1rem;
    padding-bottom: 0.5rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}
.footer-col ul { list-style: none; }
.footer-col li { margin-bottom: 8px; }
.footer-col a {
    color: rgba(255, 255, 255, 0.5);
    font-size: 0.85rem;
    transition: all var(--transition);
    display: inline-block;
}
.footer-col a:hover { color: var(--accent-light); transform: translateX(3px); }
.footer-contact-item {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 0.82rem;
    color: rgba(255, 255, 255, 0.55);
    margin-bottom: 8px;
}
.footer-social { display: flex; gap: 0.5rem; flex-wrap: wrap; }
.footer-social a {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 8px 14px;
    border-radius: 10px;
    background: rgba(255, 255, 255, 0.06);
    border: 1px solid rgba(255, 255, 255, 0.1);
    font-size: 0.8rem;
    color: rgba(255, 255, 255, 0.75);
    transition: all var(--transition);
}
.footer-social a:hover {
    background: rgba(201, 162, 39, 0.2);
    border-color: var(--accent);
    color: var(--accent-light);
    transform: translateY(-2px);
}
.footer-bottom {
    border-top: 1px solid rgba(255, 255, 255, 0.08);
    padding: 1.25rem;
    text-align: center;
    font-size: 0.8rem;
    color: rgba(255, 255, 255, 0.35);
    position: relative;
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: center;
    gap: 0.5rem 1.5rem;
}
.footer-bottom a { color: rgba(255, 255, 255, 0.45); font-size: 0.8rem; }
.footer-bottom a:hover { color: var(--accent-light); }

/* ── Docs ── */
.docs-nav {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin-bottom: 2rem;
    padding: 1rem;
    background: white;
    border-radius: var(--radius);
    border: 1px solid var(--border);
    box-shadow: var(--shadow-sm);
}
.docs-nav a {
    padding: 9px 18px;
    border-radius: 10px;
    font-size: 0.85rem;
    background: var(--bg);
    border: 1px solid var(--border);
    font-weight: 500;
    transition: all var(--transition);
}
.docs-nav a:hover, .docs-nav a.active {
    background: linear-gradient(135deg, var(--primary-dark), var(--primary));
    color: white;
    border-color: var(--primary);
}

/* ── Admin ── */
.admin-body { background: #eef5f2; min-height: 100vh; }
.admin-login {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(165deg, var(--primary-dark), var(--primary));
    padding: 1rem;
}
.login-card {
    background: white;
    padding: clamp(2rem, 5vw, 3rem);
    border-radius: var(--radius-xl);
    width: 100%;
    max-width: 420px;
    box-shadow: var(--shadow-lg);
    text-align: center;
    border-top: 3px solid var(--accent);
}
.admin-sidebar {
    position: fixed; left: 0; top: 0; bottom: 0;
    width: 260px;
    background: var(--primary-dark);
    color: white;
    padding: 1.5rem 0;
    z-index: 100;
    overflow-y: auto;
}
.sidebar-brand {
    padding: 0 1.5rem 1.5rem;
    font-family: var(--font-display);
    font-size: 1.2rem;
    font-weight: 700;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    margin-bottom: 0.5rem;
    display: flex;
    align-items: center;
    gap: 10px;
    color: #fff;
}
.sidebar-logo {
    height: 36px;
    width: auto;
    object-fit: contain;
    background: #fff;
    border-radius: 10px;
    padding: 4px;
    flex-shrink: 0;
}
.sidebar-brand .gold { color: var(--accent-light); }
.admin-sidebar nav a { display: block; padding: 12px 1.5rem; color: rgba(255, 255, 255, 0.6); font-weight: 500; font-size: 0.9rem; transition: all var(--transition); }
.admin-sidebar nav a:hover, .admin-sidebar nav a.active { background: rgba(255, 255, 255, 0.08); color: white; border-left: 3px solid var(--accent); }
.sidebar-user { position: absolute; bottom: 1rem; left: 1.5rem; font-size: 0.8rem; color: rgba(255, 255, 255, 0.35); }
.admin-main { margin-left: 260px; padding: clamp(1rem, 3vw, 2rem); }
.admin-mobile-toggle {
    display: none;
    position: fixed;
    bottom: 1.5rem; right: 1.5rem;
    z-index: 101;
    width: 52px; height: 52px;
    border-radius: 50%;
    background: var(--primary);
    color: white;
    border: none;
    font-size: 1.3rem;
    cursor: pointer;
    box-shadow: var(--shadow-lg);
}
.stats-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 1rem; margin-bottom: 1.5rem; }
.stat-card { background: white; padding: 1.25rem; border-radius: var(--radius); border: 1px solid var(--border); text-align: center; }
.stat-num { display: block; font-family: var(--font-display); font-size: 2rem; font-weight: 700; color: var(--primary); }
.stat-label { font-size: 0.8rem; color: var(--text-muted); }
.admin-section { background: white; border-radius: var(--radius); padding: 1.25rem; margin-bottom: 1.25rem; border: 1px solid var(--border); }
.admin-table { width: 100%; border-collapse: collapse; font-size: 0.85rem; }
.admin-table th { text-align: left; padding: 10px 8px; background: var(--bg); font-weight: 600; border-bottom: 2px solid var(--border); }
.admin-table td { padding: 10px 8px; border-bottom: 1px solid var(--border); }
.admin-table-wrap { overflow-x: auto; }
.badge { padding: 3px 10px; border-radius: 12px; font-size: 0.72rem; font-weight: 600; }
.badge-pending, .badge-monthly, .badge-yearly, .badge-dataset { background: #fef3c7; color: #92400e; }
.badge-approved { background: #dcfce7; color: #166534; }
.badge-rejected { background: #fee2e2; color: #991b1b; }
.json-editor { width: 100%; min-height: 400px; font-family: monospace; font-size: 0.85rem; padding: 1rem; border: 1px solid var(--border); border-radius: var(--radius); }

/* ── Utilities ── */
.empty, .loading { text-align: center; color: var(--text-muted); padding: 2rem; }
.spinner { display: inline-block; width: 28px; height: 28px; border: 3px solid var(--border); border-top-color: var(--primary); border-radius: 50%; animation: spin 0.7s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }
.toast {
    position: fixed;
    bottom: 1.5rem; left: 50%;
    transform: translateX(-50%);
    background: var(--primary-dark);
    color: white;
    padding: 14px 28px;
    border-radius: 50px;
    z-index: 3000;
    font-size: 0.9rem;
    box-shadow: var(--shadow-lg);
    max-width: 90vw;
    text-align: center;
    border: 1px solid var(--border-gold);
}

/* Admin subscription cards */
.sub-cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 340px), 1fr)); gap: 1rem; }
.sub-card { background: white; border: 1px solid var(--border); border-radius: var(--radius-lg); overflow: hidden; }
.sub-card-head { display: flex; justify-content: space-between; align-items: flex-start; padding: 1rem 1.25rem; background: var(--bg); border-bottom: 1px solid var(--border); gap: 0.5rem; flex-wrap: wrap; }
.sub-card-body { padding: 1rem 1.25rem; }
.sub-row { display: grid; grid-template-columns: 100px 1fr; gap: 0.5rem; padding: 8px 0; border-bottom: 1px solid var(--border); font-size: 0.9rem; }
.sub-row.full { grid-template-columns: 1fr; }
.sub-row span { color: var(--text-muted); font-weight: 500; }
.sub-row p { margin: 0.25rem 0 0; color: var(--text); }
.sub-card-actions { display: flex; gap: 0.5rem; padding: 1rem 1.25rem; border-top: 1px solid var(--border); align-items: center; }
.status-form select { padding: 8px 12px; border-radius: 8px; border: 1px solid var(--border); }

/* ── Responsive ── */
@media (max-width: 768px) {
    :root { --nav-h: 64px; }

    .nav-brand { font-size: 1.15rem; gap: 8px; min-width: 0; }
    .brand-logo-nav { height: 36px; max-width: 42px; padding: 3px; border-radius: 10px; }
    .brand-text { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

    .home-hero,
    .home-hero-compact {
        padding: calc(var(--nav-h) + 14px) 0 20px;
    }
    .home-hero-compact .home-hero-inner {
        grid-template-columns: 1fr;
        gap: 0.85rem;
    }
    .home-hero-compact .home-hero-text h1 {
        font-size: clamp(1.25rem, 5vw, 1.55rem);
        line-height: 1.2;
    }
    .home-hero-compact .home-hero-text p {
        font-size: 0.84rem;
        margin-bottom: 0.75rem;
    }
    .home-hero-actions {
        flex-direction: column;
        width: 100%;
        gap: 0.5rem;
    }
    .home-hero-actions .btn {
        width: 100%;
        justify-content: center;
    }
    .home-hero-stats {
        width: 100%;
        gap: 0.45rem;
        justify-content: stretch;
    }
    .home-hero-stats span {
        flex: 1;
        min-width: 0;
        text-align: center;
        padding: 7px 8px;
        font-size: 0.72rem;
        white-space: normal;
    }
    .home-hero-stats strong { font-size: 0.95rem; display: block; margin: 0 0 2px; }

    .lang-strip-compact { padding: 0.6rem 0; }
    .lang-grid {
        flex-wrap: nowrap;
        overflow-x: auto;
        justify-content: flex-start;
        -webkit-overflow-scrolling: touch;
        scrollbar-width: none;
        padding-bottom: 2px;
    }
    .lang-grid::-webkit-scrollbar { display: none; }
    .lang-strip-compact .lang-chip { flex-shrink: 0; }

    .section-compact { padding: 20px 0 28px; }
    .api-filter-tabs {
        flex-wrap: nowrap;
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
        scrollbar-width: none;
        margin-bottom: 1rem;
        padding-bottom: 4px;
    }
    .api-filter-tabs::-webkit-scrollbar { display: none; }
    .filter-tab { flex-shrink: 0; font-size: 0.78rem; padding: 7px 14px; }
    .home-api-grid { grid-template-columns: 1fr; gap: 0.85rem; }
    .home-api-card { padding: 1rem; }
    .home-api-card-meta h3 { font-size: 0.95rem; }
    .pricing-grid-simple { max-width: 100%; grid-template-columns: 1fr; }

    .page-hero-compact,
    .api-detail-header-compact {
        padding: calc(var(--nav-h) + 12px) 0 18px;
        text-align: left;
    }
    .page-hero-compact h1,
    .api-detail-header-compact h1 { font-size: 1.35rem; }
    .api-detail-body { padding: 1rem 0 1.5rem; }
    .api-detail-top-row { flex-wrap: wrap; gap: 0.5rem; }
    .api-endpoint-hero { font-size: 0.72rem; word-break: break-all; }
    .download-bar { flex-direction: column; align-items: stretch; gap: 0.75rem; }
    .live-fetch { flex-direction: column; width: 100%; }
    .live-fetch select,
    .live-fetch .btn { width: 100%; }
    .code-tabs {
        display: flex;
        flex-wrap: nowrap;
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
        scrollbar-width: none;
    }
    .code-tabs::-webkit-scrollbar { display: none; }
    .code-tab { flex-shrink: 0; font-size: 0.78rem; padding: 8px 12px; }
    .json-preview { font-size: 0.72rem; max-height: 280px; }

    .modal-content,
    .modal-content-lg {
        max-width: 100%;
        max-height: 92dvh;
        padding: 1.25rem 1rem 1.5rem;
        border-radius: 16px 16px 0 0;
    }
    .modal-content h2 { font-size: 1.3rem; }
    .modal-sub { font-size: 0.85rem; margin-bottom: 1rem; }
    .api-picker { grid-template-columns: 1fr; max-height: 150px; }
    .api-picker-toolbar { flex-wrap: wrap; gap: 0.35rem; }
    .form-row { grid-template-columns: 1fr; }

    .floating-api-btn {
        right: 0.85rem;
        bottom: 0.85rem;
        padding: 12px 16px;
        font-size: 0.8rem;
    }

    .footer-compact .footer-inner { padding: 1rem; }
    .footer-compact-links { gap: 0.4rem 0.9rem; }
}

@media (max-width: 900px) {
    .nav-toggle { display: flex; }
    .nav-links {
        position: fixed;
        top: 0; right: -100%;
        width: min(320px, 85vw);
        height: 100vh; height: 100dvh;
        background: linear-gradient(180deg, #041a14, #0c4a38);
        flex-direction: column;
        align-items: stretch;
        padding: calc(var(--nav-h) + 1rem) 1.5rem 2rem;
        gap: 0;
        box-shadow: -10px 0 40px rgba(0, 0, 0, 0.35);
        transition: right var(--transition);
        z-index: 1000;
        overflow-y: auto;
        border-left: 1px solid rgba(134, 239, 172, 0.2);
    }
    .nav-links.open { right: 0; }
    .nav-links li { border-bottom: 1px solid rgba(255, 255, 255, 0.1); }
    .nav-links a { display: block; padding: 14px 0; font-size: 1rem; color: rgba(255,255,255,0.9); }
    .nav-links a:hover, .nav-links a.active { background: rgba(255,255,255,0.08); color: #fff; }
    .admin-sidebar { transform: translateX(-100%); transition: transform var(--transition); z-index: 200; }
    .admin-sidebar.open { transform: translateX(0); }
    .admin-main { margin-left: 0; }
    .admin-mobile-toggle { display: flex; align-items: center; justify-content: center; }
    .upgrade-banner .btn { margin-left: 0; width: 100%; }
}
@media (max-width: 480px) {
    .nav-brand .brand-text { max-width: 120px; }
    .home-hero-stats { flex-direction: column; }
    .home-hero-stats span { width: 100%; }
    .home-hero-actions .btn, .live-fetch .btn { width: 100%; }
    .download-bar { flex-direction: column; align-items: stretch; }
    .live-fetch { flex-direction: column; }
    .live-fetch select { width: 100%; }
    .floating-api-btn {
        width: 50px;
        height: 50px;
        padding: 0;
        border-radius: 50%;
        justify-content: center;
    }
    .floating-api-btn .fab-text { display: none; }
    .floating-api-btn .fab-icon { font-size: 1.2rem; }
    .upgrade-banner { flex-direction: column; text-align: center; gap: 0.75rem; }
}

/* ── Floating API Key Button ── */
.floating-api-btn {
    position: fixed;
    right: 1.25rem;
    bottom: 1.25rem;
    z-index: 1500;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 14px 22px;
    border-radius: 50px;
    border: none;
    background: linear-gradient(135deg, var(--accent), var(--accent-light));
    color: var(--primary-dark);
    font-family: inherit;
    font-weight: 700;
    font-size: 0.9rem;
    cursor: pointer;
    box-shadow: 0 8px 32px rgba(201, 162, 39, 0.45);
    transition: all var(--transition);
    border: 1px solid rgba(201, 162, 39, 0.5);
}
.floating-api-btn:hover {
    transform: translateY(-3px);
    box-shadow: 0 12px 40px rgba(201, 162, 39, 0.55);
}

/* ── Global Modal ── */
.modal-content-lg { max-width: 560px; position: relative; }
.modal-close {
    position: absolute;
    top: 12px; right: 14px;
    background: var(--bg);
    border: 1px solid var(--border);
    width: 32px; height: 32px;
    border-radius: 8px;
    font-size: 1.25rem;
    cursor: pointer;
    color: var(--text-muted);
    line-height: 1;
}
.modal-close:hover { background: white; color: var(--primary); }
.form-label-block { display: block; font-weight: 600; font-size: 0.88rem; margin-bottom: 0.6rem; color: var(--primary-dark); }
.api-picker-section { margin-bottom: 1rem; }
.api-picker-toolbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.5rem;
    margin-bottom: 0.5rem;
    flex-wrap: wrap;
}
.api-picker-actions { display: flex; align-items: center; gap: 0.35rem; }
.btn-text {
    background: none;
    border: none;
    color: var(--primary);
    font-weight: 600;
    font-size: 0.8rem;
    cursor: pointer;
    padding: 4px 0;
    font-family: inherit;
}
.btn-text:hover { color: var(--primary-light); text-decoration: underline; }
.picker-dot { color: var(--text-muted); font-size: 0.75rem; }
.picker-count { font-size: 0.75rem; color: var(--text-muted); margin-top: 0.35rem; }
.modal-error {
    background: #fee2e2;
    color: #991b1b;
    padding: 10px 12px;
    border-radius: 10px;
    font-size: 0.85rem;
    margin-bottom: 1rem;
}
.modal-header-simple { margin-bottom: 0.25rem; }
.api-picker {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 0.4rem;
    max-height: 180px;
    overflow-y: auto;
    padding: 0.5rem;
    background: var(--bg);
    border: 1px solid var(--border);
    border-radius: 10px;
}
.api-picker-item {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 6px 10px;
    border-radius: 8px;
    font-size: 0.8rem;
    cursor: pointer;
    transition: background var(--transition);
}
.api-picker-item:hover { background: white; }
.api-picker-item input { flex-shrink: 0; }
.api-picker-item em { font-size: 0.65rem; color: var(--success); font-style: normal; font-weight: 700; margin-left: auto; }
.app-fields-section { margin-bottom: 0.5rem; }

/* ── Compact Footer ── */
.footer-compact { margin-top: 0; }
.footer-compact .footer-inner {
    max-width: 1100px;
    margin: 0 auto;
    padding: 1.25rem clamp(1rem, 4vw, 2rem);
    text-align: center;
}
.footer-compact-brand {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    font-family: var(--font-display);
    font-size: 1.15rem;
    font-weight: 700;
    color: white;
    margin-bottom: 0.75rem;
}
.footer-compact-brand .brand-logo-footer { box-shadow: none; }
.footer-compact-brand span { color: var(--accent-light); }
.footer-compact-links {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 0.5rem 1.25rem;
    margin-bottom: 0.75rem;
}
.footer-compact-links a { color: rgba(255,255,255,0.55); font-size: 0.82rem; }
.footer-compact-links a:hover { color: var(--accent-light); }
.footer-compact-copy { font-size: 0.75rem; color: rgba(255,255,255,0.35); }
.footer-compact-copy a { color: rgba(255,255,255,0.45); }

/* ── Compact Page Hero ── */
.page-hero-compact { padding: calc(var(--nav-h) + 20px) clamp(1rem, 4vw, 2rem) 28px; }
.page-hero-compact h1 { font-size: clamp(1.35rem, 3.5vw, 1.85rem); margin-bottom: 0.35rem; }
.page-hero-compact p { font-size: 0.88rem; opacity: 0.85; }

/* ── About Page ── */
.about-stats {
    display: flex;
    justify-content: center;
    gap: 2rem;
    flex-wrap: wrap;
}
.about-stat { text-align: center; }
.about-stat strong { display: block; font-family: var(--font-display); font-size: 2rem; color: var(--primary); }
.about-stat span { font-size: 0.78rem; color: var(--text-muted); text-transform: uppercase; letter-spacing: 0.08em; }
.content-block-about { padding-top: 2rem; }
.about-split { display: grid; grid-template-columns: 1fr 1fr; gap: 1.5rem; }
@media (max-width: 768px) { .about-split { grid-template-columns: 1fr; } }
.about-card {
    background: white;
    border: 1px solid var(--border);
    border-radius: 14px;
    padding: 1.75rem;
    box-shadow: var(--shadow-sm);
}
.about-card-accent { background: linear-gradient(135deg, #f8fdf9, white); border-color: rgba(12,74,56,0.15); }
.about-card h2 { font-family: var(--font-display); font-size: 1.35rem; color: var(--primary-dark); margin-bottom: 0.75rem; }
.about-card p { color: var(--text-muted); font-size: 0.92rem; margin-bottom: 0.75rem; }
.about-list { list-style: none; }
.about-list li { padding: 6px 0; font-size: 0.88rem; color: var(--text-muted); }
.about-cta-box {
    margin-top: 2.5rem;
    text-align: center;
    padding: 2rem;
    background: linear-gradient(135deg, var(--primary-dark), var(--primary));
    border-radius: 16px;
    color: white;
}
.about-cta-box h3 { font-family: var(--font-display); font-size: 1.5rem; margin-bottom: 0.5rem; }
.about-cta-box p { opacity: 0.88; font-size: 0.9rem; }

/* ── Services Page ── */
.service-hero-card {
    display: flex;
    align-items: center;
    gap: 2rem;
    background: linear-gradient(135deg, var(--primary-dark), var(--primary));
    color: white;
    border-radius: 16px;
    padding: 2rem;
    margin-bottom: 2rem;
}
@media (max-width: 768px) { .service-hero-card { flex-direction: column; text-align: center; } }
.service-hero-text h2 { font-family: var(--font-display); font-size: 1.5rem; margin: 0.75rem 0; line-height: 1.3; }
.service-hero-text p { opacity: 0.9; font-size: 0.9rem; margin-bottom: 1rem; }
.service-hero-text .about-list li { color: rgba(255,255,255,0.85); }
.service-hero-icon { font-size: 4rem; opacity: 0.9; flex-shrink: 0; }
.services-subtitle { font-family: var(--font-display); font-size: 1.25rem; color: var(--primary-dark); margin-bottom: 1.25rem; }

/* ── Docs Page ── */
.docs-layout { display: grid; grid-template-columns: 200px 1fr; gap: 2rem; align-items: start; }
@media (max-width: 768px) { .docs-layout { grid-template-columns: 1fr; } }
.docs-sidebar-nav {
    display: flex;
    flex-direction: column;
    gap: 0.35rem;
    position: sticky;
    top: calc(var(--nav-h) + 1rem);
}
.docs-sidebar-nav a {
    padding: 10px 14px;
    border-radius: 10px;
    font-size: 0.85rem;
    color: var(--text-muted);
    border: 1px solid transparent;
    transition: all var(--transition);
}
.docs-sidebar-nav a:hover, .docs-sidebar-nav a.active {
    background: white;
    border-color: var(--border);
    color: var(--primary);
    font-weight: 600;
}
.docs-card {
    background: white;
    border: 1px solid var(--border);
    border-radius: 14px;
    padding: 1.5rem;
    margin-bottom: 1.25rem;
    box-shadow: var(--shadow-sm);
}
.docs-card h2 { font-family: var(--font-display); font-size: 1.25rem; color: var(--primary-dark); margin-bottom: 0.75rem; }
.docs-card p { color: var(--text-muted); font-size: 0.9rem; margin-bottom: 0.5rem; }
.docs-code-block {
    display: block;
    background: #0a1628;
    color: #a7f3d0;
    padding: 12px 16px;
    border-radius: 10px;
    font-family: monospace;
    font-size: 0.82rem;
}
.docs-pre { border-radius: 10px; margin-top: 0.75rem; max-height: 200px; }
.docs-endpoint-list { display: flex; flex-direction: column; gap: 0.4rem; }
.docs-endpoint-item {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 10px 14px;
    background: var(--bg);
    border: 1px solid var(--border);
    border-radius: 10px;
    font-size: 0.88rem;
    transition: all var(--transition);
}
.docs-endpoint-item:hover { border-color: var(--primary); background: white; }
.docs-endpoint-item span { flex: 1; font-weight: 600; color: var(--primary-dark); }
.docs-endpoint-item code { font-size: 0.75rem; color: var(--text-muted); }
.docs-endpoint-item em { font-size: 0.65rem; color: var(--success); font-style: normal; font-weight: 700; }

/* ── Support Page ── */
.support-layout { display: grid; grid-template-columns: 280px 1fr; gap: 2rem; align-items: start; }
@media (max-width: 900px) { .support-layout { grid-template-columns: 1fr; } }
.support-info { display: flex; flex-direction: column; gap: 0.75rem; }
.support-info-card {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 1rem 1.25rem;
    background: white;
    border: 1px solid var(--border);
    border-radius: 12px;
    box-shadow: var(--shadow-sm);
}
.support-info-card span { font-size: 1.5rem; }
.support-info-card strong { display: block; font-size: 0.82rem; color: var(--primary-dark); margin-bottom: 2px; }
.support-info-card a, .link-btn {
    font-size: 0.85rem;
    background: none;
    border: none;
    padding: 0;
    cursor: pointer;
    color: var(--primary);
    font-family: inherit;
    text-align: left;
}
.link-btn:hover { color: var(--primary-light); }
.support-form-wrap h2 { font-family: var(--font-display); font-size: 1.35rem; color: var(--primary-dark); margin-bottom: 0.35rem; }
.support-form-sub { font-size: 0.85rem; color: var(--text-muted); margin-bottom: 1.25rem; }
.support-form { padding: 1.75rem !important; }

/* ── Admin request type badges ── */
.badge-api { background: #dbeafe; color: #1d4ed8; }
.badge-app { background: #ede9fe; color: #6d28d9; }
.badge-support { background: #dcfce7; color: #166534; }
.badge-pricing { background: #fef3c7; color: #92400e; }
.badge-general { background: #f1f5f9; color: #475569; }

.apis-page-card { cursor: pointer; }
#api-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 300px), 1fr)); gap: 1.25rem; }

/* ── AI SEO Dashboard ── */
.ai-seo-main { max-width: 1100px; }
.ai-seo-hero { display: flex; justify-content: space-between; align-items: flex-start; gap: 1rem; flex-wrap: wrap; margin-bottom: 1rem; }
.ai-seo-hero-actions { display: flex; gap: 0.5rem; flex-wrap: wrap; }
.ai-seo-stats .stat-num { font-size: 1.1rem; word-break: break-word; }
.ai-seo-settings-grid { display: grid; gap: 0.75rem; max-width: 720px; }
.ai-check { display: flex; align-items: center; gap: 0.5rem; font-size: 0.9rem; }
.ai-section-head { display: flex; justify-content: space-between; align-items: center; gap: 1rem; flex-wrap: wrap; margin-bottom: 1rem; }
.ai-seo-item { border: 1px solid var(--border); border-radius: 12px; padding: 1rem; margin-bottom: 0.85rem; background: #fafaf8; }
.ai-seo-item-head { display: flex; justify-content: space-between; align-items: center; gap: 0.75rem; margin-bottom: 0.75rem; }
.ai-seo-item-head h3 { font-size: 0.95rem; color: var(--primary-dark); }
.ai-today-logs { display: grid; gap: 0.75rem; }
.ai-log-card { border: 1px solid var(--border); border-radius: 10px; padding: 0.85rem; background: #f8faf9; }
.ai-log-head { display: flex; align-items: center; gap: 0.5rem; flex-wrap: wrap; margin-bottom: 0.35rem; }
.ai-log-badge { font-size: 0.62rem; font-weight: 800; padding: 2px 8px; border-radius: 999px; text-transform: uppercase; }
.ai-log-ai { background: #dbeafe; color: #1d4ed8; }
.ai-log-manual { background: #fef3c7; color: #92400e; }
.ai-log-time { margin-left: auto; font-size: 0.75rem; color: var(--text-muted); }
.ai-log-items { font-size: 0.82rem; color: var(--text-muted); margin-bottom: 0.35rem; }
.ai-log-details { font-size: 0.8rem; margin-top: 0.35rem; }
.ai-log-details summary { cursor: pointer; font-weight: 600; color: var(--primary); }
.alert-error { background: #fee2e2; color: #991b1b; border: 1px solid #fecaca; }
.ai-automation-panel .gsc-steps { margin-top: 1rem; padding: 1rem; background: #f8faf9; border-radius: 10px; border: 1px solid var(--border); }
.ai-automation-panel .gsc-steps ol { margin: 0.5rem 0 0 1.2rem; font-size: 0.85rem; line-height: 1.7; }
.ai-automation-panel .gsc-steps h3 { font-size: 0.95rem; color: var(--primary-dark); }
