/* ===================================
   MASTER CSS
   Orthopädische Praxis Beckum (OPB)
   Farbschema: Medizinisches Blau
   =================================== */

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

html {
    scroll-behavior: smooth;
}

/* ===================================
   FARBSCHEMA
   =================================== */
:root {
    --primary: #003D82;
    --primary-dark: #002A5C;
    --accent: #D72631;
    --weiss: #FFFFFF;
    --hellgrau: #E3EBF5;
    --grau: #555555;
}

/* ===================================
   BASIS-STYLING
   =================================== */
body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Arial, sans-serif;
    line-height: 1.7;
    color: #333;
    font-size: 16px;
}

h1, h2, h3 {
    color: var(--primary);
    font-weight: 700;
    margin-bottom: 1rem;
}

h1 { font-size: clamp(2rem, 5vw, 3.5rem); }
h2 { font-size: clamp(1.75rem, 4vw, 2.5rem); }
h3 { font-size: clamp(1.25rem, 3vw, 1.75rem); }

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

section {
    padding: 80px 0;
}

/* ===================================
   HEADER & NAVIGATION
   =================================== */
header {
    background: var(--weiss);
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
    position: sticky;
    top: 0;
    z-index: 1000;
}

nav {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 15px 20px;
    max-width: 1200px;
    margin: 0 auto;
}

.logo {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--primary);
    display: flex;
    align-items: center;
    gap: 12px;
    text-decoration: none;
}

.logo-img {
    width: 40px;
    height: 40px;
    object-fit: contain;
}

.nav-links {
    display: flex;
    gap: 30px;
    list-style: none;
    align-items: center;
}

.nav-links a {
    text-decoration: none;
    color: var(--primary);
    font-weight: 600;
    transition: color 0.3s;
}

.nav-links a:hover,
.nav-links a.active {
    color: var(--accent);
}

.nav-item {
    position: relative;
}

.dropdown {
    position: absolute;
    top: 100%;
    left: 0;
    background: var(--weiss);
    box-shadow: 0 4px 20px rgba(0,0,0,0.1);
    border-radius: 8px;
    min-width: 220px;
    opacity: 0;
    visibility: hidden;
    transform: translateY(-10px);
    transition: all 0.3s;
    margin-top: 10px;
    z-index: 1000;
}

.nav-item:hover .dropdown {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.dropdown a {
    display: block;
    padding: 12px 20px;
    color: #333;
    border-bottom: 1px solid #f0f0f0;
}

.dropdown a:last-child { border-bottom: none; }

.dropdown a:hover {
    background: var(--hellgrau);
    color: var(--primary);
}

.mobile-menu-toggle {
    display: none;
    background: none;
    border: none;
    font-size: 1.8rem;
    cursor: pointer;
    color: var(--primary);
    padding: 5px;
}

/* ===================================
   HERO SECTION
   =================================== */
.hero {
    background: linear-gradient(135deg, var(--primary), var(--primary-dark));
    color: var(--weiss);
    padding: 80px 0 70px;
}

.hero h1 {
    color: var(--weiss);
    text-shadow: 2px 2px 4px rgba(0,0,0,0.3);
}

.hero-subtitle {
    font-size: clamp(1.1rem, 2.5vw, 1.5rem);
    margin-bottom: 1.5rem;
    color: rgba(255,255,255,0.95);
}

/* ===================================
   BREADCRUMBS
   =================================== */
.breadcrumb-hero {
    margin-bottom: 15px;
    font-size: 0.9rem;
    text-align: left;
}

.breadcrumb-hero ol {
    display: flex;
    flex-wrap: wrap;
    list-style: none;
    padding: 0;
    margin: 0;
    align-items: center;
}

.breadcrumb-hero li {
    display: flex;
    align-items: center;
}

.breadcrumb-hero a {
    color: rgba(255,255,255,0.9);
    text-decoration: none;
    transition: all 0.3s;
}

.breadcrumb-hero a:hover {
    color: var(--weiss);
    text-decoration: underline;
}

.breadcrumb-hero .separator {
    margin: 0 8px;
    color: rgba(255,255,255,0.6);
}

.breadcrumb-hero .current {
    color: rgba(255,255,255,0.7);
}

/* ===================================
   BUTTONS & CTAs
   =================================== */
.btn {
    display: inline-block;
    padding: 16px 32px;
    border-radius: 50px;
    text-decoration: none;
    font-weight: 600;
    font-size: 1.1rem;
    transition: all 0.3s;
    text-align: center;
    border: none;
    cursor: pointer;
}

.btn-primary {
    background: var(--accent);
    color: var(--weiss);
    border: 2px solid rgba(255,255,255,0.5);
    box-shadow: 0 4px 15px rgba(215,38,49,0.4);
}

.btn-primary:hover {
    background: #B01E28;
    border-color: var(--weiss);
    transform: translateY(-3px);
    box-shadow: 0 6px 20px rgba(215,38,49,0.5);
}

.btn-secondary {
    background: var(--primary);
    color: var(--weiss);
    box-shadow: 0 4px 15px rgba(0,61,130,0.3);
}

.btn-secondary:hover {
    background: var(--primary-dark);
    transform: translateY(-3px);
    box-shadow: 0 6px 20px rgba(0,61,130,0.4);
}

.btn-secondary-hero {
    background: rgba(255,255,255,0.2);
    color: var(--weiss);
    border: 2px solid rgba(255,255,255,0.5);
    box-shadow: 0 4px 15px rgba(255,255,255,0.2);
}

.btn-secondary-hero:hover {
    background: rgba(255,255,255,0.3);
    border-color: var(--weiss);
    transform: translateY(-3px);
}

.btn-call-muted {
    background: rgba(255,255,255,0.2);
    color: var(--weiss);
    border: 2px solid rgba(255,255,255,0.5);
    box-shadow: 0 4px 15px rgba(255,255,255,0.2);
}

.btn-call-muted:hover {
    background: rgba(255,255,255,0.3);
    border-color: var(--weiss);
    transform: translateY(-3px);
}

.btn-outline {
    background: var(--primary);
    color: var(--weiss);
    border: 2px solid rgba(255,255,255,0.5);
}

.btn-outline:hover {
    background: var(--primary-dark);
    border-color: var(--weiss);
    transform: translateY(-2px);
}

.cta-buttons {
    display: flex;
    gap: 20px;
    flex-wrap: wrap;
    margin-top: 30px;
}

/* ===================================
   STICKY CTA
   =================================== */
.sticky-cta-container {
    position: fixed;
    bottom: 20px;
    right: 20px;
    z-index: 999;
    display: flex;
    flex-direction: column;
    gap: 10px;
    opacity: 0;
    transform: translateY(100px);
    transition: all 0.4s;
}

.sticky-cta-container.visible {
    opacity: 1;
    transform: translateY(0);
}

.sticky-cta-container .btn {
    font-size: 0.95rem;
    padding: 12px 20px;
    white-space: nowrap;
    min-width: 200px;
    text-align: center;
    color: var(--weiss);
}

/* Desktop: nur desktop-only sichtbar */
.sticky-mobile-only { display: none; }
.sticky-desktop-only { display: inline-block; }

/* ===================================
   CONTENT SECTIONS
   =================================== */
.bg-light { background: var(--hellgrau); }
.bg-white { background: var(--weiss); }

.section-header {
    text-align: center;
    margin-bottom: 60px;
}

.section-header p {
    max-width: 700px;
    margin: 0 auto;
    color: var(--grau);
    font-size: 1.1rem;
}

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

/* ===================================
   CONTENT GRID & CARDS
   =================================== */
.content-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 30px;
    margin-top: 50px;
}

.card {
    background: var(--weiss);
    padding: 40px 30px;
    border-radius: 16px;
    box-shadow: 0 4px 20px rgba(0,0,0,0.08);
    transition: all 0.3s;
    display: flex;
    flex-direction: column;
    height: 100%;
}

.card:hover {
    transform: translateY(-10px);
    box-shadow: 0 12px 40px rgba(0,61,130,0.15);
}

.card-icon {
    width: 70px;
    height: 70px;
    background: linear-gradient(135deg, var(--primary), var(--primary-dark));
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 20px;
    font-size: 2rem;
}

.card h3 { color: var(--primary); margin-bottom: 10px; }
.card p { color: var(--grau); margin-bottom: 15px; }

.card ul { list-style: none; padding: 0; flex-grow: 1; }

.card li {
    padding: 8px 0 8px 25px;
    position: relative;
    color: var(--grau);
}

.card li::before {
    content: '✓';
    position: absolute;
    left: 0;
    color: var(--accent);
    font-weight: bold;
}

/* ===================================
   INFO BOX
   =================================== */
.info-box {
    background: linear-gradient(135deg, var(--primary), var(--primary-dark));
    color: var(--weiss);
    padding: 40px;
    border-radius: 15px;
    margin: 3rem 0;
    box-shadow: 0 10px 30px rgba(0,61,130,0.2);
}

.info-box h3 { color: var(--weiss); margin-bottom: 1.5rem; }
.info-box ul { list-style: none; }

.info-box li {
    padding: 10px 0 10px 30px;
    position: relative;
}

.info-box li:before {
    content: "✓";
    position: absolute;
    left: 0;
    font-size: 1.2rem;
}

/* ===================================
   PROCESS STEPS
   =================================== */
.process-steps {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 30px;
    margin-top: 3rem;
}

.process-step {
    text-align: center;
    padding: 30px 20px;
    background: var(--weiss);
    border-radius: 15px;
    box-shadow: 0 4px 15px rgba(0,0,0,0.05);
}

.step-number {
    display: inline-block;
    width: 60px;
    height: 60px;
    line-height: 60px;
    background: var(--primary);
    color: var(--weiss);
    border-radius: 50%;
    font-size: 1.8rem;
    font-weight: bold;
    margin-bottom: 1rem;
}

/* ===================================
   FAQ ACCORDION
   =================================== */
.faq-container,
.faq-list {
    max-width: 900px;
    margin: 50px auto 0;
}

.faq-item {
    background: #F5F9FB;
    margin-bottom: 15px;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 2px 10px rgba(0,0,0,0.05);
}

.faq-question {
    padding: 25px 30px;
    cursor: pointer;
    display: flex;
    justify-content: space-between;
    font-weight: 600;
    color: var(--primary);
    transition: background 0.3s;
}

.faq-question:hover {
    background: var(--primary);
    color: var(--weiss);
}

.faq-question .faq-icon { font-size: 1.5rem; }

.faq-answer {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.3s ease-out, padding 0.3s;
    padding: 0 30px;
}

.faq-item.active .faq-answer {
    max-height: 500px;
    padding: 0 30px 25px;
}

/* ===================================
   TEAM
   =================================== */
.team-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 40px;
    margin-top: 50px;
}

.team-member {
    text-align: center;
    background: var(--weiss);
    padding: 40px 30px;
    border-radius: 16px;
    box-shadow: 0 4px 20px rgba(0,0,0,0.08);
    transition: all 0.3s;
    display: flex;
    flex-direction: column;
    height: 100%;
}

.team-member:hover {
    transform: translateY(-5px);
    box-shadow: 0 12px 40px rgba(0,61,130,0.15);
}

.team-photo {
    width: 180px;
    height: 180px;
    border-radius: 50%;
    margin: 0 auto 20px;
    overflow: hidden;
    border: 4px solid var(--primary);
    box-shadow: 0 4px 15px rgba(0,61,130,0.2);
}

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

.team-qualifications {
    list-style: none;
    text-align: left;
    margin-top: 20px;
    flex-grow: 1;
}

.team-qualifications li {
    padding: 5px 0 5px 20px;
    position: relative;
}

/* ===================================
   NEWS
   =================================== */
.news-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
    gap: 30px;
    margin-top: 50px;
}

.news-card {
    background: var(--weiss);
    border-radius: 16px;
    overflow: hidden;
    box-shadow: 0 4px 20px rgba(0,0,0,0.08);
    transition: all 0.3s;
    text-decoration: none;
    color: inherit;
    display: block;
}

.news-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 12px 40px rgba(0,61,130,0.15);
}

.news-content { padding: 25px; }

.news-date {
    color: var(--primary);
    font-weight: 600;
    font-size: 0.9rem;
    margin-bottom: 10px;
}

.news-card h3 { margin-bottom: 15px; font-size: 1.3rem; }

.news-card p {
    color: var(--grau);
    margin-bottom: 20px;
    line-height: 1.6;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.news-link {
    color: var(--primary);
    font-weight: 600;
    text-decoration: none;
}

.news-link:hover { color: var(--primary-dark); }

/* ===================================
   TOOLS GRID
   =================================== */
.tools-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(500px, 1fr));
    gap: 30px;
    margin-top: 50px;
}

.tool-card {
    background: #E8F4F8;
    padding: 30px;
    border-radius: 16px;
    box-shadow: 0 4px 20px rgba(0,0,0,0.08);
    transition: all 0.3s;
    display: flex;
    flex-direction: column;
}

.tool-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 12px 40px rgba(0,61,130,0.15);
}

.tool-header {
    display: flex;
    align-items: center;
    gap: 20px;
    margin-bottom: 20px;
}

.tool-logo {
    width: 120px;
    height: 60px;
    background: white;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 10px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.08);
    flex-shrink: 0;
}

.tool-logo img { max-width: 100%; max-height: 100%; object-fit: contain; }
.tool-card .btn { margin-top: auto; }

/* ===================================
   KONTAKT
   =================================== */
.kontakt-card {
    background: var(--weiss);
    padding: 30px;
    border-radius: 16px;
    box-shadow: 0 4px 20px rgba(0,0,0,0.08);
    transition: all 0.3s;
}

.kontakt-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 12px 40px rgba(0,61,130,0.15);
}

.kontakt-icon {
    width: 50px;
    height: 50px;
    background: linear-gradient(135deg, var(--primary), var(--primary-dark));
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
}

/* ===================================
   FOOTER
   =================================== */
footer {
    background: var(--primary);
    color: var(--weiss);
    padding: 40px 0 20px;
}

.footer-content {
    display: grid;
    grid-template-columns: 2fr 1fr;
    gap: 30px;
    margin-bottom: 20px;
}

.footer-section h3 {
    font-size: 1.1rem;
    margin-bottom: 10px;
    color: var(--weiss);
}

.footer-section p {
    font-size: 0.9rem;
    margin-bottom: 10px;
    line-height: 1.5;
}

.footer-links { list-style: none; }
.footer-links li { margin-bottom: 8px; }

.footer-links a {
    color: rgba(255,255,255,0.8);
    text-decoration: none;
    font-size: 0.9rem;
    transition: color 0.3s;
}

.footer-links a:hover { color: var(--weiss); }

.footer-bottom {
    text-align: center;
    padding-top: 15px;
    border-top: 1px solid rgba(255,255,255,0.2);
    font-size: 0.85rem;
    color: rgba(255,255,255,0.7);
}

/* ===================================
   MOBILE MENU
   =================================== */
.mobile-menu-overlay {
    position: fixed;
    top: 0; left: 0;
    width: 100%; height: 100%;
    background: rgba(0,0,0,0.5);
    z-index: 1999;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s;
}

.mobile-menu-overlay.active {
    opacity: 1;
    visibility: visible;
}

.mobile-menu {
    position: fixed;
    top: 0;
    right: -100%;
    width: 85%;
    max-width: 400px;
    height: 100vh;
    background: var(--weiss);
    z-index: 2000;
    transition: right 0.3s;
    overflow-y: auto;
    box-shadow: -5px 0 20px rgba(0,0,0,0.1);
}

.mobile-menu.active { right: 0; }

.mobile-menu-header {
    padding: 20px;
    border-bottom: 1px solid var(--hellgrau);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.mobile-menu-close {
    background: none;
    border: none;
    font-size: 2rem;
    cursor: pointer;
    color: var(--primary);
}

.mobile-menu-items { padding: 20px 0; }

.mobile-menu-items a {
    display: block;
    padding: 15px 20px;
    color: var(--primary);
    text-decoration: none;
    font-weight: 600;
    border-bottom: 1px solid var(--hellgrau);
}

.mobile-menu-items a:hover { background: var(--hellgrau); }
.mobile-menu-items a.active { color: var(--accent); }

.mobile-submenu {
    background: var(--hellgrau);
    padding-left: 20px;
}

.mobile-submenu a {
    padding: 12px 20px;
    font-weight: 400;
    font-size: 0.95rem;
}

.mobile-submenu a.active { color: var(--accent); }

/* ===================================
   COOKIE BANNER
   =================================== */
.cookie-banner {
    position: fixed;
    bottom: 0; left: 0; right: 0;
    background: rgba(0,0,0,0.95);
    color: white;
    padding: 30px 20px;
    z-index: 10000;
    display: none;
    box-shadow: 0 -4px 20px rgba(0,0,0,0.3);
}

.cookie-banner.show { display: block; }
.cookie-banner-content { max-width: 1200px; margin: 0 auto; }

.cookie-buttons {
    display: flex;
    gap: 15px;
    margin-top: 20px;
    flex-wrap: wrap;
}

.cookie-btn {
    padding: 12px 25px;
    border: none;
    border-radius: 8px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s;
    font-size: 0.95rem;
}

.cookie-btn-accept { background: var(--primary); color: white; border: 2px solid var(--primary); }
.cookie-btn-accept:hover { background: var(--primary-dark); border-color: var(--primary-dark); }
.cookie-btn-decline { background: transparent; color: white; border: 2px solid white; }
.cookie-btn-decline:hover { background: rgba(255,255,255,0.15); }

.cookie-btn-settings {
    background: white;
    color: var(--primary);
    border: 2px solid var(--primary);
}

.cookie-btn-settings:hover { background: var(--primary); color: white; }

.cookie-settings-modal {
    position: fixed;
    top: 0; left: 0;
    width: 100%; height: 100vh;
    background: rgba(0,0,0,0.7);
    z-index: 10001;
    display: none;
    align-items: center;
    justify-content: center;
    padding: 20px;
}

.cookie-settings-modal.show { display: flex; }

.cookie-settings-content {
    background: white;
    border-radius: 12px;
    padding: 40px;
    max-width: 700px;
    max-height: 90vh;
    overflow-y: auto;
    box-shadow: 0 10px 40px rgba(0,0,0,0.2);
}

.cookie-category {
    margin-bottom: 20px;
    padding: 20px;
    background: var(--hellgrau);
    border-radius: 12px;
}

.cookie-category-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 10px;
}

.cookie-category h4 { color: var(--primary); margin: 0; }

.cookie-toggle {
    position: relative;
    width: 60px;
    height: 30px;
}

.cookie-toggle input { opacity: 0; width: 0; height: 0; }

.cookie-toggle-slider {
    position: absolute;
    cursor: pointer;
    top: 0; left: 0; right: 0; bottom: 0;
    background-color: #ccc;
    transition: .4s;
    border-radius: 30px;
}

.cookie-toggle-slider:before {
    position: absolute;
    content: "";
    height: 22px; width: 22px;
    left: 4px; bottom: 4px;
    background-color: white;
    transition: .4s;
    border-radius: 50%;
}

.cookie-toggle input:checked + .cookie-toggle-slider { background-color: var(--primary); }
.cookie-toggle input:checked + .cookie-toggle-slider:before { transform: translateX(30px); }
.cookie-toggle input:disabled + .cookie-toggle-slider { opacity: 0.5; cursor: not-allowed; }

.cookie-category p { color: var(--grau); margin: 0; font-size: 0.95rem; }

.cookie-settings-buttons {
    display: flex;
    gap: 15px;
    margin-top: 30px;
}

details { margin-top: 10px; }

details summary {
    cursor: pointer;
    user-select: none;
    transition: color 0.2s;
}

details summary:hover { color: var(--primary-dark) !important; }
details[open] summary { margin-bottom: 10px; }

/* ===================================
   RESPONSIVE
   =================================== */
@media (max-width: 768px) {
    .nav-links { display: none; }
    .mobile-menu-toggle { display: block; }

    section { padding: 50px 0; }
    .hero { padding: 60px 0 50px; }

    .cta-buttons { flex-direction: column; }
    .btn { width: 100%; text-align: center; }

    .content-grid,
    .process-steps,
    .tools-grid { grid-template-columns: 1fr; gap: 20px; }

    .footer-content { grid-template-columns: 1fr; gap: 20px; }

    .sticky-cta-container {
        bottom: 10px;
        left: 10px;
        right: 10px;
        flex-direction: row;
        gap: 8px;
    }

    .sticky-cta-container .btn {
        font-size: 0.85rem;
        padding: 10px 8px;
        min-width: 0;
        flex: 1;
        text-align: center;
    }

    /* Mobile: nur mobile-only sichtbar */
    .sticky-mobile-only { display: inline-block; }
    .sticky-desktop-only { display: none; }

    .cookie-buttons { flex-direction: column; }
    .cookie-btn { width: 100%; }
}
