/* ═══════════════════════════════════════════════════════════
   Yasmin Health Platform — Premium Landing Page
   ═══════════════════════════════════════════════════════════ */

:root {
    --bg-primary: #0a0a0f;
    --bg-secondary: #12121a;
    --bg-card: #16161f;
    --text-primary: #f0f0f5;
    --text-secondary: #9d9daa;
    --accent-green: #10b981;
    --accent-green-glow: rgba(16, 185, 129, 0.3);
    --accent-orange: #f59e0b;
    --accent-orange-glow: rgba(245, 158, 11, 0.3);
    --accent-blue: #3b82f6;
    --accent-blue-glow: rgba(59, 130, 246, 0.3);
    --accent-emerald: #34d399;
    --gradient-brand: linear-gradient(135deg, #10b981 0%, #34d399 50%, #6ee7b7 100%);
    --card-radius: 24px;
    --font: 'Cairo', sans-serif;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

/* ─── Accessibility helpers ─── */
.skip-link {
    position: absolute;
    right: -9999px;
    top: 0;
    z-index: 1000;
    background: var(--accent-green);
    color: #0a0a0f;
    padding: 10px 18px;
    border-radius: 0 0 10px 10px;
    font-weight: 700;
}
.skip-link:focus {
    right: 50%;
    transform: translateX(50%);
}

:focus-visible {
    outline: 2px solid var(--accent-emerald);
    outline-offset: 3px;
    border-radius: 6px;
}

/* ─── Scroll progress bar ─── */
.scroll-progress {
    position: fixed;
    top: 0;
    right: 0;
    height: 3px;
    width: 0;
    background: var(--gradient-brand);
    z-index: 200;
    box-shadow: 0 0 10px var(--accent-green-glow);
    transition: width 0.1s linear;
}

body {
    font-family: var(--font);
    background: var(--bg-primary);
    color: var(--text-primary);
    overflow-x: hidden;
    direction: rtl;
}

/* ─── Particle Canvas ─── */
#particles {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 0;
    pointer-events: none;
}

/* ─── Navigation ─── */
.navbar {
    position: fixed;
    top: 0;
    right: 0;
    left: 0;
    z-index: 100;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 16px 48px;
    background: rgba(10, 10, 15, 0.7);
    backdrop-filter: blur(20px);
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
    transition: all 0.3s;
}

.nav-brand {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 1.4rem;
    font-weight: 800;
}

.brand-icon {
    font-size: 1.8rem;
    filter: drop-shadow(0 0 8px var(--accent-green-glow));
}

.brand-name {
    background: var(--gradient-brand);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.nav-links {
    display: flex;
    list-style: none;
    gap: 32px;
}

.nav-links a {
    color: var(--text-secondary);
    text-decoration: none;
    font-size: 0.95rem;
    font-weight: 500;
    transition: color 0.3s;
    position: relative;
}

.nav-links a::after {
    content: '';
    position: absolute;
    bottom: -4px;
    right: 0;
    width: 0;
    height: 2px;
    background: var(--accent-green);
    transition: width 0.3s;
}

.nav-links a:hover {
    color: var(--text-primary);
}

.nav-links a:hover::after {
    width: 100%;
}

.btn-glow {
    display: inline-block;
    padding: 10px 24px;
    background: var(--gradient-brand);
    color: #0a0a0f;
    font-weight: 700;
    font-size: 0.9rem;
    border-radius: 50px;
    text-decoration: none;
    transition: all 0.3s;
    box-shadow: 0 0 20px var(--accent-green-glow);
}

.btn-glow:hover {
    transform: translateY(-2px);
    box-shadow: 0 0 40px var(--accent-green-glow);
}

/* ─── Mobile nav toggle (hamburger) ─── */
.nav-toggle {
    display: none;
    flex-direction: column;
    justify-content: center;
    gap: 5px;
    width: 42px;
    height: 42px;
    background: rgba(255,255,255,0.04);
    border: 1px solid rgba(255,255,255,0.08);
    border-radius: 12px;
    cursor: pointer;
    padding: 0 9px;
}
.nav-toggle span {
    display: block;
    height: 2px;
    width: 100%;
    background: var(--text-primary);
    border-radius: 2px;
    transition: transform 0.3s, opacity 0.3s;
}
body.nav-open .nav-toggle span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
body.nav-open .nav-toggle span:nth-child(2) { opacity: 0; }
body.nav-open .nav-toggle span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

.nav-links a.active {
    color: var(--text-primary);
}
.nav-links a.active::after {
    width: 100%;
}

/* ─── Hero Section ─── */
.hero {
    position: relative;
    z-index: 1;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    padding: 120px 24px 60px;
}

.hero-content {
    max-width: 800px;
    animation: fadeUp 1s ease-out;
}

.hero-badge {
    display: inline-block;
    padding: 8px 20px;
    background: rgba(16, 185, 129, 0.1);
    border: 1px solid rgba(16, 185, 129, 0.2);
    border-radius: 50px;
    font-size: 0.9rem;
    color: var(--accent-emerald);
    margin-bottom: 32px;
    animation: pulse-border 3s infinite;
}

.hero-title {
    font-size: clamp(2.5rem, 6vw, 4.5rem);
    font-weight: 900;
    line-height: 1.2;
    margin-bottom: 24px;
}

.title-line {
    display: block;
}

.gradient-text {
    background: var(--gradient-brand);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.hero-subtitle {
    font-size: 1.15rem;
    color: var(--text-secondary);
    line-height: 1.8;
    max-width: 600px;
    margin: 0 auto 48px;
}

.hero-cta-row {
    display: flex;
    gap: 16px;
    justify-content: center;
    flex-wrap: wrap;
    margin-bottom: 48px;
}

.btn-lg {
    padding: 14px 32px;
    font-size: 1rem;
}

.btn-outline {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 14px 30px;
    border-radius: 50px;
    font-weight: 700;
    font-size: 1rem;
    text-decoration: none;
    color: var(--text-primary);
    border: 1px solid rgba(16, 185, 129, 0.4);
    background: rgba(16, 185, 129, 0.06);
    transition: all 0.3s;
}

.btn-outline:hover {
    background: rgba(16, 185, 129, 0.14);
    transform: translateY(-2px);
}

.hero-stats {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 40px;
}

.stat {
    text-align: center;
}

.stat-number {
    display: block;
    font-size: 2.5rem;
    font-weight: 900;
    background: var(--gradient-brand);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.stat-label {
    font-size: 0.85rem;
    color: var(--text-secondary);
}

.stat-divider {
    width: 1px;
    height: 40px;
    background: rgba(255, 255, 255, 0.1);
}

.hero-arrow {
    position: absolute;
    bottom: 40px;
    color: var(--text-secondary);
    animation: bounce 2s infinite;
    cursor: pointer;
    transition: color 0.3s;
}

.hero-arrow:hover {
    color: var(--accent-green);
}

/* ─── Cards Section ─── */
.cards-section {
    position: relative;
    z-index: 1;
    padding: 100px 24px;
}

.section-header {
    text-align: center;
    margin-bottom: 64px;
}

.section-tag {
    display: inline-block;
    padding: 6px 16px;
    background: rgba(245, 158, 11, 0.1);
    border: 1px solid rgba(245, 158, 11, 0.2);
    border-radius: 50px;
    font-size: 0.85rem;
    color: var(--accent-orange);
    margin-bottom: 16px;
}

.section-title {
    font-size: clamp(1.8rem, 4vw, 2.8rem);
    font-weight: 800;
    margin-bottom: 12px;
}

.section-desc {
    color: var(--text-secondary);
    font-size: 1.05rem;
    max-width: 500px;
    margin: 0 auto;
}

/* ─── 3D Cards ─── */
.cards-3d-container {
    display: flex;
    justify-content: center;
    align-items: stretch;
    gap: 32px;
    max-width: 1200px;
    margin: 0 auto;
    perspective: 1200px;
}

.card-3d {
    flex: 1;
    max-width: 360px;
    min-width: 300px;
    transform-style: preserve-3d;
    transition: transform 0.4s ease;
    will-change: transform;
    cursor: default;
}

.card-inner {
    position: relative;
    border-radius: var(--card-radius);
    overflow: hidden;
}

.card-front {
    position: relative;
    background: var(--bg-card);
    border: 1px solid rgba(255, 255, 255, 0.06);
    border-radius: var(--card-radius);
    padding: 32px 28px;
    min-height: 520px;
    display: flex;
    flex-direction: column;
    transition: border-color 0.3s;
}

.card-3d:hover .card-front {
    border-color: rgba(255, 255, 255, 0.12);
}

.card-glow {
    position: absolute;
    top: -50%;
    right: -50%;
    width: 200%;
    height: 200%;
    border-radius: 50%;
    opacity: 0;
    transition: opacity 0.5s;
    pointer-events: none;
}

.card-glow-orange { background: radial-gradient(circle, rgba(245, 158, 11, 0.08), transparent 70%); }
.card-glow-blue { background: radial-gradient(circle, rgba(59, 130, 246, 0.08), transparent 70%); }
.card-glow-green { background: radial-gradient(circle, rgba(16, 185, 129, 0.08), transparent 70%); }

.card-3d:hover .card-glow {
    opacity: 1;
}

.card-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 16px;
}

.card-icon {
    font-size: 2rem;
}

.card-badge {
    padding: 4px 14px;
    background: rgba(245, 158, 11, 0.15);
    color: var(--accent-orange);
    border-radius: 50px;
    font-size: 0.8rem;
    font-weight: 700;
}

.badge-blue {
    background: rgba(59, 130, 246, 0.15);
    color: var(--accent-blue);
}

.badge-green {
    background: rgba(16, 185, 129, 0.15);
    color: var(--accent-green);
}

.card-title {
    font-size: 1.4rem;
    font-weight: 800;
    margin-bottom: 4px;
}

.card-subtitle {
    font-size: 0.85rem;
    color: var(--text-secondary);
    font-weight: 400;
    margin-bottom: 20px;
    direction: ltr;
    text-align: right;
}

/* Card 1 — Benefits List */
.card-list {
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: 14px;
    flex: 1;
}

.card-list li {
    display: flex;
    gap: 12px;
    align-items: flex-start;
}

.list-icon {
    font-size: 1.2rem;
    flex-shrink: 0;
    margin-top: 2px;
}

.card-list li strong {
    display: block;
    font-size: 0.95rem;
    margin-bottom: 2px;
}

.card-list li p {
    font-size: 0.8rem;
    color: var(--text-secondary);
    line-height: 1.5;
}

/* Card 2 — Dosage Grid */
.dosage-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 12px;
    margin-bottom: 20px;
}

.dosage-item {
    text-align: center;
    padding: 16px 8px;
    background: rgba(59, 130, 246, 0.06);
    border: 1px solid rgba(59, 130, 246, 0.1);
    border-radius: 16px;
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.dosage-value {
    font-size: 1.8rem;
    font-weight: 900;
    color: var(--accent-blue);
}

.dosage-unit {
    font-size: 0.75rem;
    color: var(--text-secondary);
}

.dosage-label {
    font-size: 0.8rem;
    color: var(--text-primary);
    font-weight: 600;
}

.warnings {
    display: flex;
    flex-direction: column;
    gap: 10px;
    flex: 1;
}

.warning-item {
    display: flex;
    gap: 10px;
    align-items: center;
    padding: 10px 14px;
    background: rgba(245, 158, 11, 0.05);
    border-radius: 12px;
    font-size: 0.85rem;
    color: var(--text-secondary);
}

/* Card 3 — Sources Grid */
.sources-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 10px;
    margin-bottom: 16px;
}

.source-item {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 10px 12px;
    background: rgba(16, 185, 129, 0.05);
    border: 1px solid rgba(16, 185, 129, 0.08);
    border-radius: 12px;
    font-size: 0.85rem;
}

.source-emoji {
    font-size: 1.2rem;
}

.source-mg {
    margin-right: auto;
    color: var(--accent-green);
    font-weight: 700;
    font-size: 0.8rem;
    direction: ltr;
}

.tip-box {
    display: flex;
    gap: 10px;
    align-items: flex-start;
    padding: 14px;
    background: rgba(16, 185, 129, 0.08);
    border: 1px solid rgba(16, 185, 129, 0.15);
    border-radius: 14px;
    font-size: 0.85rem;
    color: var(--text-secondary);
    line-height: 1.6;
    flex: 1;
}

/* Card Footer */
.card-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 20px;
    padding-top: 16px;
    border-top: 1px solid rgba(255, 255, 255, 0.06);
    font-size: 0.8rem;
    color: var(--text-secondary);
}

.cards-hint {
    text-align: center;
    color: var(--text-secondary);
    font-size: 0.85rem;
    margin-top: 40px;
    opacity: 0.6;
}

/* ─── Sections Overview ─── */
.sections-overview {
    position: relative;
    z-index: 1;
    padding: 100px 24px;
}

.sections-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 20px;
    max-width: 1000px;
    margin: 0 auto;
}

.section-card {
    background: var(--bg-card);
    border: 1px solid rgba(255, 255, 255, 0.05);
    border-radius: 20px;
    padding: 32px 28px;
    text-align: center;
    transition: all 0.3s;
    cursor: default;
}

.section-card:hover {
    transform: translateY(-6px);
    border-color: rgba(16, 185, 129, 0.2);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.3);
}

.sc-icon {
    font-size: 2.5rem;
    display: block;
    margin-bottom: 16px;
}

.section-card h3 {
    font-size: 1.1rem;
    font-weight: 700;
    margin-bottom: 8px;
}

.section-card p {
    font-size: 0.85rem;
    color: var(--text-secondary);
}

/* ─── CTA Section ─── */
.cta-section {
    position: relative;
    z-index: 1;
    padding: 100px 24px;
    text-align: center;
}

.cta-content {
    max-width: 600px;
    margin: 0 auto;
    padding: 60px 40px;
    background: var(--bg-card);
    border: 1px solid rgba(16, 185, 129, 0.15);
    border-radius: 32px;
    position: relative;
    overflow: hidden;
}

.cta-content::before {
    content: '';
    position: absolute;
    top: -100px;
    right: -100px;
    width: 300px;
    height: 300px;
    background: radial-gradient(circle, var(--accent-green-glow), transparent);
    pointer-events: none;
}

.cta-content h2 {
    font-size: 2rem;
    font-weight: 800;
    margin-bottom: 16px;
    position: relative;
}

.cta-content p {
    color: var(--text-secondary);
    margin-bottom: 32px;
    line-height: 1.8;
    position: relative;
}

.btn-whatsapp {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    padding: 14px 32px;
    background: #25d366;
    color: white;
    font-weight: 700;
    font-size: 1rem;
    border-radius: 50px;
    text-decoration: none;
    transition: all 0.3s;
    position: relative;
    box-shadow: 0 0 30px rgba(37, 211, 102, 0.3);
}

.btn-whatsapp:hover {
    transform: translateY(-3px);
    box-shadow: 0 0 50px rgba(37, 211, 102, 0.4);
}

/* ─── Footer ─── */
.footer {
    position: relative;
    z-index: 1;
    padding: 40px 24px;
    border-top: 1px solid rgba(255, 255, 255, 0.05);
    text-align: center;
}

.footer-brand {
    font-size: 1.3rem;
    font-weight: 800;
    margin-bottom: 12px;
}

.visitor-counter {
    display: inline-block;
    padding: 8px 16px;
    background: rgba(16, 185, 129, 0.1);
    border: 1px solid rgba(16, 185, 129, 0.2);
    border-radius: 50px;
    font-size: 0.95rem;
    font-weight: 700;
    color: var(--accent-emerald);
    margin-bottom: 24px;
}

.footer p {
    font-size: 0.85rem;
    color: var(--text-secondary);
    margin-bottom: 8px;
}

.footer-copy {
    opacity: 0.4;
}

/* ─── Animations ─── */
@keyframes fadeUp {
    from { opacity: 0; transform: translateY(30px); }
    to { opacity: 1; transform: translateY(0); }
}

@keyframes bounce {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(10px); }
}

@keyframes pulse-border {
    0%, 100% { box-shadow: 0 0 0 0 rgba(16, 185, 129, 0); }
    50% { box-shadow: 0 0 0 6px rgba(16, 185, 129, 0.1); }
}

/* ─── How it works ─── */
.how-section {
    position: relative;
    z-index: 1;
    padding: 80px 24px;
}

.steps-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap: 20px;
    max-width: 980px;
    margin: 0 auto;
}

.step-card {
    background: var(--bg-card);
    border: 1px solid rgba(255, 255, 255, 0.05);
    border-radius: 20px;
    padding: 32px 28px;
    text-align: center;
    transition: all 0.3s;
}

.step-card:hover {
    transform: translateY(-6px);
    border-color: rgba(16, 185, 129, 0.2);
}

.step-num {
    width: 54px;
    height: 54px;
    margin: 0 auto 16px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    font-weight: 900;
    color: #0a0a0f;
    background: var(--gradient-brand);
    border-radius: 50%;
    box-shadow: 0 0 24px var(--accent-green-glow);
}

.step-card h3 {
    font-size: 1.15rem;
    font-weight: 700;
    margin-bottom: 8px;
}

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

/* ─── FAQ ─── */
.faq-section {
    position: relative;
    z-index: 1;
    padding: 80px 24px;
}

.faq-list {
    max-width: 760px;
    margin: 0 auto;
    display: flex;
    flex-direction: column;
    gap: 14px;
}

.faq-item {
    background: var(--bg-card);
    border: 1px solid rgba(255, 255, 255, 0.06);
    border-radius: 16px;
    padding: 4px 22px;
    transition: border-color 0.3s;
}

.faq-item[open] {
    border-color: rgba(16, 185, 129, 0.25);
}

.faq-item summary {
    cursor: pointer;
    list-style: none;
    padding: 18px 0;
    font-weight: 700;
    font-size: 1.02rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 12px;
}

.faq-item summary::-webkit-details-marker { display: none; }

.faq-item summary::after {
    content: '+';
    color: var(--accent-green);
    font-size: 1.5rem;
    font-weight: 400;
    transition: transform 0.3s;
    flex-shrink: 0;
}

.faq-item[open] summary::after {
    transform: rotate(45deg);
}

.faq-item p {
    padding: 0 0 18px;
    color: var(--text-secondary);
    line-height: 1.8;
    font-size: 0.95rem;
}

/* ─── Back to top ─── */
.back-to-top {
    position: fixed;
    bottom: 28px;
    left: 28px;
    z-index: 150;
    width: 48px;
    height: 48px;
    display: flex;
    align-items: center;
    justify-content: center;
    border: none;
    border-radius: 50%;
    color: #0a0a0f;
    background: var(--gradient-brand);
    box-shadow: 0 6px 20px rgba(0,0,0,0.35), 0 0 20px var(--accent-green-glow);
    cursor: pointer;
    opacity: 0;
    visibility: hidden;
    transform: translateY(12px);
    transition: opacity 0.3s, transform 0.3s, visibility 0.3s;
}

.back-to-top.show {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.back-to-top:hover {
    transform: translateY(-3px);
}

/* ─── Reduced motion ─── */
@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after {
        animation-duration: 0.001ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.001ms !important;
        scroll-behavior: auto !important;
    }
    .hero-arrow { animation: none; }
}

/* ─── Responsive ─── */
@media (max-width: 900px) {
    .cards-3d-container {
        flex-direction: column;
        align-items: center;
    }
    
    .card-3d {
        max-width: 100%;
        width: 100%;
    }
    
    .navbar {
        padding: 12px 20px;
    }

    .nav-toggle {
        display: flex;
    }

    .nav-cta {
        display: none;
    }

    .nav-links {
        position: fixed;
        top: 64px;
        right: 0;
        left: 0;
        flex-direction: column;
        gap: 4px;
        padding: 16px 20px 24px;
        background: rgba(10, 10, 15, 0.97);
        backdrop-filter: blur(20px);
        border-bottom: 1px solid rgba(255, 255, 255, 0.06);
        transform: translateY(-150%);
        opacity: 0;
        pointer-events: none;
        transition: transform 0.35s ease, opacity 0.35s ease;
    }

    body.nav-open .nav-links {
        transform: translateY(0);
        opacity: 1;
        pointer-events: auto;
    }

    .nav-links a {
        display: block;
        padding: 12px 8px;
        font-size: 1.05rem;
        border-bottom: 1px solid rgba(255,255,255,0.04);
    }

    .hero-stats {
        flex-direction: column;
        gap: 20px;
    }
    
    .stat-divider {
        width: 40px;
        height: 1px;
    }
    
    .sections-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 500px) {
    .sections-grid {
        grid-template-columns: 1fr;
    }
    
    .sources-grid {
        grid-template-columns: 1fr;
    }
    
    .dosage-grid {
        grid-template-columns: 1fr;
    }
}
