/* Centralized styles extracted from index.html
   Keep this file as the single source for global styles.
   Page-scoped CSS (if needed) should be added as assets/css/page-<slug>.css
*/

/* Global styles for Ziarno na zasiew */

/* Base */
body {
  font-family: 'Montserrat', sans-serif;
  margin: 0;
  padding: 0;
}

/* Utilities */
.sr-only {
  position: absolute;
  left: -999px;
  top: auto;
  width: 1px;
  height: 1px;
  overflow: hidden;
}

/* Header */
header {
  background-image: url('../../pliki/396738205_122106128330090196_6201589684495851760_n.jpg');
  background-size: cover;
  background-position: center;
  color: #fff;
  padding: 50px;
  text-align: justify;
  box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
  position: relative;
}

/* === UNIFIED NAVBAR (ONLY THIS ONE) === */
.site-nav {
  position: sticky;
  top: 0;
  z-index: 100;
  background: #fff;
  border-bottom: 1px solid #eee;
  box-shadow: 0 1px 8px rgba(0,0,0,0.06);
}

.site-nav .inner {
  max-width: 1200px;
  margin: 0 auto;
  padding: 10px 16px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  position: relative;
  gap: 12px;
}

.nav-menu {
  list-style: none;
  display: flex;
  gap: 10px 22px;
  margin: 0;
  padding: 0;
  align-items: center;
  flex-wrap: wrap;
}

.nav-menu a {
  display: inline-block;
  padding: 8px 10px;
  border-radius: 8px;
  color: #333;
  text-decoration: none;
  font-weight: 600;
  transition: background .15s ease, color .15s ease;
}

.nav-menu a:hover { background: #f6f6f6; }
.nav-menu a.active {
  background: rgba(248,178,77,.15);
  color: #cc8c2e;
}

/* hamburger */
.nav-toggle {
  display: none;
  width: 40px;
  height: 40px;
  border: none;
  background: transparent;
  padding: 8px;
  margin: 0;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  border-radius: 6px;
  transition: background-color .15s ease;
}

.nav-toggle:hover {
  background-color: rgba(248,178,77,0.08);
}

.nav-toggle:focus-visible { 
  outline: 2px solid #F8B24D; 
  outline-offset: 2px; 
}

.nav-toggle span {
  display: block;
  width: 22px;
  height: 2px;
  background: #333;
  position: relative;
  transition: all .2s ease;
}

.nav-toggle span::before,
.nav-toggle span::after {
  content: "";
  position: absolute;
  left: 0;
  width: 22px;
  height: 2px;
  background: #333;
  transition: all .2s ease;
}

.nav-toggle span::before { top: -6px; }
.nav-toggle span::after  { bottom: -6px; }

/* logo koło */
.site-nav .logo-circle {
  width: 120px;
  height: 120px;
  border-radius: 50%;
  background: #fff !important;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 2px 5px rgba(0,0,0,.1);
  position: absolute;
  right: 16px;
  top: 50%;
  transform: translateY(-50%);
  z-index: 20;
  overflow: hidden;
}

.site-nav .logo-circle a {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  height: 100%;
  background-color: #fff;
}

.site-nav .logo-circle img { 
  width: 90%;
  height: 90%;
  object-fit: contain;
  object-position: center;
  display: block;
}

/* desktop: miejsce na logo */
@media (min-width: 901px) {
  .site-nav .nav-menu { padding-right: 150px; }
}

/* mobile */
@media (max-width: 900px) {
  .site-nav .inner { 
    padding: 12px 16px;
    justify-content: space-between;
    align-items: center;
  }
  
  .nav-toggle { 
    display: inline-flex;
    order: 1;
  }
  
  .site-nav .logo-circle {
    width: 54px; 
    height: 54px;
    position: relative;
    right: auto;
    top: auto;
    bottom: auto;
    transform: none;
    order: 2;
    flex-shrink: 0;
  }
  
  .site-nav .logo-circle img { 
    width: 85%;
    height: 85%;
  }
  
  /* menu pełnoszerokie */
  .nav-menu {
    position: fixed;               
    left: 0; 
    right: 0; 
    top: 78px;
    background: #fff;
    border-top: 1px solid #eee;
    box-shadow: 0 4px 12px rgba(0,0,0,.08);
    display: none;
    z-index: 30;
    padding: 24px;
    width: 100vw;
    box-sizing: border-box;
    max-height: calc(100vh - 78px);
    overflow-y: auto;
    grid-template-columns: 1fr 1fr;
    grid-gap: 16px;
    align-items: stretch;
  }
  
  .site-nav.is-open .nav-menu { 
    display: grid;
  }
  
  .nav-menu li {
    margin: 0;
    display: flex;
  }
  
  .nav-menu a { 
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    min-height: 80px;
    padding: 16px 12px;
    border-radius: 12px;
    text-align: center;
    font-size: 15px;
    font-weight: 600;
    box-sizing: border-box;
    background: #f8f9fa;
    border: 2px solid #e9ecef;
    transition: all .2s ease;
    line-height: 1.3;
    word-break: break-word;
    hyphens: auto;
  }
  
  .nav-menu a:hover,
  .nav-menu a.active {
    background: rgba(248,178,77,.15);
    border-color: #F8B24D;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(248,178,77,.2);
  }

  /* animacja X */
  .site-nav.is-open .nav-toggle span { 
    background: transparent; 
  }
  .site-nav.is-open .nav-toggle span::before { 
    top: 0; 
    transform: rotate(45deg); 
  }
  .site-nav.is-open .nav-toggle span::after { 
    bottom: 0; 
    transform: rotate(-45deg); 
  }

  main { padding-top: 16px; }
}

@media (max-width: 480px) {
  .nav-menu {
    grid-template-columns: 1fr !important;
    padding: 20px !important;
    grid-gap: 12px !important;
  }
  
  .nav-menu a {
    font-size: 16px !important;
    min-height: 70px !important;
    padding: 18px 16px !important;
  }
}

/* === HIDE ALL OLD NAVBAR ELEMENTS === */
nav:not(.site-nav),
.nav-links,
.separator {
  display: none !important;
}

/* === REST OF SITE STYLES === */

/* Layouts */
.layout-two-column main {
  display: flex;
  padding: 40px 20px;
  align-items: stretch;
}

.layout-single-column main {
  display: flex;
  flex-direction: column;
  padding: 40px 20px;
}

/* Card blocks */
.left-column {
  background-color: #F8B24D;
  color: #fff;
  padding: 30px;
  margin-bottom: 20px;
  border-radius: 10px;
  box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
  display: flex;
  flex-direction: column;
}

.left-column p {
  font-weight: bold;
  text-align: center;
  margin-bottom: 10px;
  transition: color 0.3s ease;
}

.right-column {
  background-color: #f2f2f2;
  text-align: center;
  padding: 30px;
  border-radius: 10px;
  box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
  display: flex;
  flex-direction: column;
}

/* Two-column widths */
.layout-two-column .left-column {
  width: 25%;
  margin-bottom: 0;
}

.layout-two-column .right-column {
  width: 70%;
  margin-left: 20px;
}

/* Components */
.event-row {
  display: flex;
  justify-content: center;
  gap: 40px;
  flex-wrap: wrap;
  margin-top: 30px;
}

.event-box {
  width: 800px;
  max-width: 90%;
  background-color: #fff;
  padding: 20px;
  border-radius: 12px;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.08);
  text-align: center;
}

.event-box h2 {
  font-size: 20px;
  color: #F8B24D;
  margin-bottom: 5px;
}

.event-box p {
  font-size: 16px;
  font-weight: bold;
  margin-bottom: 15px;
  color: #333;
}

.event-box img {
  max-width: 100%;
  height: auto;
  border-radius: 8px;
  box-shadow: 0 2px 5px rgba(0,0,0,0.1);
}

/* Typography */
h1 { font-size: clamp(24px, 3vw, 36px); margin-bottom: 15px; }
h2 { font-size: clamp(20px, 2vw, 28px); margin-bottom: 10px; }
p  { font-size: clamp(16px, 1vw, 20px); }
h1, h2, h3 { text-align: center; }

/* Past Events */
#past-events-list {
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.5s ease, padding 0.3s ease;
  padding-top: 0;
  padding-bottom: 0;
}

#past-events-list.expanded {
  max-height: 500px;
  overflow-y: auto;
  padding-right: 5px;
  scrollbar-width: thin;
  scrollbar-color: #F8B24D #fff;
}

/* Media in right column */
.right-column img {
  display: block;
  margin: 5px auto;
  padding: 5px;
  width: auto;
  height: auto;
  max-width: 500px;
  max-height: 900px;
  object-fit: contain;
  background-color: #fff;
  border-radius: 8px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

/* Interaction cues */
#toggle-past-events {
    cursor: pointer;
}

/* Home hero quote styling */
.hero-quote {
  white-space: pre-line;
  line-height: 0.7;
  max-width: 58ch;
  margin: 0 auto;
  letter-spacing: 0.2px;
  position: relative;
  text-align: center;
  padding: 25px 30px 15px 30px;
}

.hero-quote::before,
.hero-quote::after {
  content: '"';
  position: absolute;
  font-size: 3rem;
  line-height: 1;
  color: rgba(255,255,255,0.3);
  pointer-events: none;
  user-select: none;
}
.hero-quote::before { left: 5px; top: 0px; }
.hero-quote::after  { content: '"'; right: 5px; bottom: -5px; }

.hero-quote__accent {
  display: block;
  margin-top: 8px;
  font-weight: 700;
  font-size: clamp(20px, 2.2vw, 28px);
  text-shadow: 0 1px 0 rgba(0,0,0,0.05);
}

/* Interactive elements */
.layout-two-column .left-column p[data-topic] {
  cursor: pointer;
  padding: 10px;
  border-radius: 5px;
  transition: background-color 0.3s ease;
  list-style: none;
}

.layout-two-column .left-column p[data-topic].active {
  background-color: rgba(255, 255, 255, 0.2);
}

.layout-two-column .left-column p[data-topic]:hover {
  background-color: rgba(255, 255, 255, 0.1);
}

.layout-two-column .left-column ul {
  list-style: none;
  padding-left: 0;
}

.layout-two-column .left-column li {
  list-style: none;
}

#toggle-past-events {
  cursor: pointer;
  padding: 10px;
  border-radius: 5px;
  transition: background-color 0.3s ease;
}

#toggle-past-events:hover {
  background-color: rgba(255, 255, 255, 0.1);
}

/* Mobile responsive */
@media screen and (max-width: 768px) {
  .layout-two-column main {
    flex-direction: column !important;
    padding: 20px 15px;
    align-items: stretch;
  }

  .layout-two-column .left-column,
  .layout-two-column .right-column {
    width: 100% !important;
    margin: 0 0 20px 0 !important;
    padding: 20px !important;
    box-sizing: border-box;
  }

  .layout-single-column main {
    flex-direction: column !important;
    padding: 20px 15px;
    align-items: stretch;
  }

  .layout-single-column .left-column,
  .layout_single-column .right-column {
    width: 100% !important;
    margin: 0 0 20px 0 !important;
    padding: 20px !important;
    box-sizing: border-box;
  }

  .layout-two-column .left-column p,
  .layout-single-column .left-column p {
    text-align: left;
    font-size: 16px;
    line-height: 1.4;
  }

  .layout-single-column .left-column .hero-quote {
    text-align: center !important;
    line-height: 1 !important;
    padding: 20px 25px 10px 25px;
  }

  .layout-single-column .left-column .hero-quote::before,
  .layout-single-column .left-column .hero-quote::after {
    font-size: 2.5rem;
  }

  .layout-single-column .left-column .hero-quote::before { left: 2px; top: -5px; }
  .layout-single-column .left-column .hero-quote::after { right: 2px; bottom: -10px; }

  .layout-two-column .right-column,
  .layout_single-column .right-column {
    text-align: left;
  }

  .pdf-frame {
    height: 400px !important;
  }

  .right-column img {
    max-width: 100% !important;
    max-height: 300px !important;
  }
}

@media screen and (max-width: 480px) {
  .layout-two-column main,
  .layout-single-column main {
    padding: 15px 10px;
  }

  .layout-two-column .left-column,
  .layout-two-column .right-column,
  .layout-single-column .left-column,
  .layout-single-column .right-column {
    padding: 15px !important;
    margin-bottom: 15px !important;
  }

  .pdf-frame {
    height: 300px !important;
  }
}

@media (max-width: 400px) {
  h1 { font-size: 22px; }
  h2 { font-size: 18px; }
  p  { font-size: 16px; }
}

@media (hover: none) {
  .nav-menu a,
  #toggle-past-events {
    -webkit-tap-highlight-color: rgba(248,178,77,0.2);
  }
  #past-events-list.expanded {
    -webkit-overflow-scrolling: touch;
  }
}