@import url('https://fonts.googleapis.com/css2?family=Outfit:wght@300;400;500;700;800&family=Poppins:wght@400;500;600;700&display=swap');

html,
body {
    overflow-x: hidden;
    width: 100%;
}

:root {
    /* Premium Color Palette (Placeholder) */
    --bg-color: #050505;
    --surface-color: #0f0f0f;
    --text-primary: #ffffff;
    --text-secondary: #a1a1aa;
    --accent-color: #200027;
    --accent-glow: rgba(32, 0, 39, 0.6);
    --nav-height: 50px;
    --nav-height-scrolled: 60px;

    /* Spacing */
    --container-padding: 2rem;
    --max-width: 1400px;

    /* Animation defaults */
    --transition-slow: 0.7s cubic-bezier(0.16, 1, 0.3, 1);
    --transition-fast: 0.3s ease-out;
}

*,
*::before,
*::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
    -webkit-tap-highlight-color: transparent;
    touch-action: manipulation;
    /* Faster touch response */
}

html {
    scroll-behavior: smooth;
    font-size: 16px;
    background-color: var(--bg-color);
    color: var(--text-primary);
}

html,
body {
    width: 100%;
    max-width: 100vw;
    overflow-x: hidden !important;
    position: relative;
    margin: 0;
    padding: 0;
}

body {
    font-family: 'Poppins', sans-serif;
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

a {
    text-decoration: none;
    color: inherit;
    transition: var(--transition-fast);
}

img {
    max-width: 100%;
    display: block;
}

/* Utilities */
.container {
    max-width: var(--max-width);
    margin: 0 auto;
    padding: 0 var(--container-padding);
}

.flex-center {
    display: flex;
    align-items: center;
    justify-content: center;
}

.text-gradient {
    background: linear-gradient(135deg, #fff 0%, #a1a1aa 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

h1 {
    font-size: clamp(2.5rem, 8vw, 4.5rem);
    line-height: 1.1;
    margin-bottom: 1.5rem;
}

h2 {
    font-size: clamp(2rem, 5vh, 3rem);
    line-height: 1.2;
    margin-bottom: 1.2rem;
}

h3 {
    font-size: clamp(1.2rem, 3vw, 1.8rem);
    line-height: 1.3;
}

/* Liquid Display Background */
.liquid-bg {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: -1;
    overflow: hidden;
    background: #000;
}

.blob {
    position: absolute;
    width: 600px;
    height: 600px;
    background: linear-gradient(135deg, var(--accent-color) 0%, #8b5cf6 100%);
    filter: blur(80px);
    border-radius: 50%;
    opacity: 0.35;
    animation: move-blob 20s infinite alternate;
    will-change: transform, opacity;
    contain: layout style;
}

.blob-1 {
    top: -10%;
    left: -10%;
    background: linear-gradient(135deg, #3b82f6 0%, #2dd4bf 100%);
}

.blob-2 {
    bottom: -10%;
    right: -10%;
    background: linear-gradient(135deg, #8b5cf6 0%, #ec4899 100%);
    animation-delay: -5s;
    animation-duration: 25s;
}

.blob-3 {
    top: 40%;
    left: 50%;
    width: 400px;
    height: 400px;
    background: linear-gradient(135deg, #f59e0b 0%, #ef4444 100%);
    animation-delay: -10s;
    animation-duration: 30s;
}

@keyframes move-blob {
    0% {
        transform: translate(0, 0) scale(1);
    }

    33% {
        transform: translate(10%, 15%) scale(1.1);
    }

    66% {
        transform: translate(-15%, 10%) scale(0.9);
    }

    100% {
        transform: translate(0, 0) scale(1);
    }
}


.hero::before {
    content: '';
    position: absolute;
    width: 200%;
    height: 200%;
    background: radial-gradient(circle, rgba(255, 255, 255, 0.05) 0%, transparent 60%);
    animation: pulse-glow 10s 1 alternate;
}


.hero {
    position: relative;
    min-height: 115vh;
    min-height: 115dvh;
    /* Increased by 20% from 95vh/95dvh */
    /* Dynamic viewport height for modern browsers */
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
    background: url('../Media Content/HomePage.jpg') no-repeat center center/cover;
}

.hero-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: radial-gradient(circle at center, transparent 0%, rgba(0, 0, 0, 0.4) 100%);
    backdrop-filter: blur(2px) brightness(0.8);
    z-index: 2;
}

.hero-content {
    position: relative;
    z-index: 10;
    text-align: center;
    max-width: 1350px;
    padding-top: 72px;
    /* Increased by 20% from 60px */
}

.hero h1 {
    font-size: 2.3rem;
    /* Increased by 20% from 1.9rem */
    line-height: 1.1;
    font-weight: 800;
    margin-bottom: 1rem;
    /* Increased by 20% from 0.85rem */
    background: linear-gradient(135deg, #ffffff 0%, #3b82f6 50%, #8b5cf6 100%);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    background-size: 200% auto;
    animation: liquid-gradient 8s ease infinite;
    text-shadow: 0 0 30px rgba(59, 130, 246, 0.3);
}

.hero-skills {
    background: url('../Media Content/SKILLS ACQUISITION/SKILLS ACQUISITION/EYZ09724.jpg') no-repeat center center/cover !important;
}

.hero-students {
    background: url('../Media Content/ACADEMICS/ACADEMIC PHOTOS/EYZ09145.jpg') no-repeat center center/cover !important;
}

.hero-boarding {
    background: url('../Media Content/BOARDING/IMG_0948.JPG') no-repeat center center/cover !important;
}

@keyframes liquid-gradient {
    0% {
        background-position: 0% 50%;
    }

    50% {
        background-position: 100% 50%;
    }

    100% {
        background-position: 0% 50%;
    }
}

.hero p {
    font-size: 0.66rem;
    /* Increased by 20% from 0.55rem */
    color: #ffffff;
    margin-top: 0.6rem;
    /* Increased by 20% from 0.5rem */
    margin-bottom: 1.45rem;
    /* Increased by 20% from 1.2rem */
    font-weight: 500;
    text-shadow: 0 2px 10px rgba(0, 0, 0, 0.5);
    opacity: 0.95;
}

/* Buttons */
.btn-row {
    display: flex;
    gap: 0.8rem;
    flex-wrap: wrap;
    justify-content: center;
    width: 100%;
}

.btn-group {
    display: flex;
    gap: 1rem;
    /* Increased by 20% from 0.85rem */
    justify-content: center;
    flex-wrap: wrap;
    opacity: 1 !important;
    transform: none !important;
    position: relative;
    z-index: 20;
    margin-top: 1.5rem;
    /* Increased by 20% from 1.25rem */
    animation: fade-up 1s var(--transition-slow) 0.4s forwards;
}

.btn {
    padding: 0.5rem 1.25rem;
    /* Increased by 20% from 0.4rem 1rem */
    border-radius: 50px;
    font-weight: 700;
    font-size: 0.6rem;
    /* Increased by 20% from 0.5rem */
    cursor: pointer;
    transition: all 0.5s cubic-bezier(0.23, 1, 0.32, 1);
    border: 1px solid transparent;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

/* Hero buttons — 56% larger than base (30% + 20%) */
.hero .btn {
    padding: 0.78rem 1.95rem;
    font-size: 0.936rem;
    letter-spacing: 0.07em;
}

.btn-primary {
    background: rgba(21, 0, 26, 0.85);
    color: #fff;
    backdrop-filter: blur(15px);
    border: 1px solid rgba(255, 255, 255, 0.1);
    box-shadow: 0 8px 32px rgba(21, 0, 26, 0.5);
}

.btn-primary:hover {
    transform: translateY(-8px) scale(1.05);
    box-shadow: 0 15px 40px rgba(21, 0, 26, 0.7);
    background: #2a0033;
    /* Deep purple hover */
}

.btn-secondary {
    background: rgba(255, 255, 255, 0.08);
    color: #fff;
    border: 1px solid rgba(255, 255, 255, 0.3);
    backdrop-filter: blur(30px);
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.2);
}

.btn-secondary:hover {
    background: rgba(255, 255, 255, 0.15);
    border-color: #ffffff;
    transform: translateY(-8px) scale(1.05);
    box-shadow: 0 15px 30px rgba(255, 255, 255, 0.1);
}

/* Animations */
@keyframes fade-up {
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes pulse-glow {
    0% {
        transform: translate(-50%, -50%) scale(0.8);
        opacity: 0.5;
    }

    100% {
        transform: translate(-50%, -50%) scale(1.2);
        opacity: 0.8;
    }
}

@media (max-width: 1024px) {
    .container {
        padding: 0 1.5rem;
    }

    .hero h1 {
        font-size: 1.45rem;
        /* Increased by 20% from 1.2rem */
        word-wrap: break-word;
    }

    .hero-content {
        width: 100%;
    }
}

@media (max-width: 768px) {
    .container {
        padding: 0 1rem;
    }

    .hero {
        min-height: 95dvh;
        /* Reduced from 135dvh */
        height: auto;
        /* Allow growth if content is long */
        align-items: flex-start;
        /* Respect padding-top offset on tall devices */
        padding-bottom: 50px;
        /* Room at the bottom */
        overflow-x: hidden;
    }

    .hero-content {
        padding-top: 145px;
        /* Increased by 20% from 120px */
        display: flex;
        flex-direction: column;
        align-items: center;
        gap: 1.2rem;
        /* Increased by 20% from 1rem */
        width: 100%;
    }

    .hero h1 {
        font-size: 1.3rem;
        /* Increased by 20% from 1.1rem */
        margin-bottom: 0.4rem;
        /* Increased proportionally */
    }

    .hero p {
        font-size: 0.55rem;
        /* Increased by 20% from 0.45rem */
        max-width: 90%;
        margin: 0 auto;
    }

    .btn-group {
        flex-direction: column;
        gap: 1rem;
        /* Increased by 20% from 0.8rem */
        width: 100%;
        max-width: 250px;
        /* Increased by 20% from 210px */
    }

    .btn {
        padding: 0.6rem 1.2rem;
        /* Increased by 20% from 0.5rem 1rem */
        font-size: 0.65rem;
        /* Increased by 20% from 0.55rem */
        width: 100%;
    }

    /* Hero buttons — 56% larger on mobile too */
    .hero .btn {
        padding: 0.936rem 1.872rem;
        font-size: 1rem;
    }

    .hero .btn-group {
        max-width: 320px;
    }
}

/* Scrollbar */
::-webkit-scrollbar {
    width: 8px;
}

::-webkit-scrollbar-track {
    background: var(--bg-color);
}

::-webkit-scrollbar-thumb {
    background: #333;
    border-radius: 4px;
}

/* Navigation */
.navbar {
    padding: 2.5rem 0;
    /* Increased padding for larger logo */
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    z-index: 1000;
    backdrop-filter: blur(15px);
    transition: all 0.4s var(--transition-slow);
}

/* Mobile menu hidden by default on desktop */
.mobile-menu {
    display: none;
}

@media (max-width: 768px) {

    /* But allows display in mobile query when configured */
    .mobile-menu {
        display: flex;
    }

    .navbar {
        padding: 1.25rem 0;
        /* Reduced from 2.5rem to save 40px height */
    }

    .logo img {
        height: 80px;
        /* Scaled down from 110px on mobile */
    }
}

.navbar.scrolled {
    background-color: rgba(0, 0, 0, 0.4);
    /* Darker Liquid Glass transparency */
    backdrop-filter: blur(20px) saturate(180%);
    -webkit-backdrop-filter: blur(20px) saturate(180%);
    padding: 15px 0;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5);
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    /* Subtle edge */
}

.nav-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    position: relative;
    width: 100%;
    /* Ensure full width usage */
}

.desktop-only {
    display: flex;
}

.logo {
    position: absolute;
    left: 50%;
    top: 50%;
    transform: translate(-50%, -50%);
    z-index: 1001;
    display: flex;
    justify-content: center;
    align-items: center;
}

.logo img {
    height: 110px;
    /* Restored large size */
    width: auto;
    /* Prevent stretching */
    object-fit: contain;
    filter: brightness(0) invert(1) !important;
    transition: height 0.3s ease;
}

.navbar.scrolled .logo img {
    height: 80px;
}

.menu-toggle img {
    width: 100%;
    height: 100%;
    object-fit: contain;
}

.menu {
    display: flex;
    font-weight: 500;
    flex: 1;
    /* Allow menus to take up available space */
    gap: clamp(1rem, 2vw, 3rem);
    /* Fluid gap between links */
}

.menu-left {
    justify-content: flex-start;
    padding-right: clamp(60px, 10vw, 140px);
    /* Push away from center logo */
}

.menu-right {
    justify-content: flex-end;
    padding-left: clamp(60px, 10vw, 140px);
    /* Push away from center logo */
}

/* Ensure links are evenly spaced if needed, or just use gap */
.menu-left a,
.menu-right a {
    white-space: nowrap;
    /* Prevent wrapping */
}

.menu a {
    position: relative;
    font-family: 'Poppins', sans-serif;
    font-size: 0.95rem;
    letter-spacing: 0.02em;
    font-weight: 700;
}

.menu a::after {
    content: '';
    position: absolute;
    bottom: -4px;
    left: 0;
    width: 0;
    height: 2px;
    background: #ffff;
    /* White hover */
    transition: width 0.3s ease;
}

.menu a:hover::after {
    width: 100%;
}

/* Dropdown Menu Styles */
.dropdown {
    position: relative;
}

.dropdown-toggle {
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 0.3rem;
}

.dropdown-toggle::before {
    content: '▼';
    font-size: 0.7rem;
    color: var(--accent-color);
    transition: transform 0.3s ease;
}

.dropdown:hover .dropdown-toggle::before {
    transform: rotate(180deg);
}

.dropdown-menu {
    position: absolute;
    top: calc(100% + 10px);
    left: 0;
    min-width: 220px;
    background: rgba(255, 255, 255, 0.05);
    backdrop-filter: blur(25px) saturate(200%);
    -webkit-backdrop-filter: blur(25px) saturate(200%);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 16px;
    padding: 0.75rem 0;
    opacity: 0;
    visibility: hidden;
    transform: translateY(-10px);
    transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
    box-shadow: 0 40px 80px rgba(0, 0, 0, 0.5), inset 0 0 20px rgba(255, 255, 255, 0.05);
    z-index: 1000;
}

.dropdown:hover .dropdown-menu {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.dropdown-menu a {
    display: block;
    padding: 0.75rem 1.25rem;
    color: var(--text-primary);
    text-decoration: none;
    font-size: 0.9rem;
    font-weight: 500;
    transition: all 0.2s ease;
    position: relative;
}

.dropdown-menu a::after {
    display: none;
}

.dropdown-menu a:hover {
    background: rgba(64, 0, 77, 0.3);
    color: #fff;
    padding-left: 1.5rem;
}

.dropdown-menu a:first-child {
    border-radius: 12px 12px 0 0;
}

.dropdown-menu a:last-child {
    border-radius: 0 0 12px 12px;
}

.menu-toggle {
    display: none;
    flex-direction: column;
    justify-content: space-between;
    width: 30px;
    height: 21px;
    background: transparent;
    border: none;
    cursor: pointer;
    z-index: 1001;
}

.menu-toggle .bar {
    width: 100%;
    height: 2px;
    background-color: #fff;
    transition: all 0.3s ease;
}

@media (max-width: 1024px) {
    .desktop-only {
        display: none;
    }

    .menu-toggle {
        display: flex;
        flex-direction: column;
        align-items: center;
        justify-content: center;
        gap: 5px;
        width: 48px;
        height: 48px;
        border: 1px solid rgba(255, 255, 255, 0.3);
        border-radius: 50%;
        background: rgba(255, 255, 255, 0.05);
        backdrop-filter: blur(20px);
        transition: all 0.5s cubic-bezier(0.23, 1, 0.32, 1);
        cursor: pointer;
        position: relative;
        z-index: 1001;
        box-shadow: 0 0 15px rgba(255, 255, 255, 0.1);
    }

    .menu-toggle:hover {
        background: rgba(255, 255, 255, 0.12);
        border-color: #ffffff;
        transform: scale(1.05);
        box-shadow: 0 0 25px rgba(255, 255, 255, 0.2);
    }

    .menu-toggle .bar {
        width: 18px;
        height: 2px;
        background-color: #fff;
        border-radius: 2px;
        transition: all 0.4s cubic-bezier(0.23, 1, 0.32, 1);
        position: relative;
    }

    /* Cool "X" Cross Animation */
    .menu-toggle.active .bar:nth-child(1) {
        transform: translateY(7px) rotate(45deg);
    }

    .menu-toggle.active .bar:nth-child(2) {
        opacity: 0;
        transform: translateX(-10px);
    }

    .menu-toggle.active .bar:nth-child(3) {
        transform: translateY(-7px) rotate(-45deg);
    }

    .mobile-menu {
        position: absolute;
        top: 110%;
        right: 0;
        background: rgba(255, 255, 255, 0.05);
        backdrop-filter: blur(30px) saturate(210%);
        -webkit-backdrop-filter: blur(30px) saturate(210%);
        padding: 2.5rem;
        border-radius: 40px 0 0 40px;
        border: 1px solid rgba(255, 255, 255, 0.2);
        border-right: none;
        display: flex;
        flex-direction: column;
        gap: 0.5rem;
        width: 280px;
        opacity: 0;
        visibility: hidden;
        transform: translateX(50px) scale(0.95);
        transform-origin: center right;
        transition: all 0.6s cubic-bezier(0.23, 1, 0.32, 1);
        box-shadow: -20px 40px 80px rgba(0, 0, 0, 0.6),
            inset 0 0 30px rgba(255, 255, 255, 0.05);
        z-index: 2000;
    }

    /* Background Blur Effect when Menu is Open */
    body.mobile-menu-active main,
    body.mobile-menu-active .liquid-bg,
    body.mobile-menu-active footer {
        filter: blur(10px) brightness(0.7);
        transition: filter 0.6s cubic-bezier(0.23, 1, 0.32, 1);
        pointer-events: none;
        user-select: none;
    }

    /* Ensure transitions are smooth when removing blur */
    main,
    .liquid-bg,
    footer {
        transition: filter 0.6s cubic-bezier(0.23, 1, 0.32, 1);
    }

    .mobile-menu.active {
        opacity: 1;
        visibility: visible;
        transform: translateX(0) scale(1);
    }

    .mobile-menu a {
        color: #ffffff;
        font-weight: 700;
        font-size: 1.3rem;
        text-align: center;
        border: none;
        padding: 1.2rem;
        border-radius: 15px;
        transition: all 0.3s ease;
        letter-spacing: 0.02em;
    }

    .mobile-menu a:active,
    .mobile-menu a:hover,
    .mobile-menu a.active {
        background: rgba(64, 0, 77, 0.2);
        color: #ffffff;
        box-shadow: inset 0 0 15px rgba(64, 0, 77, 0.3);
        transform: scale(1.02);
    }

    .mobile-menu a:last-child {
        border-bottom: none;
    }

    /* Mobile Dropdown Styling */
    .mobile-dropdown {
        width: 100%;
        display: flex;
        flex-direction: column;
        align-items: center;
    }

    .mobile-dropdown-toggle {
        background: transparent;
        color: #ffffff;
        font-weight: 700;
        font-size: 1.3rem;
        text-align: center;
        border: none;
        padding: 1.2rem;
        width: 100%;
        cursor: pointer;
        display: flex;
        align-items: center;
        justify-content: center;
        gap: 0.5rem;
        font-family: inherit;
        transition: all 0.3s ease;
    }

    .mobile-dropdown-toggle::after {
        content: '▼';
        font-size: 0.8rem;
        color: var(--accent-color);
        transition: transform 0.4s cubic-bezier(0.23, 1, 0.32, 1);
    }

    .mobile-dropdown-toggle.active {
        background: rgba(64, 0, 77, 0.1);
        color: #ffffff;
        border-radius: 15px;
    }

    .mobile-dropdown-toggle.active::after {
        transform: rotate(180deg);
    }

    .mobile-dropdown-menu {
        display: flex;
        flex-direction: column;
        width: 90%;
        max-height: 0;
        opacity: 0;
        visibility: hidden;
        margin-top: 0;
        margin-bottom: 0;
        padding: 0;
        background: rgba(255, 255, 255, 0.05);
        backdrop-filter: blur(25px);
        -webkit-backdrop-filter: blur(25px);
        border: 1px solid rgba(255, 255, 255, 0.1);
        border-radius: 20px;
        overflow: hidden;
        transition: all 0.5s cubic-bezier(0.23, 1, 0.32, 1);
    }

    .mobile-dropdown-menu.active {
        max-height: 500px;
        /* Arbitrary large height */
        opacity: 1;
        visibility: visible;
        margin-top: 0.5rem;
        margin-bottom: 0.5rem;
        border-color: rgba(255, 255, 255, 0.2);
        box-shadow: 0 50px 100px rgba(0, 0, 0, 0.5), inset 0 0 30px rgba(255, 255, 255, 0.05);
    }

    /* Allow hover to open it too (for desktop resizing or hybrid devices) BUT only if hover is supported */
    @media (hover: hover) {
        .mobile-dropdown:hover .mobile-dropdown-menu {
            max-height: 500px;
            opacity: 1;
            visibility: visible;
            margin-top: 0.5rem;
            margin-bottom: 0.5rem;
            border-color: rgba(255, 255, 255, 0.2);
            box-shadow: 0 50px 100px rgba(0, 0, 0, 0.5), inset 0 0 30px rgba(255, 255, 255, 0.05);
        }
    }

    .mobile-dropdown-menu a {
        font-size: 1.1rem;
        /* Slightly smaller than main links */
        padding: 1rem;
        background: transparent;
        /* Clear background to show glass */
        border-bottom: 1px solid rgba(255, 255, 255, 0.1);
        text-align: center;
        width: 100%;
    }

    .mobile-dropdown-menu a:last-child {
        border-bottom: none;
    }

    .mobile-dropdown-menu a:hover {
        background: rgba(255, 255, 255, 0.1);
    }

    @keyframes fade-in-down {
        from {
            opacity: 0;
            transform: translateY(-10px);
        }

        to {
            opacity: 1;
            transform: translateY(0);
        }
    }
}

/* Reduced Desktop Hero Size */
@media (min-width: 1025px) {
    .hero-content {
        padding-top: 72px;
        /* Increased by 20% from 60px */
        max-width: 630px;
        /* Increased by 20% from 525px */
    }

    .hero h1 {
        font-size: 4.5rem;
        /* Increased by ~20% from 3.8rem */
        margin-bottom: 1.2rem;
        /* Increased proportionally */
    }

    .hero p {
        font-size: 1.3rem;
        /* Increased by ~20% from 1.1rem */
        margin-top: 1.2rem;
        margin-bottom: 2.9rem;
        /* Increased by ~20% from 2.4rem */
    }

    .btn-group {
        gap: 0.9rem;
        /* Increased by 20% from 0.75rem */
        margin-top: 1.2rem;
        /* Increased proportionally */
    }

    .btn {
        padding: 0.7rem 1.7rem;
        /* Increased by 20% from 0.6rem 1.4rem */
        font-size: 0.7rem;
        /* Increased by 20% from 0.6rem */
    }
}

/* Background Blur Effect for Desktop Dropdown */
body.dropdown-active main,
body.dropdown-active .liquid-bg,
body.dropdown-active footer {
    filter: blur(10px) brightness(0.7);
    transition: filter 0.6s cubic-bezier(0.23, 1, 0.32, 1);
    /* No pointer-events: none here, to allow interaction if needed, or arguably yes */
}

/* Liquid Download Modal */
.liquid-modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.4);
    backdrop-filter: blur(15px);
    z-index: 3000;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    visibility: hidden;
    transition: all 0.5s cubic-bezier(0.23, 1, 0.32, 1);
}

.liquid-modal-overlay.active {
    opacity: 1;
    visibility: visible;
}

.liquid-modal {
    background: rgba(255, 255, 255, 0.05);
    backdrop-filter: blur(25px);
    -webkit-backdrop-filter: blur(25px);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 40px;
    padding: 3rem;
    max-width: 500px;
    width: 90%;
    text-align: center;
    transform: scale(0.8) translateY(20px);
    transition: all 0.6s cubic-bezier(0.23, 1, 0.32, 1);
    box-shadow: 0 40px 80px rgba(0, 0, 0, 0.5), inset 0 0 20px rgba(255, 255, 255, 0.05);
}

.liquid-modal-overlay.active .liquid-modal {
    transform: scale(1) translateY(0);
}

.modal-content h2 {
    font-size: 2.5rem;
    margin-bottom: 1.5rem;
    background: linear-gradient(135deg, #fff 0%, var(--accent-color) 100%);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    font-weight: 800;
}

.modal-content p {
    font-size: 1.2rem;
    color: #ffffff;
    opacity: 0.9;
    margin-bottom: 2.5rem;
    line-height: 1.6;
}

.modal-buttons {
    display: flex;
    gap: 1.5rem;
    justify-content: center;
}

@media (max-width: 480px) {
    .modal-buttons {
        flex-direction: column;
    }
}

/* Scroll Animations */
.animate-on-scroll {
    opacity: 0;
    transform: translateY(30px);
    transition: all 0.8s var(--transition-slow);
    will-change: transform, opacity;
}

.animate-on-scroll.visible {
    opacity: 1;
    transform: translateY(0);
}

/* Section Common */
section {
    padding: 6rem 0;
}

.section-title {
    font-size: 3rem;
    text-align: center;
    margin-bottom: 4rem;
    font-weight: 700;
}

.slideshow-hero .section-title {
    margin-top: -100px;
    z-index: 25;
}

/* About Section */
#about {
    background-color: transparent;
    position: relative;
    overflow: hidden;
}

.cards-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
}

@media (max-width: 768px) {
    .cards-grid {
        display: flex;
        flex-wrap: nowrap;
        overflow-x: auto;
        padding: 20px 0;
        /* Add top padding to fix hover clipping */
        padding-bottom: 30px;
        /* Extra bottom padding for comfort */
        /* Space for scrollbar/touch */
        scroll-snap-type: x mandatory;
        gap: 1.5rem;
        -webkit-overflow-scrolling: touch;
        /* Hide Scrollbar */
        scrollbar-width: none;
        -ms-overflow-style: none;
    }

    .cards-grid::-webkit-scrollbar {
        display: none;
    }
}

.cards-grid .glass-card {
    flex: 0 0 85%;
    /* Show 85% of card to encourage scroll */
    scroll-snap-align: center;
}

.glass-card {
    position: relative;
    overflow: hidden;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 30px;
    padding: 3rem;
    backdrop-filter: blur(25px);
    -webkit-backdrop-filter: blur(25px);
    transition: all 0.6s cubic-bezier(0.23, 1, 0.32, 1);
    box-shadow: 0 40px 80px rgba(0, 0, 0, 0.5), inset 0 0 20px rgba(255, 255, 255, 0.05);
    will-change: transform, box-shadow;
}

.glass-card img {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    opacity: 0.15;
    z-index: -1;
    transition: transform 0.6s ease;
}

.glass-card:hover {
    transform: translateY(-12px) scale(1.02);
    box-shadow: 0 50px 100px rgba(0, 0, 0, 0.6);
}

.glass-card:hover img {
    transform: scale(1.1);
    opacity: 0.45;
}

.glass-card h3 {
    position: relative;
    z-index: 1;
    font-size: 1.5rem;
    margin-bottom: 1rem;
    color: #fff;
}

.glass-card p {
    position: relative;
    z-index: 1;
    color: #fff;
    /* Changed to white for better visibility on dark image background */
    font-size: 1.1rem;
}

.glass-card .icon {
    font-size: 2rem;
    margin-bottom: 1.5rem;
    color: var(--accent-color);
}

/* Global Stats Dashboard (3x3 Circular Horizontal) */
#global-stats-dashboard {
    padding: 8rem 0;
    position: relative;
    z-index: 1;
}

.stats-group {
    margin-bottom: 6rem;
}

.stats-grid-circular {
    display: flex;
    justify-content: space-evenly;
    flex-wrap: wrap;
    gap: clamp(1.5rem, 4vw, 4rem);
    justify-items: center;
    align-items: center;
    width: 100%;
}

.stat-circle {
    position: relative;
    width: 220px;
    height: 220px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(165deg, rgba(255, 255, 255, 0.1) 0%, rgba(255, 255, 255, 0.01) 100%);
    backdrop-filter: blur(20px) saturate(180%);
    -webkit-backdrop-filter: blur(20px) saturate(180%);
    border-radius: 50%;
    border: 1px solid rgba(255, 255, 255, 0.3);
    border-bottom-color: rgba(255, 255, 255, 0.1);
    border-right-color: rgba(255, 255, 255, 0.1);
    box-shadow: 0 30px 60px -15px rgba(0, 0, 0, 0.6),
        inset 0 0 40px rgba(255, 255, 255, 0.05);
    transition: all 0.6s cubic-bezier(0.23, 1, 0.32, 1);
    overflow: visible;
}

.stat-circle:hover {
    transform: scale(1.08) translateY(-10px);
    border-color: rgba(255, 255, 255, 0.4);
    box-shadow: 0 60px 100px rgba(0, 0, 0, 0.7),
        0 0 30px rgba(255, 255, 255, 0.1);
}

/* Restored Original Square Highlights Section */
.stats-section {
    padding: 6rem 0;
    position: relative;
    z-index: 1;
}

.stats-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 2rem;
    text-align: center;
}

@media (max-width: 768px) {
    .stats-grid {
        display: flex;
        flex-wrap: nowrap;
        overflow-x: auto;
        gap: 1rem;
        padding-bottom: 20px;
        scroll-snap-type: x mandatory;
        -webkit-overflow-scrolling: touch;
        /* Hide Scrollbar */
        scrollbar-width: none;
        -ms-overflow-style: none;
        justify-content: flex-start;
    }

    .stats-grid::-webkit-scrollbar {
        display: none;
    }

    .stats-grid .stat-item {
        flex: 0 0 160px;
        /* Fixed width for swipe items */
        scroll-snap-align: center;
        min-width: 160px;
    }
}

.stat-item {
    background: rgba(255, 255, 255, 0.03);
    backdrop-filter: blur(15px) saturate(180%);
    -webkit-backdrop-filter: blur(15px) saturate(180%);
    padding: 2.5rem 1.5rem;
    border-radius: 30px;
    border: 1px solid rgba(255, 255, 255, 0.15);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.4);
    transition: all 0.5s cubic-bezier(0.23, 1, 0.32, 1);
}

.stat-item h2 {
    font-size: 3.5rem;
    font-weight: 800;
    margin-bottom: 0.5rem;
    background: linear-gradient(135deg, #fff 0%, var(--accent-color) 100%);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
}

.stat-item p {
    color: var(--text-secondary);
    font-size: 0.95rem;
    text-transform: uppercase;
    letter-spacing: 0.1em;
}

.progress-ring {
    position: absolute;
    top: 50%;
    left: 50%;
    width: 100%;
    height: 100%;
    transform: translate(-50%, -50%) rotate(-90deg);
}

.progress-ring__circle {
    transition: stroke-dashoffset 2s cubic-bezier(0.4, 0, 0.2, 1);
    stroke-dasharray: 565.48;
    /* 2 * PI * 90 */
    stroke-dashoffset: 565.48;
}

.stat-circle-content {
    position: relative;
    z-index: 2;
    text-align: center;
}



/* Desktop Defaults for Circular Stats */
/* Consolidated with above */

/* Consolidated with above */

/* Reduced Desktop Font Size to Prevent Obstruction */
.stat-circle-content .stat-number {
    font-size: 2.5rem;
    /* Reduced from 3rem */
    font-weight: 800;
    display: inline-block;
    background: linear-gradient(135deg, #fff 0%, var(--accent-color) 100%);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
}

/* Adjust mobile clamp to match */
@media (max-width: 1100px) {
    .stat-circle-content .stat-number {
        font-size: clamp(1rem, 3vw, 1.1rem);
        /* Reduced max from 1.3rem */
    }

    .stats-grid-circular {
        /* Perfect Horizontal Alignment: Single Row when space allows, wrap on mobile */
        display: flex;
        flex-direction: row;
        flex-wrap: wrap;
        /* Changed from nowrap to allow 2-1 or 1-1-1 on very small screens */
        justify-content: center;
        align-items: center;
        gap: 1.5rem;
        /* Increased for clarity */
        padding: 20px 5px;
        width: 100%;
        overflow: visible;
    }

    .stats-grid-circular::-webkit-scrollbar {
        display: none;
    }

    .stat-circle {
        flex: 0 0 calc(33.33% - 1.5rem);
        /* 3 per row on tablet/large mobile */
        min-width: 100px;
        aspect-ratio: 1 / 1;
        height: auto;
        background: rgba(255, 255, 255, 0.05);
        backdrop-filter: blur(20px) saturate(180%);
        -webkit-backdrop-filter: blur(20px) saturate(180%);
        border: 1px solid rgba(255, 255, 255, 0.2);
        box-shadow: 0 8px 32px 0 rgba(31, 38, 135, 0.37);
        border-radius: 50%;
        display: flex;
        align-items: center;
        justify-content: center;
        position: relative;
    }

    @media (max-width: 480px) {
        .stat-circle {
            flex: 0 0 calc(50% - 1.5rem);
            /* 2 per row on small phones */
        }
    }

    @media (max-width: 320px) {
        .stat-circle {
            flex: 0 0 100%;
            /* 1 per row on micro screens */
        }
    }

    /* Responsive SVG sizing */
    .stat-circle svg {
        width: 100%;
        height: 100%;
        transform: rotate(-90deg);
        position: absolute;
        top: 0;
        left: 0;
    }

    .stat-circle svg circle {
        /* Default Styles */
        fill: transparent;
        cx: 50%;
        cy: 50%;
    }

    /* Calculation Circle (Progress): Outer Ring */
    .stat-circle svg .progress-ring__circle {
        r: 90;
        /* Unified Radius */
        stroke-width: 8;
    }

    /* Main Circle (Start/Track): Inner Ring */
    .stat-circle svg .progress-ring__background {
        r: 90;
        /* Unified Radius */
        stroke-width: 8;
        stroke: rgba(255, 255, 255, 0.05);
        fill: transparent;
    }

    /* Ultra-Compact Typography for Perfect Fit */
    .stat-circle-content {
        position: relative;
        z-index: 2;
        display: flex;
        flex-direction: column;
        align-items: center;
        justify-content: center;
        width: 100%;
        padding: 0 5px;
        /* Prevent edge touching */
    }

    .stat-circle-content .stat-number {
        font-size: clamp(1rem, 3.5vw, 1.3rem);
        /* Reduced max size */
        line-height: 1;
        font-weight: 800;
    }

    .stat-circle-content p {
        font-size: clamp(0.6rem, 2.5vw, 0.75rem);
        /* Slightly larger for legibility */
        letter-spacing: 0px;
        margin-top: 2px;
        line-height: 1;
        white-space: nowrap;
        text-align: center;
        max-width: 90%;
        overflow: hidden;
        text-overflow: ellipsis;
    }

    .stat-circle-content .stat-suffix {
        font-size: 0.8em;
    }
}

/* Boarding Page Layouts */
.boarding-grid,
.community-rules-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
    margin-top: 2rem;
}

.house-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 2rem;
    margin-top: 3rem;
}

.house-grid .glass-card {
    height: 100%;
    display: flex;
    flex-direction: column;
    padding: 0;
    overflow: hidden;
    transform: none;
    /* Removed scaling to prevent blur and gaps */
    transition: all 0.4s cubic-bezier(0.165, 0.84, 0.44, 1);
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.house-grid .glass-card:hover {
    transform: translateY(-8px);
    border-color: rgba(255, 255, 255, 0.3);
    box-shadow: 0 30px 60px rgba(0, 0, 0, 0.5);
}

.house-grid .glass-card img {
    position: relative;
    opacity: 1;
    filter: none;
    width: 100%;
    height: 240px;
    /* Consistent image height */
    object-fit: cover;
    /* Perfect fit into frame */
    border-radius: 0;
    margin-bottom: 0;
    z-index: 1;
}

.house-grid .glass-card h3 {
    padding: 1.5rem 1.5rem 0.5rem;
    font-size: 1.4rem;
    font-weight: 850;
    /* Super bold as requested */
    color: #fff;
    letter-spacing: -0.02em;
}

.house-grid .glass-card p {
    padding: 0 1.5rem 1.8rem;
    font-size: 1rem;
    font-weight: 600;
    /* Bolder text */
    color: rgba(255, 255, 255, 0.9);
    line-height: 1.5;
}

.house-grid .glass-card.blue:hover {
    border-color: rgba(59, 130, 246, 0.5);
    box-shadow: 0 10px 30px rgba(59, 130, 246, 0.2);
}

.house-grid .glass-card.green:hover {
    border-color: rgba(34, 197, 94, 0.5);
    box-shadow: 0 10px 30px rgba(34, 197, 94, 0.2);
}

.house-grid .glass-card.red:hover {
    border-color: rgba(239, 68, 68, 0.5);
    box-shadow: 0 10px 30px rgba(239, 68, 68, 0.2);
}

.house-grid .glass-card.yellow:hover {
    border-color: rgba(234, 179, 8, 0.5);
    box-shadow: 0 10px 30px rgba(234, 179, 8, 0.2);
}

@media (max-width: 1200px) {
    .house-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 600px) {
    .house-grid {
        grid-template-columns: 1fr;
        gap: 1.5rem;
        padding: 0 10px;
    }

    .house-grid .glass-card img {
        height: 200px;
        /* Slightly shorter on mobile */
    }
}

.house-card {
    position: relative;
    padding: 3rem 1.5rem;
    border-radius: 20px;
    border: 1px solid rgba(255, 255, 255, 0.1);
    background: rgba(255, 255, 255, 0.05);
    backdrop-filter: blur(15px);
    overflow: hidden;
    transition: all 0.4s ease;
    text-align: center;
}

.house-glow {
    position: absolute;
    top: 50%;
    left: 50%;
    width: 200%;
    height: 200%;
    transform: translate(-50%, -50%);
    opacity: 0.05;
    filter: blur(60px);
    z-index: 1;
}

.house-card:hover {
    transform: translateY(-10px);
    border-color: rgba(255, 255, 255, 0.3);
}

.house-card h3 {
    position: relative;
    z-index: 2;
    font-size: 1.4rem;
    margin: 0;
}

.house-card.blue .house-glow {
    background: #0084ff;
}

.house-card.green .house-glow {
    background: #2ecc71;
}

.house-card.red .house-glow {
    background: #e74c3c;
}

.house-card.yellow .house-glow {
    background: #f1c40f;
}

.requirements-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 1.5rem;
}

.requirements-grid.compact-grid {
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1rem;
    max-width: 1000px;
    margin-left: auto;
    margin-right: auto;
}

.compact-requirement {
    padding: 1.2rem;
    border-radius: 15px;
    background: rgba(255, 50, 50, 0.05);
    /* Red alert base */
    border: 1px solid rgba(255, 50, 50, 0.2);
    backdrop-filter: blur(10px);
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.compact-requirement:hover {
    background: rgba(255, 50, 50, 0.08);
    border-color: rgba(255, 50, 50, 0.4);
    transform: translateY(-5px);
}

.compact-requirement p {
    font-size: 0.95rem;
    color: #ff9999;
    /* Policy red text */
    margin: 0;
    line-height: 1.4;
}

.compact-requirement .step-num {
    font-size: 2rem;
    opacity: 0.1;
    margin-bottom: -0.5rem;
    background: linear-gradient(135deg, #ff9999, #ff3232);
    -webkit-background-clip: text;
    background-clip: text;
}

.step-num {
    display: block;
    font-size: 3rem;
    font-weight: 800;
    opacity: 0.15;
    margin-bottom: -1.2rem;
    font-family: 'Outfit', sans-serif;
    background: linear-gradient(135deg, #fff, var(--accent-color));
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
}

.card-icon {
    font-size: 2.5rem;
    margin-bottom: 1.5rem;
    display: block;
}

.split-layout {
    display: grid;
    grid-template-columns: 1.2fr 1fr;
    gap: 0.5rem;
    /* Maximum proximity */
    align-items: center;
}

.split-layout.reverse {
    grid-template-columns: 1.2fr 1.8fr;
    /* Balanced 40/60 split for natural sizing */
}

@media (max-width: 992px) {
    .split-layout {
        grid-template-columns: 1fr;
        gap: 2rem;
    }
}

.liquid-list {
    list-style: none;
    padding: 0;
    margin: 2rem 0;
}

.liquid-list li {
    position: relative;
    padding-left: 2rem;
    margin-bottom: 1.2rem;
    font-size: 1.05rem;
    color: var(--text-secondary);
}

.liquid-list li::before {
    content: '';
    position: absolute;
    left: 0;
    top: 0.6em;
    width: 8px;
    height: 8px;
    background: var(--accent-color);
    border-radius: 50%;
    box-shadow: 0 0 15px var(--accent-color);
}

.alert.liquid-glass {
    background: rgba(255, 50, 50, 0.05);
    border: 1px solid rgba(255, 50, 50, 0.2);
    padding: 1.5rem;
    border-radius: 15px;
    backdrop-filter: blur(20px) saturate(200%);
    color: #ff9999;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
}

.glass-frame {
    padding: 10px;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.15);
    border-radius: 20px;
    backdrop-filter: blur(15px);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.4);
}

.section-subtitle {
    color: var(--text-secondary);
    font-size: 1.2rem;
    max-width: 700px;
    margin: 0 auto 3rem;
    line-height: 1.6;
}

.rounded-lg {
    border-radius: 15px;
}

.mt-4 {
    margin-top: 2rem !important;
}

.mt-3 {
    margin-top: 1.5rem !important;
}

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

.secondary-hero {
    min-height: 60vh !important;
    min-height: 60dvh !important;
}

.slideshow-hero {
    position: relative;
    min-height: 80vh !important;
    min-height: 80dvh !important;
    display: flex;
    flex-direction: column;
    padding: 6rem 0;
    overflow: hidden;
}

.slideshow-hero .carousel-viewport {
    position: relative;
    width: 100%;
    flex: 1;
    min-height: 450px;
    z-index: 1;
    overflow: visible;
    /* Critical for 3D side cards */
}

.slideshow-hero .carousel-container {
    position: relative;
    width: 100%;
    height: 100%;
    transform-style: preserve-3d;
    display: flex;
    align-items: center;
    justify-content: center;
}

.slideshow-hero .slide {
    position: absolute;
    top: 50%;
    left: 50%;
    width: 448px;
    /* 320 * 1.4 */
    height: 672px;
    /* 480 * 1.4 */
    transform: translateX(-50%) translateY(-50%) translate3d(0, 0, -300px);
    opacity: 0;
    z-index: 0;
    transition: transform 0.8s cubic-bezier(0.16, 1, 0.3, 1), opacity 0.8s ease, filter 0.8s ease;
    border-radius: 30px;
    overflow: hidden;
    background: rgba(255, 255, 255, 0.03);
    /* Liquid glass base */
    backdrop-filter: blur(15px);
    -webkit-backdrop-filter: blur(15px);
    border: 1px solid rgba(255, 255, 255, 0.15);
    box-shadow: 0 30px 60px -12px rgba(0, 0, 0, 0.7);
    pointer-events: none;
    display: flex;
    flex-direction: column;
    will-change: transform, opacity;
    backface-visibility: hidden;
    -webkit-backface-visibility: hidden;
}

.slideshow-hero .slide::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 200%;
    height: 100%;
    background: linear-gradient(105deg,
            transparent 0%,
            rgba(255, 255, 255, 0.05) 40%,
            rgba(255, 255, 255, 0.15) 50%,
            rgba(255, 255, 255, 0.05) 60%,
            transparent 100%);
    transform: translateX(-110%) skewX(-15deg);
    transition: transform 1s ease;
    pointer-events: none;
    z-index: 2;
}

.slideshow-hero .slide.active::after {
    transform: translateX(110%) skewX(-15deg);
    transition-delay: 0.5s;
}

.slideshow-hero .slide-content-wrapper {
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    padding: 2.5rem 1.5rem 1.5rem;
    background: linear-gradient(to top, rgba(0, 0, 0, 0.9) 0%, rgba(0, 0, 0, 0.4) 60%, transparent 100%);
    color: #fff;
    z-index: 3;
    pointer-events: none;
}

.slideshow-hero .slide-title {
    font-size: 1.4rem;
    font-weight: 700;
    margin-bottom: 0.3rem;
    letter-spacing: -0.02em;
    color: #fff;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
}

.slideshow-hero .slide-text {
    font-size: 0.95rem;
    opacity: 0.8;
    font-weight: 500;
    color: #a1a1aa;
}

.slideshow-hero .slide img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center top;
    opacity: 0.9;
    transition: opacity 0.8s ease;
}

/* Active slide — centered, popped forward with glass glow */
.slideshow-hero .slide.active {
    opacity: 1;
    transform: translateX(-50%) translateY(-50%) translate3d(0, 0, 0) scale(1);
    z-index: 10;
    pointer-events: auto;
    filter: none;
    box-shadow: 0 50px 100px -20px rgba(0, 0, 0, 0.8), 0 0 40px rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.25);
}

.slideshow-hero .slide.active img {
    opacity: 1;
}

/* Prev slide — symmetric stacked look with clear peek */
.slideshow-hero .slide.prev {
    opacity: 0.6;
    transform: translateX(-110%) translateY(-50%) translate3d(0, 0, -200px) rotateY(30deg) scale(0.8);
    z-index: 5;
    filter: blur(2px) brightness(0.8);
}

/* Next slide — symmetric stacked look with clear peek */
.slideshow-hero .slide.next {
    opacity: 0.6;
    transform: translateX(10%) translateY(-50%) translate3d(0, 0, -200px) rotateY(-30deg) scale(0.8);
    z-index: 5;
    filter: blur(2px) brightness(0.8);
}

/* Card image fills the slide */
.slideshow-hero .slide .card-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: top center;
    display: block;
}

/* Text overlay at bottom of card */
.slideshow-hero .slide .slide-content-wrapper {
    padding: 1rem 1.2rem;
    background: linear-gradient(to top, rgba(0, 0, 0, 0.85), transparent);
    flex-shrink: 0;
}

.slideshow-hero .slide .slide-title {
    font-size: 1rem;
    font-weight: 700;
    color: #fff;
    margin: 0 0 0.2rem;
}

.slideshow-hero .slide .slide-text {
    font-size: 0.8rem;
    color: rgba(255, 255, 255, 0.7);
    margin: 0;
}

/* Prev/Next control buttons */
.carousel-controls {
    position: absolute;
    top: 50%;
    left: 0;
    right: 0;
    transform: translateY(-50%);
    display: flex;
    justify-content: space-between;
    padding: 0 1rem;
    z-index: 20;
    pointer-events: none;
}

.control-btn {
    width: 44px;
    height: 44px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border: 1px solid rgba(255, 255, 255, 0.2);
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    pointer-events: auto;
    transition: all 0.3s ease;
    flex-shrink: 0;
}

.control-btn:hover {
    background: rgba(255, 255, 255, 0.25);
    border-color: rgba(255, 255, 255, 0.5);
    transform: scale(1.1);
}

.control-btn svg {
    width: 20px;
    height: 20px;
    fill: #fff;
}

/* Carousel section — clip overflow so side cards don't bleed */
.carousel-section {
    overflow: hidden;
}

/* Carousel viewport needs perspective for 3D */
.carousel-section .carousel-viewport {
    perspective: 1200px;
    transform-style: preserve-3d;
}

.slideshow-hero .hero-content {
    position: relative;
    z-index: 5;
}

.slideshow-hero .hero-overlay {
    z-index: 3;
}

.slideshow-hero .carousel-indicators {
    position: absolute;
    bottom: -40px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    gap: 12px;
    z-index: 10;
}

/* Mobile carousel adjustments */
@media (max-width: 768px) {
    .slideshow-hero {
        min-height: 600px !important;
        padding: 4rem 0;
    }

    .slideshow-hero .carousel-viewport {
        min-height: 480px;
        perspective: 1000px;
    }

    .slideshow-hero .slide {
        width: 314px;
        /* 392 * 0.8 */
        height: 448px;
        /* 560 * 0.8 */
        top: 60%;
        /* Pushed down from 50% by 10% */
    }

    .slideshow-hero .slide.prev {
        transform: translateX(-105%) translateY(-50%) translate3d(0, 0, -150px) rotateY(20deg) scale(0.75);
        opacity: 0.5;
    }

    .slideshow-hero .slide.next {
        transform: translateX(5%) translateY(-50%) translate3d(0, 0, -150px) rotateY(-20deg) scale(0.75);
        opacity: 0.5;
    }

    .control-btn {
        width: 36px;
        height: 36px;
    }
}

/* House Gallery Styles */
.house-gallery-container {
    padding: 10px;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 25px;
    box-shadow: 0 40px 100px rgba(0, 0, 0, 0.4);
    max-width: 1000px;
    margin: 3rem auto 0;
}

.house-gallery {
    position: relative;
    width: 100%;
    aspect-ratio: 16 / 9;
    /* More standard aspect ratio for smart zoom out */
    min-height: 400px;
    box-shadow: 0 40px 100px rgba(0, 0, 0, 0.4);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 20px;
    overflow: hidden;
    background: transparent;
    /* Glass base instead of black */
}

.house-gallery .carousel-viewport {
    width: 100%;
    height: 100%;
    background: transparent;
    perspective: 1200px;
    transform-style: preserve-3d;
}

.house-gallery .carousel-container {
    width: 100%;
    height: 100%;
    position: relative;
    transform-style: preserve-3d;
    display: flex;
    align-items: center;
    justify-content: center;
}

.house-gallery .slide {
    position: absolute;
    top: 50%;
    left: 50%;
    width: 100%;
    height: 100%;
    transform: translate(-50%, -50%) translate3d(0, 0, -300px);
    opacity: 0;
    z-index: 0;
    transition: transform 0.8s cubic-bezier(0.16, 1, 0.3, 1), opacity 0.6s ease, filter 0.6s ease;
    border-radius: 20px;
    overflow: hidden;
    background: transparent;
    /* No background flashes */
    backdrop-filter: blur(15px);
    -webkit-backdrop-filter: blur(15px);
    border: 1px solid rgba(255, 255, 255, 0.15);
    box-shadow: 0 30px 60px -12px rgba(0, 0, 0, 0.7);
    pointer-events: none;
}

.house-gallery .slide.active {
    opacity: 1;
    transform: translate(-50%, -50%) translate3d(0, 0, 0) scale(1);
    z-index: 10;
    pointer-events: auto;
    filter: none;
    box-shadow: 0 40px 80px rgba(0, 0, 0, 0.5);
    border-color: rgba(255, 255, 255, 0.3);
}

.house-gallery .slide.prev {
    opacity: 0.6;
    transform: translate(-105%, -50%) translate3d(0, 0, -200px) rotateY(25deg) scale(0.85);
    z-index: 5;
    filter: blur(2px) brightness(0.8);
}

.house-gallery .slide.next {
    opacity: 0.6;
    transform: translate(5%, -50%) translate3d(0, 0, -200px) rotateY(-25deg) scale(0.85);
    z-index: 5;
    filter: blur(2px) brightness(0.8);
}

.house-gallery .slide img {
    width: 100%;
    height: 100%;
    min-width: 100%;
    /* Guaranteed fill */
    min-height: 100%;
    /* Guaranteed fill */
    object-fit: cover;
    /* Fill the box properly */
    display: block;
}

/* Captions removed as requested */

.house-gallery .carousel-indicators {
    position: absolute;
    bottom: 25px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    gap: 10px;
    z-index: 10;
}

.house-gallery .indicator {
    width: 10px;
    height: 10px;
    background: rgba(255, 255, 255, 0.25);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 50%;
    cursor: pointer;
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.house-gallery .indicator.active {
    background: #fff;
    transform: scale(1.3);
    box-shadow: 0 0 15px rgba(255, 255, 255, 0.5);
}

/* Compact Stacked Style for Sidebars/Columns */
.compact-stacked {
    min-height: 350px !important;
}

.compact-stacked .slide {
    width: 280px !important;
    height: 380px !important;
}

.compact-stacked .slide.prev {
    transform: translate(-115%, -50%) translate3d(0, 0, -150px) rotateY(20deg) scale(0.8) !important;
}

.compact-stacked .slide.next {
    transform: translate(15%, -50%) translate3d(0, 0, -150px) rotateY(-20deg) scale(0.8) !important;
}

@media (max-width: 768px) {
    .house-gallery {
        min-height: 250px;
    }
}

.navbar .menu a.active {
    color: var(--accent-color);
}

.navbar .menu a.active::after {
    width: 100%;
    background: var(--accent-color);
}

@media (max-width: 768px) {
    .stats-grid-circular {
        grid-template-columns: 1fr;
        /* Stack on mobile for readability */
        gap: 3rem;
    }
}

/* Testimonials Section */
#testimonials {
    background-color: transparent;
}

.testimonials-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 2rem;
}

.testimonial-card {
    padding: 3rem;
    border-radius: 35px;
    background: rgba(255, 255, 255, 0.02);
    backdrop-filter: blur(15px) saturate(180%);
    -webkit-backdrop-filter: blur(15px) saturate(180%);
    border: 1px solid rgba(255, 255, 255, 0.15);
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    height: 100%;
    transition: all 0.6s cubic-bezier(0.23, 1, 0.32, 1);
}

.testimonial-card:hover {
    transform: translateY(-15px) scale(1.02);
    background: rgba(255, 255, 255, 0.05);
    border-color: rgba(255, 255, 255, 0.4);
    box-shadow: 0 40px 80px rgba(0, 0, 0, 0.6),
        0 0 30px rgba(255, 255, 255, 0.1);
}

.testimonial-text {
    font-style: italic;
    font-size: 1.2rem;
    margin-bottom: 2rem;
    line-height: 1.8;
}

.testimonial-author {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.author-info strong {
    display: block;
    color: #fff;
    font-size: 1.1rem;
}

.author-info span {
    color: var(--text-secondary);
    font-size: 0.9rem;
}

@media (max-width: 600px) {
    .testimonials-grid {
        grid-template-columns: 1fr;
    }
}

/* Bento Grid Section */
.bento-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    grid-template-rows: repeat(2, 300px);
    gap: 1.5rem;
}

.bento-item {
    position: relative;
    border-radius: 32px;
    overflow: hidden;
    background-color: #1a1a1a;
    /* Neutral dark placeholder */
    border: 1px solid rgba(255, 255, 255, 0.15);
    display: flex;
    backdrop-filter: none;
    -webkit-backdrop-filter: none;
    transition: all 0.6s cubic-bezier(0.23, 1, 0.32, 1);
}

.bento-slideshow .slideshow-inner {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 0;
    background-color: #0c0c0c;
    /* Deep dark placeholder */
}

.bento-slideshow .slideshow-inner img {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    /* Ensure it fills the frame */
    opacity: 0;
    transition: opacity 1.5s ease-in-out, transform 8s linear;
    filter: brightness(0.6) blur(2px);
}

.bento-slideshow .slideshow-inner img.active {
    opacity: 1;
    transform: scale(1.1);
    filter: brightness(0.7) blur(0px);
}

.bento-item:hover {
    transform: translateY(-10px) scale(1.01);
    border-color: rgba(255, 255, 255, 0.3);
    box-shadow: 0 30px 60px rgba(0, 0, 0, 0.4);
}

.bento-image {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    z-index: 1;
    transition: transform 0.5s ease;
}

.bento-item:hover .bento-image {
    transform: scale(1.05);
}

/* Item Spans */
.bento-item.span-2 {
    grid-column: span 2;
}

.bento-item.row-2 {
    grid-row: span 2;
}

/* Bento Content Styling */
.bento-bg {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    transition: transform 0.5s ease;
    z-index: 1;
}

/* Abstract Gradients for placeholders — removed to use page bg */
.bg-1,
.bg-2,
.bg-3,
.bg-4,
.bg-5 {
    background: transparent;
}

.bento-content {
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    padding: 2rem;
    z-index: 2;
    background: linear-gradient(to top, rgba(0, 0, 0, 0.8) 0%, rgba(0, 0, 0, 0.5) 60%, transparent 100%);
    transform: translateY(0);
    transition: transform 0.3s ease;
}

.bento-item:hover .bento-bg {
    transform: scale(1.1);
}

.bento-item:hover .bento-content {
    transform: translateY(0);
}

.bento-content h3 {
    font-size: 1.5rem;
    margin-bottom: 0.5rem;
}

.bento-content p {
    color: #e0e0e0;
    font-size: 0.9rem;
    opacity: 0.8;
}

@media (max-width: 900px) {
    .bento-grid {
        grid-template-columns: 1fr;
        grid-template-rows: auto;
    }

    .bento-item {
        grid-column: auto !important;
        height: 180px;
        /* 300 * 0.6 */
    }
}

/* Gallery / Marquee */
.marquee-container {
    padding: 6rem 0;
    background: var(--bg-color);
    position: relative;
    width: 100vw;
    max-width: 100%;
    perspective: 2000px;
    /* Enhanced 3D depth */
    overflow: visible;
    /* Allow pop-out cards */
}

.marquee-content {
    display: flex;
    justify-content: center;
    align-items: center;
    position: relative;
    height: 450px;
    width: 100%;
    transform-style: preserve-3d;
}

.marquee-item {
    position: absolute;
    width: 400px;
    height: 300px;
    border-radius: 30px;
    background: rgba(255, 255, 255, 0.05);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.1);
    transition: all 0.8s cubic-bezier(0.23, 1, 0.32, 1);
    opacity: 0;
    pointer-events: none;
    transform: translate3d(0, 0, -300px);
    overflow: hidden;
}

/* 3D Stack States for Marquee */
.marquee-item.active {
    opacity: 1;
    transform: translate3d(0, 0, 200px);
    /* Cinematic Hover Out */
    z-index: 10;
    pointer-events: auto;
    backdrop-filter: blur(40px);
    /* iOS 26.2 Glass */
    border-color: rgba(255, 255, 255, 0.4);
    box-shadow: 0 50px 100px rgba(0, 0, 0, 0.8),
        0 0 30px rgba(255, 255, 255, 0.1);
}

.marquee-item.prev {
    opacity: 0.5;
    transform: translate3d(-60%, 0, -100px) rotateY(25deg);
    z-index: 5;
}

.marquee-item.next {
    opacity: 0.5;
    transform: translate3d(60%, 0, -100px) rotateY(-25deg);
    z-index: 5;
}

.marquee-item.prev-2 {
    opacity: 0.2;
    transform: translate3d(-100%, 0, -250px) rotateY(35deg);
    z-index: 2;
}

.marquee-item.next-2 {
    opacity: 0.2;
    transform: translate3d(100%, 0, -250px) rotateY(-35deg);
    z-index: 2;
}

@media (max-width: 480px) {
    .marquee-item {
        width: 70vw;
        height: 180px;
    }
}

.marquee-item:hover {
    transform: scale(1.02);
    transition: transform 0.3s;
}

@media (max-width: 768px) {
    .marquee-item {
        width: 80%;
        height: 250px;
    }
}

/* Footer Section */
footer {
    background: rgba(10, 10, 10, 0.8);
    backdrop-filter: blur(30px);
    -webkit-backdrop-filter: blur(30px);
    padding: 6rem 0 2rem;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    width: 100%;
    overflow: hidden;
    position: relative;
    z-index: 10;
}

.footer-grid {
    display: grid;
    grid-template-columns: 2fr 1fr 1fr 1fr;
    gap: 4rem;
    margin-bottom: 4rem;
}

.footer-brand h2 {
    font-size: 2rem;
    margin-bottom: 1rem;
}

.footer-brand p {
    color: var(--text-secondary);
    max-width: 300px;
}

@media (max-width: 768px) {
    .footer-grid {
        grid-template-columns: 1fr;
        text-align: center;
        gap: 3rem;
    }

    .footer-brand p {
        margin: 0 auto 1.5rem;
    }

    .social-links {
        justify-content: center;
    }
}

.footer-column h4 {
    margin-bottom: 1.5rem;
    color: #fff;
}

.footer-column ul {
    list-style: none;
}

.footer-column ul li {
    margin-bottom: 0.8rem;
}

.social-links {
    display: flex;
    gap: 1.2rem;
    margin-top: 1.5rem;
}

.social-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 44px;
    height: 44px;
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.05);
    backdrop-filter: blur(15px);
    transition: all 0.4s cubic-bezier(0.23, 1, 0.32, 1);
    color: #fff;
    text-decoration: none;
}

.social-icon:hover {
    background: rgba(255, 255, 255, 0.15);
    border-color: #fff;
    transform: translateY(-5px) scale(1.1);
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.4);
}

.social-icon[aria-label="Instagram"]:hover {
    background: radial-gradient(circle at 30% 107%, #fdf497 0%, #fdf497 5%, #fd5949 45%, #d6249f 60%, #285AEB 90%);
    border-color: transparent;
}

.social-icon[aria-label="Facebook"]:hover {
    background: #1877F2;
    border-color: #1877F2;
}

.social-icon svg {
    width: 20px;
    height: 20px;
    fill: currentColor;
}

.footer-column ul li a {
    color: var(--text-secondary);
}

.footer-column ul li a:hover {
    color: #fff;
    padding-left: 5px;
}

.footer-bottom {
    text-align: center;
    padding-top: 2rem;
    border-top: 1px solid rgba(255, 255, 255, 0.05);
    color: var(--text-secondary);
    font-size: 0.9rem;
}

@media (max-width: 768px) {
    .footer-grid {
        grid-template-columns: 1fr;
        gap: 2rem;
    }
}

/* Slide Show / Carousel (Sliding) */
.carousel-section {
    position: relative;
    padding: 6rem 0;
    overflow: visible;
    background: transparent;
}

.carousel-viewport {
    overflow: visible;
    /* Allow "hover out" cards to exceed boundaries */
    position: relative;
    height: 800px;
    /* Greatly Increased for 50% bigger cards */
    perspective: 2000px;
    /* Stronger 3D perspective */
    display: flex;
    align-items: center;
    justify-content: center;
    margin-top: 2rem;
    /* Spacing from title */
}

/* Premium Glassmorphic Controls */
.carousel-controls {
    position: absolute;
    top: 50%;
    left: 0;
    width: 100%;
    transform: translateY(-50%);
    display: none;
    /* User requested removal */
}

@media (max-width: 768px) {
    .carousel-controls {
        display: none;
        /* Hide buttons on mobile in favor of swipe */
    }
}

.carousel-container {
    position: relative;
    width: 100%;
    height: 100%;
    transform-style: preserve-3d;
}

.slide {
    position: absolute;
    top: 50%;
    /* Center vertically */
    left: 50%;
    width: 450px;
    /* 50% larger than 300px */
    height: 650px;
    /* Proportional height */
    margin-left: 0;
    /* Centered via translate */
    border-radius: 30px;
    /* More modern radius */
    background: transparent;
    /* Removed glass base to use page bg */
    overflow: hidden;
    /* Contain the image */
    display: flex;
    flex-direction: column;
    box-shadow: 0 25px 50px rgba(0, 0, 0, 0.6);
    transition: transform 0.6s cubic-bezier(0.25, 0.8, 0.25, 1), opacity 0.6s ease, z-index 0s;
    /* Optimized transition */
    will-change: transform, opacity;
    /* Hint for hardware acceleration */
    opacity: 0;
    transform: translate(-50%, -50%) translate3d(0, 0, -300px);
    /* True center positioning */
    z-index: 1;
    pointer-events: none;
}

.card-image {
    width: 100%;
    height: 100%;
    /* Fill the card, text overlay on bottom */
    object-fit: cover;
    object-position: top center;
    /* CRITICAL: Faces always visible */
    background: transparent;
    transition: none;
    /* Remove filter transitions */
}

/* Portrait Specific Framing */
.slide-mashika .card-image {
    object-position: top center;
}

/* 3D Stack States */
/* 3D Stack States */
/* 3D Stack States */
.slide.active {
    opacity: 1;
    transform: translate(-50%, -50%) translate3d(0, 0, 300px) scale(1.1);
    /* Bulge out significantly */
    z-index: 20;
    pointer-events: auto;
    box-shadow: 0 50px 100px rgba(0, 0, 0, 0.8);
    border: 1px solid rgba(255, 255, 255, 0.2);
}

.slide.prev {
    opacity: 0.6;
    transform: translate(-100%, -50%) translate3d(0, 0, -100px) rotateY(25deg) scale(0.85);
    /* Tighter stack */
    z-index: 10;
    filter: brightness(0.6);
    /* Dim non-active cards slightly */
}

.slide.next {
    opacity: 0.6;
    transform: translate(0%, -50%) translate3d(0, 0, -100px) rotateY(-25deg) scale(0.85);
    /* Tighter stack */
    z-index: 10;
    filter: brightness(0.6);
}

/* Slide Content (Nameplate) */
/* Slide Content (Nameplate) */
.slide-content-wrapper {
    position: relative;
    /* layout flow */
    bottom: auto;
    left: auto;
    position: absolute;
    bottom: 0;
    left: 0;
    transform: none;
    width: 100%;
    height: auto;
    /* Dynamic height */
    padding: 2rem 1.5rem;
    /* More padding */
    background: linear-gradient(to top, rgba(0, 0, 0, 0.9) 0%, rgba(0, 0, 0, 0.6) 60%, transparent 100%);
    /* Gradient overlay instead of solid block */
    text-align: center;
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
    border-top: none;
    opacity: 1;
    pointer-events: auto;
    z-index: 5;
}

.slide.active .slide-content-wrapper {
    transform: none;
    opacity: 1;
    border-color: rgba(255, 255, 255, 0.1);
}

.slide-title {
    font-size: 1.4rem;
    font-weight: 800;
    color: #fff;
    margin-bottom: 4px;
    text-shadow: 0 2px 10px rgba(0, 0, 0, 0.5);
}

.slide-text {
    font-size: 0.85rem;
    color: rgba(255, 255, 255, 0.8);
    text-transform: uppercase;
    letter-spacing: 1px;
    font-weight: 600;
    text-shadow: 0 1px 5px rgba(0, 0, 0, 0.3);
}

/* Indicators (Moved Below Deck) */
.carousel-indicators {
    position: absolute;
    bottom: -40px;
    /* Pushed 30% further down below the carousel */
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    justify-content: center;
    gap: 15px;
    /* Wider gap */
    padding: 12px 24px;
    width: fit-content;
    background: rgba(0, 0, 0, 0.3);
    /* Darker background for visibility */
    backdrop-filter: blur(10px);
    border-radius: 50px;
    z-index: 100;
    /* Ensure on top */
}

/* Specific to Sections: Only show on mobile swipe */
.philosophy-indicators,
.highlights-indicators {
    display: none;
    margin-top: 2rem;
}

@media (max-width: 768px) {

    .philosophy-indicators,
    .highlights-indicators {
        display: flex;
    }
}

/* Desktop-Only High-Precision Framing: Head to Shoulders */
/* Desktop-Only High-Precision Framing: Head to Shoulders */
@media (min-width: 1025px) {
    .card-image {
        object-position: top center;
    }
}

.indicator {
    width: 8px;
    /* Slightly smaller for better responsivity */
    height: 8px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.2);
    cursor: pointer;
    transition: all 0.4s cubic-bezier(0.23, 1, 0.32, 1);
}

.indicator.active {
    background: #fff;
    width: 24px;
    /* Scaled down for mobile fit */
    border-radius: 10px;
    box-shadow: 0 0 15px rgba(255, 255, 255, 0.4);
}

@media (max-width: 480px) {
    .carousel-indicators {
        gap: 8px;
        /* Tighter for smaller screens */
        padding: 8px 16px;
    }
}

/* Background Gradients for Slides (Placeholders) */
.slide-bg-1 {
    background: linear-gradient(135deg, #1e3c72 0%, #2a5298 100%);
}

.slide-bg-2 {
    background: linear-gradient(135deg, #4B0082 0%, #800080 100%);
}

/* Management Carousel Mobile Optimization - Fully Responsive */
@media (max-width: 1024px) {
    .carousel-viewport {
        height: 600px;
        /* Reduced specific height for tablets */
        perspective: 1500px;
    }

    .slide {
        width: 380px;
        height: 550px;
        left: 50%;
        top: 50%;
    }
}

@media (max-width: 768px) {
    .carousel-section {
        padding: 4rem 1rem;
    }

    .carousel-viewport {
        height: 500px;
        /* Dynamic responsive height */
        perspective: 1000px;
        overflow: hidden;
        /* Clip overflow on mobile */
    }

    .slide {
        width: 280px;
        /* Smaller mobile card */
        height: 420px;
        left: 50%;
        top: 50%;
        border-radius: 25px;
        box-shadow: 0 15px 30px rgba(0, 0, 0, 0.5);
    }

    .slide.prev {
        transform: translate(-130%, -50%) scale(0.85) rotateY(10deg);
        opacity: 0.5;
    }

    .slide.next {
        transform: translate(30%, -50%) scale(0.85) rotateY(-10deg);
        opacity: 0.5;
    }

    .slide.active {
        transform: translate(-50%, -50%) scale(1) translateZ(50px);
        box-shadow: 0 20px 40px rgba(0, 0, 0, 0.6);
    }

    .slide-content-wrapper {
        width: 100%;
        bottom: 0;
        border-radius: 0;
        backdrop-filter: none;
        padding: 0.8rem;
    }

    .slide-title {
        font-size: clamp(1.2rem, 5vw, 1.5rem);
    }

    .slide-text {
        font-size: clamp(0.85rem, 4vw, 1rem);
    }

    .carousel-indicators {
        bottom: -30px;
        gap: 10px;
    }

    .indicator {
        width: 8px;
        height: 8px;
    }
}

@media (max-width: 480px) {
    .carousel-viewport {
        height: 480px;
        /* Increased to accommodate 420px slide + padding/shadows */
    }

    .slide.prev,
    .slide.next {
        opacity: 0.15;
        /* Even softer side peaks for mobile cleanliness */
    }
}



/* Vaatia Purple Theme */

/* Premium Sports Logo Integration */
.sports-premium-logo {
    position: absolute;
    left: 50%;
    top: 50%;
    transform: translate(-50%, -50%);
    z-index: 1001;
}

.logo-inner {
    position: relative;
    width: 140px;
    /* Enhanced size */
    height: 140px;
    display: flex;
    justify-content: center;
    align-items: center;
    /* Glass Orb Effect */
    background: radial-gradient(circle at 30% 30%, rgba(255, 255, 255, 0.1), rgba(255, 255, 255, 0.05) 60%, rgba(0, 0, 0, 0.2));
    border-radius: 50%;
    backdrop-filter: blur(8px);
    box-shadow:
        0 10px 30px rgba(0, 0, 0, 0.3),
        inset 0 0 20px rgba(255, 255, 255, 0.2),
        inset 0 0 5px rgba(255, 255, 255, 0.5);
    transition: all 0.5s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

.logo-inner:hover {
    transform: scale(1.05);
    box-shadow:
        0 20px 50px rgba(0, 0, 0, 0.5),
        inset 0 0 30px rgba(255, 255, 255, 0.3);
}

.logo-inner img {
    height: 90px !important;
    /* Adjusted to fit inside orb */
    width: auto;
    position: relative;
    z-index: 5;
    filter: drop-shadow(0 5px 15px rgba(0, 0, 0, 0.5)) brightness(1.2);
    transition: transform 0.5s ease;
}

/* Integrated Particles */
.particles-container {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    border-radius: 50%;
    overflow: hidden;
    z-index: 4;
    pointer-events: none;
}

.particle {
    position: absolute;
    font-size: 0.8rem;
    /* Small & Subtle */
    opacity: 0;
    filter: blur(0.5px);
    animation: float-particle 10s infinite ease-in-out;
    mix-blend-mode: overlay;
}

/* Strategic Placement "In Spaces" */
.p1 {
    top: 20%;
    left: 30%;
    animation-delay: 0s;
    font-size: 1rem;
}

.p2 {
    top: 70%;
    left: 70%;
    animation-delay: 1s;
    font-size: 0.9rem;
}

.p3 {
    top: 30%;
    left: 75%;
    animation-delay: 2s;
}

.p4 {
    top: 75%;
    left: 25%;
    animation-delay: 3s;
    font-size: 1.1rem;
}

.p5 {
    top: 15%;
    left: 60%;
    animation-delay: 4s;
}

.p6 {
    top: 60%;
    left: 15%;
    animation-delay: 1.5s;
}

.p7 {
    top: 40%;
    left: 85%;
    animation-delay: 2.5s;
    font-size: 0.7rem;
}

.p8 {
    top: 85%;
    left: 50%;
    animation-delay: 3.5s;
}

@keyframes float-particle {
    0% {
        transform: translate(0, 0) scale(0.8) rotate(0deg);
        opacity: 0;
    }

    20% {
        opacity: 0.8;
    }

    50% {
        transform: translate(10px, -15px) scale(1.1) rotate(180deg);
        opacity: 0.6;
    }

    80% {
        opacity: 0.8;
    }

    100% {
        transform: translate(-5px, 10px) scale(0.8) rotate(360deg);
        opacity: 0;
    }
}

/* Luxury Sheen Sweep */
.logo-sheen {
    position: absolute;
    top: 0;
    left: -150%;
    width: 50%;
    height: 100%;
    background: linear-gradient(to right,
            rgba(255, 255, 255, 0) 0%,
            rgba(255, 255, 255, 0.4) 50%,
            rgba(255, 255, 255, 0) 100%);
    transform: skewX(-25deg);
    animation: sheen-sweep 6s infinite ease-in-out;
    z-index: 10;
    pointer-events: none;
}

@keyframes sheen-sweep {

    0%,
    40% {
        left: -150%;
    }

    50% {
        left: 150%;
    }

    /* Fast sweep */
    100% {
        left: 150%;
    }
}

/* Mobile Adjustments */
@media (max-width: 768px) {
    .logo-inner {
        width: 100px;
        height: 100px;
    }

    .logo-inner img {
        height: 60px !important;
    }
}

/* Fees Table Styles */
.fees-table {
    width: 100%;
    border-collapse: collapse;
    color: #ffffff;
    font-size: 1rem;
}

.fees-table th,
.fees-table td {
    padding: 1.2rem;
    text-align: left;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.fees-table th {
    background: rgba(64, 0, 77, 0.4);
    color: var(--accent-color);
    text-transform: uppercase;
    font-size: 0.85rem;
    letter-spacing: 0.05em;
    font-weight: 700;
}

.table-group-header td {
    background: rgba(255, 255, 255, 0.05);
    font-weight: 700;
    color: var(--accent-color);
    font-size: 1.1rem;
    padding-top: 2rem;
}

.table-total-row td {
    background: rgba(64, 0, 77, 0.1);
    font-weight: 700;
}

.table-session-total td {
    background: var(--accent-color);
    color: #ffffff;
    font-weight: 800;
    font-size: 1.2rem;
}

@media (max-width: 768px) {
    .fees-table {
        font-size: 0.85rem;
    }

    .fees-table th,
    .fees-table td {
        padding: 0.8rem;
    }
}

/* === TABLET OPTIMIZATIONS (768px - 1024px) === */
@media (min-width: 769px) and (max-width: 1024px) {
    .container {
        padding: 0 4rem;
    }

    .hero-content {
        max-width: 85%;
    }

    .bento-grid {
        grid-template-columns: repeat(2, 1fr) !important;
        gap: 1.5rem !important;
    }

    .footer-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 3rem;
    }

    .nav-container {
        padding: 0 2rem;
    }
}

/* === LARGE SCREEN REFINEMENT (1400px+) === */
@media (min-width: 1400px) {
    .container {
        max-width: 1300px;
    }

    body {
        font-size: 1.1rem;
    }
}

/* --- Mobile Responsiveness Overhaul (Vaatia Elite Edition) --- */
@media (max-width: 768px) {
    :root {
        --container-padding: 1.25rem;
    }

    .hero h1 {
        font-size: clamp(2.5rem, 10vw, 3.8rem) !important;
        line-height: 1.05;
        letter-spacing: -0.02em;
    }

    .hero p {
        font-size: 1.1rem !important;
        line-height: 1.5;
        max-width: 100%;
        margin-bottom: 2.5rem;
    }

    .btn-group {
        gap: 0.8rem;
    }

    .btn {
        padding: 0.9rem 1.8rem;
        font-size: 0.95rem;
    }

    section {
        padding: 4rem 0 !important;
    }

    .section-header h2 {
        font-size: 2.2rem !important;
    }

    /* Bento Grid Mobile Refinement */
    .bento-grid {
        grid-template-columns: 1fr !important;
        grid-template-rows: auto !important;
        gap: 1.25rem !important;
    }

    .bento-item {
        height: 280px !important;
        border-radius: 25px !important;
        grid-column: span 1 !important;
    }

    .bento-content {
        padding: 1.5rem !important;
    }

    .bento-content h3 {
        font-size: 1.3rem !important;
    }

    /* Footer Mobile Refinement */
    footer {
        padding: 4rem 0 2rem !important;
    }

    .footer-grid {
        display: flex !important;
        flex-direction: column !important;
        gap: 2.5rem !important;
        text-align: center;
    }

    .footer-brand p {
        margin: 0 auto;
    }

    .footer-brand h2 {
        font-size: 1.8rem !important;
    }

    .footer-bottom {
        padding-top: 1.5rem !important;
        font-size: 0.8rem;
    }

    .social-links {
        justify-content: center;
    }
}

/* Extreme Mobile Optimization */
@media (max-width: 420px) {
    .hero h1 {
        font-size: clamp(2.2rem, 12vw, 2.8rem) !important;
    }

    .hero-content {
        padding-top: 140px !important;
    }

    .btn-group {
        width: 100%;
        max-width: 100%;
    }

    .btn {
        width: 100%;
        padding: 0.8rem 1.5rem;
    }
}

/* Fees Table Enhancements */
.fees-table th,
.fees-table td {
    color: #ffffff !important;
    /* Force white text */
}

.fees-table th:first-child,
.fees-table td:first-child {
    position: sticky;
    left: 0;
    z-index: 2;
    /* Match the navbar scrolled style: semi-transparent glass */
    background-color: rgba(255, 255, 255, 0.05);
    backdrop-filter: blur(15px) saturate(180%);
    -webkit-backdrop-filter: blur(15px) saturate(180%);
    border-right: 1px solid rgba(255, 255, 255, 0.08);
}

/* Fade zone: texts blur and fade as they approach the sticky column */
.fees-table th:first-child::after,
.fees-table td:first-child::after {
    content: '';
    position: absolute;
    top: 0;
    right: -40px;
    /* Wider transition zone */
    width: 40px;
    height: 100%;
    /* Multi-stop gradient for smoother "liquid" fade */
    background: linear-gradient(to right,
            rgba(5, 5, 5, 0.95) 0%,
            rgba(5, 5, 5, 0.5) 50%,
            transparent 100%);
    pointer-events: none;
    z-index: 1;
}

/* Horizontal scroll fade mask on the table container */
.table-responsive {
    -webkit-mask-image: linear-gradient(to right,
            black 0%,
            black 25%,
            black 90%,
            transparent 100%);
    mask-image: linear-gradient(to right,
            black 0%,
            black 25%,
            black 90%,
            transparent 100%);
}

/* Custom "Classy" Scrollbar for Tables */
.table-responsive::-webkit-scrollbar {
    height: 6px;
    /* Slim height for horizontal scroll */
    width: 6px;
}

.table-responsive::-webkit-scrollbar-track {
    background: rgba(255, 255, 255, 0.02);
    border-radius: 10px;
}

.table-responsive::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 0.2);
    border-radius: 10px;
    backdrop-filter: blur(5px);
    border: 1px solid rgba(255, 255, 255, 0.05);
    transition: background 0.3s ease;
}

.table-responsive::-webkit-scrollbar-thumb:hover {
    background: rgba(255, 255, 255, 0.4);
}

.fees-table th:first-child {
    z-index: 3;
    /* Higher than body cells */
}

/* Ensure background is not white */
.bg-glass,
.section,
.glass-card {
    background-color: transparent !important;
    /* Reset potential white patches */
}

/* === MOBILE PERFORMANCE OVERRIDE === */
@media (max-width: 768px) {

    .glass-card,
    .navbar.scrolled,
    .dropdown-menu,
    .liquid-modal,
    .stat-circle,
    .fees-table th:first-child,
    .fees-table td:first-child {
        backdrop-filter: blur(10px) !important;
        -webkit-backdrop-filter: blur(10px) !important;
    }

    .blob {
        filter: blur(60px);
        opacity: 0.25;
    }

    .hero::before {
        animation: none;
    }
}

/* Students Page Slideshow Layout - Controlled via grid now */
@media (max-width: 992px) {
    .student-slideshow {
        width: 100% !important;
    }
}

.student-slideshow {
    width: 100% !important;
}

/* ===================================================
   RESPONSIVE ENHANCEMENTS — Pure Additive Media Rules
   No existing styles are changed below this line.
   =================================================== */

/* ── TABLET (769px – 1024px) ─────────────────────── */
@media (min-width: 769px) and (max-width: 1024px) {

    section {
        padding: 4rem 0;
    }

    .section-title {
        font-size: 2.4rem;
        margin-bottom: 3rem;
    }

    /* Secondary + slideshow heroes are overly tall on tablets */
    .secondary-hero {
        min-height: 45vh !important;
    }

    .slideshow-hero {
        min-height: 60vh !important;
    }

    /* Stats circular row — shrink circles a touch on narrow tablets */
    .stat-circle {
        width: 170px;
        height: 170px;
    }

    /* House gallery gets breathing room */
    .house-gallery-container {
        padding: 0 1.5rem;
    }

    /* Boarding / community rules grid: 2-col on tablet */
    .boarding-grid,
    .community-rules-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    /* Requirements grid: 2-col on tablet */
    .requirements-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    /* Testimonials: 2-col on tablet */
    .testimonials-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

/* ── MOBILE (≤768px) — supplementary fixes ──────── */
@media (max-width: 768px) {

    /* Section vertical breathing room */
    section {
        padding: 3.5rem 0;
    }

    /* Section title scale */
    .section-title {
        font-size: 1.9rem;
        margin-bottom: 2.5rem;
    }

    /* Subtitle */
    .section-subtitle {
        font-size: 1rem;
        margin-bottom: 2rem;
    }

    /* Stats dashboard overall padding */
    #global-stats-dashboard {
        padding: 4rem 0;
    }

    .stats-group {
        margin-bottom: 3rem;
    }

    /* Stat items (square highlights) — avoid wide overflow */
    .stat-item {
        padding: 2rem 1rem;
    }

    .stat-item h2 {
        font-size: 2.5rem;
    }

    /* Split layout: always single column on mobile */
    .split-layout,
    .split-layout.reverse {
        grid-template-columns: 1fr;
        gap: 2rem;
    }

    /* House gallery side padding so it doesn't bleed edge-to-edge */
    .house-gallery-container {
        padding: 0 1rem;
        margin-top: 2rem;
    }

    /* Boarding / community grids stack to single column */
    .boarding-grid,
    .community-rules-grid {
        grid-template-columns: 1fr;
    }

    /* liquid list — tighten left-pad on mobile */
    .liquid-list li {
        padding-left: 1.5rem;
        font-size: 0.95rem;
    }

    /* Marquee vertical height — too tall on phones */
    .marquee-content {
        height: 320px;
    }

    /* Footer — 2-col between 481px and 768px */
    .footer-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 2rem;
    }
}

/* footer: restore single column below 480px */
@media (max-width: 480px) {
    .footer-grid {
        grid-template-columns: 1fr !important;
        text-align: center;
        gap: 2.5rem !important;
    }

    .footer-brand p {
        margin: 0 auto;
    }

    .social-links {
        justify-content: center;
    }
}

/* ── SMALL PHONES (≤480px) ───────────────────────── */
@media (max-width: 480px) {

    section {
        padding: 3rem 0;
    }

    .section-title {
        font-size: 1.7rem;
        margin-bottom: 2rem;
    }

    .section-subtitle {
        font-size: 0.95rem;
    }

    /* Glass cards — tighten padding so content breathes */
    .glass-card {
        padding: 1.8rem;
        border-radius: 22px;
    }

    .glass-card h3 {
        font-size: 1.25rem;
    }

    .glass-card p {
        font-size: 1rem;
    }

    /* Stats items — keep readable minimum */
    .stat-item {
        padding: 1.8rem 1rem;
        min-width: 140px;
    }

    .stat-item h2 {
        font-size: 2.2rem;
    }

    .stat-item p {
        font-size: 0.8rem;
    }

    /* Requirements grid — collapse min-width */
    .requirements-grid {
        grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    }

    .requirements-grid.compact-grid {
        grid-template-columns: 1fr;
    }

    /* Boarding / community rules — shrink minmax */
    .boarding-grid,
    .community-rules-grid {
        grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
    }

    /* Testimonial cards — reduce padding */
    .testimonial-card {
        padding: 1.8rem;
        border-radius: 25px;
    }

    .testimonial-text {
        font-size: 1rem;
    }

    /* Marquee is much too tall on small phones */
    .marquee-content {
        height: 260px;
    }

    /* Liquid list */
    .liquid-list li {
        padding-left: 1.2rem;
        font-size: 0.9rem;
        margin-bottom: 0.9rem;
    }

    /* Stats group spacing */
    #global-stats-dashboard {
        padding: 3rem 0;
    }

    .stats-group {
        margin-bottom: 2rem;
    }
}

/* ── MICRO SCREENS (≤360px) ─────────────────────── */
@media (max-width: 360px) {

    /* Collapse any 2-col grids that are still too wide */
    .boarding-grid,
    .community-rules-grid,
    .requirements-grid,
    .testimonials-grid {
        grid-template-columns: 1fr !important;
    }

    .glass-card {
        padding: 1.5rem;
    }

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

    .stat-item {
        min-width: 130px;
    }

    /* House cards on micro screens */
    .house-grid {
        grid-template-columns: 1fr !important;
    }
}

/* ===================================================
   MOBILE IMAGE QUALITY & LOAD SPEED FIXES
   Removes CSS-blur sources that make photos look soft
   on mobile. Purely additive — no existing rules changed.
   =================================================== */

@media (max-width: 768px) {

    /* 1. Hero overlay: remove the 2px backdrop blur that softens the hero photo */
    .hero-overlay {
        backdrop-filter: brightness(0.8) !important;
        -webkit-backdrop-filter: brightness(0.8) !important;
    }

    /* 2. Bento slideshow non-active images: drop the blur(2px) filter —
          images are already dimmed by brightness; the blur is purely cosmetic
          but looks bad on low-DPI mobile screens */
    .bento-slideshow .slideshow-inner img {
        filter: brightness(0.65) !important;
    }

    .bento-slideshow .slideshow-inner img.active {
        filter: brightness(0.7) !important;
        transform: scale(1.05);
    }

    /* 3. Glass cards: keep the glass effect but remove the blur from
          backdrop-filter so the actual image content inside stays crisp.
          The glass border + background colour is enough on mobile. */
    .glass-card {
        backdrop-filter: saturate(180%) !important;
        -webkit-backdrop-filter: saturate(180%) !important;
    }

    /* 4. Slideshow side-cards (prev/next) — drop their blur filter;
          they look fine with just the opacity + brightness reduction */
    .slideshow-hero .slide.prev,
    .slideshow-hero .slide.next,
    .house-gallery .slide.prev,
    .house-gallery .slide.next {
        filter: brightness(0.8) !important;
    }

    /* 5. Force GPU compositing on all content images for crisp rendering */
    img {
        transform: translateZ(0);
        backface-visibility: hidden;
        -webkit-backface-visibility: hidden;
        image-rendering: -webkit-optimize-contrast;
    }
}

/* ===================================================
   UTILITY CLASSES (Missing previously)
   =================================================== */
.mt-1 {
    margin-top: 0.5rem !important;
}

.mt-2 {
    margin-top: 1rem !important;
}

.mt-3 {
    margin-top: 1.5rem !important;
}

.mt-4 {
    margin-top: 2rem !important;
}

.mt-5 {
    margin-top: 3rem !important;
}

.mb-1 {
    margin-bottom: 0.5rem !important;
}

.mb-2 {
    margin-bottom: 1rem !important;
}

.mb-3 {
    margin-bottom: 1.5rem !important;
}

.mb-4 {
    margin-bottom: 2rem !important;
}

.mb-5 {
    margin-bottom: 3rem !important;
}

.p-1 {
    padding: 0.5rem !important;
}

.p-2 {
    padding: 1rem !important;
}

.p-3 {
    padding: 1.5rem !important;
}

.p-4 {
    padding: 2.0rem !important;
}

.p-5 {
    padding: 3.0rem !important;
}

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

@media (max-width: 480px) {

    /* Completely strip backdrop-filter blur from hero overlay on small phones */
    .hero-overlay {
        backdrop-filter: brightness(0.75) !important;
        -webkit-backdrop-filter: brightness(0.75) !important;
    }

    /* Remove any remaining blur filters on carousel slides */
    .slide.prev,
    .slide.next {
        filter: brightness(0.6) !important;
    }
}