/* ============================================================
   Custom Properties
   ============================================================ */
:root {
    --color-primary:      #A80000;
    --color-primary-dark: #850000;
    --color-text:         #333333;
    --color-bg:           #ffffff;
    --color-bg-light:     #f5f5f5;
    --font-base:          'Montserrat', sans-serif;
    --nav-height:         115px;
    --section-py:         80px;
    --transition:         0.25s ease;
    --container-max:      1200px;
}

/* ============================================================
   Reset / Base
   ============================================================ */
*, *::before, *::after { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
    font-family: var(--font-base);
    color: var(--color-text);
    background-color: var(--color-bg);
    line-height: 1.65;
    -webkit-font-smoothing: antialiased;
}

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

address { font-style: normal; }

a { color: inherit; }

/* Bootstrap container override */
.container { max-width: var(--container-max); }

/* ============================================================
   Navigation
   ============================================================ */
.site-header {
    height: var(--nav-height);
    z-index: 1000;
    border-bottom: 1px solid #eee;
}

.navbar { height: 100%; padding: 0; }

.navbar-brand { padding: 0; }

.navbar-brand .site-title {
    font-size: 0.95rem;
    font-weight: 700;
    color: var(--color-text);
    line-height: 1.2;
}

.navbar-logo {
    height: 86px;
    width: auto;
    display: block;
}

@media (max-width: 767.98px) {
    .navbar-logo {
        height: 60px;
    }
}

@media (max-width: 575.98px) {
    .navbar-logo {
        height: 60px;
    }
}

.navbar-nav .nav-link {
    font-size: 0.9rem;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: var(--color-text) !important;
    padding: 0.5rem 1rem !important;
    transition: color var(--transition);
    position: relative;
}

.navbar-nav .nav-link:hover,
.navbar-nav .nav-item.active > .nav-link,
.navbar-nav .nav-link.active {
    color: var(--color-primary) !important;
}

/* Dropdown */
.dropdown-menu {
    border: none;
    border-top: 3px solid var(--color-primary);
    border-radius: 0;
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.10);
    padding: 0.5rem 0;
    min-width: 200px;
}

.dropdown-item {
    font-size: 0.82rem;
    font-weight: 600;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    padding: 0.65rem 1.25rem;
    color: var(--color-text);
    transition: background var(--transition), color var(--transition);
}

.dropdown-item:hover,
.dropdown-item:focus {
    background-color: var(--color-primary);
    color: #fff;
}

.navbar-toggler { border: none !important; padding: 0.4rem; }
.navbar-toggler:focus { box-shadow: none; }

/* Mobile nav */
@media (max-width: 991.98px) {
    #primaryNav {
        background: #fff;
        border-top: 1px solid #eee;
        padding: 1rem 0;
    }
    .navbar-nav .nav-link { padding: 0.55rem 0.75rem !important; }
    .dropdown-menu { border-top: none; box-shadow: none; padding-left: 1rem; }
}

/* ============================================================
   Hero
   ============================================================ */
.hero-section {
    position: relative;
    width: 100%;
    min-height: 500px;
    height: calc(100vh - var(--nav-height));
    max-height: 720px;
    background-color: #666;
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    display: flex;
    align-items: center;
}

.hero-overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(
        90deg,
        rgba(0, 0, 0, 0.62) 0%,
        rgba(0, 0, 0, 0.30) 55%,
        rgba(0, 0, 0, 0.05) 100%
    );
}

.hero-text {
    position: relative;
    z-index: 1;
    border-left: 4px solid var(--color-primary);
    padding-left: 1.5rem;
    max-width: 540px;
}

.hero-headline {
    font-size: clamp(1.75rem, 4vw, 2.75rem);
    font-weight: 700;
    color: #fff;
    line-height: 1.15;
    margin-bottom: 0.5rem;
    text-shadow: 0 2px 8px rgba(0, 0, 0, 0.35);
}

.hero-subline {
    font-size: clamp(0.95rem, 2vw, 1.2rem);
    font-weight: 500;
    color: rgba(255, 255, 255, 0.92);
    margin-bottom: 0;
    text-shadow: 0 1px 4px rgba(0, 0, 0, 0.3);
}

/* ============================================================
   Section Utility
   ============================================================ */
.py-lg-6 { padding-top: var(--section-py) !important; padding-bottom: var(--section-py) !important; }

.section-title {
    font-size: clamp(1.3rem, 3vw, 1.85rem);
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    color: var(--color-text);
    position: relative;
    padding-bottom: 1rem;
    margin-bottom: 0;
}

.section-title::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 48px;
    height: 3px;
    background-color: var(--color-primary);
    border-radius: 2px;
}

/* Left-aligned variant */
.section-title.text-start::after { left: 0; transform: none; }

/* ============================================================
   Leistungen Cards
   ============================================================ */
.leistungen-section { background-color: var(--color-bg); }

.leistung-card {
    color: var(--color-text);
    overflow: hidden;
    border: 1px solid #e8e8e8;
    background: var(--color-bg);
    transition: transform var(--transition), box-shadow var(--transition);
}

.leistung-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 28px rgba(0, 0, 0, 0.12);
}

.leistung-card__image {
    overflow: hidden;
    aspect-ratio: 3 / 2;
}

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

.leistung-card:hover .leistung-card__image img { transform: scale(1.06); }

.leistung-card__title {
    font-size: 0.9rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    margin: 0;
    color: var(--color-text);
}

/* ============================================================
   Kontakt
   ============================================================ */
.kontakt-section { background-color: var(--color-bg-light); }

.kontakt-icon { color: var(--color-primary); }

/* Form */
.kontakt-section .form-control {
    border-radius: 0;
    border-color: #d5d5d5;
    font-family: var(--font-base);
    font-size: 0.9rem;
    padding: 0.75rem 1rem;
    background-color: #fff;
    color: var(--color-text);
}

.kontakt-section .form-control:focus {
    border-color: var(--color-primary);
    box-shadow: 0 0 0 0.2rem rgba(168, 0, 0, 0.15);
}

.kontakt-section .form-label {
    font-size: 0.78rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.07em;
    margin-bottom: 0.4rem;
    color: var(--color-text);
}

/* ============================================================
   Buttons
   ============================================================ */
.btn-primary {
    background-color: var(--color-primary);
    border-color:     var(--color-primary);
    border-radius: 0;
    font-family:  var(--font-base);
    font-weight:  700;
    font-size:    0.8rem;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    padding: 0.8rem 2.5rem;
    transition: background var(--transition), border-color var(--transition), transform var(--transition);
}

.btn-primary:hover,
.btn-primary:focus {
    background-color: var(--color-primary-dark);
    border-color:     var(--color-primary-dark);
}

.btn-primary:focus-visible {
    box-shadow: 0 0 0 0.25rem rgba(168, 0, 0, 0.35);
}

/* ============================================================
   Google Maps
   ============================================================ */
.maps-section { line-height: 0; }

/* ============================================================
   Team
   ============================================================ */
.team-section { background-color: var(--color-bg); }

.team-photo-fullwidth {
    width: 100%;
    overflow: hidden;
    max-height: 520px;
}

.team-photo-fullwidth img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: top center;
}

.team-caption {
    font-size: 0.95rem;
    color: #666;
    line-height: 1.5;
}

/* ============================================================
   Leistung Single Page
   ============================================================ */
.leistung-single__header {
    padding: 48px 20px 40px;
    text-align: center;
}

.leistung-single__intro {
    color: #666;
    font-size: 0.95rem;
    max-width: 640px;
    margin: 0 auto;
    line-height: 1.65;
}

.leistung-single__content {
    padding: 48px 20px 80px;
}

/* Gutenberg Columns innerhalb der Leistungsseite */
.leistung-single__content .wp-block-columns {
    margin-bottom: 64px;
    align-items: stretch;
    gap: 0 !important;
}

.leistung-single__content .wp-block-column {
    padding: 0;
}

.leistung-single__content .wp-block-column:has(.immig-slider) {
    padding: 0;
}

.leistung-single__content .wp-block-column:not(:has(.immig-slider)) {
    padding: 40px 48px;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

/* Slider */
.immig-slider {
    width: 100%;
    height: 100%;
    min-height: 360px;
}

.immig-slider .swiper-slide {
    height: 100%;
}

.immig-slide__img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.immig-slider .swiper-pagination {
    bottom: 14px;
}

.immig-slider .swiper-pagination-bullet {
    background: #fff;
    opacity: 0.65;
    width: 10px;
    height: 10px;
}

.immig-slider .swiper-pagination-bullet-active {
    opacity: 1;
}

@media (max-width: 767.98px) {
    .immig-slider {
        min-height: 260px;
    }

    .leistung-single__content .wp-block-column:not(:has(.immig-slider)) {
        padding: 28px 20px;
    }
}

/* ============================================================
   Page Hero / Leistung Hero
   ============================================================ */
.page-hero,
.leistung-hero {
    width: 100%;
    max-height: 480px;
    overflow: hidden;
    line-height: 0;
}

.page-hero img,
.leistung-hero img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center 40%;
}

/* ============================================================
   Leistung Content (Gutenberg-Blöcke)
   ============================================================ */
.leistung-content {
    max-width: 900px;
    margin-inline: auto;
}

.leistung-content .wp-block-media-text {
    margin-bottom: 4rem;
    align-items: center;
}

.leistung-content .wp-block-media-text img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.leistung-content h2,
.leistung-content h3 {
    font-size: clamp(1.1rem, 2.5vw, 1.5rem);
    font-weight: 700;
    color: var(--color-text);
    margin-bottom: 1rem;
}

/* ============================================================
   Page Content
   ============================================================ */
.entry-title {
    font-size: clamp(1.4rem, 3vw, 2rem);
    font-weight: 700;
    color: var(--color-text);
    margin-bottom: 0.5rem;
    padding-bottom: 0.75rem;
    border-bottom: 3px solid var(--color-primary);
    display: inline-block;
}

.entry-content {
    max-width: 800px;
    font-size: 1rem;
    line-height: 1.75;
}

/* ============================================================
   Footer
   ============================================================ */
.site-footer {
    background-color: #000;
    color: #fff;
}

.footer-inner {
    padding-top: 1.25rem;
    padding-bottom: 1.25rem;
    gap: 1rem 0;
}

.footer-address {
    font-size: 0.82rem;
    line-height: 1.7;
    color: rgba(255, 255, 255, 0.9);
}

.footer-social { align-items: center; }

.footer-social__link {
    color: #fff;
    display: inline-flex;
    align-items: center;
    transition: opacity var(--transition);
}

.footer-social__link:hover { opacity: 0.7; }

.footer-legal { align-items: center; }

.footer-legal__link {
    font-size: 0.82rem;
    font-weight: 600;
    color: rgba(255, 255, 255, 0.9);
    text-decoration: none;
    transition: color var(--transition);
}

.footer-legal__link:hover { color: #fff; }

@media (max-width: 767.98px) {
    .footer-inner { text-align: center; }
    .footer-social { justify-content: center; }
    .footer-legal { justify-content: center; }
}

/* ============================================================
   Skip Link
   ============================================================ */
.skip-link {
    position: absolute;
    top: -100%;
    left: 0;
    background: var(--color-primary);
    color: #fff;
    padding: 0.5rem 1rem;
    z-index: 9999;
    font-size: 0.85rem;
    font-weight: 600;
    text-decoration: none;
}

.skip-link:focus { top: 0; }

/* ============================================================
   Responsive
   ============================================================ */
@media (max-width: 767.98px) {
    .hero-section {
        min-height: 360px;
        max-height: 500px;
        height: 65vw;
    }

    .hero-text { max-width: 100%; }

    .team-photo-fullwidth { max-height: 300px; }

    .page-hero,
    .leistung-hero { max-height: 280px; }
}

@media (max-width: 575.98px) {
    .hero-section {
        min-height: 300px;
        height: 75vw;
    }
}
