/* ==========================================================================
   Ärztehaus Gossau – Main Stylesheet
   Replicates the GeneratePress-based live site at aerztehaus-gossau.ch
   Colors sourced directly from live site inline CSS and GeneratePress theme.
   ========================================================================== */

/* --------------------------------------------------------------------------
   1. Reset & Base
   -------------------------------------------------------------------------- */
*, *::before, *::after { box-sizing: border-box; }

blockquote, body, dd, dl, dt, fieldset, figure, h1, h2, h3, h4, h5, h6,
hr, html, iframe, legend, li, ol, p, pre, textarea, ul {
    margin: 0; padding: 0; border: 0;
}

html {
    font-size: 17px;
    -webkit-text-size-adjust: 100%;
    -webkit-font-smoothing: antialiased;
}

body {
    font-family: -apple-system, system-ui, BlinkMacSystemFont, "Segoe UI",
                 Helvetica, Arial, sans-serif, "Apple Color Emoji";
    font-weight: 400;
    line-height: 1.5;
    color: #000000;
    background-color: #efefef;
}

p { margin-bottom: 1.5em; }

ul  { list-style: disc;    margin: 0 0 1.5em 3em; }
ol  { list-style: decimal; margin: 0 0 1.5em 3em; }
li > ul, li > ol { margin-bottom: 0; margin-left: 1.5em; }

h1, h2, h3, h4, h5, h6 {
    font-family: -apple-system, system-ui, BlinkMacSystemFont, "Segoe UI",
                 Helvetica, Arial, sans-serif;
    font-weight: 300;
    line-height: 1.2em;
    text-transform: none;
}

h1 { font-size: 40px; margin-bottom: 20px; }
h2 { font-size: 30px; margin-bottom: 20px; }
h3 { font-size: 20px; margin-bottom: 20px; }
h4, h5, h6 { font-size: inherit; margin-bottom: 20px; }

a { color: #000000; text-decoration: none; transition: color .1s ease-in-out; }
a:hover, a:focus, a:active { color: #6d6d6d; }

img { height: auto; max-width: 100%; display: block; }
strong { font-weight: 700; }

.sr-only {
    position: absolute; width: 1px; height: 1px; padding: 0;
    margin: -1px; overflow: hidden; clip: rect(0,0,0,0);
    white-space: nowrap; border-width: 0;
}

/* --------------------------------------------------------------------------
   2. Layout Container
   -------------------------------------------------------------------------- */
.grid-container {
    max-width: 1110px;
    margin-left: auto;
    margin-right: auto;
    padding-left: 40px;
    padding-right: 40px;
}

.site-content {
    padding-top: 20px;
    padding-bottom: 20px;
}

/* --------------------------------------------------------------------------
   3. Site Header
   -------------------------------------------------------------------------- */
.site-header {
    background-color: #ffffff;
    color: #3a3a3a;
}

.site-header a { color: #3a3a3a; }

.inside-header {
    display: flex;
    align-items: center;
    padding: 40px;
    max-width: 1110px;
    margin: 0 auto;
}

.site-logo { display: inline-block; }

.site-logo img {
    width: 200px;
    height: auto;
    vertical-align: middle;
}

/* --------------------------------------------------------------------------
   4. Navigation
   -------------------------------------------------------------------------- */
.main-navigation {
    background-color: #595959;
    position: relative;
    z-index: 100;
    clear: both;
    display: block;
}

.inside-navigation {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    position: relative;
    max-width: 1110px;
    margin: 0 auto;
    padding: 0 40px;
}

.main-nav {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    list-style: none;
    margin: 0;
    padding: 0;
}

.main-nav li { position: relative; }

.main-nav > li > a {
    display: block;
    color: #ffffff;
    font-size: 15px;
    font-weight: 400;
    text-decoration: none;
    padding: 0 20px;
    line-height: 60px;
    transition: background-color .1s ease-in-out, color .1s ease-in-out;
}

.main-nav > li:hover > a,
.main-nav > li:focus-within > a,
.main-nav > li.current > a {
    background-color: #424242;
    color: #ffffff;
}

/* Sub-menus */
.main-nav ul {
    display: none;
    position: absolute;
    left: 0;
    top: 100%;
    background-color: #424242;
    width: 240px;
    list-style: none;
    margin: 0;
    padding: 0;
    box-shadow: 1px 1px 0 rgba(0,0,0,.1);
    z-index: 99999;
}

.main-nav li:hover > ul,
.main-nav li:focus-within > ul {
    display: block;
}

.main-nav ul li a {
    display: block;
    color: #ffffff;
    font-size: 14px;
    padding: 10px 20px;
    line-height: normal;
    transition: color .1s ease-in-out, background-color .1s ease-in-out;
    white-space: nowrap;
}

.main-nav ul li:hover > a,
.main-nav ul li:focus > a,
.main-nav ul li.current > a {
    color: #dbdbdb;
    background-color: #3a3a3a;
}

/* Mobile toggle */
.menu-toggle {
    display: none;
    background: transparent;
    border: 0;
    color: #ffffff;
    font-size: 15px;
    font-weight: 400;
    cursor: pointer;
    padding: 0 20px;
    line-height: 60px;
}

/* --------------------------------------------------------------------------
   5. Article / Content Box
   -------------------------------------------------------------------------- */
.inside-article {
    background-color: #ffffff;
    padding: 40px;
    margin-bottom: 20px;
}

.entry-title {
    font-size: 40px;
    font-weight: 300;
    color: #000000;
    margin-bottom: 0;
}

.entry-header { margin-bottom: 2em; }

.entry-content > *:last-child { margin-bottom: 0; }

.entry-content img {
    max-width: 100%;
    height: auto;
    margin-bottom: 1.5em;
}

/* --------------------------------------------------------------------------
   6. Doctor / Team Gallery (3 columns, caption overlay)
   -------------------------------------------------------------------------- */
.doctor-gallery {
    display: flex;
    flex-wrap: wrap;
    margin: 0 -4px;
}

.doctor-gallery-item {
    width: 33.333%;
    padding: 4px;
    position: relative;
}

.doctor-gallery-item a {
    display: block;
    position: relative;
    line-height: 0;
}

.doctor-gallery-item img {
    width: 100%;
    height: auto;
    display: block;
    transition: opacity .2s ease;
}

.doctor-gallery-item a:hover img { opacity: .9; }

.doctor-caption {
    position: absolute;
    bottom: 4px;
    left: 4px;
    right: 4px;
    background: rgba(0,0,0,.55);
    color: #ffffff;
    font-size: 14px;
    font-weight: 700;
    padding: 8px 12px;
    line-height: 1.3;
}

/* --------------------------------------------------------------------------
   7. MPA Gallery (4 columns, caption below image)
   -------------------------------------------------------------------------- */
.mpa-gallery {
    display: flex;
    flex-wrap: wrap;
    margin: 0 -4px;
}

.mpa-gallery-item {
    width: 25%;
    padding: 4px;
}

.mpa-gallery-item img {
    width: 100%;
    height: auto;
    display: block;
}

.mpa-caption {
    padding: 8px 6px 4px;
    font-size: 14px;
    font-weight: 700;
    line-height: 1.3;
    color: #000;
    background: #fff;
}

.mpa-caption small {
    display: block;
    font-weight: 400;
    font-size: 12px;
    color: #666;
}

/* --------------------------------------------------------------------------
   8. Praxisrundgang Gallery (3 columns, caption below)
   -------------------------------------------------------------------------- */
.praxis-gallery {
    display: flex;
    flex-wrap: wrap;
    margin: 0 -4px;
}

.praxis-gallery-item {
    width: 33.333%;
    padding: 4px;
    cursor: pointer;
}

.praxis-gallery-item img {
    width: 100%;
    height: auto;
    display: block;
    transition: opacity .2s ease;
}

.praxis-gallery-item:hover img { opacity: .85; }

.praxis-gallery-caption {
    padding: 6px 4px;
    font-size: 13px;
    color: #666;
    text-align: center;
}

/* Lightbox */
.lightbox {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,.9);
    z-index: 2000;
    align-items: center;
    justify-content: center;
    flex-direction: column;
}

.lightbox.is-open { display: flex; }

.lightbox__img {
    max-width: 90vw;
    max-height: 80vh;
    object-fit: contain;
}

.lightbox__caption {
    color: #ffffff;
    margin-top: 12px;
    font-size: 14px;
    opacity: .8;
}

.lightbox__close {
    position: absolute;
    top: 20px; right: 20px;
    background: none; border: none;
    color: #ffffff; font-size: 2rem;
    cursor: pointer; opacity: .75;
    line-height: 1; padding: 4px;
}

.lightbox__close:hover { opacity: 1; }

.lightbox__nav {
    position: absolute;
    top: 50%; transform: translateY(-50%);
    background: rgba(255,255,255,.1);
    border: none; color: #ffffff;
    font-size: 2rem; cursor: pointer;
    padding: 12px; line-height: 1;
}

.lightbox__nav:hover { background: rgba(255,255,255,.2); }
.lightbox__nav--prev { left: 20px; }
.lightbox__nav--next { right: 20px; }

/* --------------------------------------------------------------------------
   9. Opening Hours
   -------------------------------------------------------------------------- */
.hours-table {
    width: 100%;
    border-collapse: collapse;
    margin-bottom: 1.5em;
    font-size: 17px;
}

.hours-table td {
    padding: 6px 12px 6px 0;
    border-bottom: 1px solid #e0e0e0;
    vertical-align: top;
}

.hours-table td:first-child { font-weight: 700; width: 55%; }
.hours-table tr:last-child td { border-bottom: none; }

/* --------------------------------------------------------------------------
   10. Site Footer
   -------------------------------------------------------------------------- */
.site-info {
    background-color: #222222;
    color: #ffffff;
    font-size: 15px;
}

.site-info a { color: #ffffff; }
.site-info a:hover { color: #606060; }

.inside-site-info {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px 40px;
    text-align: center;
    flex-wrap: wrap;
    gap: 16px;
}

/* --------------------------------------------------------------------------
   11. Informationen & Partners
   -------------------------------------------------------------------------- */
.partner-grid {
    display: flex;
    flex-wrap: wrap;
    gap: 20px;
    margin-top: 1em;
    margin-bottom: 1.5em;
}

.partner-card {
    border: 1px solid #ddd;
    padding: 20px;
    background: #fff;
    display: flex;
    align-items: center;
    gap: 16px;
    text-decoration: none;
    color: inherit;
    transition: border-color .15s;
}

.partner-card:hover { border-color: #595959; color: inherit; }
.partner-card img { max-height: 60px; width: auto; }

.ext-links { list-style: none; margin: 0; padding: 0; }
.ext-links li { border-bottom: 1px solid #e0e0e0; }
.ext-links li:last-child { border-bottom: none; }
.ext-links a { display: block; padding: 10px 0; font-size: 17px; color: #000; }
.ext-links a:hover { color: #6d6d6d; }
.ext-links a::after { content: " \2192"; font-size: 12px; opacity: .6; }

/* --------------------------------------------------------------------------
   12. Kontakt
   -------------------------------------------------------------------------- */
.contact-table {
    width: 100%;
    border-collapse: collapse;
    margin-bottom: 1.5em;
}

.contact-table td {
    padding: 8px 12px 8px 0;
    border-bottom: 1px solid #e0e0e0;
    vertical-align: top;
    font-size: 17px;
}

.contact-table td:first-child { font-weight: 700; width: 45%; }
.contact-table tr:last-child td { border-bottom: none; }

/* --------------------------------------------------------------------------
   13. Responsive
   -------------------------------------------------------------------------- */
@media (max-width: 768px) {
    .inside-header { padding: 20px; }
    .menu-toggle { display: block; }

    .main-nav {
        display: none;
        flex-basis: 100%;
        flex-direction: column;
    }

    .main-nav.is-open { display: flex; }
    .main-nav > li { width: 100%; }

    .main-nav > li > a {
        line-height: 1;
        padding: 14px 20px;
        border-bottom: 1px solid rgba(255,255,255,.1);
    }

    .main-nav ul {
        position: static;
        width: 100%;
        box-shadow: none;
        background-color: #3a3a3a;
    }

    .main-nav li:hover > ul,
    .main-nav li:focus-within > ul { display: none; }

    .main-nav li.is-open > ul { display: block; }

    .inside-navigation { padding: 0 20px; }
    .grid-container { padding-left: 20px; padding-right: 20px; }
    .inside-article { padding: 30px; }

    .doctor-gallery-item { width: 50%; }
    .mpa-gallery-item    { width: 50%; }
    .praxis-gallery-item { width: 50%; }

    h1 { font-size: 30px; }
    h2 { font-size: 25px; }
}

@media (max-width: 480px) {
    .doctor-gallery-item { width: 100%; }
    .praxis-gallery-item { width: 100%; }
}

/* ── Doctor Profile (sub-pages) ── */
.doctor-profile {
    display: flex;
    gap: 40px;
    align-items: flex-start;
}

.doctor-profile-photo img {
    width: 220px;
    height: auto;
    display: block;
}

.doctor-profile-info {
    flex: 1;
}

.doctor-info-table {
    border-collapse: collapse;
    width: 100%;
}

.doctor-info-table th,
.doctor-info-table td {
    padding: 10px 16px;
    vertical-align: top;
    border-bottom: 1px solid #e0e0e0;
    font-size: 15px;
    text-align: left;
}

.doctor-info-table th {
    white-space: nowrap;
    font-weight: 600;
    color: #595959;
    width: 180px;
}

@media (max-width: 600px) {
    .doctor-profile { flex-direction: column; }
    .doctor-profile-photo img { width: 100%; }
    .doctor-info-table th { white-space: normal; width: auto; }
}
