/* =========================
   FELJTON — V2 PLUS (UPDATED)
   - Mobile: ALWAYS text first, image second (all sections)
   - Contact: much bigger typography on mobile
   - FIX: remove white edge/halo around images
   ========================= */

* { margin: 0; padding: 0; box-sizing: border-box; }

:root{
  --primary-blue: #005a8d;
  --dark-blue: #003d5c;
  --light-blue: #d4e9f5;
  --cyan: #00a8e1;
  --magenta: #ec008c;
  --yellow: #fff200;

  --bg: #0b1220;
  --panel: rgba(255,255,255,0.06);
  --panel-2: rgba(255,255,255,0.09);
  --border: rgba(255,255,255,0.12);

  --text: #ffffff;
  --muted: rgba(255,255,255,0.92);

  --shadow: 0 18px 55px rgba(0,0,0,0.45);
  --shadow-soft: 0 10px 30px rgba(0,0,0,0.25);

  --radius-xl: 26px;
  --radius-lg: 18px;
  --radius-md: 14px;

  --container: 1200px;
}

html { scroll-behavior: smooth; }
body{
  font-family: "Arial","Helvetica Neue",sans-serif;
  line-height: 1.6;
  color: var(--text);

  background:
    radial-gradient(900px 500px at 10% 0%, rgba(0,168,225,0.20), transparent 60%),
    radial-gradient(900px 500px at 90% 15%, rgba(236,0,140,0.16), transparent 65%),
    radial-gradient(900px 500px at 50% 100%, rgba(255,242,0,0.08), transparent 60%),
    var(--bg);

  overflow-x: hidden;
}

@font-face {
  font-family: "FeljtonLogo";
  src: url("fonts/feljton.ttf") format("truetype");
  font-weight: normal;
  font-style: normal;
  
}

.container{
  max-width: var(--container);
  margin: 0 auto;
  padding: 0 22px;
}

/* ---------------- HEADER (glass) ---------------- */
.header{
  position: sticky;
  top: 0;
  z-index: 1000;
  padding: 14px 0;
  background: rgba(10, 18, 32, 0.55);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid rgba(255,255,255,0.08);
  transition: box-shadow 0.25s ease, border-color 0.25s ease, transform 0.25s ease;
}

.header-content{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap: 18px;
}

.logo{
  display:flex;
  align-items:center;
  gap: 14px;
  cursor:pointer;
  user-select: none;
}

.logo-mark{
  width: 5rem;
  height: 5rem;
  object-fit: contain;
  border-radius: 16px;
  padding: 8px;
  background: rgba(255,255,255,0.08);
  border: 1px solid rgba(255,255,255,0.10);
  box-shadow: var(--shadow-soft);
  transition: transform 0.35s ease;
}

.logo:hover .logo-mark{ transform: rotate(10deg) scale(1.02); }

.logo-text{
  font-family: "FeljtonLogo", sans-serif;
  font-size: 3.2rem;
  letter-spacing: 1px;
  text-transform: lowercase;
  line-height: 1;
  color: rgba(255,255,255,0.92);
  transition: letter-spacing 0.25s ease;
}

.logo:hover .logo-text{ letter-spacing: 2px; }

.nav{
  display:flex;
  gap: 10px;
  align-items:center;
  flex-wrap: wrap;
  justify-content: flex-end;
}

.nav a{
  color: rgba(255,255,255,0.78);
  text-decoration:none;
  font-size: 12px;
  font-weight: 500;
  letter-spacing: 0.3px;
  padding: 10px 12px;
  border-radius: 999px;
  transition: background 0.2s ease, color 0.2s ease, transform 0.2s ease;
}

.nav a:hover{
  color: rgba(255,255,255,0.96);
  background: rgba(255,255,255,0.08);
  transform: translateY(-1px);
}

.menu-toggle{
  display:none;
  flex-direction:column;
  gap:6px;
  background: transparent;
  border: 1px solid rgba(255,255,255,0.10);
  border-radius: 12px;
  padding: 10px;
  cursor:pointer;
}

.menu-toggle span{
  width: 24px;
  height: 2px;
  background: rgba(255,255,255,0.85);
  transition: 0.25s ease;
}

.menu-toggle.active span:nth-child(1){ transform: rotate(45deg) translate(6px, 6px); }
.menu-toggle.active span:nth-child(2){ opacity: 0; }
.menu-toggle.active span:nth-child(3){ transform: rotate(-45deg) translate(6px, -6px); }

/* ---------------- SECTIONS ---------------- */
.hero-section,
.section,
.partners-section,
.contact-section{
  padding: 58px 0;
}
@media (max-width: 640px){
  .hero-section,
  .section,
  .partners-section,
  .contact-section{
    padding: 30px 0;
  }
}

/* ---------------- CARDS ---------------- */
.hero-card,
.service-card,
.partners-card,
.contact-card{
  border-radius: var(--radius-xl);
  background: linear-gradient(180deg, rgba(255,255,255,0.08), rgba(255,255,255,0.05));
  border: 1px solid rgba(255,255,255,0.12);
  box-shadow: var(--shadow);
  overflow: hidden;
  transform-style: preserve-3d;
  will-change: transform;
}

.hero-card{
  padding: 46px;
  display:grid;
  grid-template-columns: 1.15fr 0.85fr;
  gap: 44px;
  align-items:center;
}

.service-card{
  padding: 46px;
  display:grid;
  grid-template-columns: 1fr 1fr;
  gap: 44px;
  align-items:center;
}

.service-card-reverse .service-image{ order: -1; }

.partners-card{ padding: 46px; }

.contact-card{
  display:grid;
  grid-template-columns: 1fr 1fr;
}

/* ---------------- TYPOGRAPHY ---------------- */
.hero-content h1{
  font-size: 38px;
  line-height: 1.1;
  letter-spacing: -0.5px;
  margin-bottom: 16px;
  color: rgba(255,255,255,0.95);
}

.hero-description{
  color: var(--muted);
  line-height: 1.85;
  margin-bottom: 18px;
}

.service-content h2,
.service-content h3{
  font-size: 32px;
  line-height: 1.15;
  letter-spacing: -0.4px;
  margin-bottom: 14px;
  color: rgba(255,255,255,0.95);
  position: relative;
  padding-left: 14px;
}

.service-content h2::before,
.service-content h3::before{
  content:"";
  position:absolute;
  left:0;
  top: 0.15em;
  width: 4px;
  height: 0.95em;
  border-radius: 999px;
  background: linear-gradient(
    180deg,
    #45d7ff 0%,
    var(--cyan) 35%,
    rgba(236,0,140,0.55) 75%
  );
}

@media (max-width: 640px){
  .service-content h2::before{ top: 0.08em; height: 1.1em; width: 5px; }
  .service-content h3::before{ top: 0.08em; height: 1.6em; width: 5px; }
}

.service-intro{
  margin-bottom: 16px;
  font-weight: 500;
  color: rgba(255,255,255,0.78);
  line-height: 1.85;
}

.service-description{
  margin-bottom: 14px;
  color: var(--muted);
  line-height: 1.85;
}

/* ---------------- HIGHLIGHT BOXES (CTA) ---------------- */
.hero-cta,
.service-cta,
.partners-text{
  margin-top: 18px;
  border-radius: var(--radius-lg);
  padding: 18px 18px 18px 44px;
  background: rgba(255,255,255,0.07);
  border: 1px solid rgba(255,255,255,0.12);
  position: relative;
  overflow: hidden;
}

.hero-cta::before,
.service-cta::before,
.partners-text::before{
  content:"";
  position:absolute;
  left: 16px;
  top: 16px;
  bottom: 16px;
  width: 4px;
  border-radius: 999px;
  background: linear-gradient(
    180deg,
    #45d7ff 0%,
    var(--cyan) 35%,
    rgba(236,0,140,0.55) 75%
  );
}

.cta-text,
.hero-cta p,
.service-cta p,
.partners-text p{
  color: rgba(255,255,255,0.88);
  font-weight: 900;
  letter-spacing: 0.5px;
  text-transform: uppercase;
  font-size: 13px;
  line-height: 1.65;
  text-align: left;
}

.partners-text{
  max-width: 860px;
  margin: 0 auto 36px auto;
  padding: 18px 22px;
}

.partners-text::before{
  left: 50%;
  transform: translateX(-50%);
  top: 0;
  bottom: auto;
  width: 84px;
  height: 4px;
}

.partners-text p{
  text-transform: none;
  font-weight: 800;
  font-size: 15px;
  letter-spacing: 0.2px;
  text-align: center;
}

/* ---------------- LISTS ---------------- */
.hero-services{ margin-top: 22px; }
.hero-services h3{
  color: rgba(255,255,255,0.92);
  font-size: 18px;
  margin-bottom: 10px;
  letter-spacing: 0.2px;
}

.hero-services ul,
.service-list{ list-style: none; }

.hero-services li,
.service-list li{
  margin: 10px 0;
  padding-left: 26px;
  color: rgba(255,255,255,0.72);
  position: relative;
}

.hero-services li::before,
.service-list li::before{
  content:"";
  position:absolute;
  left: 0;
  top: 0.62em;
  width: 10px;
  height: 10px;
  border-radius: 999px;
  background: #ffffff;
  box-shadow:
    0 0 0 2px rgba(0,168,225,0.45),
    0 0 0 5px rgba(0,168,225,0.12);
}

/* ---------------- IMAGES (OLD LOOK) + FIX WHITE EDGE ---------------- */
/* ✅ The white “line” is usually sub-pixel halo from transforms + radius.
   Fix = isolate + GPU on wrapper + tiny overscan on image + remove default borders. */

.hero-image,
.service-image{
  position: relative;
  border-radius: var(--radius-xl);
  overflow: hidden;
  border: 1px solid rgba(255,255,255,0.12);
  background: rgba(11,18,32,0.55);

  /* ✅ important for halo */
  isolation: isolate;
  transform: translateZ(0);
  backface-visibility: hidden;
}

.hero-image img,
.service-image img{
  width: 100%;
  height: 100%;
  display:block;

  /* OLD look */
  object-fit: cover;
  object-position: center;

  /* ✅ halo fixes */
  transform: translateZ(0) scale(1.03); /* tiny overscan */
  backface-visibility: hidden;
  -webkit-transform: translateZ(0) scale(1.03);
  -webkit-backface-visibility: hidden;

  /* keep your vibe */
  filter: saturate(1.05) contrast(1.05);
  transition: transform 0.35s ease;
}

/* Optional hover stays same */
.hero-image:hover img,
.service-image:hover img{
  transform: translateZ(0) scale(1.06);
  -webkit-transform: translateZ(0) scale(1.06);
}

/* ---------------- PARTNERS GRID ---------------- */
.partners-grid{
  display:grid;
  grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
  gap: 22px;
  align-items:center;
  justify-items:center;
}

.partner-logo{
  width: 140px;
  height: 90px;
  display:flex;
  align-items:center;
  justify-content:center;
  will-change: transform, opacity;
}

.logo-placeholder{
  width: 128px;
  height: 80px;
  border-radius: 20px;
  background: rgba(255,255,255,0.06);
  border: 1px solid rgba(255,255,255,0.12);
  box-shadow: 0 10px 26px rgba(0,0,0,0.25);
  display:flex;
  align-items:center;
  justify-content:center;
  padding: 10px;
  overflow: hidden;
  transition: transform 0.2s ease, background 0.2s ease, box-shadow 0.2s ease;
}

.logo-placeholder img{
  width: 100%;
  height: 100%;
  object-fit: contain;
  display:block;
  filter: saturate(1.05) contrast(1.05);
}

.partner-logo:hover .logo-placeholder{
  transform: translateY(-2px);
  background: rgba(255,255,255,0.08);
  box-shadow: 0 16px 34px rgba(0,0,0,0.32);
}

/* ---------------- CONTACT ---------------- */
.contact-map{
  position: relative;
  min-height: 420px;
  overflow:hidden;
  background: rgba(255,255,255,0.03);
}

.contact-map .google-map{
  width: 100%;
  height: 100%;
  border: none;
  display:block;
  filter: grayscale(20%) contrast(1.05) brightness(0.95) saturate(0.9);
  transform: translateZ(0);
  transition: transform 0.5s ease, filter 0.5s ease;
}

.contact-card:hover .contact-map .google-map{ transform: scale(1.05); }

.contact-map.is-dark .google-map{
  filter: grayscale(25%) contrast(1.05) brightness(0.92) saturate(0.85) invert(92%) hue-rotate(180deg);
}

.map-overlay-link{
  position:absolute;
  inset:0;
  z-index:3;
  text-decoration:none;
}

.map-overlay-badge{
  position:absolute;
  top: 16px;
  left: 16px;
  background: rgba(10,18,32,0.75);
  border: 1px solid rgba(255,255,255,0.12);
  backdrop-filter: blur(10px);
  color: rgba(255,255,255,0.92);
  padding: 10px 12px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 900;
  letter-spacing: 0.3px;
  box-shadow: var(--shadow-soft);
  transition: transform 0.2s ease, background 0.2s ease;
}

.map-overlay-link:hover .map-overlay-badge{
  transform: translateY(-2px);
  background: rgba(255,255,255,0.10);
}

.map-marker{
  position:absolute;
  left: 50%;
  top: 50%;
  transform: translate(-50%, -55%);
  pointer-events:none;
  z-index: 4;
  opacity: 0.95;
  filter: drop-shadow(0 12px 26px rgba(0,0,0,0.35));
}

/* contact info */
.contact-info{
  padding: 46px;
  display:flex;
  flex-direction:column;
  justify-content:space-between;
  gap: 26px;
}

.contact-details{
  display:grid;
  grid-template-columns: 1fr 1fr;
  gap: 18px;
}

.contact-item{
  padding: 14px 14px;
  border-radius: var(--radius-md);
  background: rgba(255,255,255,0.05);
  border: 1px solid rgba(255,255,255,0.10);
  transition: transform 0.2s ease;
}
.contact-item:hover{ transform: translateX(3px); }

.contact-item h3{
  font-size: 16px;
  letter-spacing: 0.6px;
  text-transform: uppercase;
  color: rgba(255,255,255,0.90);
  margin-bottom: 8px;
}

.contact-item p{
  font-size: 18px;
  color: rgba(255,255,255,0.72);
  line-height: 1.7;
}

.contact-item .email{
  color: rgba(255,255,255,0.95);
  font-weight: 400;
}

.contact-logo{
  display:flex;
  justify-content:flex-end;
}

.contact-logo-mark{
  width: 56px;
  height: 56px;
  object-fit: contain;
  border-radius: 16px;
  padding: 8px;
  background: rgba(255,255,255,0.08);
  border: 1px solid rgba(255,255,255,0.10);
  box-shadow: var(--shadow-soft);
  animation: slowSpin 20s linear infinite;
}

@keyframes slowSpin{
  from{ transform: rotate(0deg); }
  to{ transform: rotate(360deg); }
}

.contact-logo:hover .contact-logo-mark{
  animation: none;
  transform: rotate(180deg) scale(1.05);
}

/* ---------------- FOOTER ---------------- */
.footer{
  padding: 28px 0;
  border-top: 1px solid rgba(255,255,255,0.08);
  background: rgba(10, 18, 32, 0.55);
  backdrop-filter: blur(12px);
  text-align:center;
}

.footer p{
  font-size: 13px;
  color: rgba(255,255,255,0.70);
}

/* ---------------- Reveal helper ---------------- */
.js-reveal{
  opacity: 0;
  transform: translateY(22px);
}

/* ---------------- RESPONSIVE ---------------- */
@media (max-width: 968px){
  .nav{
    display:none;
    position:absolute;
    top: 100%;
    left: 0;
    right: 0;
    margin: 0 14px;
    padding: 14px;
    border-radius: 18px;
    background: rgba(10, 18, 32, 0.78);
    border: 1px solid rgba(255,255,255,0.10);
    backdrop-filter: blur(12px);
    flex-direction: column;
    gap: 8px;
  }
  .nav.active{ display:flex; }
  .menu-toggle{ display:flex; }

  .hero-card,
  .service-card,
  .contact-card{
    grid-template-columns: 1fr;
  }

  .hero-card,
  .service-card,
  .partners-card,
  .contact-info{
    padding: 28px;
  }

  .contact-details{ grid-template-columns: 1fr; }

  .logo-mark{
    width: 73px;
    height: 73px;
    padding: 10px;
  }

  .logo-text{
    font-size: 4rem;
  }

  /* ✅ Mobile order consistency: ALWAYS text first then image */
  .service-card .service-content{ order: 0; }
  .service-card .service-image{ order: 1; }
  .service-card-reverse .service-image{ order: 1; }
  .service-card-reverse .service-content{ order: 0; }
}

@media (max-width: 640px){
  .hero-content h1{ font-size: 30px; }
  .service-content h2,
  .service-content h3{ font-size: 26px; }

  .partners-grid{
    grid-template-columns: repeat(auto-fit, minmax(110px, 1fr));
    gap: 16px;
  }
  .logo-placeholder{
    width: 118px;
    height: 74px;
  }

  /* ✅ Much bigger contact typography on mobile */
  .contact-item{
    padding: 18px 16px;
  }
  .contact-item h3{
    font-size: 18px;
    letter-spacing: 0.7px;
    margin-bottom: 10px;
  }
  .contact-item p{
    font-size: 22px;
    line-height: 1.75;
    color: rgba(255,255,255,0.95);
  }
  .contact-item .email{
    font-size: 22px;
  }

  .map-overlay-badge{
    font-size: 13px;
    padding: 12px 14px;
  }
}

/* ---------------- Reduced Motion ---------------- */
@media (prefers-reduced-motion: reduce){
  html{ scroll-behavior: auto; }
  *{ animation: none !important; transition: none !important; }
}

/* (keep your custom crop if you want it) */
#stampa .service-image img,
#izdavastvo .service-image img{
  transform: translateZ(0) scale(1.18);
  -webkit-transform: translateZ(0) scale(1.18);
}

/* =========================
   CLICK-TO-CALL (Desktop + Mobile)
   ========================= */
.phone-link{
  display: block;
  width: 100%;
  text-decoration: none;
  color: rgba(255,255,255,0.72);
  font-size: 18px;
  line-height: 1.7;
  padding: 8px 0px;
  margin: 2px 0;
  border-radius: 12px;
  background: rgba(255,255,255,0.00);
  border: 1px solid rgba(255,255,255,0.00);
  transition: transform 0.2s ease, background 0.2s ease, border-color 0.2s ease, color 0.2s ease;
}

@media (hover: hover) and (pointer: fine){
  .phone-link:hover{
    color: rgba(255,255,255,0.95);
    background: rgba(255,255,255,0.06);
    border-color: rgba(255,255,255,0.12);
    transform: translateX(3px);
  }
}

.phone-link:focus-visible{
  outline: 2px solid rgba(0,168,225,0.75);
  outline-offset: 3px;
  color: rgba(255,255,255,0.98);
  background: rgba(255,255,255,0.08);
  border-color: rgba(255,255,255,0.14);
}

@media (max-width: 640px){
  .phone-link{
    font-size: 22px;
    padding: 14px 12px;
    margin: 6px 0;
    color: rgba(255,255,255,0.95);
    background: rgba(255,255,255,0.06);
    border-color: rgba(255,255,255,0.12);
  }

  .phone-link:active{
    transform: scale(0.99);
    background: rgba(255,255,255,0.09);
  }
}
