/* =========================================================
   solutio4science.de – Stylesheet
   Farben: Rot #dc0e29 / #e60004, Grau #666666
   Font: Roboto (lokal, DSGVO-konform)
   ========================================================= */

/* --- Font --- */
@font-face {
    font-family: 'Roboto';
    font-style: normal;
    font-weight: 400;
    font-display: swap;
    src: url('../fonts/roboto-v30-latin-regular.woff2') format('woff2');
}

/* --- Reset & Base --- */
*, *::before, *::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

html {
    font-size: 16px;
    scroll-behavior: smooth;
}

body {
    font-family: 'Roboto', Arial, Helvetica, sans-serif;
    color: #333;
    line-height: 1.6;
    background: #fff;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

main {
    flex: 1;
}

img {
    max-width: 100%;
    height: auto;
    display: block;
}

a {
    color: #dc0e29;
    text-decoration: none;
}
a:hover, a:focus {
    text-decoration: underline;
    color: #b00a22;
}

h1, h2, h3, h4 {
    color: #222;
    line-height: 1.3;
    margin-bottom: 0.5em;
}

h1 { font-size: 1.8rem; }
h2 { font-size: 1.4rem; }
h3 { font-size: 1.2rem; }

p {
    margin-bottom: 1em;
    color: #666;
}

ul, ol {
    margin-bottom: 1em;
    padding-left: 1.5em;
}

li {
    color: #666;
    margin-bottom: 0.3em;
}

/* --- Container --- */
.container {
    width: 100%;
    max-width: 1100px;
    margin: 0 auto;
    padding: 0 1rem;
}

/* --- Branding --- */
.brand-red {
    color: #dc0e29;
    font-weight: bold;
}

/* --- Header --- */
.site-header {
    background: #fff;
    border-bottom: 3px solid #dc0e29;
    position: sticky;
    top: 0;
    z-index: 100;
    box-shadow: 0 2px 4px rgba(0,0,0,0.08);
}

.header-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    padding-top: 0.5rem;
    padding-bottom: 0.5rem;
}

.logo-link {
    display: inline-block;
}

.logo {
    height: 45px;
    width: auto;
}

/* --- Navigation --- */
.main-nav {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.nav-list {
    display: flex;
    align-items: center;
    list-style: none;
    gap: 0;
    padding: 0;
    margin: 0;
}

.nav-item {
    position: relative;
}

.nav-link {
    display: inline-flex;
    align-items: center;
    padding: 0.75rem 1rem;
    color: #333;
    font-size: 0.95rem;
    line-height: 1.2;
    text-decoration: none;
    border: none;
    background: none;
    cursor: pointer;
    font-family: inherit;
    white-space: nowrap;
    box-sizing: border-box;
    vertical-align: middle;
}
.nav-link:hover, .nav-link:focus,
.nav-link.active {
    color: #dc0e29;
    text-decoration: none;
}

.dropdown-arrow {
    font-size: 0.65rem;
    margin-left: 0.2rem;
}

.dropdown-menu {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    background: #fff;
    border: 1px solid #eee;
    box-shadow: 0 4px 12px rgba(0,0,0,0.1);
    list-style: none;
    padding: 0.5rem 0;
    min-width: 220px;
    z-index: 200;
}

.nav-item.has-dropdown:hover .dropdown-menu,
.nav-item.has-dropdown.open .dropdown-menu {
    display: block;
}

.dropdown-link {
    display: block;
    padding: 0.5rem 1.2rem;
    color: #333;
    white-space: nowrap;
}
.dropdown-link:hover, .dropdown-link:focus,
.dropdown-link.active {
    background: #f8f8f8;
    color: #dc0e29;
    text-decoration: none;
}

/* Kundentyp-Indikator */
.customer-type-indicator {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.85rem;
    color: #666;
    padding: 0.3rem 0.8rem;
    background: #f5f5f5;
    border-radius: 4px;
}
.ct-change {
    font-size: 0.8rem;
}

/* Hamburger */
.nav-toggle {
    display: none;
    background: none;
    border: none;
    cursor: pointer;
    padding: 0.5rem;
    width: 40px;
    height: 40px;
    position: relative;
}
.hamburger,
.hamburger::before,
.hamburger::after {
    display: block;
    width: 24px;
    height: 3px;
    background: #333;
    border-radius: 2px;
    transition: transform 0.3s, opacity 0.3s;
    position: absolute;
    left: 8px;
}
.hamburger { top: 50%; transform: translateY(-50%); }
.hamburger::before { content: ''; top: -7px; }
.hamburger::after  { content: ''; top: 7px; }

.nav-toggle[aria-expanded="true"] .hamburger {
    background: transparent;
}
.nav-toggle[aria-expanded="true"] .hamburger::before {
    top: 0; transform: rotate(45deg);
}
.nav-toggle[aria-expanded="true"] .hamburger::after {
    top: 0; transform: rotate(-45deg);
}

/* --- Header Image --- */
.header-image {
    width: 100%;
    max-height: 300px;
    overflow: hidden;
}
.header-image img {
    width: 100%;
    height: 300px;
    object-fit: cover;
}

/* --- Footer --- */
.site-footer {
    background: #2a2a2a;
    color: #ccc;
    padding: 2rem 0;
    margin-top: 3rem;
}
.footer-inner {
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    align-items: flex-start;
    gap: 1rem;
}
.footer-contact p {
    color: #ccc;
    margin-bottom: 0.3rem;
    font-size: 0.9rem;
}
.footer-company {
    font-weight: bold;
    color: #fff !important;
}
.footer-nav ul {
    list-style: none;
    display: flex;
    gap: 1.5rem;
    padding: 0;
}
.footer-nav a {
    color: #ccc;
    font-size: 0.9rem;
}
.footer-nav a:hover {
    color: #fff;
}
.site-footer a {
    color: #ccc;
}
.site-footer a:hover {
    color: #fff;
}

/* --- Kundentyp-Selektor (Startseite) --- */
.customer-selector {
    text-align: center;
    padding: 2rem 0;
    margin-bottom: 2rem;
}
.customer-selector h2 {
    margin-bottom: 1.5rem;
    color: #333;
}
.selector-buttons {
    display: flex;
    justify-content: center;
    gap: 1.5rem;
    flex-wrap: wrap;
}
.selector-btn {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.5rem;
    padding: 1.5rem 2rem;
    border: 2px solid #ddd;
    border-radius: 8px;
    background: #fff;
    color: #333;
    text-decoration: none;
    transition: border-color 0.2s, box-shadow 0.2s;
    min-width: 180px;
}
.selector-btn:hover, .selector-btn:focus {
    border-color: #dc0e29;
    box-shadow: 0 4px 12px rgba(220,14,41,0.15);
    text-decoration: none;
    color: #333;
}
.selector-btn.active {
    border-color: #dc0e29;
    background: #fef2f3;
}
.selector-icon {
    font-size: 2.5rem;
}
.selector-label {
    font-size: 1rem;
    font-weight: bold;
}

/* --- Service Cards (Startseite) --- */
.service-cards {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 1.5rem;
    margin: 2rem 0;
}
.service-card {
    background: #fff;
    border: 1px solid #eee;
    border-radius: 8px;
    padding: 1.5rem;
    text-align: center;
    transition: box-shadow 0.2s;
}
.service-card:hover {
    box-shadow: 0 4px 16px rgba(0,0,0,0.08);
}
.service-card h3 {
    margin-bottom: 0.8rem;
}
.service-card p {
    font-size: 0.95rem;
}
.service-card .card-icon {
    font-size: 2.5rem;
    margin-bottom: 0.8rem;
}

/* --- Buttons --- */
.btn {
    display: inline-block;
    padding: 0.7rem 1.5rem;
    border-radius: 4px;
    font-size: 1rem;
    text-decoration: none;
    cursor: pointer;
    border: none;
    transition: background 0.2s;
}
.btn-primary {
    background: #dc0e29;
    color: #fff;
}
.btn-primary:hover, .btn-primary:focus {
    background: #b00a22;
    color: #fff;
    text-decoration: none;
}
.btn-secondary {
    background: #f5f5f5;
    color: #333;
    border: 1px solid #ddd;
}
.btn-secondary:hover {
    background: #eee;
    text-decoration: none;
}

/* --- Content --- */
.page-content {
    padding: 2rem 0;
}
.page-content h1 {
    margin-bottom: 1rem;
    padding-bottom: 0.5rem;
    border-bottom: 2px solid #dc0e29;
}

/* Highlight-Box (z. B. Wassertests ZÄ-Argument) */
.highlight-box {
    background: #fef2f3;
    border-left: 4px solid #dc0e29;
    padding: 1.5rem;
    margin: 1.5rem 0;
    border-radius: 0 4px 4px 0;
}
.highlight-box h2 {
    color: #dc0e29;
    margin-bottom: 0.8rem;
}

/* Info-Box */
.info-box {
    background: #f0f7ff;
    border-left: 4px solid #2980b9;
    padding: 1.5rem;
    margin: 1.5rem 0;
    border-radius: 0 4px 4px 0;
}

/* --- Kontaktformular --- */
.contact-form {
    max-width: 700px;
}
.form-group {
    margin-bottom: 1.2rem;
}
.form-group label {
    display: block;
    margin-bottom: 0.3rem;
    font-weight: bold;
    color: #333;
    font-size: 0.95rem;
}
.form-group input[type="text"],
.form-group input[type="email"],
.form-group input[type="tel"],
.form-group textarea,
.form-group select {
    width: 100%;
    padding: 0.6rem 0.8rem;
    border: 1px solid #ccc;
    border-radius: 4px;
    font-family: inherit;
    font-size: 1rem;
    color: #333;
}
.form-group input:focus,
.form-group textarea:focus,
.form-group select:focus {
    outline: none;
    border-color: #dc0e29;
    box-shadow: 0 0 0 2px rgba(220,14,41,0.15);
}
.form-group textarea {
    min-height: 120px;
    resize: vertical;
}

.form-checkboxes {
    margin: 1.5rem 0;
}
.form-checkboxes legend {
    font-weight: bold;
    margin-bottom: 0.5rem;
    color: #333;
}
.form-checkboxes label {
    display: block;
    margin-bottom: 0.4rem;
    font-weight: normal;
    color: #666;
    cursor: pointer;
}
.form-checkboxes input[type="checkbox"] {
    margin-right: 0.5rem;
}

/* Honeypot */
.hp-field { position: absolute; left: -9999px; opacity: 0; }

/* Erfolgs-/Fehlermeldungen */
.alert {
    padding: 1rem 1.5rem;
    border-radius: 4px;
    margin-bottom: 1.5rem;
}
.alert-success {
    background: #d4edda;
    color: #155724;
    border: 1px solid #c3e6cb;
}
.alert-error {
    background: #f8d7da;
    color: #721c24;
    border: 1px solid #f5c6cb;
}

/* --- Video --- */
.video-container {
    margin: 1.5rem 0;
    border-radius: 4px;
    overflow: hidden;
}
.video-container video {
    width: 100%;
    display: block;
}

/* --- Breadcrumbs --- */
.breadcrumbs {
    padding: 0.8rem 0;
    font-size: 0.85rem;
}
.breadcrumbs ol {
    display: flex;
    list-style: none;
    gap: 0;
    padding: 0;
    margin: 0;
}
.breadcrumbs li::after {
    content: '›';
    margin: 0 0.5rem;
    color: #999;
}
.breadcrumbs li:last-child::after {
    content: '';
}
.breadcrumbs a {
    color: #666;
}
.breadcrumbs span {
    color: #999;
}

/* --- Legal pages (AGB, Impressum, Datenschutz) --- */
.legal-content h2 {
    margin-top: 2rem;
}
.legal-content h3 {
    margin-top: 1.5rem;
}

/* =========================================================
   RESPONSIVE
   ========================================================= */

/* Tablet */
@media (max-width: 768px) {
    .nav-toggle {
        display: block;
    }

    .main-nav {
        display: none;
        flex-direction: column;
        width: 100%;
        background: #fff;
        border-top: 1px solid #eee;
        padding: 1rem 0;
    }
    .main-nav.open {
        display: flex;
    }

    .nav-list {
        flex-direction: column;
        width: 100%;
    }
    .nav-link {
        padding: 0.8rem 1rem;
        border-bottom: 1px solid #f0f0f0;
    }

    .dropdown-menu {
        position: static;
        box-shadow: none;
        border: none;
        background: #f8f8f8;
    }
    .dropdown-link {
        padding-left: 2rem;
    }

    .customer-type-indicator {
        width: 100%;
        justify-content: center;
        margin-top: 0.5rem;
    }

    .header-inner {
        flex-wrap: wrap;
    }

    .footer-inner {
        flex-direction: column;
        text-align: center;
    }
    .footer-nav ul {
        justify-content: center;
        flex-wrap: wrap;
        gap: 1rem;
    }

    .selector-buttons {
        flex-direction: column;
        align-items: center;
    }
    .selector-btn {
        width: 100%;
        max-width: 300px;
    }
}

/* Mobile */
@media (max-width: 480px) {
    h1 { font-size: 1.4rem; }
    h2 { font-size: 1.2rem; }
    h3 { font-size: 1.05rem; }

    .container {
        padding: 0 0.75rem;
    }

    .service-cards {
        grid-template-columns: 1fr;
    }
}

/* ==========================================================================
   Bestellformular (Erst- und Revalidierung)
   ========================================================================== */

.order-form .order-article {
    border: 1px solid #ddd;
    border-radius: 6px;
    padding: 1rem 1.25rem;
    margin-bottom: 1rem;
    background: #fafafa;
    transition: border-color 0.2s;
}

.order-form .order-article:hover {
    border-color: #ccc;
}

.order-form .article-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    flex-wrap: wrap;
}

.order-form .article-name {
    font-weight: 700;
    font-size: 1rem;
    flex: 1 1 auto;
    cursor: pointer;
}

.order-form .article-qty {
    width: 70px;
    padding: 0.4rem 0.5rem;
    border: 1px solid #ccc;
    border-radius: 4px;
    font-size: 1rem;
    text-align: center;
    flex: 0 0 70px;
}

.order-form .article-details {
    margin-top: 0.5rem;
    font-size: 0.9rem;
    color: #555;
}

.order-form .article-details hr {
    border: none;
    border-top: 1px solid #eee;
    margin: 0.4rem 0;
}

.order-form .article-norm {
    font-style: italic;
}

.order-form .article-price {
    text-align: right;
    font-weight: 700;
    color: #333;
    font-size: 1rem;
    margin-top: 0.25rem;
}

/* Zusammenfassung / Warenkorb */
.order-summary {
    border: 1px solid #ccc;
    background: #f0f0f0;
    border-radius: 6px;
    padding: 1rem 1.25rem;
    margin: 2rem 0;
}

.summary-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.95rem;
}

.summary-table th,
.summary-table td {
    padding: 0.4rem 0.5rem;
    border-bottom: 1px solid #ddd;
}

.summary-table th {
    text-align: left;
    font-weight: 700;
    border-bottom: 2px solid #999;
}

.summary-table .text-right {
    text-align: right;
}

.summary-table .summary-total td {
    border-top: 2px solid #666;
    border-bottom: none;
}

.order-note {
    font-size: 0.85rem;
    color: #777;
    margin-top: 0.75rem;
}

/* --- Fahrtkosten-Rechner --- */
.fk-calculator {
    background: #f5f5f5;
    border: 1px solid #ddd;
    border-radius: 6px;
    padding: 1.25rem;
    margin: 1.5rem 0;
}

.form-group-inline {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    flex-wrap: wrap;
}

.input-plz {
    width: 7rem;
    padding: 0.5rem 0.75rem;
    font-size: 1rem;
    border: 1px solid #ccc;
    border-radius: 4px;
}

.fk-result {
    margin-top: 1rem;
    font-size: 1.05rem;
}

.fk-result output {
    display: inline-block;
    margin-left: 0.5rem;
    font-weight: 700;
    color: #dc0e29;
}

#fk-hint {
    display: inline;
    font-size: 0.8rem;
    color: #999;
    font-style: italic;
    margin-left: 0.25rem;
}
