/* ==========================================
   TOUR & ATTRACTION STYLES
   ========================================== */

/* Single Tour Hero */
.tour-hero-header {
    position: relative;
    height: 60vh;
    min-height: 400px;
    background-size: cover;
    background-position: center;
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
    color: #ffffff;
    padding-bottom: var(--spacing-xl);
}

.tour-hero-header::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(to bottom, rgba(15, 23, 42, 0.2) 0%, rgba(15, 23, 42, 0.8) 100%);
    z-index: 1;
}

.tour-hero-header h1 {
    position: relative;
    z-index: 2;
    font-size: clamp(2rem, 4vw, 3.5rem);
    max-width: 1240px;
    margin: 0 auto;
    width: 100%;
    padding: 0 1.5rem;
    color: #ffffff;
    font-weight: 800;
    text-shadow: 0 2px 8px rgba(0,0,0,0.5);
    margin-bottom: var(--spacing-sm);
}

.quick-meta-ribbon {
    position: relative;
    z-index: 2;
    max-width: 1240px;
    margin: 0 auto;
    width: 100%;
    padding: 0 1.5rem;
    display: flex;
    gap: var(--spacing-md);
    flex-wrap: wrap;
}

.quick-meta-ribbon span {
    background: rgba(255, 255, 255, 0.2);
    backdrop-filter: blur(8px);
    border: 1px solid rgba(255, 255, 255, 0.3);
    padding: 8px 16px;
    border-radius: 30px;
    font-size: 0.9rem;
    font-weight: 500;
    display: flex;
    align-items: center;
    gap: 8px;
}

.quick-meta-ribbon span strong {
    color: var(--color-secondary);
}

/* Tour Body Layout */
.tour-body-content {
    max-width: 1240px;
    margin: var(--spacing-xl) auto;
    padding: 0 1.5rem;
    display: grid;
    grid-template-columns: 2.2fr 1fr;
    gap: var(--spacing-lg);
}

.package-description {
    background: #ffffff;
    padding: var(--spacing-md);
    border-radius: var(--border-radius-md);
    box-shadow: var(--box-shadow);
    border: 1px solid var(--color-border);
}

.package-description h2 {
    font-size: 1.75rem;
    margin-bottom: var(--spacing-md);
    padding-bottom: var(--spacing-xs);
    border-bottom: 2px solid var(--color-border);
}

.package-description p {
    color: var(--color-text-muted);
    margin-bottom: var(--spacing-md);
    line-height: 1.7;
}

/* Inclusions & Exclusions Grid */
.inclusions-grid {
    grid-column: span 2;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: var(--spacing-md);
    margin-top: var(--spacing-md);
}

.inc-box, .exc-box {
    padding: var(--spacing-md);
    border-radius: var(--border-radius-md);
    box-shadow: var(--box-shadow);
    border: 1px solid var(--color-border);
}

.inc-box {
    background-color: #f0fdf4; /* Emerald 50 */
    border-left: 5px solid #10b981; /* Emerald 500 */
}

.inc-box h3 {
    color: #065f46;
    font-size: 1.4rem;
    margin-bottom: var(--spacing-sm);
    display: flex;
    align-items: center;
    gap: 8px;
}

.inc-box h3::before {
    content: '\f058'; /* fontawesome check circle */
    font-family: 'Font Awesome 5 Free';
    font-weight: 900;
    color: #10b981;
}

.inc-box ul li {
    position: relative;
    padding-left: 24px;
    margin-bottom: 8px;
    font-size: 0.95rem;
    color: #1e293b;
}

.inc-box ul li::before {
    content: '\f00c';
    font-family: 'Font Awesome 5 Free';
    font-weight: 900;
    position: absolute;
    left: 0;
    color: #10b981;
}

.exc-box {
    background-color: #fef2f2; /* Red 50 */
    border-left: 5px solid #ef4444; /* Red 500 */
}

.exc-box h3 {
    color: #991b1b;
    font-size: 1.4rem;
    margin-bottom: var(--spacing-sm);
    display: flex;
    align-items: center;
    gap: 8px;
}

.exc-box h3::before {
    content: '\f057'; /* fontawesome times circle */
    font-family: 'Font Awesome 5 Free';
    font-weight: 900;
    color: #ef4444;
}

.exc-box ul li {
    position: relative;
    padding-left: 24px;
    margin-bottom: 8px;
    font-size: 0.95rem;
    color: #1e293b;
}

.exc-box ul li::before {
    content: '\f00d';
    font-family: 'Font Awesome 5 Free';
    font-weight: 900;
    position: absolute;
    left: 0;
    color: #ef4444;
}

/* Sidebar Booking Widget */
.tour-sidebar {
    display: flex;
    flex-direction: column;
    gap: var(--spacing-md);
}

.booking-widget {
    background: #ffffff;
    padding: 1.75rem;
    border-radius: var(--border-radius-md);
    box-shadow: var(--box-shadow);
    border: 1px solid var(--color-border);
    position: sticky;
    top: 100px;
}

.booking-price-header {
    font-size: 0.9rem;
    color: var(--color-text-muted);
    margin-bottom: var(--spacing-sm);
}

.booking-price-header span {
    font-size: 1.8rem;
    font-weight: 800;
    color: var(--color-primary);
    display: block;
    margin-top: 4px;
}

.booking-form {
    display: flex;
    flex-direction: column;
    gap: var(--spacing-sm);
    margin-top: var(--spacing-md);
}

.booking-form input,
.booking-form select {
    width: 100%;
    padding: 12px;
    border: 1px solid var(--color-border);
    border-radius: var(--border-radius-sm);
    font-size: 0.9rem;
    background: var(--color-bg-light);
}

.booking-submit-btn {
    background: var(--color-primary);
    color: #ffffff;
    padding: 14px;
    border-radius: var(--border-radius-sm);
    font-weight: 700;
    cursor: pointer;
    text-align: center;
    transition: var(--transition);
    box-shadow: 0 4px 12px rgba(124,58,237,0.3);
}

.booking-submit-btn:hover {
    background: var(--color-primary-hover);
    transform: translateY(-2px);
}

/* Gutenberg Block Styling for Itineraries (Accordions & Lists) */
.package-description .wp-block-group {
    margin-top: var(--spacing-md);
}

/* Custom Accordion layout rules for block editor markup */
.package-description details {
    background: var(--color-bg-light);
    border: 1px solid var(--color-border);
    border-radius: var(--border-radius-sm);
    margin-bottom: var(--spacing-xs);
    overflow: hidden;
    transition: var(--transition);
}

.package-description details[open] {
    box-shadow: var(--box-shadow);
    border-color: var(--color-primary);
}

.package-description summary {
    padding: 14px 20px;
    font-family: var(--font-heading);
    font-weight: 600;
    color: var(--color-text-dark);
    cursor: pointer;
    user-select: none;
    outline: none;
    list-style: none;
    position: relative;
}

.package-description summary::-webkit-details-marker {
    display: none;
}

.package-description summary::after {
    content: '\f078';
    font-family: 'Font Awesome 5 Free';
    font-weight: 900;
    position: absolute;
    right: 20px;
    top: 50%;
    transform: translateY(-50%);
    transition: var(--transition);
    font-size: 0.8rem;
    color: var(--color-text-muted);
}

.package-description details[open] summary::after {
    transform: translateY(-50%) rotate(180deg);
    color: var(--color-primary);
}

.package-description details .details-content,
.package-description details > div,
.package-description details > p {
    padding: 16px 20px;
    border-top: 1px solid var(--color-border);
    background: #ffffff;
    color: var(--color-text-muted);
    font-size: 0.95rem;
    line-height: 1.6;
}

/* Gutenberg Native Gallery Customization */
.wp-block-gallery {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: var(--spacing-sm);
    margin-top: var(--spacing-md) !important;
}

.wp-block-gallery .wp-block-image {
    margin: 0 !important;
    border-radius: var(--border-radius-sm);
    overflow: hidden;
    box-shadow: var(--box-shadow);
}

.wp-block-gallery .wp-block-image img {
    transition: var(--transition);
    height: 200px;
    width: 100%;
    object-fit: cover;
}

.wp-block-gallery .wp-block-image img:hover {
    transform: scale(1.05);
}

/* Archive Grid layout styles */
.archive-title-header {
    background-color: var(--color-bg-dark);
    color: #ffffff;
    padding: var(--spacing-xl) 0;
    text-align: center;
    margin-bottom: var(--spacing-xl);
}

.archive-title-header h1 {
    color: #ffffff;
    font-size: 3rem;
}

/* ==========================================
   TABS INTERFACE & CONTENT PANELS
   ========================================== */
.tour-tabs-container {
    background: #ffffff;
    border-radius: var(--border-radius-md);
    box-shadow: var(--box-shadow-card);
    border: 1px solid var(--color-border);
    overflow: hidden;
    margin-bottom: var(--spacing-md);
}

.tour-tabs-nav {
    display: flex;
    background: #f8fafc;
    border-bottom: 1px solid var(--color-border);
    margin: 0;
    padding: 0;
    list-style: none;
    overflow-x: auto;
    scrollbar-width: none; /* Firefox */
}

.tour-tabs-nav::-webkit-scrollbar {
    display: none; /* Chrome/Safari */
}

.tour-tabs-nav li {
    padding: 18px 24px;
    font-family: var(--font-heading);
    font-weight: 600;
    font-size: 0.95rem;
    color: var(--color-text-muted);
    cursor: pointer;
    transition: var(--transition-fast);
    border-bottom: 3px solid transparent;
    display: flex;
    align-items: center;
    gap: 8px;
    white-space: nowrap;
}

.tour-tabs-nav li i {
    font-size: 1rem;
}

.tour-tabs-nav li:hover {
    color: var(--color-primary);
    background: rgba(27, 145, 191, 0.03);
}

.tour-tabs-nav li.active {
    color: var(--color-primary);
    border-bottom-color: var(--color-primary);
    background: #ffffff;
}

.tour-tabs-content-panels {
    padding: var(--spacing-md);
}

.tour-tab-content {
    display: none;
    animation: tabFadeIn 0.35s ease;
}

.tour-tab-content.active {
    display: block;
}

@keyframes tabFadeIn {
    from {
        opacity: 0;
        transform: translateY(8px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Remove internal duplicate paddings for single tab blocks */
.tour-tab-content .package-description {
    background: none;
    box-shadow: none;
    border: none;
    padding: 0;
}

.tour-tab-content .package-description h2 {
    font-size: 1.5rem;
    margin-top: 0;
    margin-bottom: var(--spacing-md);
    padding-bottom: var(--spacing-xs);
    border-bottom: 2px solid var(--color-border);
}

/* Overview: Tour Gallery Grid */
.tour-gallery-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
    gap: 16px;
}

.gallery-item-link {
    position: relative;
    height: 130px;
    border-radius: var(--border-radius-sm);
    overflow: hidden;
    display: block;
    box-shadow: var(--box-shadow);
}

.gallery-item-link img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: var(--transition);
}

.gallery-item-hover {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(27, 145, 191, 0.6);
    backdrop-filter: blur(2px);
    display: flex;
    align-items: center;
    justify-content: center;
    color: #ffffff;
    font-size: 1.5rem;
    opacity: 0;
    transition: var(--transition-fast);
}

.gallery-item-link:hover img {
    transform: scale(1.08);
}

.gallery-item-link:hover .gallery-item-hover {
    opacity: 1;
}

/* Itinerary Timeline Tab */
.tour-plan-timeline {
    position: relative;
    padding-left: 10px;
    margin-top: 15px;
}

.timeline-day-card {
    display: flex;
    gap: 20px;
    margin-bottom: 25px;
    position: relative;
}

.timeline-day-card:last-child {
    margin-bottom: 0;
}

.timeline-day-indicator {
    display: flex;
    flex-direction: column;
    align-items: center;
    width: 45px;
    flex-shrink: 0;
}

.timeline-day-indicator .day-number {
    width: 45px;
    height: 45px;
    background: var(--color-primary);
    color: #ffffff;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-family: var(--font-heading);
    font-weight: 700;
    font-size: 0.85rem;
    box-shadow: 0 4px 10px rgba(27, 145, 191, 0.3);
    z-index: 2;
}

.timeline-day-indicator .timeline-line {
    width: 2px;
    background: var(--color-border);
    flex-grow: 1;
    margin-top: 10px;
    margin-bottom: -35px;
}

.timeline-day-card:last-child .timeline-line {
    display: none;
}

.timeline-day-main {
    flex-grow: 1;
    background: #f8fafc;
    border: 1px solid var(--color-border);
    border-radius: var(--border-radius-sm);
    padding: 20px;
    transition: var(--transition-fast);
}

.timeline-day-main:hover {
    border-color: var(--color-primary);
    box-shadow: var(--box-shadow);
    background: #ffffff;
}

.timeline-day-main h3 {
    font-size: 1.15rem;
    font-weight: 700;
    margin: 0 0 12px 0;
    color: var(--color-text-dark);
}

.timeline-day-main .day-body {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.timeline-day-main .day-image-wrap {
    width: 100%;
    max-height: 300px;
    border-radius: 6px;
    overflow: hidden;
    box-shadow: var(--box-shadow);
}

.timeline-day-main .day-image-wrap img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.timeline-day-main .day-description {
    font-size: 0.95rem;
    color: var(--color-text-muted);
    line-height: 1.6;
}

/* Attractions Grid Tab */
.attractions-grid-three-col {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 20px;
}

.attraction-grid-card {
    background: #ffffff;
    border: 1px solid var(--color-border);
    border-radius: var(--border-radius-sm);
    overflow: hidden;
    box-shadow: var(--box-shadow-card);
    transition: var(--transition);
    display: flex;
    flex-direction: column;
}

.attraction-grid-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--box-shadow-hover);
    border-color: var(--color-primary);
}

.attraction-card-image {
    height: 160px;
    background-size: cover;
    background-position: center;
    position: relative;
    overflow: hidden;
}

.card-overlay-hover {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(15, 23, 42, 0.6);
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: var(--transition-fast);
}

.explore-btn {
    color: #ffffff;
    font-size: 0.85rem;
    font-weight: 700;
    border: 2px solid #ffffff;
    padding: 8px 16px;
    border-radius: 30px;
    transition: var(--transition-fast);
}

.attraction-grid-card:hover .card-overlay-hover {
    opacity: 1;
}

.attraction-grid-card:hover .explore-btn {
    background: #ffffff;
    color: var(--color-primary);
}

.attraction-card-title-wrap {
    padding: 15px;
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.attraction-card-title-wrap h4 {
    margin: 0;
    font-size: 1.05rem;
    font-weight: 700;
    color: var(--color-text-dark);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.attraction-card-title-wrap .location-tag {
    font-size: 0.78rem;
    color: var(--color-text-muted);
    display: flex;
    align-items: center;
    gap: 4px;
}

/* Experiences Subsection Styles */
.predefined-experiences-icons-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(110px, 1fr));
    gap: 15px;
}

.experience-icon-card {
    background: #f8fafc;
    border: 1px solid var(--color-border);
    border-radius: var(--border-radius-sm);
    padding: 15px 8px;
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    gap: 8px;
    transition: var(--transition-fast);
}

.experience-icon-card:hover {
    transform: translateY(-3px);
    border-color: var(--color-primary);
    background: #ffffff;
    box-shadow: var(--box-shadow);
}

.experience-icon-card .icon-wrap {
    width: 42px;
    height: 42px;
    border-radius: 50%;
    background: rgba(27, 145, 191, 0.08);
    color: var(--color-primary);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.2rem;
}

.experience-icon-card span {
    font-size: 0.8rem;
    font-weight: 600;
    color: var(--color-text-dark);
}

.custom-experiences-frontend-list h3 {
    margin-bottom: 12px;
}

.custom-exp-ul {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px;
    padding: 0;
    margin: 0;
    list-style: none;
}

.custom-exp-ul li {
    font-size: 0.95rem;
    color: var(--color-text-dark);
    display: flex;
    align-items: center;
    gap: 8px;
}

/* Terms and Conditions Editor Stylings */
.terms-editor-content {
    font-size: 0.98rem;
    line-height: 1.7;
    color: var(--color-text-muted);
}

/* Responsive adjustments */
@media (max-width: 992px) {
    .tour-body-content {
        grid-template-columns: 1fr;
    }
    .inclusions-grid {
        grid-column: span 1;
        grid-template-columns: 1fr;
    }
    .attractions-grid-three-col {
        grid-template-columns: 1fr 1fr;
    }
}

@media (max-width: 768px) {
    .tour-tabs-nav li {
        padding: 14px 16px;
        font-size: 0.85rem;
    }
    .tour-tabs-content-panels {
        padding: var(--spacing-sm);
    }
    .attractions-grid-three-col {
        grid-template-columns: 1fr;
    }
    .custom-exp-ul {
        grid-template-columns: 1fr;
    }
    .timeline-day-card {
        flex-direction: column;
        gap: 10px;
    }
    .timeline-day-indicator {
        flex-direction: row;
        width: 100%;
        align-items: center;
        gap: 12px;
    }
    .timeline-day-indicator .timeline-line {
        height: 2px;
        width: 100%;
        margin-top: 0;
        margin-bottom: 0;
    }
}
/* Container Track wrapper */
#featured-tours-track {
    display: grid;
    grid-template-columns: repeat(3, 1fr); /* Forces exactly 3 equal-width columns */
    gap: 30px;                             /* Spacing between the cards */
    width: 100%;
    align-items: stretch;                  /* Ensures all cards stretch to equal height */
}

/* Premium Card Refinements for Equal Height */
.premium-tour-card {
    background: #ffffff;
    border-radius: 16px;
    overflow: hidden;
    box-shadow: 0 4px 30px rgba(0, 0, 0, 0.03);
    border: 1px solid rgba(0, 0, 0, 0.06);
    transition: transform 0.4s cubic-bezier(0.25, 1, 0.5, 1), 
                box-shadow 0.4s cubic-bezier(0.25, 1, 0.5, 1);
    
    /* These properties force inner elements to stretch correctly */
    display: flex;
    flex-direction: column;
    height: 100%; 
}

.premium-tour-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.08);
}

/* Image Aspect Ratio Constraint */
.tour-card-link-wrapper {
    display: block;
    overflow: hidden;
    position: relative;
    width: 100%;
}

.tour-card-img-wrap {
    position: relative;
    aspect-ratio: 16 / 10; /* Keeps all card images at the exact same proportions */
    overflow: hidden;
    background-color: #f7f7f7;
}

.premium-card-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.7s cubic-bezier(0.25, 1, 0.5, 1);
}

.premium-tour-card:hover .premium-card-img {
    transform: scale(1.06);
}

/* Card Body Distribution */
.tour-card-content {
    padding: 24px;
    display: flex;
    flex-direction: column;
    flex-grow: 1; /* Pushes the footer down if one card has less description text */
}

.tour-meta-top {
    display: flex;
    align-items: center;
    margin-bottom: 12px;
}

.tour-duration {
    font-size: 0.8rem;
    text-transform: uppercase;
    letter-spacing: 1px;
    font-weight: 600;
    color: #8c8c8c;
    display: inline-flex;
    align-items: center;
    gap: 6px;
}

.tour-card-title {
    font-size: 1.35rem;
    font-weight: 700;
    line-height: 1.4;
    margin: 0 0 12px 0;
}

.tour-card-title a {
    color: #111111;
    text-decoration: none;
}

.tour-card-text {
    font-size: 0.95rem;
    line-height: 1.6;
    color: #555555;
    margin-bottom: 24px;
    flex-grow: 1; /* This acts as a spacer so all footers align perfectly at the bottom */
}

/* Bottom Footer Alignment */
.tour-card-footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding-top: 20px;
    border-top: 1px solid rgba(0, 0, 0, 0.06);
    margin-top: auto; /* Locks the alignment bar to the bottom edge */
}

.tour-price-block {
    display: flex;
    flex-direction: column;
}

.price-label {
    font-size: 0.75rem;
    text-transform: uppercase;
    color: #8c8c8c;
}

.price-amount {
    font-size: 1.4rem;
    font-weight: 800;
    color: #111111;
}

.btn-premium-details {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    font-size: 0.9rem;
    font-weight: 600;
    color: #111111;
    text-decoration: none;
    transition: color 0.3s ease;
}

.btn-premium-details:hover {
    color: #bf9456;
}

.btn-premium-details .arrow-icon {
    transition: transform 0.3s cubic-bezier(0.25, 1, 0.5, 1);
}

.btn-premium-details:hover .arrow-icon {
    transform: translateX(4px);
}

/* Responsive Handling (Tablet & Mobile Breakpoints) */
@media (max-width: 991px) {
    #featured-tours-track {
        grid-template-columns: repeat(2, 1fr); /* 2 columns on tablets */
    }
}

@media (max-width: 767px) {
    #featured-tours-track {
        grid-template-columns: 1fr; /* Stacked single column on mobile screens */
    }
}