/*
Theme Name: TravelBestPlan
Author: SimplyIrfan
Description: Premium Travel & Destination Guide Theme
Version: 3.3
Text Domain: travelbestplan
*/

:root {
    --primary: #1a1a1a;
    --primary-dark: #0f0f0f;
    --accent: #e67e22; /* Premium Orange */
    --accent-hover: #d35400;
    --text: #444;
    --text-light: #666;
    --bg-light: #f9f9f9;
    --white: #ffffff;
    --border-color: #eee;
    --shadow-card: 0 15px 35px rgba(0,0,0,0.08);
    --shadow-hover: 0 20px 40px rgba(0,0,0,0.12);
    --font-head: 'Montserrat', sans-serif;
    --font-body: 'Open Sans', sans-serif;
    --radius: 12px;
}

/* Reset & Base Typography */
* { box-sizing: border-box; }
body { 
    margin: 0; 
    font-family: var(--font-body); 
    color: var(--text); 
    line-height: 1.8; 
    background: #fff; 
    font-size: 17px; 
    -webkit-font-smoothing: antialiased;
}
a { text-decoration: none; color: inherit; transition: 0.3s; }
img { max-width: 100%; height: auto; display: block; }
h1, h2, h3, h4, h5, h6 { font-family: var(--font-head); color: var(--primary); font-weight: 700; line-height: 1.3; margin-bottom: 20px; }

.container { max-width: 1200px; margin: 0 auto; padding: 0 25px; }

/* ---------------------------------------------------------
   HEADER & NAV
--------------------------------------------------------- */
.site-header {
    background: var(--white);
    position: sticky;
    top: 0;
    z-index: 1000;
    box-shadow: 0 2px 15px rgba(0,0,0,0.05);
    transition: all 0.3s ease;
}
.header-wrap { display: flex; justify-content: space-between; align-items: center; padding: 15px 0; }

.logo a {
    font-family: var(--font-head);
    font-weight: 800;
    font-size: 1.6rem;
    color: var(--primary);
    text-transform: uppercase;
    letter-spacing: -0.5px;
    white-space: nowrap;
}
.logo span { color: var(--accent); }

/* Desktop Navigation Default */
.main-nav { display: block; }
.main-nav ul { list-style: none; display: flex; gap: 30px; margin: 0; padding: 0; }
.main-nav a { font-weight: 600; font-size: 0.85rem; text-transform: uppercase; color: var(--primary); letter-spacing: 0.5px; }
.main-nav a:hover { color: var(--accent); }
.menu-toggle { display: none; background: none; border: none; font-size: 1.5rem; cursor: pointer; color: var(--primary); padding: 0; }

/* --- GLOBAL PREMIUM HEADER OVERRIDE --- */
/* Applies to Home, Single, Archive, Page, City Landing AND Region Landing templates on Desktop */
@media (min-width: 992px) {
    body.home .site-header, 
    body.single .site-header,
    body.archive .site-header,
    body.category .site-header,
    body.tag .site-header,
    body.search .site-header,
    body.page .site-header,
    body.page-template-template-city-landing .site-header,
    body.page-template-template-region-landing .site-header,
    body.page-template-template-region-landing-php .site-header {
        background: linear-gradient(to bottom, rgba(0,0,0,0.7) 0%, rgba(0,0,0,0) 100%) !important;
        position: absolute;
        width: 100%;
        top: 0;
        left: 0;
        z-index: 999;
        border-bottom: 1px solid rgba(255,255,255,0.15);
        box-shadow: none;
    }
    
    /* White Text for Transparent Header */
    body.home .logo a, 
    body.single .logo a,
    body.archive .logo a,
    body.category .logo a,
    body.tag .logo a,
    body.search .logo a,
    body.page .logo a,
    body.page-template-template-city-landing .logo a,
    body.page-template-template-region-landing .logo a,
    body.page-template-template-region-landing-php .logo a { 
        color: #fff !important; 
        text-shadow: 0 2px 4px rgba(0,0,0,0.5); 
    }
    
    body.home .main-nav > ul > li > a,
    body.single .main-nav > ul > li > a,
    body.archive .main-nav > ul > li > a,
    body.category .main-nav > ul > li > a,
    body.tag .main-nav > ul > li > a,
    body.search .main-nav > ul > li > a,
    body.page .main-nav > ul > li > a,
    body.page-template-template-city-landing .main-nav > ul > li > a,
    body.page-template-template-region-landing .main-nav > ul > li > a,
    body.page-template-template-region-landing-php .main-nav > ul > li > a { 
        color: #fff !important; 
        text-shadow: 0 1px 2px rgba(0,0,0,0.5); 
        font-weight: 600; 
    }
    
    body.home .main-nav > ul > li > a:hover,
    body.single .main-nav > ul > li > a:hover,
    body.archive .main-nav > ul > li > a:hover,
    body.category .main-nav > ul > li > a:hover,
    body.tag .main-nav > ul > li > a:hover,
    body.search .main-nav > ul > li > a:hover,
    body.page .main-nav > ul > li > a:hover,
    body.page-template-template-city-landing .main-nav > ul > li > a:hover,
    body.page-template-template-region-landing .main-nav > ul > li > a:hover,
    body.page-template-template-region-landing-php .main-nav > ul > li > a:hover { 
        color: var(--accent) !important; 
    }
    
    body.home .menu-toggle,
    body.single .menu-toggle,
    body.archive .menu-toggle,
    body.category .menu-toggle,
    body.tag .menu-toggle,
    body.search .menu-toggle,
    body.page .menu-toggle,
    body.page-template-template-city-landing .menu-toggle,
    body.page-template-template-region-landing .menu-toggle,
    body.page-template-template-region-landing-php .menu-toggle { 
        color: #fff !important; 
    }

    /* Sub-menu Styles */
    .main-nav li { position: relative; }
    .main-nav ul.sub-menu {
        background: #fff;
        position: absolute;
        top: 100%;
        left: 0;
        min-width: 220px;
        padding: 15px 0;
        box-shadow: 0 10px 30px rgba(0,0,0,0.15);
        border-radius: 8px;
        z-index: 1000;
        opacity: 0;
        visibility: hidden;
        transform: translateY(10px);
        transition: all 0.3s ease;
        display: block;
    }
    .main-nav li:hover > ul.sub-menu {
        opacity: 1;
        visibility: visible;
        transform: translateY(0);
    }
    .main-nav ul.sub-menu li { display: block; margin: 0; }
    .main-nav ul.sub-menu a {
        color: #333 !important; /* Force dark text in dropdown */
        text-shadow: none !important;
        padding: 10px 25px;
        font-size: 0.9rem;
        display: block;
        border-bottom: 1px solid #f5f5f5;
    }
    .main-nav ul.sub-menu li:last-child a { border-bottom: none; }
    .main-nav ul.sub-menu a:hover {
        background: #f9f9f9;
        color: var(--accent) !important;
        padding-left: 30px;
    }
}

/* ---------------------------------------------------------
   GLOBAL HERO STYLES (Used on Archive/Page)
--------------------------------------------------------- */
.global-hero {
    position: relative;
    height: 50vh;
    min-height: 400px;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    color: #fff;
    margin-bottom: 60px;
    background-size: cover;
    background-position: center;
    padding-top: 80px; /* Spacing for absolute header */
}
.global-hero::before {
    content: ''; position: absolute; inset: 0;
    background: linear-gradient(to bottom, rgba(0,0,0,0.3), rgba(0,0,0,0.7));
}
.global-hero-content { position: relative; z-index: 2; max-width: 800px; padding: 0 20px; }
.global-hero h1 { 
    color: #fff; 
    font-size: 3.5rem; 
    margin-bottom: 15px; 
    text-shadow: 0 5px 15px rgba(0,0,0,0.3);
}
.global-hero-desc { font-size: 1.2rem; opacity: 0.9; }

/* ---------------------------------------------------------
   SINGLE POST HERO
--------------------------------------------------------- */
.post-hero {
    position: relative;
    height: 80vh; 
    min-height: 550px;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    color: #fff;
    margin-bottom: 60px;
    overflow: hidden;
    padding-top: 80px; 
}
.post-hero-img, .post-hero-bg {
    position: absolute; top: 0; left: 0; width: 100%; height: 100%;
    object-fit: cover; background-size: cover; background-position: center;
    z-index: 0; transform: scale(1.05);
}
.post-hero-overlay {
    position: absolute; inset: 0;
    background: linear-gradient(to bottom, rgba(0,0,0,0.4) 0%, rgba(0,0,0,0.8) 100%);
    z-index: 1;
}
.post-hero-content { position: relative; z-index: 2; max-width: 900px; padding: 0 20px; animation: fadeInUp 1s ease-out; }
.post-title {
    font-size: clamp(2.5rem, 5vw, 4.5rem); 
    font-weight: 800; margin-bottom: 25px; line-height: 1.1; color: #fff;
    text-shadow: 0 5px 15px rgba(0,0,0,0.5); letter-spacing: -1px;
}
.post-breadcrumbs a { color: #fff; border-bottom: 1px solid rgba(255,255,255,0.4); }

/* ---------------------------------------------------------
   LAYOUT & CONTENT
--------------------------------------------------------- */
.page-layout { display: grid; grid-template-columns: 1fr 350px; gap: 60px; margin-bottom: 80px; }

.entry-content p { margin-bottom: 25px; font-size: 1.15rem; color: #444; line-height: 1.9; }
.entry-content h2 { 
    font-size: 2.2rem; 
    margin-top: 60px; 
    margin-bottom: 25px;
    color: var(--primary-dark);
    position: relative;
    padding-bottom: 15px;
}
.entry-content h2::after {
    content: ''; position: absolute; bottom: 0; left: 0; width: 60px; height: 4px; background: var(--accent);
}

.entry-content h3 { font-size: 1.8rem; margin-top: 45px; margin-bottom: 20px; color: var(--text); }
.entry-content ul, .entry-content ol { margin-bottom: 30px; padding-left: 20px; }
.entry-content li { margin-bottom: 12px; font-size: 1.1rem; }
.entry-content img { border-radius: 20px; box-shadow: var(--shadow-card); margin: 40px 0; max-width: 100%; height: auto; }

/* Links in Post Content - Underline */
.entry-content a {
    text-decoration: underline;
    text-decoration-thickness: 1px;
    text-underline-offset: 6px;
    color: var(--primary);
    font-weight: 600;
}
.entry-content a:hover {
    color: var(--accent);
    text-decoration: none;
}

/* ---------------------------------------------------------
   INTEREST TABS (For Region/Tag Pages)
--------------------------------------------------------- */
.interest-tabs {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 10px;
    margin-bottom: 40px;
    padding-bottom: 20px;
    border-bottom: 1px solid #eee;
}

.tab-link {
    padding: 10px 25px;
    border-radius: 50px;
    background: #f5f5f5;
    color: #555;
    font-weight: 600;
    font-size: 0.95rem;
    text-decoration: none;
    transition: all 0.3s ease;
    border: 1px solid transparent;
}

.tab-link:hover, .tab-link.active-tab {
    background: var(--accent);
    color: #fff;
    box-shadow: 0 5px 15px rgba(230, 126, 34, 0.2);
    transform: translateY(-2px);
}

/* ---------------------------------------------------------
   TABLE OF CONTENTS (TOC)
--------------------------------------------------------- */
.toc-widget { position: sticky; top: 100px; }
.mobile-toc-container, .content-toc-container { 
    background: #fff; 
    border: 1px solid #f0f0f0; 
    padding: 30px; 
    border-radius: var(--radius); 
    margin-bottom: 50px; 
    box-shadow: var(--shadow-card);
}
.content-toc-container h3 {
    margin-top: 0;
    font-size: 1.4rem;
    border-bottom: 2px solid var(--border-color);
    padding-bottom: 15px;
    margin-bottom: 20px;
}

.toc-list { list-style: none; padding: 0; margin: 0; }
.toc-list li { margin: 0; }
.toc-list a {
    display: block;
    padding: 10px 0;
    font-size: 1rem;
    color: var(--text);
    border-bottom: 1px solid #f9f9f9;
    font-weight: 500;
    transition: 0.2s;
}
.toc-list a:hover { color: var(--accent); padding-left: 8px; }
.toc-h3 a { padding-left: 20px; font-size: 0.95rem; color: var(--text-light); }

/* ---------------------------------------------------------
   SIDEBAR
--------------------------------------------------------- */
.widget { 
    background: var(--white); 
    padding: 30px; 
    border-radius: var(--radius); 
    margin-bottom: 40px; 
    box-shadow: var(--shadow-card); 
    border: 1px solid #f5f5f5; 
}
.widget-title { 
    font-size: 1.3rem; 
    font-weight: 700; 
    border-bottom: 2px solid #eee; 
    padding-bottom: 15px; 
    margin-bottom: 25px; 
    position: relative; 
}
.widget-title::after { 
    content: ''; 
    position: absolute; 
    bottom: -2px; 
    left: 0; 
    width: 60px; 
    height: 2px; 
    background: var(--accent); 
}
.widget ul { list-style: none; padding: 0; margin: 0; }
.widget li { 
    border-bottom: 1px solid #f9f9f9; 
    padding: 12px 0; 
    font-size: 1rem; 
}
.widget li a { font-weight: 500; display: block; }
.widget li a:hover { color: var(--accent); padding-left: 5px; }

/* ---------------------------------------------------------
   PREMIUM CTA BOX
--------------------------------------------------------- */
.premium-cta-box {
    background: linear-gradient(135deg, #1a1a1a, #2c2c2c);
    color: #fff;
    padding: 60px;
    border-radius: 20px;
    margin-top: 80px;
    text-align: center;
    position: relative;
    overflow: hidden;
    box-shadow: 0 20px 50px rgba(0,0,0,0.2);
}
.premium-cta-box::before {
    content: ''; position: absolute; top: 0; right: 0; width: 100%; height: 100%;
    background: radial-gradient(circle at top right, rgba(230, 126, 34, 0.1), transparent 60%);
    opacity: 0.5;
}
.cta-content { position: relative; z-index: 2; max-width: 700px; margin: 0 auto; }
.cta-content h3 { color: #fff; font-size: 2.2rem; margin-bottom: 15px; }
.cta-content p { opacity: 0.9; margin-bottom: 35px; font-size: 1.15rem; }

.cta-form-inline {
    display: flex;
    flex-wrap: wrap;
    gap: 15px;
    justify-content: center;
}
.input-row { display: flex; gap: 15px; width: 100%; }
.cta-form-inline input, .cta-form-inline select {
    flex: 1;
    padding: 18px 25px;
    border-radius: 50px;
    border: 1px solid rgba(255,255,255,0.15);
    background: rgba(255,255,255,0.1);
    color: #fff;
    font-size: 1rem;
    backdrop-filter: blur(5px);
}
.cta-form-inline input::placeholder { color: rgba(255,255,255,0.7); }
.cta-form-inline input:focus, .cta-form-inline select:focus {
    outline: none; background: rgba(255,255,255,0.2); border-color: var(--accent);
}
.cta-form-inline select option { color: #333; } 

.cta-form-inline button {
    background: var(--accent);
    color: #fff;
    border: none;
    padding: 18px 45px;
    border-radius: 50px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1px;
    cursor: pointer;
    transition: 0.3s;
    width: 100%;
    box-shadow: 0 10px 20px rgba(230, 126, 34, 0.3);
}
.cta-form-inline button:hover { background: var(--accent-hover); transform: translateY(-3px); box-shadow: 0 15px 30px rgba(230, 126, 34, 0.4); }
.cta-small { font-size: 0.8rem; margin-top: 20px; opacity: 0.6; }

/* ---------------------------------------------------------
   PAGINATION
--------------------------------------------------------- */
.pagination {
    margin-top: 60px;
    text-align: center;
    display: flex;
    justify-content: center;
    gap: 10px;
}
.pagination .page-numbers, .pagination a, .pagination span {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 45px;
    height: 45px;
    background: #fff;
    border: 1px solid #eee;
    border-radius: 50%;
    color: var(--primary);
    text-decoration: none;
    font-weight: 600;
    transition: 0.3s;
    font-family: var(--font-head);
    padding: 0 10px;
}
.pagination .page-numbers.current,
.pagination .page-numbers:hover,
.pagination a:hover,
.pagination span.current {
    background: var(--accent);
    color: #fff;
    border-color: var(--accent);
}
.pagination .next, .pagination .prev {
    border-radius: 50px;
    width: auto;
    padding: 0 20px;
}

/* ---------------------------------------------------------
   DESTINATION CARDS (OVERLAY STYLE - Home & Archive)
--------------------------------------------------------- */
.dest-grid { 
    display: grid; 
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr)); 
    gap: 30px; 
}
.dest-card {
    position: relative; border-radius: 16px; overflow: hidden;
    box-shadow: 0 10px 30px rgba(0,0,0,0.1);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    height: 450px; display: flex; flex-direction: column; background: #fff;
}
.dest-card:hover { transform: translateY(-8px); box-shadow: 0 20px 40px rgba(0,0,0,0.2); }
.dest-image-wrap { position: absolute; top: 0; left: 0; width: 100%; height: 100%; z-index: 1; }
.dest-image-wrap a, .dest-image-wrap img { display: block; width: 100%; height: 100%; object-fit: cover; }
.dest-content { 
    position: absolute; bottom: 0; left: 0; width: 100%; padding: 30px 25px;
    background: linear-gradient(to top, rgba(0,0,0,0.9) 0%, rgba(0,0,0,0.5) 60%, transparent 100%);
    z-index: 2; color: #fff; display: flex; flex-direction: column; justify-content: flex-end; height: 100%;
}
.dest-title { font-size: 1.6rem; margin: 0 0 10px; color: #fff; text-shadow: 0 2px 5px rgba(0,0,0,0.5); }
.dest-title a { color: #fff; text-decoration: none; }
.dest-excerpt { color: rgba(255,255,255,0.85); font-size: 0.95rem; margin-bottom: 20px; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.dest-link { color: #fff; text-transform: uppercase; font-size: 0.8rem; border-bottom: 2px solid var(--accent); padding-bottom: 3px; align-self: flex-start; }

/* ---------------------------------------------------------
   RESPONSIVE
--------------------------------------------------------- */
@media (max-width: 991px) {
    /* HEADER RESET - White Header on Mobile */
    body.home .site-header, 
    body.single .site-header, 
    body.archive .site-header, 
    body.category .site-header, 
    body.tag .site-header, 
    body.search .site-header,
    body.page .site-header,
    body.page-template-template-city-landing .site-header,
    body.page-template-template-region-landing .site-header,
    body.page-template-template-region-landing-php .site-header { 
        background: #fff !important; 
        position: sticky; 
        top: 0;
        width: 100%;
        border-bottom: 1px solid #eee;
        box-shadow: 0 2px 10px rgba(0,0,0,0.05);
    }
    
    .logo a, .menu-toggle { color: var(--primary) !important; text-shadow: none !important; }
    .menu-toggle { display: block; }
    
    /* Layout Fixes */
    .container { padding: 0 20px; }
    .page-layout { display: block; } /* Stack Sidebar */
    .sidebar { margin-top: 40px; }
    
    /* Hero Adjustments */
    .post-hero, .global-hero, .region-hero { 
        height: auto; 
        min-height: 400px; 
        padding: 80px 0 60px; /* Reduced top padding on mobile */
    }
    
    /* Grid Adjustments - Tablet 2 Col */
    .dest-grid, .continent-grid { 
        grid-template-columns: repeat(2, 1fr);
        gap: 25px;
    }
    
    /* Mobile Menu Drawer */
    .main-nav { 
        position: fixed; 
        top: 60px; /* Header height */
        left: -100%; 
        width: 100%; 
        height: calc(100vh - 60px); 
        background: #fff; 
        padding: 30px 20px; 
        transition: 0.4s cubic-bezier(0.4, 0, 0.2, 1);
        overflow-y: auto;
        box-shadow: 0 5px 15px rgba(0,0,0,0.1);
        z-index: 998;
    }
    .main-nav.active { left: 0; }
    .main-nav ul { flex-direction: column; align-items: flex-start; gap: 0; width: 100%; }
    .main-nav a { 
        font-size: 1.1rem; 
        display: block; 
        width: 100%; 
        padding: 15px 0; 
        border-bottom: 1px solid #f5f5f5; 
        color: var(--primary) !important; /* Force dark text */
        text-shadow: none !important;
    }
    
    /* CTA Mobile Fixes */
    .premium-cta-box, .home-cta-box { padding: 40px 20px; }
    .input-row { flex-direction: column; gap: 15px; }
    .cta-form-inline button { width: 100%; }

    /* Tabs Mobile Scroll */
    .interest-tabs {
        justify-content: flex-start; 
        overflow-x: auto; 
        flex-wrap: nowrap;
        padding-bottom: 15px;
        -webkit-overflow-scrolling: touch;
    }
    .tab-link { flex-shrink: 0; }
}

/* Specific Mobile Overrides (<768px) */
@media (max-width: 767px) {
    .dest-grid, .continent-grid { 
        grid-template-columns: 1fr;
    }
}