/* =========================================================
   contacts.css
   - Thumbnail hartă: ~20% din ecran
   - Click => se deschide un “modal” cu harta la 50% din ecran
   - Fără JavaScript: folosim #map-modal + :target
   ========================================================= */

/* Footer */
.contacts-footer {
  padding: 16px;
  text-align: center;
}

.contact-card{
  width: min(680px, 92vw);
  margin: 20px auto 0;
  padding: 16px 18px;
  border-radius: 18px;
 
  text-align: center;
  line-height: 1.6;
}

#cum-ne-gasim {
  display: block;              /* IMPORTANT */
  width: min(900px, 92vw);     /* limităm lățimea */
  margin: 30px auto 20px;      /* auto = centrare */
  text-align: center;          /* centrează textul */
  font-size: 14px;
  font-weight: 500;
  line-height: 1.6;
  background: rgba(0,0,0,0.35);
  border: 1px solid rgba(255,255,255,0.18);
  border-radius: 18px;
  padding: 18px 22px;
  box-shadow: 0 18px 55px rgba(0,0,0,0.25);
}



.contacts-footer__title {
  margin: 0 0 10px;
  font-weight: 700;
}

.hero--contacts {
  width: 100%;
  max-width: 1000px;
  margin: 16px auto 0;
  padding: 0 16px;
  text-align: center;   /* CENTREAZĂ TOT */
}

/* Thumbnail link */
.map-thumb-link {
  display: inline-block;
  text-decoration: none;
  color: inherit;
}

/* Thumbnail container: “20% din ecran” */
.map-thumb {
  position: relative;
  width: 20vw;     /* 20% din lățimea ecranului */
  height: 20vw;    /* păstrăm pătrat ca să fie simplu și stabil */
  max-width: 260px;
  max-height: 260px;
  border-radius: 14px;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.25);
}

/* Iframe thumbnail: dezactivăm click în iframe ca să prindă click-ul linkul */
.map-iframe--thumb {
  width: 100%;
  height: 100%;
  border: 0;
  pointer-events: none;
}

/* Hint mic pe thumbnail */
.map-thumb__hint {
  position: absolute;
  left: 8px;
  right: 8px;
  bottom: 8px;
  padding: 6px 8px;
  border-radius: 10px;
  font-size: 12px;
  font-weight: 700;
  background: rgba(0, 0, 0, 0.45);
  text-align: center;
}

/* =========================================
   “Modal” cu :target
   ========================================= */

.map-modal {
  position: fixed;
  inset: 0;
  display: none;                 /* ascuns by default */
  align-items: center;
  justify-content: center;
  z-index: 9999;
}

.map-modal:target {
  display: flex;                 /* devine vizibil când e #map-modal */
}

.map-modal__backdrop {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.6);
}

/* Conținut modal: jumătate de ecran */
.map-modal__content {
  position: relative;
  width: 50vw;                   /* 50% din lățime */
  height: 50vh;                  /* 50% din înălțime */
  border-radius: 16px;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.25);
  background: rgba(0, 0, 0, 0.35);
  z-index: 1;
}

/* Iframe mare: activ (poți da zoom / click în hartă) */
.map-iframe--large {
  width: 100%;
  height: 100%;
  border: 0;
}

/* Buton închidere */
.map-modal__close {
  position: absolute;
  top: 10px;
  right: 10px;
  z-index: 2;
  width: 34px;
  height: 34px;
  display: grid;
  place-items: center;
  border-radius: 10px;
  background: rgba(0, 0, 0, 0.55);
  color: #fff;
  text-decoration: none;
  font-weight: 900;
  line-height: 1;
}

/* Mic polish: pe ecrane foarte mici, păstrăm “jumătate de ecran” dar cu margini ok */
@media (max-width: 600px) {
  .map-modal__content {
    width: 50vw;
    height: 50vh;
  }
}
  @media (max-width: 768px) {
  .map-thumb {
    width: 70vw;      /* 70% din lățimea ecranului */
    height: 70vw;     /* păstrăm proporția pătrată */
    max-width: none;  /* eliminăm limita de 260px */
    max-height: none;
  }
}


/* =========================================================
   Luxury Bus Animation (CSS-only)
   Plasată deasupra adresei (în hero)
   ========================================================= */

.hero--contacts {
  width: 100%;
  max-width: 980px;
  margin: 16px auto 0;
}

/* container */
.bus-station {
  width: min(680px, 92vw);
  margin: 6px auto 14px;
  padding: 14px 14px 18px;
  border-radius: 18px;

  background: radial-gradient(120% 140% at 20% 10%, rgba(255,255,255,0.10), rgba(255,255,255,0.04) 55%, rgba(0,0,0,0.18));
  border: 1px solid rgba(255,255,255,0.16);
  box-shadow: 0 18px 55px rgba(0,0,0,0.35);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);

  position: relative;
  overflow: hidden;
}

/* road line */
.bus-road {
  height: 2px;
  width: 100%;
  margin-top: 30px;
  background: linear-gradient(90deg, transparent, rgba(214,178,94,0.55), transparent);
  opacity: 0.9;
}

/* stage */
.bus-wrap {
  position: relative;
  height: 74px;
  margin-top: 6px;
}

/* stop sign */
.stop {
  position: absolute;
  left: 18px;
  bottom: 10px;
  width: 56px;
  height: 56px;
  display: grid;
  place-items: center;
}

.stop::before {
  content: "";
  position: absolute;
  bottom: -18px;
  width: 6px;
  height: 26px;
  border-radius: 3px;
  background: rgba(255,255,255,0.35);
}

.stop__plate {
  display: inline-grid;
  place-items: center;
  width: 52px;
  height: 52px;
  border-radius: 14px;
  font-weight: 900;
  letter-spacing: 0.10em;
  font-size: 12px;
  color: rgba(255,255,255,0.92);

  background: rgba(0,0,0,0.45);
  border: 1px solid rgba(214,178,94,0.35);
  box-shadow: 0 10px 26px rgba(0,0,0,0.35);
  text-transform: uppercase;
}

/* bus SVG */
.bus {
  position: absolute;
  right: -240px;      /* start outside */
  bottom: 0;
  width: 210px;
  height: auto;
  filter: drop-shadow(0 14px 22px rgba(0,0,0,0.35));
  animation: bus-arrive 7.5s cubic-bezier(.2,.9,.2,1) 1 forwards;
}

/* bus colors */
.bus__body { fill: #f2d58a; }
.bus__nose { fill: #d6b25e; }
.bus__win  { fill: rgba(10,10,12,0.35); stroke: rgba(255,255,255,0.22); stroke-width: 1; }
.bus__door { fill: rgba(10,10,12,0.25); stroke: rgba(255,255,255,0.20); stroke-width: 1; }
.bus__wheel { fill: rgba(10,10,12,0.85); }
.bus__wheelHub { fill: rgba(255,255,255,0.65); }
.bus__light { fill: rgba(255,245,210,0.95); opacity: 0.0; animation: headlight 7.5s ease-in-out 1 forwards; }

/* wheels spin a bit */
.bus__wheel, .bus__wheelHub {
  transform-box: fill-box;
  transform-origin: center;
  
}


.bus__wheel { animation: wheel 7.5s linear 1 forwards; }

/* arrival animation: comes in, brakes near the stop, rests, then loops */
@keyframes bus-arrive {
  0%   { transform: translateX(0) translateY(0); }
  55%  { transform: translateX(-420px) translateY(0); }
  70%  { transform: translateX(-470px) translateY(0); } /* braking */
  82%  { transform: translateX(-470px) translateY(0); } /* stop */
  100% { transform: translateX(0) translateY(0); }      /* reset */
}

@keyframes wheel {
  0%   { transform: rotate(0deg); }
  60%  { transform: rotate(-520deg); }
  82%  { transform: rotate(-560deg); } /* slows */
  100% { transform: rotate(0deg); }    /* reset */
}

@keyframes headlight {
  0%, 45% { opacity: 0; }
  55%     { opacity: 0.55; }
  82%     { opacity: 0.15; }
  100%    { opacity: 0; }
}

/* respects reduced motion */
@media (prefers-reduced-motion: reduce) {
  .bus, .bus__wheel, .bus__light { animation: none; }
}
