/* ================================================================
   CLEVRSTEP - OFFICIAL PREMIUM STYLESHEET (2025)
   THEME: DEEP FOREST & GOLDEN BEIGE
   STYLE: GLASSMORPHISM / FUTURISTIC / MINIMALIST
================================================================ */

/* Import Modern Font */
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;700;800&family=Poppins:wght@400;600;700&family=Playfair+Display:wght@400;700&display=swap');

:root {
    /* --- COLOR PALETTE --- */
    /* Typography */
    --font-sans: 'Inter', system-ui, -apple-system, 'Segoe UI', sans-serif;
    --font-display: 'Playfair Display', 'Poppins', serif;
    --font-ui: 'Poppins', 'Inter', system-ui, sans-serif;

    --bg-deep: #f5efe6;         /* Warm Beige Background */
    --bg-surface: #efe6d8;      /* Soft Beige Surface */
    --glass-bg: rgba(255, 255, 255, 0.6); /* Translucent Frost for Glass Effect */
    
    --accent-navy: #0b2545;     /* Deep Navy Accent */
    --accent-green: #2e8b57;    /* Muted Green Accent */
    --accent-gold: #bda07a;     /* Subtle Beige/Gold (secondary accent) */
    --accent-glow: rgba(11, 37, 69, 0.12); /* Subtle navy glow */
    
    --text-primary: #0b2545;    /* Dark Navy for text */
    --text-secondary: #4b7f6b;  /* Muted Green Text */
    
    --border-glass: rgba(11, 37, 69, 0.06);
    --success: #2e8b57;
    --error: #e74c3c;

    /* Force light color scheme so browsers don't auto-invert colors */
    color-scheme: light;

    /* --- DIMENSIONS & EFFECTS --- */
    --nav-height: 80px;
    --radius-lg: 24px;
    --radius-sm: 12px;
    --transition: all 0.5s cubic-bezier(0.23, 1, 0.32, 1);
    --shadow-card: 0 15px 40px rgba(0, 0, 0, 0.4);
}

/* --- 1. GLOBAL RESET --- */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Inter', sans-serif;
    scroll-behavior: smooth;
}

body {
    background-color: var(--bg-deep);
    color: var(--text-primary);
    line-height: 1.7;
    overflow-x: hidden; /* Prevents horizontal scrollbar */
}

/* Subtle diagonal pattern overlay for texture */
body::before {
    content: '';
    position: fixed;
    inset: 0;
    background-image: repeating-linear-gradient(45deg, rgba(11,37,69,0.015) 0 1px, transparent 1px 24px);
    pointer-events: none;
    z-index: 0;
}

/* Make logo and headings use display font */
.logo-text { font-family: var(--font-ui); font-weight: 700; letter-spacing: 0.6px; }

h1,h2,h3 { font-family: var(--font-display); }

/* Slight decorative underline for section titles */
h2::after {
    content: '';
    display: block;
    width: 60px;
    height: 3px;
    background: linear-gradient(90deg, var(--accent-navy), var(--accent-green));
    margin: 18px auto 0;
    border-radius: 6px;
}


a { text-decoration: none; color: inherit; transition: var(--transition); }
ul { list-style: none; }
img { max-width: 100%; display: block; }

/* --- 2. FUTURISTIC HEADER (GLASSMORPHISM) --- */
header {
    height: var(--nav-height);
    width: 100%;
    position: fixed;
    top: 0;
    z-index: 1000;
    background: rgba(255, 255, 255, 0.8);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-bottom: 1px solid var(--border-glass);
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0 5%;
    transition: var(--transition);
}

.logo-container {
    display: flex;
    align-items: center;
    gap: 12px;
    cursor: pointer;
}

.logo-img { height: 45px; filter: drop-shadow(0 0 8px var(--accent-glow)); }
.logo-text {
    font-size: 1.6rem;
    font-weight: 800;
    letter-spacing: 1px;
    color: var(--text-primary);
    text-transform: uppercase;
}

nav ul { display: flex; align-items: center; gap: 40px; }

nav a {
    font-size: 0.95rem;
    font-weight: 500;
    color: var(--text-secondary);
    position: relative;
    padding: 5px 0;
}

nav a::after {
    content: '';
    position: absolute;
    bottom: 0; left: 0; width: 0%; height: 2px;
    background: var(--accent-navy);
    transition: var(--transition);
    box-shadow: 0 0 10px var(--accent-navy);
}

nav a:hover { color: var(--accent-navy); }
nav a:hover::after { width: 100%; }

/* Special Enroll Button in Nav */
.nav-enroll-btn {
    background: var(--accent-navy);
    color: var(--bg-deep) !important;
    padding: 10px 28px !important;
    border-radius: 50px;
    font-weight: 700 !important;
    box-shadow: 0 0 15px var(--accent-glow);
}

.nav-enroll-btn:hover {
    transform: scale(1.05);
    background: var(--accent-green);
    box-shadow: 0 0 25px var(--accent-glow);
} 

/* Subtle pulsing glow for CTA */
@keyframes pulseGlow {
    0% { box-shadow: 0 0 0px rgba(11,37,69,0.08); transform: translateY(0) scale(1); }
    50% { box-shadow: 0 0 28px rgba(11,37,69,0.08); transform: translateY(-2px) scale(1.02); }
    100% { box-shadow: 0 0 0px rgba(11,37,69,0.08); transform: translateY(0) scale(1); }
}

.nav-enroll-btn { animation: pulseGlow 6s ease-in-out infinite; }

.nav-enroll-btn::after { display: none; }

/* Card tilt on hover for depth */
.card { transform-origin: center; transition: transform 0.45s cubic-bezier(0.22, 1, 0.36, 1), box-shadow 0.45s; }
.card:hover { transform: translateY(-18px) rotateX(4deg); box-shadow: 0 30px 60px rgba(11,37,69,0.08); }

/* Animated page gradient overlay */
body::after {
    content: '';
    position: fixed;
    inset: 0;
    z-index: 0;
    pointer-events: none;
    background: linear-gradient(120deg, rgba(11,37,69,0.02), rgba(46,139,87,0.02));
    animation: slowShift 12s linear infinite;
    opacity: 0.6;
}

@keyframes slowShift {
    0% { background-position: 0% 50%; }
    50% { background-position: 100% 50%; }
    100% { background-position: 0% 50%; }
}

/* Page-level decorative blob (for pages without a hero) */
.page-blob {
    position: fixed;
    right: -8%;
    top: 12%;
    width: 420px;
    height: 420px;
    z-index: 0;
    pointer-events: none;
    opacity: 0.12;
    filter: blur(2px);
    background: radial-gradient(closest-side, rgba(11,37,69,0.12), rgba(11,37,69,0));
    transform: translateZ(0);
}

/* small floating shapes */
.page-floating-shape {
    position: fixed;
    width: 72px; height: 72px;
    border-radius: 14px;
    background: linear-gradient(135deg, rgba(11,37,69,0.08), rgba(46,139,87,0.06));
    pointer-events: none;
    z-index: 0;
    opacity: 0.9;
}

@media (prefers-reduced-motion: reduce) {
    .nav-enroll-btn { animation: none !important; }
    body::after { animation: none !important; }
    .card, .page-blob, .page-floating-shape { transition: none !important; animation: none !important; }
}

/* Mobile Menu Toggle */
.menu-toggle {
    display: none;
    font-size: 1.8rem;
    color: var(--text-primary);
    cursor: pointer;
}

/* --- 3. HERO SECTION --- */
.hero {
    height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    /* Use a soft warm overlay for consistent appearance across devices */
    background: linear-gradient(180deg, rgba(245,239,230,0.65) 0%, var(--bg-deep) 100%), 
                url('img/home_hero.jpg') center/cover no-repeat;
    padding-top: var(--nav-height);
    position: relative;
}

.hero-content {
    max-width: 900px;
    padding: 0 20px;
    z-index: 2;
}

/* Button group in hero - centered and responsive */
.hero-actions {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 16px;
    margin-top: 20px;
    flex-wrap: wrap;
}

.hero-actions .btn { min-width: 160px; }
.hero-actions .btn-outline { margin-left: 0; }

@media (max-width: 900px) {
    .hero-actions { flex-direction: column; gap: 12px; }
    .hero-actions .btn { width: 100%; max-width: 420px; }
    .hero-actions .btn + .btn { margin-top: 8px; margin-left: 0; }
}

@media (max-width: 480px) {
    .hero-content { padding: 0 16px; }
    .hero-actions .btn { padding: 14px 20px; font-size: 0.98rem; }
}
.hero h1 {
    font-size: clamp(2.5rem, 6vw, 4.5rem);
    font-weight: 700;
    line-height: 1.05;
    margin-bottom: 20px;
    font-family: var(--font-display);
    letter-spacing: -0.4px;
    /* Gradient Text Effect */
    background: linear-gradient(135deg, var(--accent-navy) 0%, var(--accent-green) 100%);
    background-clip: text;
    -webkit-background-clip: text;
    color: transparent;
    -webkit-text-fill-color: transparent;
    filter: drop-shadow(0 0 12px rgba(11,37,69,0.06));
}

.hero p {
    font-size: 1.25rem;
    color: var(--text-secondary);
    margin-bottom: 40px;
    font-weight: 300;
}

/* Decorative animated blob behind hero content */
.hero-blob {
    position: absolute;
    right: -5%;
    top: 8%;
    width: 48%;
    max-width: 680px;
    z-index: 1;
    opacity: 0.65;
    transform-origin: center;
    pointer-events: none;
    filter: blur(0);
    animation: floatBlob 9s ease-in-out infinite;
}

@keyframes floatBlob {
    0% { transform: translateY(0) scale(1); }
    50% { transform: translateY(-12px) scale(1.02); }
    100% { transform: translateY(0) scale(1); }
}

@media (max-width: 900px) {
    .hero-blob { width: 72%; opacity: 0.5; right: -10%; top: 4%; }
}

@media (max-width: 480px) {
    .hero-blob { display: none; }
}

@media (prefers-reduced-motion: reduce) {
    .hero-blob { animation: none !important; }
}
/* --- PAGE HERO (used on all pages for consistent look) --- */
.page-hero {
    height: 240px;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    background: linear-gradient(180deg, rgba(245,239,230,0.75) 0%, rgba(245,239,230,0.6) 50%), var(--bg-surface);
    position: relative;
    padding-top: var(--nav-height);
    margin-bottom: 40px;
}

.page-hero .page-hero-content { z-index: 2; max-width: 900px; padding: 0 20px; }
.page-hero h1 { font-size: clamp(1.6rem, 3.6vw, 2.4rem); margin-bottom: 8px; font-family: var(--font-display); color: var(--accent-navy); }
.page-hero p.sub { color: var(--text-secondary); font-weight: 300; margin-bottom: 0; }

/* smaller decorative blob for page hero */
.page-hero .hero-blob { right: 2%; top: 6%; width: 36%; opacity: 0.6; }

@media (max-width: 900px) {
    .page-hero { height: 180px; }
    .page-hero .hero-blob { width: 56%; right: -6%; opacity: 0.45; }
}

@media (max-width: 480px) {
    .page-hero { height: 140px; }
    .page-hero .hero-blob { display: none; }
}
/* Floating image (hero_float.jpg) placed under hero buttons */
.hero-float-image {
    position: absolute;
    left: 50%;
    bottom: -8px;
    transform: translate3d(-50%, 0, 0);
    width: 78%;
    max-width: 900px;
    height: 380px;
    background-image: url('img/hero_float.jpg');
    background-size: contain;
    background-repeat: no-repeat;
    background-position: center bottom;
    pointer-events: none;
    z-index: 0; /* behind hero-content (z-index:2) and hero-blob (z-index:1) */
    opacity: 1;
    will-change: transform, opacity;
}

@media (max-width: 900px) {
    .hero-float-image { width: 92%; height: 220px; bottom: -6px; }
}

@media (max-width: 480px) {
    .hero-float-image { width: 100%; height: 140px; bottom: -4px; background-size: 60%; opacity: 0.95; }
}

@media (prefers-reduced-motion: reduce) {
    .hero-float-image { display: none !important; }
}

/* --- 4. BUTTONS --- */
.btn {
    display: inline-block;
    background: var(--accent-navy);
    color: var(--bg-deep);
    padding: 14px 35px;
    border-radius: 50px;
    font-weight: 700;
    font-size: 1rem;
    border: none;
    cursor: pointer;
    transition: var(--transition);
    box-shadow: 0 10px 20px rgba(0,0,0,0.08);
    -webkit-appearance: none;
    appearance: none;
    -webkit-tap-highlight-color: transparent;
}
.btn:hover {
    transform: translateY(-5px);
    box-shadow: 0 20px 40px var(--accent-glow);
    background: var(--accent-green);
} 

.btn-outline {
    background: transparent;
    border: 2px solid var(--accent-navy);
    color: var(--accent-navy);
    margin-left: 15px;
}

.btn-outline:hover {
    background: var(--accent-navy);
    color: var(--bg-deep);
} 

/* --- 5. SECTIONS & GRIDS --- */
/* Standard section padding; pages use .page-hero for the top banner so spacing is consistent */
section { padding: 90px 8%; }

/* Adjust spacing only on non-home pages to offset fixed header cleanly */
body:not(.home) .page-hero { padding-top: calc(var(--nav-height) + 6px); }
body:not(.home) section:first-of-type { padding-top: calc(var(--nav-height) + 20px); }

/* Contact layout improvements (two-column; stacks on mobile) */
.contact-layout { display: grid; grid-template-columns: 1fr 1.1fr; gap: 36px; align-items: start; max-width: 1100px; margin: 0 auto; }
@media (max-width: 900px) {
    .contact-layout { grid-template-columns: 1fr; gap: 24px; padding: 0 20px; }
}

/* Course card texts left-aligned for better reading */
.course-card { text-align: left; display: flex; flex-direction: column; }
.course-info { padding: 22px; }
.course-img-wrapper { height: 220px; overflow: hidden; border-bottom: 1px solid var(--border-glass); }

/* nav active state */
nav a.nav-active { color: var(--accent-navy); font-weight: 700; position: relative; }
nav a.nav-active::after { width: 100%; }

/* Small tweak to unify card inner spacing */
.card { padding: 28px 24px; }

/* Ensure consistent section titles alignment */
h2 { text-align: center; }


h2 {
    font-size: 2.5rem;
    text-align: center;
    margin-bottom: 60px;
    color: var(--text-primary);
}

.grid-container {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 40px;
}

/* --- 6. FUTURISTIC CARDS --- */
.card {
    background: var(--glass-bg);
    border: 1px solid var(--border-glass);
    border-radius: var(--radius-lg);
    padding: 40px 30px;
    text-align: center;
    transition: var(--transition);
    position: relative;
    overflow: hidden;
}

.card:hover {
    transform: translateY(-15px);
    background: rgba(11, 37, 69, 0.04);
    border-color: var(--accent-navy);
    box-shadow: 0 20px 50px rgba(0,0,0,0.06), inset 0 0 20px rgba(11, 37, 69, 0.03);
} 

/* --- REVIEWS --- */
.review-card {
    display: flex;
    gap: 16px;
    align-items: flex-start;
    padding: 18px;
    background: rgba(255,255,255,0.02);
    border-radius: 12px;
    border: 1px solid var(--border-glass);
}

.review-stars i { color: var(--text-secondary); margin-right: 6px; }
.review-stars i.active { color: var(--accent-navy); filter: drop-shadow(0 0 6px var(--accent-glow)); }

.scrollable-review-list { max-height: 60vh; overflow-y: auto; display: flex; flex-direction: column; gap: 12px; padding-right: 8px; }

/* Individual review in modal */
.review-item { background: transparent; padding: 12px; border-radius: 8px; }

.icon-box {
    font-size: 3rem;
    margin-bottom: 20px;
    display: inline-block;
    padding: 15px;
    background: rgba(255,255,255,0.05);
    border-radius: 50%;
    color: var(--accent-navy);
}

.card h3 { font-size: 1.5rem; margin-bottom: 15px; color: var(--text-primary); }
.card p { color: var(--text-secondary); font-size: 0.95rem; }

/* --- 7. COURSE CARDS (Specific) --- */
.course-card {
    padding: 0;
    text-align: left;
    cursor: pointer;
}

.course-img-wrapper {
    height: 220px;
    overflow: hidden;
    border-bottom: 1px solid var(--border-glass);
}

.course-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.8s ease;
    filter: grayscale(30%);
}

.course-card:hover .course-img {
    transform: scale(1.1);
    filter: grayscale(0%);
}

.course-info { padding: 25px; }

.course-info h4 {
    font-size: 1.2rem;
    color: var(--text-primary);
    margin-bottom: 5px;
}

.course-info p {
    font-size: 0.9rem;
    color: var(--accent-green);
    text-transform: uppercase;
    letter-spacing: 1px;
}

/* --- 8. ANIMATIONS (SCROLL REVEAL) --- */
.reveal {
    opacity: 0;
    transform: translateY(50px);
    transition: var(--transition);
}

.reveal.active {
    opacity: 1;
    transform: translateY(0);
}

/* --- 9. MODALS --- */
.modal {
    display: none;
    position: fixed;
    z-index: 2000;
    left: 0; top: 0;
    width: 100%; height: 100%;
    background: rgba(0,0,0,0.9);
    backdrop-filter: blur(10px);
    justify-content: center;
    align-items: center;
    padding: 20px;
}

.modal-content {
    background: var(--bg-surface);
    border: 1px solid var(--accent-navy);
    width: 100%; max-width: 550px;
    border-radius: var(--radius-lg);
    padding: 30px;
    position: relative;
    box-shadow: 0 0 50px var(--accent-glow);
    animation: modalPop 0.4s ease-out;
}

@keyframes modalPop {
    from { transform: scale(0.9); opacity: 0; }
    to { transform: scale(1); opacity: 1; }
}

.close-modal {
    position: absolute;
    top: 20px; right: 25px;
    font-size: 2rem;
    cursor: pointer;
    color: var(--text-secondary);
    transition: 0.3s;
}

.close-modal:hover { color: var(--accent-navy); }

/* --- 10. FORMS --- */
.contact-wrapper {
    background: var(--glass-bg);
    padding: 50px;
    border-radius: var(--radius-lg);
    border: 1px solid var(--border-glass);
    max-width: 700px;
    margin: 0 auto;
}

.form-group { margin-bottom: 25px; }
.form-group label { display: block; margin-bottom: 10px; color: var(--accent-navy); font-size: 0.9rem; font-weight: 600; }

input, textarea, select {
    width: 100%;
    padding: 15px;
    background: rgba(11,37,69,0.03);
    border: 1px solid var(--border-glass);
    border-radius: var(--radius-sm);
    color: var(--text-primary);
    font-size: 1rem;
    transition: 0.3s;
}

input:focus, textarea:focus, select:focus {
    outline: none;
    border-color: var(--accent-navy);
    background: rgba(255,255,255,0.9);
    box-shadow: 0 0 15px rgba(11, 37, 69, 0.04);
} 

/* --- 11. RESPONSIVE --- */
@media (max-width: 900px) {
    header { padding: 0 20px; }
    .menu-toggle { display: block; }
    nav ul {
        display: none;
        flex-direction: column;
        position: absolute;
        top: 80px; left: 0;
        width: 100%;
        background: var(--bg-surface);
        padding: 40px;
        border-bottom: 1px solid var(--accent-navy);
    }
    nav ul.active { display: flex; }
    .hero h1 { font-size: 3rem; }
}

/* --- CONTACT GRID SYSTEM (Added for Mobile Fix) --- */

/* Desktop view: Side-by-Side */
.contact-grid-container {
    display: grid;
    grid-template-columns: 1fr 1.5fr; 
    gap: 50px;
    width: 90%;
    max-width: 1200px;
    margin: 0 auto;
}

.form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
}

/* Helper Classes for the content */
.contact-item { margin-bottom: 25px; }
.label-gold { color: var(--accent-navy); font-weight: bold; margin-bottom: 5px; }
.text-primary { color: var(--text-primary); }
.text-secondary { color: var(--text-secondary); }
.spacer { height: 60px; }
.section-title { text-align: center; margin-bottom: 30px; }

/* --- MOBILE RESPONSIVE (Up and Down Stacking) --- */
@media (max-width: 768px) {
    .contact-grid-container {
        grid-template-columns: 1fr !important; /* Forces stacking */
        gap: 30px;
    }

    .form-row {
        grid-template-columns: 1fr !important; /* Forces Name/Age fields to stack */
    }

    .section-title {
        font-size: 1.8rem;
    }
}

/* --- 12. STAR RATING SYSTEM (PREMIUM THEME) --- */
.star-rating-picker .stars {
    display: flex;
    justify-content: center;
    gap: 15px;
    font-size: 2rem; 
    cursor: pointer;
    margin-top: 10px;
}

/* Default state (Muted Sage/Transparent) */
.star-rating-picker .stars i {
    color: var(--text-secondary); 
    opacity: 0.2;
    transition: var(--transition);
}

/* Selected state and Hover state (Glowing Accent) */
.star-rating-picker .stars i.active,
.star-rating-picker .stars i:hover {
    color: var(--accent-navy) !important;
    opacity: 1;
    filter: drop-shadow(0 0 10px var(--accent-glow));
    transform: scale(1.2);
} 

/* Ensures the stars in previously posted reviews also have the glow */
#reviewsContainer .card div div {
    filter: drop-shadow(0 0 5px var(--accent-glow));
    letter-spacing: 3px;
    font-size: 1.1rem;
}
