:root {
    --primary-color: #1E3A8A;
    --primary-light: #3B82F6;
    --secondary-color: #F8FAFC;
    --accent-color: #F97316;
    --text-dark: #0F172A;
    --text-muted: #64748B;
    --white: #FFFFFF;
    --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    --font-heading: 'Outfit', sans-serif;
    --font-body: 'Outfit', sans-serif;
    --shadow-sm: 0 2px 4px rgba(0, 0, 0, 0.05);
    --shadow-md: 0 10px 15px -3px rgba(0, 0, 0, 0.1);
    --shadow-lg: 0 20px 25px -5px rgba(0, 0, 0, 0.1);
}

/* Reset & Global Alignment */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: var(--font-body);
    color: var(--text-dark);
    background-color: var(--white);
    line-height: 1.6;
    overflow-x: hidden;
    width: 100%;
    min-height: 100vh;
}

/* Responsive Fluid Containers - Optimized for all screens */
.container-fluid {
    width: 100% !important;
    padding-left: 1rem !important;
    padding-right: 1rem !important;
    margin: 0 !important;
}

@media (min-width: 992px) {
    .container-fluid {
        padding-left: 1.5rem !important;
        padding-right: 2rem !important;
    }
}

@media (min-width: 1400px) {
    .container-fluid {
        padding-left: 1.5rem !important;
        padding-right: 2.8rem !important;
    }
}

h1,
h2,
h3,
h4,
h5,
h6 {
    font-family: var(--font-heading);
    font-weight: 700;
}

/* Base Utilities */
.text-primary {
    color: var(--primary-color) !important;
}

.bg-primary {
    background-color: var(--primary-color) !important;
}

.text-accent {
    color: var(--accent-color) !important;
}

.bg-accent {
    background-color: var(--accent-color) !important;
}

.py-header {
    padding-top: 60px;
    padding-bottom: 60px;
}

@media (min-width: 992px) {
    .py-header {
        padding-top: 100px;
        padding-bottom: 100px;
    }
}

.glass-card {
    background: rgba(255, 255, 255, 0.9);
    backdrop-filter: blur(12px);
    border: 1px solid rgba(255, 255, 255, 0.5);
    box-shadow: var(--shadow-md);
}

.text-gradient {
    background: linear-gradient(135deg, var(--primary-color), var(--primary-light));
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
}

/* Navbar Enhancements */
.navbar {
    padding: 0;
    transition: var(--transition);
    background: var(--white);
    width: 100%;
}

/* Custom Animated Hamburger */
.custom-toggler {
    width: 40px;
    height: 40px;
    position: relative;
    cursor: pointer;
    background: #f1f5f9 !important;
    border-radius: 12px !important;
    transition: var(--transition);
    display: flex;
    align-items: center;
    justify-content: center;
}

.custom-toggler:hover {
    background: #e2e8f0 !important;
}

.toggler-icon {
    width: 20px;
    height: 14px;
    position: relative;
}

.toggler-icon span {
    display: block;
    position: absolute;
    height: 2px;
    width: 100%;
    background: var(--primary-color);
    border-radius: 4px;
    transition: .25s ease-in-out;
}

.toggler-icon span:nth-child(1) {
    top: 0;
}

.toggler-icon span:nth-child(2) {
    top: 6px;
    width: 70%;
    right: 0;
}

.toggler-icon span:nth-child(3) {
    top: 12px;
}

.navbar-toggler:not(.collapsed) .toggler-icon span:nth-child(1) {
    top: 6px;
    transform: rotate(135deg);
}

.navbar-toggler:not(.collapsed) .toggler-icon span:nth-child(2) {
    opacity: 0;
    right: -20px;
}

.navbar-toggler:not(.collapsed) .toggler-icon span:nth-child(3) {
    top: 6px;
    transform: rotate(-135deg);
}

/* Mobile Language Bar */
.bg-light-subtle {
    background-color: #f8fafc !important;
}

.lang-mobile-bar {
    animation: fadeInDown 0.4s ease;
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    z-index: 1020;
    position: relative;
}

.dropdown-menu-center {
    left: 50% !important;
    right: auto !important;
    transform: translateX(-50%) !important;
}

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

.navbar.scrolled {
    padding: 0.6rem 0;
    box-shadow: var(--shadow-sm);
}

.navbar-brand {
    display: flex;
    align-items: center;
    gap: 12px;
}

.brand-logo {
    width: 40px;
    height: 40px;
    object-fit: cover;
    border-radius: 8px;
}

@media (min-width: 992px) {
    .brand-logo {
        width: 48px;
        height: 48px;
    }
}

.brand-text {
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.brand-text span {
    font-size: 1.15rem;
    letter-spacing: 0.2px;
    line-height: 0.9;
}

.brand-text small {
    font-size: 0.65rem;
    letter-spacing: 1px;
    margin-top: -2px;
}

.nav-link {
    font-weight: 500;
    color: var(--text-dark) !important;
    padding: 0.5rem 1rem !important;
    position: relative;
    transition: var(--transition);
}

.nav-link::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 1rem;
    right: 1rem;
    height: 2px;
    background: var(--primary-color);
    transform: scaleX(0);
    transition: var(--transition);
}

.nav-link.active::after,
.nav-link:hover::after {
    transform: scaleX(1);
}

/* Hero Section - Fully Responsive Refactor */
.hero-section {
    min-height: auto;
    background: var(--white);
    overflow: hidden;
    width: 100%;
    padding-top: 10px;
}

@media (min-width: 992px) {
    .hero-section {
        min-height: 75vh;
        background: radial-gradient(circle at 80% 20%, rgba(59, 130, 246, 0.05) 0%, transparent 40%),
            radial-gradient(circle at 10% 80%, rgba(30, 58, 138, 0.03) 0%, transparent 40%),
            #ffffff;
        display: flex;
        align-items: center;
        padding-top: 0;
        position: relative;
    }

    .hero-section::before {
        content: '';
        position: absolute;
        top: 10%;
        right: -5%;
        width: 400px;
        height: 400px;
        background: var(--primary-light);
        filter: blur(150px);
        opacity: 0.08;
        border-radius: 50%;
        z-index: 0;
    }
}

/* Hero Column Centering */
.hero-content {
    padding-bottom: 2rem;
}

@media (min-width: 992px) {
    .hero-content {
        padding-bottom: 0;
        padding-right: 4rem;
    }
}

/* Button Consistency & Centering */
.hero-btns {
    width: 100%;
}

.hero-btns .btn {
    padding: 14px 48px;
    font-weight: 600;
    font-size: 1.1rem;
    min-width: 220px;
    border-radius: 100px;
    transition: var(--transition);
}

.btn-primary {
    background-color: var(--primary-light) !important;
    border-color: var(--primary-light) !important;
}

.btn-outline-primary {
    color: var(--primary-light) !important;
    border-color: var(--primary-light) !important;
}

/* Hero Image Wrapper */
.hero-img-wrapper {
    position: relative;
    width: 100%;
    margin-bottom: 1.5rem;
}

@media (min-width: 992px) {
    .hero-img-wrapper {
        border-radius: 40px;
        margin-left: 20px;
    }
}

.hero-main-img {
    width: 100%;
    height: auto;
    max-height: 480px;
    object-fit: cover;
    border-radius: 30px;
    box-shadow: var(--shadow-md);
}

@media (min-width: 992px) {
    .hero-main-img {
        max-height: 520px;
        border-radius: 40px;
        transform: perspective(1000px) rotateY(-5deg);
        box-shadow: 20px 20px 60px rgba(0, 0, 0, 0.1);
    }
}

/* Stat Card - Positioned Overlapping Image */
.stat-card-inline {
    min-width: 220px;
    background: rgba(255, 255, 255, 0.95) !important;
    border: 1px solid rgba(255, 255, 255, 0.3) !important;
    box-shadow: 0 15px 35px rgba(0, 0, 0, 0.1) !important;
    backdrop-filter: blur(10px);
    transition: var(--transition);
}

@media (min-width: 992px) {
    .stat-card-inline {
        position: absolute;
        bottom: 10%;
        left: -5%;
        z-index: 10;
        transform: perspective(1000px) rotateY(10deg);
    }

    .stat-card-inline:hover {
        transform: perspective(1000px) rotateY(10deg) translateY(-10px);
    }
}

.stat-card-inline:hover {
    box-shadow: 0 20px 45px rgba(0, 0, 0, 0.15) !important;
}

/* Gallery Styles */
.gallery-item {
    position: relative;
    cursor: pointer;
    background: #f1f5f9;
}

.gallery-item img {
    transition: var(--transition);
    width: 100%;
    height: 250px;
    object-fit: cover;
}

.gallery-overlay {
    position: absolute;
    inset: 0;
    background: rgba(30, 58, 138, 0.7);
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: var(--transition);
}

.gallery-item:hover .gallery-overlay {
    opacity: 1;
}

.gallery-item:hover img {
    transform: scale(1.1);
}

/* Enhanced Footer Styles */
.footer-enhanced {
    background: linear-gradient(135deg, #0f172a 0%, #1e293b 100%) !important;
    position: relative;
    overflow: hidden;
}

.footer-brand-area {
    position: relative;
    display: inline-block;
}

.footer-underline {
    width: 30px;
    height: 3px;
    background: var(--primary-light);
    border-radius: 10px;
    margin-top: 5px;
    transition: width 0.3s ease;
}

.footer-enhanced:hover .footer-underline {
    width: 60px;
}

.social-link {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.05);
    display: flex;
    align-items: center;
    justify-content: center;
    color: rgba(255, 255, 255, 0.6);
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    text-decoration: none;
}

.social-link:hover {
    color: white;
    transform: translateY(-5px) rotate(360deg);
}

.social-link.facebook:hover {
    background: #1877F2;
}

.social-link.twitter:hover {
    background: #1DA1F2;
}

.social-link.instagram:hover {
    background: radial-gradient(circle at 30% 107%, #fdf497 0%, #fdf497 5%, #fd5949 45%, #d6249f 60%, #285AEB 90%);
}

.social-link.youtube:hover {
    background: #FF0000;
}

.footer-contact-list span {
    transition: color 0.3s ease;
}

.footer-contact-list li:hover span {
    color: white;
}

.contact-icon-box {
    width: 32px;
    height: 32px;
    background: rgba(59, 130, 246, 0.1);
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
}

.footer-contact-list li:hover .contact-icon-box {
    background: var(--primary-light);
}

.footer-contact-list li:hover .contact-icon-box i {
    color: white !important;
}

.footer-link {
    color: rgba(255, 255, 255, 0.5);
    text-decoration: none;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: flex-end;
}

@media (max-width: 991.98px) {
    .footer-link {
        justify-content: center;
    }
}

.footer-link:hover {
    color: white;
    transform: translateX(-5px);
}

@media (max-width: 991.98px) {
    .footer-link:hover {
        transform: translateY(-3px);
    }
}

.footer-link .smaller {
    font-size: 0.7rem;
    opacity: 0;
    transition: all 0.3s ease;
}

.footer-link:hover .smaller {
    opacity: 1;
    margin-left: 8px !important;
}

/* Premium Gallery & Lightbox */
.gallery-filters {
    display: flex;
    justify-content: center;
    gap: 15px;
    margin-bottom: 40px;
    flex-wrap: wrap;
}

.filter-btn {
    padding: 10px 25px;
    border-radius: 50px;
    border: 1px solid rgba(0, 0, 0, 0.05);
    background: white;
    font-weight: 600;
    font-size: 0.9rem;
    color: var(--text-muted);
    transition: all 0.3s ease;
    cursor: pointer;
}

.filter-btn.active,
.filter-btn:hover {
    background: var(--primary-color);
    color: white;
    border-color: var(--primary-color);
    box-shadow: 0 10px 20px rgba(59, 130, 246, 0.2);
    transform: translateY(-2px);
}

.gallery-grid {
    column-count: 3;
    column-gap: 24px;
}

@media (max-width: 991.98px) {
    .gallery-grid {
        column-count: 2;
    }
}

@media (max-width: 575.98px) {
    .gallery-grid {
        column-count: 1;
    }
}

.gallery-card {
    break-inside: avoid;
    margin-bottom: 24px;
    position: relative;
    border-radius: 20px;
    overflow: hidden;
    cursor: pointer;
    background: #f8fafc;
    transition: all 0.4s cubic-bezier(0.165, 0.84, 0.44, 1);
    animation: revealUp 0.6s ease forwards;
}

@keyframes revealUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }

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

.gallery-card img {
    width: 100%;
    display: block;
    transition: transform 0.6s ease;
}

.gallery-card:hover img {
    transform: scale(1.05);
}

.gallery-info {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    padding: 25px;
    background: linear-gradient(to top, rgba(15, 23, 42, 0.9) 0%, transparent 100%);
    color: white;
    opacity: 0;
    transform: translateY(20px);
    transition: all 0.4s ease;
}

.gallery-card:hover .gallery-info {
    opacity: 1;
    transform: translateY(0);
}

/* Lightbox Premium Style */
.lightbox-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(15, 23, 42, 0.98);
    z-index: 10000;
    display: none;
    align-items: center;
    justify-content: center;
    backdrop-filter: blur(10px);
    opacity: 0;
    transition: opacity 0.3s ease;
}

.lightbox-modal.show {
    display: flex;
    opacity: 1;
}

.lightbox-content {
    max-width: 90%;
    max-height: 85%;
    position: relative;
}

.lightbox-content img {
    max-width: 100%;
    max-height: 85vh;
    border-radius: 12px;
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.5);
    transform: scale(0.95);
    transition: transform 0.4s cubic-bezier(0.165, 0.84, 0.44, 1);
}

.lightbox-modal.show img {
    transform: scale(1);
}

.lightbox-close {
    position: absolute;
    top: -50px;
    right: 0;
    color: white;
    font-size: 2rem;
    cursor: pointer;
    transition: transform 0.3s ease;
}

.lightbox-close:hover {
    transform: rotate(90deg);
}

.lightbox-caption {
    color: white;
    text-align: center;
    margin-top: 20px;
}

/* Back to Top Button */
.back-to-top {
    position: fixed;
    bottom: 30px;
    right: 30px;
    width: 45px;
    height: 45px;
    border-radius: 50%;
    background: var(--primary-color);
    color: white;
    border: none;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    box-shadow: var(--shadow-lg);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    z-index: 999;
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
    transform: scale(0.8);
}

.back-to-top.visible {
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
    transform: scale(1);
}

.back-to-top:hover {
    background: var(--accent-color);
    transform: translateY(-5px) scale(1.1);
}

/* Footer Alignment Fix */
footer {
    width: 100%;
}

/* Section Titles & Transitions */
.section-title {
    margin-bottom: 50px;
}

.section-title .underline {
    width: 50px;
    height: 4px;
    background: var(--accent-color);
    margin: 15px 0;
    border-radius: 10px;
}

/* Silk-Smooth Hover Effects - Fixed Conflicts */
.hover-up {
    transition: transform 0.4s cubic-bezier(0.165, 0.84, 0.44, 1),
        box-shadow 0.4s cubic-bezier(0.165, 0.84, 0.44, 1);
    will-change: transform;
    position: relative;
    z-index: 1;
}

.hover-up:hover {
    transform: translateY(-8px);
    box-shadow: 0 15px 35px rgba(0, 0, 0, 0.08) !important;
    z-index: 5;
    /* Ensures card stays above lower elements but avoids section leaks */
}

.village-tag {
    background: rgba(255, 255, 255, 0.1);
    padding: 8px 20px;
    border-radius: 100px;
    font-size: 0.9rem;
    transition: var(--transition);
}

.village-tag:hover {
    background: var(--primary-color);
    color: white;
}

/* Table Styles */
.custom-table {
    border-radius: 15px;
    overflow: hidden;
    border: 1px solid rgba(0, 0, 0, 0.05);
}

.custom-table th,
.custom-table td {
    padding: 1rem !important;
}

@media (min-width: 992px) {

    .custom-table th,
    .custom-table td {
        padding: 1.5rem 2rem !important;
    }
}

.table-responsive {
    border-radius: 15px;
    -webkit-overflow-scrolling: touch;
}

/* Pagination-like Page Transitions */
#page-content {
    opacity: 1;
    transition: opacity 0.4s ease;
}

#page-content.loading {
    opacity: 0;
}

/* Responsive Overrides */
@media (max-width: 991.98px) {
    .hero-section {
        text-align: left;
        padding-top: 20px;
    }

    .stat-floating {
        position: static;
        transform: none;
        margin-top: 20px;
    }

    .decor-icon {
        display: none;
    }
}