/* Fontovi */
@import url("https://fonts.googleapis.com/css2?family=Outfit:wght@300;400;500;600;700&family=Roboto+Slab:wght@300;400;500;600;700&display=swap");

/* HSL varijable */
:root {
  --background: 222 47% 11%;
  --foreground: 210 40% 98%;
  --primary: 38 92% 50%;
  --primary-foreground: 222 47% 11%;
  --secondary: 217 19% 27%;
  --secondary-foreground: 210 40% 98%;
  --muted: 217 19% 27%;
  --muted-foreground: 215 20% 65%;
  --accent: 38 92% 50%;
  --accent-foreground: 222 47% 11%;
  --border: 217 19% 27%;
  --input: 217 19% 27%;
  --ring: 38 92% 50%;
  --radius: 0.75rem;

  --font-sans: "Outfit", system-ui, sans-serif;
  --font-serif: "Roboto Slab", Georgia, serif;
}

/* Reset */
*,
*::before,
*::after {
  box-sizing: border-box;
  border-width: 0;
  border-style: solid;
  border-color: hsl(var(--border));
}

html {
  line-height: 1.5;
  font-family: var(--font-sans);
  -webkit-text-size-adjust: 100%;
  -moz-tab-size: 4;
  tab-size: 4;
}

body {
  margin: 0;
  background-color: hsl(var(--background));
  color: hsl(var(--foreground));
  font-family: var(--font-sans);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

/* Container */
.container {
  width: 100%;
  max-width: 80rem;
  margin-left: auto;
  margin-right: auto;
  padding-left: 1rem;
  padding-right: 1rem;
}

@media (min-width: 640px) {
  .container {
    padding-left: 1.5rem;
    padding-right: 1.5rem;
  }
}

@media (min-width: 1024px) {
  .container {
    padding-left: 2rem;
    padding-right: 2rem;
  }
}

/* Naslovi */
h1,
h2,
h3,
h4,
h5,
h6 {
  font-family: var(--font-serif);
  font-weight: 700;
  letter-spacing: -0.025em;
  color: hsl(var(--foreground));
}

/* Navigacija */
.main-nav {
  position: sticky;
  top: 0;
  z-index: 50;
  width: 100%;
  border-bottom: 1px solid hsl(var(--border));
  background-color: hsl(var(--background) / 0.95);
  backdrop-filter: blur(8px);
}

.nav-container {
  height: 4.5rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}

.logo {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  font-family: var(--font-serif);
  font-size: 1.5rem;
  font-weight: 700;
  color: hsl(var(--primary));
  text-decoration: none;
  max-width: 200px;
}

.logo:hover {
  color: hsl(var(--primary) / 0.9);
}

.logo img {
  height: 3.2rem;
  width: 3.2rem;
  object-fit: contain;
}

/* Hamburger meni – tri horizontalne linije */
.hamburger {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  align-items: center;
  width: 26px;
  height: 20px;
  background: transparent;
  border: none;
  cursor: pointer;
  padding: 0;
  margin: 0;
  z-index: 51;
}

.hamburger span {
  width: 100%;
  height: 3px;
  background: hsl(var(--foreground));
  border-radius: 3px;
  transition: all 0.3s ease;
}

.hamburger.open span:nth-child(1) {
  transform: translateY(8.5px) rotate(45deg);
}

.hamburger.open span:nth-child(2) {
  opacity: 0;
}

.hamburger.open span:nth-child(3) {
  transform: translateY(-8.5px) rotate(-45deg);
}

/* Nav linkovi */
.nav-links {
  display: none;
  align-items: center;
  gap: 2rem;
}

.nav-links a {
  font-size: 1rem;
  font-weight: 500;
  color: hsl(var(--muted-foreground));
  text-decoration: none;
  transition: color 150ms;
}

.nav-links a:hover,
.nav-links a.active {
  color: hsl(var(--primary));
}

/* Socijalne ikone – zaseban kontejner, tačno centrirano */
.nav-icons {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 1.2rem;
  height: 100%;
  padding: 0;
  margin: 0;
}

.nav-icon {
  display: flex;
  align-items: center;
  justify-content: center;
  line-height: 1;
  color: hsl(var(--foreground));
  transition:
    color 0.2s,
    transform 0.2s;
}

.nav-icon:hover {
  color: hsl(var(--primary));
  transform: scale(1.15);
}

.nav-icon svg {
  display: block;
  width: 26px;
  height: 26px;
  stroke: currentColor;
  margin: 0;
  padding: 0;
  vertical-align: middle;
}

/* Desna grupa – sve na istoj visini */
.nav-right {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 1.2rem;
  height: 100%;
}

/* Mobilni layout */
@media (max-width: 767px) {
  .hamburger {
    display: flex;
  }

  .nav-links {
    display: none;
    flex-direction: column;
    position: absolute;
    top: 4.5rem;
    left: 0;
    width: 100%;
    background-color: hsl(var(--background) / 0.98);
    backdrop-filter: blur(12px);
    border-bottom: 1px solid hsl(var(--border));
    padding: 1.5rem 0;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
  }

  .nav-links.open {
    display: flex;
  }

  .nav-links a {
    padding: 1.2rem 2rem;
    font-size: 1.1rem;
    text-align: center;
    border-bottom: 1px solid hsl(var(--border) / 0.4);
  }

  .nav-links a:last-child {
    border-bottom: none;
  }

  .nav-right {
    justify-content: flex-end;
    gap: 1rem;
  }

  .nav-icon svg {
    width: 26px;
    height: 26px;
  }

  .hamburger {
    width: 26px;
    height: 20px;
  }

  .hamburger span {
    height: 3px;
  }
}

/* Ekstra mali ekrani (ispod 550px) */
@media (max-width: 550px) {
  .logo {
    font-size: 1.25rem;
    max-width: 150px;
  }

  .logo img {
    height: 3rem;
    width: 3rem;
  }

  .nav-icon svg {
    width: 22px;
    height: 22px;
  }

  .hamburger {
    width: 1.8rem;
    height: 1.3rem;
  }

  .hamburger span {
    width: 1.8rem;
    height: 0.2rem;
  }

  .nav-right {
    gap: 0.8rem;
  }

  .nav-icons {
    gap: 0.8rem;
  }
}

/* Desktop layout */
@media (min-width: 768px) {
  .nav-container {
    justify-content: flex-start;
    gap: 3rem;
  }

  .logo {
    margin-right: 3rem;
  }

  .nav-links {
    display: flex !important;
    flex: 1;
    justify-content: flex-start;
    margin-right: auto;
  }

  .nav-icons {
    margin-left: auto;
  }

  .hamburger {
    display: none;
  }

  .nav-right {
    margin-left: auto;
  }
}

/* Hero */
.hero {
  position: relative;
  overflow: hidden;
  background-color: hsl(var(--secondary));
  padding: 6rem 0;
  color: white;
}

@media (min-width: 640px) {
  .hero {
    padding: 8rem 0;
  }
}

.hero-bg {
  position: absolute;
  inset: 0;
  z-index: 0;
  opacity: 0.2;
  mix-blend-mode: overlay;
}

.hero-bg img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.hero-content {
  position: relative;
  z-index: 10;
  max-width: 42rem;
  margin: 0 auto;
  text-align: center;
}

.hero h1 {
  font-size: 2.25rem;
  margin-bottom: 1.5rem;
}

@media (min-width: 640px) {
  .hero h1 {
    font-size: 3.75rem;
    line-height: 1;
  }
}

.hero .highlight {
  color: hsl(var(--primary));
}

.hero p {
  font-size: 1.125rem;
  line-height: 2rem;
  color: #d1d5db;
  max-width: 36rem;
  margin: 0 auto;
}

/* Usluge sekcija */
.services-section {
  padding: 6rem 0;
  background-color: hsl(var(--muted) / 0.3);
}

.section-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  margin-bottom: 3rem;
  flex-wrap: wrap;
  gap: 1.5rem;
}

.section-header h2 {
  font-size: 1.875rem;
  margin-bottom: 0.5rem;
}

.section-subtitle {
  color: hsl(var(--muted-foreground));
  max-width: 36rem;
}

.services-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 2rem;
}

@media (min-width: 768px) {
  .services-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (min-width: 1024px) {
  .services-grid {
    grid-template-columns: repeat(3, 1fr);
  }
}

.service-card {
  border-radius: var(--radius);
  border: 1px solid hsl(var(--border) / 0.5);
  background-color: hsl(var(--card));
  box-shadow: 0 1px 2px 0 rgb(0 0 0 / 0.05);
  overflow: hidden;
  transition: all 0.25s ease;
  display: flex;
  flex-direction: column;
}

.service-card:hover {
  transform: translateY(-4px);
  box-shadow:
    0 10px 15px -3px rgb(0 0 0 / 0.1),
    0 4px 6px -4px rgb(0 0 0 / 0.1);
  border-color: hsl(var(--primary) / 0.5);
}

.card-image-wrapper {
  aspect-ratio: 3 / 4;
  overflow: hidden;
  background-color: hsl(var(--muted));
}

.card-image-wrapper img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  transition: transform 0.5s ease;
}

.service-card:hover img {
  transform: scale(1.08);
}

.card-content {
  padding: 1.5rem 1.5rem 1rem;
  flex-grow: 1;
}

.card-content h3 {
  font-size: 1.375rem;
  margin-bottom: 0.75rem;
}

.card-content p {
  color: hsl(var(--muted-foreground));
  font-size: 0.95rem;
}

.card-footer {
  padding: 0 1.5rem 1.5rem;
}

/* Dugmad */
.btn-primary,
.btn-outline {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  white-space: nowrap;
  border-radius: 0.375rem;
  font-size: 0.875rem;
  font-weight: 500;
  padding: 0.6rem 1.25rem;
  transition: all 150ms;
  cursor: pointer;
  text-decoration: none;
}

.btn-primary {
  background-color: hsl(var(--primary));
  color: hsl(var(--primary-foreground));
  border: 1px solid hsl(var(--primary));
}

.btn-primary:hover {
  background-color: hsl(var(--primary) / 0.9);
}

.btn-outline {
  border: 1px solid hsl(var(--border));
  color: hsl(var(--primary));
  background-color: transparent;
}

.btn-outline:hover {
  background-color: hsl(var(--primary) / 0.1);
  border-color: hsl(var(--primary));
}

/* Prednosti sekcija */
.features-section {
  padding: 6rem 0;
  background-color: hsl(var(--background));
}

.features-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 2.5rem;
}

@media (min-width: 640px) {
  .features-grid {
    grid-template-columns: repeat(3, 1fr);
  }
}

.feature-item {
  text-align: center;
  padding: 2rem 1.5rem;
  border-radius: 1rem;
  background-color: hsl(var(--muted) / 0.4);
  border: 1px solid hsl(var(--border));
  transition: all 0.2s;
}

.feature-item:hover {
  background-color: hsl(var(--muted) / 0.6);
  border-color: hsl(var(--primary) / 0.5);
}

.feature-icon {
  font-size: 2.8rem;
  margin-bottom: 1.25rem;
  color: hsl(var(--primary));
}

.feature-item p {
  color: hsl(var(--muted-foreground));
}

/* CTA sekcija */
.cta-section {
  background-color: hsl(var(--secondary));
  color: white;
  padding: 6rem 0;
}

.cta-flex {
  display: flex;
  flex-direction: column;
  gap: 3rem;
  align-items: center;
  text-align: center;
}

@media (min-width: 768px) {
  .cta-flex {
    flex-direction: row;
    justify-content: space-between;
    text-align: left;
  }
}

.cta-text h2 {
  font-size: 2.5rem;
  margin-bottom: 1rem;
}

.cta-buttons {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
  justify-content: center; /* Centrirano na mobilnim */
}

@media (min-width: 768px) {
  .cta-buttons {
    justify-content: flex-start; /* Levo na desktopu */
  }
}

.btn-phone {
  padding: 0.85rem 1.5rem;
  background-color: hsl(var(--foreground));
  color: hsl(var(--background));
  font-weight: 600;
  border-radius: 0.5rem;
  text-decoration: none;
  font-size: 1.35rem;
  min-width: 220px;
  text-align: center;
}

.btn-phone:hover {
  opacity: 0.9;
}

.cta-badge {
  width: 220px;
  height: 220px;
  border-radius: 1rem;
  background: hsl(var(--background) / 0.2);
  backdrop-filter: blur(8px);
  border: 1px solid hsl(var(--border));
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
}

.badge-number {
  font-size: 4.5rem;
  font-weight: 700;
  color: hsl(var(--primary));
}

/* Footer */
.main-footer {
  background-color: hsl(var(--background));
  border-top: 1px solid hsl(var(--border));
  padding: 3.5rem 0;
  color: hsl(var(--muted-foreground));
  text-align: center;
}

.footer-logo {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.75rem;
  margin-bottom: 1.5rem;
  color: hsl(var(--foreground));
  font-family: var(--font-serif);
  font-weight: 700;
  font-size: 1.6rem;
}

.footer-logo img {
  height: 3.5rem;
  width: 3.5rem;
  object-fit: contain;
}

.footer-links {
  display: flex;
  justify-content: center;
  gap: 1.5rem;
  flex-wrap: wrap;
}

.footer-links a {
  color: hsl(var(--muted-foreground));
  text-decoration: none;
}

.footer-links a:hover {
  color: hsl(var(--primary));
}

/* Responsivnost forme na contact stranici */
@media (max-width: 640px) {
  [style*="grid-template-columns: 1fr 1fr"] {
    grid-template-columns: 1fr !important;
  }

  input,
  select,
  textarea {
    font-size: 1rem !important;
    padding: 0.9rem !important;
  }

  button.btn-primary {
    width: 100% !important;
    align-self: stretch !important;
  }
}

/* Povećan tekst na CTA dugmadima */
.cta-buttons a.btn-phone,
.cta-buttons a.btn-outline {
  font-size: 1.35rem;
  padding: 1rem 2rem;
  font-weight: 600;
  min-width: 220px;
  text-align: center;
}

@media (min-width: 768px) {
  .cta-buttons a.btn-phone,
  .cta-buttons a.btn-outline {
    font-size: 1.45rem;
    padding: 1.2rem 2.5rem;
  }
}

@media (max-width: 640px) {
  .cta-buttons {
    flex-direction: column;
    gap: 1.2rem;
  }
  .cta-buttons a {
    width: 100%;
    font-size: 1.3rem;
  }
}

/* =========================================
   KLASE ZA STRANICE USLUGA (elektrike.html, itd.)
   ========================================= */

/* Flex kontejner za sliku i tekst (glavni deo) */
.service-main-flex {
  display: flex;
  flex-wrap: wrap;
  gap: 2.5rem;
  align-items: center;
  margin-bottom: 4rem;
}

/* Leva kolona (za sliku) */
.service-image-col {
  flex: 1;
  min-width: 300px;
}

/* Desna kolona (za tekst) */
.service-text-col {
  flex: 1.6;
  min-width: 300px;
}

/* Naslov unutar desne kolone */
.service-text-col h2 {
  font-size: 2.1rem;
  margin-bottom: 1.2rem;
}

/* Paragraf unutar desne kolone */
.service-text-col p {
  font-size: 1.08rem;
  line-height: 1.7;
  color: hsl(var(--muted-foreground));
}

/* Lista unutar desne kolone */
.service-text-col ul {
  margin: 1.5rem 0;
  padding-left: 1.4rem;
  font-size: 1.05rem;
  color: hsl(var(--muted-foreground));
  line-height: 1.8;
}

/* Naslov galerije */
.gallery-title {
  font-size: 1.7rem;
  text-align: center;
  margin: 3rem 0 2rem;
}

/* Grid za galeriju slika */
.gallery-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 1.5rem;
}

/* Centriranje CTA dugmeta */
.cta-center {
  text-align: center;
  margin-top: 4rem;
}

/* Dugme na dnu stranice usluge */
.btn-large {
  padding: 1rem 2.8rem;
  font-size: 1.15rem;
}

/* =========================================
   KLASE ZA KONTAKT STRANICU
   ========================================= */

/* Grid za kontakt stranicu */
.contact-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 3rem;
  max-width: 1000px;
  margin: 0 auto;
}

/* Kartice za kontakt informacije i formu */
.contact-info-card,
.contact-form-card {
  background: hsl(var(--muted) / 0.4);
  border-radius: 1rem;
  padding: 2rem;
  border: 1px solid hsl(var(--border));
}

/* Naslovi na kontakt stranici */
.contact-info-title,
.contact-form-title {
  font-size: 1.8rem;
  margin-bottom: 1.5rem;
}

/* Lista kontakt informacija */
.contact-info-list {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}

/* Pojedinačna stavka u kontakt informacijama */
.contact-info-item {
  display: flex;
  align-items: flex-start;
  gap: 1rem;
}

/* Ikone u kontakt informacijama */
.contact-info-icon {
  background: hsl(var(--primary) / 0.15);
  color: hsl(var(--primary));
  padding: 0.8rem;
  border-radius: 0.5rem;
  font-size: 1.4rem;
  line-height: 1;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

/* Linkovi u kontakt informacijama */
.contact-info-link {
  color: hsl(var(--primary));
  font-size: 1.1rem;
  text-decoration: none;
}

.contact-info-link:hover {
  text-decoration: underline;
}

/* Tekst u kontakt informacijama */
.contact-info-text {
  color: hsl(var(--foreground));
}

/* Mali tekst (napomene) */
.contact-info-small {
  color: hsl(var(--muted-foreground));
  font-size: 0.875rem;
}

/* Forma */
.contact-form {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}

/* Grid za formu */
.contact-form-grid {
  display: grid;
  gap: 1.5rem;
  grid-template-columns: 1fr 1fr;
}

/* Label za input polja */
.contact-form-label {
  display: block;
  margin-bottom: 0.5rem;
  font-weight: 500;
}

/* Input polja */
.contact-form-input,
.contact-form-select,
.contact-form-textarea {
  width: 100%;
  padding: 0.75rem;
  border-radius: 0.5rem;
  border: 1px solid hsl(var(--border));
  background: hsl(var(--background));
  color: hsl(var(--foreground));
  font-family: var(--font-sans);
}

.contact-form-input:focus,
.contact-form-select:focus,
.contact-form-textarea:focus {
  outline: 2px solid hsl(var(--ring));
  outline-offset: 2px;
}

/* Textarea specifično */
.contact-form-textarea {
  resize: vertical;
  min-height: 120px;
}

/* Akcije na formi (dugme i napomena) */
.contact-form-actions {
  display: flex;
  gap: 1rem;
  flex-wrap: wrap;
  align-items: center;
}

/* Dugme za slanje forme */
.contact-form-submit-btn {
  padding: 0.9rem 2rem;
  font-size: 1.05rem;
}

/* Napomena o obaveznim poljima */
.contact-form-required-note {
  color: hsl(var(--muted-foreground));
  font-size: 0.9rem;
}

/* Responsivnost za kontakt formu */
@media (max-width: 640px) {
  .contact-form-grid {
    grid-template-columns: 1fr !important;
  }
}
