/* ===== BANNER ===== */
.banner {
   width: 100%;
   max-width: 100%;
   min-height: 200px;
   height: auto;
   background-color: black;
   display: flex;
   align-items: center;
   justify-content: flex-start;
   position: relative;
   overflow: hidden;
   padding: 20px 0;
   margin-top: -10px;
}

.banner::before {
   content: '';
   position: absolute;
   top: 0;
   left: 0;
   right: 0;
   bottom: 0;
   background: radial-gradient(ellipse at center, rgba(255,255,255,0.05) 0%, transparent 70%);
   pointer-events: none;
}

.banner-content {
   margin-left: calc((100vw - 1700px) / 2);
   z-index: 2;
   display: flex;
   flex-direction: column;
   align-items: flex-start;
   max-width: 100%;
   padding-right: 40px;
   box-sizing: border-box;
   width: 100%;
}

.banner h1 {
   color: #ffffff;
   font-size: 2.8rem;
   font-weight: 700;
   letter-spacing: -1px;
   margin-bottom: 10px;
   text-shadow: 2px 2px 4px rgba(0,0,0,0.5);
   white-space: nowrap;
   max-width: 100%;
}

.breadcrumb {
   display: flex;
   align-items: center;
   gap: 8px;
   flex-wrap: wrap;
   white-space: nowrap;
   max-width: 100%;
}

.breadcrumb a,
.breadcrumb .separator,
.breadcrumb .current {
   white-space: nowrap;
}

.breadcrumb a {
   color: #cccccc;
   text-decoration: none;
   font-size: 0.9rem;
   transition: color 0.3s ease;
}

.breadcrumb a:hover {
   color: #ffffff;
}

.breadcrumb .separator {
   color: #666666;
   font-size: 0.8rem;
}

.breadcrumb .current {
   color: #ffffff;
   font-weight: 500;
}

@media (min-width: 1701px) {
   .banner-content {
       margin-left: calc((100vw - 1700px) / 2 + 20px);
   }
}

@media (max-width: 1700px) {
   .banner-content {
       margin-left: calc((100vw - 1700px) / 2 + 20px);
       margin-right: 20px;
   }
}

/* PC: wyrównanie do kontenera nawigacji (max-width:1700px + padding:20px) */
@media (min-width: 993px) {
   .banner-content {
       margin-left: max(20px, calc((100vw - 1700px) / 2 + 20px));
   }
}

@media (max-width: 1400px) {
   .banner h1 { font-size: 2.4rem; }
   .breadcrumb a, .breadcrumb .current { font-size: 0.85rem; }
}

@media (max-width: 1200px) {
   .banner h1 { font-size: 2.2rem; }
   .breadcrumb a, .breadcrumb .current { font-size: 0.8rem; }
   .breadcrumb { gap: 6px; }
}

@media (max-width: 992px) {
   .banner { min-height: 150px; padding: 15px 0; margin-top: 10px; }
   .banner-content { margin-left: 20px; margin-right: 20px; }
   .banner h1 { font-size: 2rem; white-space: normal; word-wrap: break-word; }
   .breadcrumb { white-space: normal; flex-wrap: wrap; }
   .breadcrumb a, .breadcrumb .separator, .breadcrumb .current { white-space: normal; font-size: 0.8rem; }
   .contact-hero-strip{margin-top: 15px !important;}
}

@media (max-width: 768px) {
   .banner { min-height: 120px; padding: 15px 0; }
   .banner-content { margin-left: 15px; margin-right: 15px; }
   .banner h1 { font-size: 1.6rem; line-height: 1.3; white-space: normal; }
   .breadcrumb { gap: 5px; }
   .breadcrumb a, .breadcrumb .current { font-size: 0.75rem; }
   .contact-hero-strip{margin-top: 30px !important;}
   .contact-col-departments{margin-top: 30px;}
}

@media (max-width: 480px) {
   .banner { min-height: 100px; padding: 12px 0; }
   .banner-content { margin-left: 10px; margin-right: 10px; }
   .banner h1 { font-size: 1.3rem; margin-bottom: 5px; }
   .breadcrumb a, .breadcrumb .current { font-size: 0.7rem; }
}

@media (max-width: 360px) {
   .banner h1 { font-size: 1.1rem; }
}

/* ===== HERO STRIP ===== */
.contact-hero-strip {
  width: 100%;
  background: linear-gradient(to left, #e1001d 0%, #03294c 100%);
  padding: 25px 0;
  margin-top: -10px;
}

.contact-hero-inner {
  max-width: 1700px;
  margin: 0 auto;
  padding: 0 20px;
  display: grid;
  grid-template-columns: 1fr auto 1fr auto 1fr auto 1fr;
  align-items: center;
  min-height: 90px;
}

.contact-hero-item {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 20px 40px;
}

.contact-hero-divider {
  width: 1px;
  height: 40px;
  background: rgba(255, 255, 255, 0.25);
}

.contact-hero-icon {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.15);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.contact-hero-text {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.contact-hero-label {
  font-size: 0.75rem;
  color: rgba(255, 255, 255, 0.7);
  font-weight: 400;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.contact-hero-value {
  font-size: 0.92rem;
  color: #ffffff;
  font-weight: 600;
  text-decoration: none;
  line-height: 1.3;
}

.contact-hero-value:hover {
  text-decoration: underline;
}

@media (max-width: 992px) {
  .contact-hero-inner {
    grid-template-columns: 1fr 1fr;
    gap: 0;
    align-items: stretch;
  }
  .contact-hero-divider {
    display: none;
  }
  .contact-hero-item {
    position: relative;
    padding: 18px 0 18px 60px;
    border-bottom: none;
    justify-content: flex-start;
    align-items: center;
    width: 100%;
  }
  /* Lewa kolumna: linia od pozycji burgera */
  .contact-hero-item:nth-child(5)::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 60px;
    right: 0;
    height: 1px;
    background: rgba(255,255,255,0.2);
  }
  /* Prawa kolumna: linia od lewej krawędzi — łączy się z lewą */
  .contact-hero-item:nth-child(7)::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 1px;
    background: rgba(255,255,255,0.2);
  }
  /* Godziny (nth-child 5) i Adres (nth-child 7) na górze */
  .contact-hero-item:nth-child(5) { order: 1; }
  .contact-hero-item:nth-child(7) { order: 2; }
  /* Telefon i Email na dole */
  .contact-hero-item:nth-child(1) { order: 3; }
  .contact-hero-item:nth-child(3) { order: 4; }
}

@media (max-width: 768px) {
  .contact-hero-inner {
    grid-template-columns: 1fr;
    align-items: stretch;
  }
  .contact-hero-item {
    position: relative;
    justify-content: flex-start;
    align-items: center;
    padding: 16px 0 16px 20px;
    border-bottom: none !important;
    order: unset !important;
  }
  /* Linia od pozycji burgera (20px) na mobile */
  .contact-hero-item::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 20px;
    right: 0;
    height: 1px;
    background: rgba(255,255,255,0.2);
  }
  .contact-hero-item:last-of-type::after {
    display: none;
  }
  /* Usuń linię z poprzedniego breakpointu */
  .contact-hero-item:nth-child(5)::after,
  .contact-hero-item:nth-child(7)::after {
    left: 20px;
  }
}

/* ===== ZMIENNE ===== */
:root {
  --brand-red: #e1001d;
  --brand-blue: #03294c;
  --brand-gray: #f8f8f8;
  --brand-gradient: linear-gradient(to left, #e1001d 0%, #03294c 100%);
}

/* ===== LAYOUT GŁÓWNY ===== */
.contact-page {
  max-width: 1600px;
  margin: 40px auto;
  padding: 0 20px 60px;
}

.contact-main {
  display: grid;
  grid-template-columns: 1.4fr 1fr;
  gap: 28px;
  align-items: start;
}

/* ===== NIP BADGE ===== */
.company-nip-badge {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 12px 18px;
  background: white;
  border-radius: 12px;
  border: 1px solid #e2e8f0;
  margin-bottom: 24px;
  flex-wrap: wrap;
}

.company-nip-badge-name {
  font-size: 0.88rem;
  font-weight: 700;
  color: #1a2a3a;
}

.company-nip-badge-sep {
  color: #ccc;
  font-size: 0.9rem;
}

.company-nip-badge-nip {
  font-size: 0.85rem;
  color: #666;
}

.contact-card-sticky {
  position: sticky;
  top: 100px;
}

/* ===== KARTY ===== */
.contact-card {
  background: var(--brand-gray);
  border-radius: 20px;
  padding: 32px;
  margin-bottom: 24px;
  border: none;
}

.contact-card:last-child {
  margin-bottom: 0;
}

.card-title {
  font-size: 1.3rem;
  font-weight: 700;
  color: #333;
  margin-bottom: 20px;
}

.card-subtitle {
  font-size: 0.88rem;
  color: #666;
  margin-bottom: 20px;
  margin-top: -12px;
}

/* ===== DANE FIRMY ===== */
.company-info {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.info-row {
  display: flex;
  align-items: flex-start;
  gap: 14px;
}

.info-icon {
  width: 38px;
  height: 38px;
  border-radius: 50%;
  background: var(--brand-gradient);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.info-label {
  font-size: 0.78rem;
  font-weight: 700;
  color: #333;
  margin-bottom: 2px;
}

.info-value {
  font-size: 0.88rem;
  color: #4a5568;
  line-height: 1.5;
}

/* ===== KONTAKT DO DZIAŁÓW ===== */
.departments {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.dept {
  background: white;
  border-radius: 12px;
  border: 1px solid #e8ecf0;
  padding: 16px 20px;
  display: flex;
  align-items: center;
  gap: 0;
  transition: box-shadow 0.2s;
}

.dept:hover {
  box-shadow: 0 2px 10px rgba(0,0,0,0.06);
}

.dept-header {
  display: flex;
  align-items: center;
  gap: 12px;
  min-width: 220px;
  flex-shrink: 0;
  padding-right: 20px;
  border-right: 1px solid #e8ecf0;
  margin-bottom: 0;
}

.dept-icon {
  width: 34px;
  height: 34px;
  border-radius: 50%;
  background: var(--brand-gradient);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.dept-icon svg {
  width: 16px;
  height: 16px;
}

.dept-name {
  font-size: 0.88rem;
  font-weight: 700;
  color: #333;
}

/* Wiele osób — grid dla wyrównania kolumn */
.dept-persons {
  flex: 1;
  padding-left: 20px;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.dept-persons .dept-person {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  gap: 10px;
}

/* Pojedyncza osoba */
.dept > .dept-person {
  flex: 1;
  padding-left: 20px;
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  gap: 10px;
}

.person-name {
  font-size: 0.85rem;
  font-weight: 600;
  color: #2d3748;
}

.dept-person a {
  font-size: 0.84rem;
  color: #4a5568;
  text-decoration: none;
  white-space: nowrap;
}

.dept-person a[href^="mailto:"] {
  justify-self: end;
}

.dept-person a[href^="tel:"] {
  justify-self: center;
}

.dept-person a:hover {
  color: var(--brand-red);
  text-decoration: underline;
}

/* ===== FORMULARZ ===== */
.contact-col-form .contact-card {
  position: sticky;
  top: 100px;
}

ul li {
  list-style: none;
}

.form-group {
  margin-bottom: 12px;
}

.form-group label {
  display: block;
  margin-bottom: 4px;
  font-weight: 400;
  color: #2d3748;
  font-size: 0.85rem;
}

.form-group input:not([type="file"]),
.form-group textarea {
  width: 100%;
  padding: 8px 12px;
  border: 1px solid #e2e8f0;
  border-radius: 8px;
  font-size: 0.85rem;
  transition: border-color 0.3s ease;
  background: white;
}

/* ===== FILESTYLE WIDGET ===== */
.bootstrap-filestyle.input-group {
  width: 100%;
  display: flex !important;
  align-items: center;
  border: 1px solid #e2e8f0;
  border-radius: 10px;
  overflow: hidden;
  background: white;
}
.bootstrap-filestyle .form-control {
  border: none !important;
  border-radius: 0 !important;
  box-shadow: none !important;
  padding: 9px 14px !important;
  font-size: 0.84rem !important;
  background: transparent !important;
  color: #555;
  flex: 1;
  min-width: 0;
  height: auto !important;
}
.bootstrap-filestyle .form-control::placeholder {
  color: #aaa;
}
.group-span-filestyle {
  display: inline-flex !important;
  align-items: center;
  flex-shrink: 0;
}
.group-span-filestyle .btn-default {
  background: var(--brand-gradient) !important;
  color: white !important;
  border: none !important;
  border-radius: 8px !important;
  padding: 7px 16px !important;
  font-size: 0.82rem !important;
  font-weight: 600 !important;
  text-transform: none !important;
  white-space: nowrap;
  margin: 4px !important;
  cursor: pointer;
  transition: opacity 0.2s;
  line-height: 1.4 !important;
}
.group-span-filestyle .btn-default:hover {
  opacity: 0.88;
}
.group-span-filestyle .icon-span-filestyle {
  display: none;
}

.form-group input:focus,
.form-group textarea:focus {
  outline: none;
  border-color: var(--brand-blue);
}

.form-group textarea {
  resize: vertical;
  min-height: 80px;
}

.form-control-select {
  border: 1px solid #e2e8f0;
  border-radius: 8px;
  padding: 8px 35px 8px 12px;
  font-size: 0.85rem;
  width: 100%;
  appearance: none;
  -webkit-appearance: none;
  background: white;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath fill='%232d3748' d='M6 9L1 4h10z'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 12px center;
}

.form-control-select:focus {
  outline: none;
  border-color: var(--brand-blue);
}

.contact-page .contact-col-form h3,
.contact-page .contact-col-form .card-title {
  color: #333 !important;
}

#file-upload {
  border: 1px solid #e2e8f0;
  border-radius: 8px;
  padding: 8px;
  font-size: 0.85rem;
  width: 100%;
  cursor: pointer;
  background: white;
}

#file-upload::file-selector-button,
#file-upload::-webkit-file-upload-button {
  background: var(--brand-gradient);
  color: white;
  padding: 6px 16px;
  border: none;
  border-radius: 25px;
  font-size: 0.82rem;
  cursor: pointer;
  margin-right: 10px;
}

.btn-primary[type="submit"],
.submit-btn {
  background: var(--brand-gradient);
  color: white;
  padding: 12px 24px;
  border: none;
  border-radius: 25px;
  font-weight: 500;
  cursor: pointer;
  width: 100%;
  font-size: 0.9rem;
  margin-top: 16px;
  display: block;
  transition: opacity 0.2s;
}

.btn-primary[type="submit"]:hover,
.submit-btn:hover {
  opacity: 0.9;
}

.alert-danger {
  background-color: rgba(204, 36, 15, 0.1);
  border: 1px solid #cc240f;
  color: #a70000;
  border-radius: 8px;
  padding: 10px 15px;
  margin-bottom: 16px;
  font-size: 0.85rem;
}

.alert-success {
  background-color: #e6ffed;
  border: 1px solid #28a745;
  color: #155724;
  border-radius: 8px;
  padding: 10px 15px;
  margin-bottom: 16px;
  font-size: 0.85rem;
}

.form-control-comment {
  display: none;
}

/* ===== MAPA ===== */
.contact-map-section {
  margin-top: 24px;
}

.map-wrapper {
  position: relative;
  width: calc(100vw - 80px);
  max-width: 1600px;
  height: 420px;
  border-radius: 20px;
  overflow: hidden;
  margin: 90px auto 0;
  left: 50%;
  transform: translateX(-50%);
}

.map-wrapper iframe {
  width: 100%;
  height: 100%;
  border: none;
  filter: grayscale(100%) opacity(0.4);
}

.map-pin-label {
  position: absolute;
  bottom: 20px;
  left: 50%;
  transform: translateX(-50%);
  background: white;
  padding: 8px 20px;
  border-radius: 25px;
  font-size: 0.88rem;
  font-weight: 600;
  color: var(--brand-blue);
  display: flex;
  align-items: center;
  gap: 6px;
  box-shadow: 0 4px 16px rgba(0,0,0,0.15);
  white-space: nowrap;
}

.mobile-map-toggle {
  display: none;
}

.show-map-btn {
  background: var(--brand-gradient);
  color: white;
  padding: 10px 20px;
  border: none;
  border-radius: 25px;
  font-size: 0.88rem;
  cursor: pointer;
  width: 100%;
  margin-top: 16px;
}

.mobile-map {
  width: 100%;
  height: 260px;
  margin-top: 12px;
  border-radius: 12px;
  overflow: hidden;
  display: none;
}

.mobile-map iframe {
  width: 100%;
  height: 100%;
  border: none;
}

/* ===== RESPONSIVE ===== */

/* Telefony obok imion */
@media (max-width: 1280px) {
  .dept-persons .dept-person,
  .dept > .dept-person {
    grid-template-columns: 100px auto 1fr;
  }
  .dept-person a[href^="tel:"] {
    justify-self: start;
  }
}

/* Formularz pod działami */
@media (max-width: 1090px) {
  .contact-main {
    grid-template-columns: 1fr;
  }
  .contact-card-sticky,
  .contact-col-form .contact-card {
    position: static;
  }
}

@media (max-width: 768px) {
  .contact-page {
    margin: 20px auto;
    padding: 0 12px 40px;
  }

  .contact-card {
    padding: 22px 18px;
  }

  .dept {
    flex-direction: column;
    align-items: flex-start;
  }

  .dept-header {
    border-right: none;
    border-bottom: 1px solid #e8ecf0;
    padding-right: 0;
    padding-bottom: 12px;
    width: 100%;
    min-width: unset;
  }

  .dept > .dept-person,
  .dept-persons {
    padding-left: 0;
    padding-top: 12px;
    width: 100%;
  }

  .dept-persons .dept-person,
  .dept > .dept-person {
    grid-template-columns: 1fr;
    gap: 3px;
  }

  .dept-person a[href^="tel:"],
  .dept-person a[href^="mailto:"] {
    justify-self: start;
  }

  .dept-persons {
    gap: 10px;
  }

  .dept-persons .dept-person + .dept-person {
    border-top: 1px solid #f0f0f0;
    padding-top: 10px;
  }

  .map-wrapper {
    display: none;
  }

  .mobile-map-toggle {
    display: block;
  }

  .show-map-btn {
    display: none;
  }

  .mobile-map {
    display: block !important;
  }

  .mobile-map iframe {
    filter: grayscale(1);
  }
}
