/* ===================================
   POST-CONFERENCE TOUR SECTION STYLES
   Modern Travel-Focused UI Design
   =================================== */

/* Tour Section Container */
.tour-section-new {
    padding: 120px 5%;
    max-width: 1600px;
    margin: 0 auto;
    position: relative;
}

/* Tour Days Navigation */
.tour-days-nav {
    display: flex;
    justify-content: center;
    gap: 20px;
    margin: 60px 0 50px;
    position: relative;
    z-index: 100;
}

.tour-day-btn {
    background: var(--glass-bg);
    backdrop-filter: blur(20px);
    border: 2px solid var(--glass-border);
    border-radius: 20px;
    padding: 20px 40px;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    cursor: pointer;
    transition: all 0.4s cubic-bezier(0.23, 1, 0.32, 1);
    font-family: var(--font-body);
    min-width: 160px;
}

.tour-day-btn i {
    font-size: 1.8rem;
    color: var(--primary);
    transition: transform 0.3s ease;
}

.tour-day-btn .day-label {
    font-size: 1.1rem;
    font-weight: 700;
    color: var(--text-primary);
}

.tour-day-btn .day-date {
    font-size: 0.9rem;
    color: var(--text-secondary);
    font-weight: 500;
}

.tour-day-btn:hover {
    transform: translateY(-5px);
    border-color: var(--primary);
    box-shadow: 0 15px 35px rgba(103, 0, 71, 0.2);
}

.tour-day-btn:hover i {
    transform: scale(1.2) rotate(5deg);
}

.tour-day-btn.active {
    background: linear-gradient(135deg, var(--primary), var(--secondary));
    border-color: var(--primary);
    box-shadow: 0 10px 30px rgba(103, 0, 71, 0.3);
}

.tour-day-btn.active .day-label,
.tour-day-btn.active .day-date {
    color: white;
}

.tour-day-btn.active i {
    color: white;
    transform: scale(1.15);
}

/* Tour Content Wrapper */
/* Tour Content Wrapper */
/* Tour Content Wrapper */
.tour-content-wrapper {
    position: relative;
    /* Fixed height required for absolute positioning of faces */
    height: 850px;
    perspective: 2000px;
    /* Deep perspective for 3D effect */
    transition: height 0.3s;
}

.tour-day-content {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    /* Ensure content fits */
    height: 100%;
    backface-visibility: hidden;
    /* Hide back of card */
    transition: transform 1.2s cubic-bezier(0.175, 0.885, 0.32, 1.275), opacity 0.5s step-end;
    background: transparent;
    transform-style: preserve-3d;
}

/* Day 1 Face */
.tour-day-content[data-day="1"] {
    transform: rotateY(0deg);
    z-index: 2;
    opacity: 1;
}

/* Day 2 Face (Starts flipped) */
.tour-day-content[data-day="2"] {
    transform: rotateY(180deg);
    z-index: 1;
    opacity: 0;
    /* Hidden initially */
    transition: transform 1.2s cubic-bezier(0.175, 0.885, 0.32, 1.275), opacity 0.5s step-start;
    /* Delay opacity change */
}

/* Flip State: When wrapper has class .show-day-2 */
.tour-content-wrapper.show-day-2 .tour-day-content[data-day="1"] {
    transform: rotateY(-180deg);
    opacity: 0;
    transition: transform 1.2s cubic-bezier(0.175, 0.885, 0.32, 1.275), opacity 0.5s step-start;
    /* Hide halfway */
}

.tour-content-wrapper.show-day-2 .tour-day-content[data-day="2"] {
    transform: rotateY(0deg);
    z-index: 3;
    opacity: 1;
    transition: transform 1.2s cubic-bezier(0.175, 0.885, 0.32, 1.275), opacity 0.5s step-end;
    /* Show instantly/late */
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Tour Grid Layout */
.tour-grid {
    display: grid;
    grid-template-columns: 1.2fr 0.8fr;
    gap: 40px;
    align-items: start;
}

/* Map Container */
.tour-map-container {
    position: relative;
    height: 650px;
    border-radius: 25px;
    overflow: hidden;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.15);
    border: 3px solid var(--glass-border);
}

.google-map {
    width: 100%;
    height: 100%;
}

.map-overlay-title {
    position: absolute;
    top: 20px;
    left: 20px;
    background: var(--glass-bg);
    backdrop-filter: blur(20px);
    padding: 12px 25px;
    border-radius: 50px;
    display: flex;
    align-items: center;
    gap: 10px;
    font-weight: 700;
    color: var(--primary);
    border: 1px solid var(--glass-border);
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.1);
    z-index: 10;
}

.map-overlay-title i {
    font-size: 1.1rem;
}

/* Locations Panel */
.tour-locations-panel {
    display: flex;
    flex-direction: column;
    gap: 20px;
    max-height: 650px;
    overflow-y: auto;
    padding-right: 10px;
}

.tour-locations-panel::-webkit-scrollbar {
    width: 6px;
}

.tour-locations-panel::-webkit-scrollbar-track {
    background: rgba(0, 0, 0, 0.05);
    border-radius: 10px;
}

.tour-locations-panel::-webkit-scrollbar-thumb {
    background: var(--primary);
    border-radius: 10px;
}

.tour-day-title {
    font-size: 1.6rem;
    font-weight: 800;
    color: var(--primary);
    margin-bottom: 10px;
    display: flex;
    align-items: center;
    gap: 12px;
}

.tour-day-title i {
    font-size: 1.4rem;
}

/* Location Cards */
.location-card {
    background: var(--glass-bg);
    backdrop-filter: blur(25px);
    border: 1px solid var(--glass-border);
    border-radius: 20px;
    overflow: hidden;
    transition: all 0.4s cubic-bezier(0.23, 1, 0.32, 1);
    cursor: pointer;
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.08);
}

.location-card:hover {
    transform: translateY(-8px) scale(1.02);
    box-shadow: 0 20px 45px rgba(103, 0, 71, 0.2);
    border-color: var(--primary);
}

.location-image-wrapper {
    position: relative;
    height: 180px;
    overflow: hidden;
}

.location-image {
    width: 100%;
    height: 100%;
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    transition: transform 0.6s ease;
}

.location-card:hover .location-image {
    transform: scale(1.1);
}

.location-badge {
    position: absolute;
    top: 15px;
    right: 15px;
    width: 50px;
    height: 50px;
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
}

.location-badge i {
    font-size: 1.3rem;
    color: var(--primary);
}

.location-info {
    padding: 25px;
}

.location-info h4 {
    font-size: 1.3rem;
    font-weight: 800;
    color: var(--highlight-text);
    margin-bottom: 10px;
    line-height: 1.3;
}

.location-description {
    font-size: 0.95rem;
    color: var(--text-secondary);
    line-height: 1.6;
    margin-bottom: 15px;
}

.location-meta {
    display: flex;
    align-items: center;
    gap: 10px;
}

.location-coords {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 0.85rem;
    color: var(--primary);
    font-weight: 600;
    background: rgba(103, 0, 71, 0.08);
    padding: 6px 14px;
    border-radius: 20px;
}

.location-coords i {
    font-size: 0.9rem;
}

/* Location Modal */
.location-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 9999;
    display: none;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.location-modal.active {
    display: flex;
    opacity: 1;
}

.modal-backdrop {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.7);
    backdrop-filter: blur(8px);
}

.modal-content {
    position: relative;
    background: var(--bg-secondary);
    border-radius: 30px;
    max-width: 900px;
    width: 90%;
    max-height: 85vh;
    overflow: hidden;
    box-shadow: 0 30px 80px rgba(0, 0, 0, 0.4);
    z-index: 1;
    animation: modalSlideIn 0.5s cubic-bezier(0.23, 1, 0.32, 1);
}

@keyframes modalSlideIn {
    from {
        transform: translateY(50px) scale(0.9);
        opacity: 0;
    }

    to {
        transform: translateY(0) scale(1);
        opacity: 1;
    }
}

.modal-close {
    position: absolute;
    top: 20px;
    right: 20px;
    width: 45px;
    height: 45px;
    background: rgba(255, 255, 255, 0.95);
    border: none;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    z-index: 10;
    font-size: 1.3rem;
    color: var(--primary);
    transition: all 0.3s ease;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.modal-close:hover {
    transform: rotate(90deg) scale(1.1);
    background: var(--primary);
    color: white;
}

.modal-body {
    display: grid;
    grid-template-columns: 1.2fr 0.8fr;
}

.modal-image {
    height: 500px;
    background-size: cover;
    background-position: center;
}

.modal-info {
    padding: 50px 40px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    gap: 20px;
}

.modal-title {
    font-size: 2rem;
    font-weight: 800;
    color: var(--primary);
    line-height: 1.2;
}

.modal-description {
    font-size: 1.05rem;
    color: var(--text-secondary);
    line-height: 1.8;
}

.modal-coords {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 1rem;
    font-weight: 600;
    color: var(--primary);
    background: rgba(103, 0, 71, 0.08);
    padding: 12px 20px;
    border-radius: 25px;
    width: fit-content;
}

.modal-coords i {
    font-size: 1.1rem;
}

/* Responsive Design */
@media (max-width: 1200px) {
    .tour-grid {
        grid-template-columns: 1fr;
    }

    .tour-map-container {
        height: 500px;
    }

    .tour-locations-panel {
        max-height: none;
        overflow-y: visible;
    }
}

@media (max-width: 768px) {
    .tour-section-new {
        padding: 80px 20px;
    }

    .tour-days-nav {
        flex-direction: column;
        gap: 15px;
    }

    .tour-day-btn {
        width: 100%;
        padding: 18px 30px;
    }

    .tour-map-container {
        height: 400px;
    }

    .location-image-wrapper {
        height: 140px;
    }

    .modal-body {
        grid-template-columns: 1fr;
    }

    .modal-image {
        height: 300px;
    }

    .modal-info {
        padding: 30px 25px;
    }

    .modal-title {
        font-size: 1.6rem;
    }

    .modal-description {
        font-size: 0.95rem;
    }
}

@media (max-width: 480px) {
    .location-info h4 {
        font-size: 1.1rem;
    }

    .location-description {
        font-size: 0.9rem;
    }

    .tour-day-title {
        font-size: 1.3rem;
    }
}

/* Dark Mode Adjustments */
[data-theme="dark"] .location-modal .modal-content {
    background: var(--bg-tertiary);
}

[data-theme="dark"] .modal-close {
    background: rgba(45, 11, 30, 0.95);
    color: white;
}

[data-theme="dark"] .modal-close:hover {
    background: var(--primary);
}

[data-theme="dark"] .location-badge {
    background: rgba(45, 11, 30, 0.95);
}

[data-theme="dark"] .location-badge i {
    color: var(--accent);
}


/* Leaflet Map Custom Styles */
.custom-marker {
    background: transparent !important;
    border: none !important;
}

.marker-pin {
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.23, 1, 0.32, 1) !important;
}

.marker-pin:hover {
    transform: rotate(-45deg) scale(1.15) !important;
    filter: drop-shadow(0 8px 20px rgba(103, 0, 71, 0.6));
}

/* Leaflet Popup Styling */
.leaflet-popup-content-wrapper {
    border-radius: 15px !important;
    box-shadow: 0 15px 40px rgba(0, 0, 0, 0.2) !important;
    padding: 0 !important;
}

.leaflet-popup-content {
    margin: 0 !important;
    min-width: 280px !important;
}

.leaflet-popup-tip {
    background: white !important;
}

.map-popup {
    padding: 15px;
}

/* Leaflet Controls */
.leaflet-control-zoom {
    border: 2px solid rgba(103, 0, 71, 0.2) !important;
    border-radius: 12px !important;
    overflow: hidden;
}

.leaflet-control-zoom a {
    color: #670047 !important;
    font-weight: bold !important;
    border: none !important;
    background: rgba(255, 255, 255, 0.95) !important;
    backdrop-filter: blur(10px);
}

.leaflet-control-zoom a:hover {
    background: #670047 !important;
    color: white !important;
}

/* Leaflet Attribution */
.leaflet-control-attribution {
    background: rgba(255, 255, 255, 0.8) !important;
    backdrop-filter: blur(10px);
    border-radius: 8px !important;
    padding: 4px 8px !important;
    font-size: 10px !important;
}

/* ==========================================================================
   RESPONSIVE FIXES FOR MOBILE
   ========================================================================== */

@media (max-width: 992px) {
    /* Reset fixed height for tour wrapper to prevent collapse/overlap */
    .tour-content-wrapper {
        height: auto !important;
        perspective: none;
        transition: none;
    }

    /* Change absolute positioning to relative for natural flow */
    .tour-day-content {
        position: relative;
        top: auto;
        left: auto;
        height: auto;
        opacity: 1 !important;
        transform: none !important;
        display: none; /* Hide via display property */
        transition: none;
    }

    /* Show only active content */
    .tour-day-content.active {
        display: block;
        animation: mobileFadeIn 0.5s ease-out;
    }

    /* Reset 3D flip states */
    .tour-content-wrapper.show-day-2 .tour-day-content[data-day="1"],
    .tour-content-wrapper.show-day-2 .tour-day-content[data-day="2"],
    .tour-day-content[data-day="1"],
    .tour-day-content[data-day="2"] {
        transform: none !important;
        opacity: 1 !important;
    }

    .tour-content-wrapper.show-day-2 .tour-day-content[data-day="1"] {
        display: none;
    }
    
    .tour-content-wrapper.show-day-2 .tour-day-content[data-day="2"] {
        display: block;
    }

    /* Ensure map container has height */
    .tour-map-container {
        height: 400px;
    }
}

@keyframes mobileFadeIn {
    from { opacity: 0; transform: translateY(10px); }
    to { opacity: 1; transform: translateY(0); }
}