/* =====================================================
   folyok.hu főoldal-specifikus stílus
   Forrás: folyok-hu-fooldal-html/assets/css/style.css
   Csak az index.php tölti be (home.css)
   ===================================================== */

:root {
  --navy: #064d6b;
  --navy-dark: #053c55;
  --navy-deep: #082f43;
  --aqua: #26a0b7;
  --aqua-light: #c9edf2;
  --sky: #e2f5f7;
  --sky-soft: #f3fbfc;
  --sand: #f7f2e9;
  --ink: #0c2d3d;
  --body-color: #364f5a;
  --muted: #6b7e86;
  --home-line: #d5e2e6;
  --shell: 1340px;
  --home-gutter: 18px;
  --home-header-height: 72px;
  --home-font: Inter, Manrope, "Segoe UI", Arial, sans-serif;
}

/* Shell konténer */
.shell {
  width: min(calc(100% - (var(--home-gutter) * 2)), var(--shell));
  margin-inline: auto;
}

/* Hero */
.hero {
  position: relative;
  display: flex;
  min-height: 700px;
  padding-bottom: 18px;
  overflow: hidden;
  flex-direction: column;
  background: linear-gradient(135deg, #e0f5f8, #f6fcfd);
}

.hero-background {
  position: relative;
  width: 100%;
  height: 260px;
  overflow: hidden;
  background: #cbecef;
  order: 2;
}

.hero-background img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: 60% 54%;
}

.hero-fade {
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(223,246,248,0.08) 0%, rgba(223,246,248,0.03) 68%, rgba(223,246,248,0.24) 100%);
}

.route-overlay {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  filter: drop-shadow(0 1px 2px rgba(4,77,107,0.35));
  pointer-events: none;
}

.route {
  stroke-linecap: round;
  stroke-linejoin: round;
}

.route-main {
  stroke: rgba(255,255,255,0.94);
  stroke-width: 4;
}

.route-soft {
  stroke: rgba(255,255,255,0.62);
  stroke-width: 2;
}

.map-pin {
  position: absolute;
  display: grid;
  width: 34px;
  height: 42px;
  place-items: center;
  color: var(--aqua);
  filter: drop-shadow(0 3px 4px rgba(4,54,73,0.3));
}

.map-pin svg {
  width: 100%;
  height: 100%;
  fill: var(--aqua);
  stroke: var(--white, #fff);
  stroke-width: 1.7;
}

.map-pin circle {
  fill: var(--white, #fff);
  stroke: none;
}

.pin-one  { top: 20%; left: 34%; }
.pin-two  { top: 47%; left: 53%; }
.pin-three { top: 31%; left: 78%; }

.hero-layout {
  display: flex;
  padding-block: 32px 26px;
  flex-direction: column;
  order: 1;
}

.hero-copy {
  position: relative;
  z-index: 3;
}

.hero-copy h1 {
  margin: 0 0 14px;
  color: var(--ink);
  font-size: 35px;
  font-weight: 800;
  letter-spacing: -1.3px;
  line-height: 1.08;
}

.hero-copy p {
  max-width: 520px;
  margin: 0;
  color: #344e5a;
  font-size: 17px;
  line-height: 1.45;
}

.hero-actions {
  display: grid;
  margin-top: 24px;
  gap: 10px;
}

/* Gombok */
.button-primary,
.button-secondary {
  display: inline-flex;
  min-height: 50px;
  padding: 0 20px;
  align-items: center;
  justify-content: center;
  gap: 12px;
  border: 1px solid transparent;
  border-radius: 7px;
  font-family: var(--home-font);
  font-size: 15px;
  font-weight: 700;
  text-decoration: none;
  transition: transform 150ms ease, background 150ms ease, box-shadow 150ms ease;
}

.button-primary svg,
.button-secondary svg {
  width: 20px;
  height: 20px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.button-primary {
  background: linear-gradient(110deg, var(--navy-dark), #08759a);
  box-shadow: 0 6px 16px rgba(5,76,105,0.18);
  color: #fff;
}

.button-primary:hover {
  background: var(--navy-dark);
  transform: translateY(-1px);
  color: #fff;
}

.button-secondary {
  border-color: var(--navy);
  background: rgba(255,255,255,0.72);
  color: var(--navy-deep);
}

.button-secondary:hover {
  background: #fff;
  transform: translateY(-1px);
}

/* Kereső kártya */
.search-wrap {
  position: relative;
  z-index: 8;
  margin-top: -4px;
  order: 3;
}

.search-card {
  overflow: hidden;
  border: 1px solid rgba(208,224,229,0.9);
  border-radius: 13px;
  background: rgba(255,255,255,0.97);
  box-shadow: 0 10px 28px rgba(3,48,68,0.12);
}

.search-tabs {
  display: grid;
  grid-template-columns: 1fr 1fr;
  align-items: stretch;
  border-bottom: 1px solid var(--home-line);
}

.search-tab {
  display: flex;
  min-height: 52px;
  padding: 10px 9px;
  align-items: center;
  justify-content: center;
  gap: 7px;
  border: 0;
  border-bottom: 3px solid transparent;
  background: #f8fafb;
  color: #38505b;
  font-size: 13px;
  font-weight: 600;
  line-height: 1.1;
  cursor: pointer;
}

.search-tab:first-child {
  border-radius: 12px 0 0 0;
}

.search-tab.is-active,
.search-tab[aria-selected="true"] {
  border-bottom-color: var(--aqua);
  background: linear-gradient(110deg, var(--navy-dark), #08759a);
  color: #fff;
}

.search-tab svg,
.search-button svg,
.select-shell > svg,
.input-shell > svg {
  width: 20px;
  height: 20px;
  flex: 0 0 auto;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.search-panel-fields {
  display: grid;
  padding: 16px;
  gap: 13px;
}

.home-field {
  display: grid;
  gap: 7px;
}

.home-field > span:first-child {
  color: #49606a;
  font-size: 13px;
  font-weight: 500;
}

.select-shell,
.input-shell {
  position: relative;
  display: flex;
  min-width: 0;
  align-items: center;
}

.select-shell > svg,
.input-shell > svg {
  position: absolute;
  z-index: 2;
  left: 14px;
  color: var(--navy);
  pointer-events: none;
}

.select-shell select,
.input-shell input {
  width: 100%;
  min-width: 0;
  height: 50px;
  padding: 0 38px 0 46px;
  border: 1px solid #c8d8de;
  border-radius: 8px;
  background: #fff;
  color: #60727a;
  font-size: 14px;
  font-family: var(--home-font);
  outline: none;
  appearance: auto;
}

.select-shell select:focus,
.input-shell input:focus {
  border-color: var(--aqua);
  box-shadow: 0 0 0 3px rgba(38,160,183,0.16);
}

.search-button {
  display: inline-flex;
  width: 100%;
  min-height: 50px;
  align-items: center;
  justify-content: center;
  gap: 9px;
  border: 0;
  border-radius: 8px;
  background: linear-gradient(110deg, var(--navy-dark), #08759a);
  color: #fff;
  font-size: 15px;
  font-weight: 700;
  font-family: var(--home-font);
  cursor: pointer;
}

.search-button:hover {
  background: var(--navy-dark);
}

.home-text-panel {
  padding: 16px;
  display: grid;
  gap: 13px;
}

/* Kiemelt folyók szekció */
.featured-section {
  display: grid;
  padding-block: 30px 34px;
  gap: 28px;
}

.section-title {
  display: flex;
  margin: 0;
  align-items: center;
  gap: 10px;
  color: var(--ink);
  font-size: 21px;
  font-weight: 800;
  letter-spacing: -0.35px;
  line-height: 1.2;
}

.section-title > svg {
  width: 26px;
  height: 26px;
  flex: 0 0 auto;
  fill: none;
  stroke: var(--navy);
  stroke-width: 1.7;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.recent-list {
  display: flex;
  margin-top: 14px;
  padding-bottom: 2px;
  gap: 8px;
  overflow-x: auto;
  scrollbar-width: thin;
}

.recent-list a {
  display: grid;
  min-width: 124px;
  min-height: 44px;
  padding: 0 12px;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  gap: 8px;
  border: 1px solid var(--home-line);
  border-radius: 8px;
  background: #fff;
  color: var(--ink);
  font-size: 14px;
  text-decoration: none;
}

.recent-list a:hover {
  background: var(--sky-soft);
  border-color: var(--aqua-light);
}

.recent-list svg {
  width: 18px;
  height: 18px;
  fill: none;
  stroke: #6d8189;
  stroke-width: 1.7;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.recent-list b {
  color: var(--navy);
  font-size: 20px;
  font-weight: 400;
}

.rivers-heading,
.counties-heading {
  display: flex;
  margin-bottom: 14px;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.rivers-heading > a,
.counties-heading > a {
  display: none;
  align-items: center;
  gap: 8px;
  color: var(--navy);
  font-size: 13px;
  font-weight: 600;
  text-decoration: none;
}

.rivers-heading > a span,
.counties-heading > a span {
  font-size: 22px;
  font-weight: 400;
}

.river-grid {
  display: grid;
  gap: 12px;
}

.river-card {
  position: relative;
  display: grid;
  min-height: 128px;
  overflow: hidden;
  grid-template-columns: 42% 58%;
  border: 1px solid var(--home-line);
  border-radius: 9px;
  background: #fff;
  box-shadow: 0 3px 10px rgba(5,57,78,0.04);
  transition: transform 160ms ease, box-shadow 160ms ease;
}

.river-card:hover {
  box-shadow: 0 4px 14px rgba(3,48,68,0.08);
  transform: translateY(-2px);
}

.river-image {
  position: relative;
  min-height: 128px;
  overflow: hidden;
}

.river-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.river-image-placeholder {
  width: 100%;
  height: 100%;
  min-height: 128px;
  background: #ddf2f5;
  display: grid;
  place-items: center;
  color: #26a0b7;
  font-size: 2rem;
}

.river-image span {
  position: absolute;
  top: 9px;
  right: 8px;
  padding: 4px 7px;
  border-radius: 5px;
  background: var(--navy);
  color: #fff;
  font-size: 10px;
  font-weight: 700;
  text-transform: lowercase;
}

.river-content {
  display: flex;
  min-width: 0;
  padding: 14px 16px;
  justify-content: center;
  flex-direction: column;
}

.river-content h3 {
  margin: 0 0 4px;
  color: var(--ink);
  font-size: 20px;
  line-height: 1.15;
}

.river-content p {
  display: -webkit-box;
  margin: 0;
  overflow: hidden;
  color: #526770;
  font-size: 12px;
  line-height: 1.4;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 3;
  line-clamp: 3;
}

.river-meta {
  display: flex;
  margin-top: 8px;
  align-items: center;
  gap: 5px;
  color: var(--navy);
  font-size: 11px;
  font-weight: 500;
}

.river-meta svg {
  width: 15px;
  height: 15px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.7;
}

.card-link {
  position: absolute;
  z-index: 3;
  inset: 0;
}

/* Megyék szekció */
.counties-section {
  padding-block: 28px 34px;
  background: linear-gradient(120deg, #faf7ef, var(--sand));
  border-top: 1px solid #eee5d7;
}

.county-scroller {
  display: flex;
  padding-bottom: 6px;
  gap: 10px;
  overflow-x: auto;
  scroll-snap-type: x proximity;
  scrollbar-width: thin;
}

.county-home-card {
  display: flex;
  min-width: 144px;
  min-height: 136px;
  padding: 14px 12px;
  align-items: center;
  justify-content: center;
  flex-direction: column;
  scroll-snap-align: start;
  border: 1px solid #e5dccc;
  border-radius: 9px;
  background: rgba(255,255,255,0.78);
  color: var(--ink);
  text-align: center;
  text-decoration: none;
  transition: transform 160ms ease, background 160ms ease;
}

.county-home-card:hover {
  background: #fff;
  transform: translateY(-2px);
}

.shield {
  position: relative;
  display: grid;
  width: 48px;
  height: 56px;
  margin-bottom: 8px;
  place-items: center;
  clip-path: polygon(8% 0, 92% 0, 100% 72%, 50% 100%, 0 72%);
  color: #fff;
  font-size: 12px;
  font-weight: 800;
  text-shadow: 0 1px 2px rgba(0,0,0,0.25);
  overflow: hidden;
}

.shield img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.shield-blue  { background: linear-gradient(145deg, #48a5cf 0 50%, #e6b24e 50%); }
.shield-gold  { background: linear-gradient(145deg, #c18a22 0 50%, #174f7a 50%); }
.shield-green { background: linear-gradient(145deg, #4b8c63 0 50%, #d9b85b 50%); }
.shield-red   { background: linear-gradient(145deg, #a94343 0 50%, #e9c458 50%); }
.shield-navy  { background: linear-gradient(145deg, #174f7a 0 50%, #c65555 50%); }

.county-home-card strong {
  display: -webkit-box;
  overflow: hidden;
  color: var(--ink);
  font-size: 13px;
  line-height: 1.25;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
  line-clamp: 2;
}

.county-home-card small {
  margin-top: 4px;
  color: var(--muted);
  font-size: 11px;
}

/* Tudástár CTA */
.knowledge-section {
  display: flex;
  padding-block: 45px;
  align-items: flex-start;
  justify-content: space-between;
  flex-direction: column;
  gap: 24px;
}

.knowledge-section h2 {
  margin: 0;
  color: var(--ink);
  font-size: 30px;
  letter-spacing: -0.7px;
}

.eyebrow {
  margin: 0 0 5px;
  color: var(--aqua);
  font-size: 13px;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

/* Tablet */
@media (min-width: 600px) {
  :root {
    --home-gutter: 24px;
  }

  .hero-copy h1 {
    font-size: 46px;
  }

  .hero-actions {
    display: flex;
  }

  .button-primary,
  .button-secondary {
    min-width: 190px;
  }

  .search-panel-fields {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .search-panel-fields .search-button {
    grid-column: 1 / -1;
  }

  .river-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .river-card {
    grid-template-columns: 1fr;
  }

  .river-image {
    aspect-ratio: 16 / 8;
    min-height: 0;
  }

  .knowledge-section {
    align-items: center;
    flex-direction: row;
  }
}

/* Desktop */
@media (min-width: 1024px) {
  :root {
    --home-gutter: 28px;
    --home-header-height: 78px;
  }

  .hero {
    min-height: 600px;
    padding-bottom: 0;
  }

  .hero-background {
    position: absolute;
    inset: 0 0 auto 0;
    height: 510px;
  }

  .hero-background img {
    object-position: 66% 51%;
  }

  .hero-fade {
    background: linear-gradient(90deg,
      rgba(225,247,249,1) 0%,
      rgba(225,247,249,0.97) 22%,
      rgba(225,247,249,0.67) 39%,
      rgba(225,247,249,0.08) 61%,
      rgba(225,247,249,0) 100%
    );
  }

  .route-overlay {
    left: 34%;
    width: 66%;
  }

  .pin-one   { top: 16%; left: 55%; }
  .pin-two   { top: 42%; left: 64%; }
  .pin-three { top: 27%; left: 82%; }

  .hero-layout {
    position: relative;
    min-height: 410px;
    padding-top: 78px;
    justify-content: flex-start;
  }

  .hero-copy {
    width: 50%;
  }

  .hero-copy h1 {
    margin-bottom: 22px;
    font-size: 58px;
    letter-spacing: -2.6px;
    line-height: 1.04;
  }

  .hero-copy p {
    font-size: 20px;
  }

  .hero-actions {
    margin-top: 28px;
    gap: 16px;
  }

  .button-primary,
  .button-secondary {
    min-height: 56px;
    padding-inline: 26px;
    font-size: 16px;
  }

  .search-wrap {
    margin-top: -33px;
  }

  .search-card {
    border-radius: 15px;
  }

  .search-tabs {
    display: flex;
    justify-content: flex-start;
  }

  .search-tab {
    width: auto;
    min-height: 52px;
    padding-inline: 25px;
    font-size: 14px;
  }

  .search-panel-fields {
    padding: 20px 24px 24px;
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr) 270px;
    align-items: end;
    gap: 24px;
  }

  .search-panel-fields .search-button {
    grid-column: auto;
    min-height: 54px;
    font-size: 16px;
  }

  .select-shell select,
  .input-shell input {
    height: 54px;
  }

  .home-text-panel {
    padding: 20px 24px 24px;
    grid-template-columns: minmax(0, 1fr) 270px;
    align-items: end;
    gap: 24px;
  }

  .featured-section {
    grid-template-columns: 260px minmax(0, 1fr);
    padding-block: 42px 48px;
    gap: 32px;
  }

  .recent-column {
    padding-right: 28px;
    border-right: 1px solid var(--home-line);
  }

  .recent-list {
    display: grid;
    margin-top: 16px;
    overflow: visible;
  }

  .recent-list a {
    width: 100%;
    min-width: 0;
    min-height: 58px;
    padding-inline: 14px;
    font-size: 15px;
  }

  .rivers-heading > a,
  .counties-heading > a {
    display: inline-flex;
  }

  .river-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 18px;
  }

  .river-card {
    display: block;
    min-height: 0;
  }

  .river-image {
    aspect-ratio: 16 / 8.6;
  }

  .river-content {
    display: block;
    padding: 14px 16px 16px;
  }

  .river-content h3 {
    font-size: 21px;
  }

  .river-content p {
    min-height: 47px;
    font-size: 13px;
  }

  .river-meta {
    margin-top: 9px;
    font-size: 12px;
  }

  .counties-section {
    padding-block: 32px 40px;
  }

  .county-scroller {
    gap: 14px;
  }

  .county-home-card {
    min-width: 148px;
    min-height: 156px;
  }
}

@media (min-width: 1280px) {
  .hero-copy h1 {
    font-size: 64px;
  }
}

@media (prefers-reduced-motion: reduce) {
  .hero-fade,
  .river-card,
  .county-home-card,
  .button-primary,
  .button-secondary {
    transition: none !important;
  }
}
