/* ============================================
   Ambika Landing Page - Styles
   ============================================ */

/* ── Hero Section ─────────────────────────────── */
.hero {
    position: relative;
    min-height: 88vh;
    display: flex;
    align-items: center;
    overflow: hidden;
    background: #1a1a3e;
    width: 100%;
}

.hero-bg {
    position: absolute;
    inset: 0;
    background-image: url('../img/hero-bg.jpg');
    background-size: cover;
    background-position: center top;
    background-repeat: no-repeat;
    filter: brightness(0.35);
    z-index: 0;
    transition: filter 0.3s;
}

[data-theme="dark"] .hero-bg {
    filter: brightness(0.25);
}

.hero-overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(
        135deg,
        rgba(26, 26, 62, 0.85) 0%,
        rgba(108, 99, 255, 0.45) 100%
    );
    z-index: 1;
}

.hero-content {
    position: relative;
    z-index: 2;
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
    padding: 60px 40px;
    display: grid;
    grid-template-columns: 1fr 1fr;
    align-items: center;
    gap: 40px;
}

.hero-text { color: #fff; }

.hero-badge {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background: rgba(255,255,255,0.15);
    backdrop-filter: blur(8px);
    border: 1px solid rgba(255,255,255,0.25);
    color: #fff;
    padding: 6px 16px;
    border-radius: 30px;
    font-size: 0.82rem;
    font-weight: 500;
    margin-bottom: 20px;
    letter-spacing: 0.3px;
}

.hero-badge i { color: #f6d365; }

.hero-title {
    font-size: clamp(2rem, 4vw, 3.2rem);
    font-weight: 800;
    line-height: 1.2;
    margin-bottom: 20px;
    color: #fff;
}

.hero-title span {
    background: linear-gradient(135deg, #f6d365, #fda085);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.hero-subtitle {
    font-size: 1.05rem;
    color: rgba(255,255,255,0.85);
    line-height: 1.7;
    margin-bottom: 36px;
    max-width: 480px;
}

.hero-actions {
    display: flex;
    gap: 16px;
    flex-wrap: wrap;
}

.hero-actions .btn-primary {
    background: linear-gradient(135deg, #6c63ff, #764ba2);
    border: none;
    padding: 14px 32px;
    font-size: 1rem;
    font-weight: 600;
    box-shadow: 0 8px 24px rgba(108,99,255,0.45);
}

.hero-actions .btn-primary:hover {
    transform: translateY(-3px);
    box-shadow: 0 12px 32px rgba(108,99,255,0.6);
}

.hero-actions .btn-outline {
    border-color: rgba(255,255,255,0.6);
    color: #fff;
    padding: 14px 32px;
    font-size: 1rem;
}

.hero-actions .btn-outline:hover {
    background: rgba(255,255,255,0.15);
    border-color: #fff;
    color: #fff;
    transform: translateY(-3px);
}

/* Hero Stats Card */
.hero-card {
    background: rgba(255,255,255,0.1);
    backdrop-filter: blur(16px);
    border: 1px solid rgba(255,255,255,0.2);
    border-radius: 20px;
    padding: 36px 32px;
    color: #fff;
    display: flex;
    flex-direction: column;
    gap: 24px;
}

.hero-card-title {
    font-size: 1.3rem;
    font-weight: 700;
    margin-bottom: 4px;
}

.hero-card-subtitle {
    font-size: 0.88rem;
    color: rgba(255,255,255,0.75);
}

.hero-stats {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px;
}

.stat-item {
    background: rgba(255,255,255,0.1);
    border-radius: 12px;
    padding: 16px;
    text-align: center;
}

.stat-number {
    font-size: 1.8rem;
    font-weight: 800;
    background: linear-gradient(135deg, #f6d365, #fda085);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    line-height: 1;
    margin-bottom: 4px;
}

.stat-label {
    font-size: 0.75rem;
    color: rgba(255,255,255,0.75);
    font-weight: 500;
}

.hero-cta-card {
    background: linear-gradient(135deg, #6c63ff, #764ba2);
    border-radius: 12px;
    padding: 18px 20px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    text-decoration: none;
    transition: transform 0.3s, box-shadow 0.3s;
    box-shadow: 0 6px 20px rgba(108,99,255,0.4);
}

.hero-cta-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 10px 28px rgba(108,99,255,0.55);
    color: #fff;
}

.hero-cta-card span {
    color: #fff;
    font-weight: 600;
    font-size: 0.95rem;
}

.hero-cta-card i {
    color: rgba(255,255,255,0.85);
    font-size: 1.1rem;
}

/* ── Features Section ─────────────────────────── */
.features {
    padding: 80px 0;
    background: var(--bg);
}

.features-header {
    text-align: center;
    margin-bottom: 56px;
}

.features-header .section-title { margin-bottom: 12px; }

.features-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 28px;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

.feature-card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 16px;
    padding: 32px 28px;
    text-align: center;
    transition: transform 0.3s, box-shadow 0.3s;
    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(--secondary));
    opacity: 0;
    transition: opacity 0.3s;
}

.feature-card:hover {
    transform: translateY(-6px);
    box-shadow: var(--shadow-hover);
}

.feature-card:hover::before { opacity: 1; }

.feature-icon {
    width: 64px;
    height: 64px;
    border-radius: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.6rem;
    margin: 0 auto 20px;
}

.feature-card h3 {
    font-size: 1.1rem;
    font-weight: 700;
    color: var(--text);
    margin-bottom: 10px;
}

.feature-card p {
    font-size: 0.88rem;
    color: var(--text-light);
    line-height: 1.7;
}

/* ── Courses Section ──────────────────────────── */
.courses {
    padding: 80px 0;
    background: var(--bg-card);
}

.courses-header {
    text-align: center;
    margin-bottom: 48px;
}

.courses-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 24px;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

.course-card {
    background: var(--bg);
    border: 1px solid var(--border);
    border-radius: 16px;
    padding: 28px 24px;
    display: flex;
    align-items: center;
    gap: 18px;
    transition: transform 0.3s, box-shadow 0.3s;
    text-decoration: none;
    color: var(--text);
}

.course-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-hover);
    color: var(--text);
}

.course-icon {
    width: 52px;
    height: 52px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.4rem;
    flex-shrink: 0;
}

.course-info h4 {
    font-size: 0.95rem;
    font-weight: 600;
    margin-bottom: 4px;
}

.course-info p {
    font-size: 0.78rem;
    color: var(--text-light);
}

/* ── CTA Section ──────────────────────────────── */
.cta-section {
    padding: 80px 20px;
    background: linear-gradient(135deg, #6c63ff 0%, #764ba2 50%, #f093fb 100%);
    text-align: center;
    color: #fff;
}

.cta-section h2 {
    font-size: clamp(1.6rem, 3vw, 2.4rem);
    font-weight: 800;
    margin-bottom: 16px;
}

.cta-section p {
    font-size: 1rem;
    color: rgba(255,255,255,0.85);
    margin-bottom: 36px;
    max-width: 500px;
    margin-left: auto;
    margin-right: auto;
}

.cta-section .btn-primary {
    background: #fff;
    color: var(--primary);
    border-color: #fff;
    padding: 14px 36px;
    font-size: 1rem;
    font-weight: 700;
    box-shadow: 0 8px 24px rgba(0,0,0,0.2);
}

.cta-section .btn-primary:hover {
    background: rgba(255,255,255,0.9);
    transform: translateY(-3px);
    box-shadow: 0 12px 32px rgba(0,0,0,0.3);
    color: var(--primary);
}

/* ── Fade-in animation ────────────────────────── */
.fade-in {
    opacity: 0;
    transform: translateY(24px);
    transition: opacity 0.6s ease, transform 0.6s ease;
}

.fade-in.visible {
    opacity: 1;
    transform: translateY(0);
}

/* Safety: if JS fails or is slow, show content after CSS animation */
@media (prefers-reduced-motion: reduce) {
    .fade-in {
        opacity: 1;
        transform: none;
        transition: none;
    }
}

/* ── Responsive ───────────────────────────────── */
@media (max-width: 1024px) {
    .features-grid { grid-template-columns: repeat(2, 1fr); }
    .courses-grid  { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 768px) {
    .hero-content {
        grid-template-columns: 1fr;
        gap: 40px;
        padding: 60px 20px 40px;
    }

    .hero-card { display: none; }

    .hero-title { font-size: 2rem; }

    .features-grid,
    .courses-grid { grid-template-columns: 1fr; }
}

@media (max-width: 600px) {
    .hero { min-height: 70vh; }
    .hero-content { padding: 40px 16px 30px; }
    .hero-title { font-size: 1.7rem; }
    .hero-subtitle { font-size: 0.92rem; }
    .hero-actions { flex-direction: column; }
    .hero-actions .btn { width: 100%; justify-content: center; }
    .features { padding: 48px 0; }
    .courses { padding: 48px 0; }
    .cta-section { padding: 48px 16px; }
}

/* ── Stats Loading State ──────────────────────── */
.stat-loading {
    display: inline-block;
    width: 32px;
    height: 14px;
    background: linear-gradient(90deg,
        rgba(255,255,255,0.15) 25%,
        rgba(255,255,255,0.35) 50%,
        rgba(255,255,255,0.15) 75%
    );
    background-size: 200% 100%;
    border-radius: 6px;
    animation: shimmer 1.2s infinite;
    vertical-align: middle;
}

/* For about page cards (light bg) */
.card .stat-loading {
    background: linear-gradient(90deg,
        rgba(108,99,255,0.1) 25%,
        rgba(108,99,255,0.25) 50%,
        rgba(108,99,255,0.1) 75%
    );
    background-size: 200% 100%;
    width: 60px;
    height: 20px;
}

@keyframes shimmer {
    0%   { background-position: 200% 0; }
    100% { background-position: -200% 0; }
}

.stat-loaded {
    animation: statPop 0.4s ease;
}

@keyframes statPop {
    0%   { transform: scale(0.8); opacity: 0; }
    60%  { transform: scale(1.1); }
    100% { transform: scale(1);   opacity: 1; }
}
