/* =============================================
   TELJES ÚJ DESIGN + ANIMÁCIÓK + TUDÁSTÁR LOGÓ
   2026-os frissített verzió – élénk, színes, visszafogott
   Minden oldalra vonatkozik (index + telepules/*.html)
   ============================================= */

:root {
  --primary: #00b4d8;
  --secondary: #f4a261;
  --accent: #e76f51;
  --dark: #1d3557;
  --light: #f8f9fa;
  --gray: #f1f3f5;
}

* {
  box-sizing: border-box;
}

body {
  font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  line-height: 1.7;
  background: linear-gradient(180deg, #f0f7fa 0%, #f8f9fa 100%);
  color: var(--dark);
  margin: 0;
  padding: 0;
  overflow-x: hidden;
}

/* ====================== ANIMÁLT FEJLÉC + LOGÓ ====================== */
header {
  background: linear-gradient(90deg, #1d3557, #264653);
  color: white;
  padding: 1.1rem 1.8rem;
  border-radius: 0 0 24px 24px;
  box-shadow: 0 8px 25px rgba(29, 53, 87, 0.25);
  margin-bottom: 2.2rem;
  position: sticky;
  top: 0;
  z-index: 100;
  display: flex;
  align-items: center;
  justify-content: space-between;
  animation: headerSlide 0.8s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

@keyframes headerSlide {
  from { transform: translateY(-120%); opacity: 0; }
  to   { transform: translateY(0); opacity: 1; }
}

header .logo-container {
  display: flex;
  align-items: center;
  gap: 14px;
}

header img#logo {
  height: 64px;
  width: auto;
  filter: drop-shadow(3px 4px 8px rgba(0, 0, 0, 0.25));
  transition: all 0.45s cubic-bezier(0.68, -0.55, 0.27, 1.55);
}

header img#logo:hover {
  transform: scale(1.15) rotate(12deg);
  filter: drop-shadow(4px 6px 12px rgba(0, 180, 216, 0.4));
}

header h1 {
  font-size: 2.25rem;
  font-weight: 700;
  letter-spacing: -1.2px;
  margin: 0;
  background: linear-gradient(90deg, #00b4d8, #f4a261);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  line-height: 1;
}

header nav a {
  color: white;
  text-decoration: none;
  margin-left: 1.8rem;
  font-weight: 500;
  font-size: 1.05rem;
  transition: all 0.3s ease;
}

header nav a:hover {
  color: #f4a261;
  transform: translateY(-2px);
}

/* ====================== FŐ TARTALOM ====================== */
main {
  max-width: 1100px;
  margin: 0 auto;
  padding: 0 1rem;
}

section {
  background: white;
  border-radius: 20px;
  box-shadow: 0 10px 30px rgba(0, 180, 216, 0.1);
  padding: 2.2rem 2.4rem;
  margin-bottom: 2.2rem;
  border-top: 7px solid var(--primary);
  opacity: 0;
  transform: translateY(40px);
  animation: fadeInUp 0.9s forwards;
}

@keyframes fadeInUp {
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

section:nth-child(1) { animation-delay: 100ms; }
section:nth-child(2) { animation-delay: 250ms; }
section:nth-child(3) { animation-delay: 400ms; }

section h2 {
  font-size: 1.6rem;
  color: var(--dark);
  margin-bottom: 1.3rem;
  position: relative;
}

section h2::after {
  content: '';
  position: absolute;
  bottom: -6px;
  left: 0;
  width: 70px;
  height: 4px;
  background: linear-gradient(to right, var(--secondary), var(--accent));
  border-radius: 4px;
}

/* ====================== KÁRTYÁK ÉS LISTÁK ====================== */
.kozszolgaltatas-kartya,
#telepules-lista li {
  transition: all 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.kozszolgaltatas-kartya:hover,
#telepules-lista li:hover {
  transform: translateY(-6px) scale(1.04);
  box-shadow: 0 15px 25px rgba(0, 180, 216, 0.2);
}

#telepules-lista li {
  padding: 0.9rem 1.2rem;
  margin-bottom: 0.6rem;
  background: white;
  border-radius: 10px;
  box-shadow: 0 2px 8px rgba(0,0,0,0.06);
  animation: listPop 0.6s backwards;
}

#telepules-lista a {
  color: var(--dark);
  font-weight: 500;
  text-decoration: none;
}

#telepules-lista li:hover a {
  color: white;
}

/* ====================== KERESŐ ====================== */
#kereso {
  width: 100%;
  max-width: 520px;
  padding: 0.9rem 1.2rem;
  font-size: 1.1rem;
  border: 2px solid #e0e0e0;
  border-radius: 9999px;
  transition: all 0.4s ease;
}

#kereso:focus {
  transform: scale(1.03);
  box-shadow: 0 0 0 6px rgba(0, 180, 216, 0.25);
  outline: none;
}

/* ====================== GRAFIKONOK ====================== */
canvas {
  border-radius: 12px;
  padding: 12px;
  background: #fff;
  box-shadow: 0 4px 15px rgba(0,0,0,0.05);
  animation: chartFade 1.2s ease forwards;
}

@keyframes chartFade {
  from { opacity: 0; filter: blur(4px); }
  to   { opacity: 1; filter: blur(0); }
}

/* ====================== ALAPADATOK ====================== */
.alapadatok {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(230px, 1fr));
  gap: 1.4rem;
  margin: 1.8rem 0;
}

.alapadatok div {
  background: var(--gray);
  padding: 1.1rem 1.4rem;
  border-radius: 14px;
  font-size: 1.1rem;
  transition: transform 0.3s ease;
}

.alapadatok div:hover {
  transform: scale(1.05);
}

/* ====================== ÁLTALÁNOS ====================== */
a {
  color: var(--primary);
  transition: color 0.3s ease;
}

a:hover {
  color: var(--accent);
}

a[href*="Vissza"] {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: var(--primary);
  font-weight: 600;
  text-decoration: none;
  padding: 8px 16px;
  border-radius: 9999px;
  background: rgba(0, 180, 216, 0.1);
}

a[href*="Vissza"]:hover {
  background: var(--primary);
  color: white;
}

/* ====================== MOBIL ====================== */
@media (max-width: 640px) {
  header {
    padding: 0.9rem 1.2rem;
    flex-wrap: wrap;
    gap: 1rem;
  }
  header h1 { font-size: 1.85rem; }
  header img#logo { height: 52px; }
  section { padding: 1.6rem 1.3rem; }
}