/*
Theme Name: visitgrandrapids
Theme URI: https://github.com/fahdi/visitgrandrapids-theme
Description: A child theme for visitgrandrapids.com built on JupiterX. Custom Banff-inspired itinerary templates with optimized performance.
Author: Fahad Murtaza
Author URI: https://fahdmurtaza.com
Template: jupiterx
Version: 1.3.0
Text Domain: visitgrandrapids
GitHub Theme URI: fahdi/visitgrandrapids-theme
Primary Branch: main
Requires at least: 6.0
Requires PHP: 7.4
*/

/* Custom styles for itineraries */

:root {
    /* Brand Palette - Deep Slate & Gold */
    --vg-primary: #004b76;
    /* Deep Brand Blue */
    --vg-primary-dark: #003354;
    /* Darker Blue for Hover/Text */
    --vg-accent: #c69214;
    /* Gold/Amber */
    --vg-accent-light: #e5a917;
    /* Light Gold for Hover */

    /* Neutrals */
    --vg-text: #2c3e50;
    /* Dark Slate for primary text (softer than black) */
    --vg-text-light: #546e7a;
    /* Muted Slate for secondary text */
    --vg-bg-light: #f4f6f8;
    /* Very light cool gray */
    --vg-border: #e6eaed;
    /* Subtle border */
    --vg-white: #ffffff;

    /* UI Tokens */
    --vg-shadow: 0 10px 30px rgba(0, 75, 118, 0.08);
    /* Colored shadow for depth */
    --vg-shadow-hover: 0 15px 40px rgba(0, 75, 118, 0.12);
    --vg-radius: 4px;
    /* Sharper, more professional radius (Banff style is often cleaner) */
    --vg-container: 1200px;
    --vg-font-headers: 'Montserrat', 'Inter', sans-serif;
    /* Placeholder for theme font */
}

html {
    scroll-behavior: smooth;
    font-size: 16px;
}

body {
    color: var(--vg-text);
    -webkit-font-smoothing: antialiased;
}

.vg-container {
    max-width: var(--vg-container);
    margin: 0 auto;
    padding: 0 30px;
    /* More breathing room */
}

/* Hero Section */
.vg-itinerary-hero {
    position: relative;
    height: 70vh;
    min-height: 400px;
    overflow: hidden;
    color: var(--vg-white);
}

.vg-hero-image {
    width: 100%;
    height: 100%;
    background-size: cover;
    background-position: center;
    display: flex;
    align-items: flex-end;
    padding-bottom: 60px;
}

.vg-hero-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(0deg, rgba(0, 0, 0, 0.7) 0%, rgba(0, 0, 0, 0.2) 50%, rgba(0, 0, 0, 0) 100%);
    pointer-events: none;
}

.vg-hero-content {
    position: relative;
    z-index: 1;
    max-width: 800px;
}

.vg-itinerary-meta {
    display: flex;
    gap: 20px;
    margin-bottom: 15px;
    font-size: 0.9rem;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.vg-meta-item i {
    margin-right: 5px;
    color: var(--vg-accent);
}

.vg-itinerary-title {
    font-size: 3.5rem;
    font-weight: 800;
    line-height: 1.1;
    margin: 0;
    text-shadow: 0 2px 10px rgba(0, 0, 0, 0.3);
}

/* Sticky Nav */
.vg-itinerary-nav {
    background: var(--vg-white);
    border-bottom: 1px solid var(--vg-border);
    position: sticky;
    top: 0;
    z-index: 1000;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
}

.vg-itinerary-nav ul {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    gap: 40px;
}

.vg-itinerary-nav a {
    display: block;
    padding: 20px 0;
    color: var(--vg-text);
    text-decoration: none;
    font-weight: 600;
    font-size: 0.95rem;
    position: relative;
    transition: color 0.3s;
}

.vg-itinerary-nav a:hover,
.vg-itinerary-nav a.active {
    color: var(--vg-primary);
}

.vg-itinerary-nav a.active::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: var(--vg-primary);
}

/* Content Layout */
.vg-content-wrap {
    display: flex;
    gap: 60px;
    padding-top: 60px;
    padding-bottom: 80px;
}

.vg-main-content {
    flex: 1;
    /* Ensure maps and other content don't overflow */
    min-width: 0;
}

.vg-sidebar {
    width: 350px;
}

.vg-sidebar-sticky {
    position: sticky;
    top: 100px;
}

/* Sections */
.vg-section {
    margin-bottom: 80px;
    /* Ensure anchor links land correctly with sticky header offset */
    scroll-margin-top: 100px;
}

.vg-section-title {
    font-size: 2.2rem;
    font-weight: 700;
    margin-bottom: 30px;
    color: var(--vg-primary);
}

/* Timeline */
.vg-timeline {
    position: relative;
    padding-left: 40px;
}

.vg-timeline::before {
    content: '';
    position: absolute;
    left: 14px;
    top: 0;
    bottom: 0;
    width: 2px;
    background: var(--vg-border);
}

.vg-timeline-item {
    position: relative;
    margin-bottom: 50px;
}

.vg-timeline-day {
    position: absolute;
    left: -40px;
    width: 30px;
    height: 30px;
    background: var(--vg-primary);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--vg-white);
    font-weight: 700;
    font-size: 0.8rem;
    border: 4px solid var(--vg-white);
    box-shadow: 0 0 0 2px var(--vg-border);
}

.vg-day-label {
    display: none;
    /* Icon handles it */
}

.vg-timeline-content {
    background: var(--vg-white);
    padding: 30px;
    border-radius: var(--vg-radius);
    box-shadow: var(--vg-shadow);
    border: 1px solid var(--vg-border);
}

.vg-day-title {
    font-size: 1.5rem;
    font-weight: 700;
    margin-top: 0;
    margin-bottom: 15px;
    color: var(--vg-text);
}

.vg-day-description {
    line-height: 1.6;
    color: var(--vg-text-light);
}

.vg-day-description p {
    margin-bottom: 15px;
}

/* Map Section Overrides */
.vg-map .wti__tab-content-wrapper {
    padding: 0;
    margin: 0;
    border: none;
    background: transparent;
    box-shadow: none;
}

.vg-map .tab-content-title {
    font-size: 2.2rem;
    font-weight: 700;
    margin-bottom: 30px;
    color: var(--vg-primary);
    margin-top: 0;
}

.vg-map iframe,
.vg-map #wp-travel-map {
    border-radius: var(--vg-radius);
    overflow: hidden;
    box-shadow: var(--vg-shadow);
    width: 100% !important;
}

/* CTA Card */
.vg-cta-card {
    background: var(--vg-primary);
    color: var(--vg-white);
    padding: 40px;
    border-radius: var(--vg-radius);
    text-align: center;
}

.vg-cta-card h3 {
    font-size: 1.8rem;
    margin-top: 0;
    margin-bottom: 15px;
}

.vg-cta-card p {
    margin-bottom: 30px;
    opacity: 0.9;
}

.vg-button {
    display: inline-block;
    padding: 15px 35px;
    border-radius: 50px;
    font-weight: 700;
    text-decoration: none;
    transition: transform 0.3s, background 0.3s;
}

.vg-button-primary {
    background: var(--vg-accent);
    color: #ffffff !important;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.2);
    box-shadow: 0 4px 15px rgba(198, 146, 20, 0.35);
}

.vg-button-primary:hover,
.vg-button-primary:focus {
    transform: translateY(-3px);
    background: var(--vg-accent-light);
    color: #ffffff !important;
    box-shadow: 0 6px 20px rgba(198, 146, 20, 0.5);
}

/* Related Grid */
.vg-related {
    background: var(--vg-bg-light);
    padding: 80px 0;
}

.vg-related-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 30px;
}

.vg-related-card {
    background: var(--vg-white);
    border-radius: var(--vg-radius);
    overflow: hidden;
    box-shadow: var(--vg-shadow);
    transition: transform 0.3s;
}

.vg-related-card:hover {
    transform: translateY(-10px);
}

.vg-related-card a {
    text-decoration: none;
    color: inherit;
}

.vg-card-image {
    height: 200px;
    background-size: cover;
    background-position: center;
}

.vg-card-content {
    padding: 20px;
}

.vg-card-content h4 {
    margin: 0;
    font-size: 1.2rem;
    font-weight: 700;
}

/* Responsive */
@media (max-width: 1024px) {
    .vg-content-wrap {
        flex-direction: column;
    }

    .vg-sidebar {
        width: 100%;
    }

    .vg-itinerary-title {
        font-size: 2.5rem;
    }
}

/* Archive/Listing Page Styles */
.vg-archive-hero {
    background: var(--vg-primary);
    color: var(--vg-white);
    padding: 80px 0;
    text-align: center;
    margin-bottom: 40px;
}

.vg-archive-title {
    font-size: 3rem;
    font-weight: 800;
    margin: 0 0 10px 0;
}

.vg-archive-subtitle {
    font-size: 1.2rem;
    opacity: 0.9;
    max-width: 600px;
    margin: 0 auto;
}

/* ============================================
   ITINERARY ARCHIVE - FULL WIDTH LAYOUT
   ============================================ */

/* Override JupiterX parent theme column constraints */
.visitgrandrapids-itinerary-archive {
    /* Break out of the col-lg-9 constraint */
    width: 100vw !important;
    max-width: 100vw !important;
    margin-left: calc(-50vw + 50%) !important;
    margin-right: calc(-50vw + 50%) !important;
    padding: 0;
}

/* Hide sidebar on itinerary archive */
.post-type-archive-itineraries .jupiterx-sidebar,
.post-type-archive-itineraries .jupiterx-secondary {
    display: none !important;
}

/* Make primary container full width on itinerary archive */
.post-type-archive-itineraries #jupiterx-primary,
.post-type-archive-itineraries .jupiterx-primary {
    flex: 0 0 100% !important;
    max-width: 100% !important;
    width: 100% !important;
}

/* Hide JupiterX "Archives: Trips" header on itinerary archive */
.post-type-archive-itineraries .jupiterx-main-header {
    display: none !important;
}

/* ============================================
   FILTER FORM - MODERN STYLING
   ============================================ */

.vg-itinerary-filters {
    background: linear-gradient(135deg, var(--vg-bg-light) 0%, #e8eef2 100%);
    padding: 35px 40px;
    border-radius: 12px;
    margin-bottom: 50px;
    box-shadow: 0 4px 20px rgba(0, 75, 118, 0.06);
    border: 1px solid rgba(0, 75, 118, 0.08);
}

.vg-filter-form {
    display: flex;
    gap: 25px;
    align-items: flex-end;
    flex-wrap: wrap;
}

.vg-filter-group {
    display: flex;
    flex-direction: column;
    gap: 10px;
    flex: 1;
    min-width: 200px;
}

.vg-filter-group label,
.vg-itinerary-filters>form>label {
    font-weight: 700;
    font-size: 0.75rem;
    color: var(--vg-primary);
    text-transform: uppercase;
    letter-spacing: 1.2px;
    margin-bottom: 2px;
}

.vg-filter-group select,
.vg-itinerary-filters select {
    padding: 14px 18px;
    padding-right: 45px;
    border: 2px solid var(--vg-border);
    border-radius: 8px;
    background: var(--vg-white);
    font-size: 0.95rem;
    font-weight: 500;
    color: var(--vg-text);
    cursor: pointer;
    transition: all 0.25s ease;
    appearance: none;
    -webkit-appearance: none;
    -moz-appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath fill='%23004b76' d='M6 8L1 3h10z'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 16px center;
    background-size: 12px;
}

.vg-filter-group select:hover,
.vg-itinerary-filters select:hover {
    box-shadow: none;
}

.vg-filter-group select:focus,
.vg-itinerary-filters select:focus {
    outline: none;
}

.vg-filter-actions {
    display: flex;
    gap: 15px;
    align-items: center;
    flex-shrink: 0;
}

.vg-filter-actions .vg-button {
    padding: 14px 30px;
    font-size: 0.9rem;
    border: none;
    cursor: pointer;
    white-space: nowrap;
}

.vg-filter-actions .vg-button-primary {
    background: linear-gradient(135deg, var(--vg-accent) 0%, #d9a016 100%);
    box-shadow: 0 4px 15px rgba(198, 146, 20, 0.3);
}

.vg-filter-actions .vg-button-primary:hover {
    background: linear-gradient(135deg, #d9a016 0%, var(--vg-accent) 100%);
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(198, 146, 20, 0.4);
}

.vg-filter-clear {
    color: var(--vg-text-light);
    font-size: 0.85rem;
    text-decoration: none;
    font-weight: 500;
    transition: color 0.2s;
    white-space: nowrap;
}

.vg-filter-clear:hover {
    color: var(--vg-primary);
    text-decoration: underline;
}

/* Archive Grid */
.vg-itinerary-grid {
    padding-bottom: 80px;
}

.vg-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 30px;
}

.vg-itinerary-card {
    background: var(--vg-white);
    border-radius: var(--vg-radius);
    overflow: hidden;
    box-shadow: var(--vg-shadow);
    transition: transform 0.3s;
    border: 1px solid var(--vg-border);
}

.vg-itinerary-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--vg-shadow);
}

.vg-card-link {
    text-decoration: none;
    color: inherit;
    display: block;
}

.vg-card-image {
    height: 250px;
    background-size: cover;
    background-position: center;
    position: relative;
}

.vg-card-badge {
    position: absolute;
    top: 20px;
    left: 20px;
    background: var(--vg-accent);
    color: var(--vg-white);
    padding: 5px 15px;
    border-radius: 30px;
    font-weight: 700;
    font-size: 0.8rem;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.2);
}

.vg-card-content {
    padding: 25px;
}

.vg-card-title {
    font-size: 1.4rem;
    font-weight: 700;
    margin: 0 0 15px 0;
    color: var(--vg-primary);
}

.vg-card-excerpt {
    color: var(--vg-text-light);
    font-size: 0.95rem;
    line-height: 1.6;
    margin-bottom: 20px;
}

.vg-card-more {
    display: inline-block;
    color: var(--vg-accent);
    font-weight: 700;
    font-size: 0.9rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.vg-card-more i {
    margin-left: 5px;
    transition: transform 0.3s;
}

.vg-card-link:hover .vg-card-more i {
    transform: translateX(5px);
}

.vg-no-results {
    text-align: center;
    padding: 60px;
    font-size: 1.2rem;
    color: var(--vg-text-light);
}

.vg-pagination {
    margin-top: 60px;
    text-align: center;
}

/* Archive Responsive */
@media (max-width: 992px) {
    .vg-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 768px) {
    .vg-grid {
        grid-template-columns: 1fr;
    }

    .vg-filter-form {
        flex-direction: column;
        align-items: flex-start;
    }

    .vg-archive-title {
        font-size: 2.2rem;
    }
}

@media (max-width: 768px) {
    .vg-related-grid {
        grid-template-columns: 1fr;
    }

    .vg-itinerary-nav ul {
        gap: 20px;
        overflow-x: auto;
    }
}

/* ============================================
   NEW SINGLE ITINERARY LAYOUT (MOCKUP MATCH)
   ============================================ */

/* 1. Top Image Gallery Grid */
.vg-itinerary-top-grid {
    margin-bottom: 50px;
    padding-top: 20px;
}

.vg-image-grid-3 {
    display: grid;
    grid-template-columns: 1fr 1fr 1fr;
    gap: 15px;
    width: 100%;
    margin: 0 auto;
}

.vg-grid-image-item {
    height: 350px;
    border-radius: 12px;
    background-size: cover;
    background-position: center;
}

/* 2. Hero Content Area (Title + Overview + Tips) */
.vg-itinerary-hero-content {
    margin-bottom: 60px;
}

.vg-hero-layout-2col {
    display: flex;
    justify-content: space-between;
    gap: 40px;
}

.vg-hero-col-main {
    flex: 0 0 65%;
    max-width: 65%;
}

.vg-hero-col-sidebar {
    flex: 0 0 30%;
    max-width: 30%;
}

.vg-itinerary-title-main {
    font-size: 3rem;
    font-weight: 800;
    color: #1a4f3e;
    /* Dark hunter green from mockup */
    margin-top: 0;
    margin-bottom: 25px;
    line-height: 1.1;
    font-family: 'Oswald', 'Montserrat', sans-serif;
    /* Adjusted for condensed look */
}

.vg-itinerary-overview-text {
    font-size: 1.1rem;
    color: #333;
    line-height: 1.6;
    margin-bottom: 30px;
}

/* Base Buttons */
.vg-btn {
    display: inline-block;
    padding: 12px 25px;
    font-size: 0.9rem;
    font-weight: 600;
    text-transform: uppercase;
    text-decoration: none;
    letter-spacing: 1px;
    border-radius: 30px;
    /* pill shape */
    transition: all 0.3s ease;
    cursor: pointer;
    text-align: center;
}

.vg-btn-outline-dark {
    border: 2px solid #1a1a1a;
    color: #1a1a1a;
    background: transparent;
}

.vg-btn-outline-dark:hover {
    background: #1a1a1a;
    color: #fff;
}

.vg-btn-solid-dark {
    background: #1a1a1a;
    color: #fff;
    border: 2px solid #1a1a1a;
}

.vg-btn-solid-dark:hover {
    background: #333;
    border-color: #333;
}

/* 3. Day By Day List */
.vg-day-block {
    margin-bottom: 60px;
}

.vg-day-heading {
    font-size: 2rem;
    font-weight: 700;
    color: #1a1a1a;
    margin-bottom: 20px;
    font-family: 'Oswald', 'Montserrat', sans-serif;
}

.vg-day-description-box {
    background-color: #f9f6f0;
    /* Soft beige from mockup */
    padding: 30px;
    border-radius: 12px;
    margin-bottom: 30px;
    line-height: 1.6;
    color: #333;
    border: none;
    box-shadow: none;
    /* remove old shadows */
}

/* 4. Full Width Map */
.vg-full-width-map {
    margin-bottom: 0;
}

.vg-full-width-map iframe,
.vg-full-width-map #wp-travel-map {
    border-radius: 0;
    box-shadow: none;
    height: 400px;
    width: 100% !important;
}

/* 5. Directory Section (Teal) */
.vg-itinerary-directory {
    padding: 60px 0;
    color: #1a1a1a;
}

.vg-directory-row {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    padding: 30px 0;
}

.vg-dir-title h2 {
    font-size: 2.2rem;
    font-weight: 800;
    margin: 0 0 15px 0;
    font-family: 'Oswald', 'Montserrat', sans-serif;
}

.vg-dir-links {
    list-style: none;
    padding: 0;
    margin: 0;
}

.vg-dir-links li {
    margin-bottom: 8px;
}

.vg-dir-links a {
    color: #1a1a1a;
    text-decoration: none;
    font-size: 1rem;
}

.vg-dir-links a:hover {
    text-decoration: underline;
}

.vg-dir-divider {
    border: none;
    border-top: 1px solid rgba(0, 0, 0, 0.1);
    margin: 0;
}

/* 6. Booking Bar Focus */
.vg-itinerary-booking-footer {
    display: flex;
    justify-content: center;
}

.vg-booking-bar {
    background-color: #fff;
    border-radius: 50px;
    padding: 15px 40px;
    display: flex;
    align-items: center;
    gap: 30px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.05);
    max-width: 900px;
    margin: 0 auto;
}

.vg-booking-title {
    font-size: 1.5rem;
    font-weight: 800;
    margin: 0;
    color: #1a4f3e;
}

.vg-booking-form {
    display: flex;
    align-items: center;
    gap: 20px;
    flex: 1;
}

.vg-form-group {
    display: flex;
    align-items: center;
    gap: 10px;
}

.vg-form-group label {
    font-size: 0.8rem;
    font-weight: 600;
    text-transform: uppercase;
}

.vg-form-group input {
    border: none;
    border-bottom: 1px solid #ccc;
    padding: 5px;
    font-family: inherit;
    outline: none;
}

/* Related Items (Inside Days Placeholder) */
.vg-day-block .vg-related-grid {
    grid-template-columns: repeat(3, 1fr);
    margin-top: 20px;
    padding: 0;
    background: transparent;
}

.vg-day-block .vg-related-card {
    box-shadow: none;
    border: none;
}

.vg-day-block .vg-card-content {
    padding: 15px 0;
}

.vg-day-block .vg-card-title {
    font-size: 1.1rem;
    font-family: 'Oswald', 'Montserrat', sans-serif;
}

.vg-day-block .vg-card-image {
    border-radius: 12px;
    height: 180px;
}

/* Responsive */
@media (max-width: 1024px) {
    .vg-image-grid-3 {
        gap: 10px;
    }
}

@media (max-width: 768px) {
    .vg-image-grid-3 {
        grid-template-columns: 1fr;
    }

    .vg-grid-image-item {
        height: 250px;
    }

    .vg-hero-layout-2col {
        flex-direction: column;
    }

    .vg-hero-col-main,
    .vg-hero-col-sidebar {
        flex: 100%;
        max-width: 100%;
    }

    .vg-directory-row {
        flex-direction: column;
        gap: 20px;
    }

    .vg-booking-bar {
        flex-direction: column;
        border-radius: 20px;
        text-align: center;
    }

    .vg-booking-form {
        flex-direction: column;
        width: 100%;
    }
}