/* Destinations Page Specific Styles */

/* Page Header - Matches global styling */
.page-header {
    position: relative;
    height: 60vh;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    color: var(--white);
    overflow: hidden;
    margin-top: 80px;
}

.page-header::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.3);
    z-index: 2;
}

.page-header-bg {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 120%;
    background-size: cover;
    background-position: center;
    background-attachment: fixed;
    z-index: 1;
}

.page-header-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(to bottom, rgba(0, 0, 0, 0.2), rgba(0, 0, 0, 0.4));
    z-index: 2;
}

.page-header-content {
    position: relative;
    z-index: 3;
    max-width: 800px;
    padding: 0 var(--spacing-md);
}

.page-header-content h1,
.page-header h1 {
    font-size: 3.5rem;
    font-weight: 700;
    margin-bottom: var(--spacing-md);
    text-shadow: 2px 2px 8px rgba(0, 0, 0, 0.7), 0 0 20px rgba(0, 0, 0, 0.5);
    color: var(--white);
}

.page-header-content p,
.page-header p {
    font-size: 1.3rem;
    margin-bottom: var(--spacing-lg);
    opacity: 0.98;
    line-height: 1.6;
    text-shadow: 1px 1px 4px rgba(0, 0, 0, 0.7), 0 0 10px rgba(0, 0, 0, 0.4);
    color: var(--white);
}

.breadcrumb {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: var(--spacing-xs);
    font-size: 1rem;
    opacity: 0.95;
    text-shadow: 1px 1px 3px rgba(0, 0, 0, 0.7);
}

.breadcrumb a {
    color: var(--white);
    text-decoration: none;
    transition: color var(--transition-fast);
    text-shadow: 1px 1px 3px rgba(0, 0, 0, 0.7);
}

.breadcrumb a:hover {
    color: var(--white);
    opacity: 0.8;
}

.breadcrumb span {
    color: var(--white);
}

/* Country Navigation */
.country-nav {
    background: var(--white);
    padding: var(--spacing-md) 0;
    border-bottom: 1px solid #E0E0E0;
    position: sticky;
    top: 80px;
    z-index: 100;
}

.country-tabs {
    display: flex;
    justify-content: center;
    gap: var(--spacing-sm);
    flex-wrap: wrap;
}

.country-tab {
    background: transparent;
    border: 2px solid var(--primary-color);
    color: var(--primary-color);
    padding: var(--spacing-xs) var(--spacing-md);
    border-radius: 50px;
    font-weight: 500;
    cursor: pointer;
    transition: all var(--transition-medium);
    font-size: 0.9rem;
}

.country-tab:hover,
.country-tab.active {
    background: var(--primary-color);
    color: var(--white);
}

/* Country Sections */
.destinations-main {
    padding: var(--spacing-xl) 0;
}

.country-section {
    margin-bottom: var(--spacing-xxl);
}

.country-section[data-country="Rwanda"] {
    display: block;
}

.country-section[data-country="rwanda"] {
    display: block;
}

.country-section.hidden {
    display: none;
}

.country-header {
    display: flex;
    align-items: center;
    gap: var(--spacing-lg);
    margin-bottom: var(--spacing-xl);
    padding: var(--spacing-lg);
    background: var(--light-gray);
    border-radius: 15px;
}

.country-info {
    flex: 1;
}

.country-info h2 {
    color: var(--primary-color);
    margin-bottom: var(--spacing-sm);
}

.country-info p {
    font-size: 1.1rem;
    line-height: 1.7;
}

.country-flag {
    flex-shrink: 0;
}

.country-flag img {
    width: 80px;
    height: auto;
    border-radius: 8px;
    box-shadow: var(--shadow-sm);
}

/* Destinations Grid */
.destinations-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
    gap: var(--spacing-md);
}

.destination-item {
    background: rgba(255, 255, 255, 0.9);
    backdrop-filter: blur(15px);
    border-radius: 25px;
    overflow: hidden;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.1);
    transition: all var(--transition-medium);
    position: relative;
    border: 1px solid rgba(255, 255, 255, 0.2);
}

.destination-item:hover {
    transform: translateY(-15px) scale(1.02);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.15);
    background: rgba(255, 255, 255, 0.95);
}

.destination-image {
    position: relative;
    height: 200px;
    overflow: hidden;
}

.destination-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform var(--transition-slow);
}

.destination-item:hover .destination-image img {
    transform: scale(1.1);
}

.destination-badge {
    position: absolute;
    top: var(--spacing-sm);
    right: var(--spacing-sm);
    background: rgba(34, 139, 34, 0.9);
    backdrop-filter: blur(10px);
    color: var(--white);
    padding: var(--spacing-xs) var(--spacing-sm);
    border-radius: 25px;
    font-size: 0.8rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    border: 1px solid rgba(255, 255, 255, 0.3);
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
}

.destination-content {
    padding: var(--spacing-md);
}

.destination-content h3 {
    color: var(--primary-color);
    margin-bottom: var(--spacing-sm);
    font-size: 1.5rem;
}

.destination-meta {
    display: flex;
    gap: var(--spacing-md);
    margin-bottom: var(--spacing-sm);
    flex-wrap: wrap;
}

.destination-meta span {
    display: flex;
    align-items: center;
    gap: var(--spacing-xs);
    font-size: 0.9rem;
    color: var(--medium-gray);
}

.destination-meta i {
    width: 16px;
    height: 16px;
}

.destination-content p {
    margin-bottom: var(--spacing-md);
    line-height: 1.6;
}

.destination-highlights {
    display: flex;
    flex-wrap: wrap;
    gap: var(--spacing-xs);
    margin-bottom: var(--spacing-md);
}

.highlight-tag {
    background: rgba(240, 248, 240, 0.8);
    backdrop-filter: blur(10px);
    color: var(--primary-color);
    padding: var(--spacing-xs) var(--spacing-sm);
    border-radius: 20px;
    font-size: 0.8rem;
    font-weight: 600;
    border: 1px solid rgba(13, 79, 60, 0.2);
    transition: all var(--transition-fast);
}

.highlight-tag:hover {
    background: rgba(13, 79, 60, 0.1);
    transform: translateY(-2px);
}

.destination-actions {
    display: flex;
    gap: var(--spacing-sm);
    flex-wrap: wrap;
}

.destination-actions .btn {
    flex: 1;
    min-width: 100px;
    text-align: center;
    padding: var(--spacing-xs) var(--spacing-sm);
    font-size: 0.85rem;
    border-radius: 20px;
    font-weight: 500;
}

/* Interactive Map */
.map-section {
    background: var(--light-gray);
    padding: var(--spacing-xxl) 0;
}

.map-container {
    position: relative;
    max-width: 800px;
    margin: 0 auto;
    border-radius: 15px;
    overflow: hidden;
    box-shadow: var(--shadow-lg);
}

.map-placeholder {
    position: relative;
    width: 100%;
    height: 500px;
}

.map-placeholder img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.map-marker {
    position: absolute;
    cursor: pointer;
    z-index: 10;
}

.marker-pin {
    width: 20px;
    height: 20px;
    background: var(--secondary-color);
    border: 3px solid var(--white);
    border-radius: 50%;
    animation: pulse 2s infinite;
    transition: all var(--transition-medium);
}

.map-marker:hover .marker-pin {
    background: var(--primary-color);
    transform: scale(1.2);
}

@keyframes pulse {
    0% {
        box-shadow: 0 0 0 0 rgba(255, 107, 53, 0.7);
    }
    70% {
        box-shadow: 0 0 0 10px rgba(255, 107, 53, 0);
    }
    100% {
        box-shadow: 0 0 0 0 rgba(255, 107, 53, 0);
    }
}

.marker-tooltip {
    position: absolute;
    bottom: 30px;
    left: 50%;
    transform: translateX(-50%);
    background: var(--dark-color);
    color: var(--white);
    padding: var(--spacing-xs) var(--spacing-sm);
    border-radius: 8px;
    font-size: 0.8rem;
    white-space: nowrap;
    opacity: 0;
    visibility: hidden;
    transition: all var(--transition-medium);
    pointer-events: none;
}

.marker-tooltip::after {
    content: '';
    position: absolute;
    top: 100%;
    left: 50%;
    transform: translateX(-50%);
    border: 5px solid transparent;
    border-top-color: var(--dark-color);
}

.map-marker:hover .marker-tooltip {
    opacity: 1;
    visibility: visible;
}

/* Modal Styles */
.modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.8);
    z-index: 10000;
    backdrop-filter: blur(5px);
}

.modal.active {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: var(--spacing-sm);
}

.modal-content {
    background: var(--white);
    border-radius: 15px;
    max-width: 800px;
    width: 100%;
    max-height: 90vh;
    overflow-y: auto;
    position: relative;
    animation: modalSlideIn 0.3s ease-out;
}

@keyframes modalSlideIn {
    from {
        opacity: 0;
        transform: translateY(-50px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.modal-close {
    position: absolute;
    top: var(--spacing-sm);
    right: var(--spacing-sm);
    background: var(--white);
    border: none;
    border-radius: 50%;
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    box-shadow: var(--shadow-sm);
    z-index: 10;
    transition: all var(--transition-medium);
}

.modal-close:hover {
    background: var(--light-gray);
    transform: rotate(90deg);
}

.modal-body {
    padding: var(--spacing-lg);
}

/* Responsive Design */
@media (max-width: 768px) {
    .page-header {
        height: 50vh;
    }
    
    .page-header h1 {
        font-size: 2.5rem;
    }
    
    .page-header p {
        font-size: 1.1rem;
    }

    .country-header {
        flex-direction: column;
        text-align: center;
        gap: var(--spacing-md);
    }

    .country-flag img {
        width: 60px;
    }

    .destinations-grid {
        grid-template-columns: 1fr;
        gap: var(--spacing-md);
    }

    .destination-actions {
        flex-direction: column;
    }

    .destination-actions .btn {
        width: 100%;
        padding: var(--spacing-xs) var(--spacing-sm);
        font-size: 0.8rem;
    }

    .destination-meta {
        flex-direction: column;
        gap: var(--spacing-xs);
    }

    .map-placeholder {
        height: 300px;
    }

    .country-tabs {
        gap: var(--spacing-xs);
    }

    .country-tab {
        font-size: 0.8rem;
        padding: var(--spacing-xs) var(--spacing-sm);
    }
}

@media (max-width: 480px) {
    .page-header h1,
    .page-header-content h1 {
        font-size: 2rem;
    }

    .page-header p,
    .page-header-content p {
        font-size: 1rem;
    }

    .destinations-grid {
        grid-template-columns: 1fr;
    }

    .destination-item {
        margin: 0 var(--spacing-xs);
    }

    .modal-content {
        margin: var(--spacing-sm);
        max-height: 85vh;
    }

    .modal-body {
        padding: var(--spacing-md);
    }
}

/* Section Dividers */
.section-divider {
    width: 100%;
    text-align: center;
    margin: var(--spacing-xl) 0 var(--spacing-lg);
    position: relative;
}

.section-divider h3 {
    background: var(--white);
    color: var(--primary-color);
    padding: 0 var(--spacing-md);
    display: inline-block;
    font-size: 1.5rem;
    font-weight: 600;
    position: relative;
    z-index: 2;
}

.section-divider::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 0;
    right: 0;
    height: 2px;
    background: linear-gradient(90deg, transparent, var(--primary-color), transparent);
    z-index: 1;
}

/* Filter Animation */
.destination-item.fade-out {
    opacity: 0;
    transform: scale(0.8);
    transition: all 0.3s ease;
}

.destination-item.fade-in {
    opacity: 1;
    transform: scale(1);
    transition: all 0.3s ease;
}

/* Loading States */
.destination-item.loading {
    opacity: 0.5;
    pointer-events: none;
}

.destination-item.loading::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 40px;
    height: 40px;
    border: 3px solid var(--light-gray);
    border-top-color: var(--primary-color);
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    to {
        transform: translate(-50%, -50%) rotate(360deg);
    }
}
