/**
 * Head & Code – Standort Teaser Block
 * Datei: /blocks/standort-teaser/style.css
 *
 * Farbpalette (aus Brand-Farben):
 *   Primary   #2E1A8F  (Deep Violet)
 *   Secondary #E6007E  (Magenta/Pink)
 *   Tertiary  #F3F4F6  (Light Gray – heller Hintergrund)
 *   Neutral   #111827  (Near Black – dunkler Hintergrund)
 */

/* ─────────────────────────────────────────────
   Custom Properties
───────────────────────────────────────────── */
.hc-standort-teaser {
    --hc-primary:         #2E1A8F;
    --hc-secondary:       #E6007E;
    --hc-tertiary:        #F3F4F6;
    --hc-neutral:         #111827;

    /* Hell-Variante */
    --hc-bg-hell:         #F3F4F6;
    --hc-text-hell:       #111827;
    --hc-subtext-hell:    #4B5563;
    --hc-link-hell:       #2E1A8F;
    --hc-btn-bg-hell:     transparent;
    --hc-btn-border-hell: #2E1A8F;
    --hc-btn-text-hell:   #2E1A8F;

    /* Dunkel-Variante */
    --hc-bg-dunkel:       #F1F3FF;;
    --hc-text-dunkel:     #111827;
    --hc-subtext-dunkel:  #D1D5DB;
    --hc-link-dunkel:     #2E1A8F;
    --hc-btn-bg-dunkel:   transparent;
    --hc-btn-border-dunkel: #2E1A8F;
    --hc-btn-text-dunkel: #2E1A8F;
}

/* ─────────────────────────────────────────────
   Wrapper
───────────────────────────────────────────── */
.hc-standort-teaser {
    display: flex;
    flex-direction: column;
    gap: 0;               /* kein Gap – jeder Standort füllt seinen eigenen Hintergrund */
}

/* ─────────────────────────────────────────────
   Einzelner Standort
───────────────────────────────────────────── */
.hc-standort-item {
    padding: 64px 5%;
    box-sizing: border-box;
}

/* Hintergrund: hell */
.hc-standort-item--bg-hell {
    background-color: var(--hc-bg-hell);
    color: var(--hc-text-hell);
}

/* Hintergrund: dunkel */
.hc-standort-item--bg-dunkel {
    background-color: var(--hc-bg-dunkel);
    color: var(--hc-text-hell);
}

/* ─────────────────────────────────────────────
   Hero-Bereich (Hauptbild + Info)
───────────────────────────────────────────── */
.hc-standort-item__hero {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 48px;
    align-items: center;
    max-width: 1200px;
    margin: 0 auto;
}

/* Bild links (Standard) → keine Änderung nötig */
.hc-standort-item--bild-links .hc-standort-item__hero {
    direction: ltr;
}

/* Bild rechts → Info links, Bild rechts */
.hc-standort-item--bild-rechts .hc-standort-item__hero {
    direction: rtl;       /* dreht Reihenfolge im Grid um */
}
.hc-standort-item--bild-rechts .hc-standort-item__info {
    direction: ltr;       /* Text wieder links ausrichten */
    text-align: left;
}

/* ─────────────────────────────────────────────
   Hauptbild
───────────────────────────────────────────── */
.hc-standort-item__hauptbild {
    overflow: hidden;
    border-radius: 4px;
    aspect-ratio: 4 / 3;
}

.hc-standort-item__hauptbild img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    transition: transform 0.5s ease;
}

.hc-standort-item__hauptbild:hover img {
    transform: scale(1.03);
}

/* ─────────────────────────────────────────────
   Info-Bereich
───────────────────────────────────────────── */
.hc-standort-item__info {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

/* Titel */
.hc-standort-item__title {
    font-size: clamp(1.5rem, 2.5vw, 2.25rem);
    font-weight: 800;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    line-height: 1.1;
    margin: 0;
    color: var(--hc-primary);
}

.hc-standort-item--bg-dunkel .hc-standort-item__title {
    color: var(--hc-primary);
}

/* Dekorativlinie unter Titel */
.hc-standort-item__title-line {
    width: 48px;
    height: 3px;
    background-color: var(--hc-secondary);
    border-radius: 2px;
    margin-top: -10px;
}

/* ─────────────────────────────────────────────
   Kontakt-Zeilen
───────────────────────────────────────────── */
.hc-standort-item__contact-row {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    line-height: 1.5;
}

.hc-standort-item__icon {
    flex-shrink: 0;
    width: 22px;
    height: 22px;
    margin-top: 1px;
    color: var(--hc-secondary);
}

.hc-standort-item__icon svg {
    width: 100%;
    height: 100%;
}

.hc-standort-item__address {
    font-style: normal;
    font-size: 1rem;
}

.hc-standort-item--bg-hell .hc-standort-item__address {
    color: var(--hc-primary);
}

.hc-standort-item--bg-dunkel .hc-standort-item__address {
    color: var(--hc-primary);
}

/* Links */
.hc-standort-item__link {
    font-size: 1rem;
    font-weight: 500;
    text-decoration: none;
    transition: color 0.2s ease;
}

.hc-standort-item--bg-hell .hc-standort-item__link {
    color: var(--hc-link-hell);
}

.hc-standort-item--bg-hell .hc-standort-item__link:hover {
    color: var(--hc-secondary);
}

.hc-standort-item--bg-dunkel .hc-standort-item__link {
    color: var(--hc-link-dunkel);
}

.hc-standort-item--bg-dunkel .hc-standort-item__link:hover {
    color: #fff;
}

/* ─────────────────────────────────────────────
   Button "Route planen"
───────────────────────────────────────────── */
.hc-standort-item__btn-route {
    display: inline-block;
    margin-top: 8px;
    padding: 12px 28px;
    font-size: 0.8125rem;
    font-weight: 700;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    text-decoration: none;
    border: 2px solid;
    border-radius: 2px;
    transition: background-color 0.25s ease, color 0.25s ease;
    align-self: flex-start;
}

.hc-standort-item--bg-hell .hc-standort-item__btn-route {
    border-color: var(--hc-btn-border-hell);
    color: var(--hc-btn-text-hell);
    background-color: var(--hc-btn-bg-hell);
}

.hc-standort-item--bg-hell .hc-standort-item__btn-route:hover {
    background-color: var(--hc-primary);
    border-color: var(--hc-primary);
    color: #fff;
}

.hc-standort-item--bg-dunkel .hc-standort-item__btn-route {
    border-color: var(--hc-btn-border-dunkel);
    color: var(--hc-btn-text-dunkel);
    background-color: var(--hc-btn-bg-dunkel);
}

.hc-standort-item--bg-dunkel .hc-standort-item__btn-route:hover {
    background-color: var(--hc-secondary);
    border-color: var(--hc-secondary);
    color: #fff;
}

/* ─────────────────────────────────────────────
   Galerie
───────────────────────────────────────────── */
.hc-standort-item__galerie {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 4px;
    max-width: 1200px;
    margin: 40px auto 0;
}

.hc-standort-item__galerie-item {
    margin: 0;
    overflow: hidden;
    aspect-ratio: 1 / 1;
}

/* Erstes Bild doppelt so groß (wie im Mockup: 2er-Grid links) */
.hc-standort-item__galerie-item:first-child {
    grid-row: span 2;
    aspect-ratio: auto;
}

/* Wenn Bild-Reihe für "rechts"-Layout gespiegelt werden soll,
   bleibt die Galerie ltr und unverändert. */

.hc-standort-item__galerie-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    filter: grayscale(100%);
    transition: filter 0.4s ease, transform 0.4s ease;
}

.hc-standort-item__galerie-item:hover img {
    filter: grayscale(0%);
    transform: scale(1.05);
}

/* ─────────────────────────────────────────────
   Responsive
───────────────────────────────────────────── */
@media ( max-width: 900px ) {
    .hc-standort-item__hero {
        grid-template-columns: 1fr;
        gap: 32px;
    }

    /* Für "Bild rechts"-Layout auf Mobil: direction zurücksetzen */
    .hc-standort-item--bild-rechts .hc-standort-item__hero {
        direction: ltr;
    }

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

    .hc-standort-item__galerie-item:first-child {
        grid-row: span 1;
        aspect-ratio: 1 / 1;
    }
}

@media ( max-width: 540px ) {
    .hc-standort-item {
        padding: 40px 4%;
    }

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