/*
Theme Name: ZS2 Modern
Theme URI: https://zs2.grajewo.pl/
Author: OpenAI
Description: Nowoczesny, responsywny i dostępny motyw WordPress dla Zespołu Szkół nr 2. Trzy kolumny, dwa stałe sidebary, responsywny slider i edytowalne menu.
Version: 1.3
Requires at least: 6.4
Requires PHP: 8.0
License: GPL-2.0-or-later
Text Domain: zs2-modern
*/


/* ZS2 Modern v1.2 — shared content width and compact hero */
:root {
  --zs2-content-width: 1280px;
  --zs2-radius: 18px;
}

/* Slider, menu and the three-column area share exactly one content width */
.hero-slider,
.main-navigation,
.site-main-grid {
  width: min(calc(100% - 32px), var(--zs2-content-width));
  margin-left: auto;
  margin-right: auto;
}

.hero-slider {
  border-radius: var(--zs2-radius);
  overflow: hidden;
  max-height: 430px;
}

.hero-slider img {
  width: 100%;
  height: clamp(220px, 30vw, 430px);
  object-fit: cover;
  display: block;
}

.main-navigation {
  border-radius: var(--zs2-radius);
  overflow: hidden;
}

.site-main-grid {
  display: grid;
  grid-template-columns: minmax(180px, 22%) minmax(0, 1fr) minmax(180px, 22%);
  gap: 24px;
}

.site-main-grid > * {
  min-width: 0;
}

@media (max-width: 900px) {
  .hero-slider,
  .main-navigation,
  .site-main-grid {
    width: min(calc(100% - 24px), var(--zs2-content-width));
  }

  .hero-slider {
    max-height: 330px;
  }

  .hero-slider img {
    height: clamp(190px, 42vw, 330px);
  }

  .site-main-grid {
    grid-template-columns: 1fr 1fr;
  }

  .site-main-grid > :nth-child(2) {
    grid-column: 1 / -1;
    grid-row: 1;
  }
}

@media (max-width: 640px) {
  .hero-slider,
  .main-navigation,
  .site-main-grid {
    width: calc(100% - 20px);
  }

  .hero-slider {
    max-height: none;
    border-radius: 14px;
  }

  .hero-slider img {
    height: clamp(170px, 52vw, 250px);
  }

  .main-navigation {
    border-radius: 14px;
  }

  .site-main-grid {
    grid-template-columns: 1fr;
    gap: 16px;
  }

  .site-main-grid > :nth-child(2) {
    grid-column: auto;
  }
}


/* ZS2 Modern v1.3 — accessibility text scaling + configurable responsive slider */
html {
  font-size: calc(16px * var(--zs2-text-scale, 1));
}

body,
button,
input,
select,
textarea {
  font-size: 1rem;
}

.hero-slider {
  width: min(100%, var(--zs2-content-width, 1280px));
  height: var(--zs2-slider-height, 360px);
  max-height: none;
}

.hero-slider img,
.hero-slider .slide,
.hero-slider .slides,
.hero-slider .swiper-slide {
  height: 100%;
}

.hero-slider img {
  object-fit: cover;
}

@media (max-width: 900px) {
  .hero-slider {
    height: var(--zs2-slider-height-tablet, 300px);
  }
}

@media (max-width: 640px) {
  .hero-slider {
    width: calc(100% - 20px);
    height: var(--zs2-slider-height-mobile, 220px);
  }
}

@media (prefers-reduced-motion: reduce) {
  .hero-slider * {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    scroll-behavior: auto !important;
    transition-duration: 0.01ms !important;
  }
}
