/* ===== GLOBAL STYLES ===== */
:root {
    --primary-color: #2563eb;
    --secondary-color: #64748b;
    --success-color: #059669;
    --info-color: #0891b2;
    --warning-color: #d97706;
    --danger-color: #dc2626;
    --dark-color: #1e293b;
    --light-color: #f8fafc;
    --white-color: #ffffff;
    --border-radius: 8px;
    --box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
    --transition: all 0.3s ease;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    line-height: 1.6;
    color: var(--dark-color);
    background-color: var(--white-color);
}

.container-fluid {
    padding-left: 15px;
    padding-right: 15px;
}

/* ===== HEADER STYLES ===== */
.top-bar {
    font-size: 0.875rem;
    background: linear-gradient(135deg, var(--primary-color), #3b82f6);
}

.social-links a {
    transition: var(--transition);
    padding: 0.25rem;
    border-radius: 50%;
}

.social-links a:hover {
    background-color: rgba(255, 255, 255, 0.2);
    transform: translateY(-2px);
}

.main-header {
    position: sticky;
    top: 0;
    z-index: 1000;
    background-color: var(--white-color) !important;
    border-bottom: 1px solid #e2e8f0;
}

.logo-img {
    width: 60px;
    height: 60px;
    object-fit: contain;
}

.navbar-nav .nav-link {
    font-weight: 500;
    padding: 0.75rem 1.25rem !important;
    border-radius: var(--border-radius);
    transition: var(--transition);
    position: relative;
    margin: 0 0.25rem;
    white-space: nowrap;
    display: flex;
    align-items: center;
    justify-content: center;
    min-width: fit-content;
}

.navbar-nav .nav-link:hover,
.navbar-nav .nav-link.active {
    color: var(--primary-color) !important;
    background-color: rgba(37, 99, 235, 0.1);
}

.navbar-nav .nav-link::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 50%;
    width: 0;
    height: 2px;
    background-color: var(--primary-color);
    transition: var(--transition);
    transform: translateX(-50%);
}

.navbar-nav .nav-link:hover::after,
.navbar-nav .nav-link.active::after {
    width: 80%;
}

/* ===== IMPROVED NAVIGATION SPACING ===== */
.navbar-nav {
    gap: 0.5rem;
    align-items: center;
    justify-content: flex-end;
    flex-wrap: nowrap;
}

.navbar-nav .nav-item {
    position: relative;
}

.navbar-nav .nav-item .nav-link {
    text-align: center;
    font-size: 0.95rem;
    letter-spacing: 0.025em;
    padding-left: 1rem !important;
    padding-right: 1rem !important;
}

.navbar-nav .nav-item .nav-link i {
    margin-right: 0.5rem;
    width: 16px;
    text-align: center;
}

/* Dropdown menu improvements */
.navbar-nav .dropdown-menu {
    margin-top: 0.5rem;
    min-width: 220px;
    animation: fadeInDown 0.3s ease;
}

@keyframes fadeInDown {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.navbar-nav .dropdown-item {
    padding: 0.75rem 1.25rem;
    font-size: 0.9rem;
    display: flex;
    align-items: center;
}

.navbar-nav .dropdown-item i {
    margin-right: 0.75rem;
    width: 18px;
    text-align: center;
    color: var(--primary-color);
}

/* Responsive navigation adjustments */
@media (max-width: 1200px) {
    .navbar-nav .nav-link {
        padding: 0.75rem 0.85rem !important;
        font-size: 0.9rem;
    }
}

@media (max-width: 992px) {
    .navbar-nav {
        gap: 0.25rem;
    }
    
    .navbar-nav .nav-link {
        padding: 0.65rem 0.75rem !important;
        font-size: 0.85rem;
    }
}

.dropdown-menu {
    border: none;
    box-shadow: var(--box-shadow);
    border-radius: var(--border-radius);
    padding: 0.5rem 0;
}

.dropdown-item {
    padding: 0.5rem 1rem;
    transition: var(--transition);
}

.dropdown-item:hover {
    background-color: var(--light-color);
    color: var(--primary-color);
}

/* ===== HERO SECTION ===== */
.hero-section {
    position: relative;
    overflow: hidden;
}

.hero-slide {
    height: 100vh;
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    position: relative;
    display: flex;
    align-items: center;
}

.hero-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(135deg, rgba(30, 41, 59, 0.8), rgba(37, 99, 235, 0.6));
}

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

.hero-buttons .btn {
    padding: 0.75rem 2rem;
    font-weight: 600;
    border-radius: 50px;
    transition: var(--transition);
}

.hero-buttons .btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.15);
}

.min-vh-75 {
    min-height: 75vh;
}

.carousel-control-prev,
.carousel-control-next {
    width: 5%;
}

.carousel-indicators button {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    margin: 0 4px;
}

/* ===== QUICK STATS ===== */
.quick-stats {
    background: linear-gradient(135deg, var(--primary-color), #3b82f6);
}

.stat-item {
    text-align: center;
    padding: 1rem;
}

.stat-icon {
    opacity: 0.8;
}

.stat-number {
    font-size: 2.5rem;
    font-weight: 700;
    margin-bottom: 0.5rem;
}

.stat-label {
    font-size: 1.1rem;
    opacity: 0.9;
    margin-bottom: 0;
}

/* ===== SECTION STYLES ===== */
.section-title {
    font-size: 2.5rem;
    font-weight: 700;
    color: var(--dark-color);
    margin-bottom: 1rem;
    position: relative;
}

.section-title::after {
    content: '';
    position: absolute;
    bottom: -10px;
    left: 50%;
    transform: translateX(-50%);
    width: 60px;
    height: 4px;
    background: linear-gradient(135deg, var(--primary-color), #3b82f6);
    border-radius: 2px;
}

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

/* ===== WELCOME MESSAGE STYLES ===== */
.welcome-message {
    background-color: var(--light-color);
    position: relative;
    overflow: hidden;
}

.welcome-message::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 100 100"><defs><pattern id="welcome-pattern" width="20" height="20" patternUnits="userSpaceOnUse"><circle cx="10" cy="10" r="1" fill="rgba(37,99,235,0.05)"/></pattern></defs><rect width="100" height="100" fill="url(%23welcome-pattern)"/></svg>');
    opacity: 0.5;
}

.welcome-photo-wrapper {
    position: relative;
    display: flex;
    justify-content: center;
    align-items: center;
}

.welcome-photo {
    width: 280px;
    height: 350px;
    object-fit: cover;
    border-radius: 20px;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.15);
    transition: var(--transition);
    border: 5px solid white;
}

.welcome-photo:hover {
    transform: scale(1.02);
    box-shadow: 0 25px 50px rgba(0, 0, 0, 0.2);
}

.welcome-photo-placeholder {
    width: 280px;
    height: 350px;
    background: linear-gradient(135deg, #f8fafc, #e2e8f0);
    border-radius: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.1);
    border: 5px solid white;
}

.welcome-badge {
    position: absolute;
    top: -10px;
    left: -10px;
    width: 60px;
    height: 60px;
    background: linear-gradient(135deg, var(--primary-color), #3b82f6);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 1.5rem;
    box-shadow: 0 8px 20px rgba(37, 99, 235, 0.3);
    animation: float 3s ease-in-out infinite;
}

@keyframes float {
    0%, 100% { transform: translateY(0px); }
    50% { transform: translateY(-10px); }
}

.welcome-content {
    position: relative;
    z-index: 2;
}

.welcome-header {
    margin-bottom: 2rem;
}

.welcome-title {
    font-size: 2.2rem;
    font-weight: 700;
    color: var(--dark-color);
    margin-bottom: 1rem;
    line-height: 1.3;
}

.welcome-divider {
    width: 80px;
    height: 4px;
    background: linear-gradient(135deg, var(--primary-color), #3b82f6);
    border-radius: 2px;
    margin-bottom: 0;
}

.welcome-text {
    font-size: 1.1rem;
    line-height: 1.8;
    color: var(--secondary-color);
    margin-bottom: 2rem;
    text-align: justify;
}

.welcome-text p {
    margin-bottom: 1rem;
}

.welcome-signature {
    position: relative;
    padding-top: 2rem;
}

.signature-line {
    width: 100%;
    height: 1px;
    background: linear-gradient(to right, var(--primary-color), transparent);
    margin-bottom: 1.5rem;
}

.signature-info {
    text-align: right;
}

.chief-name {
    font-size: 1.3rem;
    font-weight: 700;
    color: var(--dark-color);
    margin-bottom: 0.5rem;
    position: relative;
}

.chief-name::after {
    content: '';
    position: absolute;
    bottom: -5px;
    right: 0;
    width: 60px;
    height: 2px;
    background: var(--primary-color);
    border-radius: 1px;
}

.chief-position {
    font-size: 1rem;
    font-weight: 500;
    color: var(--secondary-color);
    margin-bottom: 0;
    font-style: italic;
}

/* Welcome Message Responsive */
@media (max-width: 992px) {
    .welcome-photo,
    .welcome-photo-placeholder {
        width: 240px;
        height: 300px;
    }
    
    .welcome-title {
        font-size: 2rem;
    }
    
    .welcome-text {
        font-size: 1rem;
    }
}

@media (max-width: 768px) {
    .welcome-message .row {
        text-align: center;
    }
    
    .welcome-photo,
    .welcome-photo-placeholder {
        width: 200px;
        height: 250px;
        margin: 0 auto;
    }
    
    .welcome-badge {
        top: -5px;
        left: 50%;
        transform: translateX(-50%);
        width: 50px;
        height: 50px;
        font-size: 1.2rem;
    }
    
    .welcome-title {
        font-size: 1.8rem;
        margin-top: 2rem;
    }
    
    .welcome-divider {
        margin: 0 auto 1rem;
    }
    
    .welcome-text {
        text-align: left;
        font-size: 0.95rem;
        line-height: 1.7;
    }
    
    .signature-info {
        text-align: center;
    }
    
    .chief-name::after {
        left: 50%;
        transform: translateX(-50%);
    }
}

@media (max-width: 576px) {
    .welcome-photo,
    .welcome-photo-placeholder {
        width: 180px;
        height: 220px;
    }
    
    .welcome-title {
        font-size: 1.6rem;
    }
    
    .welcome-text {
        font-size: 0.9rem;
        line-height: 1.6;
    }
    
    .chief-name {
        font-size: 1.1rem;
    }
    
    .chief-position {
        font-size: 0.9rem;
    }
}

/* ===== EXPLORE CARDS ===== */
.explore-card {
    background: var(--white-color);
    padding: 2rem;
    border-radius: var(--border-radius);
    box-shadow: var(--box-shadow);
    text-align: center;
    transition: var(--transition);
    border: 1px solid #e2e8f0;
}

.explore-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.15);
}

.explore-card .card-icon {
    font-size: 3rem;
    margin-bottom: 1.5rem;
}

.explore-card h5 {
    font-weight: 600;
    margin-bottom: 1rem;
    color: var(--dark-color);
}

.explore-card p {
    color: var(--secondary-color);
    margin-bottom: 1.5rem;
}

/* ===== SERVICE CARDS ===== */
.service-card {
    background: var(--white-color);
    padding: 2.5rem 2rem;
    border-radius: var(--border-radius);
    box-shadow: var(--box-shadow);
    text-align: center;
    transition: var(--transition);
    height: 100%;
    border: 1px solid #e2e8f0;
}

.service-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 15px 35px rgba(0, 0, 0, 0.1);
}

.service-icon {
    width: 80px;
    height: 80px;
    background: linear-gradient(135deg, var(--primary-color), #3b82f6);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 1.5rem;
    color: white;
    font-size: 2rem;
}

.service-card h5 {
    font-weight: 600;
    margin-bottom: 1rem;
    color: var(--dark-color);
}

.service-card p {
    color: var(--secondary-color);
    margin-bottom: 1.5rem;
}

/* ===== NEWS CARDS ===== */
.news-card {
    background: var(--white-color);
    border-radius: var(--border-radius);
    overflow: hidden;
    box-shadow: var(--box-shadow);
    transition: var(--transition);
    border: 1px solid #e2e8f0;
}

.news-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 15px 35px rgba(0, 0, 0, 0.1);
}

.news-image {
    position: relative;
    height: 200px;
    overflow: hidden;
}

.news-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: var(--transition);
}

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

.news-date {
    position: absolute;
    top: 1rem;
    right: 1rem;
    background: var(--primary-color);
    color: white;
    padding: 0.5rem;
    border-radius: var(--border-radius);
    text-align: center;
    min-width: 50px;
}

.news-date span {
    display: block;
    font-size: 1.2rem;
    font-weight: 700;
    line-height: 1;
}

.news-date small {
    font-size: 0.75rem;
    opacity: 0.9;
}

.news-content {
    padding: 1.5rem;
}

.news-meta {
    margin-bottom: 1rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.news-title a {
    color: var(--dark-color);
    text-decoration: none;
    font-weight: 600;
    transition: var(--transition);
}

.news-title a:hover {
    color: var(--primary-color);
}

.news-excerpt {
    color: var(--secondary-color);
    margin-bottom: 1rem;
    line-height: 1.6;
}

.news-footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding-top: 1rem;
    border-top: 1px solid #e2e8f0;
}

/* ===== POTENTIAL CARDS ===== */
.potential-card {
    background: var(--white-color);
    border-radius: var(--border-radius);
    overflow: hidden;
    box-shadow: var(--box-shadow);
    transition: var(--transition);
    border: 1px solid #e2e8f0;
}

.potential-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 15px 35px rgba(0, 0, 0, 0.1);
}

.potential-image {
    position: relative;
    height: 200px;
    overflow: hidden;
}

.potential-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: var(--transition);
}

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

.potential-type {
    position: absolute;
    top: 1rem;
    left: 1rem;
}

.potential-content {
    padding: 1.5rem;
}

.potential-category {
    margin-bottom: 0.5rem;
}

.potential-title a {
    color: var(--dark-color);
    text-decoration: none;
    font-weight: 600;
    transition: var(--transition);
}

.potential-title a:hover {
    color: var(--primary-color);
}

.potential-description {
    color: var(--secondary-color);
    margin-bottom: 1rem;
    line-height: 1.6;
}

.potential-location {
    padding-top: 1rem;
    border-top: 1px solid #e2e8f0;
}

/* ===== MASONRY GALLERY STYLES ===== */
.village-gallery {
    background-color: var(--light-color);
}

.gallery-masonry {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    grid-gap: 20px;
    grid-auto-rows: 200px;
    padding: 0;
}

/* Gallery Item Size Classes */
.gallery-item.gallery-large {
    grid-row-end: span 2;
    grid-column-end: span 2;
}

.gallery-item.gallery-wide {
    grid-column-end: span 2;
}

.gallery-item.gallery-tall {
    grid-row-end: span 2;
}

.gallery-item.gallery-medium {
    grid-row-end: span 1;
    grid-column-end: span 1;
}

.gallery-item.gallery-small {
    grid-row-end: span 1;
    grid-column-end: span 1;
}

.gallery-item {
    position: relative;
    overflow: hidden;
    border-radius: 15px;
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.1);
    transition: var(--transition);
    background: var(--white-color);
    cursor: pointer;
}

.gallery-item:hover {
    transform: translateY(-8px) scale(1.02);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.2);
}

.gallery-image-wrapper {
    position: relative;
    width: 100%;
    height: 100%;
    overflow: hidden;
    border-radius: 15px;
}

.gallery-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: var(--transition);
    cursor: pointer;
}

.gallery-item:hover .gallery-image {
    transform: scale(1.1);
    filter: brightness(0.8);
}

.gallery-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(135deg, 
        rgba(37, 99, 235, 0.9), 
        rgba(59, 130, 246, 0.7),
        rgba(147, 51, 234, 0.8)
    );
    opacity: 0;
    transition: var(--transition);
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 15px;
}

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

.gallery-overlay-content {
    text-align: center;
    color: white;
    padding: 1.5rem;
    transform: translateY(30px);
    transition: var(--transition);
}

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

.gallery-icon {
    margin-bottom: 1rem;
}

.gallery-icon i {
    font-size: 2.5rem;
    margin-bottom: 0.5rem;
    display: block;
    animation: bounce 2s infinite;
}

@keyframes bounce {
    0%, 20%, 50%, 80%, 100% {
        transform: translateY(0);
    }
    40% {
        transform: translateY(-10px);
    }
    60% {
        transform: translateY(-5px);
    }
}

.gallery-info h6 {
    font-size: 1.1rem;
    font-weight: 600;
    margin-bottom: 0.5rem;
    line-height: 1.4;
}

.gallery-subtitle {
    font-size: 0.9rem;
    opacity: 0.9;
    margin: 0;
}

/* Decorative Elements */
.gallery-decoration {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    pointer-events: none;
    opacity: 0;
    transition: var(--transition);
}

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

.gallery-corner {
    position: absolute;
    width: 20px;
    height: 20px;
    border: 2px solid rgba(255, 255, 255, 0.8);
}

.gallery-corner-tl {
    top: 10px;
    left: 10px;
    border-right: none;
    border-bottom: none;
}

.gallery-corner-br {
    bottom: 10px;
    right: 10px;
    border-left: none;
    border-top: none;
}

/* Gallery Stats */
.gallery-stats {
    margin-bottom: 2rem;
}

.gallery-stats .badge {
    font-size: 1rem;
    padding: 0.75rem 1.5rem;
    border-radius: 50px;
    box-shadow: 0 4px 15px rgba(37, 99, 235, 0.3);
}

/* Enhanced Lightbox */
#lightboxModal .modal-dialog {
    max-width: 90vw;
    margin: 1rem auto;
}

#lightboxModal .modal-content {
    background: rgba(0, 0, 0, 0.95) !important;
    border-radius: 15px;
    border: none;
}

#lightboxModal .modal-header {
    background: transparent;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    padding: 1.5rem 2rem 1rem;
}

#lightboxModal .modal-title {
    font-size: 1.3rem;
    font-weight: 600;
    color: white;
}

#lightboxModal .modal-body {
    padding: 2rem;
    max-height: 80vh;
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
}

#lightboxModal img {
    max-width: 100%;
    max-height: 70vh;
    object-fit: contain;
    border-radius: 10px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5);
}

.lightbox-navigation {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    width: 100%;
    display: flex;
    justify-content: space-between;
    padding: 0 2rem;
    pointer-events: none;
}

.lightbox-navigation .btn {
    pointer-events: all;
    width: 50px;
    height: 50px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(255, 255, 255, 0.9);
    border: none;
    color: var(--dark-color);
    font-size: 1.2rem;
    transition: var(--transition);
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
}

.lightbox-navigation .btn:hover {
    background: white;
    transform: scale(1.1);
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.3);
}

.lightbox-counter {
    position: absolute;
    bottom: 1rem;
    left: 50%;
    transform: translateX(-50%);
}

.lightbox-counter .badge {
    background: rgba(0, 0, 0, 0.7);
    color: white;
    padding: 0.5rem 1rem;
    border-radius: 20px;
    font-size: 0.9rem;
}

/* Responsive Gallery */
@media (max-width: 1200px) {
    .gallery-masonry {
        grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
        grid-auto-rows: 180px;
    }
    
    .gallery-item.gallery-large {
        grid-row-end: span 2;
        grid-column-end: span 2;
    }
}

@media (max-width: 992px) {
    .gallery-masonry {
        grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
        grid-auto-rows: 160px;
        grid-gap: 15px;
    }
    
    .gallery-item.gallery-large {
        grid-row-end: span 2;
        grid-column-end: span 1;
    }
    
    .gallery-item.gallery-wide {
        grid-column-end: span 1;
    }
}

@media (max-width: 768px) {
    .gallery-masonry {
        grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
        grid-auto-rows: 150px;
        grid-gap: 12px;
    }
    
    .gallery-item.gallery-large,
    .gallery-item.gallery-wide,
    .gallery-item.gallery-tall {
        grid-row-end: span 1;
        grid-column-end: span 1;
    }
    
    .gallery-overlay-content {
        padding: 1rem;
    }
    
    .gallery-icon i {
        font-size: 2rem;
    }
    
    .gallery-info h6 {
        font-size: 1rem;
    }
    
    .gallery-subtitle {
        font-size: 0.8rem;
    }
    
    .lightbox-navigation {
        padding: 0 1rem;
    }
    
    .lightbox-navigation .btn {
        width: 40px;
        height: 40px;
        font-size: 1rem;
    }
}

@media (max-width: 576px) {
    .gallery-masonry {
        grid-template-columns: repeat(2, 1fr);
        grid-auto-rows: 120px;
        grid-gap: 10px;
    }
    
    .gallery-overlay-content {
        padding: 0.75rem;
    }
    
    .gallery-icon i {
        font-size: 1.5rem;
        margin-bottom: 0.25rem;
    }
    
    .gallery-info h6 {
        font-size: 0.9rem;
        margin-bottom: 0.25rem;
    }
    
    .gallery-subtitle {
        font-size: 0.7rem;
    }
    
    #lightboxModal .modal-body {
        padding: 1rem;
    }
    
    .lightbox-navigation {
        padding: 0 0.5rem;
    }
    
    .lightbox-navigation .btn {
        width: 35px;
        height: 35px;
        font-size: 0.9rem;
    }
}

/* ===== GALLERY STYLES ===== */
.village-gallery {
    background-color: var(--light-color);
}

.gallery-item {
    position: relative;
    overflow: hidden;
    border-radius: var(--border-radius);
    box-shadow: var(--box-shadow);
    transition: var(--transition);
    background: var(--white-color);
}

.gallery-item:hover {
    transform: translateY(-5px);
    box-shadow: 0 15px 35px rgba(0, 0, 0, 0.15);
}

.gallery-image-wrapper {
    position: relative;
    height: 250px;
    overflow: hidden;
    border-radius: var(--border-radius);
}

.gallery-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: var(--transition);
    cursor: pointer;
}

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

.gallery-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(135deg, rgba(37, 99, 235, 0.8), rgba(59, 130, 246, 0.6));
    opacity: 0;
    transition: var(--transition);
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: var(--border-radius);
}

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

.gallery-overlay-content {
    text-align: center;
    color: white;
    padding: 1rem;
}

.gallery-overlay-content i {
    font-size: 2rem;
    margin-bottom: 0.5rem;
    display: block;
}

.gallery-title {
    font-size: 0.9rem;
    font-weight: 600;
    margin: 0;
    line-height: 1.4;
}

/* Lightbox Modal Styles */
#lightboxModal .modal-content {
    background: rgba(0, 0, 0, 0.9) !important;
}

#lightboxModal .modal-header {
    background: transparent;
    border-bottom: none;
    padding: 1rem 1.5rem 0;
}

#lightboxModal .modal-title {
    font-size: 1.1rem;
    font-weight: 600;
}

#lightboxModal .modal-body {
    padding: 1rem;
}

#lightboxModal img {
    max-width: 100%;
    max-height: 80vh;
    object-fit: contain;
    border-radius: var(--border-radius);
}

/* Gallery responsive adjustments */
@media (max-width: 768px) {
    .gallery-image-wrapper {
        height: 200px;
    }
    
    .gallery-overlay-content i {
        font-size: 1.5rem;
    }
    
    .gallery-title {
        font-size: 0.8rem;
    }
}

@media (max-width: 576px) {
    .gallery-image-wrapper {
        height: 180px;
    }
    
    .gallery-overlay-content {
        padding: 0.5rem;
    }
    
    .gallery-overlay-content i {
        font-size: 1.2rem;
        margin-bottom: 0.25rem;
    }
    
    .gallery-title {
        font-size: 0.75rem;
    }
}

/* ===== GALLERY PAGE STYLES ===== */
.page-header {
    background: linear-gradient(135deg, var(--primary-color), #3b82f6);
    position: relative;
    overflow: hidden;
}

.page-header::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 100 100"><defs><pattern id="grid" width="10" height="10" patternUnits="userSpaceOnUse"><path d="M 10 0 L 0 0 0 10" fill="none" stroke="rgba(255,255,255,0.1)" stroke-width="1"/></pattern></defs><rect width="100" height="100" fill="url(%23grid)"/></svg>');
    opacity: 0.3;
}

.page-header-content {
    position: relative;
    z-index: 2;
}

.page-stats {
    position: relative;
    z-index: 2;
}

.page-stats .stat-item {
    text-align: center;
    padding: 1rem;
    background: rgba(255, 255, 255, 0.1);
    border-radius: var(--border-radius);
    backdrop-filter: blur(10px);
}

.page-stats .stat-number {
    font-size: 2.5rem;
    font-weight: 700;
    margin-bottom: 0.5rem;
    color: white;
}

.page-stats .stat-label {
    font-size: 1rem;
    opacity: 0.9;
    margin-bottom: 0;
    color: white;
}

.breadcrumb {
    background: transparent;
    padding: 0;
    margin: 0;
}

.breadcrumb-item + .breadcrumb-item::before {
    content: "›";
    color: rgba(255, 255, 255, 0.5);
}

/* Gallery Filters */
.gallery-filters {
    border-bottom: 1px solid #e2e8f0;
}

.filter-tabs {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 0.5rem;
}

.btn-filter {
    background: var(--white-color);
    border: 2px solid #e2e8f0;
    color: var(--secondary-color);
    padding: 0.75rem 1.5rem;
    border-radius: 50px;
    font-weight: 500;
    transition: var(--transition);
    margin: 0.25rem;
}

.btn-filter:hover,
.btn-filter.active {
    background: var(--primary-color);
    border-color: var(--primary-color);
    color: white;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(37, 99, 235, 0.3);
}

/* Enhanced Gallery Grid */
.gallery-grid {
    min-height: 60vh;
}

.gallery-item-wrapper {
    transition: var(--transition);
}

.gallery-item {
    position: relative;
    overflow: hidden;
    border-radius: var(--border-radius);
    box-shadow: var(--box-shadow);
    transition: var(--transition);
    background: var(--white-color);
    height: 100%;
}

.gallery-item:hover {
    transform: translateY(-8px);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.15);
}

.gallery-image-wrapper {
    position: relative;
    height: 280px;
    overflow: hidden;
    border-radius: var(--border-radius);
}

.gallery-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: var(--transition);
    cursor: pointer;
}

.gallery-item:hover .gallery-image {
    transform: scale(1.15);
}

.gallery-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(135deg, rgba(37, 99, 235, 0.9), rgba(59, 130, 246, 0.7));
    opacity: 0;
    transition: var(--transition);
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: var(--border-radius);
}

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

.gallery-overlay-content {
    text-align: center;
    color: white;
    padding: 1.5rem;
    transform: translateY(20px);
    transition: var(--transition);
}

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

.gallery-overlay-content i {
    font-size: 2.5rem;
    margin-bottom: 1rem;
    display: block;
}

.gallery-overlay-content h6 {
    font-size: 1.1rem;
    font-weight: 600;
    margin-bottom: 0.5rem;
    line-height: 1.4;
}

.gallery-category {
    display: inline-block;
    background: rgba(255, 255, 255, 0.2);
    padding: 0.25rem 0.75rem;
    border-radius: 15px;
    font-size: 0.8rem;
    margin-bottom: 1rem;
}

.gallery-actions .btn {
    border-radius: 50px;
    padding: 0.5rem 1rem;
    font-size: 0.9rem;
}

/* Enhanced Lightbox */
#lightboxModal .modal-dialog {
    max-width: 90vw;
    margin: 1rem auto;
}

#lightboxModal .modal-content {
    background: rgba(0, 0, 0, 0.95) !important;
    border-radius: var(--border-radius);
}

#lightboxModal .modal-header {
    background: transparent;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    padding: 1.5rem 2rem 1rem;
}

#lightboxModal .modal-title {
    font-size: 1.3rem;
    font-weight: 600;
}

#lightboxModal .modal-body {
    padding: 2rem;
    max-height: 80vh;
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
}

#lightboxModal img {
    max-width: 100%;
    max-height: 70vh;
    object-fit: contain;
    border-radius: var(--border-radius);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5);
}

#lightboxModal .modal-footer {
    background: transparent;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    padding: 1rem 2rem 1.5rem;
}

.lightbox-controls .btn {
    border-radius: 50px;
    padding: 0.75rem 1.5rem;
    font-weight: 500;
    transition: var(--transition);
}

.lightbox-controls .btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(255, 255, 255, 0.2);
}

.lightbox-info {
    flex: 1;
}

/* Empty State */
.empty-state {
    padding: 4rem 2rem;
}

.empty-icon {
    opacity: 0.3;
}

.empty-title {
    color: var(--dark-color);
    font-weight: 600;
    margin-bottom: 1rem;
}

.empty-description {
    font-size: 1.1rem;
    margin-bottom: 2rem;
    max-width: 400px;
    margin-left: auto;
    margin-right: auto;
}

/* Loading States */
.gallery-item.loading {
    background: #f8f9fa;
    animation: pulse 1.5s ease-in-out infinite;
}

@keyframes pulse {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.5; }
}

.gallery-item.loading .gallery-image {
    background: linear-gradient(90deg, #f0f0f0 25%, #e0e0e0 50%, #f0f0f0 75%);
    background-size: 200% 100%;
    animation: shimmer 1.5s infinite;
}

@keyframes shimmer {
    0% { background-position: -200% 0; }
    100% { background-position: 200% 0; }
}

/* Gallery Page Responsive */
@media (max-width: 992px) {
    .filter-tabs {
        justify-content: flex-start;
        overflow-x: auto;
        padding-bottom: 0.5rem;
    }
    
    .btn-filter {
        white-space: nowrap;
        flex-shrink: 0;
    }
}

@media (max-width: 768px) {
    .page-header {
        text-align: center;
    }
    
    .page-header-content h1 {
        font-size: 2rem;
    }
    
    .page-stats {
        margin-top: 2rem;
    }
    
    .gallery-image-wrapper {
        height: 220px;
    }
    
    .gallery-overlay-content {
        padding: 1rem;
    }
    
    .gallery-overlay-content h6 {
        font-size: 1rem;
    }
    
    #lightboxModal .modal-dialog {
        max-width: 95vw;
        margin: 0.5rem auto;
    }
    
    #lightboxModal .modal-body {
        padding: 1rem;
    }
    
    .lightbox-controls {
        display: flex;
        flex-direction: column;
        gap: 0.5rem;
    }
    
    .lightbox-controls .btn {
        width: 100%;
    }
}

@media (max-width: 576px) {
    .page-header-content h1 {
        font-size: 1.75rem;
    }
    
    .gallery-image-wrapper {
        height: 200px;
    }
    
    .gallery-overlay-content {
        padding: 0.75rem;
    }
    
    .gallery-overlay-content i {
        font-size: 2rem;
        margin-bottom: 0.75rem;
    }
    
    .gallery-overlay-content h6 {
        font-size: 0.9rem;
    }
    
    .gallery-category {
        font-size: 0.7rem;
        padding: 0.2rem 0.5rem;
    }
    
    .btn-filter {
        padding: 0.5rem 1rem;
        font-size: 0.9rem;
    }
}

/* ===== FOOTER ===== */
.footer {
    background: linear-gradient(135deg, var(--dark-color), #0f172a);
    color: white;
}

.footer h5 {
    color: var(--primary-color);
    font-weight: 600;
    margin-bottom: 1.5rem;
}

.footer .contact-info p {
    margin-bottom: 0.75rem;
    display: flex;
    align-items: center;
}

.footer .contact-info i {
    width: 20px;
    color: var(--primary-color);
}

.footer .list-unstyled li {
    margin-bottom: 0.5rem;
}

.footer .list-unstyled a {
    transition: var(--transition);
}

.footer .list-unstyled a:hover {
    color: var(--primary-color) !important;
    padding-left: 5px;
}

.map-container iframe {
    border-radius: var(--border-radius);
}

.social-links .btn {
    margin-bottom: 0.5rem;
    transition: var(--transition);
}

.social-links .btn:hover {
    transform: translateY(-2px);
}

/* ===== WHATSAPP FLOAT ===== */
.whatsapp-float {
    position: fixed;
    bottom: 20px;
    right: 20px;
    z-index: 1000;
}

.whatsapp-float .btn {
    width: 60px;
    height: 60px;
    display: flex;
    align-items: center;
    justify-content: center;
    animation: pulse 2s infinite;
}

@keyframes pulse {
    0% {
        box-shadow: 0 0 0 0 rgba(37, 211, 102, 0.7);
    }
    70% {
        box-shadow: 0 0 0 10px rgba(37, 211, 102, 0);
    }
    100% {
        box-shadow: 0 0 0 0 rgba(37, 211, 102, 0);
    }
}

/* ===== BACK TO TOP ===== */
#btn-back-to-top {
    position: fixed;
    bottom: 20px;
    left: 20px;
    display: none;
    z-index: 999;
    width: 50px;
    height: 50px;
    border-radius: 50%;
    border: none;
    background: var(--primary-color);
    color: white;
    font-size: 1.2rem;
    transition: var(--transition);
}

#btn-back-to-top:hover {
    background: #1d4ed8;
    transform: translateY(-2px);
}

/* ===== RESPONSIVE STYLES ===== */
@media (max-width: 768px) {
    .hero-slide {
        height: 70vh;
    }
    
    .hero-content h1 {
        font-size: 2rem;
    }
    
    .hero-content .lead {
        font-size: 1rem;
    }
    
    .hero-buttons .btn {
        display: block;
        width: 100%;
        margin-bottom: 0.5rem;
    }
    
    .section-title {
        font-size: 2rem;
    }
    
    .stat-number {
        font-size: 2rem;
    }
    
    .logo-img {
        width: 50px;
        height: 50px;
    }
    
    .navbar-nav .nav-link {
        padding: 0.5rem 1rem !important;
    }
    
    .whatsapp-float {
        bottom: 15px;
        right: 15px;
    }
    
    .whatsapp-float .btn {
        width: 50px;
        height: 50px;
    }
}

@media (max-width: 576px) {
    .hero-slide {
        height: 60vh;
    }
    
    .hero-content {
        text-align: center;
    }
    
    .hero-content h1 {
        font-size: 1.75rem;
    }
    
    .section-title {
        font-size: 1.75rem;
    }
    
    .explore-card,
    .service-card {
        padding: 1.5rem;
    }
    
    .news-content,
    .potential-content {
        padding: 1rem;
    }
}

/* ===== UTILITY CLASSES ===== */
.text-primary {
    color: var(--primary-color) !important;
}

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

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

.btn-primary:hover {
    background-color: #1d4ed8;
    border-color: #1d4ed8;
}

.rounded-lg {
    border-radius: 0.75rem !important;
}

.shadow-lg {
    box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05) !important;
}

/* ===== LOADING ANIMATION ===== */
.loading {
    display: inline-block;
    width: 20px;
    height: 20px;
    border: 3px solid rgba(255, 255, 255, 0.3);
    border-radius: 50%;
    border-top-color: #fff;
    animation: spin 1s ease-in-out infinite;
}

@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}

/* ===== CUSTOM SCROLLBAR ===== */
::-webkit-scrollbar {
    width: 8px;
}

::-webkit-scrollbar-track {
    background: #f1f1f1;
}

::-webkit-scrollbar-thumb {
    background: var(--primary-color);
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: #1d4ed8;
}

/* ===== GALLERY FOTO DESA OVERRIDE ===== */
/* Ukuran foto lebih kecil dan card menyesuaikan */
.village-gallery .gallery-masonry {
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)) !important;
    grid-gap: 15px !important;
    grid-auto-rows: 140px !important;
}

.village-gallery .gallery-item.gallery-large {
    grid-row-end: span 2 !important;
    grid-column-end: span 2 !important;
}

.village-gallery .gallery-item.gallery-wide {
    grid-column-end: span 2 !important;
}

.village-gallery .gallery-item.gallery-tall {
    grid-row-end: span 2 !important;
}

.village-gallery .gallery-item.gallery-medium {
    grid-row-end: span 1 !important;
    grid-column-end: span 1 !important;
}

.village-gallery .gallery-item.gallery-small {
    grid-row-end: span 1 !important;
    grid-column-end: span 1 !important;
}

.village-gallery .gallery-item {
    border-radius: 12px !important;
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.08) !important;
}

.village-gallery .gallery-item:hover {
    transform: translateY(-6px) scale(1.01) !important;
    box-shadow: 0 15px 30px rgba(0, 0, 0, 0.15) !important;
}

.village-gallery .gallery-overlay-content {
    padding: 1rem !important;
}

.village-gallery .gallery-icon i {
    font-size: 2rem !important;
    margin-bottom: 0.5rem !important;
}

.village-gallery .gallery-info h6 {
    font-size: 0.9rem !important;
    font-weight: 600 !important;
    margin-bottom: 0.25rem !important;
    line-height: 1.3 !important;
}

.village-gallery .gallery-subtitle {
    font-size: 0.75rem !important;
    opacity: 0.9 !important;
}

/* Responsive untuk galeri foto desa */
@media (max-width: 1200px) {
    .village-gallery .gallery-masonry {
        grid-template-columns: repeat(auto-fit, minmax(160px, 1fr)) !important;
        grid-auto-rows: 120px !important;
    }
}

@media (max-width: 992px) {
    .village-gallery .gallery-masonry {
        grid-template-columns: repeat(auto-fit, minmax(140px, 1fr)) !important;
        grid-auto-rows: 110px !important;
        grid-gap: 12px !important;
    }
    
    .village-gallery .gallery-item.gallery-large {
        grid-row-end: span 2 !important;
        grid-column-end: span 1 !important;
    }
    
    .village-gallery .gallery-item.gallery-wide {
        grid-column-end: span 1 !important;
    }
}

@media (max-width: 768px) {
    .village-gallery .gallery-masonry {
        grid-template-columns: repeat(auto-fit, minmax(120px, 1fr)) !important;
        grid-auto-rows: 100px !important;
        grid-gap: 10px !important;
    }
    
    .village-gallery .gallery-item.gallery-large,
    .village-gallery .gallery-item.gallery-wide,
    .village-gallery .gallery-item.gallery-tall {
        grid-row-end: span 1 !important;
        grid-column-end: span 1 !important;
    }
    
    .village-gallery .gallery-overlay-content {
        padding: 0.75rem !important;
    }
    
    .village-gallery .gallery-icon i {
        font-size: 1.5rem !important;
    }
    
    .village-gallery .gallery-info h6 {
        font-size: 0.8rem !important;
    }
    
    .village-gallery .gallery-subtitle {
        font-size: 0.7rem !important;
    }
}

@media (max-width: 576px) {
    .village-gallery .gallery-masonry {
        grid-template-columns: repeat(3, 1fr) !important;
        grid-auto-rows: 90px !important;
        grid-gap: 8px !important;
    }
    
    .village-gallery .gallery-overlay-content {
        padding: 0.5rem !important;
    }
    
    .village-gallery .gallery-icon i {
        font-size: 1.2rem !important;
        margin-bottom: 0.25rem !important;
    }
    
    .village-gallery .gallery-info h6 {
        font-size: 0.7rem !important;
        margin-bottom: 0.1rem !important;
    }
    
    .village-gallery .gallery-subtitle {
        font-size: 0.6rem !important;
    }
}