/*
 * ====
 *  Vidyamandira Portal V2 — Landing Page Styles
 *  File: /public/assets/css/landing-page.css
 * ====
 */

/* ─── CSS Variables ─── */
:root {
    --color-saffron: #F97316;
    --color-maroon: #5a1c0c;
    --color-cream: #FFFBEB;
    --color-dark: #2d1810;
    --color-text: #374151;
    --font-display: 'Merriweather', serif;
    --font-body: 'Poppins', sans-serif;
    --shadow-md: 0 4px 6px -1px rgb(0 0 0 / 0.1), 0 2px 4px -2px rgb(0 0 0 / 0.1);
    --shadow-lg: 0 10px 15px -3px rgb(0 0 0 / 0.1), 0 4px 6px -4px rgb(0 0 0 / 0.1);
    --radius: 8px;
}

*,
*::before,
*::after {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
    overflow-x: hidden;
}

body {
    margin: 0;
    font-family: var(--font-body);
    color: var(--color-text);
    background-color: var(--color-cream);
    line-height: 1.7;
    overflow-x: hidden;
}

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

.section {
    padding: 5rem 0;
}

.section-alt-bg {
    background-color: white;
}

.text-center {
    text-align: center;
}

/* ─── Buttons ─── */
.btn {
    display: inline-block;
    padding: 0.8rem 1.8rem;
    border-radius: 50px;
    text-decoration: none;
    font-weight: 600;
    transition: all 0.3s ease;
    border: 2px solid transparent;
}

.btn-primary {
    background-color: var(--color-saffron);
    color: white;
    box-shadow: var(--shadow-md);
}

.btn-primary:hover {
    background-color: transparent;
    border-color: var(--color-saffron);
    color: var(--color-saffron);
    transform: translateY(-2px);
    box-shadow: var(--shadow-lg);
}

/* ─── Section typography ─── */
.section-title {
    font-family: var(--font-display);
    font-size: 2.5rem;
    color: var(--color-dark);
    margin-top: 0;
    margin-bottom: 1rem;
}

.section-subtitle {
    font-size: 1.1rem;
    color: var(--color-text);
    max-width: 600px;
    margin: 0 auto 3rem auto;
}

/* ══════════════════════════════════════════
   HEADER
══════════════════════════════════════════ */
.main-header {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    z-index: 1000;
    transition: background-color 0.4s ease, box-shadow 0.4s ease, padding 0.4s ease;
    padding: 1.5rem 0;
}

.main-header.scrolled {
    background-color: rgba(255, 251, 235, 0.92);
    backdrop-filter: blur(12px);
    box-shadow: var(--shadow-md);
    padding: 1rem 0;
}

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

.logo {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    text-decoration: none;
}

.logo img {
    height: 48px;
}

.logo-text {
    font-size: 1.4rem;
    font-weight: 600;
    transition: color 0.4s;
}

.main-nav {
    display: flex;
    gap: 2rem;
}

.main-nav a {
    text-decoration: none;
    font-weight: 500;
    position: relative;
    padding-bottom: 0.25rem;
    transition: color 0.3s;
}

.main-nav a::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 0;
    height: 2px;
    background-color: var(--color-saffron);
    transition: width 0.3s ease;
}

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

.header-actions {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.mobile-menu-toggle {
    display: none;
    background: transparent;
    border: none;
    color: inherit;
    font-size: 1.6rem;
    cursor: pointer;
    padding: 0.5rem;
    transition: color 0.3s ease;
}

.login-btn i {
    margin-right: 0.5rem;
}

/* Header colours: white over dark hero → dark on scroll */
.main-header:not(.scrolled) .logo-text {
    color: #fff;
}

.main-header:not(.scrolled) .main-nav a {
    color: rgba(255, 255, 255, 0.85);
}

.main-header:not(.scrolled) .main-nav a:hover {
    color: #fff;
}

.main-header:not(.scrolled) .btn-primary {
    background: rgba(249, 115, 22, 0.9);
    box-shadow: 0 0 18px rgba(249, 115, 22, 0.35);
}

.main-header:not(.scrolled) .mobile-menu-toggle {
    color: #fff;
}

.main-header.scrolled .logo-text {
    color: var(--color-dark);
}

.main-header.scrolled .main-nav a {
    color: var(--color-text);
}

.main-header.scrolled .mobile-menu-toggle {
    color: var(--color-dark);
}

/* Override color when menu is actively open */
.main-header .mobile-menu-toggle.menu-open {
    color: #000 !important;
}

/* ══════════════════════════════════════════
   HERO — Semi-Futuristic Slideshow
══════════════════════════════════════════ */

/* The hero section is the positioning parent for the card */
.hero {
    position: relative;
    height: 100vh;
    min-height: 640px;
    overflow: hidden;
    background: #04080f;
    color: #fff;
}

/* ── Static Image Background ── */
.hero-bg-img {
    position: absolute;
    inset: 0;
    z-index: 0;
}

.slide {
    position: absolute;
    inset: 0;
    background-size: cover;
    background-position: center;
    opacity: 0;
    transform: scale(1.06);
    transition: opacity 1.4s ease, transform 8s ease;
    will-change: opacity, transform;
}

.slide.active {
    opacity: 1;
    transform: scale(1);
}

.slide.prev {
    opacity: 0;
    transform: scale(1.04);
}

/* ── Overlay layers ── */
.overlay-dark {
    position: absolute;
    inset: 0;
    z-index: 1;
    background: linear-gradient(to bottom,
            rgba(4, 8, 15, 0.55) 0%,
            rgba(4, 8, 15, 0.35) 40%,
            rgba(4, 8, 15, 0.65) 100%);
}

.overlay-scanlines {
    position: absolute;
    inset: 0;
    z-index: 2;
    background-image: repeating-linear-gradient(0deg,
            transparent,
            transparent 3px,
            rgba(0, 0, 0, 0.06) 3px,
            rgba(0, 0, 0, 0.06) 4px);
    pointer-events: none;
}

.overlay-vignette {
    position: absolute;
    inset: 0;
    z-index: 3;
    background: radial-gradient(ellipse at center, transparent 40%, rgba(4, 8, 15, 0.75) 100%);
    pointer-events: none;
}

/* ── Content card — pinned to hero section centre only ──
   position:absolute keeps it locked in the hero.
   When the user scrolls past the hero it naturally scrolls away
   and does NOT overlap About/Institutions/Footer. */
.hero-content {
    position: absolute;
    top: 53%;
    left: 50%;
    transform: translate(-50%, -50%);
    z-index: 10;

    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;

    width: min(800px, calc(100vw - 2rem));
    padding: 2.5rem 4rem;

    background: #04080f80;
    backdrop-filter: blur(0.5px);
    -webkit-backdrop-filter: blur(80px);
    border: 1px solid rgba(11, 10, 10, 0.373);
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.3);
    border-radius: 16px;
}

/* ── Logo (static — no float animation) ── */
.hero-logo {
    width: 84px;
    height: 84px;
    margin-bottom: 1.4rem;
    flex-shrink: 0;
}

.hero-logo img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    z-index: 0;
}

.hero-overlay {
    position: absolute;
    inset: 0;
    z-index: 1;
    background: linear-gradient(to bottom,
            rgba(4, 8, 15, 0.55) 0%,
            rgba(4, 8, 15, 0.35) 40%,
            rgba(4, 8, 15, 0.65) 100%);
}

/* ── Slideshow background ── */
.slideshow {
    position: absolute;
    inset: 0;
    z-index: 0;
}

.slide {
    position: absolute;
    inset: 0;
    background-size: cover;
    background-position: center;
    opacity: 0;
    transform: scale(1.06);
    transition: opacity 1.4s ease, transform 8s ease;
    will-change: opacity, transform;
}

.slide.active {
    opacity: 1;
    transform: scale(1);
}

.slide.prev {
    opacity: 0;
    transform: scale(1.04);
}

/* ── Overlay layers ── */
.overlay-dark {
    position: absolute;
    inset: 0;
    z-index: 1;
    background: linear-gradient(to bottom,
            rgba(4, 8, 15, 0.55) 0%,
            rgba(4, 8, 15, 0.35) 40%,
            rgba(4, 8, 15, 0.65) 100%);
}

.overlay-scanlines {
    position: absolute;
    inset: 0;
    z-index: 2;
    background-image: repeating-linear-gradient(0deg,
            transparent,
            transparent 3px,
            rgba(0, 0, 0, 0.06) 3px,
            rgba(0, 0, 0, 0.06) 4px);
    pointer-events: none;
}

.overlay-vignette {
    position: absolute;
    inset: 0;
    z-index: 3;
    background: radial-gradient(ellipse at center, transparent 40%, rgba(4, 8, 15, 0.75) 100%);
    pointer-events: none;
}

/* ── Content card — pinned to hero section centre only ──
   position:absolute keeps it locked in the hero.
   When the user scrolls past the hero it naturally scrolls away
   and does NOT overlap About/Institutions/Footer. */
.hero-content {
    position: absolute;
    top: 53%;
    left: 50%;
    transform: translate(-50%, -50%);
    z-index: 10;

    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;

    width: min(800px, calc(100vw - 2rem));
    padding: 2.5rem 4rem;

    background: #04080f80;
    backdrop-filter: blur(1px);
    -webkit-backdrop-filter: blur(80px);
    border: 1px solid rgba(11, 10, 10, 0.373);
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.3);
    border-radius: 16px;
}

/* ── Logo (static — no float animation) ── */
.hero-logo {
    width: 84px;
    height: 84px;
    margin-bottom: 1.4rem;
    flex-shrink: 0;
}

.hero-logo img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    filter: drop-shadow(0 0 10px rgba(249, 115, 22, 0.4));
}

/* ── Tag line ── */
.hero-tag {
    font-family: 'Rajdhani', sans-serif;
    font-size: 0.78rem;
    font-weight: 600;
    letter-spacing: 5px;
    color: var(--color-saffron);
    text-transform: uppercase;
    margin-bottom: 1rem;
    opacity: 0.9;
    text-shadow: 0 0 12px rgba(249, 115, 22, 0.5);
}

/* ── Main title ── */
.hero-title {
    font-family: var(--font-display);
    font-weight: 700;
    line-height: 1.08;
    margin: 0 0 0.8rem 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.05em;
}

.title-line1 {
    font-size: clamp(1.9rem, 4vw, 3.1rem);
    color: rgba(255, 255, 255, 0.92);
    letter-spacing: 2px;
    text-transform: uppercase;
}

.title-line2 {
    font-size: clamp(2.6rem, 5.5vw, 4.5rem);
    letter-spacing: 3px;
    text-transform: uppercase;
    background: linear-gradient(90deg, #f97316 0%, #fbbf24 50%, #f97316 100%);
    background-size: 200%;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    animation: shineText 4s linear infinite;
}

@keyframes shineText {
    0% {
        background-position: 0% center;
    }

    100% {
        background-position: 200% center;
    }
}

/* ── Subtitle ── */
.hero-subtitle {
    font-family: 'Poppins', sans-serif;
    font-size: clamp(0.88rem, 1.6vw, 1.05rem);
    color: rgba(255, 255, 255, 0.60);
    letter-spacing: 0.4px;
    margin: 0 0 2rem 0;
    line-height: 1.75;
}

/* ── Login button ── */
.cta-primary {
    display: inline-flex;
    align-items: center;
    gap: 0.65rem;
    padding: 0.9rem 2.8rem;
    font-family: 'Rajdhani', sans-serif;
    font-size: 1.05rem;
    font-weight: 600;
    letter-spacing: 2px;
    text-transform: uppercase;
    text-decoration: none;
    border-radius: 50px;
    border: 2px solid var(--color-saffron);
    background: var(--color-saffron);
    color: #fff;
    box-shadow: 0 0 24px rgba(249, 115, 22, 0.4), inset 0 1px 0 rgba(255, 255, 255, 0.12);
    position: relative;
    overflow: hidden;
    transition: all 0.3s ease;
}

.cta-primary::after {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(to right, transparent 40%, rgba(255, 255, 255, 0.15) 60%, transparent 70%);
    transform: translateX(-100%);
    transition: transform 0.5s ease;
}

.cta-primary:hover::after {
    transform: translateX(100%);
}

.cta-primary:hover {
    background: transparent;
    color: var(--color-saffron);
    box-shadow: 0 0 32px rgba(249, 115, 22, 0.55);
    transform: translateY(-2px);
}

.cta-icon {
    font-size: 0.95em;
    line-height: 1;
}

.cta-secondary {
    display: inline-flex;
    align-items: center;
    gap: 0.65rem;
    padding: 0.9rem 2.8rem;
    font-family: 'Rajdhani', sans-serif;
    font-size: 1.05rem;
    font-weight: 600;
    letter-spacing: 2px;
    text-transform: uppercase;
    text-decoration: none;
    border-radius: 4px;
    border: 1px solid rgba(255, 255, 255, 0.25);
    background: transparent;
    color: rgba(255, 255, 255, 0.85);
    transition: all 0.3s ease;
}

.cta-secondary:hover {
    background: rgba(255, 255, 255, 0.05);
    color: #fff;
    border-color: rgba(255, 255, 255, 0.4);
    transform: translateY(-2px);
}

.hero-actions {
    display: flex;
    gap: 1.5rem;
    margin-top: 0.5rem;
    flex-wrap: wrap;
    justify-content: center;
}

.hero-divider {
    width: 60px;
    height: 1px;
    background: rgba(255, 255, 255, 0.2);
    margin: 1.2rem auto;
}

/* ══════════════════════════════════════════
   SCROLL-DOWN BUTTON
   (position:absolute within hero — NOT inside the card)
══════════════════════════════════════════ */
.scroll-down {
    position: absolute;
    bottom: 2.5rem;
    left: 50%;
    transform: translateX(-50%);
    z-index: 20;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.35rem;
    text-decoration: none;
    cursor: pointer;
}

.scroll-label {
    font-family: 'Rajdhani', sans-serif;
    font-size: 0.72rem;
    letter-spacing: 4px;
    text-transform: uppercase;
    color: rgba(255, 255, 255, 0.45);
    animation: fadeLabel 2s ease-in-out infinite alternate;
}

@keyframes fadeLabel {
    from {
        opacity: 0.35;
    }

    to {
        opacity: 0.75;
    }
}

.scroll-arrows {
    display: flex;
    flex-direction: column;
    align-items: center;
    line-height: 0.7;
}

.scroll-arrows i {
    display: block;
    font-size: 0.85rem;
    color: var(--color-saffron);
    opacity: 0;
    animation: arrowCascade 1.5s ease-in-out infinite;
}

.scroll-arrows i:nth-child(1) {
    animation-delay: 0s;
}

.scroll-arrows i:nth-child(2) {
    animation-delay: 0.22s;
}

.scroll-arrows i:nth-child(3) {
    animation-delay: 0.44s;
}

@keyframes arrowCascade {
    0% {
        opacity: 0;
        transform: translateY(-4px);
    }

    40%,
    60% {
        opacity: 1;
        transform: translateY(0);
    }

    100% {
        opacity: 0;
        transform: translateY(6px);
    }
}

/* ══════════════════════════════════════════
   CORNER BRACKETS
══════════════════════════════════════════ */
.corner-bracket {
    position: absolute;
    width: 40px;
    height: 40px;
    border: 2px solid transparent;
    z-index: 10;
}

.corner-bracket.top-left {
    top: 50px;
    left: 50px;
    border-top-color: var(--color-saffron);
    border-left-color: var(--color-saffron);
}

.corner-bracket.top-right {
    top: 50px;
    right: 50px;
    border-top-color: var(--color-saffron);
    border-right-color: var(--color-saffron);
}

.corner-bracket.bottom-left {
    bottom: 50px;
    left: 50px;
    border-bottom-color: var(--color-saffron);
    border-left-color: var(--color-saffron);
}

.corner-bracket.bottom-right {
    bottom: 50px;
    right: 50px;
    border-bottom-color: var(--color-saffron);
    border-right-color: var(--color-saffron);
}

/* ══════════════════════════════════════════
   SLIDE COUNTER
══════════════════════════════════════════ */
.slide-counter {
    position: absolute;
    right: 50px;
    top: 50%;
    transform: translateY(-50%);
    z-index: 10;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.25rem;
    font-family: 'Rajdhani', sans-serif;
    color: #fff;
}

.slide-counter .current {
    font-size: 1.3rem;
    font-weight: 700;
    color: var(--color-saffron);
}

.slide-counter .divider {
    font-size: 0.8rem;
    opacity: 0.5;
    transform: rotate(15deg);
}

.slide-counter .total {
    font-size: 0.9rem;
    opacity: 0.6;
}

/* ══════════════════════════════════════════
   ABOUT SECTION
══════════════════════════════════════════ */
.about-content {
    display: grid;
    grid-template-columns: 1fr 1.5fr;
    gap: 3rem;
    align-items: center;
}

.about-image img {
    width: 100%;
    border-radius: var(--radius);
    box-shadow: var(--shadow-lg);
}

.quote-author {
    font-weight: 600;
    color: var(--color-maroon);
}

/* ══════════════════════════════════════════
   INSTITUTIONS SECTION
══════════════════════════════════════════ */
.institutions-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
}

.institution-card {
    text-decoration: none;
    color: inherit;
    background-color: white;
    border-radius: var(--radius);
    overflow: hidden;
    box-shadow: var(--shadow-md);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.institution-card:hover {
    transform: translateY(-10px);
    box-shadow: var(--shadow-lg);
}

.card-img {
    width: 100%;
    height: 200px;
    object-fit: cover;
}

.card-content {
    padding: 1.5rem;
}

.card-content h3 {
    margin-top: 0;
    font-family: var(--font-display);
    color: var(--color-dark);
}

/* ══════════════════════════════════════════
   FOOTER
══════════════════════════════════════════ */
.main-footer {
    background-color: var(--color-maroon);
    color: rgba(255, 251, 235, 0.8);
    padding-top: 4rem;
}

.footer-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 3rem;
}

.footer-title {
    font-size: 1.2rem;
    font-weight: 600;
    color: var(--color-saffron);
    margin: 0 0 1rem 0;
}

.contact-list {
    list-style: none;
    padding: 0;
    margin: 0;
}

.contact-list li {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    margin-bottom: 0.75rem;
}

.contact-list a {
    color: inherit;
    text-decoration: none;
}

.contact-list a:hover {
    color: var(--color-saffron);
}

.social-links {
    display: flex;
    gap: 1rem;
}

.social-links a {
    color: rgba(255, 251, 235, 0.8);
    font-size: 1.5rem;
    transition: color 0.3s ease, transform 0.3s ease;
}

.social-links a:hover {
    color: var(--color-saffron);
    transform: scale(1.1);
}

.copyright {
    text-align: center;
    margin-top: 3rem;
    padding: 1.5rem 0;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    font-size: 0.9rem;
}

/* ══════════════════════════════════════════
   SCROLL FADE-IN
══════════════════════════════════════════ */
.fade-in-section {
    opacity: 0;
    transform: translateY(40px);
    transition: opacity 0.8s ease-out, transform 0.8s ease-out;
}

.fade-in-section.is-visible {
    opacity: 1;
    transform: translateY(0);
}

/* ══════════════════════════════════════════
   RESPONSIVE
══════════════════════════════════════════ */
@media (max-width: 768px) {

    .mobile-menu-toggle {
        display: block;
    }

    .main-nav {
        display: flex;
        flex-direction: column;
        position: fixed;
        top: 0;
        right: -100%;
        width: 60%;
        max-width: 300px;
        height: 100vh;
        background-color: var(--color-cream);
        box-shadow: -10px 0 30px rgba(0, 0, 0, 0.2);
        padding: 6rem 2rem 2rem;
        gap: 2rem;
        transition: right 0.4s ease;
        z-index: 999;
    }

    .main-nav.mobile-active {
        right: 0;
    }

    .main-nav a {
        color: var(--color-dark) !important;
        font-size: 1.2rem;
        border-bottom: 1px solid rgba(0, 0, 0, 0.05);
        padding-bottom: 0.5rem;
    }

    .header-actions {
        z-index: 1001;
        /* Keep above mobile menu */
    }

    .login-btn {
        display: none;
    }

    /* ── About section: center image on mobile ── */
    .about-content {
        grid-template-columns: 1fr;
        text-align: center;
    }

    .about-image {
        display: flex;
        justify-content: center;
    }

    .about-image img {
        width: min(240px, 65vw);
        height: auto;
        margin: 0 auto;
        display: block;
    }

    /* ── Hero card pushed slightly higher so scroll arrows show clearly ── */
    .hero-content {
        width: calc(100% - 3.5rem);
        padding: 2.5rem 1.5rem;
        border-radius: 25px;
        margin-left: auto;
        margin-right: auto;
        top: 47%;
        /* moved up from 53% — gives room for scroll arrow below */
    }

    .hero-divider {
        display: none;
    }

    .title-line1 {
        font-size: 1.5rem;
    }

    .title-line2 {
        font-size: 2rem;
    }

    .hero-subtitle {
        font-size: 0.85rem;
    }

    /* ── Scroll indicator: bigger + floated up near hero bottom ── */
    .scroll-down {
        /* Closer to card bottom — clearly visible, not buried at viewport edge */
        bottom: 1.5rem;
        gap: 0.1rem;
    }

    .scroll-arrows i {
        /* ~2× larger than desktop: unmissable on small screens */
        font-size: 1.75rem;
        /* Glowing saffron so it pops against the dark hero */
        /* filter: drop-shadow(0 0 8px rgba(249, 115, 22, 0.8)); */
    }

    /* Faster, more dramatic cascade on mobile to signal "scroll down" */
    @keyframes arrowCascade {
        0% {
            opacity: 0;
            transform: translateY(-7px);
        }

        30%,
        60% {
            opacity: 1;
            transform: translateY(0);
        }

        100% {
            opacity: 0;
            transform: translateY(11px);
        }
    }

    /* ── Institution cards: single centered column on mobile ── */
    .institutions-grid {
        grid-template-columns: 1fr;
    }

    .institution-card {
        max-width: 460px;
        width: 100%;
        margin-left: auto;
        margin-right: auto;
    }

    .card-img {
        height: 200px;
        object-position: center center;
    }

    .card-content {
        text-align: center;
    }

    /* ── Sections ── */
    .section {
        padding: 3rem 0;
    }

    .footer-grid {
        text-align: center;
    }

    .contact-list li,
    .social-links {
        justify-content: center;
    }
}