/*
Theme Name: Izolani
Theme URI: https://izola.si
Author: Lista Izolani
Description: WordPress tema za Listo/Društvo Izolani. Postavitev je narejena s Tailwind CSS (CDN), vsa vsebina (glava, noga, strani, novice, člani) pa se ureja preko strani z urejevalnikom in polj Advanced Custom Fields - v predlogah ni trdo kodirane vsebine.
Version: 1.3.3
Requires at least: 6.0
Requires PHP: 7.4
Tested up to: 6.6
License: GNU General Public License v2 or later
License URI: https://www.gnu.org/licenses/gpl-2.0.html
Text Domain: izolani
*/

body { margin: 0; }
a { text-decoration: none; }
a:hover { text-decoration: underline; }

.img-placeholder {
  width: 100%; height: 100%;
  background: repeating-linear-gradient(45deg, #EDE7D8, #EDE7D8 10px, #E3DCC8 10px, #E3DCC8 20px);
  display: flex; align-items: center; justify-content: center;
  color: #8b8368; font-family: 'Courier New', monospace; font-size: 12px; text-align: center; padding: 8px;
}

.img-placeholder-news {
  width: 100%; height: 100%;
  background: repeating-linear-gradient(45deg, #EDE7D8, #EDE7D8 10px, #E3DCC8 10px, #E3DCC8 20px);
  display: flex; align-items: center; justify-content: center;
  color: #8b8368; font-family: 'Courier New', monospace; font-size: 12px; text-align: center; padding: 8px;
}

.page-badge {
  display: inline-block;
  margin-bottom: 1rem;
  padding: 0.375rem 0.875rem;
  border-radius: 9999px;
  font-size: 13px;
  font-weight: 800;
}
.page-badge--red { background: #FCE8E6; color: #AD211A; }
.page-badge--orange { background: #FDEBD6; color: #A8520A; }
.page-badge--yellow { background: #FFF3C4; color: #755400; }
.page-badge--green { background: #EAF2DF; color: #3E7A16; }
.page-badge--greendark { background: #EAF2DF; color: #315F14; }

/* ==========================================================================
   Rich text (post content / ACF wysiwyg) - everything inside .entry-content.
   Tailwind's preflight resets headings, lists etc. to unstyled, so the
   editor-entered markup gets its typography from here.
   ========================================================================== */

.entry-content > :first-child { margin-top: 0; }
.entry-content > :last-child { margin-bottom: 0; }

/* Paragraphs & block spacing */
.entry-content p,
.entry-content ul,
.entry-content ol,
.entry-content dl,
.entry-content blockquote,
.entry-content figure,
.entry-content table,
.entry-content pre {
  margin: 0 0 1.25rem;
}

/* Headings */
.entry-content h1,
.entry-content h2,
.entry-content h3,
.entry-content h4,
.entry-content h5,
.entry-content h6 {
  font-family: "Baloo 2", sans-serif;
  font-weight: 700;
  line-height: 1.25;
  color: #241F3D;
  margin: 2rem 0 0.75rem;
}
.entry-content h1 { font-size: 32px; font-weight: 800; }
.entry-content h2 { font-size: 26px; }
.entry-content h3 { font-size: 22px; }
.entry-content h4 { font-size: 19px; }
.entry-content h5 { font-size: 17px; }
.entry-content h6 {
  font-size: 14px;
  font-weight: 800;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: #5B5670;
}
/* Heading directly after another heading sits closer */
.entry-content :is(h1, h2, h3, h4, h5, h6) + :is(h1, h2, h3, h4, h5, h6) { margin-top: 0.5rem; }

/* Inline text */
.entry-content a {
  color: #3E7A16;
  font-weight: 700;
  text-decoration: underline;
  text-decoration-thickness: 2px;
  text-underline-offset: 3px;
}
.entry-content a:hover { color: #241F3D; }
.entry-content strong,
.entry-content b { font-weight: 800; color: #241F3D; }
.entry-content em,
.entry-content i { font-style: italic; }
.entry-content u { text-decoration: underline; }
.entry-content s,
.entry-content del { text-decoration: line-through; }
.entry-content mark { background: #FFF3C4; color: inherit; padding: 0 0.15em; }
.entry-content small { font-size: 0.875em; }
.entry-content sub,
.entry-content sup { font-size: 0.75em; line-height: 0; position: relative; }
.entry-content sup { top: -0.5em; }
.entry-content sub { bottom: -0.25em; }

/* Unordered lists - colored brand bullets */
.entry-content ul {
  list-style: none;
  padding-left: 1.75em;
}
.entry-content ul > li {
  position: relative;
  padding-left: 0.25em;
}
.entry-content ul > li::before {
  position: absolute;
  top: 0.72em;
  left: -1.25em;
  width: 0.5em;
  height: 0.5em;
  border-radius: 50%;
  background-color: #E2231A;
  content: "";
}
.entry-content ul > li:nth-child(4n + 2)::before { background-color: #F4871E; }
.entry-content ul > li:nth-child(4n + 3)::before { background-color: #FDC02F; }
.entry-content ul > li:nth-child(4n)::before { background-color: #78B833; }

/* Ordered lists */
.entry-content ol {
  list-style: decimal;
  padding-left: 1.75em;
}
.entry-content ol > li { padding-left: 0.25em; }
.entry-content ol > li::marker { font-weight: 800; color: #241F3D; }

.entry-content li + li { margin-top: 0.4rem; }
.entry-content li > ul,
.entry-content li > ol { margin: 0.4rem 0 0; }

/* Definition lists */
.entry-content dt { font-weight: 800; color: #241F3D; }
.entry-content dd { margin: 0 0 0.75rem 1.25rem; }

/* Quotes */
.entry-content blockquote {
  padding: 0.25rem 0 0.25rem 1.25rem;
  border-left: 4px solid #F4871E;
  font-style: italic;
  font-size: 1.1em;
  color: #241F3D;
}
.entry-content blockquote p:last-child { margin-bottom: 0; }
.entry-content blockquote cite {
  display: block;
  margin-top: 0.5rem;
  font-size: 0.85em;
  font-style: normal;
  font-weight: 700;
  color: #5B5670;
}

/* Horizontal rule */
.entry-content hr {
  border: 0;
  border-top: 2px solid #E9E2D3;
  margin: 2rem 0;
}

/* Images, figures & captions */
.entry-content img {
  max-width: 100%;
  height: auto;
  border-radius: 10px;
}
.entry-content figure { max-width: 100%; }
.entry-content figcaption,
.entry-content .wp-caption-text {
  margin-top: 0.5rem;
  font-size: 14px;
  line-height: 1.5;
  color: #5B5670;
  text-align: center;
}
.entry-content .wp-caption { max-width: 100%; margin-bottom: 1.25rem; }

/* WordPress alignment classes (classic editor + blocks) */
.entry-content .alignleft { float: left; margin: 0.35rem 1.5rem 1rem 0; }
.entry-content .alignright { float: right; margin: 0.35rem 0 1rem 1.5rem; }
.entry-content .aligncenter { display: block; margin-left: auto; margin-right: auto; }
.entry-content .has-text-align-left { text-align: left; }
.entry-content .has-text-align-center { text-align: center; }
.entry-content .has-text-align-right { text-align: right; }
.entry-content::after { content: ""; display: table; clear: both; }
@media (max-width: 640px) {
  .entry-content .alignleft,
  .entry-content .alignright { float: none; margin: 0 0 1.25rem; }
}

/* Tables */
.entry-content table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.95em;
}
.entry-content th,
.entry-content td {
  padding: 0.6rem 0.8rem;
  border-bottom: 1px solid #E9E2D3;
  text-align: left;
  vertical-align: top;
}
.entry-content th,
.entry-content thead td {
  background: #F4EFE6;
  font-weight: 800;
  color: #241F3D;
}
.entry-content .wp-block-table { overflow-x: auto; }

/* Code */
.entry-content code,
.entry-content kbd {
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: 0.9em;
  background: #F4EFE6;
  border-radius: 4px;
  padding: 0.1em 0.35em;
}
.entry-content pre {
  overflow-x: auto;
  padding: 1rem 1.25rem;
  background: #F4EFE6;
  border-radius: 10px;
  font-size: 0.9em;
  line-height: 1.6;
}
.entry-content pre code { background: none; padding: 0; }

/* Embeds (YouTube, maps ...) */
.entry-content iframe,
.entry-content video { max-width: 100%; }
.entry-content .wp-block-embed__wrapper iframe { width: 100%; aspect-ratio: 16 / 9; height: auto; }

/* ==========================================================================
   Front page - "Volilne zaveze" panel expanded by the "Kdo smo" button
   ========================================================================== */

.zaveze {
  display: grid;
  grid-template-rows: 0fr;
  opacity: 0;
  scroll-margin-top: 90px; /* sticky header */
  transition: grid-template-rows 0.55s cubic-bezier(0.22, 1, 0.36, 1), opacity 0.35s ease;
}
.zaveze.is-open {
  grid-template-rows: 1fr;
  opacity: 1;
}
.zaveze-inner {
  min-height: 0;
  overflow: hidden;
  /* room for the card shadow while clipped */
  padding: 0 12px 24px;
  margin: 0 -12px -24px;
}

.zaveze-chevron { transition: transform 0.3s ease; }
#zaveze-toggle[aria-expanded="true"] .zaveze-chevron { transform: rotate(180deg); }

/* Items slide in one after another */
.zaveze-list > li,
.zaveze-cta {
  opacity: 0;
  transform: translateY(10px);
  transition: opacity 0.4s ease, transform 0.4s cubic-bezier(0.22, 1, 0.36, 1);
  transition-delay: 0s;
}
.zaveze.is-open .zaveze-list > li,
.zaveze.is-open .zaveze-cta {
  opacity: 1;
  transform: none;
  transition-delay: calc(0.15s + var(--i, 0) * 0.05s);
}

/* Colored check bullets, cycling through the brand colors */
.zaveze-list > li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0.2em;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background: #E2231A url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 20 20' fill='none' stroke='white' stroke-width='3' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M5 10.5l3.2 3.2L15 7'/%3E%3C/svg%3E") center / 14px no-repeat;
}
.zaveze-list > li:nth-child(4n + 2)::before { background-color: #F4871E; }
.zaveze-list > li:nth-child(4n + 3)::before { background-color: #FDC02F; }
.zaveze-list > li:nth-child(4n)::before { background-color: #78B833; }

@media (prefers-reduced-motion: reduce) {
  .zaveze,
  .zaveze-chevron,
  .zaveze-list > li,
  .zaveze-cta { transition: none; }
}

/* ==========================================================================
   Gallery thumbnails + lightbox (O nas - Društvo Izolani)
   ========================================================================== */

.gallery-item:focus-visible { outline: 3px solid #78B833; outline-offset: 3px; }
.gallery-main img { transition: opacity 0.2s ease; }
.gallery-main:hover img { opacity: 0.92; }
.gallery-thumb img { transition: transform 0.35s ease, opacity 0.2s ease; }
.gallery-thumb:hover img { transform: scale(1.06); opacity: 0.9; }

.lightbox {
  position: fixed;
  inset: 0;
  width: 100%;
  height: 100%;
  max-width: none;
  max-height: none;
  margin: 0;
  padding: 0;
  border: 0;
  background: rgba(20, 17, 36, 0.95);
  color: #fff;
  overflow: hidden;
}
.lightbox[open] {
  display: flex;
  align-items: center;
  justify-content: center;
  animation: lightbox-in 0.25s ease;
}
.lightbox::backdrop { background: transparent; }
@keyframes lightbox-in { from { opacity: 0; } to { opacity: 1; } }

.lightbox-figure {
  margin: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  max-width: calc(100vw - 160px);
}
.lightbox-img {
  display: block;
  max-width: 100%;
  max-height: calc(100vh - 140px);
  width: auto;
  height: auto;
  object-fit: contain;
  border-radius: 6px;
  user-select: none;
  -webkit-user-drag: none;
}
.lightbox-img.is-loading { opacity: 0; }
.lightbox-img { transition: opacity 0.2s ease; }
.lightbox-caption {
  margin-top: 12px;
  max-width: 760px;
  font-size: 15px;
  line-height: 1.5;
  text-align: center;
  color: #E9E2D3;
}
.lightbox-caption:empty { display: none; }
.lightbox-counter {
  position: absolute;
  top: 22px;
  left: 24px;
  font-size: 14px;
  font-weight: 800;
  letter-spacing: 0.04em;
  color: #E9E2D3;
}

.lightbox-btn {
  position: absolute;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 48px;
  height: 48px;
  padding: 0;
  border: 0;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.12);
  color: #fff;
  cursor: pointer;
  transition: background-color 0.2s ease;
}
.lightbox-btn:hover { background: rgba(255, 255, 255, 0.25); }
.lightbox-btn:focus-visible { outline: 3px solid #78B833; outline-offset: 2px; }
.lightbox-btn svg { width: 24px; height: 24px; }
.lightbox-close { top: 14px; right: 16px; }
.lightbox-prev { left: 24px; top: 50%; transform: translateY(-50%); }
.lightbox-next { right: 24px; top: 50%; transform: translateY(-50%); }
.lightbox.is-single .lightbox-prev,
.lightbox.is-single .lightbox-next,
.lightbox.is-single .lightbox-counter { display: none; }

@media (max-width: 767px) {
  .lightbox-figure { max-width: 100vw; padding: 0 12px; }
  .lightbox-img { max-height: calc(100vh - 170px); }
  /* arrows move to the bottom on phones - swiping also works */
  .lightbox-prev,
  .lightbox-next { top: auto; bottom: 20px; transform: none; }
  .lightbox-prev { left: calc(50% - 60px); }
  .lightbox-next { right: calc(50% - 60px); }
}

html.lightbox-open { overflow: hidden; }

@media (prefers-reduced-motion: reduce) {
  .lightbox[open] { animation: none; }
  .gallery-thumb img,
  .lightbox-img { transition: none; }
}
