/* =======================================================
   Rechtsanwälte Walbach & Mayer – Exakte Rekonstruktion
   Vorlage: Original Astroid / Joomla Design (tp_classic)
   ======================================================= */

/* --- Farb- & Typografie-Definitionen --- */
:root {
    --bs-body-bg: #eeeeee;
    --bs-body-color: #222222;
    --bs-link-color: #222222;
    --bs-link-hover-color: #d33d33;
    --color-primary: #b70000;
    --color-heading: #222222;
    --color-gray-dark: rgb(73, 80, 87);
    --font-body: 'Open Sans', system-ui, -apple-system, sans-serif;
    --font-heading: 'Ropa Sans', Arial, Helvetica, sans-serif;
}

/* --- Globales Styling --- */
body {
    background-color: var(--bs-body-bg);
    color: var(--bs-body-color);
    font-family: var(--font-body);
    font-size: 0.95rem;
    line-height: 1.7;
    margin: 0;
    padding: 0;
}

h1, h2, h3, h4, h5, h6,
.h1, .h2, .h3, .h4, .h5, .h6 {
    font-family: var(--font-heading);
    color: var(--color-heading);
    font-weight: 400;
    line-height: 1.3;
}

h1, .h1 {
    font-size: 2.3rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 1.25rem;
}

h2, .h2 {
    font-size: 1.8rem;
    margin-bottom: 1rem;
}

h3, .h3 {
    font-size: 1.4rem;
    margin-bottom: 0.75rem;
}

h4, .h4 {
    font-size: 1.15rem;
    font-weight: 600;
    margin-top: 1.5rem;
    margin-bottom: 0.5rem;
}

p {
    margin-bottom: 1rem;
    color: #333333;
}

a {
    color: var(--bs-link-color);
    text-decoration: none;
    transition: color 0.2s ease;
}

a:hover {
    color: var(--bs-link-hover-color);
    text-decoration: underline;
}

/* =======================================================
   HERO BEREICH (Slider mit bg1-image.jpg & bg-image.jpg)
   ======================================================= */
.hero-wrapper {
    background-color: #3a3d40;
    position: relative;
    overflow: visible; /* Wichtig: visible, damit das Dropdown-Menü nicht abgeschnitten wird */
    z-index: 100;      /* Liegt über dem nachfolgenden Inhaltsbereich */
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
}

/* Doppelten Dropdown-Pfeil von Bootstrap entfernen (da bereits ein FontAwesome-Icon vorhanden ist) */
.dropdown-toggle::after {
    display: none !important;
}

/* Einzelne Slider-Hintergründe */
.hero-slide {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-repeat: no-repeat;
    background-position: center top;
    background-size: cover;
    opacity: 0;
    transition: opacity 1.2s ease-in-out;
    z-index: 1;
}

.hero-slide.active {
    opacity: 1;
    z-index: 2;
}

/* Inhalt über dem Slider (Topbar, Spacer, Logo & Menü) */
.hero-content-overlay {
    position: relative;
    z-index: 10;
    padding-top: 12px;
    padding-bottom: 25px;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
}

@media (min-width: 992px) {
    .hero-content-overlay {
        min-height: 440px;
    }
    .hero-spacer {
        flex-grow: 1;
        min-height: 200px;
    }
}

@media (max-width: 991.98px) {
    .hero-content-overlay {
        min-height: 280px;
        padding-bottom: 15px;
    }
    .hero-spacer {
        height: 80px;
    }
}

/* Pfeil-Buttons für Hero-Slider */
.hero-arrow {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    z-index: 15;
    background: rgba(0, 0, 0, 0.25);
    color: #ffffff;
    border: none;
    width: 38px;
    height: 38px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: background-color 0.2s ease, transform 0.2s ease;
    font-size: 0.85rem;
}

.hero-arrow:hover {
    background: rgba(0, 0, 0, 0.6);
    transform: translateY(-50%) scale(1.08);
}

.hero-arrow-prev {
    left: 20px;
}

.hero-arrow-next {
    right: 20px;
}

/* Punkte-Navigation für Hero-Slider */
.hero-slider-dots {
    position: absolute;
    bottom: 8px;
    left: 50%;
    transform: translateX(-50%);
    z-index: 15;
    display: flex;
    gap: 8px;
}

.hero-dot {
    width: 9px;
    height: 9px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.4);
    border: none;
    padding: 0;
    cursor: pointer;
    transition: background-color 0.3s ease, transform 0.3s ease;
}

.hero-dot.active {
    background: #ffffff;
    transform: scale(1.25);
}

/* Top Kontaktzeile im Hero */
.hero-topbar {
    font-size: 0.875rem;
    color: #ffffff;
    z-index: 2;
}

.hero-topbar span,
.hero-topbar a {
    color: #ffffff;
    text-decoration: none;
}

.hero-topbar a:hover {
    color: #dee2e6;
    text-decoration: none;
}

.hero-topbar i {
    color: #ffffff;
    margin-right: 6px;
}

/* Navigations- & Logobalken unten im Hero */
.hero-nav-bar {
    z-index: 2;
}

.hero-logo {
    max-height: 65px;
    width: auto;
    filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.4));
}

@media (max-width: 991.98px) {
    .hero-logo {
        max-height: 45px;
    }
}

/* Hero Menülinks (Weiß, Ropa Sans, Uppercase) */
.hero-nav .nav-link {
    font-family: var(--font-heading);
    font-size: 1rem;
    font-weight: 400;
    color: #ffffff !important;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    padding: 0.5rem 1rem;
    transition: color 0.2s ease;
    text-shadow: 0 1px 3px rgba(0, 0, 0, 0.5);
}

.hero-nav .nav-link:hover {
    color: #dee2e6 !important;
}

.hero-nav .nav-link.active {
    color: #ffffff !important;
    font-weight: 600;
}

/* Home-Icon überall in Rot (statt Blau) */
.fa-home,
.hero-nav .nav-link .fa-home,
.sticky-nav .nav-link .fa-home,
.offcanvas .nav-link .fa-home {
    color: var(--color-primary) !important;
}

/* Dropdown Menü Styling */
.dropdown-menu {
    background-color: #ffffff;
    border: none;
    border-radius: 4px;
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.2);
    min-width: 240px;
    padding: 0.5rem 0;
    margin: 0 !important; /* Kein Abstand, damit der Cursor nicht abrutscht */
    z-index: 1050 !important; /* Immer ganz oben über allen Inhalten */
}

.dropdown-item {
    font-family: var(--font-heading);
    font-size: 0.95rem;
    color: #333333;
    padding: 0.6rem 1.25rem;
    transition: background-color 0.15s ease, color 0.15s ease;
}

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

.dropdown-item.active,
.dropdown-item:active {
    background-color: #f0f0f0;
    color: var(--color-primary);
    font-weight: 600;
}

/* Desktop: Dropdown bei Hover stabil geöffnet halten */
@media (min-width: 992px) {
    .nav-item.dropdown {
        position: relative;
    }

    .nav-item.dropdown .dropdown-menu {
        margin-top: 0 !important;
        top: 100%;
    }

    /* Unsichtbare Brücke, damit der Cursor nie einen toten Bereich berührt */
    .nav-item.dropdown .dropdown-menu::before {
        content: "";
        position: absolute;
        top: -15px;
        left: 0;
        right: 0;
        height: 15px;
        background: transparent;
    }

    .nav-item.dropdown:hover > .dropdown-menu,
    .nav-item.dropdown .dropdown-menu:hover {
        display: block !important;
    }
}

/* =======================================================
   STICKY HEADER (beim Herunterscrollen)
   ======================================================= */
.sticky-header {
    position: fixed;
    top: -85px;
    left: 0;
    right: 0;
    z-index: 1050;
    background-color: #ffffff;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    transition: top 0.3s ease-in-out;
    padding: 8px 0;
}

.sticky-header.is-sticky {
    top: 0;
}

.sticky-logo {
    max-height: 48px;
    width: auto;
}

.sticky-nav .nav-link {
    font-family: var(--font-heading);
    font-size: 0.95rem;
    color: #495057 !important;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    padding: 0.4rem 0.85rem;
}

.sticky-nav .nav-link:hover {
    color: var(--bs-link-hover-color) !important;
}

.sticky-nav .nav-link.active {
    color: #111111 !important;
    font-weight: 600;
}

/* =======================================================
   CONTENT KARTEN (Weißer Kasten auf hellem Hintergrund)
   ======================================================= */
.content-card {
    background-color: #ffffff;
    padding: 35px 40px;
    border-radius: 4px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.06);
    margin-bottom: 25px;
}

@media (max-width: 767.98px) {
    .content-card {
        padding: 20px 20px;
    }
}

/* Modultitel mit feinem 1px rotem Unterstrich wie im Original */
.module-title {
    font-family: var(--font-heading);
    font-size: 1.35rem;
    color: var(--color-heading);
    border-bottom: 1px solid var(--color-primary);
    padding-bottom: 6px;
    margin-bottom: 18px;
}

/* =======================================================
   SIDEBAR (Rechtsgebiete)
   ======================================================= */
.sidebar-card {
    background-color: #ffffff;
    padding: 25px 20px;
    border-radius: 4px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.06);
    margin-bottom: 25px;
}

.sidebar-card img {
    border-radius: 4px;
    max-width: 100%;
    height: auto;
}

/* =======================================================
   STARTSEITEN-SLIDER / ANWALT-CARD
   ======================================================= */
.anwalt-preview-card {
    border: 1px solid #e9ecef;
    border-radius: 4px;
    overflow: hidden;
    background: #ffffff;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.anwalt-preview-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 15px rgba(0, 0, 0, 0.08);
}

.anwalt-preview-card img {
    width: 100%;
    height: auto;
    display: block;
}

.btn-primary {
    background-color: var(--color-primary);
    border-color: var(--color-primary);
    font-family: var(--font-heading);
    font-size: 0.95rem;
    letter-spacing: 0.5px;
    padding: 0.35rem 0.85rem;
}

.btn-primary:hover,
.btn-primary:active,
.btn-primary:focus {
    background-color: #920000 !important;
    border-color: #920000 !important;
}

/* =======================================================
   ADRESSE & FOOTER
   ======================================================= */
.address-card p {
    margin-bottom: 0.4rem;
}

.address-card a {
    color: #333333;
}

.address-card a:hover {
    color: var(--bs-link-hover-color);
}

.address-card i {
    width: 18px;
    text-align: center;
    color: #495057;
    margin-right: 8px;
}

.footer-card {
    padding: 15px 30px;
    margin-bottom: 30px;
}

.footer-nav .nav-link {
    color: #6c757d;
    font-size: 0.88rem;
    padding: 0.25rem 0.75rem;
}

.footer-nav .nav-link:hover {
    color: #212529;
}

/* =======================================================
   BACK TO TOP (Charcoal Gray, abgerundet)
   ======================================================= */
#backtotop {
    position: fixed;
    bottom: 25px;
    right: 25px;
    z-index: 1050;
    width: 42px;
    height: 42px;
    background-color: var(--color-gray-dark);
    color: #ffffff;
    border: none;
    border-radius: 4px;
    display: none;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
    transition: background-color 0.2s ease, opacity 0.2s ease;
}

#backtotop:hover {
    background-color: #343a40;
}

/* =======================================================
   PROFIL-SEITEN (Mirko Walbach / Sabine Mayer)
   ======================================================= */
.profile-img {
    float: left;
    margin-right: 25px;
    margin-bottom: 15px;
    border-radius: 4px;
}

@media (max-width: 575.98px) {
    .profile-img {
        float: none;
        display: block;
        margin: 0 auto 20px auto;
        max-width: 100%;
        height: auto;
    }
}

.clearfix::after {
    content: "";
    display: table;
    clear: both;
}

/* =======================================================
   MOBILE OFFCANVAS MENÜ
   ======================================================= */
.offcanvas {
    max-width: 300px;
}

.offcanvas .nav-link {
    font-family: var(--font-heading);
    font-size: 1.05rem;
    color: #212529;
    padding: 0.6rem 1rem;
    border-bottom: 1px solid #f0f0f0;
}

.offcanvas .nav-link:hover {
    color: var(--bs-link-hover-color);
}

.offcanvas .menu-category {
    font-family: var(--font-heading);
    font-weight: 600;
    font-size: 0.85rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: #888888;
    padding: 0.75rem 1rem 0.25rem 1rem;
}
