/* ========================================
   EXPLORE CITY CSS
   Styles for city landing pages
   Based on strona-miasta-gdansk.html
   Fonts: DM Serif Display + Inter (not Playfair)
   ======================================== */

/* This file assumes explore-base.css is loaded */

/* ===== ANIMATION KEYFRAMES ===== */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(40px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

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

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

@keyframes scaleIn {
    from {
        opacity: 0;
        transform: scale(0.9);
    }
    to {
        opacity: 1;
        transform: scale(1);
    }
}

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

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

@keyframes shimmer {
    0% {
        background-position: -200% 0;
    }
    100% {
        background-position: 200% 0;
    }
}

@keyframes pulse {
    0%, 100% {
        transform: scale(1);
    }
    50% {
        transform: scale(1.05);
    }
}

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

/* ===== HERO SECTION ===== */
.hero {
    position: relative;
    height: 100vh;
    min-height: 600px;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
}

.hero-background {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 120%;
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    will-change: transform;
    animation: fadeIn 1.5s ease-out;
}

.hero-background::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(180deg,
        rgba(0, 0, 0, 0.3) 0%,
        rgba(0, 0, 0, 0.5) 50%,
        rgba(0, 0, 0, 0.7) 100%);
}

/* BREADCRUMB - inside hero-content, left-aligned like tour page */
.breadcrumb {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.85rem;
    color: rgba(255, 255, 255, 0.7);
    margin-bottom: 1.5rem;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    animation: fadeInDown 0.8s ease-out 0.3s both;
}

.breadcrumb a {
    color: var(--color-gold);
    text-decoration: none;
    transition: var(--transition);
}

.breadcrumb a:hover {
    color: var(--color-gold-light);
}

.breadcrumb span {
    opacity: 0.5;
}

/* HERO CONTENT */
.hero-content {
    position: relative;
    z-index: 2;
    text-align: center;
    color: var(--color-text);
    padding: 0 20px;
}

.hero-title {
    font-family: var(--font-display);
    font-size: clamp(80px, 15vw, 180px);
    font-weight: 800;
    letter-spacing: 0.02em;
    line-height: 0.9;
    margin-bottom: 30px;
    color: var(--color-text);
    text-shadow: 0 4px 20px rgba(0, 0, 0, 0.5);
    animation: fadeInUp 1s ease-out 0.5s both;
}

.hero-subtitle {
    font-size: clamp(18px, 3vw, 24px);
    font-weight: 300;
    letter-spacing: 3px;
    text-transform: uppercase;
    opacity: 0.9;
    margin-bottom: 40px;
    animation: fadeInUp 1s ease-out 0.7s both;
}

/* SCROLL INDICATOR */
.scroll-indicator {
    position: absolute;
    bottom: 40px;
    left: 50%;
    transform: translateX(-50%);
    z-index: 2;
    color: var(--color-text);
    text-align: center;
    cursor: pointer;
    animation: bounce 2s infinite;
}

.scroll-indicator svg {
    width: 30px;
    height: 30px;
    opacity: 0.7;
}

@keyframes bounce {
    0%, 20%, 50%, 80%, 100% {
        transform: translateX(-50%) translateY(0);
    }
    40% {
        transform: translateX(-50%) translateY(-10px);
    }
    60% {
        transform: translateX(-50%) translateY(-5px);
    }
}

/* ===== REVEAL ANIMATIONS (scroll-triggered) ===== */
.reveal {
    opacity: 0;
    transform: translateY(30px);
    transition: opacity 0.8s ease-out, transform 0.8s ease-out;
}

.reveal.revealed {
    opacity: 1;
    transform: translateY(0);
}

.reveal-left {
    opacity: 0;
    transform: translateX(-30px);
    transition: opacity 0.8s ease-out, transform 0.8s ease-out;
}

.reveal-left.revealed {
    opacity: 1;
    transform: translateX(0);
}

.reveal-right {
    opacity: 0;
    transform: translateX(30px);
    transition: opacity 0.8s ease-out, transform 0.8s ease-out;
}

.reveal-right.revealed {
    opacity: 1;
    transform: translateX(0);
}

.reveal-scale {
    opacity: 0;
    transform: scale(0.95);
    transition: opacity 0.8s ease-out, transform 0.8s ease-out;
}

.reveal-scale.revealed {
    opacity: 1;
    transform: scale(1);
}

/* Staggered delays for child elements */
.stagger-1 { transition-delay: 0.1s; }
.stagger-2 { transition-delay: 0.2s; }
.stagger-3 { transition-delay: 0.3s; }
.stagger-4 { transition-delay: 0.4s; }
.stagger-5 { transition-delay: 0.5s; }

/* ===== CITY INTRO SECTION ===== */
.city-intro {
    padding: 100px 20px;
    background: var(--color-surface-light);
    text-align: center;
}

.section-subtitle {
    font-size: 14px;
    font-weight: 600;
    letter-spacing: 2px;
    text-transform: uppercase;
    color: var(--color-gold);
    margin-bottom: 20px;
    position: relative;
    display: inline-block;
}

.section-subtitle::after {
    content: '';
    position: absolute;
    bottom: -8px;
    left: 50%;
    transform: translateX(-50%);
    width: 0;
    height: 2px;
    background: var(--color-gold);
    transition: width 0.6s ease-out 0.3s;
}

.revealed .section-subtitle::after,
.section-subtitle.revealed::after {
    width: 40px;
}

.city-description {
    font-size: 20px;
    line-height: 1.8;
    color: var(--color-text-dark);
    max-width: 800px;
    margin: 0 auto 60px;
    font-weight: 300;
}

/* CITY STATS */
.city-stats {
    display: flex;
    justify-content: center;
    gap: 40px;
    flex-wrap: wrap;
    margin-top: 60px;
}

.stat-badge {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 20px 30px;
    background: var(--color-bg-light);
    border-radius: 50px;
    box-shadow: var(--shadow);
    transition: transform 0.3s ease, box-shadow 0.3s ease, background 0.3s ease;
    position: relative;
    overflow: hidden;
}

.stat-badge::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(
        90deg,
        transparent,
        rgba(212, 175, 55, 0.1),
        transparent
    );
    transition: left 0.5s ease;
}

.stat-badge:hover::before {
    left: 100%;
}

.stat-badge:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-lg);
}

.stat-icon {
    width: 24px;
    height: 24px;
    color: var(--color-gold);
}

.stat-text {
    font-weight: 600;
    font-size: 16px;
    color: var(--color-text-light-mode);
}

/* ===== TOURS SECTION ===== */
.tours-section {
    padding: 100px 20px;
    background: var(--color-bg-light);
}

.section-title {
    font-family: var(--font-display);
    font-size: clamp(36px, 6vw, 56px);
    font-weight: 700;
    text-align: center;
    margin-bottom: 20px;
    color: var(--color-text-light-mode);
}

.section-description {
    text-align: center;
    font-size: 18px;
    color: #666;
    margin-bottom: 60px;
    max-width: 600px;
    margin-left: auto;
    margin-right: auto;
}

.tours-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
    gap: 40px;
    margin-top: 60px;
}

/* TOUR CARD - BEM naming convention */
.tour-card {
    background: var(--color-bg-light);
    border-radius: 16px;
    overflow: hidden;
    box-shadow:
        0 2px 4px rgba(0, 0, 0, 0.04),
        0 8px 24px rgba(0, 0, 0, 0.06);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    cursor: pointer;
    text-decoration: none;
    display: block;
    position: relative;
}

.tour-card:hover {
    transform: translateY(-8px);
    box-shadow:
        0 8px 16px rgba(0, 0, 0, 0.08),
        0 24px 48px rgba(0, 0, 0, 0.12);
}

.tour-card__image {
    position: relative;
    width: 100%;
    aspect-ratio: 16/10;
    overflow: hidden;
    background: #f0f0f0;
}

.tour-card__image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s ease;
}

.tour-card:hover .tour-card__image img {
    transform: scale(1.05);
}

.tour-card__country-badge {
    position: absolute;
    top: 16px;
    right: 16px;
    background: rgba(40, 40, 40, 0.85);
    backdrop-filter: blur(8px);
    color: #fff;
    padding: 8px 14px;
    border-radius: 8px;
    font-size: 0.7rem;
    font-weight: 500;
    letter-spacing: 0.05em;
    text-transform: uppercase;
}

.tour-card__content {
    padding: 24px;
}

.tour-card__city {
    font-size: 0.75rem;
    color: #888;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    margin-bottom: 8px;
    font-weight: 500;
}

.tour-card__title {
    font-family: var(--font-display);
    font-size: 1.35rem;
    font-weight: 600;
    margin-bottom: 16px;
    color: var(--color-text-light-mode);
    line-height: 1.35;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.tour-card:hover .tour-card__title {
    color: var(--color-gold);
}

.tour-card__meta {
    display: flex;
    gap: 0;
    padding-top: 16px;
    border-top: 1px solid #eee;
}

.tour-card__meta .meta-item {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.tour-card__meta .meta-item__value {
    font-weight: 500;
    font-size: 0.95rem;
    color: var(--color-text-light-mode);
}

.tour-card__meta .meta-item__label {
    font-size: 0.7rem;
    color: #999;
    font-weight: 400;
}

/* Legacy support for old class names */
.tour-card-image,
.tour-image {
    position: relative;
    width: 100%;
    height: 280px;
    overflow: hidden;
}

.tour-card-image img,
.tour-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.6s cubic-bezier(0.4, 0, 0.2, 1);
}

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

.tour-card-badge,
.tour-badge {
    position: absolute;
    top: 20px;
    right: 20px;
    background: rgba(0, 0, 0, 0.7);
    backdrop-filter: blur(10px);
    color: var(--color-text);
    padding: 8px 16px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 600;
    letter-spacing: 1px;
    text-transform: uppercase;
    transition: transform 0.3s ease, background 0.3s ease;
}

.tour-card:hover .tour-card-badge,
.tour-card:hover .tour-badge {
    background: var(--color-gold);
    color: #1a1a1a;
}

.tour-content,
.tour-card-content {
    padding: 30px;
}

.tour-title,
.tour-card-title {
    font-family: var(--font-display);
    font-size: 24px;
    font-weight: 700;
    margin-bottom: 12px;
    color: var(--color-text-light-mode);
    transition: color 0.3s ease;
    line-height: 1.3;
}

.tour-card:hover .tour-title,
.tour-card:hover .tour-card-title {
    color: var(--color-gold);
}

.tour-description,
.tour-card-subtitle {
    font-size: 15px;
    line-height: 1.7;
    color: #666;
    margin-bottom: 20px;
}

.tour-meta,
.tour-card-meta {
    display: flex;
    gap: 20px;
    flex-wrap: wrap;
    padding-top: 20px;
    border-top: 1px solid #eee;
}

.meta-icon {
    width: 18px;
    height: 18px;
    color: var(--color-gold);
}

.meta-item svg {
    width: 16px;
    height: 16px;
    color: var(--color-gold);
    flex-shrink: 0;
}

/* ===== MAP SECTION ===== */
.map-section {
    padding: 100px 20px;
    background: var(--color-surface-light);
    position: relative;
    overflow: hidden;
}

.map-section::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 1px;
    background: linear-gradient(90deg, transparent, var(--color-gold), transparent);
    opacity: 0.3;
}

#map {
    width: 100%;
    height: 500px;
    border-radius: 20px;
    box-shadow: var(--shadow-lg);
    margin-top: 40px;
    transition: box-shadow 0.3s ease;
}

#map:hover {
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.15);
}

/* Custom Marker Styling */
.custom-marker {
    background: none;
    border: none;
}

.custom-marker svg {
    filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.3));
    transition: transform 0.2s ease;
}

.custom-marker:hover svg {
    transform: scale(1.1);
}

/* Custom Leaflet Popup */
.leaflet-popup-content-wrapper {
    border-radius: 12px;
    padding: 0;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.leaflet-popup-content {
    margin: 0;
    min-width: 220px;
}

.leaflet-popup-tip {
    background: white;
}

.popup-content {
    padding: 20px;
}

.popup-title {
    font-family: var(--font-display);
    font-size: 18px;
    font-weight: 700;
    margin-bottom: 12px;
    color: var(--color-text-light-mode);
    line-height: 1.3;
}

.popup-link {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-size: 14px;
    font-weight: 600;
    color: var(--color-gold);
    text-decoration: none;
    transition: var(--transition);
}

.popup-link:hover {
    color: var(--color-text-light-mode);
    gap: 8px;
}

/* ===== CTA SECTION ===== */
.cta-section {
    padding: 120px 20px;
    background: linear-gradient(135deg, var(--color-text-light-mode) 0%, #2d2d2d 100%);
    color: var(--color-text);
    text-align: center;
    position: relative;
    overflow: hidden;
}

.cta-section::before {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: radial-gradient(circle, rgba(212, 175, 55, 0.05) 0%, transparent 50%);
    animation: float 15s ease-in-out infinite;
    pointer-events: none;
}

.cta-title {
    font-family: var(--font-display);
    font-size: clamp(36px, 6vw, 56px);
    font-weight: 700;
    margin-bottom: 20px;
    position: relative;
}

.cta-description {
    font-size: 18px;
    opacity: 0.9;
    margin-bottom: 40px;
    max-width: 600px;
    margin-left: auto;
    margin-right: auto;
    position: relative;
}

.app-buttons {
    display: flex;
    justify-content: center;
    gap: 20px;
    flex-wrap: wrap;
    margin-top: 40px;
    position: relative;
}

.app-button {
    display: inline-flex;
    align-items: center;
    gap: 12px;
    padding: 16px 32px;
    background: var(--color-bg-light);
    color: var(--color-text-light-mode);
    text-decoration: none;
    border-radius: 12px;
    font-weight: 600;
    transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1),
                box-shadow 0.3s ease,
                background 0.3s ease,
                color 0.3s ease;
    box-shadow: var(--shadow);
    position: relative;
    overflow: hidden;
}

.app-button::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(
        90deg,
        transparent,
        rgba(255, 255, 255, 0.2),
        transparent
    );
    transition: left 0.5s ease;
}

.app-button:hover::before {
    left: 100%;
}

.app-button:hover {
    transform: translateY(-5px) scale(1.02);
    box-shadow: 0 15px 30px rgba(0, 0, 0, 0.3);
    background: var(--color-gold);
    color: #1a1a1a;
}

.app-icon {
    width: 24px;
    height: 24px;
    transition: transform 0.3s ease;
}

.app-button:hover .app-icon {
    transform: scale(1.1);
}

/* ===== RESPONSIVE ===== */
@media (max-width: 768px) {
    .hero {
        height: 70vh;
        min-height: 400px;
    }

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

    .hero-title {
        margin-bottom: 20px;
    }

    .city-intro,
    .tours-section,
    .cta-section {
        padding: 60px 20px;
    }

    .city-stats {
        gap: 16px;
    }

    .stat-badge {
        padding: 14px 20px;
    }

    .city-description {
        font-size: 17px;
    }

    .tours-grid {
        grid-template-columns: 1fr;
        gap: 24px;
    }

    .tour-card__content {
        padding: 18px 20px 20px;
    }

    .tour-card__title {
        font-size: 1.15rem;
        margin-bottom: 14px;
    }

    .tour-card__meta {
        padding-top: 14px;
    }

    .tour-card__meta .meta-item__value {
        font-size: 0.9rem;
    }

    .tour-card__meta .meta-item__label {
        font-size: 0.65rem;
    }

    /* Hide map section on mobile */
    .map-section {
        display: none;
    }

    /* FAB button for map */
    .map-fab {
        display: flex;
        position: fixed;
        bottom: 24px;
        right: 24px;
        width: 56px;
        height: 56px;
        background: var(--color-gold);
        border-radius: 50%;
        align-items: center;
        justify-content: center;
        box-shadow: 0 4px 12px rgba(0,0,0,0.2);
        cursor: pointer;
        z-index: 90;
        border: none;
        transition: transform 0.2s ease, box-shadow 0.2s ease;
    }

    .map-fab:hover {
        transform: scale(1.05);
        box-shadow: 0 6px 16px rgba(0,0,0,0.25);
    }

    .map-fab svg {
        width: 24px;
        height: 24px;
        color: var(--color-bg);
    }

    /* Map modal fullscreen */
    .map-modal {
        display: none;
        position: fixed;
        inset: 0;
        background: white;
        z-index: 1100;
        flex-direction: column;
    }

    .map-modal.active {
        display: flex;
    }

    .map-modal__header {
        display: flex;
        align-items: center;
        justify-content: space-between;
        padding: 16px 20px;
        border-bottom: 1px solid #e8e8e8;
        background: white;
    }

    .map-modal__title {
        font-family: var(--font-display);
        font-size: 1.25rem;
        font-weight: 500;
    }

    .map-modal__close {
        width: 40px;
        height: 40px;
        background: none;
        border: none;
        cursor: pointer;
        display: flex;
        align-items: center;
        justify-content: center;
        border-radius: 50%;
        transition: background 0.2s ease;
    }

    .map-modal__close:hover {
        background: #f5f5f5;
    }

    .map-modal__content {
        flex: 1;
    }

    .map-modal__content #map {
        width: 100%;
        height: 100%;
        border-radius: 0;
    }

    .app-buttons {
        flex-direction: column;
        align-items: center;
    }

    .app-button {
        width: 100%;
        max-width: 300px;
        justify-content: center;
    }
}

@media (max-width: 480px) {
    .hero {
        height: 60vh;
        min-height: 350px;
    }

    .breadcrumb {
        font-size: 0.65rem;
    }

    .hero-title {
        font-size: clamp(48px, 12vw, 80px);
    }

    .city-intro {
        padding: 48px 20px;
    }

    .city-stats {
        gap: 12px;
    }

    .stat-badge {
        padding: 12px 16px;
        font-size: 14px;
    }

    .city-description {
        font-size: 16px;
        margin-bottom: 40px;
    }
}

@media (min-width: 769px) {
    .map-fab,
    .map-modal {
        display: none !important;
    }
}
