/*
Theme Name: You First Tours Premium Theme
Author: Fixy Web
Author URI: https://www.facebook.com/fixyweb/
Description: SEO-Optimized, Mobile-Friendly, Premium Tour Theme.
Version: 1.2
*/

:root {
    /* DEFAULT: LIGHT THEME (BLUE BRANDING) */
    --bg-main: #f4f7f6;      
    --bg-card: #ffffff;      
    --bg-header: rgba(255, 255, 255, 0.95);
    
    --primary: #0a4275;      /* Deep Trust Blue */
    --accent: #0066cc;       /* Vibrant Action Blue */
    
    --text-main: #1d1d1f;    
    --text-muted: #555555;   
    --text-dark: #ffffff;    /* For buttons (inverted) */
    
    --border-color: rgba(0, 0, 0, 0.08);
    
    --radius-pill: 50px;
    --radius-lg: 24px;
    --radius-md: 16px;
    
    --transition: all 0.3s ease;
}

/* DARK THEME */
body.dark-mode {
    --bg-main: #061224;
    --bg-card: #0f1c35;
    --bg-header: rgba(6, 18, 36, 0.95);
    --primary: #2563eb;
    --accent: #3b82f6; 
    --text-main: #ffffff;
    --text-muted: #94a3b8;
    --text-dark: #ffffff;
    --border-color: rgba(255, 255, 255, 0.1);
}

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

body { 
    font-family: "Inter", -apple-system, sans-serif; 
    background-color: var(--bg-main); 
    color: var(--text-main); 
    line-height: 1.6; 
    -webkit-font-smoothing: antialiased;
    transition: background-color 0.3s, color 0.3s;
    overflow-x: clip; /* Fix horizontal scroll without breaking position:sticky */
}

a { text-decoration: none; color: inherit; transition: var(--transition); }
ul { list-style: none; }
img { max-width: 100%; height: auto; border-radius: var(--radius-md); }

/* Balances left/right margins nicely */
.container { width: 100%; max-width: 1200px; margin: 0 auto; padding: 0 20px; }

/* --- Smooth Animations --- */
.animate-fade-up { opacity: 0; transform: translateY(30px); transition: opacity 0.6s cubic-bezier(0.2, 0.8, 0.2, 1), transform 0.6s cubic-bezier(0.2, 0.8, 0.2, 1); }
.animate-fade-up.is-visible { opacity: 1; transform: translateY(0); }

/* --- Header & Theme Toggle --- */
.site-header { background: var(--bg-header); backdrop-filter: blur(20px); -webkit-backdrop-filter: blur(20px); position: fixed; width: 100%; top: 0; z-index: 1000; border-bottom: 1px solid var(--border-color); box-shadow: 0 2px 10px rgba(0,0,0,0.02); }
.nav-wrapper { display: flex; justify-content: space-between; align-items: center; height: 80px; }
.logo { font-size: 24px; font-weight: 800; letter-spacing: -0.5px; color: var(--primary); display: flex; align-items: center; gap: 10px; }
.logo span { color: var(--accent); }
.custom-logo { max-height: 50px; width: auto; } /* Fix standard WP logo size */

.nav-links { display: flex; gap: 30px; align-items: center; }
.nav-links li a { font-size: 15px; font-weight: 600; color: var(--text-main); opacity: 0.85; }
.nav-links li a i { display: none; } /* Hide icons on desktop */
.nav-links li a:hover, .nav-links li.current-menu-item a { opacity: 1; color: var(--accent); }

.theme-toggle { background: var(--bg-card); border: 1px solid var(--border-color); color: var(--accent); width: 40px; height: 40px; border-radius: 50%; cursor: pointer; display: flex; justify-content: center; align-items: center; font-size: 16px; transition: var(--transition); box-shadow: 0 2px 5px rgba(0,0,0,0.05); }
.theme-toggle:hover { transform: scale(1.05); }
.hamburger { display: none; font-size: 24px; cursor: pointer; color: var(--text-main); }

/* --- Buttons --- */
.btn-primary { background-color: var(--accent); color: white !important; padding: 14px 32px; border-radius: var(--radius-pill); font-size: 16px; font-weight: 700; border: none; cursor: pointer; display: inline-flex; justify-content: center; align-items: center; gap: 10px; transition: var(--transition); box-shadow: 0 4px 15px rgba(0, 102, 204, 0.2); }
.btn-primary:hover { transform: translateY(-2px); box-shadow: 0 6px 20px rgba(0, 102, 204, 0.3); }
.btn-outline { background-color: transparent; color: var(--text-main); border: 2px solid var(--border-color); padding: 12px 30px; border-radius: var(--radius-pill); font-size: 16px; font-weight: 600; display: inline-flex; justify-content: center; align-items: center; gap: 10px; transition: var(--transition); }
.btn-outline:hover { background-color: var(--accent); color: white; border-color: var(--accent); }
.btn-whatsapp { background-color: #25D366; color: white; padding: 14px 32px; border-radius: var(--radius-pill); font-size: 16px; font-weight: 700; display: inline-flex; justify-content: center; align-items: center; gap: 10px; transition: var(--transition); border: none; cursor: pointer; box-shadow: 0 4px 15px rgba(37, 211, 102, 0.2); }
.btn-whatsapp:hover { background-color: #1ebd5a; transform: translateY(-2px); box-shadow: 0 6px 20px rgba(37, 211, 102, 0.3); color: white;}

/* --- Hero Section --- */
.hero { height: 100vh; display: flex; flex-direction: column; align-items: center; justify-content: center; text-align: center; background: radial-gradient(circle at 50% -20%, rgba(0, 102, 204, 0.08) 0%, transparent 60%); padding-top: 80px; }
.hero-badge { display: inline-flex; align-items: center; gap: 10px; background: var(--bg-card); border: 1px solid var(--border-color); padding: 8px 24px; border-radius: var(--radius-pill); font-size: 14px; font-weight: 600; margin-bottom: 30px; color: var(--primary); box-shadow: 0 4px 15px rgba(0,0,0,0.03); }
.hero-badge span { color: var(--accent); font-size: 10px; }
.hero-title { font-size: clamp(2.5rem, 5vw, 4rem); font-weight: 900; line-height: 1.1; letter-spacing: -2px; margin-bottom: 25px; color: var(--primary); }
.hero-title .highlight { color: var(--accent); }
.hero-subtitle { font-size: 1.25rem; font-weight: 500; color: var(--text-muted); max-width: 650px; margin: 0 auto 40px; }
.hero-buttons { display: flex; gap: 16px; justify-content: center; flex-wrap: wrap; }

/* --- Global Sections & SEO Blocks --- */
.section-padding { padding-top: 80px; padding-bottom: 80px; }
.section-title { text-align: center; margin-bottom: 50px; }
.section-title h2 { font-size: 40px; font-weight: 800; letter-spacing: -1.5px; margin-bottom: 15px; color: var(--primary); }
.section-title p { color: var(--text-muted); font-size: 18px; max-width: 700px; margin: 0 auto; }

/* Services / SEO Grid */
.service-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: 30px; margin-bottom: 60px; }
.service-card { background: var(--bg-card); padding: 40px 30px; border-radius: var(--radius-lg); text-align: center; border: 1px solid var(--border-color); box-shadow: 0 4px 20px rgba(0,0,0,0.02); transition: var(--transition); }
.service-card:hover { transform: translateY(-5px); border-color: var(--accent); box-shadow: 0 10px 30px rgba(0,102,204,0.1); }
.service-card i { font-size: 40px; color: var(--accent); margin-bottom: 20px; }
.service-card h3 { font-size: 22px; font-weight: 700; margin-bottom: 15px; color: var(--primary); }
.service-card p { color: var(--text-muted); font-size: 15px; line-height: 1.7; }

/* Certifications Grid */
.cert-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: 30px; margin-top: 40px; }
.cert-card { background: var(--bg-card); padding: 40px 30px; border-radius: var(--radius-lg); border: 1px solid var(--border-color); text-align: center; box-shadow: 0 4px 20px rgba(0,0,0,0.03); transition: var(--transition); }
.cert-card:hover { transform: translateY(-5px); border-color: var(--accent); box-shadow: 0 10px 30px rgba(0,102,204,0.1); }
.cert-icon i { font-size: 50px; color: var(--accent); margin-bottom: 25px; }
.cert-img { width: 100%; height: 200px; object-fit: contain; margin-bottom: 25px; background: var(--bg-main); border-radius: var(--radius-md); padding: 15px; }
.cert-card h4 { font-size: 20px; font-weight: 700; color: var(--primary); margin-bottom: 12px; }
.cert-card p { font-size: 15px; color: var(--text-muted); line-height: 1.6; }

/* --- Tour Grid --- */
.tour-filters { display: flex; justify-content: center; gap: 10px; margin-bottom: 40px; flex-wrap: wrap; }
.filter-btn { padding: 10px 24px; border-radius: 30px; border: 1px solid var(--border-color); background: var(--bg-card); color: var(--text-muted); font-weight: 600; cursor: pointer; transition: var(--transition); font-size: 14px; }
.filter-btn:hover, .filter-btn.active { background: var(--accent); color: white; border-color: var(--accent); }

.tour-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(320px, 1fr)); gap: 40px; }
.tour-card { background: var(--bg-card); border-radius: var(--radius-lg); overflow: hidden; transition: var(--transition); border: 1px solid rgba(0,0,0,0.03); display: flex; flex-direction: column; position: relative; box-shadow: 0 10px 30px rgba(0,0,0,0.05); }
.tour-card:hover { transform: translateY(-10px); border-color: rgba(0,102,204,0.1); box-shadow: 0 20px 40px rgba(0,102,204,0.12); }
.img-wrapper { position: relative; width: 100%; height: 260px; overflow: hidden; border-radius: var(--radius-lg) var(--radius-lg) 0 0; background: var(--bg-main); }
.img-wrapper::after { content:''; position:absolute; top:0; left:0; right:0; bottom:0; background: linear-gradient(to bottom, rgba(0,0,0,0.2) 0%, rgba(0,0,0,0) 40%, rgba(0,0,0,0.1) 100%); pointer-events:none; }
.card-img { width: 100%; height: 100%; object-fit: cover; border-radius: 0; transition: transform 0.6s cubic-bezier(0.2, 0.8, 0.2, 1); }
.tour-card:hover .card-img { transform: scale(1.08); }
.tour-badge { position: absolute; top: 18px; left: 18px; background: var(--bg-card); padding: 8px 16px; border-radius: var(--radius-pill); font-size: 13px; font-weight: 800; color: var(--accent); box-shadow: 0 4px 15px rgba(0,0,0,0.15); z-index: 2; }
.card-content { padding: 30px; display: flex; flex-direction: column; flex-grow: 1; }
.card-content h3 { font-size: 22px; font-weight: 800; margin-bottom: 12px; letter-spacing: -0.5px; line-height: 1.4; color: var(--primary); transition: color 0.3s ease; }
.tour-card:hover .card-content h3 { color: var(--accent); }
.tour-meta { display: flex; gap: 15px; color: var(--text-muted); font-size: 14px; margin-bottom: 25px; font-weight: 600; align-items: center; }
.tour-meta i { font-size: 16px; margin-right: 4px; color: var(--accent); }
.card-footer { margin-top: auto; display: flex; justify-content: space-between; align-items: center; border-top: 1px solid rgba(0,0,0,0.05); padding-top: 25px; }
.card-price { color: var(--accent); font-weight: 900; font-size: 26px; letter-spacing: -0.5px; }
.card-price span { font-size: 14px; color: var(--text-muted); font-weight: 600; margin-left: 3px; }
.card-footer .btn-outline { padding: 10px 22px; border-width: 2px; }

/* --- Tour Gallery & Content Styling --- */
.tour-gallery-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; margin-bottom: 50px; }
.tour-gallery-grid img { width: 100%; height: 300px; object-fit: cover; border-radius: var(--radius-md); transition: transform 0.4s ease; cursor: pointer; display: block; }
.tour-gallery-grid img:hover { transform: scale(1.05); }

/* Main layout grid for single tours */
.tour-layout-grid { display: grid; grid-template-columns: 2fr 1fr; gap: 40px; align-items: start; margin-bottom: 60px; }

@media (max-width: 992px) {
    .tour-gallery-grid { grid-template-columns: repeat(2, 1fr); }
    .tour-gallery-grid img { height: 250px; }
    .tour-layout-grid { 
        display: flex; 
        flex-direction: column; 
        gap: 30px; 
        align-items: stretch;
    }
    .tour-layout-grid > div,
    .tour-layout-grid > aside {
        width: 100%;
    }
}
@media (max-width: 576px) {
    .tour-gallery-grid { grid-template-columns: 1fr; }
}

.content-formatted { font-size: 15px; color: var(--text-muted); line-height: 1.8; }
.content-formatted h2 { font-size: 28px; color: var(--primary); font-weight: 900; margin: 40px 0 20px; border-bottom: 1px solid var(--border-color); padding-bottom: 15px; }
.content-formatted h3 { font-size: 20px; color: var(--primary); font-weight: 800; margin: 30px 0 15px; }
.content-formatted p { margin-bottom: 20px; color: var(--text-muted); }
.content-formatted ul { margin-bottom: 30px; padding-left: 0; list-style-type: none; }
.content-formatted li { margin-bottom: 12px; position: relative; padding-left: 30px; color: var(--text-muted); font-weight: 500; }
.content-formatted li::before { 
    content: '\f058'; 
    font-family: 'Font Awesome 6 Free'; 
    font-weight: 900; 
    color: var(--accent); 
    position: absolute; left: 0; top: 2px; font-size: 18px;
}

/* MAGIC ITINERARY STYLING (H4 + P) */
.content-formatted h4 {
    background: rgba(0, 102, 204, 0.05);
    padding: 15px 20px;
    border-left: 4px solid var(--accent);
    border-radius: 8px 8px 0 0;
    margin: 30px 0 0 0;
    color: var(--primary);
    font-weight: 800;
    font-size: 17px;
}
.content-formatted h4 + p {
    background: rgba(0, 102, 204, 0.02);
    padding: 15px 20px;
    border-left: 4px solid var(--accent);
    border-radius: 0 0 8px 8px;
    margin-top: 0;
    margin-bottom: 25px;
    border-top: 1px solid rgba(0,0,0,0.03);
    color: var(--text-muted);
}

/* --- Footer --- */
footer { background-color: var(--bg-card); color: var(--text-main); padding: 80px 20px 100px; border-top: 1px solid var(--border-color); }
.footer-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(250px, 1fr)); gap: 40px; max-width: 1200px; margin: 0 auto 50px; }
.footer-col h3 { font-size: 20px; margin-bottom: 24px; font-weight: 800; color: var(--primary); }
.footer-col p { color: var(--text-muted); margin-bottom: 15px; }
.footer-links li { margin-bottom: 12px; }
.footer-links a { color: var(--text-muted); font-weight: 600; }
.footer-links a:hover { color: var(--accent); }
.footer-bottom { text-align: center; border-top: 1px solid var(--border-color); padding-top: 24px; color: var(--text-muted); font-size: 14px; }

/* --- Floating Elements --- */
.wa-float { position: fixed; bottom: 90px; right: 20px; background-color: #25D366; color: white; width: 60px; height: 60px; border-radius: 50%; display: flex; justify-content: center; align-items: center; font-size: 32px; box-shadow: 0 10px 20px rgba(37,211,102,0.3); z-index: 998; transition: var(--transition); }
.wa-float:hover { transform: scale(1.1); color: white; }

.contact-form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; margin-bottom: 20px; }

.mobile-bottom-nav { display: none; position: fixed; bottom: 0; left: 0; width: 100%; background: var(--bg-card); border-top: 1px solid var(--border-color); z-index: 999; padding: 10px 0; justify-content: space-around; box-shadow: 0 -5px 20px rgba(0,0,0,0.05); }
.mobile-nav-item { display: flex; flex-direction: column; align-items: center; color: var(--text-muted); font-size: 10px; font-weight: 600; gap: 4px; }
.mobile-nav-item i { font-size: 18px; }
.mobile-nav-item.active { color: var(--accent); }

/* Hide mobile menu footer and drawer header on desktop */
.mobile-menu-footer, .drawer-header { display: none; }

/* --- Beautiful Mobile Menu & Margins --- */
@media (max-width: 768px) {
    body { font-size: 13px; }
    p { font-size: 13px; line-height: 1.6; }
    
    .container { padding: 0 15px; } /* Perfect balanced margins on mobile */
    
    /* Fix large inline page titles on mobile */
    h1[style*="clamp"], h1[style*="font-size"] { font-size: 24px !important; line-height: 1.2 !important; }
    .hero-title { font-size: 24px !important; }
    .hero-subtitle { font-size: 13px; margin-bottom: 20px; }
    
    .section-title { margin-bottom: 30px !important; }
    .section-title h2 { font-size: 24px !important; margin-bottom: 12px; line-height: 1.2 !important; }
    .section-title p { font-size: 13px; }
    
    /* Ensure uniform spacing everywhere on mobile */
    .section-padding { padding-top: 50px !important; padding-bottom: 50px !important; }
    
    /* Fix Full-Width Margin Issues (Grid minmax overflowing container) */
    .container { padding-left: 20px !important; padding-right: 20px !important; }
    .tour-grid, .service-grid, .cert-grid { grid-template-columns: 1fr !important; gap: 25px; }
    div[style*="minmax("] { grid-template-columns: 1fr !important; }
    
    /* Shrink service cards and cert cards */
    .service-card, .cert-card { padding: 25px 20px; }
    .service-card i, .cert-icon i { font-size: 32px; margin-bottom: 12px; }
    .service-card h3, .cert-card h4 { font-size: 17px; margin-bottom: 10px; }
    .service-card p, .cert-card p { font-size: 13px; line-height: 1.5; }
    
    /* Fix tour card footer text wrapping */
    .card-price[style] { font-size: 15px !important; }
    .card-price { font-size: 15px !important; }
    .card-footer .btn-outline { padding: 8px 15px !important; font-size: 13px !important; }
    
    /* Beautiful Scrollable Filters for Mobile */
    .tour-filters { 
        flex-wrap: nowrap !important; 
        overflow-x: auto; 
        justify-content: flex-start !important; 
        padding-bottom: 10px; 
        gap: 10px; 
        -webkit-overflow-scrolling: touch; 
        scrollbar-width: none; 
        margin-left: -15px; /* Pull to screen edge */
        margin-right: -15px; 
        padding-left: 15px; 
        padding-right: 15px;
    }
    .tour-filters::-webkit-scrollbar { display: none; }
    .tour-filters .filter-btn { flex: 0 0 auto; white-space: nowrap; font-size: 13px; padding: 8px 18px; }
    
    /* Keep 2 buttons side by side instead of stacking */
    .hero-buttons { display: flex; flex-direction: row; flex-wrap: nowrap; gap: 10px; width: 100%; justify-content: center; }
    .btn-primary, .btn-outline { padding: 12px 20px !important; font-size: 14px !important; white-space: nowrap !important; overflow: hidden; text-overflow: ellipsis; max-width: 100%; }
    .hero-buttons .btn-primary, .hero-buttons .btn-outline { flex: 1; padding: 12px 5px !important; font-size: 13px !important; min-width: 0; }
    
    .btn-whatsapp { padding: 10px 20px; font-size: 13px; white-space: nowrap !important; }
    
    .contact-form-row { display: grid; grid-template-columns: 1fr; gap: 20px; margin-bottom: 20px; }
    
    .card-content h3 { font-size: 16px; margin-bottom: 8px; }
    .card-price { font-size: 18px; }
    .tour-meta span { font-size: 12px; }
    
    .content-formatted { font-size: 13px; }
    .content-formatted p, .content-formatted li { font-size: 13px !important; }
    .content-formatted h2 { font-size: 20px; }
    .content-formatted h3 { font-size: 17px; }
    .content-formatted h4 { font-size: 15px; }
    
    .mobile-nav-container { 
        position: fixed; top: 0; right: -120%; width: 300px; max-width: 85vw; height: 100vh; height: 100dvh; 
        background: var(--bg-card); flex-direction: column; display: flex;
        transition: right 0.4s cubic-bezier(0.25, 0.8, 0.25, 1), box-shadow 0.4s ease;
        z-index: 10001; opacity: 1; visibility: visible;
        box-shadow: 0 0 0 0 rgba(0,0,0,0);
    }
    .mobile-nav-container.active { 
        right: 0; 
        box-shadow: 0 0 0 10000px rgba(0,0,0,0.5), -15px 0 40px rgba(0,0,0,0.1); 
    }
    
    .drawer-header {
        display: flex; justify-content: space-between; align-items: center;
        padding: 20px 25px 10px; border-bottom: none;
    }
    .drawer-header .drawer-title { font-size: 13px; font-weight: 800; text-transform: uppercase; letter-spacing: 2px; color: var(--text-muted); }
    .drawer-header .drawer-close { background: transparent; border: none; font-size: 22px; color: var(--text-main); cursor: pointer; transition: color 0.3s ease; padding: 0; }
    .drawer-header .drawer-close:hover { color: var(--accent); }
    
    .nav-links {
        position: relative; right: auto; width: 100%; height: auto;
        background: transparent; padding: 10px 25px 20px;
        box-shadow: none; z-index: auto; flex: 1; overflow-y: auto;
        display: flex; flex-direction: column; justify-content: flex-start; align-items: stretch;
        gap: 0;
    }
    
    .nav-links li { width: 100%; border-bottom: none; margin: 0; padding: 0; opacity: 1; transform: none; transition: none; }
    .nav-links li:last-child { border-bottom: none; }
    
    .nav-links li a { 
        display: flex; align-items: center; width: 100%; gap: 12px;
        background: transparent; border: none; border-radius: 0;
        padding: 10px 0; font-size: 14px !important; font-weight: 600; color: var(--text-main) !important; 
        box-shadow: none; transition: transform 0.3s ease, color 0.3s ease; text-align: left;
        text-decoration: none;
    }
    
    .nav-links li a i {
        display: inline-block !important; font-size: 16px; color: var(--accent); width: 22px; text-align: center;
    }
    
    .nav-links li a:hover { background: transparent; color: var(--accent) !important; padding-left: 0; box-shadow: none; transform: translateX(5px); }
    
    .mobile-menu-footer { 
        display: block; padding: 25px 25px 70px 25px; background: rgba(0,0,0,0.02); 
        border-top: 1px solid rgba(0,0,0,0.05); margin-top: auto;
    }
    .mobile-menu-footer .menu-logo { font-size: 16px; font-weight: 800; color: var(--primary); margin-bottom: 12px; display: flex; align-items: center; gap: 8px; }
    .mobile-menu-footer .menu-logo i { color: var(--accent); font-size: 14px; }
    .mobile-menu-footer .menu-logo span { color: var(--accent); }
    .mobile-menu-footer .menu-contact p { font-size: 12px; color: var(--text-muted); margin-bottom: 8px; display: flex; gap: 8px; align-items: center; }
    .mobile-menu-footer .menu-contact p i { color: var(--accent); font-size: 13px; width: 14px; text-align: center; }
    .mobile-menu-footer .menu-social { display: flex; gap: 12px; margin-top: 15px; }
    .mobile-menu-footer .menu-social a { color: var(--text-muted); font-size: 16px; transition: color 0.3s ease; }
    .mobile-menu-footer .menu-social a:hover { color: var(--accent); }
    
    .hamburger { display: flex !important; align-items: center; justify-content: center; position: relative; font-size: 24px; color: var(--text-main); width: 30px; height: 30px; }
    .theme-toggle { margin-right: 10px; position: relative; }
    .logo { font-size: 18px; gap: 5px; }
    
    .mobile-bottom-nav { display: flex; }
    body { padding-bottom: 80px !important; }
    footer { padding-bottom: 40px !important; }
    .wa-float { bottom: 80px; width: 50px; height: 50px; font-size: 26px; }

    /* Fix Mobile Blank Loading Issue */
    .animate-fade-up {
        opacity: 1 !important;
        transform: none !important;
        transition: none !important;
    }
}
