/* =========================================
   1. ROOT VARIABLES & THEME SETUP
   ========================================= */
:root {
    /* Brand Colors (from Palette) */
    --ng-saffron: #F28C28;
    --ng-deep-green: #1F5E3B;
    --ng-leaf-green: #6E8B3D;
    --ng-brick-red: #C94A3A;

    /* Secondary & Support */
    --ng-gold: #E6A23C;
    --ng-sand: #F6F1E8;
    --ng-olive: #8FA36A;
    --ng-white: #FFFFFF;

    /* Text & Neutrals */
    --ng-text-dark: #2B2B2B;
    --ng-text-grey: #6B6B6B;
    --ng-border: #E5E5E5;
    --ng-light-grey: #f8fafc;

    /* Typography Scale (Mobile First) */
    --font-heading: 'Tiro Devanagari Hindi', serif;
    --font-section: 'Tiro Devanagari Hindi', serif;
    --font-body: 'Noto Serif', serif;

    --text-xs: 0.75rem;
    --text-sm: 0.875rem;
    --text-base: 1rem;
    --text-lg: 1.125rem;
    --text-xl: 1.25rem;
    --text-2xl: 1.5rem;
    --text-3xl: 1.875rem;
    --text-4xl: 2.25rem;
    --text-display: 3rem;
}

@media (min-width: 768px) {
    :root {
        --text-display: 4.5rem;
        --text-4xl: 3rem;
    }
}

/* =========================================
   2. RESET & BASE STYLES
   ========================================= */
/* Sticky Header Transitions */
#branding-row {
    max-height: 200px;
    /* Enough for logo and content */
    opacity: 1;
    transform: scaleY(1);
    overflow: hidden;
}

/* Increased specificity to ensure override */
html body #main-header.scrolled #branding-row {
    display: none !important;
    height: 0 !important;
    max-height: 0 !important;
    overflow: hidden !important;
    padding: 0 !important;
    margin: 0 !important;
    border: none !important;
    opacity: 0 !important;
    pointer-events: none !important;
}

html {
    margin: 0;
    padding: 0;
    width: 100%;
    overflow-x: hidden;
}

html.lenis {
    height: auto;
}

.lenis.lenis-smooth {
    scroll-behavior: auto !important;
}

*,
*::before,
*::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

body {
    font-family: var(--font-body);
    color: var(--ng-text-dark);
    background-color: var(--ng-white);
    line-height: 1.6;
    overflow-x: hidden;
    margin: 0;
    padding: 0;
}

/* Typography Overrides */
h1,
h2,
h3,
h4,
h5,
h6,
.indic-text {
    font-family: var(--font-heading);
    line-height: 1.3;
}

.font-section {
    font-family: var(--font-section);
}

/* Selection Color */
::selection {
    background: var(--ng-saffron);
    color: white;
}

/* Section Spacing Override - Reduce vertical padding */
section.py-20 {
    padding-top: 3rem !important;
    padding-bottom: 3rem !important;
}

/* =========================================
   3. COMPONENTS & UI ELEMENTS
   ========================================= */

/* Language Toggle Logic */
body.show-hi .lang-mr {
    display: none !important;
}

body.show-mr .lang-hi {
    display: none !important;
}

.lang-btn {
    transition: all 0.3s ease;
}

.lang-btn.active {
    background-color: var(--ng-saffron);
    color: white;
    border-color: var(--ng-saffron);
}

/* Buttons */
.btn-primary {
    background-color: var(--ng-saffron);
    color: white;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.btn-primary:hover {
    background-color: #E07C18;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(242, 140, 40, 0.3);
}

.btn-secondary {
    background-color: var(--ng-deep-green);
    color: white;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.btn-secondary:hover {
    background-color: #17472C;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(31, 94, 59, 0.3);
}

/* Cards (Wellington Style) */
.wellington-card {
    position: relative;
    overflow: hidden;
    transition: all 0.5s ease;
    border-radius: 12px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.08);
}

.wellington-card::before {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(to top, rgba(0, 0, 0, 0.8) 0%, rgba(0, 0, 0, 0.1) 60%, transparent 100%);
    z-index: 10;
    opacity: 0.8;
    transition: opacity 0.5s ease;
}

.wellington-card:hover::before {
    opacity: 0.6;
}

/* Forms */
.form-input {
    width: 100%;
    padding: 0.875rem 1rem;
    border-radius: 0.5rem;
    border: 1px solid var(--ng-border);
    background-color: var(--ng-light-grey);
    outline: none;
    transition: all 0.2s ease;
}

.form-input:focus {
    border-color: var(--ng-deep-green);
    background-color: white;
    box-shadow: 0 0 0 4px rgba(31, 94, 59, 0.1);
}

/* Modals */
.modal {
    transition: opacity 0.4s cubic-bezier(0.16, 1, 0.3, 1), visibility 0.4s;
    opacity: 0;
    pointer-events: none;
    visibility: hidden;
    z-index: 99999 !important;
    /* Force top layer */
}

.modal.active {
    opacity: 1;
    pointer-events: auto;
    visibility: visible;
}

.modal-content {
    transform: scale(0.95) translateY(10px);
    transition: transform 0.4s cubic-bezier(0.16, 1, 0.3, 1);
}

.modal.active .modal-content {
    transform: scale(1) translateY(0);
}

/* =========================================
   4. ANIMATIONS & KEYFRAMES
   ========================================= */
@keyframes spin-slow {
    from {
        transform: rotate(0deg);
    }

    to {
        transform: rotate(360deg);
    }
}

.spin-slow {
    animation: spin-slow 60s linear infinite;
}

/* Hero Slider (Grid Based) */
.hero-slider-container {
    display: grid;
    /* Removed place-items: center to allow left alignment in 2-col layout */
    align-items: center;
}

.slide-text {
    grid-area: 1 / 1;
    width: 100%;
    opacity: 0;
    pointer-events: none;
    /* GSAP handles transform (y, scale, etc.) */
}

.slide-text.active {
    pointer-events: auto;
}

/* Custom Scrollbar */
.custom-scrollbar {
    scrollbar-width: thin;
    scrollbar-color: var(--ng-olive) #f1f1f1;
    overscroll-behavior: contain;
    /* Prevents scroll chaining */
}

.custom-scrollbar::-webkit-scrollbar {
    width: 12px;
    /* Increased width for better usability */
}

.custom-scrollbar::-webkit-scrollbar-track {
    background: #f1f1f1;
    border-radius: 6px;
}

.custom-scrollbar::-webkit-scrollbar-thumb {
    background-color: var(--ng-olive);
    border-radius: 6px;
    /* Rounder edges */
    border: 3px solid #f1f1f1;
    /* Creates a padding effect */
}

.custom-scrollbar::-webkit-scrollbar-thumb:hover {
    background-color: var(--ng-deep-green);
}

/* Global scrollbar fallback (optional, kept subtle) */
::-webkit-scrollbar {
    width: 8px;
}

::-webkit-scrollbar-track {
    background: transparent;
}

::-webkit-scrollbar-thumb {
    background: #ccc;
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: #999;
}

/* GLightbox Overrides */
.glightbox-container .goverlay {
    background: rgba(0, 0, 0, 0.9) !important;
    /* Deep dimming */
    backdrop-filter: blur(5px);
}

.gslide-media {
    box-shadow: 0 0 40px rgba(0, 0, 0, 0.6);
    /* Shadow for popout effect */
    border-radius: 12px;
    max-height: 80vh;
    max-width: 90vw;
}

@media (max-width: 900px) {
    .gslide-media {
        width: 90vw !important;
        max-width: 640px !important;
    }
}

/* Hero Slider Styles with Impressive Effects - Moved from index.html */
.hero-slide {
    display: none;
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    opacity: 0;
    transform: scale(1.1);
    transition: all 1s cubic-bezier(0.4, 0, 0.2, 1);
}

.hero-slide.active {
    display: block;
    position: relative;
    opacity: 1;
    transform: scale(1);
    animation: slideZoomIn 1s ease-out;
}

.hero-slide.fade-out {
    opacity: 0;
    transform: scale(0.95);
}

/* Slide Zoom In Animation */
@keyframes slideZoomIn {
    0% {
        opacity: 0;
        transform: scale(1.15) translateX(30px);
    }

    100% {
        opacity: 1;
        transform: scale(1) translateX(0);
    }
}

/* Image Hover Effect */
.hero-slide img {
    transition: transform 0.6s cubic-bezier(0.4, 0, 0.2, 1);
}

.hero-slide:hover img {
    transform: scale(1.05);
}

/* Dot Animation */
.hero-dot {
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

.hero-dot.active {
    background-color: white !important;
    width: 2rem;
    box-shadow: 0 0 10px rgba(255, 255, 255, 0.8);
}

.hero-dot:hover {
    transform: scale(1.2);
}

/* Arrow Button Effects */
.hero-arrow {
    transition: all 0.3s ease;
}

.hero-arrow:hover {
    transform: scale(1.1);
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.2);
}

/* Ken Burns Effect (subtle zoom on active slide) */
@keyframes kenBurns {
    0% {
        transform: scale(1);
    }

    100% {
        transform: scale(1.08);
    }
}

.hero-slide.active img {
    animation: kenBurns 8s ease-out forwards;
}

/* Slider Container */
#hero-slider {
    position: relative;
    overflow: hidden;
    transform: scale(1.2);
    /* Zoom effect from original CSS */
    transform-origin: center;
    padding: 1.5rem;
    border: 4px solid transparent;
    background: linear-gradient(white, white) padding-box,
        linear-gradient(135deg, #F28C28, #1F5E3B, #C94A3A) border-box;
    border-radius: 1.5rem;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.15);
}

#hero-slider::before {
    content: '';
    position: absolute;
    inset: -2px;
    border-radius: 1.5rem;
    padding: 2px;
    background: linear-gradient(135deg, #F28C28, #1F5E3B, #C94A3A);
    -webkit-mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
    -webkit-mask-composite: xor;
    mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
    mask-composite: exclude;
    opacity: 0.6;
    animation: borderGlow 3s ease-in-out infinite;
}

@keyframes borderGlow {

    0%,
    100% {
        opacity: 0.6;
    }

    50% {
        opacity: 1;
    }
}

/* Building Slider CSS */
.building-slide {
    display: none;
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    opacity: 0;
    transform: scale(1.1);
    transition: all 1s cubic-bezier(0.4, 0, 0.2, 1);
}

.building-slide.active {
    display: block;
    position: relative;
    opacity: 1;
    transform: scale(1);
    animation: slideZoomIn 1s ease-out;
}

.building-slide.active img {
    animation: kenBurns 8s ease-out forwards;
}

.building-dot.active {
    background-color: white !important;
    width: 2rem;
    box-shadow: 0 0 10px rgba(255, 255, 255, 0.8);
}

.building-dot:hover {
    transform: scale(1.2);
}

.building-arrow:hover {
    transform: scale(1.1);
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.2);
}