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

:root {
  --primary: #0044AA;
  --primary-light: #0044AA;
  --accent: #da1b0c;
  --dark: #182A3C;
  --light: #F4F8F9;
  --white: #ffffff;
  --text: #484848;
  --grey: #323232;
  --lightgrey: #d6d6d6;
  --back: #0044AA; 
  --max-width: 1200px;
}

body {
  font-family: 'Source Sans 3', sans-serif;
  color: var(--text);
  line-height: 1.6;
}

h1, h2 {
  font-family: 'Zilla Slab', serif;
}

h3 {
  font-family: 'Source Sans 3', sans-serif;
  text-transform: uppercase;
  letter-spacing: 0.05rem;
  font-weight:600;
  font-size: 1rem;
  color: var(--back);
  margin-top: 1.4rem;
}

/* HEADER */
#zahlavi-str {
  background: var(--white);
 /* border-bottom: 1px solid var(--primary); */
  position: sticky;
  top: 0;
  z-index: 1000;
}

#zahlavi-str .header-inner {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0.8rem 1.5rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.logo-mid { height: 46px; display: block; }
.logo-small { height: 60px; display: none; }

nav ul {
  margin-top:23px;
  list-style: none;
  display: flex;
  gap: 1.5rem;
}

nav a {
  text-decoration: none;
  color: var(--primary);
  font-weight: 600;
  font-size: 0.95rem;
  text-transform: uppercase;
  letter-spacing: 0.1rem;
  transition: color 0.2s;
  padding-bottom: 8px;
  border-bottom: 4px solid var(--primary);
}

nav a:hover {
  color: var(--accent);
  border-bottom: 4px solid var(--accent);
}

.hamburger {
  display: none;
  background: none;
  border: none;
  cursor: pointer;
  flex-direction: column;
  gap: 4px;
}

.hamburger span {
  display: block;
  width: 26px;
  height: 3px;
  background: var(--primary);
  border-radius: 2px;
  transition: transform 0.3s, opacity 0.3s;
}

.hamburger.active span:nth-child(1) { transform: translateY(8px) rotate(45deg); }
.hamburger.active span:nth-child(2) { opacity: 0; }
.hamburger.active span:nth-child(3) { transform: translateY(-8px) rotate(-45deg); }

/* BANNER */
.ban-section {
  background: var(--primary);
  border-bottom: 1px solid var(--dark);
}
.stred-cast.banner {
  position: relative;
  min-height: 52vh;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  overflow: hidden;
  background: var(--dark);
}

.banner-bg {
  position: absolute;
  inset: 0;
  background-size: cover;
  background-position: center;
  opacity: 0;
  transition: opacity 1.5s ease-in-out;

}

.banner-bg.active { opacity: 1; }

.banner-bg-1 {
  background-image: url('img/slide1.jpg');
}

.banner-bg-2 {
  background-image: url('img/slide2.jpg');
}

.banner-overlay {
  position: absolute;
  inset: 0;
  background: rgba(0,68,170, 0.30);
}

.banner-fade {
  position: absolute;
  inset: 0;
  z-index: 1;
  pointer-events: none;
  background: linear-gradient(
    to right,
    var(--primary) 0%,
    rgba(0,68,170,0) 25%,
    rgba(0,68,170,0) 70%,
    var(--primary) 100%
  );
}

.banner-content {
  position: relative;
  z-index: 2;
  color: var(--white);
  padding: 2rem;
}

.banner-content h1 {
  font-size: 3rem;
  margin-bottom: 1rem;
  letter-spacing: 1px;
}

.banner-slogan {
  font-size: 1.4rem;
  font-weight: 300;
  min-height: 2em;
}

.banner-slogan span {
  color: var(--accent);
  font-weight:600;
  position: absolute;
  left: 50%;
  transform: translateX(-50%);
  white-space: nowrap;
  opacity: 0;
  transition: opacity 1s;
}

.banner-slogan span.active { opacity: 1; }

/* SECTIONS */
.stred-cast {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 4rem 1.5rem;
}

.stred-cast h2 {
  /* font-family: 'Source Sans 3', sans-serif; */
  text-transform: uppercase;
  letter-spacing: 0.1rem;
  text-align: left;
  font-size: 2rem;
  color: var(--primary);
  margin-bottom: 2.5rem;
}

.col-50 {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 3rem; 
  align-items: start;
}

/* SERVICES */
.services-section {
  background: var(--light);
  border-bottom: 1px solid var(--lightgrey);
}

.services-section .stred-cast ul {
  list-style: none;
  padding: 0;
}

.services-section .stred-cast ul li {
  padding: 0.6rem 0;
  padding-left: 1.5rem;
  position: relative;
  font-size: 1.05rem;
}

.services-section .stred-cast ul li::before {
  content: '';
  position: absolute;
  left: 0;
  top: 50%;
  transform: translateY(-50%);
  width: 8px;
  height: 8px;
  background: var(--accent);
  border-radius: 2px;
}

img.pic-inst-50{
  width: 90%;
  aspect-ratio: 1 / 1;
  object-fit: cover;
  display: block;
}

.services-section .stred-cast > .col-50 > div:first-child > h3:first-child {
  margin-top: 0;
}

.services-section .stred-cast ul + h3 {
  margin-top: 1.4rem;
}

/* INSURANCE LOGOS GRID */
.insurance-logos {
  width: 90%;
  aspect-ratio: 1 / 1;
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  grid-template-rows: repeat(4, 1fr);
  gap: 0.8rem;
}

.logo-cell {
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--white);
  border: 1px solid #ddd;
  border-radius: 10px;
  padding: 1rem;
  overflow: hidden;
  transition: box-shadow 0.2s ease, transform 0.2s ease, border-color 0.2s ease;
}

.logo-cell:hover,
.logo-cell:focus-visible {
  box-shadow: 0 6px 16px rgba(0,0,0,0.12);
  transform: translateY(-2px);
  border-color: var(--primary);
}

.logo-cell img {
  max-width: 100%;
  max-height: 100%;
  object-fit: contain;
}

/* Dlaždice s barevným pozadím dle barvy loga */
.logo-cell--csob {
  background: #003464;
  border-color: #003464;
}

.logo-cell--slavia {
  background: #b23a15;
  border-color: #b23a15;
}


/* CONTACT */
.contact-section {
  background: var(--white);
}

.contact-section .map-wrap {
  width: 90%;
  aspect-ratio: 1 / 1;
  height: auto;
  background: var(--light);
  border: 1px solid #ddd;
}

.contact-section .map-wrap iframe {
  width: 100%;
  height: 100%;
  border: 0;
}

.contact-details p {
  margin-bottom: 0.8rem;
  font-size: 1.05rem;
}

.contact-details p span{
  margin-top: 0.8rem;
  color: var(--grey);
  text-transform:uppercase;
  letter-spacing: 0.1rem;
}

.contact-details strong {
  color: var(--primary);
}

/* INSURANCE */
.insurance-section {
  background: var(--light);
  border-top: 1px solid var(--lightgrey);
}

.insurance-section .stred-cast ul {
  list-style: none;
  padding: 0;
}

.insurance-section .stred-cast ul li {
  padding: 0.6rem 0;
  padding-left: 1.5rem;
  position: relative;
  font-size: 1.05rem;
}

.insurance-section .stred-cast ul li::before {
  content: '';
  position: absolute;
  left: 0;
  top: 50%;
  transform: translateY(-50%);
  width: 8px;
  height: 8px;
  background: var(--accent);
  border-radius: 2px;
}

/* FOOTER */
#zapati-str {
  background: var(--dark);
  color: var(--light);
  text-align: center;
  padding: 1.5rem;
  font-size: 0.9rem;
}

/* RESPONSIVE */
@media (max-width: 768px) {
  .logo-mid { display: none; }
  .logo-small { display: block; }

  .hamburger { display: flex; }

  nav {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: var(--white);
    /* border-bottom: 4px solid var(--primary); */
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.4s ease;
  }

  nav.open { max-height: 400px; }

  nav ul {
    flex-direction: column;
    padding: 1rem 1.5rem;
    gap: 0;
  }

  nav ul li a {
    display: block;
    padding: 0.7rem 0;
    border-bottom: 1px solid var(--light);
  }
  
   nav ul li a:hover {
    border-bottom: 1px solid var(--accent);
  } 

  .banner-content h1 { font-size: 1.8rem; }
  .banner-slogan { font-size: 1rem; }
  .banner-slogan span { white-space: normal; }

  .col-50 { grid-template-columns: 1fr; }

  .contact-section .map-wrap { width: 100%; }
  img.pic-inst-50 { width: 100%; }
  .insurance-logos { width: 100%; }
}
