﻿/* ⚡ Mobilni Mali Servis – performance-fix.css */
/* Verzija: 2025-11 */
/* Uključuje lokalni Montserrat (Latin Extended 600, 800, 900) */

/* ✅ Lokalni Montserrat fontovi */
@font-face {
  font-family: 'Montserrat';
  src: url('/fonts/montserrat-v31-latin-ext-600.woff2') format('woff2');
  font-weight: 600;
  font-display: swap;
  font-style: normal;
}
@font-face {
  font-family: 'Montserrat';
  src: url('/fonts/montserrat-v31-latin-ext-800.woff2') format('woff2');
  font-weight: 800;
  font-display: swap;
  font-style: normal;
}
@font-face {
  font-family: 'Montserrat';
  src: url('/fonts/montserrat-v31-latin-ext-900.woff2') format('woff2');
  font-weight: 900;
  font-display: swap;
  font-style: normal;
}

/* ✅ Globalna tipografija */
html {scroll-behavior: smooth;}
body {
  font-family: 'Montserrat', system-ui, sans-serif;
  font-display: swap;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  background-color: #fff;
  color: #222;
  line-height: 1.55;
  font-size: 16px;
}

h1, h2, h3 {
  font-weight: 800;
  line-height: 1.2;
}

p, li, input, select, textarea, button, a {
  font-weight: 600;
}

/* ✅ Hero sekcija */
.hero {
  min-height: 52vh;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  background: #000;
  color: #fff;
  padding: 28px 18px;
  background-size: cover;
  background-position: 58% center;
}
.hero h1, .hero p {
  font-family: 'Montserrat', system-ui, sans-serif;
  will-change: transform, opacity;
  transition: transform .3s ease, opacity .3s ease;
}
.hero h1 {
  font-weight: 900;
  font-size: clamp(1.75rem, 3.4vw, 2.35rem);
  margin-bottom: 8px;
}
.hero p {
  font-weight: 600;
  font-size: 1.02rem;
  line-height: 1.5;
  max-width: 800px;
  margin: 0 auto;
}

section.hero[style] {
  min-height: 56vh !important;
  background-position: 60% center !important;
}

/* ✅ CTA dugmad */
.cta-btn, .call-btn {
  display: inline-block;
  padding: 12px 24px;
  font-weight: 700;
  text-decoration: none;
  background: #ffd000;
  color: #3b2f2f;
  border-radius: 8px;
  transition: transform .25s ease, box-shadow .25s ease;
  min-height: 44px;
  line-height: 1.2;
}
.cta-btn:hover, .call-btn:hover {
  transform: scale(1.05);
  box-shadow: 0 0 10px rgba(255,208,0,.6);
}

/* ✅ Navigacija */
.main-nav a {
  display: inline-block;
  padding: 10px 14px;
  min-height: 44px;
  transition: color .25s ease;
  font-weight: 600;
}
.main-nav a.active {color: #ffd000;}
.menu-toggle {
  background: none;
  border: none;
  font-size: 26px;
  color: #3b2f2f;
  cursor: pointer;
}

/* ✅ Footer */
footer {
  padding: 20px 10px;
  text-align: center;
  background: #1a1a1a;
  color: #fff;
}
footer a img {
  transition: transform .25s ease;
}
footer a:hover img {
  transform: scale(1.15);
}

/* ✅ Call dugme (CLS fix + animacija) */
.call-btn {
  position: fixed;
  bottom: 20px;
  right: 20px;
  font-size: 18px;
  z-index: 1000;
  transition: opacity .3s ease, transform .3s ease;
}
.call-btn.hide {
  opacity: 0;
  transform: translateY(100px);
  pointer-events: none;
}

/* WhatsApp floating button */
.whatsapp-float {
  position: fixed !important;
  right: 25px !important;
  bottom: 25px !important;
  left: auto !important;
  top: auto !important;
  width: 70px !important;
  height: 70px !important;
  max-width: 70px !important;
  max-height: 70px !important;
  min-width: 70px !important;
  min-height: 70px !important;
  background: #25D366;
  border-radius: 50%;
  display: flex !important;
  flex: 0 0 auto !important;
  align-self: auto !important;
  align-items: center;
  justify-content: center;
  box-sizing: border-box;
  overflow: hidden;
  box-shadow: 0 6px 18px rgba(0,0,0,0.25);
  z-index: 999 !important;
  transform: none !important;
  aspect-ratio: 1 / 1;
  text-decoration: none;
  margin: 0 !important;
  padding: 0 !important;
}
.whatsapp-float:hover {
  transform: none !important;
}
.whatsapp-float img {
  width: 60% !important;
  height: 60% !important;
  max-width: 60% !important;
  max-height: 60% !important;
  object-fit: contain;
  display: block;
}

/* WhatsApp inline CTA for blog articles */
.whatsapp-cta {
  margin-top: 24px;
  background: linear-gradient(180deg, #202126, #1b1b1f);
  border: 1px solid #34353c;
  border-radius: 14px;
  padding: 18px;
  text-align: center;
}
.whatsapp-cta h3 {
  margin: 0 0 8px;
  color: #ffd000;
  font-size: 1.2rem;
}
.whatsapp-cta p {
  margin: 0 0 12px;
  color: #fffbe8;
}
.whatsapp-btn {
  display: inline-block;
  background: #25D366;
  color: #0f2819;
  text-decoration: none;
  font-weight: 800;
  border-radius: 10px;
  padding: 12px 18px;
  min-height: 44px;
  transition: transform .2s ease, box-shadow .2s ease;
}
.whatsapp-btn:hover {
  transform: translateY(-1px);
  box-shadow: 0 0 12px rgba(37,211,102,0.35);
}

/* ✅ Responzivnost */
@media (max-width: 768px) {
  html, body {
    max-width: 100%;
    overflow-x: hidden;
  }

  .hero {
    min-height: 44vh;
    padding: 20px 14px;
    background-position: 62% center !important;
  }
  .hero h1 {
    font-size: clamp(1.45rem, 7vw, 1.9rem);
  }
  .hero p {
    font-size: 0.96rem;
  }
  .cta-btn {
    font-size: 15px;
    padding: 10px 20px;
  }

  section.hero[style] {
    min-height: 320px !important;
  }

  .hero-content,
  .hero-inner {
    padding-left: 12px !important;
    padding-right: 12px !important;
  }

  .hero-content h1,
  .hero-inner h1 {
    line-height: 1.2;
  }

  main[style*="max-width"],
  section[style*="max-width"] {
    padding-left: 14px !important;
    padding-right: 14px !important;
    box-sizing: border-box;
  }

  [style*="grid-template-columns:repeat(auto-fit,minmax(200px"],
  [style*="grid-template-columns:repeat(auto-fit,minmax(220px"],
  [style*="grid-template-columns:repeat(auto-fit,minmax(260px"],
  [style*="grid-template-columns:repeat(auto-fit,minmax(280px"] {
    grid-template-columns: 1fr !important;
    gap: 14px !important;
  }

  input[type="text"],
  input[type="email"],
  input[type="number"],
  input[type="date"],
  input[type="tel"],
  input[type="url"],
  select,
  textarea {
    font-size: 16px !important;
    max-width: 100%;
    box-sizing: border-box;
  }

  /* WhatsApp floating button - mobile safe size */
  .whatsapp-float {
    right: 18px !important;
    left: auto !important;
    bottom: 18px !important;
    width: 56px !important;
    height: 56px !important;
    max-width: 56px !important;
    max-height: 56px !important;
    min-width: 56px !important;
    min-height: 56px !important;
    border-radius: 50% !important;
    box-shadow: 0 6px 18px rgba(0,0,0,0.25) !important;
    transform: none !important;
  }
  .whatsapp-float img {
    width: 60% !important;
    height: 60% !important;
  }

  /* Unified mobile spacing + cards across all pages */
  body {
    padding-bottom: 88px;
  }

  .section {
    padding: 44px 16px !important;
  }

  .services,
  .benefits {
    grid-template-columns: 1fr !important;
    gap: 14px !important;
  }

  .service-box,
  .benefit {
    padding: 16px !important;
    border-radius: 14px !important;
  }

  [style*="grid-template-columns:repeat(auto-fit,minmax("] {
    grid-template-columns: 1fr !important;
  }

  .comparison-table-wrap,
  [style*="overflow-x:auto"] {
    overflow-x: auto !important;
    -webkit-overflow-scrolling: touch;
  }

  .comparison-table {
    min-width: 620px;
  }

  .cta-btn,
  .whatsapp-btn {
    width: 100%;
    max-width: 320px;
    margin-left: auto !important;
    margin-right: auto !important;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    white-space: normal;
    line-height: 1.3;
  }

  .call-btn {
    right: 12px;
    bottom: max(12px, env(safe-area-inset-bottom));
    padding: 11px 16px;
    font-size: .96rem;
    border-radius: 999px;
    max-width: calc(100vw - 24px);
  }

  h1, h2, h3, p, a {
    overflow-wrap: anywhere;
  }
}

.cta-next-step a.btn-primary,
.cta-next-step button.btn-primary,
.cta-next-step .btn-primary {
  color: #111 !important;
  font-weight: 800 !important;
  line-height: normal !important;
}

/* Global mobile layout safety (site-wide) */
html,
body {
  overflow-x: hidden;
  width: 100%;
}

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

.container,
.wrapper,
.section {
  max-width: 100%;
  margin-left: auto;
  margin-right: auto;
}

/* Generic button alignment for mobile CTAs */
.btn,
.cta-btn {
  max-width: 100%;
  text-align: center;
}

/* Safe floating call button aliases */
.call-btn,
.call-button {
  position: fixed;
  bottom: 20px;
  right: 20px;
  left: auto;
  z-index: 999;
  max-width: calc(100vw - 40px);
}

/* Prevent long URLs and labels from pushing layout */
a {
  word-break: break-word;
  overflow-wrap: anywhere;
}

/* Keep media/content from exceeding viewport */
img,
video,
iframe,
table,
pre,
code {
  max-width: 100%;
}

@media (max-width: 480px) {
  body {
    padding-bottom: 80px;
  }

  .container,
  .wrapper,
  .section {
    padding-left: 15px !important;
    padding-right: 15px !important;
  }

  h1 {
    font-size: 26px !important;
  }

  h2 {
    font-size: 22px !important;
  }

  p {
    font-size: 15px !important;
  }

  .hero {
    text-align: center !important;
    padding: 20px !important;
  }

  .hero h1 {
    font-size: 28px !important;
    line-height: 1.3 !important;
    text-align: center !important;
  }

  .hero p {
    font-size: 16px !important;
    text-align: center !important;
    margin-left: auto !important;
    margin-right: auto !important;
  }

  .hero .btn,
  .hero .cta-btn,
  .hero .cta-btn-secondary {
    display: block !important;
    width: 100% !important;
    max-width: 420px !important;
    margin: 10px auto !important;
    text-align: center !important;
  }

  .btn,
  .cta-btn {
    display: block !important;
    width: 100% !important;
    max-width: 420px !important;
    margin: 10px auto !important;
    text-align: center !important;
  }

  .card,
  .service-box,
  .benefit {
    width: 100% !important;
    margin: 10px 0 !important;
  }

  .grid,
  .services,
  .benefits {
    display: flex !important;
    flex-direction: column !important;
    gap: 12px !important;
  }

  /* Horizontal overflow debug guardrails */
  [style*="position:absolute"],
  [style*="position: absolute"] {
    max-width: 100% !important;
  }

  [style*="margin-left"],
  [style*="margin-left:"] {
    margin-left: 0 !important;
  }

  [style*="transform"],
  [style*="transform:"] {
    max-width: 100% !important;
  }
}

