/* ===================================================
   AAS ČR – Oficiální institucionální design
   Striktní, profesionální, s důrazem na autoritu
   =================================================== */

/* --- Fonty --- */
/* Čistý, neutrální, moderní bezpatkový design pro celý web (Inter) */
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700;800&display=swap');

/* --- Proměnné --- */
:root {
  /* Konzervativní paleta */
  --col-primary: #003366;     /* Tmavě modrá - autorita */
  --col-primary-dark: #001f3f; /* Extra tmavě modrá */
  --col-accent: #b91d47;      /* Tlumená karmínová - důraz */
  
  --col-text: #222222;        /* Téměř černá pro vysoký kontrast */
  --col-text-muted: #555555;  /* Šedá pro doplňující texty */
  --col-bg-body: #ffffff;
  --col-bg-alt: #f4f6f8;      /* Velmi světlá neutrální šedá */
  --col-border: #d1d5db;      /* Barva ohraničení */
  
  /* Typografie */
  --font-sans: 'Inter', system-ui, sans-serif;
  --font-serif: 'Inter', system-ui, sans-serif; /* Obě proměnné ukazují na sjednocený moderní font */

  /* Rozměry a hranatý design */
  --max-width: 1140px;
  --radius: 0px;              /* Striktně 0 zaoblení */
  --transition: 0.2s ease-in-out;
}

/* --- ZÁKLADNÍ NASTAVENÍ --- */
* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  scroll-behavior: smooth;
  font-size: 16px;
}

body {
  font-family: var(--font-sans);
  color: var(--col-text);
  background-color: var(--col-bg-body);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-serif);
  color: var(--col-primary);
  line-height: 1.3;
  margin-bottom: 1rem;
  font-weight: 700;
}

p {
  margin-bottom: 1rem;
}

a {
  color: var(--col-primary);
  text-decoration: none;
  transition: color var(--transition);
}

a:hover {
  text-decoration: underline;
  color: var(--col-accent);
}

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

/* --- UTILITY A ROZLOŽENÍ --- */
.container {
  width: 100%;
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 1.5rem;
}

.section {
  scroll-margin-top: 130px;
  padding: 5rem 0;
  border-bottom: 1px solid var(--col-border);
}

.section-bg-alt {
  background-color: var(--col-bg-alt);
}

.section-title {
  font-size: 2.25rem;
  margin-bottom: 0.5rem;
  border-bottom: 2px solid var(--col-primary);
  padding-bottom: 1rem;
  display: inline-block;
}

.section-subtitle {
  font-family: var(--font-sans);
  font-size: 1.125rem;
  color: var(--col-text-muted);
  margin-bottom: 3rem;
  max-width: 800px;
}

/* --- TLAČÍTKA --- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-sans);
  font-weight: 600;
  padding: 0.75rem 1.5rem;
  font-size: 0.875rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  border: 2px solid transparent;
  cursor: pointer;
  transition: all var(--transition);
  text-decoration: none;
}

.btn:hover {
  text-decoration: none;
}

.btn-primary {
  background-color: var(--col-primary);
  color: #fff;
}

.btn-primary:hover {
  background-color: var(--col-primary-dark);
}

.btn-outline {
  background-color: transparent;
  color: var(--col-primary);
  border-color: var(--col-primary);
}

.btn-outline:hover {
  background-color: var(--col-bg-alt);
  color: var(--col-primary-dark);
}

.btn-accent {
  background-color: var(--col-accent);
  color: #fff;
}

.btn-accent:hover {
  background-color: #8b1535;
}

.btn-outline-white {
  background-color: transparent;
  color: #fff;
  border-color: #fff;
}

.btn-outline-white:hover {
  background-color: rgba(255, 255, 255, 0.1);
  color: #fff;
}

/* --- HLAVIČKA A NAVIGACE --- */
.header {
  border-bottom: 1px solid var(--col-border);
  background-color: #fff;
  position: sticky;
  top: 0;
  z-index: 100;
}

.header-top {
  background-color: var(--col-primary);
  color: #fff;
  font-size: 0.75rem;
  padding: 0.25rem 0;
  text-align: right;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.header-top .container {
  display: flex;
  justify-content: flex-end;
  gap: 1.5rem;
}

.header-top a {
  color: rgba(255,255,255,0.8);
}
.header-top a:hover {
  color: #fff;
  text-decoration: none;
}

.header-main {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 90px;
}

.logo {
  display: flex;
  align-items: center;
  gap: 1rem;
  text-decoration: none !important;
}

.logo-img {
  height: 50px;
  width: auto;
}

.logo-text {
  display: flex;
  flex-direction: column;
}

.logo-abbr {
  font-family: var(--font-serif);
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--col-primary);
  line-height: 1;
}

.logo-full {
  font-family: var(--font-sans);
  font-size: 0.7rem;
  font-weight: 600;
  color: var(--col-text-muted);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin-top: 0.25rem;
}

.nav {
  display: flex;
  gap: 1.5rem;
}

.nav a {
  font-family: var(--font-sans);
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--col-text);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  padding: 0.5rem 0;
  position: relative;
}

.nav a::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  width: 0;
  height: 2px;
  background-color: var(--col-accent);
  transition: width var(--transition);
}

.nav a:hover {
  text-decoration: none;
  color: var(--col-primary);
}

.nav a:hover::after {
  width: 100%;
}

/* --- HERO SEKCE --- */
.hero {
  position: relative;
  background-color: var(--col-primary-dark);
  border-bottom: 1px solid var(--col-border);
  padding: 0;
  min-height: 500px;
  width: 100%;
}

.hero-overlay {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(255, 255, 255, 0.75); /* Silnější bílý overlay pro čitelnost */
  backdrop-filter: blur(2px); /* Mírné rozmazání pozadí ještě zlepší čitelnost */
  z-index: 1;
}

.hero .container {
  position: relative;
  z-index: 2;
  display: flex;
  align-items: center;
  min-height: 500px;
}

.hero-content {
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: 4rem 0;
  max-width: 700px;
}

.hero-tag {
  font-family: var(--font-sans);
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--col-primary);
  font-weight: 700;
  margin-bottom: 1.5rem;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.hero-tag::before {
  content: '';
  display: block;
  width: 20px;
  height: 2px;
  background-color: var(--col-accent);
}

.hero h1 {
  font-size: 2.75rem;
  color: var(--col-primary-dark);
  margin-bottom: 1.5rem;
  line-height: 1.2;
}

.hero p {
  font-size: 1.125rem;
  color: var(--col-text);
  margin-bottom: 2.5rem;
  font-weight: 500;
  max-width: 90%;
}

.hero-actions {
  display: flex;
  gap: 1rem;
}

/* --- STATISTIKY --- */
.official-stats {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  border: 1px solid var(--col-border);
  margin-top: -1px; /* Překryv rámečků */
  background: #fff;
}

.stat-box {
  padding: 2.5rem 1.5rem;
  text-align: center;
  border-right: 1px solid var(--col-border);
}

.stat-box:last-child {
  border-right: none;
}

.stat-val {
  font-family: var(--font-serif);
  font-size: 2.5rem;
  font-weight: 700;
  color: var(--col-primary);
  margin-bottom: 0.5rem;
}

.stat-lbl {
  font-size: 0.875rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--col-text-muted);
}

/* --- O NÁS --- */
.about-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 4rem;
}

.about-text p {
  font-size: 1.05rem;
  line-height: 1.8;
  color: var(--col-text);
}

.about-text p.lead {
  font-size: 1.25rem;
  font-weight: 500;
  color: var(--col-primary);
  margin-bottom: 1.5rem;
}

.values-list {
  border: 1px solid var(--col-border);
  list-style: none;
}

.value-item {
  display: flex;
  align-items: flex-start;
  gap: 1.5rem;
  padding: 1.5rem;
  border-bottom: 1px solid var(--col-border);
}

.value-item:last-child {
  border-bottom: none;
}

.value-icon {
  width: 32px;
  height: 32px;
  border: 1px solid var(--col-primary);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--col-primary);
  flex-shrink: 0;
}

.value-icon svg {
  width: 18px;
  height: 18px;
}

.value-content h4 {
  font-family: var(--font-sans);
  font-size: 1.125rem;
  margin-bottom: 0.25rem;
  color: var(--col-text);
}

.value-content p {
  font-size: 0.9rem;
  color: var(--col-text-muted);
  margin: 0;
}

/* --- PROJEKTY/PROGRAMY --- */
.projects-section {
  padding: 4rem 0; /* Menší padding sekce */
}

.programs-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.5rem; /* Menší mezera pro semknutější vzhled */
}

.program-card {
  border: 1px solid var(--col-border);
  background: #fff;
  display: flex;
  flex-direction: column;
  transition: border-color var(--transition), transform var(--transition);
  text-decoration: none !important; /* Odstranění podtržení odkazu */
  color: var(--col-text);
  overflow: hidden;
}

.program-card:hover {
  border-color: var(--col-primary);
  transform: translateY(-2px); /* Nepatrný plavný posun celé karty */
}

.program-img {
  height: 160px; /* Obrázky udělány kompaktnějšími na výšku */
  border-bottom: 1px solid var(--col-border);
}

.program-img img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  filter: grayscale(20%);
  transition: filter var(--transition);
}

.program-card:hover .program-img img {
  filter: grayscale(0%);
}

.program-body {
  padding: 1.5rem; /* Zmenšený padding karty */
  display: flex;
  flex-direction: column;
  align-items: center; /* Vycentrováno pro vizuální čistotu u krátkých textů */
  text-align: center;
  flex-grow: 1;
}

.program-body h3 {
  font-family: var(--font-serif);
  font-size: 1.15rem; /* Urychlí čtení */
  margin-bottom: 0.5rem;
  color: var(--col-primary-dark);
}

.program-body p {
  font-size: 0.9rem;
  color: var(--col-text-muted);
  flex-grow: 1;
  margin-bottom: 1.25rem;
}

.program-link {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  font-weight: 600;
  text-transform: uppercase;
  font-size: 0.75rem;
  letter-spacing: 0.05em;
  color: var(--col-accent);
  transition: color var(--transition);
}

.program-card:hover .program-link {
  color: var(--col-primary);
}

/* --- ČLENSTVÍ / ZAPOJENÍ --- */
.membership-box {
  background-color: var(--col-primary);
  color: #fff;
  padding: 4rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-left: 8px solid var(--col-accent);
}

.membership-text h2 {
  color: #fff;
  border-bottom: none;
  margin-bottom: 0.5rem;
}

.membership-text p {
  color: rgba(255,255,255,0.8);
  font-size: 1.125rem;
  margin: 0;
  max-width: 600px;
}

/* --- AKTUALITY --- */
.news-list {
  display: flex;
  flex-direction: column;
  border-top: 1px solid var(--col-border);
}

.news-item {
  display: grid;
  grid-template-columns: 180px 1fr auto;
  gap: 2.5rem;
  padding: 2.5rem 0;
  border-bottom: 1px solid var(--col-border);
  align-items: center;
  transition: background-color var(--transition);
}

.news-item:hover {
  background-color: var(--col-bg-alt);
}

.news-img {
  width: 180px;
  height: 150px;
  background-color: #eee;
}

.news-img img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.news-content h3 {
  font-family: var(--font-serif);
  font-size: 1.25rem;
  margin-bottom: 0.5rem;
  color: var(--col-primary-dark);
}

.news-content p {
  font-size: 0.95rem;
  color: var(--col-text-muted);
  margin: 0;
  line-height: 1.6;
}

.news-link {
  font-weight: 600;
  font-size: 0.875rem;
}

/* --- KONTAKT --- */
.contact-wrapper {
  display: grid;
  grid-template-columns: 1fr 1fr;
  border: 1px solid var(--col-border);
  background: #fff;
}

.contact-info-panel {
  padding: 3rem;
  border-right: 1px solid var(--col-border);
}

.contact-block {
  margin-bottom: 2.5rem;
}

.contact-block:last-child {
  margin-bottom: 0;
}

.contact-block h4 {
  font-family: var(--font-sans);
  font-size: 0.875rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--col-text-muted);
  margin-bottom: 0.5rem;
}

.contact-block p, .contact-block a {
  font-family: var(--font-serif);
  font-size: 1.125rem;
  color: var(--col-text);
  line-height: 1.5;
}

.contact-block a:hover {
  color: var(--col-primary);
}

.contact-person {
  margin-bottom: 1.5rem;
}

.contact-role {
  display: block;
  font-family: var(--font-sans);
  font-size: 0.75rem;
  color: var(--col-accent);
  text-transform: uppercase;
  letter-spacing: 0.1em;
  font-weight: 700;
  margin-bottom: 0.15rem;
}

.contact-name {
  display: block;
  font-weight: 700;
  color: var(--col-primary-dark);
}

.contact-map iframe {
  width: 100%;
  height: 100%;
  min-height: 400px;
  border: none;
  display: block;
}

/* --- PATIČKA --- */
.footer {
  background-color: var(--col-primary-dark);
  color: #fff;
  padding: 4rem 0 2rem;
}

.footer-grid {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr;
  gap: 4rem;
  margin-bottom: 3rem;
  padding-bottom: 3rem;
  border-bottom: 1px solid rgba(255,255,255,0.1);
}

.footer-brand .logo-abbr {
  color: #fff;
}

.footer-brand .logo-full {
  color: rgba(255,255,255,0.6);
}

.footer-brand p {
  margin-top: 1.5rem;
  color: rgba(255,255,255,0.7);
  font-size: 0.9rem;
  max-width: 400px;
}

.footer-title {
  font-size: 0.875rem;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: #fff;
  margin-bottom: 1.5rem;
  font-family: var(--font-sans);
}

.footer-links {
  list-style: none;
}

.footer-links li {
  margin-bottom: 0.75rem;
}

.footer-links a {
  color: rgba(255,255,255,0.7);
  font-size: 0.95rem;
}

.footer-links a:hover {
  color: #fff;
}

.footer-bottom {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 0.85rem;
  color: rgba(255,255,255,0.5);
}

/* --- ANIMACE FADE-IN (Striktně decentní) --- */
.fade-in {
  opacity: 0;
  transform: translateY(10px); /* Velmi jemný posun, ne velký skok */
  transition: opacity 0.6s ease-out, transform 0.6s ease-out;
}

.fade-in.visible {
  opacity: 1;
  transform: translateY(0);
}

/* --- RESPONZIVITA --- */
@media (max-width: 992px) {
  .about-grid, .contact-wrapper, .membership-box {
    flex-direction: column;
    grid-template-columns: 1fr;
  }
  .membership-box {
    padding: 2.5rem;
    align-items: center;
    text-align: center;
    gap: 1.5rem;
  }
  .membership-text p {
    text-align: center;
    margin: 0 auto;
  }
  .official-stats {
    grid-template-columns: 1fr 1fr;
  }
  .stat-box {
    border-bottom: 1px solid var(--col-border);
  }
  .stat-box:nth-child(2) {
    border-right: none;
  }
  .programs-grid {
    grid-template-columns: 1fr 1fr;
  }
  .footer-grid {
    grid-template-columns: 1fr;
    gap: 2.5rem;
  }
}

@media (max-width: 768px) {
  /* Header */
  .header-top {
    text-align: center;
  }
  .header-top .container {
    justify-content: center;
    flex-direction: column;
    gap: 0.25rem;
  }
  .header-main {
    flex-direction: column;
    height: auto;
    padding: 1.5rem 0;
    gap: 1.25rem;
    text-align: center;
  }
  .nav {
    flex-wrap: wrap;
    justify-content: center;
    gap: 1rem;
  }
  .logo {
    justify-content: center;
  }
  
  /* Hero */
  .hero {
    min-height: auto;
  }
  .hero .container {
    min-height: auto;
    justify-content: center;
  }
  .hero-content {
    padding: 3rem 0;
    text-align: center;
    align-items: center;
  }
  .hero h1 {
    font-size: 2.1rem;
  }
  .hero p {
    font-size: 1.1rem;
    max-width: 100%;
  }
  .hero-tag {
    justify-content: center;
  }
  .hero-actions {
    flex-direction: column;
    width: 100%;
    max-width: 300px;
    gap: 1rem;
    margin: 0 auto;
  }
  .hero-actions .btn {
    width: 100%;
  }

  /* Utils / Sections */
  .section {
    padding: 3.5rem 0;
  }
  .section-title {
    font-size: 1.75rem;
  }
  .section-subtitle {
    margin-bottom: 2rem;
    text-align: center;
  }
  
  /* Programs */
  .programs-grid {
    grid-template-columns: 1fr;
  }
  
  /* Stats */
  .official-stats {
    grid-template-columns: 1fr;
  }
  .stat-box {
    border-right: none !important;
    padding: 2rem 1rem;
  }
  
  /* Contacts */
  .contact-info-panel {
    border-right: none;
    border-bottom: 1px solid var(--col-border);
    padding: 2rem 1.5rem;
  }
  .contact-map iframe {
    min-height: 300px;
  }
  
  /* Other UI */
  .news-item {
    grid-template-columns: 1fr;
    gap: 1rem;
    padding: 1.5rem 0;
  }
  .news-img {
    width: 100%;
    height: 200px;
  }
  .footer {
    text-align: center;
    padding: 3rem 0 1.5rem;
  }
  .footer-brand img {
    margin: 0 auto 1.5rem auto !important;
  }
  .footer-bottom {
    flex-direction: column;
    gap: 0.5rem;
    text-align: center;
  }
}

/* --- PARTNEŘI --- */
.partners-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
  gap: 2rem;
  align-items: center;
  justify-items: center;
}

.partner-logo {
  max-width: 100%;
  height: auto;
  max-height: 70px;
  filter: grayscale(100%);
  opacity: 0.6;
  transition: all var(--transition);
  display: block;
}

.partner-logo:hover {
  filter: grayscale(0%);
  opacity: 1;
  transform: scale(1.05);
}

/* --- SKUTEČNÉ MOBILNÍ MENU --- */
.mobile-toggle {
  display: none;
  font-size: 2rem;
  background: transparent;
  border: none;
  color: var(--col-primary);
  cursor: pointer;
  padding: 0;
  line-height: 1;
}

@media (max-width: 768px) {
  .mobile-toggle {
    display: block;
    position: absolute;
    right: 0;
    top: 50%;
    transform: translateY(-50%);
  }
  
  .header-main {
    position: relative;
    flex-direction: row !important;
    justify-content: flex-start !important;
    padding: 1rem 1.5rem !important;
  }
  
  .nav {
    display: none !important;
    flex-direction: column !important;
    width: 100vw;
    position: absolute;
    top: 100%;
    left: -1.5rem; 
    background-color: #ffffff;
    border-top: 1px solid var(--col-border);
    box-shadow: 0 10px 15px -3px rgba(0,0,0,0.1);
    padding: 0 !important;
    z-index: 1000;
  }
  
  .nav.nav-open {
    display: flex !important;
  }
  
  .nav a {
    width: 100% !important;
    padding: 1rem 1.5rem !important;
    text-align: center !important;
    border-bottom: 1px solid #eeeeee;
    font-size: 0.95rem !important; font-weight: 700 !important;
  }
  
  .nav a:last-child {
    border-bottom: none;
  }
  
  .nav a::after {
    display: none !important;
  }
}

/* --- Optimalizace top headeru pro mobil s odstranenim svislitka --- */
@media (max-width: 768px) {
  .header-top .container {
    font-size: 0 !important; /* Skryje textovy znak | */
    padding: 0 !important;
  }
  .header-top .container span {
    font-size: 0.7rem;    /* Udrzi mensi font pro slogan */
    display: block;
    width: 100%;
    text-align: center;
    letter-spacing: 0.1em;
  }
  .header-top .container a {
    display: none !important; /* Zmizi e-mail na telefonu */
  }
}
