/* ================================================
   IT Doktor - Ralf Boborowski
   Design Stylesheet - PHASE 1 FINAL
   LOGO SCHWEBT ÜBER TOPBAR + NAVIGATION (FIXED)
   Logo bündig mit Container-Inhalt (max-width 1100px)
   Alle OS, alle Browser — nur Standard-CSS, keine Präfixe
   ================================================ */

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    --primary-blue: #0d9488;
    --secondary-blue: #14b8a6;
    --accent-blue: #0ea5e9;
    --dark-blue: #0f766e;
    --dark-gray: #0f172a;
    --medium-gray: #334155;
    --light-gray: #f8fafc;
    --white: #ffffff;
    --border-color: #cbd5e1;
    --success-green: #059669;
    --topbar-h: 48px;
    --header-h: 76px;
    --logo-w: 300px;
    --container-max: 1100px;
    --container-pad: 1.75rem;
}

html {
    font-size: 16px;
    scroll-behavior: smooth;
}

body {
    font-size: 1rem;
    line-height: 1.65;
    color: var(--dark-gray);
    background-color: var(--light-gray);
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
    padding-top: calc(var(--topbar-h) + var(--header-h));
}

section[id],
header[id] {
    scroll-margin-top: 130px;
}

/* ================================================
   LOGO (FIXED — schwebt über Topbar UND Navigation)
   Linke Kante bündig mit Container-Inhalt
   ================================================ */
.logo-box {
    position: fixed;
    top: 4px;
    left: max(var(--container-pad), calc((100vw - var(--container-max)) / 2 + var(--container-pad)));
    z-index: 1002;
    background: var(--white);
    border-radius: 14px;
    padding: 0.7rem 1.2rem;
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.22);
    border: 1px solid rgba(13, 148, 136, 0.15);
    display: flex;
    align-items: center;
    justify-content: center;
    height: calc(var(--topbar-h) + var(--header-h) - 8px);
    text-decoration: none;
    transition: box-shadow 0.3s ease;
    cursor: pointer;
}

.logo-box:hover {
    box-shadow: 0 8px 28px rgba(0, 0, 0, 0.30);
}

.logo-img {
    max-height: 72px;
    width: auto;
    display: block;
    object-fit: contain;
}

/* ================================================
   Topbar (FIXED, ganz oben)
   ================================================ */
.topbar {
    background: var(--white);
    padding: 0.5rem 0;
    border-bottom: 1px solid var(--border-color);
    min-height: var(--topbar-h);
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1000;
}

.topbar-container {
    max-width: var(--container-max);
    margin: 0 auto;
    padding: 0 var(--container-pad);
}

.topbar-right {
    display: flex;
    gap: 1.5rem;
    justify-content: flex-end;
    align-items: center;
    flex-wrap: wrap;
}

.topbar-link {
    color: var(--primary-blue);
    text-decoration: none;
    font-weight: 600;
    padding: 0.5rem 0.75rem;
    border-radius: 8px;
    min-height: 44px;
    display: inline-flex;
    align-items: center;
    transition: all 0.2s ease;
}

.topbar-link:hover {
    background: rgba(13, 148, 136, 0.1);
}

/* ================================================
   Header / Navigation (FIXED unter Topbar)
   ================================================ */
.site-header {
    position: fixed;
    top: var(--topbar-h);
    left: 0;
    right: 0;
    z-index: 999;
    background: linear-gradient(135deg, var(--primary-blue) 0%, var(--dark-blue) 100%);
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.25);
    height: var(--header-h);
    display: flex;
    align-items: center;
}

.nav {
    width: 100%;
}

.nav-container {
    max-width: var(--container-max);
    width: 100%;
    margin: 0 auto;
    padding: 0 var(--container-pad) 0 calc(var(--logo-w) + 1.5rem);
    display: flex;
    justify-content: flex-end;
    align-items: center;
    gap: 0.5rem;
}

.nav-menu {
    display: flex;
    list-style: none;
    gap: 0.5rem;
    flex-wrap: wrap;
    align-items: center;
    margin-left: auto;
}

.nav-menu a {
    color: var(--white);
    text-decoration: none;
    padding: 0.75rem 1.2rem;
    border-radius: 8px;
    font-weight: 600;
    font-size: 0.95rem;
    display: flex;
    align-items: center;
    min-height: 44px;
    transition: all 0.2s ease;
}

.nav-menu a:hover,
.nav-menu a.active {
    background-color: rgba(255, 255, 255, 0.15);
}

.nav-toggle {
    display: none;
    background: none;
    border: 2px solid var(--white);
    color: var(--white);
    font-size: 1.8rem;
    cursor: pointer;
    padding: 0.5rem 0.75rem;
    border-radius: 8px;
    min-height: 46px;
}

/* ================================================
   Side-Contact Slider
   ================================================ */
.side-contact {
    position: fixed;
    right: 0;
    top: 50%;
    transform: translateY(-50%);
    z-index: 1002;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.side-item {
    position: relative;
    width: 56px;
    height: 56px;
}

.side-tab {
    background: var(--primary-blue);
    color: var(--white);
    border-radius: 12px 0 0 12px;
    position: absolute;
    right: 0;
    top: 0;
    height: 100%;
    width: 56px;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0;
    overflow: hidden;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    text-decoration: none;
    cursor: pointer;
    box-shadow: -2px 4px 12px rgba(0, 0, 0, 0.15);
}

.side-tab svg {
    width: 28px;
    height: 28px;
    flex-shrink: 0;
    transition: all 0.3s ease;
}

.side-tab span {
    display: none;
    white-space: nowrap;
    font-size: 0.9rem;
    font-weight: 600;
    padding-right: 16px;
    opacity: 0;
    transition: opacity 0.2s ease 0.1s;
}

.side-item:hover .side-tab {
    width: 220px;
}

.side-item:hover .side-tab span {
    display: inline-block;
    opacity: 1;
    transition-delay: 0.15s;
}

.side-item:hover .side-tab svg {
    margin-right: 12px;
    transform: translateX(-8px);
}

.side-item:hover .side-tab:hover {
    background: var(--secondary-blue);
    box-shadow: -4px 6px 18px rgba(0, 0, 0, 0.2);
}

.side-tab:active {
    transform: scale(0.96);
}

/* ================================================
   Hero Section
   ================================================ */
.hero {
    background: linear-gradient(135deg, var(--primary-blue) 0%, var(--secondary-blue) 50%, var(--accent-blue) 100%);
    color: var(--white);
    padding: 4rem var(--container-pad);
    text-align: center;
}

.hero-container {
    max-width: 950px;
    margin: 0 auto;
}

.hero-elevated {
    background: var(--white);
    border-radius: 16px;
    padding: 3rem 2rem;
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.2);
    color: var(--dark-gray);
}

.hero h1 {
    font-size: 2.2rem;
    font-weight: 800;
    color: var(--primary-blue);
    margin-bottom: 1rem;
}

.hero-subtitle {
    font-size: 1.15rem;
    color: var(--medium-gray);
    margin-bottom: 0.85rem;
}

.hero-tagline {
    font-size: 1.1rem;
    color: var(--dark-blue);
    font-weight: 600;
}

/* ================================================
   Main Content
   ================================================ */
.main-content {
    max-width: var(--container-max);
    margin: 0 auto;
    padding: 3.5rem var(--container-pad);
}

/* ================================================
   Intro Section
   ================================================ */
.intro-section {
    margin-bottom: 1rem;
}

.intro-elevated {
    background: var(--white);
    border-radius: 16px;
    padding: 2.5rem 2rem;
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.15);
    max-width: 850px;
    margin: 0 auto 3.5rem auto;
}

.intro-elevated ul {
    list-style: none;
    padding-left: 0;
}

.intro-elevated ul li {
    padding: 1rem 0 1rem 2.25rem;
    position: relative;
    color: var(--medium-gray);
    font-size: 1.05rem;
    line-height: 1.7;
}

.intro-elevated ul li::before {
    content: "\2713";
    position: absolute;
    left: 0;
    color: var(--success-green);
    font-weight: 800;
    font-size: 1.25rem;
}

/* ================================================
   Services Section
   ================================================ */
.services-section {
    margin: 3.5rem 0;
}

.services-section h2 {
    color: var(--primary-blue);
    font-size: 1.8rem;
    text-align: center;
    margin-bottom: 1rem;
    font-weight: 700;
}

.services-intro {
    text-align: center;
    color: var(--medium-gray);
    font-size: 1.1rem;
    margin-bottom: 2.5rem;
    max-width: 700px;
    margin-left: auto;
    margin-right: auto;
    line-height: 1.7;
}

.services-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 1.5rem;
}

.service-card {
    background: var(--white);
    border-radius: 12px;
    padding: 1.75rem;
    text-align: center;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.08);
    transition: all 0.3s ease;
    border: 1px solid var(--border-color);
}

.service-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.12);
    border-color: var(--accent-blue);
}

.service-icon {
    font-size: 2.75rem;
    margin-bottom: 1rem;
}

.service-card h3 {
    color: var(--dark-blue);
    font-size: 1.1rem;
    margin-bottom: 0.75rem;
    font-weight: 700;
}

.service-card p {
    color: var(--medium-gray);
    font-size: 0.9rem;
    line-height: 1.55;
}

/* ================================================
   Qualität Section
   ================================================ */
.difference-section {
    background: linear-gradient(135deg, var(--primary-blue) 0%, var(--dark-blue) 100%);
    color: var(--white);
    padding: 3.5rem var(--container-pad);
    border-radius: 16px;
    margin: 3.5rem 0;
}

.difference-section h2 {
    text-align: center;
    font-size: 1.75rem;
    margin-bottom: 2.25rem;
    font-weight: 700;
}

.difference-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1.5rem;
    max-width: 900px;
    margin: 0 auto;
}

.difference-item {
    background: rgba(255, 255, 255, 0.12);
    padding: 1.75rem;
    border-radius: 10px;
    text-align: center;
    backdrop-filter: blur(4px);
}

.difference-item .icon {
    font-size: 2.25rem;
    margin-bottom: 0.85rem;
}

.difference-item h3 {
    font-size: 1.05rem;
    margin-bottom: 0.5rem;
    font-weight: 600;
}

/* ================================================
   Contact Section
   ================================================ */
.contact-section {
    margin: 3.5rem 0;
}

.contact-box {
    background: var(--white);
    padding: 3.5rem var(--container-pad);
    border-radius: 16px;
    box-shadow: 0 8px 28px rgba(0, 0, 0, 0.12);
    text-align: center;
}

.contact-box h2 {
    color: var(--primary-blue);
    margin-bottom: 1.75rem;
    font-size: 1.8rem;
    font-weight: 700;
}

.contact-intro {
    color: var(--medium-gray);
    font-size: 1.05rem;
    margin-bottom: 2.25rem;
    max-width: 800px;
    margin-left: auto;
    margin-right: auto;
    line-height: 1.7;
}

.contact-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 2rem;
}

.contact-item {
    text-align: center;
}

.contact-item h3 {
    color: var(--primary-blue);
    font-size: 1.1rem;
    margin-bottom: 0.65rem;
    font-weight: 600;
}

.contact-item p {
    color: var(--medium-gray);
    font-size: 1.05rem;
}

.contact-item a {
    color: var(--dark-blue);
    text-decoration: none;
    font-weight: 700;
    font-size: 1.05rem;
}

/* ================================================
   Footer
   ================================================ */
.footer {
    background: var(--dark-blue);
    color: var(--white);
    padding: 2.75rem var(--container-pad) 2rem var(--container-pad);
    margin-top: 3.5rem;
}

.footer-container {
    max-width: var(--container-max);
    margin: 0 auto;
}

.footer-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 2.25rem;
    margin-bottom: 2.25rem;
}

.footer-col h4 {
    font-size: 1.05rem;
    margin-bottom: 0.85rem;
    color: var(--secondary-blue);
    font-weight: 700;
}

.footer-col p {
    font-size: 1rem;
    margin-bottom: 0.45rem;
    opacity: 0.95;
}

.footer-col a {
    color: var(--white);
    text-decoration: none;
    opacity: 0.9;
    transition: opacity 0.3s;
    font-size: 1rem;
}

.footer-col a:hover {
    opacity: 1;
    text-decoration: underline;
}

.footer-copy {
    text-align: center;
    font-size: 1rem;
    opacity: 0.85;
    border-top: 1px solid rgba(255, 255, 255, 0.2);
    padding-top: 1.75rem;
    font-weight: 500;
}

.footer-copy a {
    color: var(--white);
    text-decoration: none;
}

.footer-copy a:hover {
    text-decoration: underline;
}

/* ================================================
   Cookie Banner
   ================================================ */
.cookie-banner {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    background: var(--dark-blue);
    color: var(--white);
    padding: 1.75rem;
    z-index: 1003;
    display: none;
    box-shadow: 0 -4px 18px rgba(0, 0, 0, 0.4);
}

.cookie-banner.show {
    display: block;
}

.cookie-content {
    max-width: var(--container-max);
    margin: 0 auto;
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 1.25rem;
}

.cookie-content p {
    flex: 1;
    min-width: 260px;
    font-size: 0.95rem;
    line-height: 1.6;
}

.cookie-buttons {
    display: flex;
    gap: 0.65rem;
    flex-wrap: wrap;
}

.btn-accept,
.btn-decline,
.btn-info {
    padding: 0.85rem 1.5rem;
    border-radius: 8px;
    cursor: pointer;
    font-size: 0.95rem;
    font-weight: 700;
    min-height: 48px;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s ease;
}

.btn-accept {
    background: var(--success-green);
    color: var(--white);
    border: none;
}

.btn-decline {
    background: transparent;
    color: var(--white);
    border: 2px solid var(--white);
}

.btn-info {
    color: var(--white);
    border: 2px solid var(--white);
}

.btn-accept:hover {
    background: #047857;
    transform: translateY(-2px);
}

.btn-decline:hover,
.btn-info:hover {
    background: rgba(255, 255, 255, 0.1);
}

/* ================================================
   Back-to-Top Button
   ================================================ */
.back-to-top {
    position: fixed;
    bottom: 22px;
    right: 22px;
    width: 52px;
    height: 52px;
    background: var(--primary-blue);
    color: var(--white);
    border: none;
    border-radius: 50%;
    font-size: 1.6rem;
    cursor: pointer;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
    z-index: 99;
    box-shadow: 0 6px 18px rgba(0, 0, 0, 0.35);
}

.back-to-top.show {
    opacity: 1;
    visibility: visible;
}

.back-to-top:hover {
    background: var(--secondary-blue);
    transform: translateY(-4px);
}

/* ================================================
   Page Headers & Legal Text (für spätere Legal-Seiten)
   ================================================ */
.page-header {
    background: linear-gradient(135deg, var(--primary-blue) 0%, var(--dark-blue) 100%);
    color: var(--white);
    padding: 2rem var(--container-pad);
    text-align: center;
}

.page-header h1 {
    font-size: 2rem;
    margin-bottom: 0.5rem;
    font-weight: 700;
}

.page-header p {
    opacity: 0.9;
    font-size: 1.1rem;
}

.legal-text {
    background: var(--white);
    padding: 2.5rem 2rem;
    border-radius: 12px;
    margin: 2rem 0;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.08);
}

.legal-text h2 {
    color: var(--primary-blue);
    font-size: 1.3rem;
    margin: 2rem 0 1rem;
    font-weight: 700;
}

.legal-text h2:first-child {
    margin-top: 0;
}

.legal-text h3 {
    color: var(--dark-blue);
    font-size: 1.1rem;
    margin: 1.5rem 0 0.75rem;
    font-weight: 600;
}

.legal-text p {
    margin-bottom: 1rem;
    color: var(--medium-gray);
    line-height: 1.7;
}

.legal-text ul {
    padding-left: 1.5rem;
    margin-bottom: 1rem;
}

.legal-text li {
    margin-bottom: 0.5rem;
    color: var(--medium-gray);
}

.legal-text a {
    color: var(--primary-blue);
    text-decoration: none;
    font-weight: 600;
}

.legal-text a:hover {
    text-decoration: underline;
}

/* ================================================
   Responsive Design
   ================================================ */
@media (max-width: 1024px) {
    .services-grid { grid-template-columns: repeat(3, 1fr); }
    .difference-grid { grid-template-columns: repeat(2, 1fr); }
    .footer-grid { grid-template-columns: repeat(2, 1fr); }
    :root { --logo-w: 260px; }
}

@media (max-width: 768px) {
    :root { --topbar-h: 44px; --header-h: 64px; --logo-w: 180px; }
    html { font-size: 15px; }
    body { padding-top: calc(var(--topbar-h) + var(--header-h)); }

    .logo-box {
        height: calc(var(--topbar-h) + var(--header-h) - 12px);
        padding: 0.5rem 0.9rem;
        left: max(1rem, calc((100vw - var(--container-max)) / 2 + 1rem));
    }
    .logo-img { max-height: 50px; }

    .nav-container { padding-left: calc(var(--logo-w) + 0.5rem); }
    .nav-menu {
        display: none; width: 100%; flex-direction: column;
        position: absolute; top: var(--header-h); left: 0; right: 0;
        background: var(--dark-blue); padding: 1rem;
        border-radius: 0 0 12px 12px; box-shadow: 0 4px 12px rgba(0,0,0,0.3);
    }
    .nav-menu.active { display: flex; }
    .nav-toggle { display: block; }

    .hero { padding: 3.5rem 1.5rem; }
    .hero-elevated { padding: 2.5rem 1.5rem; }
    .main-content { padding: 3rem 1.5rem; }
    .intro-elevated { padding: 2rem 1.5rem; }
    .services-grid { grid-template-columns: repeat(2, 1fr); gap: 1.25rem; }
    .service-card { padding: 1.5rem; }
    .difference-section { padding: 3rem 1.5rem; }
    .contact-grid { grid-template-columns: 1fr; gap: 2rem; }
    .footer-grid { grid-template-columns: 1fr; text-align: center; }
    .cookie-content { flex-direction: column; text-align: center; }
    .side-contact { display: none; }
}

@media (max-width: 480px) {
    :root { --topbar-h: 40px; --header-h: 56px; --logo-w: 145px; }
    html { font-size: 14px; }
    body { padding-top: calc(var(--topbar-h) + var(--header-h)); }

    .logo-box {
        height: calc(var(--topbar-h) + var(--header-h) - 12px);
        left: max(0.75rem, calc((100vw - var(--container-max)) / 2 + 0.75rem));
        padding: 0.4rem 0.7rem;
    }
    .logo-img { max-height: 40px; }

    .services-grid { grid-template-columns: 1fr; }
    .difference-grid { grid-template-columns: 1fr; }
    .topbar-right { flex-direction: column; gap: 0.65rem; }
    .cookie-buttons { flex-direction: column; width: 100%; }
    .btn-accept, .btn-decline, .btn-info { width: 100%; }
}
