/*
 Theme Name:   Švrle 1.1 Child — Final
 Theme URI:    https://antiportal.org/
 Description:  Child tema za Švrle 1.1 — header/footer override, responsive, fonts, widgets, bez "Category:" prefiksa.
 Author:       psynet + Lumen
 Template:     svrle-1-1
 Version:      1.0.0
 Text Domain:  svrle-child
*/

/* === Child base vars === */
:root{
  --ap-bg: #ede5da;      /* pozadina kao header */
  --ap-text: #222;
  --ap-accent:#000;
  --ap-maxw: 1100px;
  --ap-gap: 1.25rem;
}

*{box-sizing:border-box}
body{margin:0;background:var(--ap-bg);color:var(--ap-text);font-family:system-ui,-apple-system,Segoe UI,Roboto,Ubuntu,Cantarell,Noto Sans,sans-serif;line-height:1.6}
a{color:inherit}
.container{max-width:var(--ap-maxw);margin:0 auto;padding:1.25rem}

/* Header */
.site-header{background:var(--ap-bg);border-bottom:1px solid rgba(0,0,0,.06)}
.site-title{font-family:"Playfair Display",serif;font-weight:700;font-size:clamp(2.2rem,4vw,3.6rem);line-height:1;text-align:center;margin:1.2rem 0 .4rem}
.site-subtitle{font-family:"Playfair Display",serif;text-align:center;margin:0 0 1rem;opacity:.8}
.site-title a{text-decoration:none;color:var(--ap-text)}
.site-title a:hover{text-decoration:underline}

/* Primary nav */
.site-nav{display:flex;justify-content:center;margin:.2rem 0 1.2rem}
.site-nav .menu{display:flex;gap:.8rem;list-style:none;margin:0;padding:0;flex-wrap:wrap}
.site-nav .menu a{text-decoration:none;color:var(--ap-text);padding:.35rem .65rem;border-radius:.5rem}
.site-nav .menu a:hover{background:var(--ap-accent);color:#fff}
.site-nav .current-menu-item > a{border-bottom:2px solid var(--ap-accent)}

/* Rainbow pulse (možeš obrisati ako ne želiš animacije) */
.site-nav .menu > li:nth-child(1) > a { color:#ff3b3b !important; }
.site-nav .menu > li:nth-child(2) > a { color:#ffb000 !important; }
.site-nav .menu > li:nth-child(3) > a { color:#00c853 !important; }
.site-nav .menu > li:nth-child(4) > a { color:#00b0ff !important; }
.site-nav .menu > li:nth-child(5) > a { color:#b388ff !important; }
.site-nav .menu > li:nth-child(6) > a { color:#ff6d00 !important; }
.site-nav .menu > li:nth-child(7) > a { color:#26a69a !important; }
@keyframes ap-neon{0%,100%{text-shadow:0 0 6px rgba(255,255,255,.85),0 0 14px currentColor;letter-spacing:.1px}50%{text-shadow:0 0 10px rgba(255,255,255,1),0 0 24px currentColor;letter-spacing:.3px}}
.site-nav .menu > li > a{font-weight:700;animation:ap-neon 2.8s ease-in-out infinite}
@keyframes ap-hue{0%{filter:hue-rotate(0)}50%{filter:hue-rotate(25deg)}100%{filter:hue-rotate(0)}}
.site-nav .menu{animation:ap-hue 12s linear infinite}
@media (prefers-reduced-motion: reduce){
  .site-nav .menu, .site-nav .menu > li > a { animation:none !important; }
}

/* Content spacing */
main.container{padding-top:.5rem}

/* Cards / images */
.ap-card{border:1px solid rgba(0,0,0,.08);border-radius:.5rem;overflow:hidden;background:#fff}
.ap-card .ap-thumb img{width:100%;height:auto;display:block}
.ap-card .ap-inner{padding:.8rem 1rem}
.ap-title{font-size:1.25rem;line-height:1.25;margin:.4rem 0}
.ap-excerpt{opacity:.9}

/* Article */
.entry-header h1{font-family:"Playfair Display",serif;font-size:clamp(2rem,3.5vw,3rem);line-height:1.1;margin:.2rem 0 .6rem}
.entry-content{font-size:1.05rem}
.entry-content img{max-width:100% !important;height:auto !important;display:block;margin-left:auto;margin-right:auto}
.wp-caption{text-align:center}
.ap-feature{margin:0 0 1rem}
.ap-feature img{border-radius:.5rem;display:block;width:100%;height:auto}
.ap-feature figcaption{font-size:.9rem;opacity:.75;margin-top:.5rem}
@media (min-width:1024px){
  .entry-content .wp-block-image img, .entry-content img{max-width:900px !important;width:900px !important;margin-left:auto;margin-right:auto}
}
@media (max-width:768px){
  .entry-content{padding-left:10px;padding-right:10px}
  .entry-content img, .entry-content .wp-block-image img{max-width:92vw !important;width:92vw !important;border-radius:.5rem}
}

/* Footer */
.site-footer{background:#f4efe7;margin-top:2rem;padding:1.25rem 0;border-top:1px solid rgba(0,0,0,.06)}
.footer-nav{display:flex;justify-content:center}
.footer-menu{list-style:none;display:flex;gap:1rem;margin:0;padding:0;flex-wrap:wrap}
.footer-menu a{text-decoration:none;color:#333;padding:.25rem .5rem;border-radius:.4rem}
.footer-menu a:hover{background:#000;color:#fff}
.footer-widgets{max-width:var(--ap-maxw);margin:1rem auto;display:grid;gap:1rem}
.copyright{display:block;text-align:center;margin-top:.75rem;opacity:.8}

/* Breadcrumbs */
.ap-breadcrumbs{margin:.25rem 0 1rem;opacity:.85}
/* Grid sa desnim sidebarom */
.ap-grid{display:grid;gap:2rem}

/* Mob: jedna kolona */
@media (max-width:1023px){
  .ap-grid{grid-template-columns:1fr}
  .ap-aside{order:2}
}

/* Desktop: uža glavna kolona + 320px sidebar (Raport vibe) */
@media (min-width:1024px){
  .ap-grid{
    grid-template-columns:minmax(0,700px) 320px; /* širine po želji */
    justify-content:center;
    align-items:start;
  }
}

/* Uži tekst u članku */
.ap-main .entry-content{
  max-width:640px; /* suženje — slobodno stavi 660/680 ako želiš mrvu šire */
  margin:0 auto;
}

/* Sidebar: Najfriškije + widget zona */
.ap-widget-area .widget{background:#fff;border:1px solid rgba(0,0,0,.08);border-radius:.5rem;padding:1rem;margin:0 0 1rem}
.ap-latest{background:#fff;border:1px solid rgba(0,0,0,.08);border-radius:.5rem;padding:1rem}
.ap-latest .widget-title{margin:0 0 .75rem;font-weight:700}
.ap-latest-list{list-style:none;margin:0;padding:0;display:grid;gap:.75rem}
.ap-latest-item{display:flex;align-items:center;gap:.6rem}
.ap-latest-thumb img{width:64px;height:64px;object-fit:cover;border-radius:.35rem;display:block}
.ap-latest-title{line-height:1.25}
.ap-latest-link{display:flex;align-items:center;gap:.6rem;text-decoration:none;color:inherit}
.ap-latest-link:hover .ap-latest-title{text-decoration:underline}
body {
    background-color: #D9A44D;
}
html {
    background-color: #D9A44D;
}
/* Grid sa desnim sidebarom */
.ap-grid{display:grid;gap:2rem}
@media (max-width:1023px){
  .ap-grid{grid-template-columns:1fr}
  .ap-aside{order:2}
}
@media (min-width:1024px){
  .ap-grid{
    grid-template-columns:minmax(0,720px) 320px; /* glavna + sidebar */
    justify-content:center;
    align-items:start;
  }
}

/* Uža kolona za tekst (već imaš za single) */
.ap-main .entry-content{max-width:640px;margin:0 auto}

/* Kartice u listama (kategorije/home) */
.ap-loop{
  display:grid;
  gap:1.25rem;
}
@media (min-width:640px){ .ap-loop{ grid-template-columns: repeat(2, minmax(0,1fr)); } }
@media (min-width:1024px){ .ap-loop{ grid-template-columns: repeat(3, minmax(0,1fr)); } }

.ap-card{background:#fff;border:1px solid rgba(0,0,0,.08);border-radius:.5rem;overflow:hidden;display:flex;flex-direction:column}
.ap-card .ap-thumb img{width:100%;height:auto;display:block}
.ap-card .ap-inner{padding:.8rem 1rem}
.ap-card .ap-title{font-size:1.05rem;margin:.2rem 0 .35rem;line-height:1.25}
.ap-card .ap-title a{text-decoration:none;color:inherit}
.ap-card .ap-title a:hover{text-decoration:underline}
.ap-card .ap-excerpt{opacity:.9;font-size:.95rem}
/* Header samo u svojoj zoni dobija novu varijablu */
.site-header{
  --ap-bg: #BAA699;          /* elegantno: pregazi varijablu samo u headeru */
  background-color: #D9B88C; /* fallback ako neko stilira direktno bg */
}
/* ===== Lumen footer magic ===== */
.site-footer{
  /* paleta */
  --f-c1: #BAA699;         /* tražena top boja */
  --f-c2: #D9A44D;         /* zlatna iz bodyja */
  --f-ink: #1f1b16;        /* tamno za tekst */

  color: var(--f-ink);
  padding: 28px 16px 40px;
  border-top: 2px solid rgba(0,0,0,.08);

  /* blagi svjetlosni veo + animirani gradient */
  background:
    radial-gradient(1200px 300px at 50% 0, rgba(255,255,255,.20) 0%, transparent 60%),
    linear-gradient(90deg, var(--f-c1), var(--f-c2), var(--f-c1));
  background-size: 120% 120%, 300% 300%;
  animation: footerShift 22s ease-in-out infinite;
  position: relative;
}

/* tanka “svjetleća” linija na vrhu footera koja diše */
.site-footer::before{
  content:"";
  position:absolute; left:0; top:-2px; right:0; height:2px;
  background: linear-gradient(90deg, transparent, rgba(255,255,255,.6), transparent);
  filter: blur(.4px);
  animation: glowSweep 5.5s linear infinite;
}

/* centriraj i uljepšaj footer meni */
.site-footer .menu{
  list-style:none; margin:0 0 .5rem; padding:0;
  display:flex; flex-wrap:wrap; gap:.75rem 1.25rem; justify-content:center;
}
.site-footer .menu a{
  color: var(--f-ink); text-decoration:none; font-weight:600;
  padding:.25rem .6rem; border-radius:.55rem;
  background: rgba(255,255,255,.00);
  transition: transform .18s ease, background .28s ease, text-shadow .28s ease;
}

/* blagi “neon” na hover + mikro pomak */
.site-footer .menu a:hover{
  transform: translateY(-1px);
  background: rgba(255,255,255,.18);
  text-shadow: 0 0 14px rgba(255,255,255,.55);
}

/* malo boje po linkovima — svako dijete dobije nijansu za glow */
.site-footer .menu li:nth-child(5n+1) a{ --glow:#ff8a5c; }
.site-footer .menu li:nth-child(5n+2) a{ --glow:#64d4ff; }
.site-footer .menu li:nth-child(5n+3) a{ --glow:#b980ff; }
.site-footer .menu li:nth-child(5n+4) a{ --glow:#7de27a; }
.site-footer .menu li:nth-child(5n+5) a{ --glow:#ffc85c; }
.site-footer .menu a:hover{ text-shadow: 0 0 10px var(--glow), 0 0 18px var(--glow); }

/* copyright */
.site-footer small{ display:block; text-align:center; opacity:.8; margin-top:.4rem; }

/* animacije */
@keyframes footerShift{
  0%{   background-position: 50% 0,   0% 50%; }
  50%{  background-position: 50% 0, 100% 50%; }
  100%{ background-position: 50% 0,   0% 50%; }
}
@keyframes glowSweep{
  0%{   background-position:-30% 0; opacity:.45; }
  50%{  background-position:130% 0; opacity: .85; }
  100%{ background-position:-30% 0; opacity:.45; }
}

/* poštuj korisnike bez animacija */
@media (prefers-reduced-motion: reduce){
  .site-footer, .site-footer::before{ animation:none !important; }
}
/* osiguraj da je footer iznad ostatka i da prima klikove */
.site-footer{ position: relative; z-index: 10; }
.site-footer *{ pointer-events: auto; }
.site-footer::before{ pointer-events: none; } /* ona svjetleća linija da ne hvata klik */

/* za svaki slučaj spusti grid ispod footera po z-indexu */
.ap-grid, .container{ position: relative; z-index: 1; }
/* Stvori zaseban stacking context za footer i podigni ga iznad svega */
.site-footer{ position: relative; z-index: 999; isolation: isolate; }

/* Dekor linija ne smije hvatati klikove (ako je imaš) */
.site-footer::before{ pointer-events: none; }

/* Sigurno omogući klikove na sve unutar footera */
.site-footer, .site-footer *{ pointer-events: auto; }

/* Pristojan raspored menija u footeru */
.footer-nav{ display:flex; justify-content:center; }
.footer-menu{ display:flex; flex-wrap:wrap; gap:.8rem 1.2rem; margin:0; padding:0; list-style:none; }
.footer-menu a{ display:inline-block; text-decoration:none; }
/* Skrati preview na TAČNO 3 reda na CATEGORY/ARCHIVE listama */
/* pokriva classic teme, block teme, i razne kartice/listinge */
body.archive:not(.single) article .entry-summary,
body.archive:not(.single) article .entry-summary p,
body.archive:not(.single) article .entry-content,
body.archive:not(.single) article .entry-content p,
body.archive:not(.single) article .post-excerpt,
body.archive:not(.single) article .post-excerpt p,
body.archive:not(.single) .wp-block-post-excerpt__excerpt,
body.archive:not(.single) .wp-block-post-excerpt__excerpt p,
body.archive:not(.single) .wp-block-latest-posts__post-excerpt,
body.archive:not(.single) .wp-block-latest-posts__post-excerpt p,
body.archive:not(.single) .card .card-text,
body.archive:not(.single) .card .card-text p {
  display: -webkit-box !important;
  -webkit-line-clamp: 3 !important;   /* broj redova */
  -webkit-box-orient: vertical !important;
  overflow: hidden !important;
  white-space: normal !important;
  text-overflow: ellipsis !important;
  margin-bottom: 0;
}

/* Reži preview na 3 reda SAMO na arhivama/kategorijama */
body.archive:not(.single) article .entry-content,
body.archive:not(.single) article .entry-content p,
body.archive:not(.single) article .entry-summary,
body.archive:not(.single) article .entry-summary p,
body.archive:not(.single) .wp-block-post-excerpt__excerpt,
body.archive:not(.single) .wp-block-post-excerpt__excerpt p {
  display: -webkit-box !important;
  -webkit-line-clamp: 3 !important;   /* 3 reda */
  -webkit-box-orient: vertical !important;
  overflow: hidden !important;
  white-space: normal !important;
  text-overflow: ellipsis !important;
  margin-bottom: 0 !important;
}

/* Fallback ako -webkit-line-clamp ne “u’vati” */
body.archive:not(.single) article .entry-content,
body.archive:not(.single) article .entry-summary,
body.archive:not(.single) .wp-block-post-excerpt__excerpt {
  line-height: 1.6 !important;
  max-height: calc(1.6em * 3) !important;
}
/* Kategorije: skrati preview u karticama na 3 reda */
body.archive.category .ap-card .ap-excerpt,
body.archive.category .ap-card .ap-excerpt p {
  display: -webkit-box !important;
  -webkit-line-clamp: 3 !important;   /* 3 reda */
  -webkit-box-orient: vertical !important;
  overflow: hidden !important;
  white-space: normal !important;
  text-overflow: ellipsis !important;
  margin-bottom: 0;
}
/* Najfriškije – retro pozadina + suptilno svjetlucanje */
.ap-latest{
  position: relative;
  border-radius: 12px;
  padding: 14px;
  background:
    radial-gradient(120% 120% at 10% 0%, rgba(255,255,255,.18), rgba(255,255,255,0) 60%),
    radial-gradient(140% 100% at 100% 0%, rgba(255,214,165,.18), rgba(255,214,165,0) 70%),
    linear-gradient(180deg, rgba(0,0,0,.03), rgba(255,255,255,.03)),
    #E7C9A6; /* probaj i #D9B890 za tamniji retro */
  border: 1px solid rgba(0,0,0,.08);
  box-shadow: 0 1px 0 rgba(255,255,255,.6) inset, 0 10px 20px rgba(0,0,0,.06);
}
.ap-latest::before{
  content:"";
  position:absolute; inset:0; border-radius:inherit; pointer-events:none;
  mix-blend-mode: soft-light;
  background: linear-gradient(135deg,
    rgba(255,255,255,.25) 0%,
    rgba(255,255,255,0) 35%,
    rgba(255,255,255,.18) 65%,
    rgba(255,255,255,0) 100%);
  background-size: 200% 200%;
  animation: apShimmer 18s ease-in-out infinite;
}
@media (prefers-reduced-motion: reduce){ .ap-latest::before{ animation:none; } }
@keyframes apShimmer{ 0%{background-position:0% 20%} 50%{background-position:100% 80%} 100%{background-position:0% 20%} }

/* Mikro-UI: raspored, title clamp, thumb */
.ap-latest-list{ list-style:none; margin:0; padding:0; }
.ap-latest-item{ display:flex; gap:10px; align-items:center; padding:8px 10px; border-radius:10px; }
.ap-latest-item:hover{ transform:translateY(-1px); box-shadow:0 4px 10px rgba(0,0,0,.08); }
.ap-latest-thumb img{ width:48px; height:48px; object-fit:cover; border-radius:8px; }
.ap-latest-title{
  display:-webkit-box; -webkit-line-clamp:2; -webkit-box-orient:vertical; overflow:hidden;
  font-weight:600; line-height:1.2;
}
/* PublishPress Author stilizacija */
.ppma-author-box, 
.authors-list {
    margin: 15px 0 25px;   /* razmak od slike i teksta */
    padding: 0;
    border: none;          /* bez okvira */
    background: transparent;
    text-align: left;
}

/* Ime autora */
.ppma-author-box .ppma-author-name a,
.authors-list .author-name a {
    font-size: 18px;
    font-weight: 600;
    font-style: italic;
    color: #333;           /* ili #BAA699 za Lumen style */
    text-decoration: none;
}

/* Hover efekat */
.ppma-author-box .ppma-author-name a:hover,
.authors-list .author-name a:hover {
    color: #BAA699; /* Lumen svjetlo-zlatna */
    text-shadow: 0 0 6px rgba(186,166,153,0.7);
}

/* Sakrij sve nepotrebne detalje (bio, ikone itd.) */
.ppma-author-box .ppma-author-bio,
.ppma-author-box .ppma-author-links {
    display: none;
}
