/* --- Globale Stile & Variablen --- */
@import url('https://fonts.googleapis.com/css2?family=Lato:wght@400;700&family=Roboto:wght@400;700&display=swap');

:root {
    --primary-blue: #4A90E2;
    --accent-green: #50E3C2;
    --light-gray: #F4F4F4;
    --dark-gray: #333;
    --white: #FFFFFF;
}

body {
    font-family: 'Roboto', sans-serif;
    margin: 0;
    color: var(--dark-gray);
    line-height: 1.6;
    background-color: var(--white);
}

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

h1, h2, h3 {
    font-family: 'Lato', sans-serif;
    color: var(--primary-blue);
    font-weight: 700;
}

a {
    color: var(--primary-blue);
    text-decoration: none;
    transition: color 0.3s ease;
}

a:hover {
    color: var(--accent-green);
}

.button {
    display: inline-block;
    background-color: var(--accent-green);
    color: var(--white);
    padding: 12px 25px;
    border-radius: 5px;
    font-weight: bold;
    text-decoration: none;
    transition: background-color 0.3s ease;
}

.button:hover {
    background-color: #3abfa2;
    color: var(--white);
}

/* --- Header & Navigation --- */
.main-header {
    background: var(--white);
    box-shadow: 0 2px 5px rgba(0,0,0,0.1);
    padding: 8px 0;
    position: sticky;
    top: 0;
    z-index: 1000;
    transition: padding 0.3s ease, max-height 0.3s ease;
}

.main-header.scrolled {
    padding: 3px 0;
}

.main-header .container {
    display: flex;
    flex-direction: row;
    justify-content: space-between;
    align-items: center;
    gap: 10px;
}

.logo {
    font-size: 1.8em;
    font-weight: bold;
    color: var(--primary-blue);
    display: flex;
    flex-direction: row;
    align-items: center;
    gap: 10px;
}

.logo-img {
    height: 80px;
    width: auto;
    margin-right: 0;
    vertical-align: middle;
    transform: translateY(-2px);
    transition: height 0.3s ease;
}

.main-header.scrolled .logo-img {
    height: 60px;
    transform: translateY(-1px);
}

.main-nav ul {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
}

.main-nav li {
    margin-left: 25px;
}

.main-nav a {
    font-weight: bold;
    padding-bottom: 5px;
}

.main-nav a.active {
    color: var(--accent-green);
    border-bottom: 2px solid var(--accent-green);
}

/* --- Hero Sektion (Startseite) mit Slider --- */
.hero {
    position: relative;
    height: 85vh;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    text-align: center;
    color: var(--white);
    padding: 0;
    overflow: hidden;
}

.slider-container {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 1;
}

.slider {
    position: relative;
    width: 100%;
    height: 100%;
}

.slide {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    opacity: 0;
    transition: opacity 1s ease-in-out;
}

.slide.active {
    opacity: 1;
}

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

.slider-controls {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    width: 100%;
    display: none;
    justify-content: space-between;
    padding: 0 20px;
    z-index: 3;
}

.prev-btn, .next-btn {
    background: rgba(0, 0, 0, 0.5);
    color: var(--white);
    border: none;
    padding: 15px 20px;
    font-size: 20px;
    cursor: pointer;
    border-radius: 5px;
    transition: background 0.3s ease;
}

.prev-btn:hover, .next-btn:hover {
    background: rgba(0, 0, 0, 0.8);
}

.slider-dots {
    position: absolute;
    bottom: 8%;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    gap: 10px;
    z-index: 3;
}

.dot {
    width: 15px;
    height: 15px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.5);
    cursor: pointer;
    transition: background 0.3s ease;
}

.dot.active {
    background: var(--accent-green);
}

.dot:hover {
    background: rgba(255, 255, 255, 0.8);
}

.hero-content {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    z-index: 2;
    background: rgba(0, 0, 0, 0.6);
    padding: 15px 120px;
    border-radius: 15px;
    backdrop-filter: blur(8px);
    text-align: center;
    min-width: 700px;
    max-width: 85%;
}

.hero h1 {
    font-size: 2.2em;
    color: var(--white);
    text-shadow: 2px 2px 4px rgba(0,0,0,0.7);
    margin-bottom: 10px;
}

/* --- Allgemeine Sektionen --- */
.section {
    padding: 60px 0;
}

.section-light {
    background-color: var(--light-gray);
}

.section h2 {
    text-align: center;
    font-size: 2.5em;
    margin-bottom: 40px;
}

.intro-text {
    text-align: center;
    max-width: 800px;
    margin: 0 auto 40px auto;
    font-size: 1.1em;
}

/* --- Spezifische Module --- */
/* Info Box (Startseite) */
.info-box {
    background: var(--primary-blue);
    color: var(--white);
    text-align: center;
    padding: 30px;
    border-radius: 8px;
    display: flex;
    justify-content: space-around;
    flex-wrap: wrap;
}
.info-box h3 { color: var(--white); }
.info-box p { font-size: 1.2em; margin: 5px 15px; }
.info-box a { color: var(--white); }
.info-box a:hover { color: var(--accent-green); }

/* Leistungs-Kacheln (Startseite) */
.services-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 30px;
}
.service-card {
    background: var(--white);
    padding: 30px;
    text-align: center;
    border-radius: 8px;
    box-shadow: 0 4px 10px rgba(0,0,0,0.08);
    transition: transform 0.3s ease;
}
.service-card:hover { transform: translateY(-5px); }

/* Team Seite */
.team-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 30px;
}
.team-card {
    background: var(--light-gray);
    border-radius: 8px;
    text-align: center;
    padding: 30px;
}
.team-card img {
    width: 150px;
    height: 150px;
    border-radius: 50%;
    object-fit: cover;
    object-position: right top;
    transform: scale(1.5);
    border: 4px solid var(--accent-green);
    margin-bottom: 20px;
    overflow: hidden;
}

/* Spezielle Regel für das MFA-Foto - andere Position */
.team-card img[src="mfa.png"] {
    object-position: center center;
    transform: scale(1.5);
}

/* Spezielle Regel für das Arzt-Foto - näher herangezoomt */
.team-card img[src="hausarzt_bild.png"] {
    object-position: 60% 40%;
    transform: scale(1.5);
}

.team-card .role { font-weight: bold; }

/* Leistungsseite */
.leistungen-liste .leistung-item {
    background: var(--light-gray);
    margin-bottom: 15px;
    padding: 20px;
    border-radius: 5px;
    border-left: 5px solid var(--primary-blue);
}

/* Kontakt & Sprechzeiten */
.kontakt-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 50px;
    align-items: flex-start;
}

.kontakt-section {
    display: flex;
    flex-direction: column;
}

.kontakt-section h3 {
    margin-top: 0;
    margin-bottom: 25px;
    font-size: 1.5em;
}

/* Responsive Tabelle */
.table-responsive {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
}

.sprechzeiten-tabelle {
    width: 100%;
    border-collapse: collapse;
    background: var(--white);
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 2px 8px rgba(0,0,0,0.08);
}

.sprechzeiten-tabelle thead {
    background: var(--primary-blue);
    color: var(--white);
}

.sprechzeiten-tabelle th {
    padding: 15px;
    text-align: left;
    font-weight: 700;
}

.sprechzeiten-tabelle td {
    padding: 15px;
    border-bottom: 1px solid #f0f0f0;
}

.sprechzeiten-tabelle tbody tr:last-child td {
    border-bottom: none;
}

.sprechzeiten-tabelle tbody tr:hover {
    background-color: var(--light-gray);
    transition: background-color 0.2s ease;
}

.note {
    margin-top: 20px;
    padding: 15px;
    background: #e8f4f8;
    border-left: 4px solid var(--accent-green);
    border-radius: 4px;
    font-size: 1.05em;
}

.map-title {
    margin-top: 40px;
    margin-bottom: 20px;
}

/* Responsive Map Container */
.map-wrapper {
    position: relative;
    padding-bottom: 66.66%;
    height: 0;
    overflow: hidden;
    border-radius: 8px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.1);
}

.map-iframe {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    border: none;
    border-radius: 8px;
}

/* Contact Info Cards */
.contact-info-card {
    display: flex;
    flex-direction: column;
    gap: 25px;
}

.info-item {
    padding: 20px;
    background: var(--light-gray);
    border-radius: 8px;
    border-left: 4px solid var(--accent-green);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.info-item:hover {
    transform: translateY(-3px);
    box-shadow: 0 4px 12px rgba(0,0,0,0.1);
}

.info-item h4 {
    color: var(--primary-blue);
    margin-top: 0;
    margin-bottom: 10px;
    font-size: 1.1em;
}

.info-item p {
    margin: 0;
    line-height: 1.6;
}

.info-item a {
    color: var(--primary-blue);
    font-weight: 600;
}

.info-item a:hover {
    color: var(--accent-green);
}

.contact-form .form-group { margin-bottom: 20px; }
.contact-form input, .contact-form textarea {
    width: 100%;
    padding: 12px;
    border: 1px solid #ccc;
    border-radius: 5px;
    box-sizing: border-box;
}

/* --- Footer --- */
.main-footer {
    background: var(--dark-gray);
    color: var(--white);
    padding: 40px 20px;
    text-align: center;
}
.footer-links a {
    color: var(--white);
    margin: 0 10px;
}

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

/* Telefon-Links im Footer */
.main-footer a[href^="tel:"] {
    color: var(--white);
}

.main-footer a[href^="tel:"]:hover {
    color: var(--accent-green);
}

/* --- Responsive Design --- */

/* Tablet Landscape (bis 1024px) */
@media (max-width: 1024px) {
    .container {
        max-width: 95%;
        padding: 15px;
    }
    
    .hero-content {
        min-width: 80%;
        padding: 15px 60px;
    }
    
    .logo-img {
        height: 70px;
    }
    
    .services-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 20px;
    }
    
    .kontakt-grid {
        gap: 35px;
    }
}

/* Tablet Portrait (bis 768px) */
@media (max-width: 768px) {
    .main-header .container { 
        flex-direction: column;
        padding: 15px;
        gap: 10px;
    }
    
    .main-nav ul { 
        margin-top: 0; 
        justify-content: center;
        flex-wrap: wrap;
    }
    
    .main-nav li { 
        margin: 5px 15px; 
    }
    
    .logo-img {
        height: 60px;
        margin-right: 15px;
    }
    
    .hero {
        height: 70vh;
    }
    
    .hero-content {
        min-width: 90%;
        max-width: 95%;
        padding: 20px 40px;
    }
    
    .hero h1 { 
        font-size: 1.8em; 
        margin-bottom: 15px;
    }
    
    .services-grid, .kontakt-grid { 
        grid-template-columns: 1fr; 
        gap: 30px;
    }
    
    .team-grid {
        grid-template-columns: 1fr;
    }
    
    .info-box {
        flex-direction: column;
        gap: 20px;
    }
    
    .slider-controls {
        padding: 0 10px;
        display: none;
    }
    
    .prev-btn, .next-btn {
        padding: 10px 15px;
        font-size: 16px;
    }
    
    .sprechzeiten-tabelle th,
    .sprechzeiten-tabelle td {
        padding: 12px 8px;
        font-size: 0.95em;
    }
    
    .kontakt-section h3 {
        font-size: 1.3em;
    }
    
    .info-item {
        padding: 15px;
    }
}

/* Mobile (bis 480px) */
@media (max-width: 480px) {
    .container {
        padding: 10px;
    }
    
    .main-header {
        padding: 8px 0;
    }
    
    .logo {
        font-size: 1.4em;
        flex-direction: row;
        text-align: left;
        gap: 8px;
    }
    
    .logo-img {
        height: 60px;
        margin: 0;
        transform: none;
    }
    
    .main-nav ul {
        margin-top: 10px;
    }
    
    .main-nav li {
        margin: 5px 8px;
    }
    
    .main-nav a {
        font-size: 0.9em;
    }
    
    .hero {
        height: 60vh;
    }
    
    .hero-content {
        min-width: 95%;
        padding: 15px 20px;
        border-radius: 10px;
    }
    
    .hero h1 {
        font-size: 1.5em;
        margin-bottom: 10px;
        line-height: 1.3;
    }
    
    .button {
        padding: 10px 20px;
        font-size: 0.9em;
    }
    
    .section {
        padding: 40px 0;
    }
    
    .section h2 {
        font-size: 2em;
        margin-bottom: 25px;
    }
    
    .intro-text {
        font-size: 1em;
        margin-bottom: 25px;
    }
    
    .info-box {
        padding: 20px;
    }
    
    .info-box h3 {
        font-size: 1.1em;
    }
    
    .info-box p {
        font-size: 1em;
        margin: 5px 0;
    }
    
    .service-card, .team-card {
        padding: 20px;
    }
    
    .team-card img {
        width: 120px;
        height: 120px;
    }
    
    .slider-controls {
        display: none; /* Verstecke Pfeile auf sehr kleinen Bildschirmen */
    }
    
    .slider-dots {
        bottom: 5%;
    }
    
    .dot {
        width: 12px;
        height: 12px;
    }
    
    .main-footer {
        padding: 30px 15px;
        font-size: 0.9em;
    }
    
    .footer-links {
        margin-top: 15px;
    }
    
    .footer-links a {
        margin: 0 8px;
        display: inline-block;
        margin-bottom: 5px;
    }
    
    /* Mobile optimiert für Kontakt */
    .kontakt-grid {
        gap: 20px;
    }
    
    .kontakt-section h3 {
        font-size: 1.2em;
        margin-bottom: 20px;
    }
    
    .table-responsive {
        border-radius: 8px;
        overflow: hidden;
    }
    
    .sprechzeiten-tabelle {
        font-size: 0.9em;
    }
    
    .sprechzeiten-tabelle th,
    .sprechzeiten-tabelle td {
        padding: 10px 8px;
    }
    
    .sprechzeiten-tabelle th {
        font-size: 0.85em;
    }
    
    .note {
        padding: 12px;
        font-size: 0.95em;
        margin-top: 15px;
    }
    
    .map-title {
        margin-top: 30px;
        margin-bottom: 15px;
    }
    
    .map-wrapper {
        padding-bottom: 62.5%;
    }
    
    .info-item {
        padding: 15px;
        gap: 10px;
    }
    
    .info-item h4 {
        font-size: 1em;
        margin-bottom: 8px;
    }
    
    .info-item p {
        font-size: 0.95em;
    }
}

/* Sehr kleine Mobile Geräte (bis 320px) */
@media (max-width: 320px) {
    .hero h1 {
        font-size: 1.3em;
    }
    
    .hero-content {
        padding: 12px 15px;
    }
    
    .section h2 {
        font-size: 1.7em;
    }
    
    .main-nav li {
        margin: 3px 5px;
    }
    
    .main-nav a {
        font-size: 0.8em;
    }
    
    .sprechzeiten-tabelle th,
    .sprechzeiten-tabelle td {
        padding: 8px 5px;
        font-size: 0.8em;
    }
    
    .note {
        font-size: 0.9em;
        padding: 10px;
    }
    
    .info-item {
        padding: 12px;
    }
    
    .info-item h4 {
        font-size: 0.95em;
    }
}