/* Horizontal Accordion Styles */

.accordion-section {
    padding: 80px 0;
    background-color: #f9f9f9;
    overflow: hidden;
    /* Prevent spillover */
}

.accordion-container {
    display: flex;
    width: 100%;
    height: 600px;
    /* Fixed height for the accordion */
    max-width: 1600px;
    /* Max width constraint */
    margin: 0 auto;
    overflow: hidden;
    gap: 5px;
    /* Slight gap between panels */
}

.accordion-item {
    flex: 1;
    /* Default state: collapsed */
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    position: relative;
    cursor: pointer;
    transition: flex 0.7s cubic-bezier(0.25, 1, 0.5, 1);
    /* Smooth transition */
    border-radius: 20px;
    overflow: hidden;
    margin: 0 5px;
    /* Mobile margin */
}

.accordion-item::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.4);
    /* Dark overlay */
    transition: background 0.3s ease;
}

.accordion-item.active {
    flex: 4;
    /* Expanded state */
}

.accordion-item.active::before {
    background: rgba(0, 0, 0, 0.2);
    /* Lighter overlay when active */
}

.accordion-content {
    position: absolute;
    bottom: 30px;
    left: 30px;
    right: 30px;
    color: #fff;
    opacity: 0.9;
    transition: opacity 0.3s ease;
}

.accordion-header {
    margin-bottom: 10px;
}

.day-count {
    display: inline-block;
    background-color: var(--color-primary);
    /* Uses global premium color */
    color: #fff;
    padding: 5px 12px;
    border-radius: 20px;
    font-size: 0.8rem;
    font-weight: 700;
    margin-bottom: 5px;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.accordion-item h3 {
    font-family: 'Playfair Display', serif;
    font-size: 1.8rem;
    margin: 0;
    white-space: nowrap;
    /* Prevent wrapping in collapsed state */
    overflow: hidden;
    text-overflow: ellipsis;
    transition: all 0.3s ease;
}

/* Collapsed H3 Rotation logic (optional, for vertical text effects) - simplified here for robustness */
.accordion-item:not(.active) h3 {
    font-size: 1.2rem;
    opacity: 0.8;
}

.accordion-body {
    max-height: 0;
    opacity: 0;
    overflow: hidden;
    transition: all 0.5s ease;
}

.accordion-item.active .accordion-body {
    max-height: 300px;
    /* Sufficient height for content */
    opacity: 1;
    margin-top: 15px;
}

.accordion-body ul {
    list-style: none;
    padding: 0;
    margin: 0;
}

.accordion-body li {
    margin-bottom: 5px;
    font-size: 0.95rem;
    display: flex;
    align-items: center;
}

.accordion-body li i {
    margin-right: 10px;
    color: var(--color-primary);
    /* Accent color */
}

.accordion-body p {
    font-family: 'Open Sans', sans-serif;
    font-size: 0.95rem;
    line-height: 1.5;
    margin-bottom: 10px;
}

/* Mobile Responsiveness */
@media (max-width: 768px) {
    .accordion-container {
        flex-direction: column;
        /* Stack vertically on mobile */
        height: auto;
    }

    .accordion-item {
        height: 80px;
        /* Collapsed height */
        width: 100%;
        margin-bottom: 10px;
    }

    .accordion-item.active {
        flex: none;
        /* Disable flex growth */
        height: 400px;
        /* Expanded height */
    }
}

/* Quick Access Tabs (Material UI Style) */
.quick-access-section {
    padding: 40px 0;
    background-color: #fff;
    text-align: center;
    border-bottom: 1px solid #e0e0e0;
}

.quick-access-tabs {
    display: flex;
    justify-content: center;
    gap: 15px;
    margin-top: 30px;
    margin-bottom: 80px;
    /* Force spread */
    border-bottom: 2px solid #eee;
    /* Light full width line */
    padding-bottom: 0;
    max-width: 100%;
    /* Allow full width */
    flex-wrap: wrap;
}

.quick-access-tab {
    padding: 12px 24px;
    background: transparent;
    color: #666;
    font-family: var(--font-heading);
    font-size: 1rem;
    text-decoration: none;
    border: none;
    border-bottom: 2px solid transparent;
    cursor: pointer;
    transition: all 0.3s ease;
    text-transform: uppercase;
    letter-spacing: 1px;
    position: relative;
    top: 1px;
    /* Align with border-bottom */
}

.quick-access-tab span {
    display: block;
    font-size: 0.7rem;
    font-family: var(--font-body);
    font-weight: normal;
    text-transform: none;
    opacity: 0.8;
    margin-top: 4px;
}

.quick-access-tab:hover {
    color: var(--color-primary);
    background-color: rgba(139, 69, 19, 0.04);
    /* Subtle hover bg */
}

.quick-access-tab.active {
    color: var(--color-primary);
    /* Brand Color */
    border-bottom: 2px solid var(--color-primary);
    font-weight: 600;
}

/* Tab Content Panels */
.tab-content {
    max-width: 1100px;
    margin: 40px auto 80px;
    /* Reduced top margin since tabs have margin-bottom now */
    padding: 0 20px;
    min-height: 400px;
}

.tab-pane {
    display: none;
    animation: fadeIn 0.5s ease;
}

.tab-pane.active {
    display: flex;
    gap: 50px;
    align-items: flex-start;
    /* Changed from center to handle long text */
    justify-content: center;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(10px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.itinerary-image {
    flex: 1;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 15px 40px rgba(0, 0, 0, 0.15);
    height: auto;
    /* Allow height to adjust or keep fixed? Standardizing is safer but... */
    min-height: 400px;
    position: sticky;
    /* Keep image visible while scrolling long text */
    top: 100px;
}

.itinerary-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s ease;
}

.itinerary-image:hover img {
    transform: scale(1.03);
}

.itinerary-details {
    flex: 1;
    text-align: left;
}

.itinerary-details h3 {
    font-family: var(--font-heading);
    font-size: 2.5rem;
    margin-bottom: 20px;
    color: var(--color-primary);
}

.itinerary-details p {
    font-size: 1.1rem;
    color: #555;
    margin-bottom: 30px;
}

.itinerary-features {
    list-style: none;
    padding: 0;
    margin-bottom: 30px;
}

.itinerary-features li {
    margin-bottom: 12px;
    font-size: 1rem;
    display: flex;
    align-items: center;
    color: #444;
}

.itinerary-features li i {
    color: var(--color-primary);
    margin-right: 15px;
    font-size: 1.1rem;
    width: 20px;
    /* Align icons */
    text-align: center;
}

@media (max-width: 900px) {
    .tab-pane.active {
        flex-direction: column;
        text-align: center;
        /* Center on mobile */
    }

    .itinerary-details {
        text-align: center;
        /* Center text on mobile */
    }

    .itinerary-features li {
        justify-content: center;
        /* Center list items */
    }

    .itinerary-image {
        width: 100%;
        height: 300px;
        position: static;
        /* Remove sticky on mobile */
    }
}

/* Timeline Styles */
.day-item {
    margin-bottom: 25px;
    padding-left: 20px;
    border-left: 3px solid var(--color-secondary);
    /* Tan/Gold line */
}

.day-item h4 {
    font-family: var(--font-heading);
    font-size: 1.3rem;
    color: var(--color-primary);
    margin-bottom: 10px;
}

.day-item p {
    font-size: 0.95rem;
    margin-bottom: 8px;
    line-height: 1.6;
}

.itinerary-extras h5 {
    font-family: var(--font-heading);
    font-size: 1.2rem;
    margin-bottom: 15px;
    color: #333;
}

/* Footer Video Background Fixes */
footer {
    position: relative;
    color: #fff;
    overflow: hidden;
    padding: 100px 0;
    /* Added padding to center content verticaly */
}

/* Thin Parallax Separator */
.parallax-separator {
    background-image: url('../images/serengetitrip.jpg');
    background-attachment: fixed;
    background-position: center;
    background-repeat: no-repeat;
    background-size: cover;
    height: 250px;
    /* Thin strip */
    width: 100%;
    position: relative;
    z-index: 1;
    box-shadow: inset 0 0 50px rgba(0, 0, 0, 0.5);
    /* Inner shadow for depth */
}

.parallax-separator::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.2);
    /* Slight overlay */
}

footer .video-background {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: -1;
}

footer .video-background video {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

footer .footer-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.85);
    /* Dark overlay */
    z-index: 0;
}

.footer-content,
.footer-bottom {
    position: relative;
    z-index: 1;
    /* Ensure content is above video */
}