/* ============================================================
   P.M.H. Design – Store Locator Styles
   Primárna: #006AA5  |  Sekundárna: #A32A27
   ============================================================ */

:root {
    --blue:       #006AA5;
    --blue-dk:    #00538a;
    --blue-lt:    #e8f3fa;
    --red:        #A32A27;
    --green:      #2e9e5b;
    --bg:         #f2f4f6;
    --white:      #ffffff;
    --text:       #1e2530;
    --muted:      #6c7585;
    --border:     #dde1e8;
    --radius:     10px;
    --radius-sm:  6px;
    --shadow-sm:  0 1px 6px rgba(0,0,0,0.07), 0 2px 12px rgba(0,0,0,0.05);
    --shadow-md:  0 4px 20px rgba(0,0,0,0.12);
    --transition: 0.25s ease;
    --brand-gradient: linear-gradient(90deg, #006AA5 0%, #006AA5 50%, #A32A27 100%);
    --content-width: 1280px;
}

*,*::before,*::after { box-sizing: border-box; margin: 0; padding: 0; }

body {
    font-family: 'Segoe UI', system-ui, Arial, sans-serif;
    font-size: 16px;
    color: var(--text);
    background: var(--bg);
    line-height: 1.6;
}

/* ============================================================
   HERO
   ============================================================ */
.hero {
    position: relative;
    width: 100%;
    height: clamp(200px, 34vw, 420px);
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* PHP programátor: nahraď background-color za background-image s fotkou */
.hero-img-placeholder {
    position: absolute;
    inset: 0;
    background-color: #0d1e30;
    /*
        background-image: url('/images/partneri-hero.jpg');
        background-size: cover;
        background-position: center;
    */
}

.hero-overlay {
    position: absolute;
    inset: 0;
    background: var(--brand-gradient);
    opacity: 0.85;
}

.hero-content {
    position: relative;
    z-index: 1;
    text-align: center;
    padding: 0 24px;
}

.hero-title {
    font-size: clamp(1.9rem, 5.5vw, 3.8rem);
    font-weight: 800;
    color: var(--white);
    letter-spacing: -1.5px;
    line-height: 1.1;
    text-shadow: 0 2px 24px rgba(0,0,0,0.28);
}

/* ============================================================
   SEARCH SECTION – priestor medzi Hero a mapou (80–100px)
   Obsahuje: input + tlačidlo geolokácie + stavový text
   ============================================================ */
.search-section {
    width: 100%;
    background: var(--bg);
    margin-top: 12px;
    padding: 0 24px;
}

.search-inner {
    max-width: var(--content-width);
    margin: 0 auto;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 15px;
    flex-wrap: wrap;
}

.search-left {
    display: flex;
    align-items: center;
}

/* ---- Wrapper pre input s ikonami ---- */
.search-input-wrap {
    position: relative;
    width: 400px;      /* rovnaká šírka ako tlačidlo */
    flex: 0 0 400px;   /* nepruží, fixných 400px */
    display: flex;
    align-items: center;
}

.search-icon {
    position: absolute;
    left: 13px;
    color: var(--muted);
    pointer-events: none;
    flex-shrink: 0;
}

.search-input {
    width: 100%;
    height: 52px;
    background: var(--white);
    border: 1.5px solid var(--border);
    border-radius: var(--radius);
    padding: 0 38px 0 40px;
    font-size: 0.95rem;
    font-family: inherit;
    color: var(--text);
    transition: border-color var(--transition), box-shadow var(--transition);
    box-shadow: var(--shadow-sm);
}

.search-input::placeholder { color: var(--muted); }

.search-input:focus {
    outline: none;
    border-color: var(--blue);
    box-shadow: 0 0 0 3px rgba(0,106,165,0.14);
}

/* Tlačidlo X pre vymazanie textu */
.btn-clear-search {
    position: absolute;
    right: 10px;
    background: none;
    border: none;
    cursor: pointer;
    color: var(--muted);
    padding: 4px;
    border-radius: 50%;
    display: none;           /* zobrazí sa cez JS keď je v inpute text */
    align-items: center;
    justify-content: center;
    transition: color var(--transition), background var(--transition);
}

.btn-clear-search:hover { color: var(--red); background: rgba(163,42,39,0.08); }
.btn-clear-search.visible { display: flex; }

/* ---- Tlačidlo geolokácie – vpravo v search bare ---- */
.btn-geo {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    height: 44px;
    background: var(--blue-lt);
    color: var(--blue);
    border: none;
    border-radius: var(--radius);
    padding: 0 20px;
    font-size: 0.88rem;
    font-weight: 700;
    font-family: inherit;
    white-space: nowrap;
    cursor: pointer;
    box-shadow: var(--shadow-sm);
    transition: background var(--transition), color var(--transition), transform var(--transition);
}

.btn-geo:hover {
    background: var(--blue);
    color: var(--white);
    transform: translateY(-2px);
}

.btn-geo:active { transform: translateY(0); }
.btn-geo svg    { flex-shrink: 0; }
.btn-geo.loading { opacity: 0.7; cursor: wait; pointer-events: none; }

/* ---- Stavový text geolokácie ---- */
.geo-status {
    max-width: var(--content-width);
    margin: 8px auto 0;
    padding: 0 4px;
    font-size: 0.875rem;
    color: var(--muted);
    min-height: 20px;
    font-weight: 500;
    text-align: center;
    transition: color var(--transition);
}

.geo-status.error     { color: var(--red); }
.geo-status.success   { color: var(--blue-dk); }
.geo-status.info-dark { color: #444444; }

/* ============================================================
   MAPA – rovnaká referenčná medzera 48px od search panelu
   ============================================================ */
.map-section {
    position: relative;
    width: 100%;
    margin-top: 12px;
    display: flex;
    flex-direction: column;
    height: calc(100vh - 270px);
    padding-bottom: 20px;
}

#map {
    width: 100%;
    flex: 1;
    display: block;
    background: #d8e6ef;
    min-height: 300px;
}



/* ============================================================
   STORE LIST SECTION – statický zoznam
   ============================================================ */
.store-list-section {
    width: 100%;
    max-width: var(--content-width);
    margin: 48px auto 0;
    padding: 0 24px 72px;
}

.sl-region {
    font-size: clamp(1.2rem, 2.5vw, 1.55rem);
    font-weight: 700;
    color: var(--blue-dk);
    margin: 40px 0 16px;
    padding-bottom: 10px;
    border-bottom: 3px solid var(--blue);
    text-transform: capitalize;
}

.sl-region:first-child { margin-top: 0; }

.sl-city {
    font-size: 1.05rem;
    font-weight: 700;
    color: var(--text);
    margin: 22px 0 10px 0;
    padding-left: 12px;
    border-left: 3px solid var(--red);
}

.sl-store {
    padding: 5px 0 5px 24px;
    border-bottom: 1px solid var(--border);
    font-size: 0.88rem;
    line-height: 1.5;
}

.sl-store:last-child { border-bottom: none; }

.sl-store-name {
    font-weight: 700;
    color: var(--text);
}

.sl-store-sep {
    color: var(--muted);
}

.sl-store-address {
    color: var(--muted);
}

.hidden { display: none !important; }

/* ============================================================
   InfoWindow – bublina na mape
   ============================================================ */
.iw-container {
    font-family: 'Segoe UI', system-ui, Arial, sans-serif;
    padding: 4px 8px 10px;
    max-width: 275px;
    min-width: 220px;
}

.iw-name {
    font-size: 0.97rem;
    font-weight: 700;
    color: #006AA5;
    margin-bottom: 9px;
    padding-bottom: 8px;
    border-bottom: 2px solid #A32A27;
    line-height: 1.3;
}

.iw-row {
    display: flex;
    align-items: flex-start; /* Dôležité pre viacriadkové adresy */
    gap: 10px;
    margin-top: 8px;
    font-size: 0.88rem;
    line-height: 1.4;
}

.iw-icon {
    flex-shrink: 0;
    display: flex;
    padding-top: 4px; /* Toto vyrieši tých "4px vyššie" */
}

.iw-icon-globe svg {
    position: relative;
    top: 4px;
}

.iw-icon svg {
    display: block;
    width: 14px;
    height: 14px;
}

/* Svetlomodrá bold URL adresa */
.iw-url-link {
    color: #00aaff !important; /* Svetlomodrá */
    font-weight: 700;          /* Bold */
    text-decoration: underline;
}

.iw-url-link:hover {
    color: #0088cc !important;
    text-decoration: none;
}

.iw-exhibits {
    font-size: 0.82rem;
    color: #333;
    margin-top: 9px;
    padding-top: 9px;
    border-top: 1px solid #eee;
    line-height: 1.45;
}

.iw-exhibits strong { color: #1e2530; }

.iw-detail-link {
    display: inline-flex;
    align-items: center;
    margin-top: 11px;
    color: #006AA5;
    font-size: 0.82rem;
    font-weight: 700;
    text-decoration: none;
    transition: color 0.2s ease;
}

.iw-detail-link::after { content: ' →'; }
.iw-detail-link:hover  { color: #00538a; text-decoration: underline; }

/* ============================================================
   STORE LIST GRID – karty krajov/štátov
   ============================================================ */
.sl-grid-section {
    width: 100%;
    max-width: 100%;
    margin: 48px auto 0;
    padding: 10px 0 72px;
}

.sl-grid {
    column-count: 1;
    column-gap: 0;
    width: 100%;
}

.sl-card {
    background: var(--white);
    border-radius: var(--radius);
    border-left: 4px solid var(--blue);
    box-shadow: var(--shadow-sm);
    padding: 20px 22px 22px;
    transition: box-shadow var(--transition);
    break-inside: avoid;
    margin-bottom: 24px;
    column-count: 2;
    column-gap: 32px;
}

.sl-card:hover {
    box-shadow: var(--shadow-md);
}

.sl-card h2 {
    font-size: 1rem;
    font-weight: 700;
    color: var(--text);
    margin: 0 0 14px;
    padding-bottom: 10px;
    border-bottom: 2px solid var(--border);
    text-transform: capitalize;
    letter-spacing: -0.3px;
    column-span: all;
}

.sl-card h3 {
    font-size: 1.2rem;
    font-weight: 700;
    color: var(--blue);
    margin: 14px 0 6px;
}

.sl-city-link {
    color: inherit;
    text-decoration: none;
}

.sl-city-link:hover {
    text-decoration: underline;
}

.sl-card h3:first-of-type {
    margin-top: 0;
}

.sl-store {
    display: flex;
    flex-direction: row;
    align-items: baseline;
    gap: 8px;
    padding: 4px 0 4px 10px;
    border-left: 2px solid var(--blue-lt);
    margin-bottom: 6px;
}

.sl-store:last-child {
    margin-bottom: 0;
}

.sl-store-name {
    font-weight: 500;
    color: var(--text);
    font-size: 0.80rem;
    line-height: 1.2;
    text-decoration: none;
    white-space: nowrap;
    flex-shrink: 0;
}

.sl-store-name:hover {
    text-decoration: underline;
    color: var(--blue-dk);
}

.sl-store-address {
    color: var(--muted);
    font-size: 0.7rem;
    line-height: 1.2;
    margin-top: 0;
}

/* ============================================================
   CITY PAGE – stránka mesta
   ============================================================ */
.city-page-section {
    width: 100%;
    max-width: var(--content-width);
    margin: 40px auto 72px;
    padding: 0 24px;
}

.city-page-title {
    font-size: clamp(1.6rem, 2.4vw, 2rem);
    font-weight: 700;
    line-height: 1.1;
    letter-spacing: -0.028em;
    color: #111827;
    margin-bottom: 32px;
    text-transform: capitalize;
}

/* Accent bar under the title — matches the "Ke stažení" page heading */
.city-page-title::after {
    content: '';
    display: block;
    width: 36px;
    height: 3px;
    background: #006AA5;
    border-radius: 2px;
    margin-top: 20px;
}

.city-no-stores {
    color: var(--muted);
    font-size: 1rem;
}

.city-store-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 20px;
}

.city-store-card {
    background: var(--white);
    border-radius: var(--radius);
    border-left: 4px solid var(--blue);
    box-shadow: var(--shadow-sm);
    padding: 18px 20px 20px;
    display: flex;
    flex-direction: column;
    gap: 6px;
    transition: box-shadow var(--transition);
    position: relative;
    cursor: pointer;
}

.city-store-card:hover { box-shadow: var(--shadow-md); }

.city-store-name {
    font-size: 1rem;
    font-weight: 700;
    color: var(--text);
    margin: 0;
}

.city-store-detail-link {
    color: inherit;
    text-decoration: none;
}

.city-store-detail-link:hover {
    text-decoration: underline;
    color: var(--blue-dk);
}

/* Stretch the detail link over the whole card so the entire card is clickable */
.city-store-detail-link::after {
    content: '';
    position: absolute;
    inset: 0;
    z-index: 1;
}

/* Keep the external website link clickable above the stretched card link */
.city-store-web {
    font-size: 0.82rem;
    color: var(--blue);
    word-break: break-all;
    text-decoration: none;
    position: relative;
    z-index: 2;
    align-self: flex-start;
}

.city-store-web:hover { text-decoration: underline; }

.city-store-address {
    font-size: 0.88rem;
    color: var(--muted);
    line-height: 1.5;
    margin: 0;
}

.city-store-tel {
    font-size: 0.85rem;
    color: var(--text);
    margin: 0;
}

.city-store-exhibits {
    font-size: 0.82rem;
    color: var(--muted);
    margin: 0;
    padding-top: 6px;
    border-top: 1px solid var(--border);
}

@media (max-width: 900px) {
    .city-store-grid { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 600px) {
    .city-store-grid { grid-template-columns: 1fr; }
}

/* ============================================================
   RESPONZIVITA
   ============================================================ */
@media (max-width: 900px) {
    .store-list { grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 12px; }
    .sl-card    { column-count: 2; }
}

@media (max-width: 600px) {
    .sl-card { column-count: 1; }
}

@media (max-width: 768px) {
    .search-section    { margin-top: 4px; padding: 0 16px; }
    .map-section       { margin-top: 4px; height: calc(100vh - 200px); padding-bottom: 0; }
    .search-inner      { flex-direction: column; align-items: center; gap: 8px; }
    .search-left       { width: 100%; }
    .search-input-wrap { width: 100%; flex: 1 1 auto; }
    .btn-geo           { width: auto; justify-content: center; }
    .filter-bar        { margin-top: 16px; padding: 0 16px; gap: 8px; flex-direction: column; align-items: stretch; }
    .store-list-section { margin-top: 16px; padding: 0 16px 40px; }
    .btn-find          { width: auto; flex: 1 1 auto; height: 48px; font-size: 0.88rem; }
    .search-input      { height: 48px; font-size: 0.9rem; }
    .filter-group      { max-width: none; flex: none; width: 100%; gap: 3px; }
    .filter-label      { font-size: 0.7rem; }
    .filter-select     { padding: 9px 32px 9px 12px; font-size: 14px; }
}

@media (max-width: 600px) {
    .btn-find-label { display: none; }
    .btn-find       { flex: 0 0 auto; padding: 0 16px; }
}

@media (max-width: 480px) {
    .search-section    { margin-top: 4px; }
    .map-section       { margin-top: 4px; height: calc(100vh - 200px); }
    .search-inner      { flex-direction: column; align-items: center; gap: 8px; }
    .search-left       { width: 100%; }
    .search-input-wrap { width: 100%; flex: none; }
    .btn-geo           { width: auto; justify-content: center; }
    .filter-bar        { margin-top: 12px; gap: 6px; }
    .store-list-section { margin-top: 12px; }
    .btn-find          { width: 100%; flex: none; justify-content: center; height: 48px; }
    .btn-find-label    { display: inline; }
    .hero-title        { letter-spacing: -0.5px; }
    .store-list        { grid-template-columns: 1fr; }
    .filter-group      { width: 100%; gap: 3px; }
    .filter-label      { font-size: 0.7rem; }
    .filter-select     { padding: 10px 32px 10px 12px; font-size: 14px; }
}
