/*
Theme Name: Sungai Lembing Tourism
Theme URI: https://sungailembing.gov.my
Description: Custom hybrid theme for Sungai Lembing heritage tourism website
Version: 1.0.0
Author: Hazia Hadawiyah
Text Domain: sungailembing
*/

@import url('https://fonts.googleapis.com/css2?family=DM+Sans:wght@400;500;600;700&family=Playfair+Display:ital,wght@0,400;0,500;0,600;0,700;1,400;1,500&display=swap');

    * {
        margin: 0;
        padding: 0;
        box-sizing: border-box;
    }
    
    html {
        scroll-behavior: smooth;
    }
    
    body {
        font-family: 'DM Sans', -apple-system, BlinkMacSystemFont, sans-serif;
        background: #0D1410;
        overflow-x: hidden;
    }
    
    ::selection {
        background: #C6A867;
        color: #1A241E;
    }
    
    /* --- Navigation Core --- */
    nav {
        position: fixed;
        top: 0;
        left: 0;
        right: 0;
        z-index: 1000;
        padding: 20px 40px;
        background: rgba(26, 36, 30, 0.95);
        /*background: transparent;*/
        backdrop-filter: blur(20px);
        border-bottom: 1px solid rgba(198, 168, 103, 0.1);
        transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    }
    
    /* --- Scrolled State (Consolidated) --- */
    nav.scrolled {
        padding: 12px 40px;
        background: rgba(26, 36, 30, 0.95);
        backdrop-filter: blur(20px);
        border-bottom: 1px solid rgba(198, 168, 103, 0.1);
    }
    
    /* Force links and labels to stay white/light-grey when scrolled 
       (Change #E8E4DC to #1A241E if you prefer dark text on scroll) */
    nav.scrolled .nav-links a,
    nav.scrolled .nav-links .nav-label {
        color: #E8E4DC !important; 
    }
    
    /* Scrolled Hover & Arrow Styles */
    nav.scrolled .nav-links a:hover,
    nav.scrolled .nav-item:hover .nav-label {
        color: #C6A867 !important;
    }
    
    nav.scrolled .dropdown-arrow {
        stroke: #E8E4DC; /* Arrow matches text color */
    }
    
    .nav-container {
        max-width: 1400px;
        margin: 0 auto;
        display: flex;
        justify-content: space-between;
        align-items: center;
    }
    
    .logo {
        display: flex;
        align-items: center;
        gap: 12px;
    }
    
    .logo a {
        text-decoration: none;
    }
    
    .logo-icon {
        width: 50px;
        height: 50px;
        background: linear-gradient(135deg, #C6A867 0%, #8B7355 100%);
        border-radius: 12px;
        display: flex;
        align-items: center;
        justify-content: center;
        font-family: 'Playfair Display', Georgia, serif;
        font-weight: 700;
        color: #1A241E;
        font-size: 20px;
    }
    
    .logo-text-main {
        font-family: 'Playfair Display', Georgia, serif;
        font-size: 22px;
        font-weight: 600;
        color: #FFFFFF;
        letter-spacing: 0.5px;
    }
    
    .logo-subtitle {
        font-family: 'DM Sans', sans-serif;
        font-size: 9px;
        font-weight: 500;
        color: #C6A867;
        letter-spacing: 2px;
        text-transform: uppercase;
    }
    
    .nav-links {
        display: flex;
        gap: 36px;
        align-items: center;
    }
    
    /* --- Nav Links Styling --- */
    .nav-links a, 
    .nav-links .nav-label {
        font-family: 'DM Sans', sans-serif;
        font-size: 14px;
        font-weight: 500;
        color: #E8E4DC;
        text-decoration: none;
        transition: all 0.3s ease;
        cursor: pointer;
        display: flex;
        align-items: center;
        gap: 6px;
        /* This ensures spans behave like links */
        background: none;
        border: none;
    }
    
    .nav-links a:hover,
    .nav-item:hover .nav-label {
        color: #C6A867 !important;
    }
    
    .nav-item {
        position: relative;
    }
    
    .nav-item > a,
    .nav-item > .nav-label {
        display: flex;
        align-items: center;
        gap: 6px;
    }
    
    /* --- Dropdown arrow fix --- */
    .dropdown-arrow {
        width: 12px;
        height: 12px;
        stroke: currentColor; /* Important: this makes arrow match text color automatically */
        transition: transform 0.3s ease;
    }
    
    .nav-item:hover .dropdown-arrow {
        transform: rotate(180deg);
    }
    
    .dropdown-menu {
        position: absolute;
        top: 100%;
        left: 50%;
        transform: translateX(-50%) translateY(10px);
        background: rgba(26, 36, 30, 0.98);
        backdrop-filter: blur(20px);
        border-radius: 16px;
        border: 1px solid rgba(198, 168, 103, 0.2);
        padding: 12px 0;
        min-width: 260px;
        opacity: 0;
        visibility: hidden;
        transition: all 0.3s ease;
        box-shadow: 0 12px 40px rgba(0, 0, 0, 0.3);
        z-index: 1001;
        margin-top: 20px;
    }
    
    .nav-item:hover .dropdown-menu {
        opacity: 1;
        visibility: visible;
        transform: translateX(-50%) translateY(0);
    }
    
    .dropdown-menu::before {
        content: '';
        position: absolute;
        top: -8px;
        left: 50%;
        transform: translateX(-50%);
        width: 0;
        height: 0;
        border-left: 8px solid transparent;
        border-right: 8px solid transparent;
        border-bottom: 8px solid rgba(26, 36, 30, 0.98);
    }
    
    .dropdown-item {
        display: block;
        padding: 12px 24px;
        font-family: 'DM Sans', sans-serif;
        font-size: 14px;
        font-weight: 500;
        color: #E8E4DC;
        text-decoration: none;
        transition: all 0.2s ease;
        white-space: nowrap;
    }
    
    .dropdown-item:hover {
        background: rgba(198, 168, 103, 0.15);
        color: #C6A867;
        padding-left: 28px;
    }
    
    .nav-btn {
        padding: 12px 28px;
        background: transparent;
        border: 1px solid #C6A867;
        border-radius: 100px;
        font-family: 'DM Sans', sans-serif;
        font-size: 14px;
        font-weight: 500;
        color: #C6A867;
        cursor: pointer;
        transition: all 0.3s ease;
        text-decoration: none;
        display: inline-block;
    }
    
    .nav-btn:hover {
        background: #C6A867;
        color: #1A241E;
    }
    
    .site-content {
        min-height: 60vh;
    }
    
    /* --- Footer & Form Enhancements --- */
    footer {
        background: #0D1410;
        padding: 80px 40px 40px;
    }
    
    .footer-container {
        max-width: 1400px;
        margin: 0 auto;
    }
    
    .footer-grid {
        display: grid;
        /* Rebalanced: Brand (1 part), Nav (1.5 parts), Form (1.5 parts) */
        grid-template-columns: 1fr 1.5fr 1.5fr; 
        gap: 40px; /* Reduced from 60px to gain more horizontal space */
        margin-bottom: 60px;
    }
    
    .footer-brand {
        display: flex;
        align-items: center;
        gap: 12px;
        margin-bottom: 24px;
    }
    
    .footer-brand-icon {
        width: 52px;
        height: 52px;
        background: linear-gradient(135deg, #C6A867 0%, #8B7355 100%);
        border-radius: 12px;
        display: flex;
        align-items: center;
        justify-content: center;
        font-family: 'Playfair Display', Georgia, serif;
        font-weight: 700;
        color: #1A241E;
        font-size: 22px;
    }
    
    .footer-text {
        font-family: 'DM Sans', sans-serif;
        font-size: 15px;
        color: #888;
        line-height: 1.8;
        max-width: 320px;
    }
    
    .footer-heading {
        font-family: 'DM Sans', sans-serif;
        font-size: 12px;
        font-weight: 600;
        color: #C6A867;
        letter-spacing: 2px;
        text-transform: uppercase;
        margin-bottom: 24px;
    }
    
    .footer-link {
        display: block;
        font-family: 'DM Sans', sans-serif;
        font-size: 14px;
        color: #888;
        text-decoration: none;
        margin-bottom: 12px;
        transition: color 0.3s ease;
    }
    
    .footer-link:hover {
        color: #FFFFFF;
    }
    
    .footer-bottom {
        border-top: 1px solid rgba(255, 255, 255, 0.1);
        padding-top: 30px;
        display: flex;
        justify-content: space-between;
        align-items: center;
        flex-wrap: wrap;
        gap: 20px;
    }
    
    .footer-bottom-links {
        display: flex;
        align-items: center;
        gap: 15px;
    }
    
    .dot-separator {
        color: #444;
        font-size: 10px;
    }
    
    .footer-bottom-links .footer-link {
        margin-bottom: 0; /* Override existing margin */
        font-size: 13px;
    }
    
    .footer-copyright {
        font-family: 'DM Sans', sans-serif;
        font-size: 13px;
        color: #666;
    }
    
    footer a svg:hover {
        transform: scale(1.15);
        opacity: 0.8;
    }
    
    /* --- Contact Form --- */
    .footer-contact-form {
        display: flex;
        flex-direction: column;
        gap: 12px;
    }
    
    .form-row {
        display: grid;
        grid-template-columns: 1fr 1fr;
        gap: 12px;
    }
    
    .footer-contact-form input,
    .footer-contact-form select,
    .footer-contact-form textarea {
        width: 100%;
        padding: 12px 16px;
        background: rgba(255, 255, 255, 0.05);
        border: 1px solid rgba(255, 255, 255, 0.1);
        border-radius: 8px;
        color: #FFFFFF;
        font-family: 'DM Sans', sans-serif;
        font-size: 14px;
        transition: all 0.3s ease;
    }
    
    .footer-contact-form select option {
        background: #0D1410;
    }
    
    .footer-contact-form input:focus,
    .footer-contact-form textarea:focus {
        outline: none;
        border-color: #C6A867;
        background: rgba(255, 255, 255, 0.1);
    }
    
    .form-submit-btn {
        padding: 14px;
        background: #C6A867;
        color: #1A241E;
        border: none;
        border-radius: 8px;
        font-weight: 600;
        cursor: pointer;
        transition: 0.3s ease;
    }
    
    .form-submit-btn:hover {
        background: #E8D5A3;
        transform: translateY(-2px);
    }
    
    .footer-contact-form input, .footer-contact-form select, .footer-contact-form textarea {
        background: rgba(255, 255, 255, 0.03);
        border: 1px solid rgba(255, 255, 255, 0.1);
    }
    
    /* --- Brand & Contact Info Styling --- */
    .footer-contact-details {
        margin: 20px 0 32px; /* Spacing above/below the phone numbers */
        display: flex;
        flex-direction: column;
        gap: 6px;
    }
    
    .contact-item {
        display: flex;
        align-items: center;
        font-family: 'DM Sans', sans-serif;
    }

    .contact-label {
        color: #C6A867;
        font-size: 13px;
        font-weight: 600;
        margin-right: 8px;
    }
    
    .contact-link {
        color: #E8E4DC;
        text-decoration: none;
        font-size: 14px;
        transition: 0.3s;
    }
    
    .contact-link:hover { color: #FFFFFF; }
    
    /* --- Navigation Group Column --- */
    .footer-col-nav {
        display: flex;
        justify-content: flex-start;
        gap: 50px; /* Space between Explore column and Visit column */
    }

    .footer-nav-group {
        flex: 1; /* Allows both columns to share the space equally */
        min-width: fit-content; /* Prevents text from wrapping too early */
    }
    
    /* --- Integrated Social Styling --- */
    .footer-social-wrapper {
        margin-top: 32px;
    }
    
    .social-heading {
        font-family: 'DM Sans', sans-serif;
        font-size: 12px;
        font-weight: 600;
        color: #C6A867;
        letter-spacing: 2px;
        text-transform: uppercase;
        margin-bottom: 24px;
    }
    
    .social-sub {
        font-family: 'DM Sans', sans-serif;
        font-size: 15px;
        color: #888;
        line-height: 1.8;
        max-width: 320px;
    }
    
    .social-icons-row {
        display: flex;
        gap: 12px;
    }
    
    .social-icon-mini {
        width: 40px;
        height: 40px;
        background: rgba(255, 255, 255, 0.05);
        border-radius: 8px;
        display: flex;
        align-items: center;
        justify-content: center;
        color: #FFFFFF;
        transition: 0.3s ease;
        text-decoration: none;
    }
    
    .social-icon-mini:hover {
        background: #C6A867;
        color: #1A241E;
        transform: translateY(-3px);
    }

    /* Collaborators Section */
    .collaborators-section {
        padding: 80px 0; /* Vertical padding only */
        background: #FFFFFF;
        border-bottom: 1px solid #F0EFEA;
    }
    
    .section-eyebrow {
        font-family: 'DM Sans', sans-serif;
        font-size: 12px;
        font-weight: 600;
        letter-spacing: 3px;
        text-transform: uppercase;
        color: #2D5A3D;
        margin-bottom: 16px;
    }
    
    /* Container for the scroll effect */
    .logo-scroll-wrapper {
        width: 100%;
        overflow-x: auto;
        scroll-behavior: smooth;
        /* Increased padding (Top: 60px, Bottom: 80px) provides space for scale and tooltips */
        padding: 60px 0 80px; 
        -ms-overflow-style: none;
        scrollbar-width: none;
    }
    
    .logo-scroll-wrapper::-webkit-scrollbar {
        display: none;
    }
    
    .logo-grid {
        display: flex;
        flex-wrap: nowrap; /* FORCES ONE LINE */
        align-items: center;
        gap: 80px; /* Wider gap looks better in a slider */
        width: max-content; /* Ensures the grid expands horizontally */
        padding: 0 40px;
        margin: 0 auto;
    }
    
    .logo-item {
        position: relative;
        width: 140px;
        height: 80px;
        display: flex;
        flex-shrink: 0;
        align-items: center;
        justify-content: center;
        transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
        z-index: 1; /* Normal state */
    }
    
    /* Scroll Animation End State (Triggered by JS) */
    .logo-item.in-view {
        opacity: 1;
        transform: translateY(0);
    }
    
    .logo-item img {
        max-width: 100%;
        max-height: 100%;
        object-fit: contain;
    }
    
    .logo-item:hover {
        transform: scale(1.2); /* Slightly larger zoom */
        z-index: 20; /* Brings the enlarged logo to the absolute front */
    }
    
    /* Tooltip Styling */
    .logo-item::after {
        content: attr(data-title);
        position: absolute;
        bottom: -35px;
        left: 50%;
        transform: translateX(-50%) translateY(10px);
        background: #1A241E;
        color: #C6A867;
        padding: 6px 12px;
        border-radius: 6px;
        font-family: 'DM Sans', sans-serif;
        font-size: 11px;
        font-weight: 600;
        white-space: nowrap;
        opacity: 0;
        visibility: hidden;
        transition: all 0.3s ease;
        pointer-events: none;
        z-index: 10;
    }
    
    .logo-item:hover::after {
        opacity: 1;
        visibility: visible;
        transform: translateX(-50%) translateY(0);
    }
    
    /* Slider Container Logic */
    .logo-slider-container {
        position: relative;
        max-width: 1200px;
        margin: 0 auto;
        display: flex;
        align-items: center;
    }
    
    /* Gradient Fades on the edges */
    .fade-edge {
        position: absolute;
        top: 0;
        bottom: 0;
        width: 80px;
        z-index: 5;
        pointer-events: none; /* Allows clicking through the fade */
    }
    .fade-edge.left { left: 0; background: linear-gradient(to right, #FFFFFF, transparent); }
    .fade-edge.right { right: 0; background: linear-gradient(to left, #FFFFFF, transparent); }
    
    /* Elegant Navigation Arrows */
    .slider-nav {
        position: absolute;
        top: 50%;
        transform: translateY(-50%);
        width: 44px;
        height: 44px;
        background: rgba(255, 255, 255, 0.9);
        border: 1px solid #E5E5E5;
        border-radius: 50%;
        color: #2D5A3D;
        font-size: 18px;
        cursor: pointer;
        z-index: 10;
        display: flex;
        align-items: center;
        justify-content: center;
        transition: all 0.3s ease;
        box-shadow: 0 4px 12px rgba(0,0,0,0.05);
    }
    
    .slider-nav:hover {
        background: #2D5A3D;
        color: #FFFFFF;
        border-color: #2D5A3D;
        box-shadow: 0 8px 20px rgba(45, 90, 61, 0.2);
    }
    
    .slider-nav.prev { left: -22px; }
    .slider-nav.next { right: -22px; }
    
    .mobile-menu-toggle {
        display: none; /* Change this from 'flex' to 'none' */
        flex-direction: column;
        gap: 6px;
        background: none;
        border: none;
        cursor: pointer;
        z-index: 1100;
    }
    
    .mobile-menu-toggle .bar {
        width: 30px;
        height: 2px;
        background-color: #C6A867;
        transition: all 0.3s ease;
    }
    
    @media (max-width: 1100px) {
        .footer-grid {
            grid-template-columns: 1fr 1fr; /* Brand and Nav on top, Form moves below */
        }
        .footer-col-form {
            grid-column: span 2;
        }
    }

    @media (max-width: 768px) {
        /* Show the hamburger button */
        .mobile-menu-toggle {
            display: flex;
        }
    
        /* Style the nav-links as a mobile drawer */
        .nav-links {
            display: flex; /* Override the display: none */
            position: fixed;
            top: 0;
            right: -100%; /* Hidden by default */
            width: 80%;
            height: 100vh;
            background: rgba(13, 20, 16, 0.98);
            backdrop-filter: blur(20px);
            flex-direction: column;
            padding: 100px 40px;
            transition: right 0.4s cubic-bezier(0.4, 0, 0.2, 1);
            gap: 30px;
            align-items: flex-start;
        }
    
        /* When menu is active */
        .nav-links.active {
            right: 0;
        }
    
        /* Handle Dropdowns on Mobile */
        .nav-item .dropdown-menu {
            position: static;
            display: none;
            left: auto !important;         /* Cancels the 50% from desktop */
            transform: none !important;    /* Cancels the translateX(-50%) */
            transition: none !important;   /* Cancels the slide animation */
            opacity: 1;
            visibility: visible;
            background: transparent;
            border: none;
            box-shadow: none;
            padding: 0 0 0 20px;
            margin-top: 10px;
            width: 100%;
        }
        
        /* Ensure it doesn't try to animate opacity or visibility either */
        .nav-item:hover .dropdown-menu {
            transform: none !important;
            opacity: 1 !important;
        }
        
        /* Remove the little triangle/arrow pointing up on mobile */
        .dropdown-menu::before {
            display: none;
        }
    
        .nav-item.active .dropdown-menu { display: block; }
    
        .nav-item.active .dropdown-arrow { transform: rotate(180deg); }
        
        .nav-item.active > .nav-label,
        .nav-item.active > a {
            color: #C6A867 !important;
            font-weight: 700;
        }
        
        .footer-grid { grid-template-columns: 1fr; }
        
        .footer-col-form { grid-column: span 1; }
        
        .footer-col-nav { gap: 20px; /* Tighter gap on mobile */ justify-content: space-between; }
        
        .footer-bottom { justify-content: center; text-align: center; }
        
        .footer-bottom-links { justify-content: center; width: 100%; }
        
        .form-row { grid-template-columns: 1fr; }
        
        .logo-grid { gap: 40px; }
        
        .logo-item { width: 100px; height: 60px; }
    }