/*
Theme Name: ZSRB 100-lecie
Theme URI: https://100.zsrb.leszno.pl/
Description: Dedykowany, pamiątkowy motyw jubileuszowy z okazji 100-lecia Zespołu Szkół Rolniczo-Budowlanych im. Synów Pułku w Lesznie (1920-2020).
Author: ZSRB Leszno
Author URI: https://zsrb.leszno.pl/
Version: 1.0.0
License: GNU General Public License v2 or later
Text Domain: zsrb-100
*/

:root {
  --zsrb-green-dark: #0f2619;
  --zsrb-green: #173d27;
  --zsrb-green-light: #2d6a47;
  --zsrb-green-subtle: #f0f6f2;
  --zsrb-gold: #c9a84c;
  --zsrb-gold-light: #e5cb7a;
  --zsrb-gold-dark: #9e7f2b;
  --zsrb-gold-subtle: #fdfbf3;
  --text-main: #1f2937;
  --text-muted: #4b5563;
  --bg-page: #fafbfa;
  --border-color: #e2e8e0;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  padding: 0;
  font-family: 'Plus Jakarta Sans', system-ui, -apple-system, sans-serif;
  color: var(--text-main);
  background-color: var(--bg-page);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

/* Typography */
h1, h2, h3, h4, .font-serif {
  font-family: 'Cinzel', 'Playfair Display', Georgia, serif;
  color: var(--zsrb-green-dark);
  letter-spacing: -0.2px;
}

a {
  color: var(--zsrb-green);
  text-decoration: none;
  transition: color 0.2s ease, transform 0.2s ease;
}

a:hover {
  color: var(--zsrb-gold-dark);
}

/* Utility Bar */
.anniversary-topbar {
  background: var(--zsrb-green-dark);
  color: rgba(255, 255, 255, 0.85);
  font-size: 0.85rem;
  padding: 8px 24px;
  border-bottom: 2px solid var(--zsrb-gold);
}

.anniversary-topbar .container {
  max-width: 1240px;
  margin: 0 auto;
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
}

.topbar-back-link {
  color: var(--zsrb-gold-light);
  font-weight: 600;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 3px 10px;
  border-radius: 6px;
  background: rgba(201, 168, 76, 0.15);
  border: 1px solid rgba(201, 168, 76, 0.3);
}

.topbar-back-link:hover {
  color: #fff;
  background: rgba(201, 168, 76, 0.35);
}

/* Header */
.site-header {
  background: #ffffff;
  border-bottom: 1px solid var(--border-color);
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.04);
  position: sticky;
  top: 0;
  z-index: 100;
}

.header-inner {
  max-width: 1240px;
  margin: 0 auto;
  padding: 14px 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
}

.header-brand {
  display: flex;
  align-items: center;
  gap: 16px;
  text-decoration: none;
}

.brand-emblem {
  width: 52px;
  height: 52px;
  background: linear-gradient(135deg, var(--zsrb-green-dark), var(--zsrb-green));
  border: 2px solid var(--zsrb-gold);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--zsrb-gold-light);
  font-weight: 900;
  font-size: 1.25rem;
  box-shadow: 0 3px 10px rgba(201, 168, 76, 0.25);
  flex-shrink: 0;
}

.brand-text h1,
.brand-text .brand-title {
  margin: 0;
  font-size: 1.25rem;
  font-weight: 800;
  font-family: 'Cinzel', 'Playfair Display', Georgia, serif;
  color: var(--zsrb-green-dark);
  line-height: 1.2;
}

.brand-text p {
  margin: 2px 0 0;
  font-size: 0.8rem;
  color: var(--zsrb-gold-dark);
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 1px;
}

/* Navigation */
.main-navigation ul {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  align-items: center;
  gap: 6px;
}

.main-navigation a {
  display: inline-block;
  padding: 8px 14px;
  font-size: 0.92rem;
  font-weight: 600;
  color: var(--zsrb-green-dark);
  border-radius: 8px;
  transition: all 0.2s ease;
}

.main-navigation a:hover,
.main-navigation .current-menu-item > a {
  background: var(--zsrb-green-subtle);
  color: var(--zsrb-green);
}

.main-navigation li.menu-item-has-children {
  position: relative;
}

.main-navigation .sub-menu {
  position: absolute;
  top: 100%;
  left: 0;
  background: #ffffff;
  border: 1px solid var(--border-color);
  box-shadow: 0 10px 30px rgba(0,0,0,0.1);
  border-radius: 10px;
  padding: 8px 0;
  min-width: 220px;
  display: none;
  flex-direction: column;
  z-index: 200;
}

.main-navigation li.menu-item-has-children:hover > .sub-menu {
  display: flex;
}

.main-navigation .sub-menu a {
  padding: 8px 18px;
  border-radius: 0;
  font-size: 0.88rem;
}

.main-navigation .sub-menu a:hover {
  background: var(--zsrb-green-subtle);
}

/* Hero Section */
.hero-jubilee {
  position: relative;
  background: radial-gradient(circle at center, #1b452d 0%, #0d2316 100%);
  color: #ffffff;
  padding: 70px 24px 80px;
  text-align: center;
  overflow: hidden;
  border-bottom: 4px solid var(--zsrb-gold);
}

.hero-jubilee::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0; bottom: 0;
  background-image: radial-gradient(rgba(201, 168, 76, 0.12) 1.5px, transparent 1.5px);
  background-size: 32px 32px;
  pointer-events: none;
}

.hero-content {
  position: relative;
  max-width: 900px;
  margin: 0 auto;
  z-index: 2;
}

.hero-badge-100 {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 8px 22px;
  background: rgba(201, 168, 76, 0.15);
  border: 1px solid var(--zsrb-gold);
  border-radius: 30px;
  font-size: 0.9rem;
  font-weight: 700;
  color: var(--zsrb-gold-light);
  letter-spacing: 1.5px;
  text-transform: uppercase;
  margin-bottom: 24px;
}

.hero-title {
  font-size: 2.8rem;
  line-height: 1.2;
  margin: 0 0 16px;
  color: #ffffff;
  font-weight: 800;
}

.hero-title span {
  color: var(--zsrb-gold-light);
  display: block;
  font-size: 2.1rem;
  margin-top: 8px;
}

.hero-dates {
  font-size: 1.35rem;
  font-family: 'Cinzel', serif;
  color: var(--zsrb-gold);
  letter-spacing: 4px;
  margin-bottom: 24px;
  font-weight: 700;
}

.hero-intro {
  font-size: 1.12rem;
  line-height: 1.7;
  color: rgba(255, 255, 255, 0.88);
  max-width: 760px;
  margin: 0 auto 36px;
}

/* Poem Box */
.poem-box {
  background: rgba(255, 255, 255, 0.07);
  border: 1px solid rgba(201, 168, 76, 0.4);
  border-radius: 14px;
  padding: 24px 32px;
  margin: 0 auto 36px;
  max-width: 620px;
  font-family: 'Playfair Display', Georgia, serif;
  font-style: italic;
  font-size: 1.05rem;
  line-height: 1.9;
  color: #f7eed7;
  position: relative;
  box-shadow: 0 8px 30px rgba(0,0,0,0.2);
}

.poem-box::before {
  content: '“';
  position: absolute;
  top: -15px;
  left: 20px;
  font-size: 3.5rem;
  color: var(--zsrb-gold);
  font-family: serif;
  line-height: 1;
}

/* Quick Hub Grid */
.hub-section {
  max-width: 1240px;
  margin: 0 auto 70px;
  padding: 40px 24px 0;
  position: relative;
  z-index: 10;
}

.hub-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 20px;
}

@media (min-width: 1100px) {
  .hub-grid {
    grid-template-columns: repeat(5, 1fr);
  }
}

.hub-card {
  background-color: var(--zsrb-green-dark);
  background-size: cover;
  background-position: center;
  border-radius: 16px;
  border: none;
  box-shadow: 0 6px 24px rgba(0, 0, 0, 0.3);
  transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  text-decoration: none;
  position: relative;
  overflow: hidden;
  min-height: 320px;
}

.hub-card::before {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(
    to bottom,
    rgba(11, 26, 19, 0.10) 0%,
    rgba(11, 26, 19, 0.30) 35%,
    rgba(11, 26, 19, 0.88) 65%,
    rgba(11, 26, 19, 0.97) 100%
  );
  border-radius: 16px;
  transition: background 0.3s ease;
  z-index: 0;
}

.hub-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 18px 40px rgba(0, 0, 0, 0.45);
}

.hub-card:hover::before {
  background: linear-gradient(
    to bottom,
    rgba(11, 26, 19, 0.05) 0%,
    rgba(11, 26, 19, 0.25) 35%,
    rgba(11, 26, 19, 0.82) 65%,
    rgba(11, 26, 19, 0.95) 100%
  );
}

.hub-card-inner {
  position: relative;
  z-index: 1;
  display: flex;
  flex-direction: column;
  width: 100%;
  padding: 0 24px 24px;
  margin-top: auto;
}

.hub-card h3 {
  margin: 0 0 10px;
  font-size: 1.18rem;
  font-weight: 700;
  color: #ffffff;
  text-shadow: 0 1px 4px rgba(0,0,0,0.5);
}

.hub-card p {
  margin: 0 0 18px;
  font-size: 0.88rem;
  color: rgba(255, 255, 255, 0.88);
  line-height: 1.55;
  flex-grow: 1;
  text-shadow: 0 1px 3px rgba(0,0,0,0.4);
}

.hub-action {
  font-size: 0.85rem;
  font-weight: 700;
  color: var(--zsrb-gold);
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin-top: auto;
  text-shadow: 0 1px 3px rgba(0,0,0,0.5);
}

.hub-card:hover .hub-action {
  color: #f5d78e;
}




/* Content Container & Page Styling */
.content-wrapper {
  max-width: 1240px;
  margin: 0 auto 70px;
  padding: 0 24px;
}

.page-header-box {
  background: #ffffff;
  border-radius: 14px;
  padding: 36px 32px;
  margin-bottom: 30px;
  border: 1px solid var(--border-color);
  box-shadow: 0 4px 15px rgba(0,0,0,0.03);
}

.page-header-box h1 {
  margin: 0 0 8px;
  font-size: 2.2rem;
  color: var(--zsrb-green-dark);
}

.page-content-card {
  background: #ffffff;
  border-radius: 16px;
  padding: 40px;
  border: 1px solid var(--border-color);
  box-shadow: 0 4px 20px rgba(0,0,0,0.03);
  line-height: 1.75;
}

/* Gallery Grid Styling (for Retro and other photo pages) */
.gallery, .wp-block-gallery {
  display: grid !important;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)) !important;
  gap: 16px !important;
  margin: 24px 0 !important;
}

.gallery-item, .wp-block-gallery figure {
  margin: 0 !important;
  border-radius: 10px !important;
  overflow: hidden !important;
  background: #f3f4f6 !important;
  border: 1px solid #e5e7eb !important;
  transition: transform 0.25s ease, box-shadow 0.25s ease !important;
}

.gallery-item:hover, .wp-block-gallery figure:hover {
  transform: scale(1.02);
  box-shadow: 0 8px 20px rgba(0,0,0,0.12);
}

.gallery-item img, .wp-block-gallery figure img {
  width: 100% !important;
  height: 180px !important;
  object-fit: cover !important;
  display: block !important;
  transition: opacity 0.2s ease;
}

/* Responsive Embeds */
iframe {
  max-width: 100% !important;
  border-radius: 12px;
  border: none;
}

/* Gwolle Guestbook styling */
#gwolle_gb {
  margin-top: 20px;
}
#gwolle_gb input[type="text"],
#gwolle_gb input[type="email"],
#gwolle_gb textarea {
  width: 100%;
  padding: 10px 14px;
  border-radius: 8px;
  border: 1px solid var(--border-color);
  margin-bottom: 12px;
}
#gwolle_gb input[type="submit"] {
  background: var(--zsrb-green);
  color: #ffffff;
  padding: 12px 28px;
  border-radius: 8px;
  border: none;
  font-weight: 700;
  cursor: pointer;
  transition: background 0.2s;
}
#gwolle_gb input[type="submit"]:hover {
  background: var(--zsrb-green-light);
}

/* Unified School Footer (1:1 identical to zsrb.leszno.pl) */
footer.school-footer-ref {
  background: #23392e !important;
  color: #ffffff !important;
  padding: 22px 24px !important;
  border: 0 !important;
  align-items: start !important;
  margin: 0 !important;
  width: 100% !important;
  box-sizing: border-box !important;
  display: block !important;
}

footer.school-footer-ref .school-footer-container {
  max-width: 1200px !important;
  margin: 0 auto !important;
  display: grid !important;
  grid-template-columns: minmax(0, 1.4fr) minmax(0, 1fr) !important;
  gap: 28px !important;
  align-items: start !important;
  justify-content: space-between !important;
  box-sizing: border-box !important;
}

footer.school-footer-ref .school-footer-contact {
  display: block !important;
}

footer.school-footer-ref .footer-identity {
  display: flex !important;
  align-items: center !important;
  gap: 14px !important;
  margin-bottom: 10px !important;
}

footer.school-footer-ref .footer-identity img {
  width: 76px !important;
  height: 60px !important;
  object-fit: contain !important;
  filter: brightness(0) invert(1) !important;
  flex: 0 0 76px !important;
}

footer.school-footer-ref .footer-identity h2 {
  font: 600 16px / 1.3 Arial, sans-serif !important;
  letter-spacing: 0 !important;
  color: #ffffff !important;
  margin: 0 !important;
  max-width: 390px !important;
}

footer.school-footer-ref .footer-identity p {
  font: 400 14px / 1.35 Arial, sans-serif !important;
  letter-spacing: 0 !important;
  color: rgb(237, 242, 237) !important;
  margin: 2px 0 0 !important;
}

footer.school-footer-ref address {
  font: 400 14px / 1.45 Arial, sans-serif !important;
  font-style: normal !important;
  color: rgb(237, 242, 237) !important;
  margin: 0 !important;
}

footer.school-footer-ref address > div {
  display: flex !important;
  align-items: center !important;
  gap: 11px !important;
  margin: 4px 0 !important;
  color: rgb(237, 242, 237) !important;
}

footer.school-footer-ref address svg {
  width: 15px !important;
  height: 15px !important;
  flex: 0 0 15px !important;
  fill: none !important;
  stroke: currentColor !important;
  stroke-width: 1.8 !important;
  stroke-linecap: round !important;
  stroke-linejoin: round !important;
}

footer.school-footer-ref address a {
  font: inherit !important;
  color: inherit !important;
  text-decoration: none !important;
}

footer.school-footer-ref address a:hover {
  text-decoration: underline !important;
  color: rgb(240, 212, 98) !important;
}

footer.school-footer-ref .social-links {
  display: flex !important;
  flex-wrap: wrap !important;
  place-content: start flex-start !important;
  gap: 10px 18px !important;
  padding-top: 4px !important;
  max-width: 420px !important;
  justify-self: end !important;
}

footer.school-footer-ref .social-links a {
  font: 400 13px / 1.4 Arial, sans-serif !important;
  color: rgb(237, 242, 237) !important;
  text-decoration: none !important;
  transition: color 0.15s ease !important;
}

footer.school-footer-ref .social-links a:hover {
  color: rgb(240, 212, 98) !important;
  text-decoration: underline !important;
}

.copyright-bar {
  background: #0b1a13 !important;
  color: rgba(255, 255, 255, 0.45) !important;
  text-align: center !important;
  font-size: 12px !important;
  padding: 14px 20px !important;
  letter-spacing: 0.3px !important;
  font-family: Arial, sans-serif !important;
}

/* WordPress Block Embeds & Video Styling */
.wp-block-embed {
  margin: 32px auto 44px !important;
  max-width: 900px !important;
}

.wp-block-embed__wrapper {
  position: relative;
  border-radius: 14px;
  overflow: hidden;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.15);
  border: 1px solid var(--border-color);
  background: #000;
}

.wp-block-embed figcaption {
  font-family: 'Cinzel', serif;
  font-size: 1.12rem;
  font-weight: 700;
  color: var(--zsrb-green-dark);
  margin-top: 14px;
  text-align: center;
}

/* Standalone Images & Monograph Scans */
.page-content-card img {
  max-width: 100%;
  height: auto;
  border-radius: 8px;
}

/* General Video Responsive Fallback */
.video-responsive-wrap {
  position: relative;
  padding-bottom: 56.25%;
  height: 0;
  overflow: hidden;
  max-width: 100%;
  margin: 28px 0;
  border-radius: 12px;
  box-shadow: 0 6px 24px rgba(0,0,0,0.12);
  background: #000;
}

.video-responsive-wrap iframe {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  border: 0;
}

/* Lightbox Modal */
.zsrb-lightbox-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  background: rgba(15, 38, 25, 0.94);
  backdrop-filter: blur(8px);
  z-index: 99999;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.25s ease, visibility 0.25s ease;
  padding: 20px;
}

.zsrb-lightbox-overlay.is-visible {
  opacity: 1;
  visibility: visible;
}

.zsrb-lightbox-content {
  position: relative;
  max-width: 90vw;
  max-height: 90vh;
  display: flex;
  align-items: center;
  justify-content: center;
}

.zsrb-lightbox-content img {
  max-width: 90vw;
  max-height: 85vh;
  object-fit: contain;
  border-radius: 8px;
  border: 2px solid var(--zsrb-gold);
  box-shadow: 0 15px 50px rgba(0,0,0,0.6);
}

.zsrb-lightbox-close {
  position: absolute;
  top: -45px;
  right: -10px;
  background: none;
  border: none;
  color: #ffffff;
  font-size: 2.5rem;
  line-height: 1;
  cursor: pointer;
  padding: 5px 12px;
  transition: color 0.2s;
}

.zsrb-lightbox-close:hover {
  color: var(--zsrb-gold-light);
}

/* Mobile Toggle */
.mobile-menu-toggle {
  display: none;
  background: none;
  border: none;
  cursor: pointer;
  padding: 10px;
  flex-direction: column;
  gap: 5px;
}

.mobile-menu-toggle span {
  display: block;
  width: 24px;
  height: 2px;
  background: var(--zsrb-green-dark);
  border-radius: 2px;
  transition: all 0.3s ease;
}

/* Standard WP Content Alignments & Elements */
.aligncenter {
  display: block;
  margin-left: auto;
  margin-right: auto;
}

.alignleft {
  float: left;
  margin-right: 20px;
  margin-bottom: 20px;
}

.alignright {
  float: right;
  margin-left: 20px;
  margin-bottom: 20px;
}

.wp-caption {
  max-width: 100%;
  margin-bottom: 20px;
  text-align: center;
}

.wp-caption-text {
  font-size: 0.85rem;
  color: var(--text-muted);
  margin-top: 6px;
  font-style: italic;
}

table {
  width: 100%;
  border-collapse: collapse;
  margin: 24px 0;
}

th, td {
  padding: 12px 16px;
  border: 1px solid var(--border-color);
  text-align: left;
}

th {
  background: var(--zsrb-green-subtle);
  color: var(--zsrb-green-dark);
  font-weight: 700;
}

/* Mobile Responsive */
@media (max-width: 860px) {
  .header-inner {
    flex-direction: row;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
  }
  
  .mobile-menu-toggle {
    display: flex;
  }
  
  .main-navigation {
    display: none;
    width: 100%;
    margin-top: 14px;
    padding-top: 14px;
    border-top: 1px solid var(--border-color);
  }
  
  .main-navigation.is-open {
    display: block;
  }
  
  .main-navigation ul {
    flex-direction: column;
    align-items: stretch;
    gap: 4px;
  }
  
  .main-navigation .sub-menu {
    position: static;
    box-shadow: none;
    border: none;
    padding-left: 16px;
    background: transparent;
    display: flex;
  }
  
  .hero-title {
    font-size: 2rem;
  }
  .hero-title span {
    font-size: 1.5rem;
  }
  footer.school-footer-ref {
    grid-template-columns: 1fr !important;
    padding: 24px 4% !important;
    gap: 20px !important;
  }
  footer.school-footer-ref .footer-identity img {
    width: 56px !important;
    height: 44px !important;
    flex-basis: 56px !important;
  }
  footer.school-footer-ref .footer-identity h2 {
    font-size: 14px !important;
  }
  footer.school-footer-ref .footer-identity p {
    font-size: 12px !important;
  }
  footer.school-footer-ref address {
    font-size: 13px !important;
  }
  footer.school-footer-ref .social-links {
    justify-self: start !important;
    padding-top: 12px !important;
    border-top: 1px solid rgba(255, 255, 255, 0.1) !important;
    width: 100% !important;
  }
  footer.school-footer-ref .social-links a {
    font-size: 12.5px !important;
  }
}

