/* orvosiugyelet.hu — stíluslap */

:root {
    --primary: #c0392b;           /* piros — sürgősségi jelleg */
    --primary-dark: #922b20;
    --navy: #16213e;
    --dark: #0f1729;
    --accent: #27ae60;             /* zöld = nyitva */
    --warn: #f39c12;
    --text: #222;
    --muted: #666;
    --border: #e4e6eb;
    --bg: #f7f8fa;
    --card: #ffffff;
    --emergency: #c0392b;
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
    margin: 0;
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    font-size: 16px;
    line-height: 1.55;
    color: var(--text);
    background: var(--bg);
}
a { color: var(--primary); text-decoration: none; }
a:hover { text-decoration: underline; }
img { max-width: 100%; height: auto; }

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

/* === TOPBAR / EMERGENCY === */
.emergency-bar {
    background: var(--emergency);
    color: white;
    text-align: center;
    padding: 10px 16px;
    font-weight: 600;
    font-size: 15px;
}
.emergency-bar a { color: white; text-decoration: underline; }
.emergency-bar strong { font-size: 18px; }

/* === NAVBAR === */
.navbar {
    background: white;
    border-bottom: 1px solid var(--border);
    position: sticky; top: 0; z-index: 100;
}
.navbar-inner {
    display: flex; align-items: center; justify-content: space-between;
    padding: 14px 16px; max-width: 1200px; margin: 0 auto;
}
.logo { font-size: 22px; font-weight: 700; color: var(--navy); display: flex; align-items: center; gap: 8px; }
.logo:hover { text-decoration: none; color: var(--navy); }
.logo-icon { width: 34px; height: 34px; flex-shrink: 0; }
.navbar-nav { display: flex; gap: 20px; list-style: none; margin: 0; padding: 0; }
.navbar-nav a { color: var(--text); font-weight: 500; }
.navbar-nav a:hover { color: var(--primary); text-decoration: none; }

/* === HAMBURGER === */
.nav-toggle {
    display: none; background: none; border: none; cursor: pointer;
    width: 40px; height: 40px; padding: 8px; flex-direction: column;
    justify-content: space-between; align-items: stretch;
}
.nav-toggle span {
    display: block; height: 3px; background: var(--navy); border-radius: 2px;
    transition: transform 0.25s, opacity 0.25s;
}
.nav-toggle.open span:nth-child(1) { transform: translateY(9px) rotate(45deg); }
.nav-toggle.open span:nth-child(2) { opacity: 0; }
.nav-toggle.open span:nth-child(3) { transform: translateY(-9px) rotate(-45deg); }

/* === HERO === */
.hero {
    background: linear-gradient(135deg, #16213e 0%, #2d4263 100%);
    color: white;
    padding: 60px 16px 50px;
    text-align: center;
}
.hero h1 { font-size: 38px; margin: 0 0 12px; font-weight: 700; }
.hero p.lead { font-size: 19px; opacity: 0.92; margin: 0 0 32px; }

.search-box {
    background: white;
    border-radius: 12px;
    padding: 18px;
    max-width: 760px;
    margin: 0 auto;
    box-shadow: 0 10px 30px rgba(0,0,0,0.2);
    display: flex; flex-direction: column; gap: 10px;
}
.search-main { display: flex; gap: 10px; align-items: stretch; }
.search-main .ac-wrap { flex: 1; min-width: 0; }
.search-main .ac-wrap input { width: 100%; }
.search-filters { display: flex; gap: 10px; flex-wrap: wrap; }
.search-filters select { flex: 1; min-width: 160px; }
.search-box input, .search-box select {
    padding: 12px 14px;
    border: 1px solid var(--border);
    border-radius: 8px;
    font-size: 15px;
    font-family: inherit;
}
.search-box button {
    background: var(--primary); color: white; border: none; padding: 12px 28px;
    border-radius: 8px; font-size: 15px; font-weight: 600; cursor: pointer;
    white-space: nowrap;
}
.search-box button:hover { background: var(--primary-dark); }

/* === STATS === */
.stats-row {
    display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px;
    margin: 40px auto; max-width: 900px;
}
.stat-card {
    background: var(--card); border-radius: 12px; padding: 24px;
    text-align: center; box-shadow: 0 2px 8px rgba(0,0,0,0.04);
}
.stat-number { font-size: 36px; font-weight: 700; color: var(--primary); }
.stat-label { color: var(--muted); font-size: 14px; margin-top: 4px; }

/* === SECTIONS === */
section.block { padding: 40px 0; }
h2.section-title { font-size: 28px; margin: 0 0 24px; color: var(--navy); }
h2.section-title small { display: block; font-size: 15px; color: var(--muted); font-weight: 400; margin-top: 4px; }

/* === COUNTY GRID === */
.county-grid {
    display: grid; grid-template-columns: repeat(auto-fill, minmax(250px, 1fr)); gap: 12px;
}
.county-card {
    background: var(--card); border: 1px solid var(--border); border-radius: 10px;
    padding: 16px; display: flex; justify-content: space-between; align-items: center;
    transition: all 0.15s;
}
.county-card:hover { border-color: var(--primary); box-shadow: 0 4px 12px rgba(192,57,43,0.1); text-decoration: none; }
.county-card strong { color: var(--navy); }
.county-count { background: var(--primary); color: white; font-size: 13px; padding: 3px 10px; border-radius: 12px; font-weight: 600; }

/* === RESULT CARDS === */
.results-grid {
    display: grid; grid-template-columns: repeat(auto-fill, minmax(320px, 1fr)); gap: 16px;
}
.result-card {
    background: var(--card); border: 1px solid var(--border); border-radius: 10px;
    padding: 18px; display: flex; flex-direction: column; gap: 8px;
}
.result-card h3 { margin: 0; font-size: 17px; color: var(--navy); }
.result-card .addr { color: var(--muted); font-size: 14px; }
.result-card .hours { font-size: 13px; color: var(--text); }
.result-card .badges { display: flex; gap: 6px; flex-wrap: wrap; margin-top: 4px; }
.badge {
    display: inline-block; padding: 3px 10px; font-size: 12px; font-weight: 600;
    border-radius: 12px; background: #f0f0f0; color: var(--text);
}
.badge-felnott { background: #e3f2fd; color: #1565c0; }
.badge-gyermek { background: #fff3e0; color: #e65100; }
.badge-vegyes  { background: #f3e5f5; color: #6a1b9a; }
.badge-open    { background: #e8f5e9; color: #2e7d32; }
.badge-closed  { background: #ffebee; color: #c62828; }
.btn-details {
    align-self: flex-start; margin-top: auto; background: var(--navy); color: white;
    padding: 8px 16px; border-radius: 6px; font-size: 14px; font-weight: 500;
}
.btn-details:hover { background: var(--dark); text-decoration: none; }

/* === DETAIL PAGE === */
.breadcrumb { color: var(--muted); font-size: 14px; padding: 14px 0; }
.breadcrumb a { color: var(--muted); }
.breadcrumb a:hover { color: var(--primary); }

.detail-header {
    background: var(--card); border-radius: 12px; padding: 24px; margin-bottom: 20px;
    border-left: 5px solid var(--primary);
}
.detail-header h1 { margin: 0 0 8px; font-size: 28px; color: var(--navy); }
.detail-header .addr { color: var(--muted); font-size: 16px; }
.detail-actions { display: flex; gap: 10px; margin-top: 14px; flex-wrap: wrap; }
.btn { display: inline-flex; align-items: center; gap: 6px; padding: 9px 16px;
    border-radius: 6px; font-size: 14px; font-weight: 500; cursor: pointer; border: none; }
.btn-primary { background: var(--primary); color: white; }
.btn-primary:hover { background: var(--primary-dark); text-decoration: none; color: white; }
.btn-secondary { background: var(--navy); color: white; }
.btn-secondary:hover { background: var(--dark); text-decoration: none; color: white; }

.info-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(250px, 1fr)); gap: 16px; }
.info-block { background: var(--card); border-radius: 10px; padding: 20px; }
.info-block h3 { margin: 0 0 12px; font-size: 16px; color: var(--navy); }
.info-block .info-icon {
    width: 44px; height: 44px; border-radius: 50%; background: var(--primary);
    display: flex; align-items: center; justify-content: center; margin-bottom: 12px;
}
.info-block .info-icon svg { width: 22px; height: 22px; color: white; }
.info-block dl { margin: 0; display: grid; grid-template-columns: auto 1fr; gap: 6px 14px; font-size: 14px; }
.info-block dt { color: var(--muted); }

/* === FOOTER === */
footer {
    background: var(--dark); color: #c0c4cc; padding: 40px 16px 20px; margin-top: 60px;
}
footer .container { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 30px; }
footer h4 { color: white; margin: 0 0 10px; }
footer a { color: #c0c4cc; }
footer a:hover { color: white; }
footer ul { list-style: none; padding: 0; margin: 0; }
footer li { padding: 3px 0; }
.footer-bottom {
    text-align: center; border-top: 1px solid #2a3550; margin-top: 30px; padding-top: 16px;
    font-size: 13px; color: #8a93a5;
}
.footer-bottom a { color: #c0c4cc; text-decoration: underline; }
.footer-bottom a:hover { color: white; }

/* === RESPONSIVE === */
@media (max-width: 768px) {
    .hero h1 { font-size: 28px; }
    .hero p.lead { font-size: 16px; }
    .stats-row { grid-template-columns: 1fr; }
    .search-filters { flex-direction: column; }
    .search-filters select { min-width: 0; }
    .logo { font-size: 17px; gap: 6px; }
    .logo-icon { width: 28px; height: 28px; }

    .nav-toggle { display: flex; }
    .navbar-nav {
        display: none;
        position: absolute; top: 100%; left: 0; right: 0;
        flex-direction: column; gap: 0;
        background: white; border-top: 1px solid var(--border);
        box-shadow: 0 6px 20px rgba(0,0,0,0.08);
        padding: 8px 0;
    }
    .navbar-nav.open { display: flex; }
    .navbar-nav li { border-bottom: 1px solid var(--border); }
    .navbar-nav li:last-child { border-bottom: none; }
    .navbar-nav a { display: block; padding: 14px 20px; font-size: 15px; }
}

/* === AUTOCOMPLETE === */
.ac-wrap { position: relative; flex: 1; min-width: 220px; }
.ac-list {
    position: absolute; top: 100%; left: 0; right: 0; background: white;
    border: 1px solid var(--border); border-top: none; border-radius: 0 0 8px 8px;
    max-height: 380px; overflow-y: auto; z-index: 50; display: none;
    box-shadow: 0 8px 20px rgba(0,0,0,0.1);
}
.ac-item {
    padding: 10px 14px; cursor: pointer; border-bottom: 1px solid var(--border);
    display: flex; justify-content: space-between; align-items: center; gap: 10px;
}
.ac-item:last-child { border-bottom: none; }
.ac-item:hover, .ac-item.active { background: #f5f5f5; }
.ac-item small { color: var(--muted); font-size: 12px; }
.ac-heading { padding: 8px 14px; background: #f0f0f0; font-weight: 600; font-size: 12px; color: var(--muted); text-transform: uppercase; }

/* === PAGINATION === */
.pagination { display: flex; gap: 6px; flex-wrap: wrap; justify-content: center; margin: 30px 0; }
.page-link {
    display: inline-block; padding: 8px 14px; border: 1px solid var(--border);
    border-radius: 6px; color: var(--text); background: var(--card); font-weight: 500;
}
.page-link:hover { border-color: var(--primary); color: var(--primary); text-decoration: none; }
.page-link.active { background: var(--primary); color: white; border-color: var(--primary); }

/* === DETAILS / FAQ === */
details.info-block summary { list-style: none; }
details.info-block summary::-webkit-details-marker { display: none; }
details.info-block summary::before { content: '▸ '; color: var(--primary); margin-right: 6px; transition: transform 0.2s; }
details[open].info-block summary::before { content: '▾ '; }
