/* ==========================================================
   Toplota d.o.o. Bijeljina – Stranica u pripremi
   ========================================================== */

:root {
  --red: #e31e24;
  --red-dark: #c4161c;
  --navy: #1b2a44;
  --navy-dark: #15223a;
  --text: #2b2f36;
  --muted: #4a515c;
  --white: #fff;
  --radius: 18px;
  --shadow: 0 12px 40px rgba(20, 35, 60, .14);
  --font: "Roboto", "Segoe UI", Arial, sans-serif;
  --script: "Dancing Script", cursive;
}

*,
*::before,
*::after { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  font-family: var(--font);
  color: var(--text);
  background: #f4f5f6;
  line-height: 1.4;
}

img, svg { display: block; max-width: 100%; }

a { color: inherit; text-decoration: none; }

ul { list-style: none; margin: 0; padding: 0; }

h1, h2, p { margin: 0; }

address { font-style: normal; }

.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  margin: -1px;
  padding: 0;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
  border: 0;
}

.container {
  width: 100%;
  max-width: 1440px;
  margin: 0 auto;
  padding: 0 clamp(16px, 3vw, 48px);
}

/* ---------- HERO ---------- */

.hero {
  position: relative;
  flex: 1;
  overflow: hidden;
  display: flex;
  align-items: center;
  padding: clamp(32px, 5vw, 64px) 0;
}

.hero__bg {
  position: absolute;
  inset: 0;
  z-index: 0;
  background:
    /* bijeli sjaj u sredini radi čitljivosti */
    radial-gradient(ellipse 50% 75% at 48% 45%, rgba(255,255,255,.98) 0%, rgba(255,255,255,.92) 50%, rgba(255,255,255,0) 100%),
    linear-gradient(90deg, rgba(255,255,255,0) 0%, rgba(255,255,255,.35) 35%, rgba(255,255,255,.35) 65%, rgba(255,255,255,0) 100%),
    url("images/background.jpg") center / cover no-repeat;
}

.hero__grid {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: minmax(0, .55fr) minmax(0, 2.2fr) minmax(340px, 1fr);
  grid-template-areas: ". intro sidebar";
  gap: clamp(24px, 3vw, 48px);
  align-items: center;
}

/* ---------- INTRO (centar) ---------- */

.intro {
  grid-area: intro;
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
}

.intro__logo {
  width: clamp(200px, 26vw, 400px);
  height: auto;
  filter: drop-shadow(0 6px 18px rgba(0, 0, 0, .08));
  animation: glow 4s ease-in-out infinite;
}

@keyframes glow {
  0%, 100% { transform: scale(1); }
  50%      { transform: scale(1.025); }
}

.intro__url {
  margin-top: clamp(10px, 1.5vw, 20px);
  color: var(--red);
  font-weight: 700;
  font-size: clamp(1.5rem, 3vw, 2.6rem);
  letter-spacing: -.01em;
  transition: color .2s;
}

.intro__url:hover { color: var(--red-dark); }

.intro__title {
  margin-top: clamp(14px, 2vw, 28px);
  color: var(--navy);
  font-weight: 900;
  font-size: clamp(1.9rem, 3.9vw, 4rem);
  line-height: 1.05;
  text-transform: uppercase;
}

.intro__divider {
  display: block;
  width: 100px;
  height: 3px;
  margin: clamp(14px, 2vw, 22px) auto;
  background: var(--red);
  border-radius: 2px;
}

.intro__subtitle {
  color: var(--navy);
  font-size: clamp(.8rem, 1.3vw, 1.15rem);
  font-weight: 500;
  letter-spacing: .32em;
  text-transform: uppercase;
}

/* ---------- SERVICES ---------- */

.services {
  margin-top: clamp(28px, 4vw, 52px);
  width: 100%;
  display: grid;
  grid-template-columns: repeat(4, 1fr);
}

.service {
  padding: 0 clamp(8px, 1.2vw, 20px);
  display: flex;
  flex-direction: column;
  align-items: center;
}

.service + .service { border-left: 1px solid rgba(27, 42, 68, .15); }

.service__icon {
  width: clamp(40px, 4vw, 56px);
  height: clamp(40px, 4vw, 56px);
  margin-bottom: 12px;
  transition: transform .3s;
}

.service:hover .service__icon { transform: translateY(-4px) scale(1.06); }

.service__title {
  color: var(--navy);
  font-size: clamp(1rem, 1.35vw, 1.25rem);
  font-weight: 700;
  line-height: 1.25;
}

.service__text {
  margin-top: 6px;
  color: var(--muted);
  font-size: clamp(.82rem, 1vw, .95rem);
}

/* ---------- SIDEBAR / KARTICE ---------- */

.sidebar {
  grid-area: sidebar;
  display: flex;
  flex-direction: column;
  gap: 24px;
}

.card {
  background: rgba(255, 255, 255, .96);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  overflow: hidden;
  backdrop-filter: blur(6px);
}

.contact__header {
  display: flex;
  align-items: center;
  gap: 18px;
  padding: 16px 24px;
  background: var(--red);
  color: var(--white);
}

.contact__header h2 {
  font-size: clamp(1.3rem, 1.8vw, 1.65rem);
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .02em;
}

.contact__badge {
  flex: none;
  display: grid;
  place-items: center;
  width: 52px;
  height: 52px;
  border-radius: 50%;
  background: var(--white);
  color: var(--red);
}

.contact__badge svg { width: 28px; height: 28px; }

.contact__list {
  padding: 22px 24px 8px;
}

.contact__list li {
  display: flex;
  align-items: flex-start;
  gap: 18px;
  padding: 10px 0;
  font-size: clamp(1rem, 1.3vw, 1.2rem);
  color: var(--text);
}

.contact__list li:last-child {
  padding-bottom: 20px;
  border-bottom: 1px solid #e3e5e8;
}

.contact__list svg {
  flex: none;
  width: 26px;
  height: 26px;
  color: var(--navy);
}

.contact__list strong { font-weight: 700; color: var(--navy); }

.contact__list a { transition: color .2s; word-break: break-word; }
.contact__list a:hover { color: var(--red); }

.btn {
  display: flex;
  align-items: center;
  gap: 14px;
  margin: 20px 24px 24px;
  padding: 16px 22px;
  border-radius: 12px;
  background: var(--red);
  color: var(--white);
  font-weight: 700;
  font-size: clamp(.9rem, 1vw, 1.05rem);
  text-transform: uppercase;
  letter-spacing: .01em;
  box-shadow: 0 8px 20px rgba(227, 30, 36, .3);
  transition: background .2s, transform .2s, box-shadow .2s;
}

.btn svg { width: 24px; height: 24px; flex: none; }

.btn span { flex: 1; white-space: nowrap; }

.btn__arrow { transition: transform .2s; }

.btn:hover {
  background: var(--red-dark);
  transform: translateY(-2px);
  box-shadow: 0 12px 26px rgba(227, 30, 36, .38);
}

.btn:hover .btn__arrow { transform: translateX(4px); }

.partner {
  padding: 26px 24px 30px;
  text-align: center;
}

.partner__title {
  color: var(--navy);
  font-size: clamp(1rem, 1.25vw, 1.15rem);
  font-weight: 700;
  text-transform: uppercase;
  line-height: 1.35;
}

.partner__logo {
  width: 100%;
  max-width: 340px;
  height: auto;
  margin: 22px auto 0;
}

/* ---------- FOOTER ---------- */

.footer {
  background: linear-gradient(180deg, var(--navy) 0%, var(--navy-dark) 100%);
  color: rgba(255, 255, 255, .9);
  padding: 26px 0;
}

.footer__inner {
  display: grid;
  grid-template-columns: auto auto 1fr;
  align-items: center;
  gap: 32px;
}

.footer__company {
  display: flex;
  flex-direction: column;
  gap: 4px;
  padding-right: 32px;
  border-right: 1px solid rgba(255, 255, 255, .2);
  font-size: 1.05rem;
}

.footer__company strong { color: var(--white); font-weight: 700; }

.footer__slogan {
  font-family: var(--script);
  font-size: clamp(1.4rem, 2vw, 1.9rem);
  color: var(--white);
  white-space: nowrap;
}

.footer__slogan span {
  position: relative;
  display: inline-block;
}

.footer__slogan span::after {
  content: "";
  position: absolute;
  left: 8%;
  right: 30%;
  bottom: -4px;
  height: 3px;
  border-radius: 3px;
  background: var(--red);
  transform: rotate(-2deg);
}

.footer__values {
  display: flex;
  justify-content: flex-end;
  flex-wrap: wrap;
  gap: 16px 36px;
}

.footer__values li {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 1rem;
}

.footer__values svg { width: 30px; height: 30px; }

/* ==========================================================
   RESPONSIVE
   ========================================================== */

/* Manji desktop / laptop */
@media (max-width: 1280px) {
  .hero__grid {
    grid-template-columns: minmax(0, 1.6fr) minmax(340px, 1fr);
    grid-template-areas: "intro sidebar";
  }

  .footer__inner {
    grid-template-columns: 1fr 1fr;
  }

  .footer__values {
    grid-column: 1 / -1;
    justify-content: center;
    padding-top: 18px;
    border-top: 1px solid rgba(255, 255, 255, .12);
  }

  .footer__slogan { text-align: right; }
}

/* Tablet */
@media (max-width: 960px) {
  .hero { align-items: flex-start; }

  .hero__bg {
    background:
      linear-gradient(180deg, rgba(255,255,255,.55) 0%, rgba(255,255,255,.92) 22%, rgba(255,255,255,.92) 70%, rgba(255,255,255,.55) 100%),
      url("images/background.jpg") 20% bottom / cover no-repeat;
  }

  .hero__grid {
    grid-template-columns: 1fr;
    grid-template-areas:
      "intro"
      "sidebar";
  }

  .intro__logo { width: clamp(200px, 42vw, 340px); }

  .sidebar {
    display: grid;
    grid-template-columns: 1.3fr 1fr;
    align-items: stretch;
  }

  .partner {
    display: flex;
    flex-direction: column;
    justify-content: center;
  }

  .footer__inner {
    grid-template-columns: 1fr;
    text-align: center;
    gap: 18px;
  }

  .footer__company {
    padding-right: 0;
    border-right: 0;
  }

  .footer__slogan { text-align: center; }
}

/* Mobilni */
@media (max-width: 640px) {
  .intro__subtitle { letter-spacing: .18em; }

  .services {
    grid-template-columns: repeat(2, 1fr);
    row-gap: 28px;
  }

  .service:nth-child(3) { border-left: 0; }

  .sidebar { grid-template-columns: 1fr; }

  .contact__header { padding: 14px 20px; }
  .contact__list { padding: 18px 20px 4px; }
  .btn { margin: 18px 20px 20px; padding: 15px 18px; }

  .footer__slogan { white-space: normal; }

  .footer__values { gap: 14px 24px; }
}

/* Mali mobilni */
@media (max-width: 380px) {
  .contact__badge { width: 44px; height: 44px; }
  .contact__badge svg { width: 22px; height: 22px; }
  .contact__list li { gap: 14px; }
  .btn { font-size: .88rem; gap: 10px; }
}

/* Pristupačnost */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation: none !important;
    transition: none !important;
  }
}

a:focus-visible {
  outline: 3px solid var(--navy);
  outline-offset: 3px;
  border-radius: 4px;
}
