/* =========================================================
   Site Dr. Dinu Constantin - Urologie Targu Jiu
   Tema: bej / teracota cu accent teal medical
   Layout: doua coloane, responsive intre 480px si 1000px
   ========================================================= */

/* ---------- Variabile CSS ---------- */
:root {
    --bg:          #fbf6f0;
    --bg-card:    #ffffff;
    --bg-alt:     #f3e9dc;
    --text:       #3a2e26;
    --text-soft:  #6b574a;
    --accent:     #c97b5d;       /* teracota */
    --accent-dk:  #a85f44;
    --teal:       #2a8a8a;       /* teal medical */
    --teal-dk:    #1f6e6e;
    --teal-soft:  #d6ecec;
    --line:       #e6d8c5;
    --shadow:     0 4px 18px rgba(75, 50, 30, .08);
    --radius:     12px;
    --maxw:       1000px;
    --minw:       480px;
    --nav-h:      72px;
    --font-body:  'Open Sans', -apple-system, BlinkMacSystemFont, Segoe UI, Roboto, sans-serif;
    --font-head:  'Lora', Georgia, serif;
}

/* ---------- Reset minimal ---------- */
*,
*::before,
*::after { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
    margin: 0;
    min-width: var(--minw);
    background: var(--bg);
    color: var(--text);
    font-family: var(--font-body);
    font-size: 16px;
    line-height: 1.65;
    padding-top: var(--nav-h);
}

h1, h2, h3, h4 {
    font-family: var(--font-head);
    color: var(--text);
    line-height: 1.25;
    margin: 0 0 .6em;
    font-weight: 600;
}

h1 { font-size: 2rem; }
h2 { font-size: 1.55rem; color: var(--teal-dk); }
h3 { font-size: 1.2rem; }

p { margin: 0 0 1em; }

a {
    color: var(--teal-dk);
    text-decoration: none;
    transition: color .2s;
}
a:hover, a:focus { color: var(--accent-dk); text-decoration: underline; }

img { max-width: 100%; height: auto; display: block; }

/* Skip link pentru accesibilitate */
.skip-link {
    position: absolute;
    left: -9999px;
    top: 0;
    background: var(--teal-dk);
    color: #fff;
    padding: .6em 1em;
    z-index: 9999;
}
.skip-link:focus { left: 0; }

/* ---------- Bara de navigare fixa ---------- */
.site-header {
    position: fixed;
    inset: 0 0 auto 0;
    background: rgba(255, 255, 255, .96);
    backdrop-filter: blur(6px);
    border-bottom: 3px solid var(--teal);
    height: var(--nav-h);
    z-index: 1000;
    box-shadow: var(--shadow);
}

.header-inner {
    max-width: var(--maxw);
    min-width: var(--minw);
    margin: 0 auto;
    height: 100%;
    padding: 0 1.25rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
}

.brand {
    display: flex;
    align-items: center;
    gap: .7rem;
    color: var(--text);
    text-decoration: none;
}
.brand:hover { text-decoration: none; }
.brand-text strong {
    display: block;
    font-family: var(--font-head);
    font-size: 1.05rem;
    color: var(--teal-dk);
}
.brand-text small {
    display: block;
    font-size: .78rem;
    color: var(--text-soft);
    letter-spacing: .04em;
}

.primary-nav ul {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    align-items: center;
    gap: .15rem;
}
.primary-nav a {
    display: inline-block;
    padding: .55em 1em;
    color: var(--text);
    font-weight: 500;
    border-radius: 6px;
    transition: background .2s, color .2s;
}
.primary-nav a:hover,
.primary-nav a:focus,
.primary-nav a.is-active {
    background: var(--teal-soft);
    color: var(--teal-dk);
    text-decoration: none;
}
.primary-nav a.is-active {
    color: var(--accent-dk);
    box-shadow: inset 0 -3px 0 var(--accent);
}

.nav-social a {
    color: var(--teal);
    padding: .35em;
    display: inline-flex;
    align-items: center;
    border-radius: 50%;
}
.nav-social a:hover { color: var(--accent); background: var(--teal-soft); }

/* Hamburger toggle */
.nav-toggle {
    display: none;
    background: none;
    border: 0;
    width: 40px;
    height: 40px;
    cursor: pointer;
    padding: 8px;
    flex-direction: column;
    justify-content: space-between;
}
.nav-toggle span {
    display: block;
    height: 3px;
    background: var(--teal-dk);
    border-radius: 2px;
    transition: transform .25s;
}

/* ---------- Container & layout doua coloane ---------- */
.container {
    max-width: var(--maxw);
    min-width: var(--minw);
    margin: 0 auto;
    padding: 2rem 1.25rem 3rem;
}

.layout-two-col {
    display: grid;
    grid-template-columns: 1.7fr 1fr;
    gap: 2rem;
    align-items: start;
}

.col-main > section,
.col-aside > section {
    background: var(--bg-card);
    border: 1px solid var(--line);
    border-radius: var(--radius);
    padding: 1.5rem;
    margin-bottom: 1.5rem;
    box-shadow: var(--shadow);
}

.col-aside > section { padding: 1.25rem; }
.col-aside h2 { font-size: 1.2rem; }

/* ---------- Hero / intro pagina principala ---------- */
.hero {
    background: linear-gradient(135deg, var(--teal-soft) 0%, var(--bg-alt) 100%);
    border: 1px solid var(--line);
    border-radius: var(--radius);
    padding: 2rem;
    margin-bottom: 2rem;
    display: grid;
    grid-template-columns: 1.4fr 1fr;
    gap: 1.5rem;
    align-items: center;
}
.hero h1 {
    color: var(--teal-dk);
    margin-bottom: .3em;
}
.hero .doctor-role {
    color: var(--accent-dk);
    font-weight: 600;
    margin-bottom: .8em;
}
.hero-img {
    border-radius: var(--radius);
    overflow: hidden;
    box-shadow: var(--shadow);
    aspect-ratio: 4 / 5;
    background: var(--bg-alt) url('/images/dr-dinu.jpg') center/cover no-repeat;
    min-height: 220px;
}

/* ---------- Carduri ---------- */
.card-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 1rem;
    margin: 1rem 0;
}
.card {
    background: var(--bg-card);
    border: 1px solid var(--line);
    border-left: 4px solid var(--accent);
    border-radius: var(--radius);
    padding: 1.1rem 1.2rem;
    transition: transform .2s, box-shadow .2s;
}
.card:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow);
}
.card h3 {
    color: var(--teal-dk);
    margin-bottom: .4em;
    font-size: 1.05rem;
}
.card p {
    color: var(--text-soft);
    font-size: .94rem;
    margin: 0;
}

/* ---------- Lista de articole (index) ---------- */
.articles-list {
    list-style: none;
    padding: 0;
    margin: 0;
    display: grid;
    gap: 1rem;
}
.article-item {
    border: 1px solid var(--line);
    border-radius: var(--radius);
    padding: 1rem 1.2rem;
    background: var(--bg-alt);
    transition: background .2s;
}
.article-item:hover { background: var(--teal-soft); }
.article-item h3 {
    margin: 0 0 .3em;
    font-size: 1.05rem;
}
.article-item h3 a { color: var(--text); }
.article-meta {
    font-size: .82rem;
    color: var(--text-soft);
    margin-bottom: .4em;
}
.article-excerpt {
    font-size: .94rem;
    margin: 0;
    color: var(--text-soft);
}
.no-articles {
    color: var(--text-soft);
    font-style: italic;
    padding: 1rem;
    text-align: center;
    background: var(--bg-alt);
    border-radius: var(--radius);
}

/* ---------- Butoane ---------- */
.btn {
    display: inline-block;
    padding: .75em 1.6em;
    border-radius: 8px;
    border: 0;
    font-family: inherit;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    text-decoration: none;
    transition: background .2s, transform .15s, box-shadow .2s;
}
.btn-primary {
    background: var(--teal);
    color: #fff;
}
.btn-primary:hover, .btn-primary:focus {
    background: var(--teal-dk);
    color: #fff;
    text-decoration: none;
    transform: translateY(-1px);
    box-shadow: var(--shadow);
}
.btn-secondary {
    background: transparent;
    color: var(--teal-dk);
    border: 2px solid var(--teal);
}
.btn-secondary:hover {
    background: var(--teal-soft);
    text-decoration: none;
}
.btn-accent {
    background: var(--accent);
    color: #fff;
}
.btn-accent:hover { background: var(--accent-dk); color: #fff; text-decoration: none; }

.btn-row {
    display: flex;
    gap: .75rem;
    flex-wrap: wrap;
    margin-top: 1rem;
}

/* ---------- Formulare ---------- */
.form-group {
    margin-bottom: 1.1rem;
    display: flex;
    flex-direction: column;
    gap: .35rem;
}
.form-group label {
    font-weight: 600;
    color: var(--text);
    font-size: .95rem;
}
.form-group .required { color: var(--accent-dk); }
.form-group .hint {
    font-size: .82rem;
    color: var(--text-soft);
}
.form-control {
    font: inherit;
    padding: .65em .85em;
    border: 1.5px solid var(--line);
    border-radius: 8px;
    background: #fff;
    color: var(--text);
    width: 100%;
    transition: border-color .2s, box-shadow .2s;
}
.form-control:focus {
    outline: none;
    border-color: var(--teal);
    box-shadow: 0 0 0 3px var(--teal-soft);
}
textarea.form-control {
    min-height: 110px;
    resize: vertical;
}
.form-group.checkbox-group {
    flex-direction: row;
    align-items: flex-start;
    gap: .6rem;
}
.form-group.checkbox-group input { margin-top: .25em; flex-shrink: 0; }
.form-group.checkbox-group label {
    font-weight: 400;
    font-size: .92rem;
    color: var(--text-soft);
    line-height: 1.5;
}

/* Honeypot - ascuns vizual si pentru screen-readere */
.hp-field {
    position: absolute !important;
    left: -10000px !important;
    width: 1px !important;
    height: 1px !important;
    overflow: hidden !important;
}

.form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1rem;
}

.alert {
    padding: 1rem 1.2rem;
    border-radius: 8px;
    margin-bottom: 1.5rem;
    border-left: 4px solid;
}
.alert-success {
    background: #e7f5ec;
    border-color: #3aa86b;
    color: #1d5b3a;
}
.alert-error {
    background: #fbe9e1;
    border-color: var(--accent);
    color: var(--accent-dk);
}
.alert-info {
    background: var(--teal-soft);
    border-color: var(--teal);
    color: var(--teal-dk);
}

.errors-list {
    margin: .5em 0 0 1.2em;
    padding: 0;
}

/* ---------- Chestionar ---------- */
.questionnaire .question {
    background: var(--bg-card);
    border: 1px solid var(--line);
    border-radius: var(--radius);
    padding: 1rem 1.25rem;
    margin-bottom: 1rem;
}
.questionnaire .question legend {
    font-weight: 600;
    color: var(--teal-dk);
    padding: 0;
    margin-bottom: .6em;
}
.rating-scale {
    display: flex;
    gap: .35rem;
    flex-wrap: wrap;
}
.rating-scale label {
    flex: 1 1 0;
    min-width: 50px;
    text-align: center;
    padding: .5em .2em;
    border: 1.5px solid var(--line);
    border-radius: 8px;
    cursor: pointer;
    transition: background .2s, border-color .2s;
    font-size: .9rem;
    background: var(--bg);
}
.rating-scale input { position: absolute; opacity: 0; }
.rating-scale input:checked + span,
.rating-scale label:has(input:checked) {
    background: var(--teal);
    color: #fff;
    border-color: var(--teal-dk);
}
.rating-scale label:hover { background: var(--teal-soft); }

/* ---------- Tabel localizare ---------- */
.info-table {
    width: 100%;
    border-collapse: collapse;
    margin: 1rem 0;
}
.info-table th, .info-table td {
    text-align: left;
    padding: .65em .8em;
    border-bottom: 1px solid var(--line);
}
.info-table th {
    color: var(--teal-dk);
    width: 35%;
    font-weight: 600;
    background: var(--bg-alt);
}

.map-embed {
    border: 0;
    width: 100%;
    height: 360px;
    border-radius: var(--radius);
    box-shadow: var(--shadow);
}

/* ---------- Footer ---------- */
.site-footer {
    background: var(--text);
    color: #e8dccd;
    padding: 2.5rem 1.25rem 1.25rem;
    margin-top: 2rem;
}
.footer-inner {
    max-width: var(--maxw);
    min-width: calc(var(--minw) - 40px);
    margin: 0 auto;
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 2rem;
}
.site-footer h3 {
    color: #fff;
    margin-bottom: .8em;
    font-size: 1.05rem;
}
.site-footer a {
    color: #f2d9c4;
}
.site-footer a:hover { color: #fff; }
.footer-links {
    list-style: none;
    padding: 0;
    margin: 0;
}
.footer-links li { margin-bottom: .4em; }
.footer-bottom {
    max-width: var(--maxw);
    margin: 2rem auto 0;
    padding-top: 1.25rem;
    border-top: 1px solid #5a4a3d;
    font-size: .85rem;
    text-align: center;
    color: #d4c4b0;
}
.footer-disclaimer { font-style: italic; opacity: .85; }

/* ---------- Cookie banner ---------- */
.cookie-banner {
    position: fixed;
    inset: auto 0 0 0;
    background: var(--text);
    color: #f3e6d3;
    padding: 1rem 1.25rem;
    box-shadow: 0 -4px 18px rgba(0, 0, 0, .2);
    z-index: 1100;
}
.cookie-banner-inner {
    max-width: var(--maxw);
    margin: 0 auto;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1.25rem;
    flex-wrap: wrap;
}
.cookie-banner p { margin: 0; flex: 1 1 60%; font-size: .92rem; }
.cookie-banner a { color: #f9c8a8; text-decoration: underline; }
.cookie-actions { display: flex; gap: .5rem; }
.cookie-actions .btn { padding: .55em 1.1em; font-size: .9rem; }
.cookie-actions .btn-secondary { color: #f3e6d3; border-color: #f3e6d3; }
.cookie-actions .btn-secondary:hover { background: rgba(255, 255, 255, .12); }

/* ---------- Lead paragraf ---------- */
.lead {
    font-size: 1.1rem;
    color: var(--text-soft);
    margin-bottom: 1.5em;
}

/* Lista cu iconita */
.check-list {
    list-style: none;
    padding: 0;
    margin: 1em 0;
}
.check-list li {
    padding-left: 1.7em;
    position: relative;
    margin-bottom: .55em;
}
.check-list li::before {
    content: '';
    position: absolute;
    left: 0;
    top: .35em;
    width: 1.1em;
    height: 1.1em;
    background: var(--teal);
    border-radius: 50%;
    box-shadow: inset 0 0 0 4px var(--teal-soft);
}

/* ---------- Responsive: tablete ---------- */
@media (max-width: 860px) {
    .layout-two-col,
    .hero,
    .footer-inner,
    .form-row {
        grid-template-columns: 1fr;
    }
    .hero { text-align: center; }
    .hero-img { max-width: 280px; margin: 0 auto; }
}

/* ---------- Responsive: mobil (sub 720px) ---------- */
@media (max-width: 720px) {
    :root { --nav-h: auto; }

    body { padding-top: 0; }

    .site-header {
        position: sticky;
        top: 0;
        height: auto;
    }
    .header-inner {
        flex-wrap: wrap;
        padding: .8rem 1rem;
    }
    .nav-toggle {
        display: flex;
    }
    .primary-nav {
        flex-basis: 100%;
        max-height: 0;
        overflow: hidden;
        transition: max-height .3s;
    }
    .primary-nav.is-open {
        max-height: 500px;
        margin-top: .8rem;
        border-top: 1px solid var(--line);
        padding-top: .8rem;
    }
    .primary-nav ul {
        flex-direction: column;
        align-items: stretch;
        gap: .25rem;
    }
    .primary-nav a {
        display: block;
        padding: .7em 1em;
    }

    h1 { font-size: 1.55rem; }
    h2 { font-size: 1.3rem; }

    .container { padding: 1.5rem 1rem 2rem; }

    .cookie-banner-inner { flex-direction: column; align-items: stretch; text-align: center; }
}

/* ---------- Aplicare constrangeri media intre 480px si 1000px ---------- */
@media (min-width: 480px) and (max-width: 1000px) {
    body { /* respecta intervalul cerut */ }
}

@media (max-width: 480px) {
    /* sub rezolutia minima admisa, layout-ul ramane functional dar compact */
    .container, .header-inner, .footer-inner { padding-left: .75rem; padding-right: .75rem; }
}

/* ---------- Reduced motion ---------- */
@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after {
        animation-duration: .01ms !important;
        transition-duration: .01ms !important;
    }
    html { scroll-behavior: auto; }
}

/* ---------- Print ---------- */
@media print {
    .site-header, .cookie-banner, .nav-toggle, .btn { display: none !important; }
    body { padding-top: 0; }
    a { color: var(--text); text-decoration: underline; }
}
