/* Import Google Fonts */
@import url('https://fonts.googleapis.com/css2?family=Roboto:wght@300;400;700&display=swap');

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Roboto', sans-serif;
    line-height: 1.6;
    color: #333;
    background-color: #f4f4f4;
}

header {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 2rem;
    text-align: center;
}

header h1 {
    font-size: 2.5rem;
    margin-bottom: 0.5rem;
}

header p {
    font-size: 1.2rem;
    font-weight: 300;
}

main {
    max-width: 1200px;
    margin: 2rem auto;
    padding: 0 1rem;
}

.grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 1.5rem;
}

.destination {
    display: flex;
    flex-wrap: wrap;
    background: white;
    margin-bottom: 2rem;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
    transition: transform 0.3s ease;
}

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

.image-container {
    flex: 1;
    min-width: 300px;
}

.image-container img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    transition: transform 0.5s ease, filter 0.4s ease;
}

.thumb:hover {
    transform: scale(1.05) rotate(-1deg);
    filter: brightness(0.95) contrast(1.02);
}

.content {
    flex: 1;
    padding: 2rem;
    min-width: 300px;
}

.content h2 {
    color: #667eea;
    margin-bottom: 1rem;
    font-size: 1.8rem;
}

.content p {
    margin-bottom: 1rem;
}

.content strong {
    color: #764ba2;
}

footer {
    background: #333;
    color: white;
    text-align: center;
    padding: 1rem;
    margin-top: 2rem;
}

/* Responsive Design */
@media (max-width: 768px) {
    .grid {
        grid-template-columns: 1fr;
    }

    .destination {
        flex-direction: column;
    }

    header h1 {
        font-size: 2rem;
    }

    header p {
        font-size: 1rem;
    }

    .content {
        padding: 1rem;
    }
}

/* Lightbox styles */
.hidden { display: none; }
.lightbox {
    /* Hidden by default; add .open to show */
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.7);
    align-items: center;
    justify-content: center;
    padding: 2rem;
    z-index: 9999;
}
.lightbox.open {
    display: flex;
}
.lightbox-content {
    background: #111;
    border-radius: 10px;
    padding: 1rem;
    max-width: 900px;
    width: 100%;
    box-shadow: 0 10px 30px rgba(0,0,0,0.6);
    text-align: center;
    animation: pop 0.25s ease-out;
}
.lightbox-img {
    max-width: 100%;
    height: auto;
    border-radius: 6px;
}
.lightbox-caption {
    color: #ddd;
    margin-top: 0.75rem;
}
.close-btn {
    background: transparent;
    border: none;
    color: #fff;
    font-size: 2rem;
    position: absolute;
    right: 2.5rem;
    top: 1.5rem;
    cursor: pointer;
}

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

/* Detail modal styles */
.detail-btn {
    margin-top: 1rem;
    padding: 0.6rem 1rem;
    background: linear-gradient(90deg,#ff7e67,#ffb56b);
    color: white;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    font-weight: 600;
}

.detail-modal {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.6);
    align-items: center;
    justify-content: center;
    padding: 2rem;
    z-index: 10000;
}
.detail-modal.open { display: flex; }
.detail-content {
    background: #fff;
    color: #222;
    max-width: 900px;
    width: 100%;
    max-height: 80vh;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    min-height: 0; /* allow children to shrink and scroll on Firefox/Chrome */
    border-radius: 10px;
    padding: 1.25rem 1.5rem;
    position: relative;
}
.detail-body {
    overflow-y: auto;
    padding-right: 0.5rem;
    margin-top: 0.5rem;
    flex: 1 1 auto;
    min-height: 0; /* crucial for flex children to allow scrolling */
}
.detail-body p { margin: 0.35rem 0; line-height: 1.5; }
.detail-close {
    position: absolute;
    right: 1rem;
    top: 0.6rem;
    background: transparent;
    border: none;
    font-size: 1.6rem;
    cursor: pointer;
}

@media (max-width: 768px) {
    .detail-content { max-height: 85vh; padding: 1rem; }
}