/*
Theme Name: Kimba Keramika
Theme URI: https://kimbakeramika.hr
Author: Kimba Keramika
Author URI: https://kimbakeramika.hr
Description: Profesionalna tamna WordPress tema dizajnirana za keramičare, majstore i obrtnike. Kimba Keramika tema dolazi s kompletnim sustavom upravljanja galerijom Prije & Poslije projekata, slobodnom foto galerijom sa sliderom, SMTP email postavkama, vizualnim uredivačem boja, automatskim SEO meta tagovima, WebP optimizacijom slika, GDPR cookie consent bannerom i responzivnim mobilnim dizajnom. Savršena za lokalne obrte koji žele profesionalnu online prisutnost.
Version: 1.0.0
Requires at least: 6.0
Tested up to: 6.7
Requires PHP: 7.4
License: GNU General Public License v2 or later
License URI: LICENSE
Text Domain: kimba-keramika
Tags: dark, portfolio, business, one-page, custom-colors, custom-logo, featured-images, responsive-layout, translation-ready, before-after, gallery, construction, services
*/

/* =============================================
   CSS VARIJABLE - GLOBALNE BOJE I STILOVI
   ============================================= */
:root {
  --color-bg:         #111111;
  --color-bg-card:    #1a1a1a;
  --color-bg-section: #161616;
  --color-gold:       #E8A020;
  --color-gold-light: #F5B53A;
  --color-gold-dark:  #C88A10;
  --color-text:       #E8E8E8;
  --color-text-muted: #9A9A9A;
  --color-border:     #2a2a2a;
  --color-white:      #FFFFFF;
  --font-heading:     'Barlow Condensed', sans-serif;
  --font-body:        'Barlow', sans-serif;
  --radius:           6px;
  --transition:       0.3s ease;
}

/* =============================================
   RESET & BASE
   ============================================= */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

html { scroll-behavior: smooth; font-size: 16px; }

body {
  background-color: var(--color-bg);
  color: var(--color-text);
  font-family: var(--font-body);
  font-size: 1rem;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
}

img { max-width: 100%; height: auto; display: block; }
a { color: var(--color-gold); text-decoration: none; transition: color var(--transition); }
a:hover { color: var(--color-gold-light); }

h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-heading);
  color: var(--color-white);
  line-height: 1.15;
  font-weight: 700;
  letter-spacing: 0.01em;
}

ul { list-style: none; }

.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 24px;
}

.section-label {
  font-family: var(--font-heading);
  font-size: 0.8rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--color-gold);
  font-weight: 600;
  display: block;
  margin-bottom: 10px;
}

.section-heading {
  font-size: clamp(2rem, 4vw, 3rem);
  font-weight: 700;
  color: var(--color-white);
}

/* =============================================
   BUTTONS
   ============================================= */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 14px 28px;
  border-radius: var(--radius);
  font-family: var(--font-heading);
  font-size: 0.9rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  cursor: pointer;
  border: none;
  transition: all var(--transition);
  text-decoration: none;
}

.btn-primary {
  background: var(--color-gold);
  color: #111;
}
.btn-primary:hover {
  background: var(--color-gold-light);
  color: #111;
  transform: translateY(-2px);
  box-shadow: 0 8px 24px rgba(232, 160, 32, 0.35);
}

.btn-outline {
  background: transparent;
  color: var(--color-white);
  border: 2px solid var(--color-border);
}
.btn-outline:hover {
  border-color: var(--color-gold);
  color: var(--color-gold);
}

.btn-whatsapp {
  background: #25D366;
  color: #fff;
  padding: 16px 28px;
}
.btn-whatsapp:hover {
  background: #1ebe59;
  color: #fff;
  transform: translateY(-2px);
}

/* =============================================
   HEADER / NAVIGACIJA
   ============================================= */
#site-header {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 1000;
  background: rgba(17,17,17,0.95);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--color-border);
  transition: background var(--transition);
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 72px;
}

/* Logo */
.site-logo {
  display: flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
}

.logo-icon {
  width: 44px;
  height: 44px;
  position: relative;
}

.logo-icon svg { width: 44px; height: 44px; }

.logo-text {
  display: flex;
  flex-direction: column;
  line-height: 1;
}

.logo-name {
  font-family: var(--font-heading);
  font-size: 1.4rem;
  font-weight: 800;
  color: var(--color-white);
  letter-spacing: 0.05em;
}

.logo-sub {
  font-family: var(--font-heading);
  font-size: 0.65rem;
  letter-spacing: 0.25em;
  color: var(--color-text-muted);
  text-transform: uppercase;
  font-weight: 400;
}

/* Nav */
.main-nav ul {
  display: flex;
  align-items: center;
  gap: 4px;
}

.main-nav a {
  display: block;
  padding: 8px 16px;
  font-family: var(--font-heading);
  font-size: 0.88rem;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  font-weight: 600;
  color: var(--color-text);
  text-decoration: none;
  transition: color var(--transition);
  position: relative;
}

.main-nav a::after {
  content: '';
  position: absolute;
  bottom: 4px; left: 16px; right: 16px;
  height: 2px;
  background: var(--color-gold);
  transform: scaleX(0);
  transition: transform var(--transition);
}

.main-nav a:hover,
.main-nav a.active {
  color: var(--color-white);
}

.main-nav a:hover::after,
.main-nav a.active::after {
  transform: scaleX(1);
}

.header-cta {
  background: var(--color-gold);
  color: #111;
  padding: 10px 20px;
  border-radius: var(--radius);
  font-family: var(--font-heading);
  font-size: 0.85rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  display: flex;
  align-items: center;
  gap: 8px;
  text-decoration: none;
  transition: all var(--transition);
}
.header-cta:hover {
  background: var(--color-gold-light);
  color: #111;
}

/* Mobile hamburger */
.hamburger {
  display: none;
  flex-direction: column;
  gap: 5px;
  cursor: pointer;
  padding: 8px;
  background: none;
  border: none;
}
.hamburger span {
  display: block;
  width: 24px;
  height: 2px;
  background: var(--color-white);
  transition: all var(--transition);
}

/* =============================================
   HERO SECTION
   ============================================= */
#hero {
  position: relative;
  min-height: 100vh;
  display: grid;
  grid-template-columns: 1fr 1fr;
  align-items: center;
  overflow: hidden;
  padding-top: 72px;
}

.hero-bg-pattern {
  position: absolute;
  inset: 0;
  background:
    radial-gradient(ellipse 60% 80% at 0% 50%, rgba(232,160,32,0.06) 0%, transparent 60%),
    linear-gradient(135deg, #0e0e0e 0%, #1a1a1a 100%);
  z-index: 0;
}

.hero-bg-pattern::before {
  content: '';
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(rgba(232,160,32,0.04) 1px, transparent 1px),
    linear-gradient(90deg, rgba(232,160,32,0.04) 1px, transparent 1px);
  background-size: 60px 60px;
}

.hero-content {
  position: relative;
  z-index: 2;
  padding: 80px 0 80px 0;
}

.hero-eyebrow {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 24px;
}

.hero-eyebrow-line {
  width: 40px;
  height: 2px;
  background: var(--color-gold);
}

.hero-eyebrow span {
  font-family: var(--font-heading);
  font-size: 0.8rem;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--color-gold);
  font-weight: 600;
}

.hero-title {
  font-size: clamp(3.5rem, 7vw, 5.5rem);
  font-weight: 800;
  line-height: 1;
  letter-spacing: -0.01em;
  color: var(--color-white);
  margin-bottom: 8px;
}

.hero-subtitle {
  font-size: clamp(1.4rem, 2.5vw, 2rem);
  font-weight: 300;
  color: var(--color-text-muted);
  margin-bottom: 24px;
  font-family: var(--font-heading);
}

.hero-description {
  font-size: 1rem;
  color: var(--color-text-muted);
  max-width: 420px;
  margin-bottom: 40px;
  line-height: 1.7;
}

.hero-image {
  position: relative;
  z-index: 1;
  height: 100vh;
  overflow: hidden;
}

.hero-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.hero-image::before {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(90deg, var(--color-bg) 0%, transparent 30%);
  z-index: 1;
}

.hero-image::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, transparent 60%, var(--color-bg) 100%);
  z-index: 1;
}

/* =============================================
   SERVICES SECTION
   ============================================= */
#usluge {
  padding: 100px 0;
  background: var(--color-bg-section);
  position: relative;
}

.services-intro {
  margin-bottom: 56px;
}

.services-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 20px;
}

.service-card {
  background: var(--color-bg-card);
  border: 1px solid var(--color-border);
  border-radius: var(--radius);
  padding: 36px 28px;
  transition: all var(--transition);
  position: relative;
  overflow: hidden;
}

.service-card::before {
  content: '';
  position: absolute;
  bottom: 0; left: 0;
  width: 100%; height: 3px;
  background: var(--color-gold);
  transform: scaleX(0);
  transition: transform var(--transition);
}

.service-card:hover {
  border-color: rgba(232,160,32,0.3);
  transform: translateY(-4px);
  box-shadow: 0 12px 40px rgba(0,0,0,0.4);
}

.service-card:hover::before {
  transform: scaleX(1);
}

.service-icon {
  width: 48px;
  height: 48px;
  color: var(--color-gold);
  margin-bottom: 20px;
}

.service-icon svg {
  width: 100%;
  height: 100%;
}

.service-title {
  font-family: var(--font-heading);
  font-size: 1rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--color-white);
  margin-bottom: 12px;
}

.service-desc {
  font-size: 0.88rem;
  color: var(--color-text-muted);
  line-height: 1.6;
}

/* =============================================
   GALLERY SECTION
   ============================================= */
#galerija {
  padding: 100px 0;
  background: var(--color-bg);
}

.gallery-header {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  margin-bottom: 48px;
  flex-wrap: wrap;
  gap: 20px;
}

.gallery-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 16px;
}

.gallery-item {
  position: relative;
  overflow: hidden;
  border-radius: var(--radius);
  aspect-ratio: 3/4;
  cursor: pointer;
}

.gallery-item img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.5s ease;
}

.gallery-item:hover img {
  transform: scale(1.06);
}

.gallery-badge {
  position: absolute;
  bottom: 14px;
  left: 14px;
  font-family: var(--font-heading);
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  padding: 6px 12px;
  border-radius: 3px;
  z-index: 2;
}

.gallery-badge.prije {
  background: rgba(30,30,30,0.9);
  color: var(--color-text-muted);
  border: 1px solid var(--color-border);
}

.gallery-badge.poslije {
  background: var(--color-gold);
  color: #111;
}

.gallery-item::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, transparent 50%, rgba(0,0,0,0.7) 100%);
}

/* Naziv projekta na slici */
.gallery-project-name {
  position: absolute;
  bottom: 38px;
  left: 10px;
  right: 10px;
  z-index: 3;
  font-family: var(--font-heading);
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.05em;
  color: rgba(255,255,255,0.7);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* Par wrapper — dva susjedna elementa iste lokacije */
.gallery-par {
  display: contents; /* transparentan wrapper — djeca idu direktno u grid */
}

/* =============================================
   WHY US SECTION
   ============================================= */
#zasto-mi {
  padding: 100px 0;
  background: var(--color-bg-section);
}

.features-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 24px;
  margin-top: 56px;
}

.feature-item {
  display: flex;
  align-items: flex-start;
  gap: 16px;
}

.feature-icon-wrap {
  flex-shrink: 0;
  width: 44px;
  height: 44px;
  background: rgba(232,160,32,0.1);
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--color-gold);
}

.feature-icon-wrap svg { width: 22px; height: 22px; }

.feature-title {
  font-family: var(--font-heading);
  font-size: 0.95rem;
  font-weight: 700;
  color: var(--color-white);
  margin-bottom: 6px;
}

.feature-desc {
  font-size: 0.82rem;
  color: var(--color-text-muted);
  line-height: 1.55;
}

/* =============================================
   FOOTER
   ============================================= */
#colophon {
  background: #0d0d0d;
  border-top: 1px solid var(--color-border);
  padding: 48px 0;
}

.footer-inner {
  display: grid;
  grid-template-columns: auto 1fr auto auto;
  align-items: center;
  gap: 40px;
}

.footer-logo .logo-name { font-size: 1.2rem; }

.footer-contact {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
}

.footer-phone {
  display: flex;
  align-items: center;
  gap: 8px;
  font-family: var(--font-heading);
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--color-white);
  text-decoration: none;
}

.footer-phone svg { color: var(--color-gold); width: 20px; height: 20px; }
.footer-phone:hover { color: var(--color-gold); }

.footer-note {
  font-size: 0.8rem;
  color: var(--color-text-muted);
  margin-top: 4px;
}

.footer-location {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  color: var(--color-text-muted);
  font-size: 0.88rem;
}

.footer-location svg { color: var(--color-gold); flex-shrink: 0; margin-top: 3px; }
.footer-location strong { display: block; color: var(--color-white); font-family: var(--font-heading); font-size: 0.95rem; }

/* =============================================
   MOBILNI MENI - OVERLAY
   ============================================= */
.mobile-nav-overlay {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(17,17,17,0.98);
  z-index: 999;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 8px;
}

.mobile-nav-overlay.open {
  display: flex;
}

.mobile-nav-overlay a {
  font-family: var(--font-heading);
  font-size: 2rem;
  font-weight: 700;
  color: var(--color-white);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  padding: 12px 24px;
  transition: color var(--transition);
}

.mobile-nav-overlay a:hover {
  color: var(--color-gold);
}

.mobile-close {
  position: absolute;
  top: 20px; right: 20px;
  background: none;
  border: none;
  color: var(--color-white);
  cursor: pointer;
  padding: 8px;
}

/* =============================================
   RESPONSIVE — TABLET (≤1024px)
   ============================================= */
@media (max-width: 1024px) {
  .services-grid { grid-template-columns: repeat(2, 1fr); }
  .features-grid { grid-template-columns: repeat(2, 1fr); }
  .gallery-grid  { grid-template-columns: repeat(2, 1fr); }
  .footer-inner  { grid-template-columns: 1fr 1fr; gap: 28px; }

  #hero { grid-template-columns: 1fr 1fr; }
  .hero-title { font-size: clamp(2.8rem, 5vw, 4.5rem); }
}

/* =============================================
   RESPONSIVE — MOBITEL (≤768px)
   ============================================= */
@media (max-width: 768px) {

  /* ── Header ── */
  .header-inner { height: 64px; }
  .main-nav     { display: none; }
  .header-cta   { display: none; }
  .hamburger    { display: flex; }

  /* Sakrij Instagram ikonu u headeru na mobitelu */
  .header-inner > div > a[aria-label="Instagram"] { display: none; }

  /* ── Hero ── */
  #hero {
    display: flex;
    flex-direction: column;
    min-height: auto;
  }

  .hero-image {
    order: 1;
    height: 56vw;
    min-height: 220px;
    width: 100%;
  }

  /* Ukloni lijevi gradient koji sakriva sliku na mobitelu */
  .hero-image::before {
    background: linear-gradient(180deg, transparent 60%, var(--color-bg) 100%);
  }

  .hero-content {
    order: 2;
    padding: 32px 0 56px;
  }

  .hero-eyebrow { margin-bottom: 12px; }
  .hero-title   { font-size: 2.6rem; line-height: 0.95; margin-bottom: 6px; }
  .hero-subtitle { font-size: 1.1rem; margin-bottom: 14px; }
  .hero-description { font-size: 0.9rem; margin-bottom: 28px; max-width: 100%; }

  /* ── Sekcije — padding ── */
  #usluge, #galerija, #zasto-mi, #kontakt { padding: 64px 0; }

  .section-heading { font-size: 1.9rem; }

  /* ── Usluge ── */
  .services-grid {
    grid-template-columns: 1fr;
    gap: 12px;
  }
  .service-card { padding: 24px 20px; }
  .service-icon { width: 38px; height: 38px; margin-bottom: 14px; }

  /* ── Galerija ── */
  .gallery-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 10px;
  }
  .gallery-header {
    flex-direction: column;
    align-items: flex-start;
    gap: 12px;
    margin-bottom: 24px;
  }
  .gallery-header .btn-outline { width: 100%; justify-content: center; }

  /* ── Features ── */
  .features-grid { grid-template-columns: 1fr; gap: 20px; }

  /* ── Kontakt forma ── */
  #kontakt .container > div:first-of-type { text-align: left !important; }
  #kontakt form > div[style*="grid-template-columns:1fr 1fr"] {
    grid-template-columns: 1fr !important;
  }

  /* ── Footer ── */
  .footer-inner {
    grid-template-columns: 1fr;
    gap: 28px;
    text-align: center;
  }
  .footer-logo        { justify-content: center; }
  .footer-contact     { align-items: center; }
  .footer-phone       { font-size: 1.3rem; }
  .footer-location    { justify-content: center; }
  .btn-whatsapp       { width: 100%; justify-content: center; }

  /* Footer bottom row */
  #colophon > .container > div:last-child {
    flex-direction: column;
    align-items: center;
    text-align: center;
    gap: 8px;
  }
}

/* =============================================
   RESPONSIVE — MALI MOBITEL (≤480px)
   ============================================= */
@media (max-width: 480px) {

  /* ── Header logo — sakrij tekst ako ima custom logo ── */
  .site-logo--custom img { max-height: 36px; }

  /* ── Hero ── */
  .hero-image   { height: 50vw; min-height: 200px; }
  .hero-title   { font-size: 2.2rem; }
  .hero-subtitle { font-size: 1rem; }
  .hero-description { display: none; } /* Preskup prostor — opis je ispod */

  .btn { padding: 12px 20px; font-size: 0.82rem; }

  /* ── Galerija — 1 stupac na malom mobitelu ── */
  .gallery-grid { grid-template-columns: 1fr; }
  .gallery-item { aspect-ratio: 16/9; }

  /* ── Usluge — kompaktno ── */
  .service-card { padding: 20px 16px; }
  .service-title { font-size: 0.88rem; }

  /* ── Features — ikona + tekst u redu ── */
  .feature-item { gap: 12px; }
  .feature-icon-wrap { width: 38px; height: 38px; }

  /* ── Kontakt forma ── */
  #kontakt { padding: 48px 0; }

  /* ── Footer ── */
  .footer-inner  { gap: 20px; }
  .footer-phone  { font-size: 1.15rem; }

}

/* =============================================
   GALERIJA SLIDER — Prije/Poslije
   ============================================= */
.kgallery-slider-wrap {
  position: relative;
  display: flex;
  align-items: center;
  gap: 0;
  margin-top: 40px;
  user-select: none;
}

.kgallery-track-outer {
  flex: 1;
  overflow: hidden;
  border-radius: 10px;
}

.kgallery-track {
  display: flex;
  gap: 16px;
  transition: transform 0.45s cubic-bezier(0.4, 0, 0.2, 1);
  will-change: transform;
}

/* Jedan slajd = jedan projekt (par Prije/Poslije) */
.kgallery-slide {
  flex: 0 0 calc(50% - 8px);   /* 2 slajda vidljiva odjednom */
  min-width: 0;
}

.kgallery-pair {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
  border-radius: 8px;
  overflow: hidden;
}

.kgallery-slide-single .kgallery-fig {
  width: 100%;
}

.kgallery-fig {
  position: relative;
  aspect-ratio: 4/3;
  overflow: hidden;
  background: var(--color-bg-card);
  border-radius: 6px;
  cursor: pointer;
}

.kgallery-fig img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transition: transform 0.45s ease;
}

.kgallery-fig:hover img {
  transform: scale(1.05);
}

.kgallery-fig .gallery-badge {
  position: absolute;
  bottom: 8px;
  left: 8px;
  z-index: 2;
}

.kgallery-fig::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, transparent 55%, rgba(0,0,0,0.6) 100%);
  pointer-events: none;
}

.kgallery-placeholder {
  background: var(--color-bg-card);
}

.kgallery-ph-inner {
  display: flex;
  align-items: center;
  justify-content: center;
  height: 100%;
}

.kgallery-slide-name {
  font-family: var(--font-heading);
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--color-text-muted);
  text-align: center;
  margin: 10px 0 0;
  letter-spacing: 0.04em;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* Strelice */
.kgallery-arrow {
  flex-shrink: 0;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: var(--color-bg-card);
  border: 1px solid var(--color-border);
  color: var(--color-text);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.25s;
  z-index: 2;
  position: relative;
}

.kgallery-arrow:hover {
  background: var(--color-gold);
  border-color: var(--color-gold);
  color: #111;
  transform: scale(1.08);
}

.kgallery-arrow:disabled {
  opacity: 0.3;
  cursor: default;
  transform: none;
}

.kgallery-prev { margin-right: 12px; }
.kgallery-next { margin-left:  12px; }

/* Dots */
.kgallery-dots {
  display: flex;
  justify-content: center;
  gap: 8px;
  margin-top: 20px;
}

.kgallery-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--color-border);
  border: none;
  cursor: pointer;
  transition: all 0.25s;
  padding: 0;
}

.kgallery-dot.active {
  background: var(--color-gold);
  transform: scale(1.3);
}

/* Touch swipe hint */
.kgallery-track-outer::after {
  content: '';
  position: absolute;
  right: 0; top: 0; bottom: 0;
  width: 60px;
  background: linear-gradient(90deg, transparent, rgba(0,0,0,0.15));
  pointer-events: none;
  border-radius: 0 10px 10px 0;
}

/* Responsive */
@media (max-width: 768px) {
  .kgallery-slide {
    flex: 0 0 85%;
  }
  .kgallery-arrow {
    width: 36px;
    height: 36px;
  }
  .kgallery-prev { margin-right: 8px; }
  .kgallery-next { margin-left:  8px; }
}

@media (max-width: 480px) {
  .kgallery-slide {
    flex: 0 0 92%;
  }
  .kgallery-pair {
    grid-template-columns: 1fr 1fr;
    gap: 4px;
  }
}

/* =============================================
   SLOBODNA GALERIJA — Frontend
   ============================================= */
#slobodna-galerija {
  padding: 100px 0;
  background: var(--color-bg);
}

.kimba-fg-grid {
  display: grid;
  gap: 14px;
  margin-top: 48px;
}

.kimba-fg-cols-2 { grid-template-columns: repeat(2, 1fr); }
.kimba-fg-cols-3 { grid-template-columns: repeat(3, 1fr); }
.kimba-fg-cols-4 { grid-template-columns: repeat(4, 1fr); }

.kimba-fg-item {
  position: relative;
  overflow: hidden;
  border-radius: var(--radius);
  aspect-ratio: 4/3;
  cursor: pointer;
  background: var(--color-bg-card);
}

.kimba-fg-item img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.5s ease;
  display: block;
}

.kimba-fg-item:hover img {
  transform: scale(1.05);
}

/* Istaknuta slika — zauzima 2 stupca */
.kimba-fg-featured {
  grid-column: span 2;
  aspect-ratio: 16/9;
}

.kimba-fg-caption {
  position: absolute;
  bottom: 0; left: 0; right: 0;
  padding: 12px 14px 10px;
  background: linear-gradient(transparent, rgba(0,0,0,0.75));
  color: rgba(255,255,255,0.9);
  font-family: var(--font-heading);
  font-size: 0.78rem;
  font-weight: 600;
  letter-spacing: 0.04em;
  opacity: 0;
  transform: translateY(4px);
  transition: opacity 0.3s, transform 0.3s;
}

.kimba-fg-item:hover .kimba-fg-caption {
  opacity: 1;
  transform: translateY(0);
}

/* Lightbox overlay */
.kimba-fg-lightbox {
  position: fixed;
  inset: 0;
  z-index: 99998;
  background: rgba(0,0,0,0.92);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  cursor: zoom-out;
}

.kimba-fg-lightbox img {
  max-width: 92vw;
  max-height: 88vh;
  object-fit: contain;
  border-radius: 4px;
  box-shadow: 0 8px 64px rgba(0,0,0,0.6);
}

.kimba-fg-lightbox-close {
  position: absolute;
  top: 16px; right: 20px;
  font-size: 2rem;
  color: rgba(255,255,255,0.7);
  cursor: pointer;
  background: none;
  border: none;
  transition: color 0.2s;
  line-height: 1;
  padding: 4px;
}
.kimba-fg-lightbox-close:hover { color: #fff; }

.kimba-fg-lightbox-nav {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  background: rgba(255,255,255,0.1);
  border: none;
  color: #fff;
  font-size: 1.8rem;
  cursor: pointer;
  padding: 16px 14px;
  border-radius: 6px;
  transition: background 0.2s;
  line-height: 1;
}
.kimba-fg-lightbox-nav:hover { background: rgba(255,255,255,0.2); }
.kimba-fg-lightbox-prev { left: 12px; }
.kimba-fg-lightbox-next { right: 12px; }

.kimba-fg-lightbox-caption {
  position: absolute;
  bottom: 20px;
  left: 50%;
  transform: translateX(-50%);
  color: rgba(255,255,255,0.7);
  font-family: var(--font-heading);
  font-size: 0.85rem;
  letter-spacing: 0.05em;
  white-space: nowrap;
}

/* Gumb "Prikaži sve" */
.kimba-fg-show-more {
  display: flex;
  justify-content: center;
  margin-top: 32px;
}

/* Responsive */
@media (max-width: 768px) {
  #slobodna-galerija { padding: 64px 0; }
  .kimba-fg-cols-3,
  .kimba-fg-cols-4 { grid-template-columns: repeat(2, 1fr); }
  .kimba-fg-featured { grid-column: span 2; }
}

@media (max-width: 480px) {
  .kimba-fg-cols-2,
  .kimba-fg-cols-3,
  .kimba-fg-cols-4 { grid-template-columns: repeat(2, 1fr); gap: 8px; }
  .kimba-fg-featured { grid-column: span 2; aspect-ratio: 16/9; }
}

/* =============================================
   GUTENBERG EDITOR STYLES
   ============================================= */
.wp-block-group { margin: 0; }
.alignwide { max-width: 1200px; margin-left: auto; margin-right: auto; }
.alignfull { max-width: 100%; }

/* Footer poslovni podaci */
.footer-legal {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px;
  font-size: 0.75rem;
  color: var(--color-text-muted);
  padding-bottom: 10px;
  border-bottom: 1px solid rgba(255,255,255,0.05);
}
.footer-legal-item { color: var(--color-text-muted); }
.footer-legal-sep  { color: var(--color-border); }

@media (max-width: 480px) {
  .footer-legal { flex-direction: column; align-items: flex-start; gap: 3px; }
  .footer-legal-sep { display: none; }
}

/* =============================================
   KONTAKT FORMA grid */
.kontakt-form-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
}
@media (max-width: 600px) {
  .kontakt-form-row { grid-template-columns: 1fr; }
}

/* sr-only helper */
.sr-only {
  position: absolute; width: 1px; height: 1px;
  padding: 0; margin: -1px; overflow: hidden;
  clip: rect(0,0,0,0); white-space: nowrap; border: 0;
}
.wp-block-heading { color: var(--color-white); }
.wp-block-paragraph { color: var(--color-text); }
.wp-block-button__link {
  background: var(--color-gold);
  color: #111;
  border-radius: var(--radius);
  font-family: var(--font-heading);
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

/* =============================================
   GALLERY LIGHTBOX
   ============================================= */
.kgallery-lightbox {
  position: fixed;
  inset: 0;
  z-index: 99999;
  display: none;
  align-items: center;
  justify-content: center;
  opacity: 0;
  transition: opacity 0.28s ease;
}

.kgallery-lightbox.kgallery-lb-open {
  opacity: 1;
}

.kgallery-lb-bg {
  position: absolute;
  inset: 0;
  background: rgba(0,0,0,0.92);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
}

.kgallery-lb-content {
  position: relative;
  z-index: 2;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
  max-width: 90vw;
  max-height: 90vh;
}

.kgallery-lb-img {
  max-width: 88vw;
  max-height: 80vh;
  object-fit: contain;
  border-radius: 6px;
  box-shadow: 0 8px 64px rgba(0,0,0,0.5);
  display: block;
}

.kgallery-lb-counter {
  color: rgba(255,255,255,0.5);
  font-family: var(--font-heading);
  font-size: 0.8rem;
  letter-spacing: 0.1em;
}

.kgallery-lb-close {
  position: absolute;
  top: 16px; right: 16px;
  z-index: 3;
  width: 44px; height: 44px;
  border-radius: 50%;
  background: rgba(255,255,255,0.1);
  border: none;
  color: #fff;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.2s;
}

.kgallery-lb-close:hover { background: rgba(255,255,255,0.2); }

.kgallery-lb-nav {
  position: absolute;
  top: 50%; transform: translateY(-50%);
  z-index: 3;
  width: 50px; height: 50px;
  border-radius: 50%;
  background: rgba(255,255,255,0.1);
  border: none;
  color: #fff;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.2s, transform 0.2s;
}

.kgallery-lb-nav:hover {
  background: var(--color-gold);
  color: #111;
}

.kgallery-lb-prev { left: 12px; }
.kgallery-lb-next { right: 12px; }

@media (max-width: 480px) {
  .kgallery-lb-nav { width: 40px; height: 40px; }
  .kgallery-lb-prev { left: 4px; }
  .kgallery-lb-next { right: 4px; }
}
