/* ==========================================================
   ŽIVOJINOVIĆ • style.css
   (2025-05 • mobile tweaks: About left-align + subtle offsets)
   ========================================================== */


/* ----------------------------------------------------------
   0. RESET & BASE
   ---------------------------------------------------------- */
* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
  font-family: Arial, sans-serif;
}

html,
body {
  scroll-behavior: smooth;
  overflow-x: hidden;                 /* prevents horizontal scroll */
  -webkit-overflow-scrolling: touch;  /* iOS momentum scroll */
}

body {
  color: #333;
  line-height: 1.6;
}



/* ----------------------------------------------------------
   1. HEADER
   ---------------------------------------------------------- */
.site-header {
  background: rgba(0, 0, 0, .90);
  box-shadow: 0 2px 4px rgba(0, 0, 0, .50);
  padding: 1rem 5%;
}

/* --- inner flex --- */
.header-content {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;                    /* nav drops under logo on mobile */
  width: 100%;
  margin: 0 auto;
}

/* --- Logo --- */
.logo {
  display: flex;
  align-items: center;
  gap: .2rem;
  color: #fff;
  margin-left: -60px;                 /* visual balance on desktop */
}
.logo-img  { width: 55px; height: 55px; object-fit: contain; opacity: .65; transform: scale(1.15); }

.logo-text { display: flex; flex-direction: column; line-height: 1.25; }
.logo-lower {
  font: bold 1.5rem/1 Arial, sans-serif;
  text-transform: uppercase;
  letter-spacing: 1px;
  text-shadow: 0 0 5px rgba(255,255,255,.70);
  margin-bottom: .05rem;
}
.logo-upper {
  font-size: .65rem;
  text-transform: uppercase;
  letter-spacing: 1px;
  text-shadow: 0 0 4px rgba(255,255,255,.60);
}

/* --- Language switcher --- */
.language-switcher {
  display: flex;
  align-items: center;
  gap: .5rem;
  margin-right: -60px;
}
.lang-btn {
  padding: .5rem .8rem;
  border: 1px solid #ccc;
  background: transparent;
  border-radius: 4px;
  color: #fff;
  cursor: pointer;
  font-weight: 500;
  transition: .3s;
}
.lang-btn.active,
.lang-btn:hover { background: #e7d19a; border-color: #e7d19a; }

/* --- Navigation --- */
.nav-links {
  flex: 1;
  display: flex;
  justify-content: center;
  align-items: center;
  margin-left: -80px;
}
.nav-links a {
  margin: 0 1rem;
  color: #e4dfd1;
  font-size: 1rem;
  text-decoration: none;
  font-weight: 500;
  position: relative;
  transition: color .3s, transform .3s;
}
.nav-links a::after {
  content: "";
  position: absolute;
  left: 50%;
  bottom: -3px;
  width: 60%;
  height: 2px;
  background: #ecd4a2;
  transform: translateX(-50%) scaleX(0);
  transform-origin: center;
  transition: transform .3s;
}
.nav-links a:hover   { color:#ecd4a2; transform: scale(1.05); }
.nav-links a:hover::after { transform: translateX(-50%) scaleX(1); }

/* hide hamburger forever */
.menu-toggle { display: none !important; }



/* ----------------------------------------------------------
   2. HERO  (intro banner)
   ---------------------------------------------------------- */
.hero {
  position: relative;
  background: url("pics/back8.jpg") no-repeat center / cover;
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
}
.hero-overlay { position: absolute; inset: 0; background: rgba(0,0,0,.40); }

.hero-content { position: relative; max-width: 600px; text-align: center; z-index: 2; }

.hero-title   { font-size: 2.5rem; line-height: 1.1; margin-bottom: 1rem; color:#fff; }
.hero-title span { display:block; font-weight:bold; text-transform:uppercase; }

@media (max-width:768px){ .hero-title{ font-size:1.9rem; } }
@media (max-width:480px){ .hero-title{ font-size:1.6rem; } }

.hero-content p{ font-size:1.1rem; margin-bottom:1.5rem; color:#dfdfdf; }

.btn{ display:inline-block; padding:.8rem 1.2rem; border:none; border-radius:4px; font-weight:bold; cursor:pointer; text-decoration:none; opacity:.8; }
.btn-primary,.btn-secondary{ background:#b49b67; color:#333; }
.btn:hover{ opacity:.9; }
.btn-secondary{ min-width:180px; }
.hero-btns{ display:inline-flex; flex-wrap:wrap; gap:.6rem; justify-content:center; }



/* ----------------------------------------------------------
   3. SECTIONS  (About • Services • Team • Why • Contact)
   ---------------------------------------------------------- */
section  { padding: 3rem 5%; }
.container{ width: 100%; margin:auto; }

/* ---------- 3.1 ABOUT ---------- */
.about {
  position: relative;
  background: url("pics/bgd.jpg") no-repeat center -220px / cover;
  min-height: 75vh;
  font-size: 1.1rem;
  color: #f5e2cc;
}
.about-grid {
  display: grid;
  grid-template-columns: 2fr 1fr;
  gap: 2rem;
  align-items: center;
}
.about-text { text-align:left; }       /* desktop left-align remains */

/* about card */
.about-card {
  position: relative;
  background: rgba(0,0,0,.45);
  padding: 2rem 2.5rem 6rem;
  border-radius: 12px;
  backdrop-filter: blur(6px);
  transition: .4s;
  max-width: 920px;
  margin-top: 30px;
}
.about-card:hover {
  transform: translateY(-6px) scale(1.02);
  box-shadow: 0 6px 20px rgba(240,199,118,.50);
  background: rgba(0,0,0,.60);
}

/* signature */
.signature {
  position: absolute;
  bottom: 1.3rem;
  right: 2rem;
  font-family: 'Great Vibes', cursive;
  font-size: 2.2rem;
  color: #f6f0a1;
  opacity: .90;
}

/* ---------- 3.2 SERVICES / TEAM heading ---------- */
.services-team {
  background: url("pics/law1.jpg") no-repeat center / cover;
  text-align: center;
}
.services-team h2 {
  margin-bottom: 2rem;
  color: #fff;
  text-shadow: 1px 1px 4px rgba(0,0,0,.50);
}



/* ----------------------------------------------------------
   4. GRID LAYOUTS
   ---------------------------------------------------------- */
.service-grid { display:grid; gap:2rem; grid-template-columns:repeat(4,1fr); margin-bottom:3rem; }
.team-grid    { display:grid; gap:2rem; grid-template-columns:repeat(auto-fit,minmax(220px,1fr)); justify-items:center; opacity:.95; }



/* ==========================================================
   5. FLIP-CARDS  (Safari-safe Service & Team)
   ========================================================== */
.flip-card{ background:transparent; width:100%; max-width:520px; perspective:1000px; -webkit-perspective:1000px; }
.flip-card-inner{
  position:relative; width:100%; height:320px;
  transition:-webkit-transform .8s; transition:transform .8s;
  will-change:transform;
  transform-style:preserve-3d; -webkit-transform-style:preserve-3d;
}
.flip-card:hover .flip-card-inner{ -webkit-transform:rotateY(180deg); transform:rotateY(180deg); }

.flip-card-front,
.flip-card-back{
  position:absolute; inset:0; border-radius:6px; padding:2rem 1.5rem;
  display:flex; flex-direction:column; overflow:hidden; box-shadow:0 2px 6px rgba(0,0,0,.10);
  backface-visibility:hidden; -webkit-backface-visibility:hidden;
}
.flip-card-front{ -webkit-transform:rotateY(0deg) translateZ(1px); transform:rotateY(0deg) translateZ(1px); z-index:2; }
.flip-card-back { background:#b8cee2; -webkit-transform:rotateY(180deg); transform:rotateY(180deg); z-index:1; }
.flip-card-back h3{ text-align:center; margin-bottom:1rem; }

/* ----- Service faces ----- */
.service-front{ display:flex; flex-direction:column; justify-content:center; align-items:center; text-align:center; flex:1; padding:1rem; }
.service-front h3{ margin-bottom:1rem; font-size:1.6rem; }
.service-front p { font-size:1.1rem; line-height:1.6; }
.service-back{ background:#cccfca!important; text-align:left; padding:1rem; font-size:.9rem; }

.service-front::before{ content:""; position:absolute; inset:0; background:rgba(0,0,0,.45); border-radius:6px; z-index:0; }
.service-front h3, .service-front p{ position:relative; z-index:1; color:#fff; }

/* service photos */
.serv-imovinsko  .flip-card-front{ background:url("pics/imovinsko.jpg")  center/cover; }
.serv-nasledno   .flip-card-front{ background:url("pics/maratonci2.jpg") center/cover; }
.serv-krivicno   .flip-card-front{ background:url("pics/law13.jpg")      center/cover; }
.serv-privredno  .flip-card-front{ background:url("pics/privreda.jpg")   center/cover; }
.serv-prekrsajno .flip-card-front{ background:url("pics/back9.jpg")      center/cover; }
.serv-ugovorno   .flip-card-front{ background:url("pics/rad.jpg")        center/cover; }
.serv-poresko    .flip-card-front{ background:url("pics/poresko3.jpg")   center/cover; }
.serv-radno      .flip-card-front{ background:url("pics/radno2.jpg")     center/cover; }

/* ----- Team faces ----- */
.team-grid .flip-card-front,
.team-grid .flip-card-back{ background:url("pics/eleg7.jpg") no-repeat center/cover; color:#fff; }
.team-grid .member-img{ width:170px; height:170px; margin:0 auto 1rem; border-radius:50%; overflow:hidden; }
.team-grid .member-img img{ width:100%; height:100%; object-fit:cover; }
.team-grid .member-role{ color:#b49b67; margin-top:.5rem; font-weight:500; text-align:center; }
.team-grid .member-bio{ font-size:.9rem; text-align:left; }



/* ----------------------------------------------------------
   6. HOVER GLOW
   ---------------------------------------------------------- */
.flip-card:hover .flip-card-front,
.flip-card:hover .flip-card-back{
  box-shadow:
    0 2px 6px rgba(209,9,9,.15),
    0 0 10px 3px rgba(255,255,255,.80),
    0 0 25px 8px rgba(249,248,247,.55);
}



/* ----------------------------------------------------------
   7. WHY / CTA
   ---------------------------------------------------------- */
.why-cta{
  background:#eae3d1;
  text-align:center;
  min-height:53vh;
  font-size:1.1rem;
}
.why-cta .benefits-list{ list-style:none; margin-top:2rem; }
.why-cta .benefits-list li{ margin:1rem auto; max-width:600px; }



/* ----------------------------------------------------------
   8. CONTACT
   ---------------------------------------------------------- */
.contact{
  position:relative;
  background:url("pics/law9.jpg") no-repeat center/cover;
  color:#fff;
}
.contact-details{ display:grid; grid-template-columns:1fr; gap:2rem; margin-top:2rem; }
.contact-form   { max-width:500px; margin:0; }
.contact-form label{ display:block; margin-bottom:.5rem; font-weight:500; }
.contact-form input,
.contact-form textarea{ width:100%; padding:.8rem; margin-bottom:1rem; border-radius:4px; border:1px solid #ccc; }
.contact-form textarea{ min-height:180px; resize:vertical; }
.contact-form button{ font-size:1rem; padding:.7rem 1.2rem; cursor:pointer; }



/* ----------------------------------------------------------
   9. FOOTER
   ---------------------------------------------------------- */
.custom-footer-container{
  display:flex; justify-content:space-between; flex-wrap:wrap;
  padding:2rem 5%; background:#1c1c1c; color:#fff;
}
.footer-logo-section{ display:flex; align-items:center; gap:1rem; flex:1 1 250px; }
.footer-logo-img{ width:60px; height:60px; object-fit:contain; transform:scale(1.4); }
.footer-logo-text h3{ font-size:1.4rem; color:#f0c776; margin-bottom:.2rem; }
.footer-logo-text p { font-size:.95rem; color:#ddd; }

.footer-menu-section,
.footer-contact-section{ flex:1 1 200px; margin-top:1rem; }

.footer-menu-section h4,
.footer-contact-section h4{
  margin-bottom:1rem; color:#fff;
  border-bottom:2px solid #f0c776; display:inline-block; padding-bottom:.3rem;
}

.footer-menu-section ul{ list-style:none; padding:0; }
.footer-menu-section li{ margin-bottom:.5rem; }
.footer-menu-section a{ color:#ccc; text-decoration:none; transition:color .3s; }
.footer-menu-section a:hover{ color:#f0c776; }

.footer-contact-section p{ margin-bottom:.5rem; color:#ccc; }

.footer-bottom{
  background:#111;
  text-align:center;
  padding:1rem;
  font-size:.9rem;
  color:#aaa;
}



/* ----------------------------------------------------------
   10. BACK-TO-TOP
   ---------------------------------------------------------- */
.back-to-top{
  position:fixed;
  bottom:30px; right:30px;
  background:#f0c776; color:#000;
  border:none; padding:12px 16px;
  font-size:20px; border-radius:8px; cursor:pointer;
  box-shadow:0 4px 10px rgba(0,0,0,.30);
  opacity:0; transform:translateY(30px);
  transition:.3s; z-index:999;
}
body.scrolled .back-to-top{ opacity:1; transform:translateY(0); }



/* ----------------------------------------------------------
   11. FADE-IN
   ---------------------------------------------------------- */
.fade-in-section{ opacity:0; transform:translateY(30px); transition:.8s ease-out; }
.fade-in-section.is-visible{ opacity:1; transform:translateY(0); }



/* ----------------------------------------------------------
   12. MEDIA-QUERIES
   ---------------------------------------------------------- */
@media (max-width:1024px){
  .service-grid{ grid-template-columns:repeat(2,1fr); }
}

/* ---------- ≤768 px ---------- */
@media (max-width:768px){

  /* banner tweaks */
  .logo{ margin-left:0; }
  .language-switcher{ order:1; margin-right:0; transform:scale(.85); }
  .nav-links{
    order:2; width:100%;
    justify-content:center; flex-wrap:wrap;
    margin:.6rem 0 0 0; background:transparent;
  }
  .nav-links a{ margin:.35rem .9rem; font-size:.95rem; }

  /* — MOBILE ABOUT FIX — */
  .about-grid{ grid-template-columns:1fr; text-align:left; }  /* new left align */
  .about h2      { margin-left:.5rem; text-align:left; }     /* “O nama” offset  */
  .signature     { right:1rem; }                             /* signature in 1rem */

  section{ padding:2.5rem 1.2rem; }

  .about{
    background:url("pics/bgd.jpg") no-repeat center/cover;
    min-height:auto;
    padding:3.5rem 1.2rem 2.5rem;
  }
  .about-card{
    padding:1.5rem 1rem 4rem;
    font-size:.95rem;
    max-width:100%;
  }

  .service-grid, .team-grid{ grid-template-columns:1fr; gap:1.3rem; }
  .flip-card{ max-width:100%; }
  .flip-card-inner{ height:auto; min-height:300px; }

  .contact-form{ margin:0 auto; }

  .custom-footer-container{
    flex-direction:row; flex-wrap:wrap;
    padding:2.5rem 1.2rem; text-align:center; gap:1.5rem;
  }
  .footer-logo-section{ flex:1 1 100%; justify-content:center; }
  .footer-menu-section,
  .footer-contact-section{ flex:1 1 45%; max-width:45%; margin-top:0; }
}

/* ---------- ≤480 px ---------- */
@media (max-width:480px){
  .service-front h3{ font-size:1.4rem; }
  .service-front p { font-size:1rem; }
  .hero-title      { font-size:1.4rem; }
  .nav-links a     { margin:0 .5rem; }
}
