/*
 * CHRISTEN IM STADTVIERTEL — v1
 * Filosofía green2blue: restricción, espacio, flat design, ritmo
 * ================================================================
 */


/* ═══════════════════════════════════════════
   RESET
   ═══════════════════════════════════════════ */

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


/* ═══════════════════════════════════════════
   DESIGN TOKENS
   Inspirados en green2blue, con identidad propia
   ═══════════════════════════════════════════ */

:root {
    /* Marca */
    --red: #dc2626;
    --red-dark: #b91c1c;

    /* Texto */
    --text: #333333;
    --text-light: #555555;
    --white: #ffffff;

    /* Superficies */
    --bg: #ffffff;
    --bg-alt: rgba(220, 38, 38, 0.03);       /* Rojo al 3% — fondo alterno tintado */
    --bg-dark: #333333;

    /* Derivados de marca */
    --border: rgba(220, 38, 38, 0.12);        /* Bordes tintados, nunca gris puro */
    --border-subtle: rgba(220, 38, 38, 0.06);
    --overlay-hero: rgba(0, 0, 0, 0.38);
    --shadow: 0 5px 15px rgba(0, 0, 0, 0.15); /* Una sola sombra para todo */

    /* Tipografía — Inter: humanista, diseñada para pantallas, filosofía green2blue */
    --font: "Inter", -apple-system, BlinkMacSystemFont, sans-serif;
    --body-size: 18px;
    --body-lh: 32px;                           /* Ratio 1.78 — generoso */

    --h1-size: 3.2rem;
    --h1-weight: 700;                          /* Inter 700 es más limpio que 800 */
    --h1-lh: 1.12;
    --h1-spacing: -0.03em;                     /* Inter se beneficia de tracking más ajustado */

    --h2-size: 1.8rem;
    --h2-weight: 400;                          /* Regular, NO bold — elegancia green2blue */
    --h2-lh: 1.40;
    --h2-spacing: -0.01em;

    --overline-size: 13px;
    --overline-weight: 500;                    /* Inter 500 es suficiente para overlines */
    --overline-spacing: 0.15em;

    /* Layout */
    --canvas: 1240px;
    --content: 780px;                          /* ~63% del canvas — para texto */
    --section-padding: 80px;
}


/* ═══════════════════════════════════════════
   BASE
   ═══════════════════════════════════════════ */

body {
    font-family: var(--font);
    font-size: var(--body-size);
    line-height: var(--body-lh);
    font-weight: 400;
    color: var(--text);
    background: var(--bg);
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    overflow-x: hidden;
}

a {
    color: var(--red);
    text-decoration: none;
    transition: color 0.3s ease;
}

a:hover {
    color: var(--red-dark);
    text-decoration: underline;
}

::selection {
    background: rgba(220, 38, 38, 0.12);
    color: var(--text);
}

/* Selección en bloques oscuros — rojo sólido con texto blanco */
.section--dark ::selection,
footer ::selection {
    background: rgba(220, 38, 38, 0.45);
    color: #ffffff;
}

/* Selección en el hero — rojo profundo legible sobre la foto */
.hero-content ::selection {
    background: rgba(220, 38, 38, 0.5);
    color: #ffffff;
}

img {
    display: block;
    max-width: 100%;
}


/* ═══════════════════════════════════════════
   HERO
   Header + foto + overlay + título + taglines
   ═══════════════════════════════════════════ */

.hero {
    position: relative;
    width: 100%;
    height: 560px;
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
}

.hero-bg {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 1;
    background-color: #000;
}

.hero-slide {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-size: cover;
    background-position: center 40%;
    opacity: 0;
    transition: opacity 2s ease-in-out;
    will-change: transform, opacity;
    /* Ken Burns corre siempre, independiente de la opacidad */
    animation: kenBurns 14s ease-out forwards;
}

.hero-slide.active {
    opacity: 1;                                    /* Solo controla la visibilidad */
}

@keyframes kenBurns {
    0% { transform: scale(1); }
    100% { transform: scale(1.08); }
}

.hero-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    /* Viñeta muy sutil — las sombras contenidas del texto hacen el trabajo pesado */
    background: radial-gradient(
        ellipse at 50% 48%,
        rgba(0, 0, 0, 0.16) 0%,
        rgba(0, 0, 0, 0.08) 55%,
        rgba(0, 0, 0, 0.02) 100%
    );
    z-index: 2;
}

.hero-content {
    position: relative;
    z-index: 3;
    text-align: center;
    color: var(--white);
    padding: 0 2rem;
}

.hero .logo {
    width: 54px;
    margin: 0 auto 1.5rem auto;
    opacity: 0;
    /* Sin animación automática — espera a que la foto cargue (.hero--ready) */
}

.hero .logo svg {
    width: 100%;
    height: auto;
    filter: drop-shadow(0 1px 3px rgba(0, 0, 0, 0.35)) drop-shadow(0 0 5px rgba(0, 0, 0, 0.18));
}

.hero-title {
    font-size: var(--h1-size);
    font-weight: var(--h1-weight);
    line-height: var(--h1-lh);
    letter-spacing: var(--h1-spacing);
    color: var(--white);
    margin-bottom: 1.2rem;
    opacity: 0;
    /* Sombra difusa y contenida: legible sin percibirse como sombra */
    text-shadow: 0 1px 4px rgba(0, 0, 0, 0.4), 0 0 8px rgba(0, 0, 0, 0.18);
}

.taglines {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    flex-wrap: wrap;
}

/* Animaciones se disparan solo cuando la foto del hero ya está visible */
.hero--ready .logo {
    animation: heroFadeIn 1s ease-out 0.3s forwards;
}

.hero--ready .hero-title {
    animation: heroSlideUp 1s ease-out 0.6s forwards;
}

/* Aparición progresiva: lema → viñeta → lema → viñeta → lema */
.hero--ready .taglines span:nth-child(1) { animation: heroFadeIn 0.6s ease-out 1.2s forwards; }
.hero--ready .taglines span:nth-child(2) { animation: heroFadeIn 0.4s ease-out 1.5s forwards; }
.hero--ready .taglines span:nth-child(3) { animation: heroFadeIn 0.6s ease-out 1.7s forwards; }
.hero--ready .taglines span:nth-child(4) { animation: heroFadeIn 0.4s ease-out 2.0s forwards; }
.hero--ready .taglines span:nth-child(5) { animation: heroFadeIn 0.6s ease-out 2.2s forwards; }

.taglines span {
    font-size: var(--overline-size);
    font-weight: 600;
    letter-spacing: var(--overline-spacing);
    text-transform: uppercase;
    color: rgba(255, 255, 255, 0.92);
    opacity: 0;
    /* Sombra difusa e imperceptible: legibilidad sin presencia visual */
    text-shadow: 0 0 3px rgba(0, 0, 0, 0.45), 0 0 5px rgba(0, 0, 0, 0.22), 0 0 8px rgba(0, 0, 0, 0.08);
}

.taglines .sep {
    display: inline-block;
    width: 7px;
    height: 7px;
    background: var(--red);
    border-radius: 50%;
    font-size: 0;              /* Oculta el em dash, el span se convierte en el punto */
    vertical-align: middle;
    letter-spacing: 0;
    text-shadow: none;
}


/* ═══════════════════════════════════════════
   SHAPE DIVIDER (ola entre hero y contenido)
   ═══════════════════════════════════════════ */

.shape-divider {
    position: relative;
    margin-top: -60px;
    z-index: 4;
    line-height: 0;
}

.shape-divider svg {
    display: block;
    width: 100%;
    height: 80px;
}


/* ═══════════════════════════════════════════
   LAYOUT DE SECCIONES
   Full-width con contenido centrado
   ═══════════════════════════════════════════ */

.section {
    width: 100%;
    padding: var(--section-padding) 2rem;
    /* Viñeta cálida casi imperceptible — centra la mirada sin que se note */
    background: radial-gradient(
        ellipse at 50% 50%,
        #ffffff 50%,
        #fdfcfb 100%
    );
}

.section-inner {
    max-width: var(--canvas);
    margin: 0 auto;
}

.section-inner--narrow {
    max-width: var(--content);
    margin: 0 auto;
}

/* Fondo alterno — gradiente sutil del tinte rojo, más intenso en los bordes */
.section--alt {
    background: radial-gradient(
        ellipse at 50% 50%,
        rgba(220, 38, 38, 0.015) 20%,
        rgba(220, 38, 38, 0.05) 100%
    );
}

/* Sección oscura — gris ligeramente más claro que el footer para crear contraste */
.section--dark {
    background: radial-gradient(
        ellipse at 50% 50%,
        #585858 20%,
        #4e4e4e 100%
    );
    color: var(--white);
}


/* Sección del mapa — sin padding lateral para mayor impacto */
.section--map {
    padding-top: 40px;
    padding-bottom: var(--section-padding);
}


/* ═══════════════════════════════════════════
   ACENTO ROJO (separador sutil entre secciones)
   ═══════════════════════════════════════════ */

.accent-line {
    width: 50px;
    height: 3px;
    background: var(--red);
    margin: 0 auto 2.5rem auto;
    border-radius: 2px;
}


/* ═══════════════════════════════════════════
   INTRO SECTION
   ═══════════════════════════════════════════ */

.intro-text {
    font-size: 19px;
    line-height: 1.8;
    color: var(--text);
    text-align: center;
    margin-bottom: 1.8rem;
    font-weight: 400;
}

.intro-text-secondary {
    font-size: 17px;
    line-height: 1.8;
    color: var(--text-light);
    text-align: center;
}

/* Pin inline dentro del texto — reemplaza la palabra "Pin" */
.inline-pin {
    display: inline-block;
    height: 1.3em;
    width: auto;
    vertical-align: text-bottom;
    transform: rotate(0deg);
    margin: 0 0.05em;
    filter: drop-shadow(0 1px 2px rgba(0, 0, 0, 0.15));
}


/* ═══════════════════════════════════════════
   CTA SECTION ("Schau dich um")
   ═══════════════════════════════════════════ */

.cta-heading {
    font-size: var(--h2-size);
    font-weight: var(--h2-weight);     /* 400 — elegante, no grita */
    line-height: var(--h2-lh);
    letter-spacing: var(--h2-spacing);
    color: var(--text);
    margin-bottom: 1.8rem;
    text-align: center;
}

.cta-list {
    list-style: none;
    padding: 0;
    margin-bottom: 2rem;
    max-width: 640px;
    margin-left: auto;
    margin-right: auto;
}

.cta-list li {
    position: relative;
    padding-left: 1.4rem;
    margin-bottom: 0.9rem;
    font-size: 17px;
    color: var(--text-light);
    line-height: 1.7;
}

.cta-list li::before {
    content: '';
    position: absolute;
    left: 0;
    top: 0.70em;
    width: 7px;
    height: 7px;
    background: var(--red);
    border-radius: 50%;
}

.cta-list li a {
    font-weight: 600;
}

.cta-closing {
    font-size: 19px;
    font-weight: 600;
    color: var(--text);
    text-align: center;
    margin-top: 0.5rem;
}


/* ═══════════════════════════════════════════
   MAP SECTION
   ═══════════════════════════════════════════ */

.map-container {
    border-radius: 8px;
    overflow: hidden;
    border: 1px solid var(--border-subtle);
    box-shadow: var(--shadow);
}

#map {
    height: 650px;
    width: 100%;
    background: #f8f9fa;
}

.map-loading {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    height: 650px;
    color: var(--text-light);
    font-size: 16px;
    font-weight: 500;
    gap: 1.5rem;
}

.loading-spinner {
    width: 40px;
    height: 40px;
    border: 3px solid var(--border);
    border-top-color: var(--red);
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
}

.loading-dots {
    display: flex;
    gap: 0.4rem;
    margin-top: 0.5rem;
}

.loading-dot {
    width: 6px;
    height: 6px;
    background: var(--red);
    border-radius: 50%;
    animation: pulse 1.4s ease-in-out infinite;
}

.loading-dot:nth-child(1) { animation-delay: -0.32s; }
.loading-dot:nth-child(2) { animation-delay: -0.16s; }
.loading-dot:nth-child(3) { animation-delay: 0s; }


/* ═══════════════════════════════════════════
   MAP POPUPS
   ═══════════════════════════════════════════ */

.leaflet-popup-content-wrapper {
    background: var(--bg);
    border-radius: 8px;
    box-shadow: var(--shadow);
    border: 1px solid var(--border-subtle);
    padding: 0;
}

.leaflet-popup-content {
    margin: 0;
    font-family: var(--font);
    min-width: 240px;
}

.leaflet-popup-tip {
    background: var(--bg);
    box-shadow: none;
}

.leaflet-popup-close-button {
    top: 8px !important;
    right: 8px !important;
    width: 28px !important;
    height: 28px !important;
    color: #999 !important;
    font-size: 18px !important;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    padding: 0 !important;
    transition: color 0.2s ease;
}

.leaflet-popup-close-button:hover {
    color: var(--text) !important;
}

.popup-container {
    padding: 1.5rem;
}

.popup-name {
    font-size: 18px;
    font-weight: 700;
    color: var(--text);
    margin-bottom: 0.2rem;
    margin-top: 0.3rem;
    line-height: 1.3;
}

.popup-country {
    font-size: 10px;
    color: #999;
    margin-bottom: 0.5rem;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.12em;
}

.popup-organization {
    font-size: 16px;
    font-weight: 600;
    color: var(--text-light);
    margin-bottom: 1.2rem;
    line-height: 1.3;
}

.popup-button {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    background: var(--red);
    padding: 0.6rem 1.4rem;
    border-radius: 100px;                     /* Pill shape, estilo green2blue */
    text-decoration: none;
    font-size: 14px;
    font-weight: 600;
    color: var(--white) !important;
    letter-spacing: 0.01em;
    transition: background 0.3s ease;
}

.popup-button:hover {
    background: var(--red-dark);
    text-decoration: none;
}

.popup-button svg {
    width: 14px;
    height: 14px;
}


/* ═══════════════════════════════════════════
   ANDERE TEAMS (sección oscura)
   ═══════════════════════════════════════════ */

.andere-teams-heading {
    font-size: var(--h2-size);
    font-weight: var(--h2-weight);            /* 400 — consistente */
    line-height: var(--h2-lh);
    letter-spacing: var(--h2-spacing);
    margin-bottom: 1.5rem;
    color: var(--white);
}

.andere-teams-links {
    display: flex;
    flex-wrap: wrap;
    gap: 0.8rem;
}

.andere-teams-links a {
    display: inline-block;
    padding: 0.6rem 1.4rem;
    background: transparent;
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 100px;                     /* Pill */
    color: rgba(255, 255, 255, 0.85);
    text-decoration: none;
    font-size: 15px;
    font-weight: 500;
    transition: all 0.3s ease;
}

.andere-teams-links a:hover {
    background: rgba(255, 255, 255, 0.1);
    border-color: rgba(255, 255, 255, 0.5);
    color: var(--white);
    text-decoration: none;
}


/* ═══════════════════════════════════════════
   FOOTER
   ═══════════════════════════════════════════ */

footer {
    background: radial-gradient(
        ellipse at 50% 30%,
        #383838 20%,
        #2e2e2e 100%
    );
    color: var(--white);
    position: relative;
    padding: var(--section-padding) 2rem;
}

/* Línea de acento roja en el top del footer */
footer::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 3px;
    background: var(--red);
}

.footer-inner {
    max-width: var(--canvas);
    margin: 0 auto;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 4rem;
}

.impressum h4,
.kooperationspartner h4 {
    font-size: var(--overline-size);
    font-weight: var(--overline-weight);
    letter-spacing: var(--overline-spacing);
    text-transform: uppercase;
    color: rgba(255, 255, 255, 0.5);
    margin-bottom: 1.2rem;
}

.impressum-legal {
    font-size: 13px;
    color: rgba(255, 255, 255, 0.4);
    margin-bottom: 0.3rem;
}

.impressum-name {
    font-size: 17px;
    font-weight: 700;
    color: var(--white);
    margin-bottom: 0.1rem;
}

.impressum-role {
    font-size: 15px;
    color: rgba(255, 255, 255, 0.6);
    margin-bottom: 0.8rem;
}

.impressum-address {
    font-style: normal;
    font-size: 15px;
    color: rgba(255, 255, 255, 0.6);
    line-height: 1.6;
    margin-bottom: 0.8rem;
}

.impressum-contact {
    font-size: 15px;
    color: rgba(255, 255, 255, 0.6);
    line-height: 1.8;
}

.impressum-contact a {
    color: var(--white);
    font-weight: 600;
    text-decoration: none;
}

.impressum-contact a:hover {
    text-decoration: underline;
}

.partner-links {
    display: flex;
    align-items: center;
    gap: 1.5rem;
    flex-wrap: wrap;
}

.partner-links a {
    display: inline-flex;
    align-items: center;
    padding: 0.8rem 1.2rem;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 8px;
    text-decoration: none;
    transition: all 0.3s ease;
}

.partner-links a:hover {
    background: rgba(255, 255, 255, 0.1);
    border-color: rgba(255, 255, 255, 0.25);
}

.partner-links img {
    height: 36px;
    width: auto;
    display: block;
    filter: brightness(0) invert(1);          /* Logos blancos sobre fondo oscuro */
    opacity: 0.6;
    transition: opacity 0.3s ease;
}

.partner-links a:hover img {
    opacity: 0.9;
}

/* Créditos — dentro de la columna derecha, debajo de los partners */
.footer-credits {
    margin-top: 2rem;
}

.footer-credits .footer-copyright,
.footer-credits .footer-design {
    font-size: 11px;
    color: rgba(255, 255, 255, 0.25);
    letter-spacing: 0.02em;
    margin-bottom: 0.2rem;
}

.footer-credits .footer-design a.footer-mail {
    display: inline-flex;
    align-items: center;
    vertical-align: middle;
    position: relative;
    top: -1px;
    margin-left: 0.35em;
    color: rgba(255, 255, 255, 0.3);
    text-decoration: none;
    transition: color 0.3s ease;
}

.footer-credits .footer-design a.footer-mail svg {
    width: 11px;
    height: auto;
}

.footer-credits .footer-design a.footer-mail:hover {
    color: rgba(255, 255, 255, 0.55);
    text-decoration: none;
}


/* ═══════════════════════════════════════════
   SCROLL REVEAL (Intersection Observer)
   ═══════════════════════════════════════════ */

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

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

/* Delays escalonados para elementos dentro de secciones */
.reveal-delay-1 { transition-delay: 0.1s; }
.reveal-delay-2 { transition-delay: 0.2s; }
.reveal-delay-3 { transition-delay: 0.3s; }


/* ═══════════════════════════════════════════
   ANIMATIONS
   ═══════════════════════════════════════════ */

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

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

@keyframes spin {
    to { transform: rotate(360deg); }
}

@keyframes pulse {
    0%, 80%, 100% {
        transform: scale(0.6);
        opacity: 0.4;
    }
    40% {
        transform: scale(1);
        opacity: 1;
    }
}


/* ═══════════════════════════════════════════
   UTILITIES
   ═══════════════════════════════════════════ */

.leaflet-control-attribution {
    display: none !important;
}


/* ═══════════════════════════════════════════
   RESPONSIVE — Tablet (≤1024px)
   ═══════════════════════════════════════════ */

@media (max-width: 1024px) {
    :root {
        --section-padding: 60px;
    }
}


/* ═══════════════════════════════════════════
   RESPONSIVE — Móvil (≤768px)
   ═══════════════════════════════════════════ */

@media (max-width: 768px) {
    :root {
        --body-size: 16px;
        --body-lh: 26px;
        --h1-size: 2.4rem;
        --h2-size: 1.5rem;
        --section-padding: 50px;
    }

    .hero {
        height: 420px;
    }

    .hero .logo {
        width: 44px;
        margin-bottom: 1rem;
    }

    .hero-title {
        margin-bottom: 1rem;
    }

    .taglines {
        flex-wrap: nowrap;
        gap: 0.2rem;
    }

    /* Cada lema quiebra sus dos palabras con interlineado compacto */
    .taglines span:not(.sep) {
        line-height: 1.3;
        text-align: center;
        letter-spacing: 0.10em;
    }

    .taglines .sep {
        width: 5px;
        height: 5px;
        align-self: center;
    }

    .taglines span {
        font-size: 11.5px;
    }

    .shape-divider {
        margin-top: -40px;
    }

    .shape-divider svg {
        height: 50px;
    }

    .intro-text {
        font-size: 17px;
    }

    .intro-text-secondary {
        font-size: 16px;
    }

    .cta-list li {
        font-size: 16px;
    }

    .cta-closing {
        font-size: 17px;
    }

    #map {
        height: 480px;
    }

    .map-loading {
        height: 480px;
    }

    .andere-teams-links {
        flex-direction: column;
    }

    .andere-teams-links a {
        text-align: center;
    }

    .footer-inner {
        grid-template-columns: 1fr;
        gap: 2.5rem;
    }
}


/* ═══════════════════════════════════════════
   RESPONSIVE — Móvil pequeño (≤480px)
   ═══════════════════════════════════════════ */

@media (max-width: 480px) {
    :root {
        --h1-size: 2rem;
        --h2-size: 1.3rem;
        --section-padding: 40px;
    }

    .hero {
        height: 360px;
    }

    .hero .logo {
        width: 38px;
    }

    .taglines span:not(.sep) {
        letter-spacing: 0.07em;
    }

    .taglines span {
        font-size: 10.5px;
    }

    .section {
        padding-left: 1.2rem;
        padding-right: 1.2rem;
    }

    .cta-list li {
        font-size: 15px;
    }

    #map {
        height: 400px;
    }

    .map-loading {
        height: 400px;
    }

    footer {
        padding-left: 1.2rem;
        padding-right: 1.2rem;
    }
}
