/* ====================================================
   Eiropas Tranzīts – COMPLETE Stylesheet
   ==================================================== */

/* ====== RESET & BASE ====== */
*{box-sizing:border-box;margin:0;padding:0}
html{scroll-behavior:smooth}
body{
  font-family:'DM Sans',sans-serif;
  line-height:1.7;
  background:#f7f8fa;
  color:#2d3436;
  font-size:16px;
}

/* ====== PIXI CANVAS HERO BG ====== */
#pixi-hero{position:absolute;inset:0;z-index:0}
#pixi-hero canvas{display:block;width:100%!important;height:100%!important}

/* ====== FIXED HEADER ====== */
.site-header{
  position:fixed;top:0;left:0;right:0;z-index:1100;
  background:rgba(255,255,255,.97);
  backdrop-filter:blur(12px);
  -webkit-backdrop-filter:blur(12px);
  box-shadow:0 2px 24px rgba(0,0,0,.06);
  will-change:transform;
}
.header-top{
  display:flex;align-items:center;justify-content:space-between;
  padding:.6rem 2rem;
  max-width:1200px;margin:0 auto;
  min-height:84px;
}
.logo-wrapper{flex-shrink:0;display:flex;align-items:center}
.logo-image{height:64px;width:auto}

/* ====== LANGUAGE SWITCHER ====== */
.lang-switch{display:flex;gap:.35rem;flex-shrink:0}
.lang-btn{
  background:#eef4f5;border:1px solid #c5dce0;border-radius:6px;
  padding:.3rem .65rem;font-weight:600;font-size:.82rem;color:#1a6b7a;
  cursor:pointer;transition:all .22s ease;min-width:36px;text-align:center;
}
.lang-btn:hover{background:#d6ecef}
.lang-btn.active{background:#0d7c8f;border-color:#0d7c8f;color:#fff}

/* ====== NAVIGATION BAR ====== */
.nav-bar{
  border-top:1px solid #eef2f3;
  background:#fff;
}
.nav-bar-inner{
  display:flex;align-items:center;justify-content:center;
  gap:0;
  max-width:1200px;margin:0 auto;
  min-height:44px;
}
.nav-item{position:relative}
.nav-link{
  display:block;
  color:#2d3436;font-weight:600;text-decoration:none;font-size:.92rem;
  padding:.65rem 1.2rem;
  transition:color .22s,background .22s;
}
.nav-link:hover{color:#0d7c8f;background:rgba(13,124,143,.04)}

/* ====== DROPDOWN ====== */
.has-dropdown{position:relative}
.dropdown-toggle{cursor:pointer;user-select:none}
.dropdown-toggle::after{
  content:'▾';margin-left:.35rem;font-size:.7rem;
  display:inline-block;transition:transform .25s;
}
.dropdown-menu{
  position:absolute;top:100%;left:0;
  min-width:280px;
  background:#fff;
  border:1px solid #e4edef;
  border-radius:0 0 10px 10px;
  box-shadow:0 12px 36px rgba(0,0,0,.1);
  opacity:0;visibility:hidden;
  transform:translateY(-6px);
  transition:all .25s ease;
  z-index:1200;
  padding:.35rem 0;
  will-change:opacity,transform;
}
.has-dropdown:hover .dropdown-menu,
.has-dropdown.open .dropdown-menu{
  opacity:1;visibility:visible;transform:translateY(0);
}
.has-dropdown:hover .dropdown-toggle::after,
.has-dropdown.open .dropdown-toggle::after{
  transform:rotate(180deg);
}
.dropdown-menu a{
  display:block;padding:.6rem 1.3rem;
  color:#333;text-decoration:none;font-size:.88rem;font-weight:500;
  transition:background .2s,color .2s;
  white-space:nowrap;
}
.dropdown-menu a:hover{background:#eef8f9;color:#0d7c8f}

/* ====== MOBILE MENU ====== */
.mobile-menu-btn{
  display:none;flex-direction:column;gap:5px;
  background:none;border:none;cursor:pointer;padding:.5rem;z-index:1160;
}
.mobile-menu-btn span{
  display:block;width:26px;height:3px;background:#2d3436;
  border-radius:2px;transition:all .3s ease;
}
.mobile-menu-btn.open span:nth-child(1){transform:rotate(45deg) translate(5px,6px)}
.mobile-menu-btn.open span:nth-child(2){opacity:0}
.mobile-menu-btn.open span:nth-child(3){transform:rotate(-45deg) translate(5px,-6px)}

.mobile-nav{
  display:none;position:fixed;inset:0;
  background:rgba(255,255,255,.98);
  flex-direction:column;align-items:center;justify-content:center;
  gap:1rem;z-index:1150;backdrop-filter:blur(10px);
  padding:2rem;
}
.mobile-nav.open{display:flex}
.mobile-nav a{
  font-size:1.2rem;font-weight:600;color:#0d7c8f;text-decoration:none;
  padding:.6rem 1.5rem;border-radius:8px;transition:background .2s;
  text-align:center;
}
.mobile-nav a:hover{background:#eef4f5}
.mobile-nav .mobile-sub{
  font-size:1rem;font-weight:500;color:#555;padding:.4rem 1.5rem .4rem 2.5rem;
}
.mobile-nav .mobile-divider{
  width:60px;height:1px;background:#ddd;margin:.3rem 0;
}

/* ====== HERO ====== */
header.hero{
  position:relative;text-align:center;
  padding:10rem 1.5rem 6rem;
  background:url(/images/header-bg.png) center/cover no-repeat;
  color:#fff;min-height:460px;
  display:flex;align-items:center;justify-content:center;
  overflow:hidden;
}
.hero-overlay{
  position:absolute;inset:0;
  background:linear-gradient(135deg,rgba(8,50,68,.78),rgba(13,124,143,.5));
  z-index:1;
}
.hero-content{position:relative;z-index:2;max-width:720px}
.hero-content h1{
  font-family:'Plus Jakarta Sans',sans-serif;
  font-size:clamp(1.8rem,5vw,3.2rem);font-weight:800;line-height:1.15;
  margin-bottom:1rem;letter-spacing:-.02em;
  text-shadow:0 2px 16px rgba(0,0,0,.25);
}
.hero-subtitle{
  font-size:clamp(1rem,2.5vw,1.3rem);opacity:.92;font-weight:400;
  text-shadow:0 1px 8px rgba(0,0,0,.2);
}

/* ====== SPACER for fixed header ====== */
.header-spacer{height:128px}

/* ====== CONTAINER ====== */
.container{max-width:1040px;margin:0 auto;padding:2rem 1rem}

/* ====== SECTIONS ====== */
section{
  background:#fff;padding:2.5rem 2rem;border-radius:16px;
  box-shadow:0 4px 24px rgba(0,0,0,.04);margin-top:2rem;
}
.section-title{
  font-family:'Plus Jakarta Sans',sans-serif;
  font-size:1.8rem;font-weight:700;text-align:center;color:#0a3c50;
}
.accent-line{
  width:60px;height:3px;
  background:linear-gradient(90deg,#0d7c8f,#25ebd7);
  margin:1rem 0 1.5rem;border-radius:2px;
}
.accent-line.center{margin:1rem auto 2rem}

/* ====== ABOUT ====== */
.about-content{display:flex;gap:2.5rem;align-items:flex-start;flex-wrap:wrap}
.about-text{flex:1 1 400px;min-width:280px}
.about-text h2{
  font-family:'Plus Jakarta Sans',sans-serif;
  font-size:1.6rem;font-weight:700;color:#0a3c50;margin-bottom:.5rem;
}
.about-text p{font-size:1rem;color:#444;line-height:1.85}
.about-image{flex:1 1 320px;min-width:280px}
.about-image img{
  width:100%;height:auto;border-radius:14px;
  box-shadow:0 6px 24px rgba(0,0,0,.08);
}

/* ====== MISSION / SLIDER ====== */
.mission-section{text-align:center;padding:2rem 1.5rem}
.mission-section h2{
  font-family:'Plus Jakarta Sans',sans-serif;
  font-size:1.3rem;font-weight:600;color:#0d7c8f;margin-bottom:1rem;
}
.slider{
  width:100%;max-width:600px;height:400px;overflow:hidden;
  border-radius:14px;margin:1.5rem auto 0;background:#f0f0f0;
}
.slides{display:flex;height:100%;transition:transform 1.5s ease-in-out}
.slide{min-width:100%;height:100%;display:flex;align-items:center;justify-content:center}
.slide img{max-width:100%;max-height:100%;object-fit:contain;display:block}


/* ====== SERVICE CARD: картинка слева + заголовок справа, текст под ними ====== */
.svc-top{
  display:flex;align-items:center;gap:1.5rem;margin-bottom:1.25rem;
}
.svc-img{flex-shrink:0;width:160px}
.svc-img img{width:100%;height:auto;display:block;object-fit:contain}
.svc-title{margin:0;flex:1}
@media(max-width:560px){
  .svc-top{flex-direction:column;align-items:flex-start}
  .svc-img{width:120px}
}
/* ====== SERVICES ====== */
.services-section{padding:3rem 2rem}
.service-card{
  border:1px solid #e8eff1;border-radius:14px;padding:2rem;margin-bottom:1.5rem;
  transition:box-shadow .3s ease;background:linear-gradient(135deg,#fafeff,#f4fafb);
  animation:fadeInUp .5s ease both;
}
.service-card:nth-child(2){animation-delay:.1s}
.service-card:nth-child(3){animation-delay:.2s}
.service-card:hover{box-shadow:0 8px 32px rgba(13,124,143,.08)}
.service-icon{font-size:2rem;margin-bottom:.75rem}
.service-card h3{
  font-family:'Plus Jakarta Sans',sans-serif;
  font-size:1.3rem;font-weight:700;color:#0a3c50;margin-bottom:1rem;
}
.service-body p{font-size:.95rem;color:#444;line-height:1.8;margin-bottom:1rem}
.service-body a{color:#0d7c8f;text-decoration:underline}

.rolling-stock-grid{
  display:grid;grid-template-columns:repeat(auto-fill,minmax(280px,1fr));
  gap:.75rem;margin-top:1rem;
}
.stock-item{
  background:#e8f4f6;padding:.75rem 1rem;border-radius:8px;
  font-size:.9rem;color:#333;border-left:3px solid #0d7c8f;
}
.tank-features{display:flex;gap:2rem;flex-wrap:wrap;margin-top:1rem}
.feature-col{flex:1 1 250px;min-width:220px}
.feature-col h4{font-size:1rem;font-weight:600;color:#0a3c50;margin-bottom:.5rem}
.feature-col ul{list-style:none;padding:0}
.feature-col li{
  font-size:.9rem;color:#444;padding:.4rem 0 .4rem 1.2rem;position:relative;
}
.feature-col li::before{
  content:'✓';position:absolute;left:0;color:#0d7c8f;font-weight:700;
}

/* ====== MAP ====== */
#map{height:400px;margin:2rem 0;border-radius:12px;overflow:hidden;isolation:isolate;}
#map .leaflet-tile-pane{border-radius:12px}
.map-icons{display:flex;justify-content:center;gap:.7rem;margin-top:.75rem}
.map-icons a img{transition:transform .3s ease}
.map-icons a img:hover{transform:scale(1.15)}

/* ====== CONTACTS ====== */
.contact-section{padding:3rem 2rem}
.contact-grid{
  display:grid;grid-template-columns:repeat(2,1fr);
  gap:1.5rem;margin-top:1rem;
}
@media(max-width:640px){
  .contact-grid{grid-template-columns:1fr}
}
.contact-card{
  background:#f8fbfc;border:1px solid #e4edef;border-radius:12px;
  padding:1.5rem;text-align:center;transition:transform .2s,box-shadow .2s;
}
.contact-card:hover{transform:translateY(-3px);box-shadow:0 8px 24px rgba(0,0,0,.06)}
.contact-icon{font-size:1.8rem;margin-bottom:.5rem}
.contact-card h4{font-size:1rem;font-weight:700;color:#0a3c50;margin-bottom:.75rem}
.contact-card p{font-size:.9rem;color:#555;line-height:1.6;margin-bottom:.5rem}
.contact-card a{color:#0d7c8f;text-decoration:none}
.contact-card a:hover{text-decoration:underline}

.staff-card{grid-column:1/-1}
.staff-list{display:grid;grid-template-columns:repeat(auto-fill,minmax(190px,1fr));gap:.85rem;margin-top:.5rem;text-align:left}
.staff-person{background:#f4fafc;border:1px solid #dceef2;border-radius:10px;padding:.85rem 1rem;display:flex;flex-direction:column;gap:.2rem}
.staff-role{font-size:.75rem;font-weight:600;color:#0d7c8f;text-transform:uppercase;letter-spacing:.03em;line-height:1.3}
.staff-name{font-size:.95rem;font-weight:600;color:#0a3c50}
.staff-email{font-size:.82rem;color:#0d7c8f;text-decoration:none;word-break:break-all}
.staff-email:hover{text-decoration:underline}
@media(max-width:640px){.staff-card{grid-column:auto}.staff-list{grid-template-columns:1fr 1fr}}
@media(max-width:400px){.staff-list{grid-template-columns:1fr}}

/* ====== CONTACT LOGO CARD ====== */
.contact-logo-card{display:flex;align-items:center;justify-content:center}
.contact-logo-card img{max-width:180px;width:100%;height:auto;opacity:.9}

/* ====== FOOTER ====== */
footer{
  text-align:center;padding:2rem 1rem;background:#f1f4f5;color:#666;
  margin-top:3rem;font-size:.9rem;
}
.footer-dev{margin-top:.75rem;font-size:.8rem;color:#999}
.footer-dev a{color:#999;text-decoration:none}
.footer-dev a:hover{color:#0d7c8f}

/* ====== SOUND TOGGLE ====== */
.sound-toggle{
  position:fixed;bottom:1.5rem;right:1.5rem;z-index:1100;
  width:44px;height:44px;border-radius:50%;
  background:rgba(13,124,143,.85);color:#fff;border:none;
  cursor:pointer;font-size:1.2rem;
  box-shadow:0 4px 16px rgba(0,0,0,.15);
  display:flex;align-items:center;justify-content:center;
  transition:background .2s,transform .2s;
  backdrop-filter:blur(8px);
}
.sound-toggle:hover{background:rgba(13,124,143,1);transform:scale(1.08)}

/* ====== FOCUS STATES (accessibility) ====== */
.lang-btn:focus-visible,
.nav-link:focus-visible,
.mobile-menu-btn:focus-visible,
.sound-toggle:focus-visible{
  outline:2px solid #0d7c8f;
  outline-offset:2px;
}

/* ====== ANIMATIONS ====== */
@keyframes fadeInUp{
  from{opacity:0;transform:translateY(20px)}
  to{opacity:1;transform:translateY(0)}
}

/* ====== RESPONSIVE ====== */
@media(max-width:768px){
  .header-top{padding:.5rem 1rem}
  .nav-bar{display:none}
  .mobile-menu-btn{display:flex}
  .header-spacer{height:84px}
  header.hero{min-height:340px;padding:7rem 1rem 4rem}
  section{padding:1.5rem 1.2rem;border-radius:12px}
  .about-content{flex-direction:column}
  .slider{height:260px}
  .service-card{padding:1.5rem 1.2rem}
  .rolling-stock-grid{grid-template-columns:1fr}
  .tank-features{flex-direction:column}
  .contact-grid{grid-template-columns:1fr}
  #map{height:280px}
}
@media(max-width:480px){
  .header-top{padding:.4rem .8rem}
  .logo-image{height:48px}
  .header-spacer{height:72px}
  header.hero{min-height:280px;padding:5.5rem 1rem 3rem}
  .container{padding:1rem .5rem}
  section{padding:1.2rem 1rem;margin-top:1rem}
  .section-title{font-size:1.4rem}
  .about-text h2{font-size:1.3rem}
}

/* ====== PRINT ====== */
@media print{
  .site-header,.mobile-menu-btn,.mobile-nav,.sound-toggle,#pixi-hero,.hero-overlay{display:none!important}
  .header-spacer{height:0!important}
  header.hero{padding:2rem 1rem;min-height:auto;background:#0d7c8f}
  section{break-inside:avoid;box-shadow:none;border:1px solid #ddd}
}

/* ====== REDUCED MOTION ====== */
@media(prefers-reduced-motion:reduce){
  *,*::before,*::after{
    animation-duration:.01ms!important;
    animation-iteration-count:1!important;
    transition-duration:.01ms!important;
    scroll-behavior:auto!important;
  }
  .slides{transition:none!important}
}