/*
Theme Name: Desa Theme Bootstrap
Theme URI: https://desapurwabakti.com
Author: Desa Purwabakti
Author URI: https://desapurwabakti.com
Description: Modern Bootstrap 4 theme untuk website desa dengan mega menu, carousel, dan berbagai section
Version: 1.0.0
Requires at least: 5.0
Tested up to: 6.4
Requires PHP: 7.4
License: GNU General Public License v2 or later
License URI: http://www.gnu.org/licenses/gpl-2.0.html
Text Domain: desatheme
Tags: bootstrap, responsive, modern, village, government
*/

/* ==========================================
   CSS Variables
   ========================================== */
:root {
    --primary-color: #2c5530;
    --secondary-color: #e8f5e8;
    --accent-color: #f8faf8;
    --gold-color: #d4af37;
    --dark-color: #1a3d1a;
    --text-color: #333333;
    --light-gray: #f5f5f5;
    --border-color: #e0e0e0;
}

/* ==========================================
   Global Styles
   ========================================== */
body {
    font-family: 'Roboto', sans-serif;
    color: var(--text-color);
    line-height: 1.6;
    overflow-x: hidden;
}

a {
    color: var(--primary-color);
    transition: all 0.3s ease;
}

a:hover {
    color: var(--gold-color);
    text-decoration: none;
}

.section-title {
    font-size: 2.5rem;
    font-weight: 700;
    color: var(--primary-color);
    margin-bottom: 1rem;
    position: relative;
    display: inline-block;
}

.section-title::after {
    content: '';
    position: absolute;
    bottom: -10px;
    left: 0;
    width: 60px;
    height: 4px;
    background: var(--gold-color);
}

.section-subtitle {
    font-size: 1.1rem;
    color: #666;
    margin-bottom: 3rem;
}

/* ==========================================
   Header & Navigation
   ========================================== */
.site-header {
    background: #fff;
    box-shadow: 0 2px 15px rgba(0, 0, 0, 0.1);
    z-index: 1000;
}

/* Logo Styling - Responsive & Proportional */
.navbar-brand img,
.navbar-brand .navbar-logo,
.navbar-brand .custom-logo,
.custom-logo-link img {
    max-height: 60px !important;
    max-width: 200px !important;
    height: auto !important;
    width: auto !important;
    object-fit: contain !important; /* Menjaga proporsi logo */
    transition: all 0.3s ease;
}

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

.custom-logo-link {
    display: inline-block;
    line-height: 1;
}

/* Logo saat scroll */
.site-header.scrolled .navbar-logo,
.site-header.scrolled .custom-logo,
.site-header.scrolled .navbar-brand img,
.site-header.scrolled .custom-logo-link img {
    max-height: 50px !important;
    max-width: 180px !important;
}

.navbar-brand span {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--primary-color);
    margin-left: 10px;
}

/* Responsive Mobile */
@media (max-width: 768px) {
    .navbar-brand img,
    .navbar-brand .navbar-logo,
    .navbar-brand .custom-logo,
    .custom-logo-link img {
        max-height: 50px !important;
        max-width: 160px !important;
    }
    
    .navbar-brand span {
        font-size: 1.2rem;
    }
}

/* Extra small devices */
@media (max-width: 480px) {
    .navbar-brand img,
    .navbar-brand .navbar-logo,
    .navbar-brand .custom-logo,
    .custom-logo-link img {
        max-height: 45px !important;
        max-width: 140px !important;
    }
    
    .navbar-brand span {
        font-size: 1rem;
    }
}

.navbar-nav .nav-link {
    color: var(--text-color);
    font-weight: 500;
    padding: 0.8rem 1.2rem;
    transition: all 0.3s ease;
    position: relative;
}

.navbar-nav .nav-link:hover,
.navbar-nav .nav-link.active {
    color: var(--primary-color);
}

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

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

/* Mega Menu & Dropdown */
.nav-item.dropdown {
    position: relative;
}

.dropdown-menu {
    border: none;
    border-top: 3px solid var(--primary-color);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.15);
    padding: 0.5rem 0;
    margin-top: 0;
    border-radius: 0 0 8px 8px;
    min-width: 220px;
}

.dropdown-item {
    color: var(--text-color);
    padding: 0.7rem 1.5rem;
    font-weight: 500;
    transition: all 0.3s ease;
    position: relative;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.dropdown-item:hover,
.dropdown-item:focus {
    background-color: var(--light-bg);
    color: var(--primary-color);
    padding-left: 2rem;
}

.dropdown-item i {
    color: var(--gold-color);
    margin-right: 8px;
    width: 20px;
}

/* Submenu Arrow Icon */
.submenu-arrow {
    font-size: 0.75rem;
    margin-left: auto;
    transition: transform 0.3s ease;
}

.dropdown-item:hover .submenu-arrow {
    transform: translateX(3px);
}

/* Dropdown Toggle Arrow */
.nav-link.dropdown-toggle::after {
    margin-left: 0.5rem;
    vertical-align: middle;
}

/* Multi-level Dropdown Support (Level 2 & 3) */
.dropdown-submenu-item {
    position: relative;
}

/* CRITICAL: Hide all submenus by default - Multiple selectors for specificity */
.dropdown-submenu,
.dropdown-submenu-level-3,
.dropdown-menu .dropdown-submenu,
.dropdown-menu .dropdown-submenu-level-3 {
    position: absolute !important;
    left: 100% !important;
    top: 0 !important;
    margin-top: -0.5rem !important;
    margin-left: 0 !important;
    display: none !important; /* Force hide by default */
    opacity: 0 !important;
    visibility: hidden !important;
    transition: opacity 0.2s ease, visibility 0.2s ease;
    z-index: 1000 !important;
}

/* Additional specificity - ensure hidden in all contexts */
.navbar-nav .dropdown-submenu,
.navbar-nav .dropdown-submenu-level-3 {
    display: none !important;
    opacity: 0 !important;
    visibility: hidden !important;
}

/* Show submenu on hover (desktop only) */
@media (min-width: 992px) {
    /* Level 0 dropdown on hover */
    .nav-item.dropdown:hover > .dropdown-menu {
        display: block !important;
    }
    
    /* Level 1 & 2 submenu on hover - ONLY when parent is hovered */
    .dropdown-submenu-item:hover > .dropdown-submenu,
    .dropdown-submenu-item:hover > .dropdown-submenu-level-3 {
        display: block !important;
        opacity: 1 !important;
        visibility: visible !important;
    }
    
    /* Additional hover selector for nested items */
    .navbar-nav .dropdown-submenu-item:hover > .dropdown-submenu,
    .navbar-nav .dropdown-submenu-item:hover > .dropdown-submenu-level-3 {
        display: block !important;
        opacity: 1 !important;
        visibility: visible !important;
    }
}

/* Level 3 specific styling */
.dropdown-submenu-level-3 {
    border-left: 3px solid var(--gold-color) !important;
}

/* Mobile dropdown behavior */
@media (max-width: 991px) {
    .dropdown-submenu,
    .dropdown-submenu-level-3 {
        position: static;
        box-shadow: none;
        border-left: 2px solid var(--primary-color);
        margin-left: 1rem;
        border-radius: 0;
        display: none; /* Hidden by default, toggled by JS */
    }
    
    .dropdown-submenu-item .dropdown-toggle::after {
        transform: rotate(90deg);
    }
    
    .submenu-arrow {
        transition: transform 0.3s ease;
    }
    
    .submenu-arrow.rotated {
        transform: rotate(90deg);
    }
}

/* ==========================================
   Carousel/Jumbotron
   ========================================== */
.hero-carousel {
    position: relative;
    /* Height of navbar */
    margin-top: 0px; 
}

.carousel-item {
    height: 600px;
    background-size: cover;
    background-position: center;
    position: relative;
}

.carousel-item::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.4);
}

.carousel-caption {
    top: 50%;
    transform: translateY(-50%);
    bottom: auto;
    z-index: 10;
}

.carousel-caption h1 {
    font-size: 3.5rem;
    font-weight: 700;
    text-shadow: 2px 2px 8px rgba(0, 0, 0, 0.8);
    margin-bottom: 1rem;
    animation: fadeInDown 1s ease;
}

.carousel-caption p {
    font-size: 1.5rem;
    text-shadow: 1px 1px 4px rgba(0, 0, 0, 0.8);
    margin-bottom: 2rem;
    animation: fadeInUp 1s ease 0.3s both;
}

.carousel-caption .btn {
    animation: fadeInUp 1s ease 0.6s both;
}

.btn-primary-custom {
    background: var(--primary-color);
    color: #fff;
    padding: 12px 35px;
    border-radius: 50px;
    font-weight: 600;
    border: 2px solid var(--primary-color);
    transition: all 0.3s ease;
}

.btn-primary-custom:hover {
    background: transparent;
    color: #fff;
    border-color: #fff;
    transform: translateY(-3px);
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.3);
}

/* Carousel Controls */
.carousel-control-prev,
.carousel-control-next {
    width: 60px;
    height: 60px;
    top: 50%;
    transform: translateY(-50%);
    opacity: 1 !important;
    z-index: 20;
    cursor: pointer;
    pointer-events: auto;
}

.carousel-control-prev {
    left: 20px;
}

.carousel-control-next {
    right: 20px;
}

.carousel-control-prev-icon,
.carousel-control-next-icon {
    width: 50px;
    height: 50px;
    background-color: rgba(44, 85, 48, 0.9);
    border-radius: 50%;
    transition: all 0.3s ease;
    background-size: 20px 20px;
    pointer-events: none;
}

.carousel-control-prev:hover .carousel-control-prev-icon,
.carousel-control-next:hover .carousel-control-next-icon {
    background-color: rgba(44, 85, 48, 1);
    transform: scale(1.15);
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.4);
}

.carousel-control-prev:focus,
.carousel-control-next:focus {
    opacity: 1;
}

/* Carousel Indicators */
.carousel-indicators {
    bottom: 20px;
    z-index: 15;
    margin: 0;
}

.carousel-indicators li {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background-color: rgba(255, 255, 255, 0.5);
    border: 2px solid transparent;
    transition: all 0.3s ease;
    margin: 0 5px;
    cursor: pointer;
}

.carousel-indicators li.active {
    background-color: var(--gold-color);
    border-color: #fff;
    transform: scale(1.2);
}

.carousel-indicators li:hover {
    background-color: rgba(255, 255, 255, 0.8);
}

/* ==========================================
   News Section
   ========================================== */
.news-section {
    padding: 80px 0;
    background: var(--light-gray);
}

.news-card {
    background: #fff;
    border-radius: 15px;
    overflow: hidden;
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.1);
    transition: all 0.3s ease;
    margin-bottom: 30px;
    height: 100%;
}

.news-card:hover {
    transform: translateY(-10px);
    box-shadow: 0 15px 40px rgba(0, 0, 0, 0.2);
}

.news-card-img {
    height: 250px;
    overflow: hidden;
    position: relative;
}

.news-card-img img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s ease;
}

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

.news-card-badge {
    position: absolute;
    top: 15px;
    right: 15px;
    background: var(--primary-color);
    color: #fff;
    padding: 5px 15px;
    border-radius: 20px;
    font-size: 0.85rem;
    font-weight: 600;
}

.news-card-body {
    padding: 1.5rem;
}

.news-card-meta {
    display: flex;
    gap: 15px;
    margin-bottom: 1rem;
    font-size: 0.9rem;
    color: #666;
}

.news-card-meta i {
    color: var(--gold-color);
    margin-right: 5px;
}

.news-card-title {
    font-size: 1.3rem;
    font-weight: 700;
    color: var(--primary-color);
    margin-bottom: 1rem;
    line-height: 1.4;
}

.news-card-title a {
    color: var(--primary-color);
    text-decoration: none;
}

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

.news-card-text {
    color: #666;
    margin-bottom: 1.5rem;
    line-height: 1.6;
}

.btn-read-more {
    color: var(--primary-color);
    font-weight: 600;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    transition: all 0.3s ease;
}

.btn-read-more:hover {
    color: var(--gold-color);
    gap: 12px;
}

/* ==========================================
   Statistik Desa Section
   ========================================== */
.stats-section {
    padding: 60px 0;
    background: linear-gradient(135deg, #2c5f2d 0%, #1a3a1b 100%);
    position: relative;
    overflow: hidden;
}

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

.stats-section .container {
    position: relative;
    z-index: 1;
}

.stat-card {
    text-align: center;
    padding: 2rem 1.5rem;
    background: rgba(255, 255, 255, 0.15);
    border-radius: 12px;
    backdrop-filter: blur(10px);
    border: 2px solid rgba(255, 255, 255, 0.25);
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    height: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    min-height: 200px;
}

.stat-card:hover {
    background: rgba(255, 255, 255, 0.25);
    transform: translateY(-8px) scale(1.02);
    box-shadow: 0 15px 35px rgba(0, 0, 0, 0.4);
    border-color: rgba(255, 255, 255, 0.4);
}

.stat-icon {
    width: 70px;
    height: 70px;
    background: rgba(255, 255, 255, 0.25);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 1.2rem;
    transition: all 0.5s cubic-bezier(0.68, -0.55, 0.265, 1.55);
    flex-shrink: 0;
}

.stat-icon i {
    font-size: 2rem;
    color: #fff;
    transition: all 0.3s ease;
}

.stat-card:hover .stat-icon {
    background: #fff;
    transform: rotateY(360deg) scale(1.1);
}

.stat-card:hover .stat-icon i {
    color: #2c5f2d;
}

.stat-content {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
}

.stat-number {
    font-size: 2.5rem;
    font-weight: 700;
    color: #fff;
    margin: 0 0 0.3rem 0;
    line-height: 1.2;
    letter-spacing: -1px;
}

.stat-label {
    font-size: 0.95rem;
    color: rgba(255, 255, 255, 0.95);
    margin: 0;
    font-weight: 500;
    line-height: 1.4;
}

/* Responsive Stats Section */
@media (max-width: 991px) {
    .stats-section {
        padding: 50px 0;
    }
    
    .stat-card {
        min-height: 180px;
        margin-bottom: 1.5rem;
    }
    
    .stat-number {
        font-size: 2.2rem;
    }
}

@media (max-width: 767px) {
    .stats-section {
        padding: 40px 0;
    }
    
    .stat-card {
        min-height: 160px;
        padding: 1.5rem 1rem;
    }
    
    .stat-icon {
        width: 60px;
        height: 60px;
        margin-bottom: 1rem;
    }
    
    .stat-icon i {
        font-size: 1.8rem;
    }
    
    .stat-number {
        font-size: 2rem;
    }
    
    .stat-label {
        font-size: 0.9rem;
    }
}

/* ==========================================
   Services Section
   ========================================== */
.services-section {
    padding: 80px 0;
    background: #fff;
}

.service-card {
    text-align: center;
    padding: 2.5rem 2rem;
    border-radius: 15px;
    background: var(--light-gray);
    transition: all 0.3s ease;
    height: 100%;
    margin-bottom: 30px;
}

.service-card:hover {
    background: var(--primary-color);
    transform: translateY(-10px);
    box-shadow: 0 15px 40px rgba(0, 0, 0, 0.2);
}

.service-card:hover * {
    color: #fff !important;
}

.service-icon {
    width: 80px;
    height: 80px;
    background: var(--primary-color);
    color: #fff;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2.5rem;
    margin: 0 auto 1.5rem;
    transition: all 0.3s ease;
}

.service-card:hover .service-icon {
    background: #fff;
    color: var(--primary-color);
    transform: rotateY(360deg);
}

.service-title {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--primary-color);
    margin-bottom: 1rem;
}

.service-description {
    font-size: 1rem;
    color: var(--text-color);
    line-height: 1.8;
}

/* ==========================================
   Visi & Misi Section
   ========================================== */
.vision-mission-section {
    padding: 80px 0;
    background: #f8f9fa;
}

.vision-card,
.mission-card {
    padding: 2.5rem;
    border-radius: 15px;
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.08);
    height: 100%;
    transition: all 0.3s ease;
    background: #fff;
}

.vision-card {
    border-left: 5px solid var(--primary-color);
}

.mission-card {
    border-left: 5px solid var(--gold-color);
}

.vision-card:hover,
.mission-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.12);
}

.vision-icon,
.mission-icon {
    width: 70px;
    height: 70px;
    background: linear-gradient(135deg, var(--primary-color), var(--dark-color));
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 1.5rem;
}

.mission-icon {
    background: linear-gradient(135deg, var(--gold-color), #d4af37);
}

.vision-icon i,
.mission-icon i {
    font-size: 2rem;
    color: #fff;
}

.vision-card h3,
.mission-card h3 {
    font-size: 1.8rem;
    font-weight: 700;
    color: var(--dark-color);
    margin-bottom: 1.5rem;
}

.vision-content p {
    font-size: 1.1rem;
    line-height: 1.8;
    color: var(--text-color);
    font-style: italic;
}

.mission-content ol {
    padding-left: 1.5rem;
    margin: 0;
}

.mission-content ol li {
    font-size: 1rem;
    line-height: 1.8;
    color: var(--text-color);
    margin-bottom: 1rem;
    padding-left: 0.5rem;
}

.mission-content ol li:last-child {
    margin-bottom: 0;
}

/* ==========================================
   Potensi Desa Section
   ========================================== */
.potensi-section {
    padding: 80px 0;
    background: #fff;
}

.potensi-card {
    text-align: center;
    padding: 2rem 1.5rem;
    border-radius: 15px;
    background: #fff;
    border: 2px solid #e9ecef;
    transition: all 0.3s ease;
    height: 100%;
}

.potensi-card:hover {
    border-color: var(--primary-color);
    transform: translateY(-10px);
    box-shadow: 0 15px 30px rgba(0, 0, 0, 0.1);
}

.potensi-icon {
    width: 80px;
    height: 80px;
    background: linear-gradient(135deg, var(--primary-color), var(--dark-color));
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 1.5rem;
    transition: all 0.3s ease;
}

.potensi-card:hover .potensi-icon {
    transform: scale(1.1) rotateY(360deg);
}

.potensi-icon i {
    font-size: 2.5rem;
    color: #fff;
}

.potensi-card h4 {
    font-size: 1.3rem;
    font-weight: 700;
    color: var(--dark-color);
    margin-bottom: 1rem;
}

.potensi-card p {
    font-size: 0.95rem;
    line-height: 1.7;
    color: var(--text-color);
    margin: 0;
}

/* ==========================================
   Struktur Organisasi Section
   ========================================== */
.struktur-section {
    padding: 80px 0;
    background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
}

.struktur-card {
    text-align: center;
    padding: 2rem;
    background: #fff;
    border-radius: 15px;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.08);
    transition: all 0.3s ease;
    height: 100%;
}

.struktur-card.kepala-desa {
    background: linear-gradient(135deg, var(--primary-color), var(--dark-color));
    color: #fff;
}

.struktur-card:hover {
    transform: translateY(-10px);
    box-shadow: 0 15px 30px rgba(0, 0, 0, 0.15);
}

.struktur-photo {
    width: 120px;
    height: 120px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--primary-color), var(--dark-color));
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 1.5rem;
    border: 5px solid #fff;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
}

.struktur-card.kepala-desa .struktur-photo {
    width: 150px;
    height: 150px;
    background: #fff;
}

.struktur-photo i {
    font-size: 3.5rem;
    color: #fff;
}

.struktur-card.kepala-desa .struktur-photo i {
    color: var(--primary-color);
    font-size: 4rem;
}

.struktur-info h4 {
    font-size: 1.5rem;
    font-weight: 700;
    margin-bottom: 0.5rem;
}

.struktur-info h5 {
    font-size: 1.2rem;
    font-weight: 700;
    color: var(--dark-color);
    margin-bottom: 0.5rem;
}

.struktur-card.kepala-desa .struktur-info h4 {
    color: #fff;
}

.struktur-info .jabatan {
    font-size: 1rem;
    color: var(--gold-color);
    font-weight: 600;
    margin-bottom: 0.5rem;
}

.struktur-card.kepala-desa .jabatan {
    color: var(--gold-color);
    font-size: 1.1rem;
}

.struktur-info .periode {
    font-size: 0.9rem;
    color: rgba(255, 255, 255, 0.9);
    margin: 0;
}

/* Responsive Struktur */
@media (max-width: 767px) {
    .struktur-photo {
        width: 100px;
        height: 100px;
    }
    
    .struktur-card.kepala-desa .struktur-photo {
        width: 130px;
        height: 130px;
    }
    
    .struktur-photo i {
        font-size: 2.5rem;
    }
    
    .struktur-card.kepala-desa .struktur-photo i {
        font-size: 3rem;
    }
}

/* ==========================================
   YouTube Section
}

.service-description {
    color: #666;
    line-height: 1.6;
}

/* ==========================================
   YouTube Section
   ========================================== */
.youtube-section {
    padding: 80px 0;
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--dark-color) 100%);
    color: #fff;
}

.youtube-section .section-title {
    color: #fff;
}

.youtube-section .section-title::after {
    background: var(--gold-color);
}

.youtube-section .section-subtitle {
    color: rgba(255, 255, 255, 0.9);
}

.youtube-card {
    background: #fff;
    border-radius: 15px;
    overflow: hidden;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
    transition: all 0.3s ease;
    margin-bottom: 30px;
}

.youtube-card:hover {
    transform: translateY(-10px);
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.4);
}

.youtube-thumbnail {
    position: relative;
    height: 220px;
    overflow: hidden;
}

.youtube-thumbnail img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s ease;
}

.youtube-card:hover .youtube-thumbnail img {
    transform: scale(1.1);
}

.youtube-play-btn {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 70px;
    height: 70px;
    background: rgba(255, 0, 0, 0.9);
    color: #fff;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2rem;
    transition: all 0.3s ease;
}

.youtube-card:hover .youtube-play-btn {
    background: rgba(255, 0, 0, 1);
    transform: translate(-50%, -50%) scale(1.2);
}

.youtube-info {
    padding: 1.5rem;
}

.youtube-title {
    font-size: 1.2rem;
    font-weight: 700;
    color: var(--primary-color);
    margin-bottom: 0.8rem;
    line-height: 1.4;
}

.youtube-title a {
    color: var(--primary-color);
    text-decoration: none;
}

.youtube-title a:hover {
    color: var(--gold-color);
}

.youtube-meta {
    display: flex;
    gap: 15px;
    font-size: 0.9rem;
    color: #666;
}

.youtube-meta i {
    color: #FF0000;
    margin-right: 5px;
}

/* ==========================================
   Contact Section
   ========================================== */
.contact-section {
    padding: 80px 0;
    background: var(--light-gray);
}

.contact-info-card {
    background: #fff;
    padding: 2rem;
    border-radius: 15px;
    text-align: center;
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.1);
    transition: all 0.3s ease;
    height: 100%;
    margin-bottom: 30px;
}

.contact-info-card:hover {
    transform: translateY(-10px);
    box-shadow: 0 15px 40px rgba(0, 0, 0, 0.2);
}

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

.contact-info-card h5 {
    color: var(--primary-color);
    font-weight: 700;
    margin-bottom: 1rem;
}

.contact-info-card p {
    color: #666;
    margin-bottom: 0;
}

.contact-form {
    background: #fff;
    padding: 2.5rem;
    border-radius: 15px;
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.1);
}

.contact-form .form-control {
    border: 2px solid var(--border-color);
    padding: 12px 20px;
    border-radius: 8px;
    margin-bottom: 1.5rem;
    transition: all 0.3s ease;
}

.contact-form .form-control:focus {
    border-color: var(--primary-color);
    box-shadow: 0 0 0 0.2rem rgba(44, 85, 48, 0.15);
}

/* Google Maps */
.google-maps-container {
    margin-top: 3rem;
    border-radius: 15px;
    overflow: hidden;
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.1);
}

.google-maps-container iframe {
    width: 100%;
    height: 450px;
    border: 0;
    display: block;
}

@media (max-width: 767px) {
    .google-maps-container iframe {
        height: 350px;
    }
}

.contact-form textarea.form-control {
    min-height: 150px;
    resize: vertical;
}

.contact-form .btn-submit {
    background: var(--primary-color);
    color: #fff;
    padding: 12px 40px;
    border-radius: 50px;
    font-weight: 600;
    border: none;
    transition: all 0.3s ease;
    width: 100%;
}

.contact-form .btn-submit:hover {
    background: var(--dark-color);
    transform: translateY(-3px);
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.2);
}

/* ==========================================
   Footer
   ========================================== */
.site-footer {
    background: linear-gradient(135deg, var(--dark-color) 0%, #0d1f0d 100%);
    color: #fff;
    padding: 60px 0 0;
}

.footer-widget h5 {
    color: #fff;
    font-weight: 700;
    margin-bottom: 1.5rem;
    font-size: 1.3rem;
}

.footer-widget p {
    color: rgba(255, 255, 255, 0.8);
    line-height: 1.8;
}

.footer-widget ul {
    list-style: none;
    padding: 0;
    margin: 0;
}

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

.footer-widget ul li a {
    color: rgba(255, 255, 255, 0.8);
    text-decoration: none;
    transition: all 0.3s ease;
    display: inline-flex;
    align-items: center;
    gap: 8px;
}

.footer-widget ul li a:hover {
    color: var(--gold-color);
    padding-left: 10px;
}

.footer-widget ul li a i {
    color: var(--gold-color);
}

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

.social-links a {
    width: 45px;
    height: 45px;
    background: rgba(255, 255, 255, 0.1);
    color: #fff;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.2rem;
    transition: all 0.3s ease;
}

.social-links a:hover {
    background: var(--gold-color);
    transform: translateY(-5px);
}

.social-links a.facebook:hover {
    background: #3b5998;
}

.social-links a.instagram:hover {
    background: linear-gradient(45deg, #f09433 0%, #e6683c 25%, #dc2743 50%, #cc2366 75%, #bc1888 100%);
}

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

.social-links a.tiktok:hover {
    background: #000000;
}

.social-links a.email:hover {
    background: #ea4335;
}

.footer-bottom {
    background: rgba(0, 0, 0, 0.2);
    padding: 25px 0;
    margin-top: 50px;
    text-align: center;
}

.footer-bottom p {
    margin: 0;
    color: rgba(255, 255, 255, 0.8);
}

/* ==========================================
   Animations
   ========================================== */
@keyframes fadeInDown {
    from {
        opacity: 0;
        transform: translateY(-30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* ==========================================
   Responsive
   ========================================== */
@media (max-width: 991px) {
    .navbar-collapse {
        background: #fff;
        padding: 1rem;
        margin-top: 1rem;
        border-radius: 8px;
        box-shadow: 0 5px 20px rgba(0, 0, 0, 0.1);
    }
    
    .dropdown-mega .dropdown-menu {
        position: relative !important;
        transform: none !important;
        width: 100%;
    }
    
    .carousel-caption h1 {
        font-size: 2.5rem;
    }
    
    .carousel-caption p {
        font-size: 1.2rem;
    }
    
    .carousel-item {
        height: 500px;
    }
}

@media (max-width: 767px) {
    .section-title {
        font-size: 2rem;
    }
    
    .carousel-caption h1 {
        font-size: 2rem;
    }
    
    .carousel-caption p {
        font-size: 1rem;
    }
    
    .carousel-item {
        height: 400px;
    }
    
    .hero-carousel {
        margin-top: 0px;
    }
    
    /* Carousel Controls - Mobile */
    .carousel-control-prev,
    .carousel-control-next {
        width: 40px;
        height: 40px;
    }
    
    .carousel-control-prev {
        left: 10px;
    }
    
    .carousel-control-next {
        right: 10px;
    }
    
    .carousel-control-prev-icon,
    .carousel-control-next-icon {
        width: 35px;
        height: 35px;
        background-size: 15px 15px;
    }
    
    .carousel-indicators {
        bottom: 10px;
    }
    
    .carousel-indicators li {
        width: 8px;
        height: 8px;
        margin: 0 3px;
    }
}

/* ==========================================
   Utility Classes
   ========================================== */
.text-primary-custom {
    color: var(--primary-color) !important;
}

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

.bg-gradient-custom {
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--dark-color) 100%) !important;
}

/* ==========================================
   CRITICAL FIX: Force Hide Submenu Level 2 & 3
   HIGHEST SPECIFICITY - Must be at bottom
   ========================================== */
/* Hide all submenus by default */
body .navbar .dropdown-menu .dropdown-submenu,
body .navbar .dropdown-menu .dropdown-submenu-level-3,
body .site-header .dropdown-submenu,
body .site-header .dropdown-submenu-level-3 {
    display: none !important;
    opacity: 0 !important;
    visibility: hidden !important;
}

/* Desktop: Show on hover ONLY */
@media (min-width: 992px) {
    /* Level 2 submenu - show when hovering parent */
    body .navbar .dropdown-item.dropdown-toggle:hover + .dropdown-submenu,
    body .navbar .dropdown-submenu-item:hover > .dropdown-submenu,
    body .site-header .dropdown-item.dropdown-toggle:hover + .dropdown-submenu,
    body .site-header .dropdown-submenu-item:hover > .dropdown-submenu {
        display: block !important;
        opacity: 1 !important;
        visibility: visible !important;
    }
    
    /* Level 3 submenu - show when hovering parent */
    body .navbar .dropdown-item.dropdown-toggle:hover + .dropdown-submenu-level-3,
    body .navbar .dropdown-submenu-item:hover > .dropdown-submenu-level-3,
    body .navbar .dropdown-submenu .dropdown-item.dropdown-toggle:hover + .dropdown-submenu-level-3,
    body .site-header .dropdown-item.dropdown-toggle:hover + .dropdown-submenu-level-3,
    body .site-header .dropdown-submenu-item:hover > .dropdown-submenu-level-3,
    body .site-header .dropdown-submenu .dropdown-item.dropdown-toggle:hover + .dropdown-submenu-level-3 {
        display: block !important;
        opacity: 1 !important;
        visibility: visible !important;
    }
    
    /* Keep submenu visible when hovering the submenu itself */
    body .navbar .dropdown-submenu:hover,
    body .navbar .dropdown-submenu-level-3:hover,
    body .site-header .dropdown-submenu:hover,
    body .site-header .dropdown-submenu-level-3:hover {
        display: block !important;
        opacity: 1 !important;
        visibility: visible !important;
    }
}

/* ==========================================
   Single Post - Navigation & Comments
   ========================================== */

/* Post Navigation */
.post-navigation .card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.15) !important;
}

.post-navigation .nav-previous .card {
    border-radius: 8px;
}

.post-navigation .nav-next .card {
    border-radius: 8px;
}

/* Comments Area */
.comments-area {
    margin-top: 3rem;
}

.comments-title {
    font-size: 1.8rem;
    display: flex;
    align-items: center;
    gap: 10px;
}

.comment-list {
    margin-bottom: 3rem;
}

.comment-item {
    margin-bottom: 0 !important;
}

.comment-body {
    border-radius: 8px;
    transition: all 0.3s ease;
}

.comment-body:hover {
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.12) !important;
    transform: translateX(5px);
}

.comment-author .avatar-wrapper {
    flex-shrink: 0;
}

.comment-author .avatar-wrapper img {
    border: 3px solid var(--light-gray);
    transition: border-color 0.3s ease;
}

.comment-body:hover .avatar-wrapper img {
    border-color: var(--gold-color);
}

.comment-reply-link {
    color: var(--primary-color) !important;
    font-size: 0.9rem;
    text-decoration: none;
    font-weight: 600;
    padding: 5px 15px;
    border-radius: 20px;
    background: var(--light-gray);
    transition: all 0.3s ease;
    display: inline-block;
}

.comment-reply-link:hover {
    background: var(--primary-color);
    color: white !important;
}

.comment-content {
    font-size: 1rem;
}

.comment-content p:last-child {
    margin-bottom: 0;
}

/* Comment Form */
.comment-form {
    background: white;
    padding: 2.5rem;
    border-radius: 10px;
    border: 2px solid var(--light-gray);
    margin-top: 2rem;
}

.comment-form .form-control:focus {
    border-color: var(--primary-color);
    box-shadow: 0 0 0 0.2rem rgba(44, 85, 48, 0.15);
}

.comment-form textarea.form-control:focus {
    border-color: var(--gold-color);
}

.comment-form .btn-submit:hover {
    background: var(--dark-color) !important;
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(44, 85, 48, 0.3);
}

.comment-respond {
    margin-top: 2rem;
}

#cancel-comment-reply-link {
    color: #e74c3c;
    font-size: 0.9rem;
    margin-left: 15px;
    text-decoration: none;
    font-weight: 600;
    padding: 5px 15px;
    border-radius: 20px;
    background: #fff5f5;
    transition: all 0.3s ease;
    display: inline-block;
}

#cancel-comment-reply-link:hover {
    background: #e74c3c;
    color: white;
}

.comment-navigation {
    margin: 2rem 0;
    padding: 1rem 0;
    border-top: 2px solid var(--light-gray);
    border-bottom: 2px solid var(--light-gray);
}

.comment-navigation .nav-previous,
.comment-navigation .nav-next {
    display: inline-block;
    margin-right: 20px;
}

.comment-navigation a {
    color: var(--primary-color);
    font-weight: 600;
    text-decoration: none;
    padding: 8px 20px;
    border-radius: 5px;
    background: var(--light-gray);
    transition: all 0.3s ease;
}

.comment-navigation a:hover {
    background: var(--primary-color);
    color: white;
}

/* Responsive Comments */
@media (max-width: 768px) {
    .comment-form {
        padding: 1.5rem;
    }
    
    .comment-body {
        padding: 1rem !important;
    }
    
    .comments-title {
        font-size: 1.5rem;
    }
    
    .post-navigation .nav-next .card-body {
        text-align: left !important;
    }
}

/* ==========================================
   Author Bio Box
   ========================================== */

.author-bio-box {
    background: linear-gradient(135deg, #ffffff 0%, #f8f9fa 100%);
    transition: all 0.3s ease;
}

.author-bio-box:hover {
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.15) !important;
    transform: translateY(-3px);
}

.author-bio-box .author-avatar {
    transition: all 0.3s ease;
}

.author-bio-box:hover .author-avatar img {
    transform: scale(1.05);
}

.author-bio-box .author-name {
    position: relative;
    display: inline-block;
}

.author-bio-box .author-name::after {
    content: '';
    position: absolute;
    bottom: -5px;
    left: 0;
    width: 0;
    height: 3px;
    background: var(--gold-color);
    transition: width 0.3s ease;
}

.author-bio-box:hover .author-name::after {
    width: 100%;
}

.author-bio-box .author-role {
    animation: fadeInRight 0.5s ease;
}

.author-bio-box .author-description p {
    margin-bottom: 0;
    position: relative;
    padding-left: 10px;
}

.author-bio-box .author-meta a {
    transition: all 0.3s ease;
}

.author-bio-box .author-meta a:hover {
    color: var(--primary-color) !important;
    text-decoration: underline;
}

.author-bio-box .btn:hover {
    background: var(--dark-color) !important;
    transform: translateX(5px);
    box-shadow: 0 5px 15px rgba(44, 85, 48, 0.3);
}

.author-badge {
    animation: pulse 2s infinite;
}

@keyframes pulse {
    0%, 100% {
        transform: scale(1);
    }
    50% {
        transform: scale(1.1);
    }
}

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

/* Responsive Author Bio */
@media (max-width: 768px) {
    .author-bio-box .card-body {
        padding: 2rem 1.5rem !important;
    }
    
    .author-bio-box .author-name {
        font-size: 1.3rem !important;
    }
    
    .author-bio-box .author-meta .col-md-6 {
        text-align: left !important;
        margin-bottom: 1rem;
    }
    
    .author-bio-box .btn {
        width: 100%;
    }
}

/* ==========================================
   Gallery Section
   ========================================== */

.gallery-section {
    padding: 80px 0;
    background: var(--light-gray);
}

.gallery-container {
    margin-top: 2rem;
}

.gallery-item {
    position: relative;
    overflow: hidden;
    border-radius: 15px;
    background: white;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
    transition: all 0.3s ease;
}

.gallery-item:hover {
    transform: translateY(-10px);
    box-shadow: 0 15px 30px rgba(0, 0, 0, 0.2);
}

.gallery-img-wrapper {
    position: relative;
    width: 100%;
    padding-top: 75%; /* 4:3 Aspect Ratio */
    overflow: hidden;
    border-radius: 15px 15px 0 0;
}

.gallery-img {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s ease;
}

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

.gallery-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(44, 85, 48, 0.85);
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: opacity 0.3s ease;
}

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

.gallery-link {
    width: 60px;
    height: 60px;
    background: var(--gold-color);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 1.5rem;
    text-decoration: none;
    transition: all 0.3s ease;
    transform: scale(0);
}

.gallery-item:hover .gallery-link {
    transform: scale(1);
}

.gallery-link:hover {
    background: var(--primary-color);
    color: white;
    transform: scale(1.2) rotate(360deg);
}

.gallery-caption {
    padding: 1rem;
    background: white;
    border-radius: 0 0 15px 15px;
}

.gallery-caption p {
    margin: 0;
    font-size: 0.9rem;
    color: #666;
    text-align: center;
    line-height: 1.5;
}

/* Gallery Grid Variations */
.gallery-item:nth-child(1),
.gallery-item:nth-child(8) {
    animation: fadeInUp 0.6s ease;
}

.gallery-item:nth-child(2),
.gallery-item:nth-child(7) {
    animation: fadeInUp 0.7s ease;
}

.gallery-item:nth-child(3),
.gallery-item:nth-child(6) {
    animation: fadeInUp 0.8s ease;
}

.gallery-item:nth-child(4),
.gallery-item:nth-child(5) {
    animation: fadeInUp 0.9s ease;
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Lightbox Support (If using lightbox plugin) */
.lightbox {
    z-index: 9999 !important;
}

/* Responsive Gallery */
@media (max-width: 768px) {
    .gallery-section {
        padding: 60px 0;
    }
    
    .gallery-img-wrapper {
        padding-top: 100%; /* 1:1 Square on mobile */
    }
    
    .gallery-link {
        width: 50px;
        height: 50px;
        font-size: 1.2rem;
    }
}

@media (max-width: 576px) {
    .gallery-caption p {
        font-size: 0.85rem;
    }
}
