/* Header */
.travel-header {
    text-align: center;
    margin-bottom: 1.5rem;
    padding-top: 0;
    animation: fadeInDown 0.8s ease;
}

.travel-header h1 {
    font-size: 4rem;
    margin-bottom: 0;
    color: var(--text-primary);
    font-weight: 700;
    letter-spacing: -1px;
}

.travel-header p {
    color: var(--text-secondary);
    font-size: 1.3rem;
    font-weight: 400;
    animation: fadeInDown 0.8s ease 0.2s backwards;
}

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

/* Travel Content */
.travel-content {
    max-width: 1200px;
    margin: 0 auto;
    animation: fadeInUp 0.8s ease 0.3s backwards;
}

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

/* Country Selector */
.country-selector {
    display: flex;
    justify-content: center;
    gap: 1rem;
    margin-bottom: 0;
    flex-wrap: wrap;
    transition: filter 0.3s ease, transform 0.3s ease;
}

.country-dropdown {
    appearance: none;
    background: var(--white);
    border: 2px solid var(--border-light);
    border-radius: 12px;
    padding: 0.85rem 3rem 0.85rem 1.5rem;
    font-size: 1.1rem;
    font-weight: 600;
    color: var(--text-primary);
    cursor: pointer;
    transition: all 0.3s ease;
    font-family: inherit;
    min-width: 250px;
    background-image: url("data:image/svg+xml,%3Csvg width='12' height='8' viewBox='0 0 12 8' fill='none' xmlns='http://www.w3.org/2000/svg'> d='M1 1L6 6L11 1' stroke='%232d5016' stroke-width='2' stroke-linecap='round'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 1rem center;
}

.country-dropdown:hover {
    border-color: var(--accent-primary);
    box-shadow: 0 4px 12px rgba(45, 80, 22, 0.1);
}

.country-dropdown:focus {
    outline: none;
    border-color: var(--accent-primary);
    box-shadow: 0 0 0 3px rgba(45, 80, 22, 0.1);
}

.random-btn {
    background: var(--accent-primary);
    color: var(--white);
    border: none;
    border-radius: 12px;
    padding: 0.85rem 1.75rem;
    font-size: 1.1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    font-family: inherit;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.random-btn:hover {
    background: var(--accent-secondary);
    transform: translateY(-2px);
    box-shadow: 0 4px 16px rgba(45, 80, 22, 0.2);
}

.random-btn:active {
    transform: translateY(0);
}

.random-btn svg {
    transition: transform 0.3s ease;
}

.random-btn:hover svg {
    transform: rotate(180deg);
}

/* Globe Container */
.globe-container {
    position: relative;
    margin-bottom: 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    transition: filter 0.3s ease, transform 0.3s ease;
}

#globeCanvas {
    width: 100%;
    max-width: 600px;
    height: auto;
    aspect-ratio: 1 / 1;
    background: transparent;
    border-radius: 16px;
    transition: none;
    display: block;
}

.info-icon {
    font-size: 3rem;
    margin-bottom: 0.5rem;
    animation: float 3s ease-in-out infinite;
}

@keyframes float {
    0%, 100% {
        transform: translateY(0);
    }
    50% {
        transform: translateY(-10px);
    }
}

/* Blur effect for background with subtle scale */
.blurred {
    filter: blur(8px);
    pointer-events: none;
    transition: filter 0.6s ease-in-out, transform 0.6s ease-in-out;
    transform: scale(0.98);
}

/* Photo Gallery Popup */
.photo-gallery {
    display: none;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.6s ease-in-out, visibility 0.6s ease-in-out;
}

.photo-gallery.visible {
    opacity: 1;
    visibility: visible;
}

.photo-gallery.popup-mode {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.97);
    z-index: 100;
    display: flex !important;
    align-items: center;
    justify-content: center;
    padding: 0;
    animation: magicalFadeIn 1.2s ease-in-out;
    cursor: pointer;
}

@keyframes magicalFadeIn {
    0% {
        opacity: 0;
        background: rgba(255, 255, 255, 0);
    }
    30% {
        opacity: 0.3;
        background: rgba(100, 100, 100, 0.3);
    }
    60% {
        opacity: 0.7;
        background: rgba(40, 40, 40, 0.7);
    }
    100% {
        opacity: 1;
        background: rgba(0, 0, 0, 0.97);
    }
}

@keyframes fadeIn {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

/* Gallery inner container */
.gallery-inner {
    position: relative;
    width: 100%;
    height: 100%;
    background: #0a0a0a;
    display: flex;
    flex-direction: column;
    padding: 0;
    animation: gentleFadeIn 1.4s ease-in-out;
    cursor: default;
}

@keyframes gentleFadeIn {
    0% {
        opacity: 0;
    }
    40% {
        opacity: 0;
    }
    100% {
        opacity: 1;
    }
}

/* Close button */
.gallery-close {
    position: fixed;
    top: 2rem;
    right: 2rem;
    width: 50px;
    height: 50px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.15);
    backdrop-filter: blur(10px);
    border: 2px solid rgba(255, 255, 255, 0.25);
    font-size: 2rem;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
    color: white;
    line-height: 1;
    z-index: 250;
    animation: fadeInRight 0.6s ease-out 0.8s backwards;
}

@keyframes fadeInRight {
    from {
        opacity: 0;
        transform: translateX(20px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

.gallery-close:hover {
    background: rgba(255, 255, 255, 0.25);
    border-color: rgba(255, 255, 255, 0.5);
    transform: scale(1.1);
}

/* Header */
.gallery-header {
    position: fixed;
    top: 2.5rem;
    left: 2rem;
    text-align: left;
    z-index: 200;
}

.gallery-country-name {
    font-size: 1.5rem;
    font-weight: 600;
    color: rgba(255, 255, 255, 0.95);
    margin: 0;
    text-shadow: 0 2px 10px rgba(0, 0, 0, 0.5);
    letter-spacing: 0.5px;
    animation: fadeInLeft 0.6s ease-out 0.8s backwards;
}

@keyframes fadeInLeft {
    from {
        opacity: 0;
        transform: translateX(-20px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

.gallery-visit-info {
    display: none;
}

/* Gallery Main */
.gallery-main {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 2rem;
    padding: 1.5rem;
    position: relative;
}

.gallery-image-container {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 0.75rem;
    max-width: 95%;
    max-height: 100%;
    cursor: default;
}

.gallery-image {
    width: 450px;
    height: calc(100vh - 240px);
    object-fit: cover;
    border-radius: 4px;
    box-shadow: 0 30px 80px rgba(0, 0, 0, 0.7);
    cursor: default;
}

.gallery-caption {
    font-size: 1.1rem;
    font-weight: 400;
    color: rgba(255, 255, 255, 0.85);
    text-align: center;
    margin: 0;
    letter-spacing: 0.3px;
}

.gallery-location {
    font-size: 0.85rem;
    font-weight: 400;
    color: rgba(255, 255, 255, 0.7);
    margin: 0 0 -0.3rem 0;
    letter-spacing: 0.5px;
    align-self: flex-end;
    text-align: right;
}

.gallery-counter {
    font-size: 0.95rem;
    color: rgba(255, 255, 255, 0.5);
    font-weight: 400;
    margin: 0;
}

/* Navigation buttons */
.gallery-nav {
    width: 55px;
    height: 55px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.12);
    backdrop-filter: blur(10px);
    border: 2px solid rgba(255, 255, 255, 0.2);
    color: white;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
    flex-shrink: 0;
    z-index: 200;
    animation: gentleFadeIn 1.6s ease-in-out;
}

.gallery-nav:hover {
    background: rgba(255, 255, 255, 0.22);
    border-color: rgba(255, 255, 255, 0.4);
    transform: scale(1.1);
}

.gallery-nav:disabled {
    opacity: 0.3;
    cursor: not-allowed;
    pointer-events: none;
}

/* Thumbnails */
.gallery-thumbnails {
    display: none;
}

.gallery-thumb {
    display: none;
}

/* Tablets (landscape and portrait) */
@media (min-width: 769px) and (max-width: 1024px) {
    .travel-header h1 {
        font-size: 3.5rem;
    }

    .gallery-image {
        width: 500px;
        height: 60vh;
    }
}

/* Mobile Responsive */
@media (max-width: 768px) {
    .travel-header h1 {
        font-size: 3rem;
    }

    .country-selector {
        flex-direction: column;
        align-items: stretch;
        padding: 0 1rem;
    }

    .country-dropdown,
    .random-btn {
        width: 100%;
        justify-content: center;
    }

    #globeCanvas {
        width: 95vw;
        max-width: 500px;
    }

    .gallery-close {
        top: 1rem;
        right: 1rem;
        width: 44px;
        height: 44px;
        font-size: 1.5rem;
    }

    .gallery-header {
        top: 1rem;
        left: 1rem;
    }

    .gallery-country-name {
        font-size: 1.3rem;
    }

    .gallery-main {
        padding: 1rem 0.5rem;
        gap: 1.5rem;
    }

    .gallery-image {
        width: 70vw;
        height: auto;
        max-height: 65vh;
    }

    .gallery-nav {
        width: 48px;
        height: 48px;
    }
}

@media (max-width: 576px) {
    .travel-header {
        margin-bottom: 1rem;
    }

    .travel-header h1 {
        font-size: 2.25rem;
        margin-bottom: 0.25rem;
    }

    .travel-header p {
        font-size: 1rem;
    }

    #globeCanvas {
        width: 95vw;
        max-width: 450px;
    }

    .gallery-close {
        top: 1rem;
        right: 1rem;
        width: 44px;
        height: 44px;
        font-size: 1.8rem;
    }

    .gallery-header {
        top: 1rem;
        left: 1rem;
    }

    .gallery-country-name {
        font-size: 1.2rem;
    }

    .gallery-main {
        padding: 0.5rem;
        gap: 0.5rem;
    }

    .gallery-image-container {
        gap: 0.5rem;
        max-width: 100%;
    }

    .gallery-image {
        width: 72vw;
        height: 55vh;
        object-fit: cover;
    }

    .gallery-caption {
        font-size: 1rem;
    }

    .gallery-location {
        font-size: 0.75rem;
        margin-bottom: -0.2rem;
    }

    .gallery-counter {
        font-size: 0.85rem;
    }

    .gallery-nav {
        width: 44px;
        height: 44px;
    }
}

@media (max-width: 400px) {
    .travel-header h1 {
        font-size: 2rem;
    }

    #globeCanvas {
        width: 95vw;
        max-width: 450px;
    }

    .gallery-image {
        width: 70vw;
        height: 55vh;
    }

    .gallery-main {
        gap: 0.4rem;
    }
}