/* ============================================================
   WESTAL CMS – Glavni CSS
   Brandbook: Crvena #ED1C24 | Žuta #FBAF00 | Siva #333333
   Font: Barlow Condensed (Google Fonts – MetaPro ekvivalent)
   ============================================================ */

/* --- Reset & Box model ------------------------------------- */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; font-size: 16px; }

/* --- Brandbook varijable ----------------------------------- */
:root {
  --red:      #ED1C24;
  --red-dark: #c8151b;
  --yellow:   #FBAF00;
  --gray:     #333333;
  --gray-mid: #666666;
  --gray-light: #f4f4f4;
  --white:    #ffffff;
  --border:   #e0e0e0;
  --radius:   4px;
  --shadow:   0 2px 8px rgba(0,0,0,0.10);
  --transition: .2s ease;
}

/* --- Tipografija ------------------------------------------- */
body {
  font-family: 'Barlow Condensed', 'Arial Narrow', Arial, sans-serif;
  color: var(--gray);
  background: var(--white);
  line-height: 1.6;
}

h1, h2, h3, h4, h5, h6 {
  font-weight: 700;
  line-height: 1.2;
  color: var(--gray);
}

a { color: var(--red); text-decoration: none; transition: color var(--transition); }
a:hover { color: var(--red-dark); }

img { max-width: 100%; height: auto; display: block; }
ul { list-style: none; }

/* --- Layout kontejner -------------------------------------- */
.container {
  width: 100%;
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 20px;
}

/* --- LOGO -------------------------------------------------- */
.nav-logo { text-decoration: none; display: flex; align-items: center; }

.nav-logo-img {
  height: 54px;
  width: auto;
  max-width: 220px;
  display: block;
  object-fit: contain;
}

@media (max-width: 768px) {
  .nav-logo-img { height: 42px; }
}

/* --- NAVIGACIJA -------------------------------------------- */
.site-nav {
  background: var(--white);
  border-bottom: 3px solid var(--red);
  position: sticky;
  top: 0;
  z-index: 100;
  box-shadow: 0 1px 6px rgba(0,0,0,0.08);
}

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

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

.logo-diamonds {
  position: relative;
  width: 32px;
  height: 26px;
  flex-shrink: 0;
}

.logo-diamonds span {
  position: absolute;
  display: block;
  width: 16px;
  height: 16px;
  transform: rotate(45deg);
}

.logo-diamonds .d1 { background: var(--red);    top: 0;  left: 0; }
.logo-diamonds .d2 { background: var(--yellow); top: 5px; left: 10px; }
.logo-diamonds .d3 { background: var(--red);    top: 0;  left: 8px; opacity: 0.75; }

.logo-text { line-height: 1; }
.logo-name  { display: block; font-size: 22px; font-weight: 900; color: var(--red); letter-spacing: .04em; }
.logo-slogan { display: block; font-size: 10px; color: var(--gray); letter-spacing: .08em; text-transform: uppercase; }

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

.nav-links a {
  padding: 6px 12px;
  font-size: 14px;
  font-weight: 600;
  color: var(--gray);
  text-transform: uppercase;
  letter-spacing: .04em;
  border-radius: var(--radius);
  transition: background var(--transition), color var(--transition);
}

.nav-links a:hover,
.nav-links a.aktivan { color: var(--red); background: rgba(237,28,36,.06); }

.nav-hamburger {
  display: none;
  background: none;
  border: none;
  cursor: pointer;
  padding: 4px;
  color: var(--gray);
  font-size: 24px;
}

/* --- INFO TRAKA -------------------------------------------- */
.info-bar {
  background: var(--gray);
  padding: 6px 0;
}

.info-bar-inner {
  display: flex;
  align-items: center;
  gap: 24px;
  flex-wrap: wrap;
}

.info-item {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 12px;
  color: rgba(255,255,255,0.75);
}

.info-item i { color: var(--yellow); font-size: 14px; }

/* --- HERO SLIDER ------------------------------------------- */
.hero-slider {
  position: relative;
  overflow: hidden;
  background: var(--gray);
  width: 100%;
}

.hero-slide {
  display: none;
  position: relative;
  height: 420px;
  width: 100%;
  overflow: hidden;
}

.hero-slide.aktivan { display: flex; align-items: center; }

/* Pozadinska slika – pokriva cijelu širinu bez crnih strana */
.hero-slide-bg {
  position: absolute;
  top: 0; left: 0; right: 0; bottom: 0;
  overflow: hidden;
}

.hero-slide-bg img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center top;
  display: block;
}

@media (max-width: 768px) {
  .hero-slide { height: 260px; }
}

/* Overlay – tamni sloj SAMO za čitljivost teksta, lijeva strana */
.hero-slide-overlay {
  position: absolute;
  inset: 0;
  /* Gradient: lijevo tamno (tekst čitljiv), desno transparentno (slika vidljiva) */
  background: linear-gradient(
    to right,
    rgba(0,0,0,0.62) 0%,
    rgba(0,0,0,0.45) 40%,
    rgba(0,0,0,0.10) 70%,
    rgba(0,0,0,0.00) 100%
  );
  z-index: 1;
}

/* Verzija kad nema slike – crvena pozadina */
.hero-slide.bez-slike {
  background: var(--red);
}

.hero-slide.bez-slike .hero-slide-overlay {
  display: none;
}

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

.hero-badge {
  display: inline-block;
  background: var(--yellow);
  color: var(--gray);
  font-size: 11px;
  font-weight: 700;
  padding: 4px 12px;
  border-radius: 2px;
  margin-bottom: 16px;
  letter-spacing: .06em;
  text-transform: uppercase;
}

.hero-title {
  font-size: clamp(28px, 5vw, 52px);
  font-weight: 900;
  color: var(--white);
  line-height: 1.1;
  margin-bottom: 12px;
  text-transform: uppercase;
  letter-spacing: .02em;
}

.hero-sub {
  font-size: 18px;
  color: rgba(255,255,255,0.85);
  margin-bottom: 28px;
  font-weight: 400;
}

.hero-btns { display: flex; gap: 12px; flex-wrap: wrap; }

.btn {
  display: inline-block;
  padding: 12px 24px;
  font-size: 13px;
  font-weight: 700;
  letter-spacing: .06em;
  text-transform: uppercase;
  border-radius: var(--radius);
  border: 2px solid transparent;
  cursor: pointer;
  transition: all var(--transition);
  text-decoration: none;
}

.btn-white  { background: var(--white);  color: var(--red);   border-color: var(--white); }
.btn-white:hover { background: transparent; color: var(--white); }

.btn-outline-white { background: transparent; color: var(--white); border-color: rgba(255,255,255,.5); }
.btn-outline-white:hover { background: var(--white); color: var(--red); border-color: var(--white); }

.btn-red  { background: var(--red);   color: var(--white); border-color: var(--red); }
.btn-red:hover { background: var(--red-dark); border-color: var(--red-dark); }

.btn-yellow { background: var(--yellow); color: var(--gray); border-color: var(--yellow); }
.btn-yellow:hover { filter: brightness(0.92); }

/* Slider navigacija */
.slider-dots {
  position: absolute;
  bottom: 20px;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  gap: 8px;
  z-index: 10;
}

.slider-dot {
  width: 8px; height: 8px;
  border-radius: 50%;
  background: rgba(255,255,255,0.4);
  border: none;
  cursor: pointer;
  transition: all var(--transition);
}

.slider-dot.aktivan { background: var(--yellow); width: 24px; border-radius: 4px; }

.slider-arrow {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  background: rgba(255,255,255,0.15);
  border: 2px solid rgba(255,255,255,0.3);
  color: var(--white);
  width: 44px; height: 44px;
  border-radius: 50%;
  cursor: pointer;
  font-size: 20px;
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 10;
  transition: background var(--transition);
}

.slider-arrow:hover { background: var(--red-dark); border-color: var(--red-dark); }
.slider-arrow.prev { left: 20px; }
.slider-arrow.next { right: 20px; }

/* --- SEKCIJA NASLOVI --------------------------------------- */
.section { padding: 56px 0; }
.section-alt { background: var(--gray-light); }

.section-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 36px;
}

.section-title {
  font-size: 26px;
  font-weight: 900;
  color: var(--gray);
  text-transform: uppercase;
  letter-spacing: .04em;
  padding-left: 14px;
  border-left: 4px solid var(--red);
}

.section-link {
  font-size: 13px;
  font-weight: 700;
  color: var(--red);
  text-transform: uppercase;
  letter-spacing: .06em;
  display: flex;
  align-items: center;
  gap: 4px;
}

/* --- KATEGORIJE GRID --------------------------------------- */
.cat-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(130px, 1fr));
  gap: 16px;
}

.cat-card {
  border: 1.5px solid var(--border);
  border-radius: var(--radius);
  padding: 20px 10px 16px;
  text-align: center;
  text-decoration: none;
  transition: border-color var(--transition), transform var(--transition), box-shadow var(--transition);
  background: var(--white);
}

.cat-card:hover {
  border-color: var(--red);
  transform: translateY(-3px);
  box-shadow: var(--shadow);
  color: var(--gray);
}

.cat-icon {
  width: 52px; height: 52px;
  background: var(--yellow);
  border-radius: var(--radius);
  margin: 0 auto 12px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.cat-icon i { font-size: 24px; color: var(--white); }
.cat-name { font-size: 12px; font-weight: 600; color: var(--gray); line-height: 1.3; }

/* --- PROMO BANER ------------------------------------------- */
.promo-banner {
  background: var(--red);
  border-radius: var(--radius);
  padding: 28px 32px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  flex-wrap: wrap;
  margin: 40px 0;
}

.promo-tag {
  display: inline-block;
  background: var(--yellow);
  color: var(--gray);
  font-size: 10px;
  font-weight: 700;
  padding: 3px 10px;
  border-radius: 2px;
  margin-bottom: 8px;
  letter-spacing: .08em;
  text-transform: uppercase;
}

.promo-title { font-size: 24px; font-weight: 900; color: var(--white); text-transform: uppercase; margin-bottom: 6px; }
.promo-sub   { font-size: 15px; color: rgba(255,255,255,0.85); }

/* --- PROIZVODI GRID ---------------------------------------- */
.prod-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 20px;
}

.prod-card {
  border: 1.5px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  background: var(--white);
  transition: border-color var(--transition), box-shadow var(--transition);
  text-decoration: none;
  color: var(--gray);
}

.prod-card:hover { border-color: var(--red); box-shadow: var(--shadow); }

.prod-img {
  height: 180px;
  background: var(--gray-light);
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}

.prod-img img { width: 100%; height: 100%; object-fit: cover; }
.prod-img i { font-size: 48px; color: #ccc; }

.prod-info { padding: 14px; }
.prod-name  { font-size: 15px; font-weight: 700; margin-bottom: 4px; }
.prod-cat   { font-size: 12px; color: var(--gray-mid); }

.prod-badge {
  display: inline-block;
  background: var(--red);
  color: var(--white);
  font-size: 10px;
  font-weight: 700;
  padding: 2px 8px;
  border-radius: 2px;
  text-transform: uppercase;
  letter-spacing: .05em;
  margin-bottom: 6px;
}

/* --- VIJESTI ----------------------------------------------- */
.news-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 24px;
}

.news-card {
  border: 1.5px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  background: var(--white);
  transition: border-color var(--transition), box-shadow var(--transition);
  text-decoration: none;
  color: var(--gray);
  display: flex;
  flex-direction: column;
}

.news-card:hover { border-color: var(--red); box-shadow: var(--shadow); }

.news-img {
  /* Fiksna visina – sve kartice iste visine */
  height: 220px;
  background: #f0f0f0;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
}

/* Inline style na img-u kontroliše object-fit per slika */
.news-img img {
  width: 100%;
  height: 100%;
  display: block;
}

.news-card:hover .news-img img { transform: scale(1.02); }
.news-img i { font-size: 48px; color: #ccc; }

.news-body { padding: 18px; flex: 1; display: flex; flex-direction: column; }

.news-tag {
  display: inline-block;
  background: var(--yellow);
  color: var(--gray);
  font-size: 10px;
  font-weight: 700;
  padding: 2px 8px;
  border-radius: 2px;
  text-transform: uppercase;
  letter-spacing: .06em;
  margin-bottom: 10px;
}

.news-title-text { font-size: 16px; font-weight: 700; margin-bottom: 8px; line-height: 1.3; }
.news-uvod       { font-size: 13px; color: var(--gray-mid); line-height: 1.5; flex: 1; }
.news-date       { font-size: 11px; color: #999; margin-top: 12px; }

/* --- KONTAKT ----------------------------------------------- */
.contact-section { background: var(--gray); padding: 56px 0; }

.contact-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 48px;
  align-items: start;
}

.contact-title { font-size: 26px; font-weight: 900; color: var(--white); text-transform: uppercase; margin-bottom: 28px; padding-left: 14px; border-left: 4px solid var(--red); }

.contact-item {
  display: flex;
  gap: 14px;
  align-items: flex-start;
  margin-bottom: 20px;
}

.contact-item-icon {
  width: 40px; height: 40px;
  background: var(--red);
  border-radius: var(--radius);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.contact-item-icon i { font-size: 18px; color: var(--white); }

.contact-item-label { font-size: 10px; color: rgba(255,255,255,.45); text-transform: uppercase; letter-spacing: .08em; margin-bottom: 3px; }
.contact-item-val   { font-size: 15px; color: var(--white); }
.contact-item-val a { color: var(--yellow); }

.contact-map { height: 280px; border-radius: var(--radius); overflow: hidden; }
.contact-map iframe { width: 100%; height: 100%; border: none; }
.contact-map-ph { width: 100%; height: 100%; background: #222; display: flex; align-items: center; justify-content: center; color: rgba(255,255,255,.3); font-size: 14px; }

/* --- FOOTER ------------------------------------------------ */
.site-footer { background: #1a1a1a; padding: 20px 0; }

.footer-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
}

.footer-copy  { font-size: 12px; color: rgba(255,255,255,.3); }
.footer-links { display: flex; gap: 20px; }
.footer-links a { font-size: 12px; color: rgba(255,255,255,.35); }
.footer-links a:hover { color: var(--yellow); }

/* --- FLASH PORUKE ------------------------------------------ */
.flash {
  padding: 12px 20px;
  border-radius: var(--radius);
  font-size: 14px;
  font-weight: 600;
  margin-bottom: 20px;
  border-left: 4px solid;
}

.flash-success { background: #d4edda; color: #155724; border-color: #28a745; }
.flash-error   { background: #f8d7da; color: #721c24; border-color: var(--red); }
.flash-info    { background: #fff3cd; color: #856404; border-color: var(--yellow); }

/* --- RESPONSIVE -------------------------------------------- */
@media (max-width: 768px) {
  .nav-links { display: none; flex-direction: column; position: absolute; top: 67px; left: 0; right: 0; background: var(--white); border-bottom: 3px solid var(--red); padding: 12px 0; box-shadow: var(--shadow); }
  .nav-links.otvoren { display: flex; }
  .nav-links a { padding: 10px 20px; border-radius: 0; }
  .nav-hamburger { display: block; }

  .hero-slide { min-height: 320px; }
  .hero-title { font-size: 28px; }
  .slider-arrow { display: none; }

  .cat-grid { grid-template-columns: repeat(4, 1fr); gap: 10px; }
  .prod-grid { grid-template-columns: repeat(2, 1fr); }
  .news-grid { grid-template-columns: 1fr; }
  .contact-grid { grid-template-columns: 1fr; }
  .info-bar-inner { gap: 12px; }
  .promo-banner { flex-direction: column; text-align: center; }
}

@media (max-width: 480px) {
  .cat-grid { grid-template-columns: repeat(2, 1fr); }
  .prod-grid { grid-template-columns: 1fr; }
  .section { padding: 36px 0; }
}
