/*
Theme Name:   Bajtel Fixed
Theme URI:    https://bajtel-zlobek.pl
Description:  Prosty klasyczny motyw WordPress dla żłobka Bajtel. Bez Elementora, z natywnym menu, nagłówkiem, stopką i aktualnościami.
Author:       Bajtel Żłobek
Version:      1.1.0
Text Domain:  bajtel-child
*/

/* =============================================
   ZMIENNE KOLORYSTYCZNE — BAJTEL
   ============================================= */
:root {
  --bajtel-blue:       #1F6FB2;
  --bajtel-blue-dark:  #15517f;
  --bajtel-blue-light: rgba(31, 111, 178, 0.08);
  --bajtel-red:        #E84C3D;
  --bajtel-red-light:  rgba(232, 76, 61, 0.08);
  --bajtel-white:      #ffffff;
  --bajtel-gray:       #666666;
  --bajtel-gray-light: #f7f9fb;
  --bajtel-border:     rgba(0, 0, 0, 0.08);
  --bajtel-radius:     10px;
  --bajtel-on-dark:   rgba(255, 255, 255, 0.92);
}

/* =============================================
   TOPBAR — pasek kontaktowy na górze
   ============================================= */
.bajtel-topbar {
  background: var(--bajtel-blue-dark);
  color: rgba(255, 255, 255, 0.75);
  padding: 6px 24px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 12px;
  flex-wrap: wrap;
  gap: 6px;
}
.bajtel-topbar a {
  color: rgba(255, 255, 255, 0.75);
  text-decoration: none;
  margin-left: 16px;
}
.bajtel-topbar a:hover { color: #fff; }

/* =============================================
   HEADER
   ============================================= */
.bajtel-header {
  background: #fff;
  border-bottom: 1px solid var(--bajtel-border);
  padding: 14px 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 12px;
}
.bajtel-header .logo-area {
  display: flex;
  align-items: center;
  gap: 14px;
}
.bajtel-header .logo-area img {
  object-fit: contain;
  border-radius: 10px;
  max-width: 220px;
  max-height: 220px;
}
.bajtel-header .site-title {
  font-size: 18px;
  font-weight: 600;
  color: var(--bajtel-blue);
  line-height: 1.3;
}
.bajtel-header .site-subtitle {
  font-size: 12px;
  color: var(--bajtel-gray);
  margin-top: 2px;
}
.bajtel-header .hours {
  text-align: right;
  font-size: 12px;
  color: var(--bajtel-gray);
  line-height: 1.7;
}

/* =============================================
   NAWIGACJA
   ============================================= */
.bajtel-nav {
  background: var(--bajtel-blue);
  padding: 0 24px;
  display: flex;
  align-items: center;
  overflow-x: auto;
  flex-wrap: wrap;
}
.bajtel-nav a {
  color: rgba(255, 255, 255, 0.85);
  text-decoration: none;
  padding: 11px 16px;
  font-size: 13px;
  white-space: nowrap;
  border-bottom: 3px solid transparent;
  display: block;
  transition: color 0.2s, border-color 0.2s;
}
.bajtel-nav a:hover,
.bajtel-nav a.current-menu-item {
  color: #fff;
  border-bottom-color: var(--bajtel-red);
}

/* =============================================
   BANER INSO
   ============================================= */
.bajtel-inso-banner {
  background: var(--bajtel-blue);
  color: #fff;
  padding: 14px 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
}
.bajtel-inso-banner .inso-text strong {
  font-size: 14px;
  font-weight: 600;
  display: block;
  margin-bottom: 2px;
}
.bajtel-inso-banner .inso-text p {
  font-size: 12px;
  opacity: 0.9;
  margin: 0;
}
.bajtel-btn-inso {
  background: var(--bajtel-red);
  color: #fff !important;
  text-decoration: none;
  padding: 9px 18px;
  border-radius: 8px;
  font-size: 13px;
  font-weight: 500;
  white-space: nowrap;
  display: inline-block;
  transition: background 0.2s;
}
.bajtel-btn-inso:hover { background: #c43328; }

/* =============================================
   SEKCJA HERO (baner główny)
   ============================================= */
.bajtel-hero {
  background: var(--bajtel-blue-light);
  padding: 40px 24px;
  display: flex;
  align-items: center;
  gap: 32px;
  flex-wrap: wrap;
}
.bajtel-hero .hero-text { flex: 1; min-width: 260px; }
.bajtel-hero h1 {
  font-size: 28px;
  font-weight: 700;
  color: var(--bajtel-blue);
  line-height: 1.3;
  margin-bottom: 12px;
}
.bajtel-hero p {
  font-size: 14px;
  color: var(--bajtel-gray);
  line-height: 1.7;
  margin-bottom: 20px;
}
.bajtel-hero .hero-image {
  flex: 0 0 clamp(220px, 28vw, 360px);
  max-width: 100%;
  height: clamp(180px, 28vh, 360px);
  border-radius: var(--bajtel-radius);
  overflow: hidden;
  display: block;
}
.bajtel-hero .hero-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

/* Przyciski */
.bajtel-btn-primary {
  background: var(--bajtel-red);
  color: #fff !important;
  text-decoration: none;
  padding: 10px 22px;
  border-radius: 8px;
  font-size: 13px;
  font-weight: 500;
  display: inline-block;
  transition: background 0.2s;
}
.bajtel-btn-primary:hover { background: #c43328; }
.bajtel-btn-secondary {
  background: #fff;
  color: var(--bajtel-blue) !important;
  text-decoration: none;
  border: 1.5px solid var(--bajtel-blue);
  padding: 9px 22px;
  border-radius: 8px;
  font-size: 13px;
  font-weight: 500;
  display: inline-block;
  margin-left: 10px;
  transition: background 0.2s;
}
.bajtel-btn-secondary:hover { background: var(--bajtel-blue-light); }

/* =============================================
   KAFELKI SEKCJI
   ============================================= */
.bajtel-sections {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  border-top: 1px solid var(--bajtel-border);
  border-bottom: 1px solid var(--bajtel-border);
}
.bajtel-section-card {
  padding: 24px 20px;
  border-right: 1px solid var(--bajtel-border);
  background: #fff;

  /* nowa część - wyrównanie przycisku zawsze na dole */
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  height: 100%;
}
.bajtel-section-card:last-child { border-right: none; }
.bajtel-icon {
  width: 36px;
  height: 36px;
  color: var(--bajtel-blue);
  margin-bottom: 12px;
  display: block;
}
.bajtel-card-btn {
  margin-top: 12px;
  margin-left: 0;
  font-size: 12px;
  /* upewnij się, że przycisk nie "przylega" do góry */
  align-self: flex-start;
}
.doc-icon {
  width: 16px;
  height: 16px;
  color: var(--bajtel-red);
  flex-shrink: 0;
}
.bajtel-section-card h3 {
  font-size: 15px;
  font-weight: 600;
  color: var(--bajtel-blue);
  margin-bottom: 6px;
}
.bajtel-section-card p {
  font-size: 12px;
  color: var(--bajtel-gray);
  line-height: 1.6;
}

/* =============================================
   AKTUALNOŚCI + DOKUMENTY
   ============================================= */
.bajtel-content-row {
  display: flex;
  border-top: 1px solid var(--bajtel-border);
  flex-wrap: wrap;
}
.bajtel-news { flex: 2; padding: 24px; border-right: 1px solid var(--bajtel-border); min-width: 280px; }
.bajtel-docs { flex: 1; padding: 24px; background: var(--bajtel-gray-light); min-width: 220px; }

.bajtel-section-heading {
  font-size: 15px;
  font-weight: 600;
  color: var(--bajtel-blue);
  border-left: 3px solid var(--bajtel-red);
  padding-left: 10px;
  margin-bottom: 16px;
}
.bajtel-news-item {
  padding: 12px 0;
  border-bottom: 1px solid var(--bajtel-border);
}
.bajtel-news-item:last-child { border-bottom: none; }
.bajtel-news-date {
  font-size: 10px;
  color: var(--bajtel-red);
  text-transform: uppercase;
  letter-spacing: 0.5px;
  margin-bottom: 4px;
}
.bajtel-news-title {
  font-size: 13px;
  font-weight: 600;
  color: var(--bajtel-blue);
  margin-bottom: 4px;
}
.bajtel-news-excerpt {
  font-size: 12px;
  color: var(--bajtel-gray);
  line-height: 1.6;
}
.bajtel-doc-link {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 0;
  border-bottom: 1px solid var(--bajtel-border);
  font-size: 12px;
  color: var(--bajtel-blue);
  text-decoration: none;
}
.bajtel-doc-link:last-child { border-bottom: none; }
.bajtel-doc-link:hover { color: var(--bajtel-red); }
.bajtel-doc-link .doc-icon { color: var(--bajtel-red); font-size: 16px; flex-shrink: 0; }

/* =============================================
   GALERIA
   ============================================= */
.bajtel-gallery { padding: 24px; border-top: 1px solid var(--bajtel-border); }
.bajtel-gallery-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
  gap: 10px;
  margin-top: 14px;
}
.bajtel-gallery-grid img {
  width: 100%;
  aspect-ratio: 1;
  object-fit: cover;
  border-radius: var(--bajtel-radius);
  border: 1px solid var(--bajtel-border);
  display: block;
}

/* =============================================
   STOPKA
   ============================================= */
.bajtel-footer {
  background: var(--bajtel-blue-dark);
  color: rgba(255, 255, 255, 0.8);
  padding: 28px 24px 16px;
}
.bajtel-footer-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 20px;
  margin-bottom: 20px;
}
.bajtel-footer-col h4 {
  color: #fff;
  font-size: 13px;
  font-weight: 600;
  margin-bottom: 10px;
}
.bajtel-footer-col p {
  font-size: 12px;
  color: rgba(255, 255, 255, 0.7);
  line-height: 1.8;
  text-decoration: none;
  display: block;
}
.bajtel-footer-col a {
  font-size: 12px;
  color: rgba(255, 255, 255, 0.7);
  line-height: 1.8;
  text-decoration: none;
  display: inline-block;
  margin-right: 12px;
}
.bajtel-footer-col a:hover { color: #fff; }
.bajtel-footer-bottom {
  border-top: 1px solid rgba(255, 255, 255, 0.15);
  padding-top: 14px;
  font-size: 11px;
  color: rgba(255, 255, 255, 0.4);
  display: flex;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 6px;
}

/* =============================================
   RESPONSYWNOŚĆ
   ============================================= */
@media (max-width: 768px) {
  .bajtel-topbar { justify-content: center; text-align: center; }
  .bajtel-header { justify-content: center; }
  .bajtel-header .hours { display: none; }
  .bajtel-hero { flex-direction: column; }
  .bajtel-hero .hero-image { flex: none; width: 100%; height: auto; } /* changed */
  .bajtel-hero .hero-image img { width: 100%; height: auto; object-fit: cover; } /* changed */
  .bajtel-content-row { flex-direction: column; }
  .bajtel-news { border-right: none; border-bottom: 1px solid var(--bajtel-border); }
  .bajtel-section-card { border-right: none; border-bottom: 1px solid var(--bajtel-border); }
}


/* =============================================
   POPRAWKI MOTYWU KLASYCZNEGO
   ============================================= */
* { box-sizing: border-box; }
body {
  margin: 0;
  background: #fff;
  color: #1f2933;
  font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}
.bajtel-site { max-width: 1180px; margin: 0 auto; background: #fff; }
.bajtel-main { min-height: 50vh; }
.bajtel-main > .wp-block-group,
.bajtel-page-content,
.bajtel-post-content,
.bajtel-archive { padding: 32px 24px; }
.bajtel-page-title,
.bajtel-archive-title { color: var(--bajtel-blue); margin: 0 0 20px; }
.bajtel-site a { color: var(--bajtel-blue); }

/* Wyraźny kontrast dla tytułów aktualności i linków do dokumentów */
.bajtel-news .bajtel-news-title,
.bajtel-docs .bajtel-doc-link,
.bajtel-docs a {
  color: var(--bajtel-blue);
}
.bajtel-news .bajtel-news-title a,
.bajtel-docs .bajtel-doc-link:hover,
.bajtel-docs a:hover {
  color: var(--bajtel-red);
  text-decoration: underline;
}
.bajtel-nav ul { list-style: none; padding: 0; margin: 0; display: flex; flex-wrap: wrap; }
.bajtel-nav li { margin: 0; }
.bajtel-nav .current-menu-item > a,
.bajtel-nav .current_page_item > a { color: #fff; border-bottom-color: var(--bajtel-red); }
.bajtel-custom-logo img, .custom-logo { object-fit: contain; border-radius: 10px; max-width: 220px; max-height: 220px; }
.bajtel-title-link { text-decoration: none; }
.bajtel-footer-menu ul { list-style: none; padding: 0; margin: 0; }
.bajtel-footer-menu li { margin: 0; }
.bajtel-post-list { display: grid; gap: 16px; }
.bajtel-post-card { border-bottom: 1px solid var(--bajtel-border); padding-bottom: 16px; }
.bajtel-post-card h2, .bajtel-post-card h3 { margin: 0 0 8px; color: var(--bajtel-blue); }
.bajtel-post-meta { font-size: 12px; color: var(--bajtel-red); margin-bottom: 8px; }
.bajtel-read-more { font-size: 13px; font-weight: 600; text-decoration: none; }
.bajtel-screen-reader-text { position: absolute; left: -9999px; }
.bajtel-docs-note { font-size: 12px; color: var(--bajtel-gray); line-height: 1.6; }
.bajtel-empty-notice { color: var(--bajtel-gray); font-size: 13px; }

@media (max-width: 768px) {
  .bajtel-nav ul { justify-content: center; }
  .bajtel-btn-secondary { margin-left: 0; margin-top: 8px; }
}

/* Linki na ciemnym tle — nadpisują globalny kolor .bajtel-site a */
.bajtel-topbar a,
.bajtel-inso-banner a,
.bajtel-footer a {
  color: var(--bajtel-on-dark);
}
.bajtel-social {
  display: flex;
  flex-direction: row;
  gap: 8px;
  align-items: center;
  flex-wrap: nowrap;
}
.bajtel-social a {
  display: inline-flex;
  width: 50px;
  height: 50px;
  align-items: center;
  justify-content: center;
  background: rgba(255,255,255,0.06);
  color: var(--bajtel-on-dark);
  border-radius: 8px;
  text-decoration: none;
  transition: background 0.15s, color 0.15s;
  margin: 2px 0; /* mały margines wertykalny na wypadek łamania układu */
}
.bajtel-social a:hover {
  background: rgba(255,255,255,0.14);
  color: #fff;
}
.bajtel-social svg {
  width: 22px;
  height: 22px;
  fill: currentColor;
  display: block;
}

