/* =================================================================
   ROLAND BRAUN AGENCY – EIGENES STYLESHEET
   -----------------------------------------------------------------
   Ergänzt Bootstrap 5.3 (lokal in css/vendor/) um individuelles
   Design: Farben, Typografie-Feinschliff, Hero, Karten, Dark Mode,
   Scroll-Animationen und responsive Anpassungen.
   Es werden bewusst keine externen Schriftarten geladen – die Seite
   nutzt den Bootstrap-Standardfont (system-ui Stack), damit keine
   einzige externe Anfrage nötig ist (volle Offline-Fähigkeit, DSGVO).
   ================================================================= */


/* =================================================================
   1. WURZEL-VARIABLEN
   Hinweis: #0d6efd (Primär) und #198754 (Akzent) entsprechen bereits
   den Bootstrap-Standardfarben "primary" und "success" – daher wird
   größtenteils mit var(--bs-primary) / var(--bs-success) gearbeitet.
   ================================================================= */
:root {
    --header-height: 80px;
    --transition-fast: 0.2s ease;
    --transition-base: 0.35s ease;
    --radius-lg: 1rem;
    --radius-pill: 50rem;
    --shadow-soft: 0 0.5rem 1.5rem rgba(33, 37, 41, 0.08);
    --shadow-strong: 0 1rem 2.5rem rgba(33, 37, 41, 0.18);
    --gradient-primary: linear-gradient(135deg, var(--bs-primary) 0%, #0a58ca 100%);
    --gradient-accent: linear-gradient(135deg, var(--bs-success) 0%, #146c43 100%);
}

/* =================================================================
   2. BASIS & TYPOGRAFIE
   ================================================================= */
html {
    scroll-behavior: smooth;
}

body {
    overflow-x: hidden;
}

/* Abschnitte sollen nicht hinter der fixierten Navigation verschwinden */
section,
header.hero {
    scroll-margin-top: var(--header-height);
}

h1, h2, h3, h4, h5, h6 {
    letter-spacing: -0.015em;
}

/* Eigene "Signatur"-Typografie für Markenkennzeichen, ohne externe Schrift */
.navbar-brand {
    display: inline-flex;
    align-items: center;
    letter-spacing: -0.01em;
    font-size: 1.25rem;
}

/* Sanfter Hover-Effekt für alle Buttons */
.btn {
    transition: transform var(--transition-fast), box-shadow var(--transition-fast), background-color var(--transition-fast), color var(--transition-fast);
    border-radius: var(--radius-pill);
}
.btn:hover {
    transform: translateY(-2px);
}
.btn-lg {
    padding: 0.85rem 1.9rem;
    font-weight: 600;
}


/* =================================================================
   3. BARRIEREFREIHEIT
   ================================================================= */
.skip-link {
    position: fixed;
    top: -3rem;
    left: 1rem;
    z-index: 2000;
    background-color: var(--bs-primary);
    color: #fff;
    padding: 0.6rem 1.1rem;
    border-radius: 0.4rem;
    transition: top var(--transition-fast);
}
.skip-link:focus {
    top: 1rem;
}

:focus-visible {
    outline: 3px solid var(--bs-primary);
    outline-offset: 2px;
}


/* =================================================================
   4. LADEANIMATION (PRELOADER)
   ================================================================= */
#preloader {
    position: fixed;
    inset: 0;
    z-index: 2050;
    display: flex;
    align-items: center;
    justify-content: center;
    background-color: #14213d;
    transition: opacity 0.4s ease, visibility 0.4s ease;
}
#preloader.preloader-hidden {
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
}


/* =================================================================
   5. NAVIGATION
   ================================================================= */
#mainNavbar {
    background-color: transparent;
    padding-top: 1.15rem;
    padding-bottom: 1.15rem;
    transition: background-color var(--transition-base), padding var(--transition-base), box-shadow var(--transition-base);
}

#mainNavbar .navbar-brand,
#mainNavbar .nav-link {
    color: #fff;
    transition: color var(--transition-fast);
}
#mainNavbar .nav-link:hover,
#mainNavbar .nav-link:focus {
    color: rgba(255, 255, 255, 0.75);
}

/* Solider Navbar-Hintergrund, sobald gescrollt wurde (Klasse per JS gesetzt) */
#mainNavbar.navbar-scrolled {
    background-color: var(--bs-body-bg);
    box-shadow: var(--shadow-soft);
    padding-top: 0.6rem;
    padding-bottom: 0.6rem;
}
#mainNavbar.navbar-scrolled .navbar-brand,
#mainNavbar.navbar-scrolled .nav-link {
    color: var(--bs-body-color);
}
#mainNavbar.navbar-scrolled .nav-link:hover,
#mainNavbar.navbar-scrolled .nav-link:focus {
    color: var(--bs-primary);
}

/* Dark-Mode-Umschalter: auf transparenter Navbar helle Outline, sonst Standard */
#mainNavbar:not(.navbar-scrolled) .theme-toggle {
    color: #fff;
    border-color: rgba(255, 255, 255, 0.55);
}
#mainNavbar:not(.navbar-scrolled) .theme-toggle:hover {
    background-color: rgba(255, 255, 255, 0.12);
    color: #fff;
}

/* Firmenlogo als CSS-Icon-Klasse (Hintergrundbild-Technik – analog zu den
   Bootstrap-Icon-Klassen, nur mit dem eigenen Logo statt eines Icon-Fonts) */
.brand-logo-icon {
    display: inline-block;
    width: 40px;
    height: 40px;
    background-image: url("../images/logo.svg");
    background-size: contain;
    background-repeat: no-repeat;
    background-position: center;
    border-radius: 8px;
    vertical-align: middle;
    flex-shrink: 0;
}

/* E-Mail-Adresse als Grafik (Spam-Schutz vor automatisiertem Auslesen).
   Skaliert über "em" mit der umgebenden Schriftgröße, behält das
   Seitenverhältnis der Vorlage (4656.66 x 508) bei. */
.email-logo-icon {
    display: inline-block;
    width: 11.9em;
    height: 1.3em;
    vertical-align: middle;
    background-color: currentColor; /* das ist die sichtbar werdende Farbe */
    mask-image: url("../images/emailRBA.svg");
    mask-size: contain;
    mask-repeat: no-repeat;
    mask-position: center;
    /* gleiche drei Zeilen zusätzlich mit -webkit- Präfix für Safari: */
    -webkit-mask-image: url("../images/emailRBA.svg");
    -webkit-mask-size: contain;
    -webkit-mask-repeat: no-repeat;
    -webkit-mask-position: center;;
}

.telefon-icon {
    display: inline-block;
    width: 11.9em;
    height: 1.3em;
    vertical-align: middle;
    background-color: currentColor; /* das ist die sichtbar werdende Farbe */
    mask-image: url("../images/telefonRBA.svg");
    mask-size: contain;
    mask-repeat: no-repeat;
    mask-position: center;
    /* gleiche drei Zeilen zusätzlich mit -webkit- Präfix für Safari: */
    -webkit-mask-image: url("../images/telefonRBA.svg");
    -webkit-mask-size: contain;
    -webkit-mask-repeat: no-repeat;
    -webkit-mask-position: center;;
}

/* Mobiles Menü: eigener, immer lesbarer Hintergrund unabhängig vom Scroll-Status */
@media (max-width: 991.98px) {
    #mainNavbar .navbar-collapse {
        background-color: var(--bs-body-bg);
        margin-top: 1rem;
        padding: 1rem 1.25rem;
        border-radius: var(--radius-lg);
        box-shadow: var(--shadow-soft);
    }
    #mainNavbar .navbar-collapse .nav-link {
        color: var(--bs-body-color) !important;
    }
    #mainNavbar .navbar-collapse .nav-link:hover {
        color: var(--bs-primary) !important;
    }
    #mainNavbar:not(.navbar-scrolled) .theme-toggle {
        color: var(--bs-body-color);
        border-color: var(--bs-border-color);
    }
}


/* =================================================================
   6. HERO-BEREICH
   ================================================================= */
.hero {
    position: relative;
    min-height: 100vh;
    background-color: #0c1726;
    background-image: url("../images/tookapic-office-932926.jpg");
    background-size: cover;
    background-position: center;
    isolation: isolate;
}

/* Abdunkelnder Verlauf für Lesbarkeit des Textes */
.hero-overlay {
    position: absolute;
    inset: 0;
    z-index: 1;
    background: linear-gradient(160deg, rgba(8, 14, 26, 0.93) 0%, rgba(13, 110, 253, 0.55) 100%);
}

/* Dezentes Punktraster im Hintergrund – Signatur-Motiv "Netzwerk/Verbindung" */
.hero::after {
    content: "";
    position: absolute;
    inset: 0;
    z-index: 1;
    opacity: 0.12;
    background-image: radial-gradient(circle, #ffffff 1px, transparent 1.6px);
    background-size: 28px 28px;
    pointer-events: none;
}

.hero .container {
    position: relative;
    z-index: 2;
}

.hero-title {
    font-size: clamp(2.1rem, 1.2rem + 3.2vw, 3.75rem);
    line-height: 1.15;
    max-width: 880px;
    margin: 0 auto 1.5rem;
    text-shadow: 0 2px 20px rgba(0, 0, 0, 0.25);
}

.hero-subtitle {
    font-size: clamp(1.05rem, 0.85rem + 0.8vw, 1.3rem);
    max-width: 680px;
    margin: 0 auto 2.25rem;
    opacity: 0.92;
}

.hero-buttons .btn-primary {
    box-shadow: 0 0.6rem 1.5rem rgba(13, 110, 253, 0.4);
}
.hero-buttons .btn-primary:hover {
    box-shadow: 0 0.9rem 2rem rgba(13, 110, 253, 0.5);
}
.hero-buttons .btn-outline-light:hover {
    background-color: rgba(255, 255, 255, 0.12);
}

.scroll-indicator {
    position: absolute;
    left: 50%;
    bottom: 1.75rem;
    transform: translateX(-50%);
    z-index: 2;
    color: rgba(255, 255, 255, 0.75);
    font-size: 1.4rem;
    animation: scrollBounce 2.2s infinite;
}
.scroll-indicator:hover {
    color: #fff;
}
@keyframes scrollBounce {
    0%, 100% { transform: translate(-50%, 0); }
    50%      { transform: translate(-50%, 8px); }
}


/* =================================================================
   7. ALLGEMEINE SECTION-HILFSKLASSEN
   ================================================================= */
.section-padding {
    padding-top: 6rem;
    padding-bottom: 6rem;
}
@media (max-width: 767.98px) {
    .section-padding {
        padding-top: 4rem;
        padding-bottom: 4rem;
    }
}

.section-eyebrow {
    display: inline-block;
    font-size: 0.8rem;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: var(--bs-success);
    margin-bottom: 0.75rem;
}

.section-title {
    font-size: clamp(1.65rem, 1.1rem + 1.6vw, 2.5rem);
    font-weight: 700;
    margin-bottom: 1rem;
}

.section-subtitle {
    color: var(--bs-secondary-color);
    font-size: 1.05rem;
    max-width: 680px;
}


/* =================================================================
   8. LEISTUNGEN (KARTEN)
   ================================================================= */
.service-card {
    border-radius: var(--radius-lg);
    transition: transform var(--transition-base), box-shadow var(--transition-base);
}
.service-card:hover {
    transform: translateY(-6px);
    box-shadow: var(--shadow-strong) !important;
}

.service-icon {
    width: 64px;
    height: 64px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.6rem;
    margin-bottom: 1.25rem;
    transition: background-color var(--transition-base), color var(--transition-base);
}
.service-card:hover .service-icon {
    background-color: var(--bs-primary) !important;
    color: #fff !important;
}

.service-card-cta {
    background: var(--gradient-primary);
}
.service-card-cta:hover {
    transform: translateY(-6px);
}


/* =================================================================
   9. ÜBER UNS
   ================================================================= */
.about-image-wrapper {
    position: relative;
}

.about-image {
    width: 100%;
    aspect-ratio: 4 / 3;
    object-fit: cover;
}

.experience-badge {
    position: absolute;
    left: -1rem;
    bottom: -1.5rem;
    border-radius: var(--radius-lg);
    padding: 1rem 1.5rem;
    display: flex;
    flex-direction: column;
    align-items: center;
    line-height: 1.15;
}
.experience-number {
    font-size: 1.9rem;
    font-weight: 800;
}
.experience-label {
    font-size: 0.72rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}
@media (max-width: 575.98px) {
    .experience-badge {
        left: 0.75rem;
        bottom: -1rem;
        padding: 0.75rem 1.1rem;
    }
}


/* =================================================================
   10. VORTEILE
   ================================================================= */
#vorteile {
    position: relative;
}
/* Dezentes Hintergrundbild (Sicherheits-Motiv) – sehr niedrige Deckkraft */
#vorteile::before {
    content: "";
    position: absolute;
    inset: 0;
    z-index: 0;
    background-image: url("../images/katielwhite91-ransomware-3998798.jpg");
    background-size: cover;
    background-position: center;
    opacity: 0.05;
}
#vorteile > .container {
    position: relative;
    z-index: 1;
}

.advantage-item {
    padding: 1.5rem 1rem;
}
.advantage-icon {
    width: 72px;
    height: 72px;
    margin: 0 auto;
    border-radius: 50%;
    background: var(--gradient-accent);
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.8rem;
    box-shadow: var(--shadow-soft);
    transition: transform var(--transition-base);
}
.advantage-item:hover .advantage-icon {
    transform: scale(1.08) rotate(-4deg);
}


/* =================================================================
   11. GROSSER CALL-TO-ACTION BEREICH
   ================================================================= */
.cta-banner {
    position: relative;
    background-color: #14213d;
    background-image: url("../images/pexels-cookiecutter-17489152.jpg");
    background-size: cover;
    background-position: center;
    isolation: isolate;
}
.cta-banner::before {
    content: "";
    position: absolute;
    inset: 0;
    z-index: 0;
    background: linear-gradient(120deg, rgba(8, 14, 26, 0.92), rgba(25, 135, 84, 0.55));
}
.cta-banner .container {
    position: relative;
    z-index: 1;
}
.cta-text {
    opacity: 0.92;
    max-width: 640px;
}
.cta-banner .btn-light:hover {
    box-shadow: var(--shadow-strong);
}


/* =================================================================
   12. KONTAKTBEREICH
   ================================================================= */
.contact-info-card {
    background-color: var(--bs-body-bg);
    border-radius: var(--radius-lg);
    padding: 2rem;
    box-shadow: var(--shadow-soft);
    height: 100%;
}

.contact-icon {
    width: 42px;
    height: 42px;
    flex-shrink: 0;
    border-radius: 50%;
    background-color: var(--bs-primary-bg-subtle);
    color: var(--bs-primary);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.05rem;
}

.contact-form {
    background-color: var(--bs-body-bg);
    border-radius: var(--radius-lg);
    padding: 2rem;
    box-shadow: var(--shadow-soft);
}
.contact-form .form-control:focus,
.contact-form .form-check-input:focus {
    border-color: var(--bs-primary);
    box-shadow: 0 0 0 0.2rem rgba(13, 110, 253, 0.18);
}


/* =================================================================
   13. FOOTER
   ================================================================= */
.footer-section {
    background-color: #14213d;
}
.footer-text {
    color: rgba(255, 255, 255, 0.65);
    font-size: 0.92rem;
}
.footer-links {
    margin: 0;
}
.footer-links li {
    margin-bottom: 0.6rem;
    color: rgba(255, 255, 255, 0.7);
    font-size: 0.92rem;
}
.footer-links a {
    color: rgba(255, 255, 255, 0.7);
    text-decoration: none;
    transition: color var(--transition-fast), padding-left var(--transition-fast);
}
.footer-links a:hover {
    color: #fff;
    padding-left: 0.2rem;
}
.footer-divider {
    border-color: rgba(255, 255, 255, 0.12);
}

.social-icon {
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    background-color: rgba(255, 255, 255, 0.08);
    color: #fff;
    font-size: 1.05rem;
    transition: background-color var(--transition-fast), transform var(--transition-fast);
}
.social-icon:hover {
    background-color: var(--bs-primary);
    transform: translateY(-3px);
}


/* =================================================================
   14. ZURÜCK-NACH-OBEN BUTTON
   ================================================================= */
.back-to-top {
    position: fixed;
    right: 1.5rem;
    bottom: 1.5rem;
    width: 48px;
    height: 48px;
    border: none;
    border-radius: 50%;
    background-color: var(--bs-primary);
    color: #fff;
    font-size: 1.2rem;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    visibility: hidden;
    transform: translateY(12px);
    box-shadow: var(--shadow-soft);
    z-index: 1000;
    cursor: pointer;
    transition: opacity var(--transition-fast), visibility var(--transition-fast),
        transform var(--transition-fast), background-color var(--transition-fast);
}
.back-to-top.show {
    opacity: 1;
    visibility: visible;
    transform: none;
}
.back-to-top:hover {
    background-color: #0a58ca;
}


/* =================================================================
   15. SCROLL-ANIMATIONEN
   Klassen/Attribute werden im HTML vergeben, Sichtbarkeit per JS
   (IntersectionObserver) über die Klasse "is-visible" gesteuert.
   ================================================================= */
.animate-on-scroll {
    opacity: 0;
    transition: opacity 0.7s ease, transform 0.7s ease;
    transition-delay: var(--reveal-delay, 0ms);
}
.animate-on-scroll[data-animation="fade-up"] {
    transform: translateY(28px);
}
.animate-on-scroll[data-animation="fade-left"] {
    transform: translateX(36px);
}
.animate-on-scroll[data-animation="fade-right"] {
    transform: translateX(-36px);
}
.animate-on-scroll.is-visible {
    opacity: 1;
    transform: none;
}


/* =================================================================
   16. DARK-MODE-ANPASSUNGEN
   Bootstrap 5.3 übernimmt per [data-bs-theme="dark"] bereits die
   meisten Standardkomponenten automatisch. Hier folgen nur die
   Anpassungen für eigene/individuelle Klassen.
   ================================================================= */
[data-bs-theme="dark"] .hero-overlay {
    background: linear-gradient(160deg, rgba(0, 0, 0, 0.93) 0%, rgba(13, 110, 253, 0.45) 100%);
}
[data-bs-theme="dark"] .service-icon {
    background-color: rgba(13, 110, 253, 0.18) !important;
}
[data-bs-theme="dark"] .contact-info-card,
[data-bs-theme="dark"] .contact-form {
    box-shadow: 0 0.5rem 1.5rem rgba(0, 0, 0, 0.45);
}
[data-bs-theme="dark"] #preloader {
    background-color: #05080f;
}
[data-bs-theme="dark"] #vorteile::before {
    opacity: 0.08;
}


/* =================================================================
   17. RESPONSIVE ANPASSUNGEN
   ================================================================= */
@media (max-width: 575.98px) {
    .hero-buttons {
        display: flex;
        flex-direction: column;
        gap: 0.75rem;
    }
    .hero-buttons .btn {
        width: 100%;
        margin-right: 0 !important;
    }
    .back-to-top {
        right: 1rem;
        bottom: 1rem;
        width: 44px;
        height: 44px;
    }
}


/* =================================================================
   18. REDUZIERTE BEWEGUNG (BARRIEREFREIHEIT)
   Respektiert die Systemeinstellung "Animationen reduzieren".
   ================================================================= */
@media (prefers-reduced-motion: reduce) {
    html {
        scroll-behavior: auto;
    }
    *, *::before, *::after {
        animation-duration: 0.001ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.001ms !important;
    }
    .animate-on-scroll {
        opacity: 1 !important;
        transform: none !important;
    }
}
