/* Country Pages Specific Styles */

/* Country Hero Section */
.country-hero {
    position: relative;
    height: 80vh;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    overflow: hidden;
    margin-top: 80px;
}

.country-hero .hero-video {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    z-index: -2;
}

.country-hero .hero-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    z-index: -1;
}

.country-hero .hero-content {
    color: white;
    max-width: 800px;
    padding: 0 20px;
}

.breadcrumb {
    margin-bottom: 1rem;
    font-size: 0.9rem;
    opacity: 0.9;
}

.breadcrumb a {
    color: white;
    text-decoration: none;
    transition: opacity 0.3s ease;
}

.breadcrumb a:hover {
    opacity: 0.7;
}

.breadcrumb span {
    color: #27ae60;
    font-weight: 600;
}

.hero-stats {
    display: flex;
    justify-content: center;
    gap: 2rem;
    margin: 2rem 0;
    flex-wrap: wrap;
}

.stat {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    background: rgba(255, 255, 255, 0.1);
    padding: 0.75rem 1.5rem;
    border-radius: 25px;
    backdrop-filter: blur(10px);
}

.stat i {
    color: #27ae60;
}

/* Country Overview */
.country-overview {
    padding: 80px 0;
    background: white;
}

.overview-content {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 4rem;
    align-items: center;
}

.overview-text h2 {
    color: #333;
    margin-bottom: 1.5rem;
}

.overview-text p {
    margin-bottom: 1.5rem;
    line-height: 1.8;
}

.highlights {
    margin-top: 2rem;
}

.highlights h3 {
    color: #333;
    margin-bottom: 1rem;
}

.highlights ul {
    list-style: none;
    padding: 0;
}

.highlights li {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    margin-bottom: 0.75rem;
    padding: 0.5rem 0;
}

.highlights li i {
    color: #27ae60;
    font-size: 1.1rem;
}

.overview-image {
    position: relative;
}

.overview-image img {
    width: 100%;
    height: 400px;
    object-fit: cover;
    border-radius: 15px;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.1);
}

/* Quick Summary */
.quick-summary {
    background: #f8f9fa;
    padding: 60px 0;
}

.summary-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 2rem;
}

.summary-item {
    text-align: center;
    background: white;
    padding: 2rem;
    border-radius: 15px;
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.1);
    transition: transform 0.3s ease;
}

.summary-item:hover {
    transform: translateY(-5px);
}

.summary-item i {
    font-size: 2.5rem;
    color: #27ae60;
    margin-bottom: 1rem;
}

.summary-item h4 {
    color: #333;
    margin-bottom: 0.5rem;
}

.summary-item p {
    color: #666;
    margin: 0;
}

/* Available Trips */
.available-trips {
    padding: 80px 0;
    background: white;
}

.trips-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
    max-width: 1200px;
    margin: 0 auto;
}

/* Ensure maximum 3 cards per row with consistent 1/3 width */
@media (min-width: 1000px) {
    .trips-grid {
        grid-template-columns: repeat(3, 1fr);
    }
    
    /* Force each card to be exactly 1/3 width regardless of content */
    .trips-grid .trip-card {
        width: 100%;
        max-width: none;
    }
}

/* For medium screens, allow 2 cards per row */
@media (min-width: 700px) and (max-width: 999px) {
    .trips-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

/* For small screens, single column */
@media (max-width: 699px) {
    .trips-grid {
        grid-template-columns: 1fr;
    }
}

.trip-card {
    background: white;
    border-radius: 15px;
    overflow: hidden;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
    transition: transform 0.3s ease;
    position: relative;
    display: flex;
    flex-direction: column;
    height: 100%;
}

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

.trip-card.featured {
    border: 3px solid #27ae60;
}

.trip-image {
    position: relative;
    height: 250px;
    overflow: hidden;
}

.trip-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s ease;
}

.trip-card:hover .trip-image img {
    transform: scale(1.1);
}

.trip-badge {
    position: absolute;
    top: 15px;
    right: 15px;
    background: linear-gradient(45deg, #27ae60, #2ecc71);
    color: white;
    padding: 0.5rem 1rem;
    border-radius: 20px;
    font-size: 0.8rem;
    font-weight: 600;
}

.trip-content {
    padding: 2rem;
    display: flex;
    flex-direction: column;
    flex-grow: 1;
}

.trip-content h3 {
    color: #333;
    margin-bottom: 1rem;
    font-size: 1.5rem;
    min-height: 2em; /* Normalize title height */
    display: flex;
    align-items: center;
}

.trip-content p {
    color: #666;
    margin-bottom: 1.5rem;
    line-height: 1.6;
    flex-grow: 1; /* Allow description to expand and fill available space */
}

.trip-highlights {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    margin-bottom: 1.5rem;
    min-height: 4.5em; /* Normalize highlights section height */
}

.trip-highlights span {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.9rem;
    color: #666;
}

.trip-highlights i {
    color: #27ae60;
    width: 16px;
}

.trip-price {
    margin-bottom: 1.5rem;
    text-align: center;
    padding: 1rem;
    background: #f8f9fa;
    border-radius: 10px;
    margin-top: auto; /* Push price section to bottom */
}

.price {
    display: block;
    font-size: 1.8rem;
    font-weight: 700;
    color: #27ae60;
}

.price-note {
    font-size: 0.9rem;
    color: #666;
}

.trip-actions {
    display: flex;
    gap: 1rem;
    margin-top: auto; /* Ensure actions stay at bottom */
}

.trip-actions .btn {
    flex: 1;
    text-align: center;
    padding: 12px 20px;
    height: 44px; /* Fixed height instead of min-height for consistency */
    display: flex;
    align-items: center;
    justify-content: center;
    box-sizing: border-box;
}

/* Country Gallery */
.country-gallery {
    padding: 80px 0;
    background: #f8f9fa;
}

.gallery-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 1.5rem;
}

.gallery-item {
    position: relative;
    height: 250px;
    border-radius: 15px;
    overflow: hidden;
    cursor: pointer;
    transition: transform 0.3s ease;
}

.gallery-item:hover {
    transform: scale(1.05);
}

.gallery-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.gallery-overlay {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    background: linear-gradient(transparent, rgba(0, 0, 0, 0.8));
    color: white;
    padding: 2rem 1.5rem 1.5rem;
    transform: translateY(100%);
    transition: transform 0.3s ease;
}

.gallery-item:hover .gallery-overlay {
    transform: translateY(0);
}

.gallery-overlay h4 {
    margin: 0;
    font-size: 1.2rem;
}

/* CTA Section */
.cta-section {
    background: linear-gradient(135deg, #27ae60, #2ecc71);
    color: white;
    padding: 80px 0;
    text-align: center;
}

.cta-content h2 {
    color: white;
    margin-bottom: 1rem;
    font-size: 2.5rem;
}

.cta-content p {
    color: rgba(255, 255, 255, 0.9);
    font-size: 1.2rem;
    margin-bottom: 2rem;
    max-width: 600px;
    margin-left: auto;
    margin-right: auto;
}

.btn-large {
    padding: 15px 40px;
    font-size: 1.1rem;
    background: white;
    color: #27ae60;
}

.btn-large:hover {
    background: #f8f9fa;
    transform: translateY(-3px);
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.2);
}

/* Responsive Design for Country Pages */
@media (max-width: 768px) {
    .country-hero {
        height: 60vh;
        margin-top: 70px;
    }

    .hero-stats {
        flex-direction: column;
        align-items: center;
        gap: 1rem;
    }

    .overview-content {
        grid-template-columns: 1fr;
        gap: 2rem;
    }

    .overview-image {
        order: -1;
    }

    .summary-grid {
        grid-template-columns: repeat(2, 1fr);
    }

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

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

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

    .cta-content h2 {
        font-size: 2rem;
    }

    .cta-content p {
        font-size: 1rem;
    }
}

@media (max-width: 480px) {
    .country-hero {
        height: 50vh;
    }

    .hero-stats {
        gap: 0.5rem;
    }

    .stat {
        padding: 0.5rem 1rem;
        font-size: 0.9rem;
    }

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

    .trip-content {
        padding: 1.5rem;
    }

    .trip-highlights {
        font-size: 0.8rem;
    }

    .price {
        font-size: 1.5rem;
    }
}

/* Animation Classes */
.fade-in-up {
    animation: fadeInUp 0.6s ease-out;
}

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

/* Loading States */
.trip-card.loading {
    opacity: 0.7;
    pointer-events: none;
}

.trip-card.loading::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(255, 255, 255, 0.8);
    display: flex;
    align-items: center;
    justify-content: center;
}

/* Accessibility Improvements */
.trip-card:focus-within {
    outline: 3px solid #27ae60;
    outline-offset: 2px;
}

.gallery-item:focus {
    outline: 3px solid #27ae60;
    outline-offset: 2px;
}

/* Print Styles */
@media print {
    .navbar,
    .cta-section,
    .footer {
        display: none;
    }
    
    .country-hero {
        height: auto;
        margin-top: 0;
    }
    
    .hero-video,
    .hero-overlay {
        display: none;
    }
    
    .hero-content {
        color: #333;
    }
}