/* ================================================================
   UHUD Humanitarna organizacija — Zajednički CSS
   Koriste sve stranice sajta
   ================================================================

   Sadržaj:
     1.  CSS varijable (brend boje)
     2.  Osnova
     3.  Gornja traka
     4.  Navigacija i logo
     5.  Dugmad
     6.  Hero sekcija
     7.  Sekcije (padding, naslovi, kicker, zlatna linija)
     8.  Kartice (feature, program, news, impact, contact)
     9.  Statistike
    10.  Projekti — slike
    11.  Donacije
    12.  Transparentnost
    13.  Volonteri — timeline
    14.  Galerija
    15.  YouTube embed
    16.  Forma
    17.  Founder (osnivač) sekcija
    18.  Footer
    19.  Scroll-to-top dugme
    20.  Responsive breakpointi
   ================================================================ */

/* ------------------------------------------------------------------
   1. CSS VARIJABLE — brend boje UHUD organizacije
------------------------------------------------------------------ */
:root {
  --uhud-primary:      #0f5f4a;
  --uhud-primary-dark: #0a3f32;
  --uhud-gold:         #d6a84f;
  --uhud-light:        #f5f7f4;
  --uhud-text:         #1e2a27;
  --uhud-muted:        #5f7169;
  --uhud-border:       rgba(15, 95, 74, 0.12);
}

/* ------------------------------------------------------------------
   2. OSNOVA
------------------------------------------------------------------ */
html { scroll-behavior: smooth; }

body {
  font-family: "Inter", Arial, sans-serif;
  color: var(--uhud-text);
  background-color: #fff;
  /* Prostor ispod fixed navbara (visina: logo 130px + py-1 padding = ~146px) */
  padding-top: 162px;
}

/* ------------------------------------------------------------------
   3. GORNJA TRAKA — kontakt info + mreže (samo desktop)
------------------------------------------------------------------ */
.top-bar {
  background: var(--uhud-primary-dark);
  color: rgba(255, 255, 255, 0.88);
  font-size: 0.84rem;
}

.top-bar a {
  color: rgba(255, 255, 255, 0.88);
  text-decoration: none;
  transition: color 0.2s;
}

.top-bar a:hover { color: #fff; }

/* ------------------------------------------------------------------
   4. NAVIGACIJA I LOGO
   Navbar je fixed-top — uvek vidljiv pri skrolovanju na svim uređajima.
   body ima padding-top: 70px da sadržaj ne ide ispod navbara.
------------------------------------------------------------------ */
.navbar {
  box-shadow: 0 2px 18px rgba(0, 0, 0, 0.07);
  -webkit-backface-visibility: hidden;
  backface-visibility: hidden;
  padding-top: 0 !important;
  padding-bottom: 0 !important;
}

.navbar .nav-link {
  padding-top: 0.25rem !important;
  padding-bottom: 0.25rem !important;
  padding-left: 0.6rem !important;
  padding-right: 0.6rem !important;
}

/* Mobilni meni — scrollable ako ima više stavki nego što staje na ekran */
@media (max-width: 1199.98px) {
  .navbar-collapse.show,
  .navbar-collapse.collapsing {
    max-height: calc(100vh - 70px);
    overflow-y: auto;
    overflow-x: hidden;
  }
}

.navbar-logo {
  height: 100px;
  width: auto;
  object-fit: contain;
}

.footer-logo {
  height: 60px;
  width: auto;
  object-fit: contain;
}

.nav-link {
  font-weight: 600;
  color: var(--uhud-text) !important;
  padding: 0.45rem 0.75rem !important;
  border-radius: 8px;
  transition: background 0.2s, color 0.2s;
}

.nav-link:hover,
.nav-link.active {
  color: var(--uhud-primary) !important;
  background: rgba(15, 95, 74, 0.07);
}

/* Dropdown meni */
.dropdown-item:hover,
.dropdown-item:focus {
  background: rgba(15, 95, 74, 0.07);
  color: var(--uhud-primary);
}

/* ------------------------------------------------------------------
   5. DUGMAD
------------------------------------------------------------------ */
.btn-uhud {
  background: var(--uhud-primary);
  color: #fff;
  border: 0;
  font-weight: 700;
  padding: 0.75rem 1.5rem;
  border-radius: 999px;
  transition: background 0.25s, transform 0.2s;
}

.btn-uhud:hover {
  background: var(--uhud-primary-dark);
  color: #fff;
  transform: translateY(-1px);
}

.btn-outline-uhud {
  color: var(--uhud-primary);
  border: 2px solid var(--uhud-primary);
  font-weight: 700;
  padding: 0.7rem 1.4rem;
  border-radius: 999px;
  transition: background 0.25s, color 0.25s;
}

.btn-outline-uhud:hover {
  background: var(--uhud-primary);
  color: #fff;
}

/* ------------------------------------------------------------------
   6. HERO SEKCIJA
------------------------------------------------------------------ */
.hero {
  min-height: 700px;
  background:
    linear-gradient(100deg,
      rgba(10, 63, 50, 0.96) 0%,
      rgba(15, 95, 74, 0.78) 55%,
      rgba(15, 95, 74, 0.20) 100%),
    url("https://images.unsplash.com/photo-1593113598332-cd288d649433?auto=format&fit=crop&w=1800&q=80")
    center / cover no-repeat;
  color: #fff;
  display: flex;
  align-items: center;
  padding: 80px 0;
}

/* Hero za podstranice — manji */
.hero-sm {
  min-height: 280px;
  background:
    linear-gradient(100deg,
      rgba(10, 63, 50, 0.96) 0%,
      rgba(15, 95, 74, 0.80) 100%),
    url("https://images.unsplash.com/photo-1593113598332-cd288d649433?auto=format&fit=crop&w=1800&q=80")
    center / cover no-repeat;
  color: #fff;
  display: flex;
  align-items: center;
  padding: 60px 0;
}

.hero .badge,
.hero-sm .badge {
  background: rgba(255, 255, 255, 0.14);
  border: 1px solid rgba(255, 255, 255, 0.28);
  color: #fff;
  font-weight: 600;
}

.hero-card {
  background: rgba(255, 255, 255, 0.97);
  color: var(--uhud-text);
  border-radius: 24px;
  padding: 2rem;
  box-shadow: 0 32px 80px rgba(0, 0, 0, 0.22);
}

/* ------------------------------------------------------------------
   7. SEKCIJE — padding, naslovi, kicker, zlatna linija
------------------------------------------------------------------ */
.section-padding { padding: 96px 0; }

.section-title {
  font-weight: 800;
  letter-spacing: -0.04em;
}

.section-kicker {
  color: var(--uhud-primary);
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  font-size: 0.78rem;
}

.text-muted-custom { color: var(--uhud-muted); }

.bg-soft { background: var(--uhud-light); }

.gold-line {
  width: 60px;
  height: 4px;
  background: var(--uhud-gold);
  border-radius: 999px;
  margin: 0.9rem 0 1.5rem;
}

/* ------------------------------------------------------------------
   8. KARTICE
------------------------------------------------------------------ */
.feature-card,
.program-card,
.news-card,
.impact-card,
.contact-card,
.donation-card {
  border: 1px solid var(--uhud-border);
  border-radius: 20px;
  background: #fff;
  box-shadow: 0 8px 28px rgba(10, 63, 50, 0.05);
  transition: transform 0.25s ease, box-shadow 0.25s ease;
  height: 100%;
}

.feature-card:hover,
.program-card:hover,
.news-card:hover,
.donation-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 18px 52px rgba(10, 63, 50, 0.10);
}

.icon-box {
  width: 52px;
  height: 52px;
  border-radius: 14px;
  background: rgba(15, 95, 74, 0.09);
  color: var(--uhud-primary);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 1.45rem;
  margin-bottom: 1rem;
}

/* ------------------------------------------------------------------
   9. STATISTIKE
------------------------------------------------------------------ */
.stat-number {
  font-size: 2.4rem;
  font-weight: 800;
  color: var(--uhud-primary);
  letter-spacing: -0.05em;
  line-height: 1.1;
}

/* ------------------------------------------------------------------
  10. PROJEKTI — slika kartice
------------------------------------------------------------------ */
.project-img {
  height: 215px;
  object-fit: cover;
  border-radius: 20px 20px 0 0;
}

/* ------------------------------------------------------------------
  11. DONACIJE — zelena kutija + donation card
------------------------------------------------------------------ */
.donation-box {
  background: linear-gradient(135deg,
    var(--uhud-primary-dark) 0%,
    var(--uhud-primary) 100%);
  color: #fff;
  border-radius: 28px;
  padding: 2.5rem;
  box-shadow: 0 24px 70px rgba(10, 63, 50, 0.24);
}

.bank-card {
  background: rgba(255, 255, 255, 0.10);
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: 16px;
  padding: 1.2rem;
}

/* Kartica po donacionom cilju */
.donation-card .account-box {
  background: var(--uhud-light);
  border-radius: 14px;
  padding: 1rem;
  font-family: "Courier New", monospace;
  font-weight: 700;
  font-size: 1rem;
  letter-spacing: 0.05em;
  color: var(--uhud-primary-dark);
  word-break: break-all;
}

/* Placeholder za QR kod */
.qr-placeholder {
  width: 110px;
  height: 110px;
  border: 2px dashed var(--uhud-border);
  border-radius: 12px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  background: var(--uhud-light);
  font-size: 0.7rem;
  color: var(--uhud-muted);
  text-align: center;
  gap: 0.3rem;
  flex-shrink: 0;
}

.qr-placeholder i { font-size: 2rem; color: var(--uhud-primary); }

/* Dugme za kopiranje broja računa */
.btn-copy {
  background: rgba(15, 95, 74, 0.08);
  border: 1px solid var(--uhud-border);
  color: var(--uhud-primary);
  font-weight: 600;
  font-size: 0.82rem;
  border-radius: 8px;
  padding: 0.35rem 0.75rem;
  cursor: pointer;
  transition: background 0.2s;
}

.btn-copy:hover { background: rgba(15, 95, 74, 0.14); }

/* ------------------------------------------------------------------
  12. TRANSPARENTNOST — accordion
------------------------------------------------------------------ */
.accordion-button:not(.collapsed) {
  background: rgba(15, 95, 74, 0.07);
  color: var(--uhud-primary-dark);
  box-shadow: none;
}

/* ------------------------------------------------------------------
  13. VOLONTERI — timeline
------------------------------------------------------------------ */
.timeline {
  border-left: 3px solid rgba(15, 95, 74, 0.18);
  padding-left: 1.6rem;
}

.timeline-item { position: relative; margin-bottom: 2rem; }

.timeline-item::before {
  content: "";
  position: absolute;
  left: -2.12rem;
  top: 0.35rem;
  width: 16px;
  height: 16px;
  background: var(--uhud-gold);
  border-radius: 50%;
  border: 3px solid #fff;
  box-shadow: 0 0 0 3px rgba(214, 168, 79, 0.28);
}

/* ------------------------------------------------------------------
  14. GALERIJA
------------------------------------------------------------------ */
.gallery-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 1rem;
}

.gallery-item {
  border-radius: 16px;
  overflow: hidden;
  position: relative;
  cursor: pointer;
  background: var(--uhud-light);
}

.gallery-item img {
  width: 100%;
  height: 220px;
  object-fit: cover;
  display: block;
  transition: transform 0.35s ease;
}

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

/* Overlay na hover */
.gallery-overlay {
  position: absolute;
  inset: 0;
  background: rgba(10, 63, 50, 0.55);
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  transition: opacity 0.3s;
  color: #fff;
  font-size: 2rem;
}

.gallery-item:hover .gallery-overlay { opacity: 1; }

/* ------------------------------------------------------------------
  15. YOUTUBE EMBED
------------------------------------------------------------------ */
.yt-card {
  border-radius: 18px;
  overflow: hidden;
  box-shadow: 0 8px 28px rgba(10, 63, 50, 0.08);
  background: #000;
}

/* Responsive 16:9 iframe */
.ratio-16x9-custom {
  position: relative;
  padding-top: 56.25%;
}

.ratio-16x9-custom iframe,
.ratio-16x9-custom .yt-placeholder {
  position: absolute;
  top: 0; left: 0;
  width: 100%; height: 100%;
  border: 0;
}

/* Placeholder za YouTube video (bez URL-a) */
.yt-placeholder {
  background: #111;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  color: rgba(255,255,255,0.7);
  gap: 0.5rem;
  font-size: 0.85rem;
}

.yt-placeholder i { font-size: 3rem; color: #ff0000; }

/* ------------------------------------------------------------------
  16. FORMA — kontakt
------------------------------------------------------------------ */
.form-control,
.form-select {
  border-radius: 12px;
  padding: 0.8rem 1rem;
  border: 1px solid var(--uhud-border);
  font-size: 0.95rem;
}

.form-control:focus,
.form-select:focus {
  border-color: var(--uhud-primary);
  box-shadow: 0 0 0 0.2rem rgba(15, 95, 74, 0.14);
}

/* ------------------------------------------------------------------
  17. OSNIVAČ (FOUNDER) SEKCIJA
------------------------------------------------------------------ */
.founder-img-wrap {
  width: 300px;
  height: 300px;
  border-radius: 50%;
  border: 6px solid var(--uhud-gold);
  overflow: hidden;
  box-shadow: 0 20px 60px rgba(10, 63, 50, 0.22);
  background: var(--uhud-light);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.founder-img-wrap img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: top center; /* prioritizuje lice na fotografiji */
}

/* Tablet: malo manje */
@media (max-width: 767.98px) {
  .founder-img-wrap {
    width: 220px;
    height: 220px;
  }
}

/* Placeholder ikona u slučaju da slika nije dostupna */
.founder-img-wrap .founder-placeholder {
  font-size: 5rem;
  color: var(--uhud-primary);
  opacity: 0.4;
}

/* Blok citata osnivača */
.founder-quote {
  border-left: 4px solid var(--uhud-gold);
  padding: 1rem 1.5rem;
  background: rgba(214, 168, 79, 0.06);
  border-radius: 0 12px 12px 0;
  font-style: italic;
  font-size: 1.1rem;
  color: var(--uhud-text);
}

/* ------------------------------------------------------------------
  18. FOOTER
------------------------------------------------------------------ */
.footer {
  background: #071f19;
  color: rgba(255, 255, 255, 0.76);
}

.footer a {
  color: rgba(255, 255, 255, 0.76);
  text-decoration: none;
  transition: color 0.2s;
}

.footer a:hover { color: #fff; }

.footer-links li { margin-bottom: 0.5rem; }

.footer-contact-card {
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.10);
  border-radius: 16px;
  padding: 1.25rem 1.4rem;
}

.footer-icon-box {
  width: 36px;
  height: 36px;
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.10);
  color: var(--uhud-gold);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 1rem;
  flex-shrink: 0;
}

/* ------------------------------------------------------------------
  19. SCROLL-TO-TOP DUGME
------------------------------------------------------------------ */
#scrollTop {
  position: fixed;
  bottom: 1.75rem;
  right: 1.5rem;
  width: 46px;
  height: 46px;
  background: var(--uhud-primary);
  color: #fff;
  border: none;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.15rem;
  box-shadow: 0 8px 22px rgba(10, 63, 50, 0.32);
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.3s, visibility 0.3s, transform 0.25s;
  z-index: 1050;
  cursor: pointer;
}

#scrollTop.visible { opacity: 1; visibility: visible; }

#scrollTop:hover {
  transform: translateY(-3px);
  background: var(--uhud-primary-dark);
}

/* ------------------------------------------------------------------
  20. RESPONSIVE BREAKPOINTI
------------------------------------------------------------------ */

/* Tableti (≤ 991px) */
@media (max-width: 991.98px) {
  .hero { min-height: auto; padding: 80px 0 56px; }
  .section-padding { padding: 70px 0; }
}

/* Mobilni (≤ 575px) */
@media (max-width: 575.98px) {
  .hero { padding: 68px 0 48px; }
  .hero h1 { font-size: 2rem; }
  .section-padding { padding: 52px 0; }
  .section-title { font-size: 1.7rem; }
  .hero-card { padding: 1.4rem; }
  .donation-box { padding: 1.6rem 1.1rem; }
  .stat-number { font-size: 2rem; }
  .gallery-grid { grid-template-columns: 1fr 1fr; }
  .gallery-item img { height: 160px; }
  .founder-img-wrap { width: 160px; height: 160px; }
  .qr-placeholder { width: 90px; height: 90px; }
}
