/**
 * Website Layout Styles
 * Modern, clean CSS following best practices
 */

/* ========================================
   CSS Variables
   ======================================== */
:root {
    --primary-color: #008000;
    --primary-dark: #006400;
    --primary-light: rgba(0, 128, 0, 0.1);
    --white: #ffffff;
    --text-dark: #333;
    --border-color: rgba(0, 128, 0, 0.1);
    --shadow-md: 0 4px 15px rgba(0, 0, 0, 0.1);
    --transition-fast: 0.3s ease;
}

/* ========================================
   Top Bar with Social Media and Search
   ======================================== */
.top-bar {
    background-color: #f8f9fa !important;
    border-bottom: 1px solid #e9ecef !important;
    position: fixed !important;
    top: 0 !important;
    left: 0 !important;
    right: 0 !important;
    width: 100% !important;
    z-index: 1040 !important;
    font-size: 0.9rem;
    transition: transform 0.3s ease-in-out, opacity 0.3s ease-in-out;
    height: auto !important;
    min-height: 48px;
}

.top-bar.hidden {
    transform: translateY(-100%);
    opacity: 0;
}

/* Social Media Links - Adjusted for horizontal layout */
.social-link {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 28px;
    height: 28px;
    border-radius: 50%;
    background-color: transparent;
    border: 1px solid #dee2e6;
    transition: all var(--transition-fast);
    text-decoration: none;
}

.social-link:hover {
    background-color: var(--primary-color);
    color: var(--white) !important;
    border-color: var(--primary-color);
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(0, 128, 0, 0.2);
}

.social-link i {
    font-size: 12px;
}

/* Search Form - Adjusted for horizontal layout */
.search-input-group {
    position: relative;
    max-width: 400px;
    width: 100%;
}

.search-input {
    background-color: var(--white);
    border: 1px solid #dee2e6;
    border-radius: 25px;
    padding: 6px 40px 6px 18px;
    font-size: 0.85rem;
    transition: all var(--transition-fast);
    box-shadow: none;
    min-width: 300px;
}

.search-input:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 0.2rem rgba(0, 128, 0, 0.1);
    background-color: var(--white);
}

.search-btn {
    position: absolute;
    right: 2px;
    top: 50%;
    transform: translateY(-50%);
    background-color: var(--primary-color);
    border: none;
    border-radius: 50%;
    width: 28px;
    height: 28px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--white);
    cursor: pointer;
    transition: all var(--transition-fast);
}

.search-btn:hover {
    background-color: var(--primary-dark);
    transform: translateY(-50%) scale(1.05);
}

.search-btn i {
    font-size: 11px;
}

/* ========================================
   Navbar Styles - ALWAYS VISIBLE, NEVER HIDDEN
   ======================================== */
.navbar,
.navbar.navbar-light,
.navbar.navbar-expand-lg,
.navbar-light,
.navbar-light.sticky-top,
.navbar.sticky-top,
nav.navbar {
    position: fixed !important;
    top: 48px !important; /* Height of top bar */
    left: 0 !important;
    right: 0 !important;
    width: 100% !important;
    z-index: 1030 !important;
    background-color: var(--white) !important;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1) !important;
    transition: top 0.3s ease-in-out !important;
    min-height: 60px !important;
    visibility: visible !important;
    opacity: 1 !important;
    transform: none !important;
    display: flex !important;
    pointer-events: auto !important;
}

/* DISABLED: Navbar should NEVER move when top-bar is hidden */
/* .navbar.top-bar-hidden,
.navbar.navbar-light.top-bar-hidden,
.navbar-light.sticky-top.top-bar-hidden,
.navbar.sticky-top.top-bar-hidden,
nav.navbar.top-bar-hidden {
    top: 0 !important;
    visibility: visible !important;
    opacity: 1 !important;
} */

/* Navbar ALWAYS stays at 48px, never moves */
.navbar.top-bar-hidden,
.navbar.navbar-light.top-bar-hidden,
.navbar-light.sticky-top.top-bar-hidden,
.navbar.sticky-top.top-bar-hidden,
nav.navbar.top-bar-hidden {
    top: 48px !important;
    visibility: visible !important;
    opacity: 1 !important;
}

/* Navbar Brand Adjustments */
.navbar-brand h2 {
    font-size: 1.5rem;
}

/* Navbar Toggler - Always visible on mobile/tablet */
.navbar-toggler {
    display: block !important;
    border: 1px solid rgba(0, 128, 0, 0.2);
    padding: 0.5rem 0.75rem;
}

.navbar-toggler:focus {
    box-shadow: 0 0 0 0.2rem rgba(0, 128, 0, 0.25);
}

.navbar-toggler-icon {
    background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 30 30'%3e%3cpath stroke='rgba(0, 128, 0, 0.75)' stroke-linecap='round' stroke-miterlimit='10' stroke-width='2' d='M4 7h22M4 15h22M4 23h22'/%3e%3c/svg%3e");
}

.navbar.top-bar-hidden {
    top: 0 !important; /* Move to top when top bar is hidden */
}

/* ========================================
   Dropdown Menus
   ======================================== */
.navbar-nav .dropdown-menu {
    background-color: var(--white);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    box-shadow: var(--shadow-md);
    padding: 0.5rem 0;
    margin-top: 0.5rem;
}

.navbar-nav .dropdown-item {
    color: var(--text-dark);
    padding: 0.5rem 1rem;
    transition: all var(--transition-fast);
    background-color: transparent;
}

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

.navbar-nav .dropdown-item.active {
    background-color: transparent !important;
    color: var(--primary-color);
    font-weight: 500;
}

.navbar-nav .dropdown-item:active,
.navbar-nav .dropdown-item:focus {
    background-color: var(--primary-light) !important;
    color: var(--primary-color);
}

/* ========================================
   Mega Dropdown - FIXED POSITIONING
   ======================================== */
.navbar-nav .dropdown {
    position: static !important;
}

.mega-dropdown {
    position: absolute !important;
    top: 100% !important;
    left: 0 !important;
    right: 0 !important;
    width: 100vw !important;
    margin: 0 !important;
    border: none !important;
    border-radius: 0 !important;
    box-shadow: 0 4px 20px rgba(0,0,0,0.1) !important;
    background: var(--white) !important;
    z-index: 1050 !important;
}

.mega-dropdown .container-fluid {
    max-width: 100% !important;
    padding: 2rem 1rem !important;
}

/* Mega Dropdown Header - Logo and Title on Left */
.mega-dropdown-header {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin-bottom: 1.5rem;
    padding-bottom: 1rem;
    border-bottom: 2px solid var(--border-color);
}

.mega-dropdown-header img {
    width: 50px;
    height: 50px;
    object-fit: contain;
}

.mega-dropdown-header h3 {
    margin: 0;
    color: var(--primary-color);
    font-weight: 600;
    font-size: 1.5rem;
}

.mega-dropdown-header p {
    margin: 0;
    color: var(--text-dark);
    font-size: 0.9rem;
}

.mega-dropdown-section {
    background: var(--white);
    border-radius: 8px;
    padding: 1rem;
    border: 1px solid var(--border-color);
    transition: all var(--transition-fast);
}

.mega-dropdown-section:hover {
    box-shadow: 0 4px 15px rgba(0, 128, 0, 0.1);
    transform: translateY(-2px);
}

.mega-dropdown-section h5 {
    font-weight: 600;
    margin-bottom: 1rem;
    padding-bottom: 0.5rem;
    border-bottom: 2px solid var(--primary-color);
}

.mega-dropdown-content .dropdown-item {
    padding: 0.5rem 0;
    border: none;
    background: none;
    transition: all var(--transition-fast);
}

.mega-dropdown-content .dropdown-item:hover {
    background-color: var(--primary-light);
    color: var(--primary-color);
    padding-left: 0.5rem;
    transform: translateX(5px);
}

/* ========================================
   Mobile User Menu
   ======================================== */
.mobile-user-menu {
    position: fixed;
    bottom: 70px;
    right: 10px;
    z-index: 1001;
    background: var(--white);
    border-radius: 12px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.15);
    padding: 15px;
    min-width: 200px;
    border: 1px solid var(--border-color);
}

.user-info {
    display: flex;
    align-items: center;
    margin-bottom: 10px;
    padding-bottom: 10px;
    border-bottom: 1px solid #eee;
}

.user-avatar-large {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    object-fit: cover;
    margin-right: 10px;
}

.user-icon-large {
    font-size: 40px;
    color: var(--primary-color);
    margin-right: 10px;
}

.user-name {
    font-weight: 500;
    color: var(--text-dark);
}

.logout-btn {
    background: none;
    border: none;
    color: #666;
    display: flex;
    align-items: center;
    padding: 8px 0;
    cursor: pointer;
    transition: color var(--transition-fast);
    font-size: 14px;
    width: 100%;
}

.logout-btn:hover {
    color: var(--primary-color);
}

.logout-btn i {
    margin-right: 8px;
}

/* ========================================
   Mobile Bottom Navigation - Modern Design
   ======================================== */
.mobile-bottom-nav {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    background: rgba(255, 255, 255, 0.98);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-top: 1px solid rgba(0, 128, 0, 0.1);
    z-index: 1050;
    padding: 8px 0;
    padding-bottom: calc(8px + env(safe-area-inset-bottom));
    box-shadow: 0 -4px 20px rgba(0, 0, 0, 0.08);
    display: none; /* Hidden by default, shown via media query */
}

/* Show bottom nav on tablet and mobile */
@media (max-width: 991.98px) {
    .mobile-bottom-nav {
        display: block !important;
    }
}

/* ========================================
   Fix Horizontal Scroll on Mobile
   ======================================== */
html, body {
    overflow-x: hidden;
    max-width: 100vw;
}

@media (max-width: 991.98px) {
    .container-fluid,
    .container-xxl,
    .container {
        overflow-x: hidden;
        max-width: 100vw;
        padding-left: 12px;
        padding-right: 12px;
    }
    
    .row {
        margin-left: -6px;
        margin-right: -6px;
    }
    
    .row > * {
        padding-left: 6px;
        padding-right: 6px;
    }
    
    /* Fix owl carousel overflow */
    .owl-carousel,
    .header-carousel {
        max-width: 100vw;
        overflow: hidden;
    }
    
    /* Fix clients logo track */
    .clients-logo-container {
        max-width: 100vw;
        overflow: hidden;
    }
    
    .clients-logo-track {
        gap: 40px;
    }
}

.mobile-bottom-nav .nav-items {
    display: flex;
    justify-content: space-around;
    align-items: center;
    padding: 0 8px;
    max-width: 100%;
}

.mobile-bottom-nav .nav-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-decoration: none;
    color: #6c757d;
    transition: all 0.2s ease;
    padding: 6px 12px;
    border-radius: 12px;
    flex: 1;
    max-width: 80px;
    position: relative;
}

.mobile-bottom-nav .nav-item::before {
    content: '';
    position: absolute;
    top: -8px;
    left: 50%;
    transform: translateX(-50%) scaleX(0);
    width: 20px;
    height: 3px;
    background: var(--primary-color);
    border-radius: 2px;
    transition: transform 0.2s ease;
}

.mobile-bottom-nav .nav-item:hover,
.mobile-bottom-nav .nav-item.active {
    color: var(--primary-color);
}

.mobile-bottom-nav .nav-item.active::before {
    transform: translateX(-50%) scaleX(1);
}

.mobile-bottom-nav .nav-item.active i {
    transform: scale(1.1);
}

.mobile-bottom-nav .nav-item i {
    font-size: 20px;
    margin-bottom: 4px;
    transition: transform 0.2s ease;
}

.mobile-bottom-nav .nav-item span {
    font-size: 9px;
    font-weight: 500;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 100%;
}

/* ========================================
   Mobile Sidebar for Mega Menus
   ======================================== */
.mobile-sidebar-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.5);
    z-index: 1060;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
}

.mobile-sidebar-overlay.active {
    opacity: 1;
    visibility: visible;
}

.mobile-sidebar {
    position: fixed;
    top: 0;
    right: -100%;
    width: 85%;
    max-width: 320px;
    height: 100vh;
    background: #fff;
    z-index: 1070;
    transition: right 0.3s ease;
    overflow-y: auto;
    box-shadow: -4px 0 20px rgba(0, 0, 0, 0.15);
}

.mobile-sidebar.active {
    right: 0;
}

.mobile-sidebar-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 16px 20px;
    border-bottom: 1px solid rgba(0, 128, 0, 0.1);
    background: linear-gradient(135deg, #008000 0%, #006400 100%);
    color: white;
}

.mobile-sidebar-header h5 {
    margin: 0;
    font-size: 1.1rem;
    font-weight: 600;
}

.mobile-sidebar-close {
    background: rgba(255, 255, 255, 0.2);
    border: none;
    color: white;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: background 0.2s ease;
}

.mobile-sidebar-close:hover {
    background: rgba(255, 255, 255, 0.3);
}

.mobile-sidebar-content {
    padding: 16px;
}

.mobile-sidebar-section {
    margin-bottom: 20px;
}

.mobile-sidebar-section h6 {
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--primary-color);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    padding-bottom: 8px;
    border-bottom: 2px solid var(--primary-color);
    margin-bottom: 12px;
}

.mobile-sidebar-section a {
    display: flex;
    align-items: center;
    padding: 10px 12px;
    color: #333;
    text-decoration: none;
    border-radius: 8px;
    margin-bottom: 4px;
    transition: all 0.2s ease;
    font-size: 0.9rem;
}

.mobile-sidebar-section a:hover,
.mobile-sidebar-section a.active {
    background: rgba(0, 128, 0, 0.1);
    color: var(--primary-color);
}

.mobile-sidebar-section a i {
    width: 24px;
    margin-right: 10px;
    font-size: 1rem;
}

/* ========================================
   Mobile Header Actions
   ======================================== */
.mobile-header-actions {
    gap: 8px;
}

.mobile-signin-btn {
    display: flex !important;
    align-items: center;
    padding: 2px 8px !important;
    font-size: 0.75rem !important;
    border-radius: 14px !important;
    white-space: nowrap;
    font-weight: 500;
    gap: 3px;
    box-shadow: 0 2px 4px rgba(0, 128, 0, 0.2);
    transition: all 0.2s ease;
}

.mobile-signin-btn:hover {
    transform: translateY(-1px);
    box-shadow: 0 3px 6px rgba(0, 128, 0, 0.3);
}

.mobile-signin-btn i {
    font-size: 0.75rem;
}

.mobile-avatar {
    width: 32px;
    height: 32px;
    object-fit: cover;
    border: 2px solid var(--primary-color);
}

.mobile-user-icon {
    font-size: 1.75rem;
    color: var(--primary-color);
}

/* Desktop Button Styles */
.desktop-signin-btn {
    font-size: 0.9rem;
}

.desktop-avatar {
    width: 50px;
    height: 50px;
    object-fit: cover;
    border: 2px solid var(--primary-color);
}

.desktop-user-icon {
    font-size: 2rem;
    color: var(--primary-color);
}

/* Navbar Logo */
.navbar-logo {
    height: 50px;
    opacity: 1;
    transition: opacity 0.3s ease-in-out;
}

/* ========================================
   Responsive Design
   ======================================== */
@media (max-width: 991.98px) {
    body {
        padding-bottom: 70px;
        padding-top: 100px; /* Account for top bar (40px) + navbar (60px) */
    }
    
    /* Top Bar Mobile Adjustments */
    .top-bar {
        padding: 4px 0;
        min-height: 40px;
    }
    
    .top-bar .container-fluid {
        padding-left: 0.5rem;
        padding-right: 0.5rem;
    }
    
    .social-link {
        width: 24px;
        height: 24px;
        margin-right: 2px;
    }
    
    .social-link i {
        font-size: 10px;
    }
    
    .search-input-group {
        max-width: 200px;
    }
    
    .search-input {
        padding: 5px 32px 5px 12px;
        font-size: 0.75rem;
        min-width: 150px;
    }
    
    .search-btn {
        width: 24px;
        height: 24px;
    }
    
    .search-btn i {
        font-size: 9px;
    }
    
    /* Navbar adjustments for mobile/tablet */
    .navbar {
        top: 40px !important;
        min-height: 56px;
        visibility: visible !important;
        opacity: 1 !important;
        padding: 0 !important;
    }
    
    .navbar.top-bar-hidden {
        top: 0 !important;
    }
    
    .navbar-brand {
        padding: 0.5rem !important;
    }
    
    .navbar-brand h2 {
        font-size: 1.1rem;
    }
    
    .navbar-logo {
        height: 36px !important;
    }
    
    .navbar-toggler {
        padding: 0.4rem 0.6rem;
        border: 1px solid rgba(0, 128, 0, 0.3);
    }
    
    .navbar-toggler-icon {
        width: 1.2em;
        height: 1.2em;
    }
    
    /* Mobile collapsed menu styling */
    .navbar-collapse {
        position: absolute;
        top: 100%;
        left: 0;
        right: 0;
        background: white;
        box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
        border-top: 1px solid rgba(0, 128, 0, 0.1);
        max-height: calc(100vh - 150px);
        overflow-y: auto;
    }
    
    /* Ensure collapse is hidden by default */
    .navbar-collapse:not(.show) {
        display: none !important;
    }
    
    .navbar-collapse.show {
        display: block !important;
    }
    
    .navbar-collapse.collapsing {
        display: block !important;
        height: 0;
        overflow: hidden;
        transition: height 0.35s ease;
    }
    
    .navbar-nav {
        padding: 1rem !important;
    }
    
    .navbar-nav .nav-link {
        padding: 0.75rem 1rem !important;
        border-radius: 8px;
        margin-bottom: 4px;
    }
    
    .navbar-nav .nav-link:hover {
        background-color: var(--primary-light);
    }
    
    /* Hide desktop sign-in button on mobile */
    .navbar .d-none.d-lg-block {
        display: none !important;
    }
}

@media (max-width: 576px) {
    .top-bar {
        padding: 3px 0;
        min-height: 36px;
    }
    
    .search-input-group {
        max-width: 140px;
    }
    
    .search-input::placeholder {
        font-size: 0.6rem;
    }
    
    .search-input {
        min-width: 100px;
        padding: 4px 28px 4px 10px;
    }
    
    .social-link {
        width: 20px;
        height: 20px;
    }
    
    .social-link i {
        font-size: 9px;
    }
    
    .search-btn {
        width: 22px;
        height: 22px;
    }
    
    /* Hide "Follow Us:" text on very small screens */
    .top-bar .d-none.d-md-inline {
        display: none !important;
    }
    
    /* Navbar adjustments for small mobile */
    .navbar {
        top: 36px !important;
        visibility: visible !important;
        opacity: 1 !important;
    }
    
    .navbar.top-bar-hidden {
        top: 0 !important;
    }
    
    body {
        padding-top: 92px;
        padding-bottom: 65px;
    }
    
    .navbar-brand h2 {
        font-size: 1rem;
    }
    
    .navbar-logo {
        height: 32px !important;
    }
    
    .mobile-signin-btn {
        padding: 1px 6px !important;
        font-size: 0.7rem !important;
    }
    
    .mobile-signin-btn span {
        display: inline !important;
    }
    
    .mobile-signin-btn i {
        font-size: 0.65rem !important;
    }
    
    .mobile-avatar {
        width: 28px;
        height: 28px;
    }
    
    /* Bottom nav adjustments */
    .mobile-bottom-nav .nav-item {
        padding: 4px 8px;
    }
    
    .mobile-bottom-nav .nav-item i {
        font-size: 18px;
    }
    
    .mobile-bottom-nav .nav-item span {
        font-size: 9px;
    }
}

/* Body padding for desktop */
body {
    padding-top: 108px; /* Account for top bar (48px) + navbar (60px) */
}

body.top-bar-hidden {
    padding-top: 60px; /* Only navbar height when top bar is hidden */
}

/* Desktop specific adjustments */
@media (min-width: 992px) {
    body {
        padding-top: 108px;
        padding-bottom: 0;
    }
    
    .navbar-toggler {
        display: none !important;
    }
    
    .navbar-brand h2 {
        font-size: 1.75rem;
    }
    
    .navbar-brand img {
        height: 60px !important;
    }
}

/* ========================================
   Heart Beat Animation for Donate Button
   ======================================== */
@keyframes heartBeat {
    0% { transform: scale(1); }
    14% { transform: scale(1.3); }
    28% { transform: scale(1); }
    42% { transform: scale(1.3); }
    70% { transform: scale(1); }
}

.heart-beat {
    animation: heartBeat 1s ease-in-out;
    color: #e74c3c !important;
}

.heart-beat i {
    color: #e74c3c !important;
}

/* Keep donate heart red after click - Higher specificity to override active state */
.mobile-bottom-nav .nav-items .nav-item[href*="donate"].clicked,
.mobile-bottom-nav .nav-items .nav-item[href*="donate"].clicked i,
.mobile-bottom-nav .nav-items .nav-item[href*="donate"].heart-beat,
.mobile-bottom-nav .nav-items .nav-item[href*="donate"].heart-beat i {
    color: #e74c3c !important;
}

/* Ensure donate heart is red when active and clicked */
.mobile-bottom-nav .nav-items .nav-item[href*="donate"].active.clicked,
.mobile-bottom-nav .nav-items .nav-item[href*="donate"].active.clicked i {
    color: #e74c3c !important;
}

/* ========================================
   CRITICAL: Force navbar to NEVER be hidden
   These rules have highest priority
   ======================================== */
html body .navbar,
html body nav.navbar,
html body .navbar.navbar-light,
html body .navbar.navbar-expand-lg,
html body .navbar-light.sticky-top,
html body .sticky-top.navbar-light,
body .navbar[class],
nav.navbar.navbar-expand-lg.bg-white.navbar-light {
    position: fixed !important;
    visibility: visible !important;
    opacity: 1 !important;
    display: flex !important;
    transform: none !important;
    clip: auto !important;
    clip-path: none !important;
    height: auto !important;
    min-height: 60px !important;
    overflow: visible !important;
    pointer-events: auto !important;
}

/* Ensure navbar content is visible - but NOT collapse on mobile */
html body .navbar .navbar-nav,
html body .navbar .navbar-brand {
    visibility: visible !important;
    opacity: 1 !important;
}

/* Only force navbar-collapse to flex on desktop */
@media (min-width: 992px) {
    html body .navbar .navbar-collapse {
        display: flex !important;
        visibility: visible !important;
        opacity: 1 !important;
    }
}

/* Override any jQuery or JS style changes */
.navbar[style*="top: -"],
.navbar[style*="visibility: hidden"],
.navbar[style*="display: none"],
.navbar[style*="opacity: 0"] {
    top: 48px !important;
    visibility: visible !important;
    display: flex !important;
    opacity: 1 !important;
}

.navbar.top-bar-hidden[style*="top: -"],
.navbar.top-bar-hidden[style*="visibility: hidden"],
.navbar.top-bar-hidden[style*="display: none"] {
    top: 0 !important;
    visibility: visible !important;
    display: flex !important;
    opacity: 1 !important;
}

/* ========================================
   Service Items Mobile Responsive Styles
   ======================================== */
@media (max-width: 767px) {
    .service-item {
        padding: 0 !important;
        border-radius: 12px !important;
        transition: transform 0.2s ease, box-shadow 0.2s ease;
    }
    
    .service-item:hover {
        transform: translateY(-2px);
    }
    
    .service-item .p-4 {
        padding: 16px 12px !important;
    }
    
    .service-item .fa-3x {
        font-size: 1.75rem !important;
        margin-bottom: 10px !important;
    }
    
    .service-item h5 {
        font-size: 0.95rem !important;
        margin-bottom: 8px !important;
        font-weight: 600 !important;
    }
    
    .service-item p {
        font-size: 0.8rem !important;
        line-height: 1.4 !important;
        margin-bottom: 0 !important;
        display: -webkit-box;
        -webkit-line-clamp: 2;
        line-clamp: 2;
        -webkit-box-orient: vertical;
        overflow: hidden;
    }
    
    /* Force 2 columns on mobile */
    .container-xxl .row.g-4 > [class*="col-lg-3"] {
        flex: 0 0 50% !important;
        max-width: 50% !important;
        padding: 6px !important;
    }
    
    .container-xxl .row.g-4 {
        margin: 0 -6px !important;
    }
}

@media (max-width: 576px) {
    .service-item .p-4 {
        padding: 14px 10px !important;
    }
    
    .service-item .fa-3x {
        font-size: 1.5rem !important;
        margin-bottom: 8px !important;
    }
    
    .service-item h5 {
        font-size: 0.85rem !important;
        margin-bottom: 6px !important;
    }
    
    .service-item p {
        font-size: 0.75rem !important;
        -webkit-line-clamp: 2;
        line-clamp: 2;
    }
}

/* ========================================
   Carousel Mobile Responsive Styles
   ======================================== */
@media (max-width: 768px) {
    .header-carousel .owl-carousel-item {
        height: 50vh !important;
        min-height: 300px;
    }
    
    .header-carousel .owl-carousel-item img {
        object-fit: contain !important;
        object-position: center !important;
        background-color: #f8f9fa;
    }
    
    /* Adjust content overlay for shorter carousel */
    .header-carousel .owl-carousel-item .position-absolute.bottom-0 {
        padding: 20px 0 15px !important;
    }
    
    .header-carousel .owl-carousel-item h1,
    .header-carousel .owl-carousel-item h2 {
        font-size: clamp(1.2rem, 4vw, 1.8rem) !important;
        margin-bottom: 0.5rem !important;
    }
    
    .header-carousel .owl-carousel-item h5 {
        font-size: 0.7rem !important;
        margin-bottom: 0.5rem !important;
    }
    
    .header-carousel .owl-carousel-item p {
        font-size: 0.85rem !important;
        margin-bottom: 0.5rem !important;
        display: -webkit-box;
        -webkit-line-clamp: 2;
        line-clamp: 2;
        -webkit-box-orient: vertical;
        overflow: hidden;
    }
    
    .header-carousel .owl-carousel-item .btn {
        padding: 0.4rem 1rem !important;
        font-size: 0.85rem !important;
    }
}

@media (max-width: 576px) {
    .header-carousel .owl-carousel-item {
        height: 45vh !important;
        min-height: 280px;
    }
    
    .header-carousel .owl-carousel-item .position-absolute.bottom-0 {
        padding: 15px 0 10px !important;
    }
    
    .header-carousel .owl-carousel-item h1,
    .header-carousel .owl-carousel-item h2 {
        font-size: clamp(1rem, 5vw, 1.4rem) !important;
    }
    
    .header-carousel .owl-carousel-item p {
        font-size: 0.8rem !important;
        -webkit-line-clamp: 2;
        line-clamp: 2;
    }
    
    .header-carousel .owl-carousel-item .d-flex.flex-wrap {
        flex-direction: column;
        gap: 0.5rem !important;
    }
    
    .header-carousel .owl-carousel-item .text-white.animated.slideInRight {
        font-size: 0.75rem !important;
    }
}
