/* Podstawowy reset i zmienne */
:root {
--taxi-yellow: #ffcc00;
--dark-bg: #000000;
--light-bg: #969696;
--text-color: #f0f0f0;
--header-offset: 170px;
--base-font-size: 28px;
--mobile-font-size: 26px;
--header-title-size: 6.8rem;
--section-title-size: 3.35rem;
--tagline-size: 1.85rem;
--nav-link-size: 2.1rem;
--offer-card-min-height: 250px;
--offer-card-padding: 28px;
--offer-card-font-size: 1.35rem;
--price-item-font-size: 1.6rem;
}
* { box-sizing: border-box; margin: 0; padding: 0; font-family: Arial, Helvetica, sans-serif; }
body { background: var(--dark-bg); color: var(--text-color); line-height: 1.7; font-size: var(--base-font-size); }

/* Nawigacja */
header { background: var(--dark-bg); color: white; padding: 1rem 0; text-align: center; position: sticky; top: 0; z-index: 100; }
header h1 { color: var(--taxi-yellow); font-size: var(--header-title-size); text-transform: uppercase; letter-spacing: 0.5px; }
.header-tagline { margin-top: 6px; font-size: var(--tagline-size); color: #eaeaea; max-width: min(92vw, 1000px); margin-left: auto; margin-right: auto; overflow: hidden; white-space: nowrap; }
.header-tagline-text { display: inline-block; padding-left: 100%; animation: headerTaglineMarquee 13s linear infinite; font-size: var(--tagline-size); }
nav { margin-top: 10px; }
nav a { color: white; text-decoration: none; margin: 0 15px; font-weight: bold; transition: color 0.3s; font-size: var(--nav-link-size); }
nav a:hover { color: var(--taxi-yellow); }
.header-actions { position: absolute; top: 12px; right: 16px; display: inline-flex; align-items: center; gap: 12px; }
.lang-current {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  height: 78px; /* ~+50% względem 52px */
  min-width: 78px; /* kwadratowy kształt */
  padding: 0;
  border-radius: 35%; /* mniej "pigułka", bardziej kwadrat */
  border: 2px solid var(--taxi-yellow);
  background: transparent;
  color: var(--taxi-yellow);
  font-weight: 800;
  font-size: 1.5rem; /* ~+50% */
  cursor: pointer;
}
.lang-current:hover { background: rgba(255, 204, 0, 0.15); }
.header-phone-btn { display: inline-flex; align-items: center; justify-content: center; padding: 20px 32px; border-radius: 999px; background: var(--taxi-yellow); color: var(--dark-bg); text-decoration: none; font-weight: 800; font-size: 2rem; box-shadow: 0 6px 14px rgba(0,0,0,0.3); }
.header-phone-inner { display: inline-flex; align-items: center; gap: 14px; }
.header-phone-btn:hover { background: #e6b800; }
.phone-icon { font-size: 2.4rem; }
.phone-number { white-space: nowrap; }
@keyframes ring {
  0% { transform: rotate(0deg); }
  15% { transform: rotate(-15deg); }
  30% { transform: rotate(12deg); }
  45% { transform: rotate(-10deg); }
  60% { transform: rotate(8deg); }
  75% { transform: rotate(-6deg); }
  100% { transform: rotate(0deg); }
}
@keyframes headerTaglineMarquee {
  0% { transform: translateX(0); }
  100% { transform: translateX(-100%); }
}
.header-phone-btn:hover .phone-icon {
  display: inline-block;
  animation: ring 0.6s ease-in-out infinite;
  transform-origin: 50% 50%;
}

/* Przycisk języka pod nawigacją — tylko mobile (desktop: ukryty) */
.header-lang-mobile { display: none; }

/* Sekcje */
section { padding: 40px 20px; max-width: 1200px; margin: auto; scroll-margin-top: var(--header-offset); }
h2 { text-align: center; margin-bottom: 30px; font-size: var(--section-title-size); border-bottom: 3px solid var(--taxi-yellow); display: inline-block; padding-bottom: 5px; left: 50%; position: relative; transform: translateX(-50%); }

/* Opis i Usługi (Grid) */
.services-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(400px, 1fr)); gap: 20px; }
.service-card { background: var(--light-bg); padding: var(--offer-card-padding); min-height: var(--offer-card-min-height); border-radius: 8px; border-left: 5px solid var(--taxi-yellow); box-shadow: 0 4px 6px rgba(0,0,0,0.1); font-size: var(--offer-card-font-size); display: flex; flex-direction: column; justify-content: flex-start; align-items: center; gap: 12px; position: relative; overflow: hidden; transition: transform 0.35s ease, box-shadow 0.35s ease, background-color 0.35s ease; animation: offerCardFloat 5s ease-in-out infinite; }
.service-card::after { content: ""; position: absolute; top: 0; left: -65%; width: 40%; height: 100%; background: linear-gradient(120deg, transparent 0%, rgba(255,255,255,0.38) 50%, transparent 100%); transform: skewX(-20deg); transition: left 0.5s ease; pointer-events: none; }
.service-card:hover { transform: translateY(-10px) scale(1.02); background-color: #a6a6a6; box-shadow: 0 16px 30px rgba(0,0,0,0.25), 0 0 0 2px rgba(255, 204, 0, 0.35); }
.service-card:hover::after { left: 140%; }
.services-grid .service-card:nth-child(2) { animation-delay: 0.4s; }
.services-grid .service-card:nth-child(3) { animation-delay: 0.8s; }
.services-grid .service-card:nth-child(4) { animation-delay: 1.2s; }
#oferta .service-card h3 {
  text-align: center;
  text-wrap: nowrap;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  font-size: 1.48em;
  font-weight: 800;
  max-width: 100%;
}
.service-card p {
  text-align: center;
  text-wrap: balance;
  line-height: 1.55;
  font-size: 1.32em; /* opis trochę mniejszy niż nagłówek */
  width: 100%;
  max-width: 92%;
  margin-left: auto;
  margin-right: auto;
}

@keyframes offerCardFloat {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-6px); }
}

/* Cennik */
.price-list { list-style: none; max-width: 600px; margin: auto; }
.price-item { display: flex; justify-content: space-between; padding: 16px; border-bottom: 1px solid #333; font-weight: bold; font-size: var(--price-item-font-size); }
.price-item span:last-child { color: var(--taxi-yellow); }

/* Galeria */
.gallery { display: grid; grid-template-columns: repeat(auto-fit, minmax(320px, 1fr)); gap: 24px; }
.gallery img { width: 100%; height: 350px; object-fit: cover; border-radius: 8px; border: 2px solid var(--dark-bg); transition: transform 0.2s ease, box-shadow 0.2s ease; }
.gallery img { cursor: zoom-in; }
.gallery img:hover { transform: scale(1.12); box-shadow: 0 12px 28px rgba(0,0,0,0.45); }

/* Lightbox */
.lightbox { position: fixed; inset: 0; display: none; align-items: center; justify-content: center; background: rgba(0,0,0,0.86); z-index: 999; padding: 24px; }
.lightbox.open { display: flex; }
.lightbox-image { max-width: min(1000px, 92vw); max-height: 90vh; border-radius: 10px; box-shadow: 0 10px 30px rgba(0,0,0,0.4); }
.lightbox-close { position: absolute; top: 16px; right: 16px; width: 44px; height: 44px; border: none; border-radius: 50%; background: #1f1f1f; color: #fff; font-size: 20px; cursor: pointer; }
.lightbox-close:hover { background: #2a2a2a; }

/* Formularz & Mapa */
.booking-section { display: grid; grid-template-columns: 1fr 1fr; gap: 30px; background: var(--dark-bg); color: white; padding: 40px 20px; border-radius: 12px; margin-top: 20px; }
@media (max-width: 1024px) { .booking-section { grid-template-columns: 1fr; } }

.booking-form { display: flex; flex-direction: column; gap: 15px; }
.booking-form input, .booking-form textarea { width: 100%; padding: 14px; border: none; border-radius: 5px; font-size: 1.35rem; }
.booking-form button { background: var(--taxi-yellow); color: var(--dark-bg); font-weight: bold; border: none; padding: 16px; border-radius: 5px; cursor: pointer; text-transform: uppercase; font-size: 1.6rem; transition: background 0.3s; }
.booking-form button:hover { background: #e6b800; }
.reset-map-btn { background: #555; color: white; font-weight: 600; border: none; padding: 14px; border-radius: 5px; cursor: pointer; transition: background 0.3s; margin-top: 10px; font-size: 1.35rem; }
.reset-map-btn:hover { background: #666; }
.form-status { margin-top: 8px; font-size: 1.25rem; }
.form-status.success { color: #8be28b; }
.form-status.error { color: #ff9b9b; }

/* Mapa kontener */
#map { width: 100%; height: 100%; min-height: 300px; border-radius: 8px; background: #333; } /* Ciemne tło póki mapa się nie załaduje */

/* Stopka */
footer { background: var(--dark-bg); color: white; text-align: center; padding: 20px; margin-top: 40px; }
.footer-phone { color: var(--taxi-yellow); text-decoration: none; }
.footer-phone:hover { text-decoration: underline; }

/* Mobile */
@media (max-width: 1024px) {
  :root {
    --header-offset: 130px;
    --header-title-size: 4.6rem;
    --section-title-size: 2.8rem;
    --tagline-size: 1.55rem;
    --nav-link-size: 1.8rem;
    --offer-card-min-height: 200px;
    --offer-card-padding: 22px;
    --offer-card-font-size: 1.25rem;
    --price-item-font-size: 1.5rem;
  }
  body { font-size: var(--mobile-font-size); background: #000000 !important; }
  section { padding: 32px 16px; }
  #oferta { padding-top: 16px; }
  header { padding: 0.75rem 0 0.35rem; position: static; background: #000000 !important; }
  header h1 { font-size: var(--header-title-size); }
  .header-tagline { font-size: var(--tagline-size); margin-top: 30px; }
  .header-tagline-text { word-spacing: 0.28rem; letter-spacing: 0.2px; }
  nav { display: flex; justify-content: center; flex-wrap: wrap; gap: 10px; }
  nav a { margin: 0; font-size: var(--nav-link-size); }
  .header-actions .lang-current { display: none !important; }
  .header-lang-mobile {
    display: flex;
    justify-content: center;
    margin: 6px 0 0;
    padding: 0 12px;
    position: relative;
    z-index: 50;
  }
  /* Napis jak linki w nav — bez „karty”, bez animacji transform (psuje dotyk na części urządzeń) */
  .lang-mobile-btn {
    appearance: none;
    -webkit-appearance: none;
    margin: 0;
    padding: 0;
    border: none;
    background: transparent;
    color: white;
    font-family: inherit;
    font-weight: bold;
    font-size: var(--nav-link-size);
    line-height: inherit;
    cursor: pointer;
    text-align: center;
    text-decoration: none;
    transition: color 0.3s;
    touch-action: manipulation;
    position: relative;
    z-index: 2;
  }
  .lang-mobile-btn:hover,
  .lang-mobile-btn:focus-visible {
    color: var(--taxi-yellow);
  }
  .lang-mobile-btn:focus-visible {
    outline: 2px solid var(--taxi-yellow);
    outline-offset: 3px;
  }
  /*
   * Reset insetów z desktop (position:absolute; top/right) — inaczej cały wiersz tel jest
   * przesunięty względem viewport jak przy sticky (left:0; right:0).
   * Z-index tylko przy .is-sticky — inaczej „warstwa” mogła przechwytywać kliki w nav / English.
   */
  .header-actions {
    position: relative;
    top: auto;
    right: auto;
    left: auto;
    bottom: auto;
    z-index: auto;
    background: transparent;
    width: 100%;
    max-width: 100%;
    padding: 0 12px;
    box-sizing: border-box;
    transform: none;
    flex-direction: row;
    gap: 8px;
    margin: 8px 0 6px;
    display: flex;
    align-items: center;
    justify-content: center;
  }
  .header-phone-btn {
    margin: 0;
    width: 100%;
    max-width: 100%;
    padding: 16px 20px;
    min-height: 86px;
    font-size: 2.3rem;
    line-height: 1;
    display: flex;
    justify-content: center;
    align-items: center;
    text-align: center;
  }
  .header-phone-btn .header-phone-inner {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.35em;
    max-width: 100%;
  }
  .header-phone-btn .phone-icon {
    font-size: 1.95rem;
    line-height: 1;
    flex-shrink: 0;
  }
  .header-phone-btn .phone-number {
    text-align: center;
    white-space: nowrap;
  }
  h2 { font-size: var(--section-title-size); }
  .gallery img { height: 280px; }
  .header-actions.is-sticky {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 300;
    background: #000000;
    padding: 14px 12px;
    margin: 0;
    min-height: 96px;
    overflow: visible;
    display: flex;
    align-items: center;
    justify-content: center;
    box-sizing: border-box;
  }
  .header-actions-spacer { height: 0; }
  .header-actions.is-sticky + .header-actions-spacer { height: 96px; }
  /* Pełna szerokość przycisku tel przy sticky */
  .header-actions.is-sticky .header-phone-btn {
    width: 100%;
    max-width: 100%;
    min-height: 86px;
    padding: 16px 20px;
  }
}

@media (prefers-reduced-motion: reduce) {
  .service-card,
  .service-card::after,
  .header-tagline-text {
    animation: none;
    transition: none;
  }
}

@media (max-width: 480px) {
  header h1 { font-size: 3.6rem; }
  .header-phone-btn { width: 100%; max-width: 100%; justify-content: center; padding: 16px 20px; }
  .price-item { flex-direction: column; align-items: flex-start; gap: 6px; }
  .gallery { grid-template-columns: 1fr; }
  .gallery img { height: 310px; }
}