/* ================================================
   oz.css — štýly pre stránku OZ Od srdca
   Umiestni do: css/oz.css
   ================================================ */

/* ── HERO sekcia ── */
.oz-hero {
  background: linear-gradient(160deg, #5a3520 0%, #7a4a2a 50%, #6b3d22 100%);
  padding: clamp(4rem, 8vw, 7rem) 1.5rem clamp(3rem, 6vw, 5rem);
  text-align: center;
  position: relative;
  overflow: hidden;
}

.oz-hero::before {
  content: '';
  position: absolute;
  inset: 0;
  background:
    radial-gradient(circle at 20% 50%, rgba(255,220,180,0.08) 0%, transparent 60%),
    radial-gradient(circle at 80% 20%, rgba(255,200,140,0.06) 0%, transparent 50%);
  pointer-events: none;
}

.oz-hero__inner {
  position: relative;
  max-inline-size: 720px;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  justify-self: center;
  align-items: center;
}

/* Logo — celý obrázok zmestený, spodný text skrytý clipping-om */
.oz-hero__logo-wrap {
  position: relative;
  inline-size: 180px;
  block-size: 180px;
  border-radius: 50%;
  background: #fff;
  overflow: hidden;
  box-shadow:
    0 0 0 5px rgba(255, 220, 180, 0.3),
    0 16px 48px rgba(0, 0, 0, 0.38);
  margin-block-end: 2rem;
  flex-shrink: 0;
}

/* Obrázok posunutý nahor aby ikona bola v strede a text dole mimo kruhu */
.oz-hero__logo {
  position: absolute;
  /* keep image fully visible and centered inside the circular mask */
  inline-size: 140%;
  block-size: auto;
  inset-block-start: 50%;
  inset-inline-start: 50%;
  transform: translate(-50%, -50%);
  object-fit: contain;
  object-position: center center;
}

/* Nadpis */
.oz-hero__title {
  font-family: 'Cormorant Garamond', Georgia, serif;
  font-size: clamp(2.4rem, 5vw, 3.5rem);
  font-weight: 700;
  color: #fff;
  margin: 0 0 1rem;
  text-align: center;
  letter-spacing: -0.01em;
  inline-size: 100%;
}

.oz-hero__subtitle {
  font-size: clamp(0.95rem, 1.8vw, 1.1rem);
  color: rgba(255, 235, 210, 0.88);
  line-height: 1.75;
  margin: 0 0 2.5rem;
  text-align: center;
  max-inline-size: 580px;
}

/* Pill prekliky */
.oz-hero__links {
  display: flex;
  flex-wrap: wrap;
  gap: 0.6rem;
  justify-content: center;
}

.oz-pill {
  display: inline-block;
  padding: 0.55rem 1.2rem;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.12);
  border: 1px solid rgba(255, 255, 255, 0.25);
  color: #fff;
  font-size: 0.88rem;
  font-weight: 500;
  text-decoration: none;
  transition: background 0.2s, border-color 0.2s, transform 0.15s;
  backdrop-filter: blur(4px);
}

.oz-pill:hover {
  background: rgba(255, 255, 255, 0.22);
  border-color: rgba(255, 255, 255, 0.45);
  transform: translateY(-2px);
}

.oz-pill--accent {
  background: rgba(176, 106, 63, 0.75);
  border-color: rgba(220, 160, 100, 0.7);
  font-weight: 600;
}

.oz-pill--accent:hover {
  background: rgba(176, 106, 63, 0.95);
}

/* Center various headings and section text on OZ pages for consistent layout */
.section-head,
.section-title,
.section-head h2,
.section-head p,
.section-note,
.about-center h2,
.about-center h3,
.panel h2,
.panel h3 {
  text-align: center !important;
  margin-inline: auto;
}

/* ── Kontaktná mriežka ── */
.oz-contact-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1.1rem;
  margin-block-start: 2rem;
  max-inline-size: 960px;
  margin-inline: auto;
}

.oz-contact-item {
  background: var(--surface);
  border-radius: var(--radius-md);
  padding: 1.4rem 1.5rem;
  box-shadow: 0 2px 14px rgba(88, 58, 38, 0.07);
  border: 1px solid var(--line);
  text-align: center;
  transition: box-shadow 0.2s, transform 0.2s;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
}

.oz-contact-item:hover {
  box-shadow: 0 6px 24px rgba(88, 58, 38, 0.13);
  transform: translateY(-2px);
}

.oz-contact-item h4 {
  margin: 0 0 0.5rem;
  font-size: 0.72rem;
  font-family: "Sora", sans-serif;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--accent);
  font-weight: 600;
}

.oz-contact-item p {
  font-size: 0.98rem;
  font-weight: 500;
  margin: 0;
  color: var(--text);
  line-height: 1.5;
}

.oz-contact-item a {
  color: var(--text);
  text-decoration: none;
  transition: color 0.15s;
}

.oz-contact-item a:hover {
  color: var(--accent);
  text-decoration: underline;
}

/* ── Responzívnosť ── */
@media (max-width: 900px) {
  .oz-contact-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 600px) {
  .oz-contact-grid {
    grid-template-columns: 1fr 1fr;
  }
  .oz-hero__logo-wrap {
    inline-size: 130px;
    block-size: 130px;
  }
  .oz-pill {
    font-size: 0.82rem;
    padding: 0.45rem 0.9rem;
  }
}

@media (max-width: 420px) {
  .oz-contact-grid {
    grid-template-columns: 1fr;
  }
}

/* Specific tweaks for the "2% z dane" visual */
.oz-dane-head h2 {
  font-size: clamp(2.6rem, 5.5vw, 3.6rem);
  letter-spacing: -0.02em;
  margin-block-end: 1.4rem;
}

.oz-dane-cards {
  gap: clamp(1rem, 3vw, 2rem);
  align-items: start;
}

.oz-dane-cards .card {
  background: rgba(255, 255, 255, 0.92);
  padding: clamp(1.2rem, 2.4vw, 2rem);
  border-radius: 18px;
  min-block-size: 10rem;
  display: flex;
  flex-direction: column;
  justify-content: center;
  text-align: center;
}

.oz-dane-cards .card h3 {
  font-size: clamp(1.45rem, 2.6vw, 1.9rem);
  margin-block-end: 0.6rem;
  color: #5a3520;
}

.oz-dane-cards .card p {
  color: rgba(90, 77, 70, 0.9);
}

@media (max-width: 900px) {
  .oz-dane-cards {
    grid-template-columns: 1fr;
    gap: 1rem;
  }
}

/* Center the download button in the 2% section */
.oz-dane-cta {
  justify-content: center;
}

.oz-dane-cta .btn {
  margin-inline: 0;
}

/* Media inside OZ cards and hero images */
.card-media {
  display: block;
  margin-block-end: 0.85rem;
  overflow: hidden;
  border-radius: 12px;
}

.card-media img {
  display: block;
  inline-size: auto;
  max-inline-size: 100%;
  block-size: 120px;
  max-block-size: 140px;
  object-fit: contain;
  object-position: center;
  margin-inline: auto;
  background: rgba(255,255,255,0.98);
  padding: 8px;
}

.oz-hero-image {
  max-inline-size: 720px;
  margin-inline: auto;
  margin-block-start: 1rem;
  margin-block-end: 1.2rem;
}

.oz-hero-image img {
  inline-size: 100%;
  block-size: auto;
  border-radius: 12px;
  box-shadow: 0 12px 28px rgba(0,0,0,0.12);
  display: block;
}

@media (max-width: 600px) {
  .card-media img { block-size: 120px; }
}

/* Improve contrast and readability for cards placed on brown backgrounds */
.section--brown .cards .card {
  background: rgba(255, 250, 244, 0.96);
  color: #3b2a22;
  border: 1px solid rgba(88, 58, 38, 0.06);
  box-shadow: 0 8px 20px rgba(76, 49, 33, 0.08);
}

.section--brown .cards .card h3 {
  color: #5a3520;
  margin-block-end: 0.6rem;
}

.section--brown .cards .card p,
.section--brown .cards .card a,
.section--brown .cards .card .section-note {
  color: rgba(60, 45, 35, 0.95);
}

.section--brown .cards .card .btn-ghost {
  background: #fff;
  color: #5a3520;
  border-color: rgba(90, 77, 70, 0.12);
  box-shadow: 0 6px 14px rgba(76,49,33,0.06);
}

.section--brown .cards .card[style] {
  text-align: center;
}

/* Center partner cards grid and constrain card width for consistency */
.section--brown .cards {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 360px));
  gap: clamp(1rem, 3vw, 2rem);
  justify-content: center;
  justify-items: center;
  max-inline-size: 1100px;
  margin-inline: auto;
}

.section--brown .cards .card {
  box-sizing: border-box;
  inline-size: 360px; /* fixed logical width for visual consistency */
  max-inline-size: 100%;
  inline-size: 100%;
}

  /* Place centered card into the middle column for the default 3-column `.cards` layout
     so it matches the same width as the cards above it. */
  .cards .card--center {
    grid-column: 2 / 3;
    justify-self: stretch;
    inline-size: auto;
    inline-size: 100%;
    max-inline-size: 100%;
  }

  @media (max-inline-size: 900px) {
    /* When `.cards` collapses to 2 columns, span both so it stays centered */
    .cards .card--center {
      grid-column: 1 / -1;
      justify-self: center;
      max-inline-size: 520px;
      inline-size: 100%;
    }
  }

  @media (max-inline-size: 600px) {
    /* Single column — behave like other cards */
    .cards .card--center {
      grid-column: 1 / -1;
      inline-size: auto;
      inline-size: 100%;
    }
  }

  /* Force partner cards to stack vertically on narrow viewports for natural flow */
  @media (max-inline-size: 600px) {
    .section--brown .cards {
      grid-template-columns: 1fr !important;
      gap: 1rem !important;
      max-inline-size: 100% !important;
      margin-inline: 0 !important;
      padding-inline: 0.25rem !important;
    }

    .section--brown .cards .card {
      inline-size: 100% !important;
      max-inline-size: 100% !important;
      justify-self: stretch !important;
    }

    .cards .card--center {
      grid-column: 1 / -1;
      justify-self: stretch;
      inline-size: 100%;
      max-inline-size: 100%;
    }
  }

/* Utility: center a specific card within the grid without stretching it
   (spans the full grid row but the card keeps its fixed inline-size) */
.card--center {
  grid-column: 1 / -1;
  justify-self: center;
  inline-size: 360px;
  max-inline-size: 100%;
  inline-size: 100%;
}

/* Ensure OZ partner cards stack vertically on narrow/tablet viewports
   so that on mobile devices each partner is shown under the previous one. */
@media (max-width: 860px) {
  #partneri-grid {
    grid-template-columns: 1fr !important;
    gap: 1rem !important;
    padding-inline: 0.5rem !important;
    margin-inline: 0 !important;
    max-inline-size: 100% !important;
    justify-items: stretch !important;
  }

  #partneri-grid .card {
    inline-size: 100% !important;
    max-inline-size: 100% !important;
    justify-self: stretch !important;
  }
}

/* Stronger selector for small viewports to ensure single-column layout
   (covers cases where .section--brown or other grid rules might conflict) */
@media (max-width: 700px) {
  .cards#partneri-grid,
  #partneri-grid.cards,
  .section .cards#partneri-grid {
    grid-template-columns: 1fr !important;
    gap: 0.9rem !important;
    padding-inline: 0.5rem !important;
    margin-inline: 0 !important;
    max-inline-size: 100% !important;
    justify-items: stretch !important;
  }

  .cards#partneri-grid .card,
  #partneri-grid.cards .card {
    inline-size: 100% !important;
    max-inline-size: 100% !important;
    justify-self: stretch !important;
  }
}

/* Center the 'Ďalší partneri' grid and cards */
#partneri-other-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 360px));
  gap: clamp(1rem, 3vw, 2rem);
  justify-content: center;
  justify-items: center;
  max-inline-size: 1100px;
  margin-inline: auto;
  padding-inline: 0.25rem;
}

#partneri-other-grid .card {
  box-sizing: border-box;
  inline-size: 360px;
  max-inline-size: 100%;
  inline-size: 100%;
  justify-self: center;
}

@media (max-width: 700px) {
  /* single column and centered for small screens */
  .cards#partneri-other-grid,
  #partneri-other-grid.cards {
    grid-template-columns: 1fr !important;
    gap: 0.9rem !important;
    padding-inline: 0.5rem !important;
    margin-inline: 0 !important;
    max-inline-size: 100% !important;
    justify-items: center !important;
  }

  .cards#partneri-other-grid .card,
  #partneri-other-grid.cards .card {
    inline-size: 100% !important;
    max-inline-size: 620px !important;
    justify-self: center !important;
  }
}