/*
* Hausärzte Aubing - Main Stylesheet
* Author: Based on original site
* Description: Modern responsive design with accessibility optimizations
*/

/* Base Variables */
:root {
    /* Rose/Purple Color Scheme */
    --color-primary: #b83d7e;
    --color-primary-light: #f8e8f2;
    --color-primary-dark: #92316a;
    --color-primary-hover: #c8509a;

    /* Gray Color Scheme (based on logo gray) */
    --color-gray: #8c93a1;
    --color-gray-light: #f5f5f5;
    --color-gray-medium: #d1d5db;
    --color-gray-dark: #4a4a4a;

    /* UI Colors */
    --color-white: #ffffff;
    --color-black: #1a1a1a;
    --color-focus: #2563eb;
    --color-link: #92316a;
    /* Dunkleres Rosa für besseren Kontrast */
    --color-link-hover: #c8509a;

    /* Shadows & Effects */
    --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.05);
    --shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    --shadow-md: 0 4px 6px rgba(0, 0, 0, 0.1);
    --transition: 0.3s ease;
    --radius: 4px;

    /* Typography */
    --font-family: 'Open Sans', -apple-system, BlinkMacSystemFont, sans-serif;
    --font-size-base: 16px;
    --line-height: 1.6;

    /* Layout */
    --container-width: 1400px;
    /* Erhöht von 1200px */
    --container-padding: 1rem;
    --gap: 2rem;
    --section-spacing: 4rem;
}

/* Reset & Base Styles */
*,
*::before,
*::after {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
    scroll-padding-top: 150px;
    /* Erhöht von 100px für bessere Navigation */
}

body {
    font-family: var(--font-family);
    font-size: var(--font-size-base);
    line-height: var(--line-height);
    color: var(--color-black);
    background-color: var(--color-white);
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

img {
    max-width: 100%;
    height: auto;
    display: block;
}

/* Accessibility */
.skip-link {
    position: absolute;
    top: -40px;
    left: 0;
    background: var(--color-primary);
    color: var(--color-white);
    padding: 8px;
    z-index: 100;
    transition: top 0.3s;
}

.skip-link:focus {
    top: 0;
    outline: 2px solid var(--color-focus);
}

/* Focus styles */
a:focus,
button:focus,
input:focus,
select:focus,
textarea:focus {
    outline: 2px solid var(--color-focus);
    outline-offset: 2px;
}

/* Typography */
h1,
h2,
h3,
h4,
h5,
h6 {
    font-weight: 600;
    line-height: 1.2;
    margin-bottom: 1rem;
    color: var(--color-gray-dark);
}

h1 {
    font-size: 2rem;
}

h2 {
    font-size: 1.75rem;
}

h3 {
    font-size: 1.5rem;
}

h4 {
    font-size: 1.25rem;
}

h5 {
    font-size: 1.125rem;
}

h6 {
    font-size: 1rem;
}

p {
    margin-bottom: 1rem;
}

a {
    color: var(--color-link);
    text-decoration: underline;
    /* Unterstreichung für bessere Erkennbarkeit */
    transition: color var(--transition);
}

a:hover {
    color: var(--color-link-hover);
}

ul,
ol {
    list-style-position: inside;
    margin-bottom: 1rem;
}

/* Layout */
.container {
    width: 100%;
    max-width: var(--container-width);
    margin: 0 auto;
    padding: 0 var(--container-padding);
}

main {
    flex: 1;
    padding: 3rem 0;
}

.page-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: var(--gap);
}

/* Section/Page Display */
.page {
    display: none;
    opacity: 0;
    transition: opacity 0.3s ease;
    animation: fadeIn 0.5s ease forwards;
    position: relative;
}

.page.active {
    display: block;
    opacity: 1;
}

.page-title {
    margin-bottom: 1.5rem;
    color: var(--color-primary-dark);
    font-size: 2rem;
    border-bottom: 2px solid var(--color-primary);
    padding-bottom: 0.5rem;
}

/* Header */
.site-header {
    background-color: var(--color-white);
    box-shadow: var(--shadow);
    position: sticky;
    top: 0;
    z-index: 100;
    width: 100%;
}

.top-bar {
    background-color: #8c93a1;
    /* Grau aus dem Logo statt --color-primary */
    padding: 0.5rem 0;
}

.contact-info {
    display: flex;
    flex-direction: column;
}

.contact-info a {
    color: white;
    /* Weiß statt Schwarz für besseren Kontrast auf grauem Hintergrund */
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.9rem;
}

.contact-info a:hover {
    color: var(--color-primary-light);
}

.icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.main-header {
    padding: 1rem 0;
}

.main-header .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo {
    flex-shrink: 0;
}

.logo-link {
    display: block;
}

.logo img {
    max-height: 70px;
    width: auto;
}

/* Navigation Styles */
.main-nav {
    position: relative;
}

#menu-toggle {
    display: none;
    flex-direction: column;
    justify-content: space-between;
    width: 30px;
    height: 21px;
    background: transparent;
    border: none;
    cursor: pointer;
    padding: 0;
    z-index: 10;
}

.bar {
    width: 100%;
    height: 3px;
    background-color: var(--color-gray-dark);
    border-radius: 3px;
    transition: all 0.3s ease-in-out;
}

.nav-links {
    display: flex;
    list-style: none;
    gap: 2rem;
    margin: 0;
    padding: 0;
}

.nav-links a {
    color: var(--color-gray-dark);
    font-weight: 600;
    padding: 0.5rem 0;
    position: relative;
    text-decoration: none;
    /* Keine Unterstreichung für Nav-Links */
}

.nav-links a:hover,
.nav-links a.active {
    color: var(--color-primary-dark);
}

.nav-links a::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 0;
    height: 2px;
    background-color: var(--color-primary);
    transition: width 0.3s ease;
}

.nav-links a:hover::after,
.nav-links a.active::after {
    width: 100%;
}

/* Cards */
.card {
    background-color: var(--color-white);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    overflow: hidden;
}

.card-content {
    padding: 1.5rem;
}

.card-content p {
    margin-bottom: 1rem;
}

.card-content h2 {
    margin: 2rem 0 1rem;
    color: var(--color-primary-dark);
}

.card-content h2:first-child {
    margin-top: 0;
}

/* Quote Block */
.quote {
    background-color: var(--color-primary-light);
    border-left: 4px solid var(--color-primary);
    padding: 1.5rem;
    margin: 1.5rem 0;
}

.quote p {
    font-style: italic;
    margin-bottom: 0.5rem;
}

.quote footer {
    text-align: right;
    font-weight: bold;
}

/* Team Image Section */
.team-preview {
    margin: 2rem 0;
}

.team-image {
    width: 100%;
    border-radius: var(--radius);
    box-shadow: var(--shadow);
}

/* Services Section */
.service-section {
    margin-bottom: 2rem;
}

.service-list {
    list-style-position: inside;
    padding-left: 1rem;
}

.service-list li {
    margin-bottom: 0.5rem;
    position: relative;
    padding-left: 0.5rem;
}

/* Team Section - Tabs */
.tabs {
    margin-top: 2rem;
}

.tab-nav {
    display: flex;
    overflow-x: auto;
    scrollbar-width: thin;
    scrollbar-color: var(--color-primary) var(--color-gray-light);
    margin-bottom: 1rem;
}

.tab-nav::-webkit-scrollbar {
    height: 6px;
}

.tab-nav::-webkit-scrollbar-track {
    background: var(--color-gray-light);
}

.tab-nav::-webkit-scrollbar-thumb {
    background-color: var(--color-primary);
    border-radius: 6px;
}

.tab-btn {
    padding: 0.75rem 1.5rem;
    background: var(--color-gray-light);
    border: none;
    border-radius: var(--radius) var(--radius) 0 0;
    font-weight: 600;
    font-family: var(--font-family);
    cursor: pointer;
    flex-shrink: 0;
    transition: background-color var(--transition);
}

.tab-btn:hover {
    background-color: var(--color-primary-light);
}

.tab-btn.active {
    background-color: var(--color-primary);
    color: var(--color-white);
}

.tab-content {
    border: 1px solid var(--color-gray-medium);
    border-radius: 0 var(--radius) var(--radius) var(--radius);
    padding: 1rem;
}

.tab-pane {
    display: none;
}

.tab-pane.active {
    display: block;
    animation: fadeIn 0.5s;
}

.doctor-profile {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.doctor-image {
    width: 200px;
    height: 200px;
    object-fit: cover;
    border-radius: 50%;
    border: 3px solid var(--color-primary);
}

.doctor-info h3 {
    margin-bottom: 0.5rem;
    color: var(--color-gray-dark);
    /* Statt primary-dark für besseren Kontrast */
}

.doctor-title {
    font-weight: bold;
    margin-bottom: 0.5rem;
}

.doctor-details {
    margin-top: 1rem;
}

/* Hours Table */
.hours-table {
    margin: 2rem 0;
}

.hours {
    width: 100%;
    border-collapse: collapse;
}

.hours th,
.hours td {
    padding: 0.75rem;
    text-align: left;
    border-bottom: 1px solid var(--color-gray-medium);
}

.hours th {
    background-color: var(--color-primary);
    color: white;
    font-weight: 700;
}

.hours tr:nth-child(even) {
    background-color: var(--color-gray-light);
}

/* Contact Grid */
.contact-grid {
    display: grid;
    grid-template-columns: 1fr;
    /* Auf mobilen Geräten eine Spalte */
    gap: 2rem;
    margin-top: 1rem;
}

.contact-detail {
    display: flex;
    align-items: center;
    margin-bottom: 1rem;
    gap: 0.75rem;
}

.map-container {
    border-radius: var(--radius);
    overflow: hidden;
}

.map {
    height: 300px;
    border-radius: var(--radius);
    overflow: hidden;
}

.map iframe {
    border: none;
    width: 100%;
    height: 100%;
}

.map-description {
    margin-top: 1rem;
    font-size: 0.9rem;
    color: var(--color-gray-dark);
}

/* Impressum Grid */
.impressum-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 2rem;
    margin-bottom: 2rem;
}

.impressum-section h3 {
    margin: 1.5rem 0 0.5rem;
    color: var(--color-primary-dark);
}

.disclaimer h2 {
    margin-bottom: 1rem;
}

/* Footer */
.site-footer {
    margin-top: auto;
    background-color: white;
    /* Statt var(--color-gray-dark) */
    color: var(--color-gray-dark);
    /* Textfarbe anpassen für besseren Kontrast */
}

.footer-main {
    padding: 3rem 0;
}

.footer-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 2rem;
}

.footer-logo {
    margin-bottom: 1rem;
}

.footer-logo img {
    max-width: 150px;
    filter: brightness(1.1);
}

.footer-info address {
    font-style: normal;
    margin-bottom: 1rem;
    line-height: 1.6;
}

.footer-hours h3 {
    margin-bottom: 0.75rem;
    color: var(--color-gray-dark);
    /* Dunkleres Grau statt helles Gelb */
}

.footer-hours p {
    margin-bottom: 0.5rem;
    font-size: 0.9rem;
}

/* Image Slider */
.image-slider-container {
    overflow: hidden;
}

.image-slider-container h3 {
    margin-bottom: 0.75rem;
    color: var(--color-gray-dark);
    /* Dunkleres Grau statt helles Gelb */
}

.image-slider {
    display: flex;
    gap: 0.5rem;
    overflow-x: auto;
    scrollbar-width: none;
    -ms-overflow-style: none;
    scroll-behavior: smooth;
    padding-bottom: 0.5rem;
}

.image-slider::-webkit-scrollbar {
    display: none;
}

.slider-image {
    flex: 0 0 auto;
    width: 150px;
    height: 100px;
    border-radius: var(--radius);
    object-fit: cover;
}

.footer-nav {
    background-color: var(--color-primary);
    padding: 1.5rem 0;
}

.footer-nav ul {
    display: flex;
    flex-wrap: wrap;
    list-style: none;
    justify-content: center;
    gap: 1.5rem;
}

.footer-nav a {
    color: white;
    font-size: 0.9rem;
    transition: color var(--transition);
    text-decoration: none;
    /* Keine Unterstreichung für Nav-Links */
}

.footer-nav a:hover {
    color: var(--color-primary-light);
}

/* Back to Top Button */
#back-to-top {
    position: fixed;
    bottom: 2rem;
    right: 2rem;
    background-color: var(--color-primary);
    color: var(--color-white);
    width: 50px;
    height: 50px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: var(--shadow-md);
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
    z-index: 99;
}

#back-to-top.visible {
    opacity: 1;
    visibility: visible;
}

#back-to-top:hover {
    background-color: var(--color-primary-hover);
    transform: translateY(-5px);
}

/* Animations */
@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Staff Grid Styles */
.staff-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(120px, 1fr));
    gap: 2rem;
    margin-top: 2rem;
}

.staff-member {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
}

.staff-image-container {
    width: 100px;
    height: 100px;
    border-radius: 50%;
    overflow: hidden;
    border: 3px solid var(--color-primary);
    margin-bottom: 0.75rem;
}

.staff-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.staff-name {
    font-size: 1rem;
    margin: 0;
    color: var(--color-gray-dark);
}

.mt-5 {
    margin-top: 2.5rem;
}

/* Responsive Styles */
@media (min-width: 768px) {
    .page-grid {
        grid-template-columns: 2fr 1fr;
    }

    .contact-grid,
    .impressum-grid,
    .footer-grid {
        grid-template-columns: 1fr 1fr;
    }

    .doctor-profile {
        flex-direction: row;
        align-items: flex-start;
    }
}

@media (min-width: 992px) {
    .footer-grid {
        grid-template-columns: 1fr 1fr 1fr;
    }
}

@media (max-width: 767px) {
    .page-title {
        font-size: 1.75rem;
    }

    html {
        scroll-padding-top: 180px;
        /* Noch mehr Padding für mobile Ansicht */
    }

    #menu-toggle {
        display: flex;
    }

    .nav-links {
        position: absolute;
        flex-direction: column;
        background-color: var(--color-white);
        top: 100%;
        right: 0;
        width: 200px;
        padding: 1rem;
        gap: 1rem;
        box-shadow: var(--shadow);
        border-radius: 0 0 var(--radius) var(--radius);
        transform: translateY(-150%);
        opacity: 0;
        visibility: hidden;
        transition: all 0.3s ease;
    }

    .nav-links.active {
        transform: translateY(0);
        opacity: 1;
        visibility: visible;
    }

    .tab-nav {
        flex-wrap: nowrap;
        overflow-x: auto;
        display: flex;
        flex-direction: column;
        gap: 0.5rem;
    }

    .tab-btn {
        width: 100%;
        text-align: left;
    }

    /* Verbessert die Anzeige von Tabellen auf mobilen Geräten */
    .hours {
        display: block;
        overflow-x: auto;
        white-space: nowrap;
    }
}

/* Grauen Balken entfernen */
.top-bar {
    display: none;
    /* Versteckt den grauen Balken komplett */
}

/* Feste Kontakt-Buttons am linken Bildschirmrand */
.fixed-contact-buttons {
    position: fixed;
    left: 20px;
    top: 50%;
    transform: translateY(-50%);
    display: flex;
    flex-direction: column;
    gap: 10px;
    z-index: 999;
}

.fixed-contact-button {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 50px;
    height: 50px;
    background-color: var(--color-primary);
    color: var(--color-white);
    border-radius: 50%;
    box-shadow: var(--shadow-md);
    transition: all 0.3s ease;
    cursor: pointer;
    border: none;
}

.fixed-contact-button:hover {
    background-color: var(--color-primary-hover);
    transform: scale(1.1);
}

.fixed-contact-button .icon {
    font-size: 20px;
}

/* Für bessere mobile Darstellung */
@media (max-width: 767px) {
    .fixed-contact-buttons {
        left: auto;
        /* Links-Position entfernen */
        right: 20px;
        /* Rechts-Position hinzufügen */
    }

    .fixed-contact-button {
        width: 40px;
        height: 40px;
    }
}

/* Mitgliedschaftsbereich im Footer */
.membership-container {
    overflow: hidden;
}

.membership-container h3 {
    margin-bottom: 0.75rem;
    color: var(--color-gray-dark);
}

.membership-logos {
    display: flex;
    flex-wrap: wrap;
    gap: 1rem;
    align-items: center;
}

.membership-logos a {
    display: inline-block;
    transition: transform 0.3s ease;
}

.membership-logos a:hover {
    transform: scale(1.05);
}

.membership-logos img {
    max-height: 50px;
    width: auto;
    object-fit: contain;
}

/* Responsive Anpassung */
@media (max-width: 767px) {
    .membership-logos {
        justify-content: center;
    }
}

/* Speziell für E-Mail-Links im Kontaktbereich */
#kontakt .contact-info .contact-detail a[href^="mailto:"] {
    color: #0066cc; /* Kräftiges Blau für besseren Kontrast */
    font-weight: bold; /* Fett für bessere Sichtbarkeit */
    text-decoration: underline; /* Unterstreichung für deutlichere Erkennbarkeit als Link */
}

#kontakt .contact-info .contact-detail a[href^="mailto:"]:hover {
    color: #0033aa; /* Dunkleres Blau beim Hover */
}

/* Styling für statische Karte und Navigationslinks */
.static-map {
    position: relative;
    border-radius: var(--radius);
    overflow: hidden;
    margin-bottom: 1rem;
}

.map-image {
    width: 100%;
    height: auto;
    display: block;
    border-radius: var(--radius);
}

.map-attribution {
    position: absolute;
    bottom: 5px;
    right: 5px;
    font-size: 0.7rem;
    background-color: rgba(255, 255, 255, 0.7);
    padding: 2px 5px;
    border-radius: 3px;
}

/* Styling für den intelligenten Navigationsbutton */
.nav-button {
    display: inline-block;
    padding: 10px 20px;
    background-color: var(--color-primary);
    color: var(--color-white);
    border-radius: var(--radius);
    text-decoration: none;
    font-weight: bold;
    font-size: 1rem;
    transition: all 0.3s ease;
    text-align: center;
    box-shadow: var(--shadow);
    margin-top: 10px;
}

.nav-button:hover {
    background-color: var(--color-primary-dark);
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
}

.nav-button .icon {
    margin-right: 8px;
}

/* Responsive Anpassung */
@media (max-width: 767px) {
    .nav-button {
        width: 100%;
        padding: 12px 20px;
    }
}

/* Styling für den angepassten Kartenbereich */
.map-section {
    width: 100%;
}

/* Überschrift mit Navigationsicon */
.map-header {
    display: flex;
    align-items: center;
    margin-bottom: 1rem;
}

.map-header h2 {
    margin-bottom: 0;
    margin-right: 10px;
}

/* Kleines Navigationsicon */
.map-nav-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    background-color: var(--color-primary);
    color: var(--color-white);
    border-radius: 50%;
    font-size: 1rem;
    transition: all 0.3s ease;
    text-decoration: none;
}

.map-nav-icon:hover {
    background-color: var(--color-primary-dark);
    transform: scale(1.1);
}

/* Kartenbild-Container */
.static-map {
    position: relative;
    border-radius: var(--radius);
    overflow: hidden;
    margin-bottom: 1rem;
}

.map-image {
    width: 100%;
    height: auto;
    display: block;
    border-radius: var(--radius);
}

/* Quellenangabe direkt unter dem Bild */
.map-attribution {
    position: absolute;
    bottom: 5px;
    right: 5px;
    font-size: 0.7rem;
    background-color: rgba(255, 255, 255, 0.7);
    padding: 2px 5px;
    border-radius: 3px;
}

/* Beschreibungstext */
.map-description {
    font-size: 0.9rem;
    color: var(--color-gray-dark);
}