/* ═══════════════════════════════════════════════════
   EkoAudyt – styles.css
   Bootstrap 5 kompatybilny, zoptymalizowany SEO/UX
   ═══════════════════════════════════════════════════ */

/* ── Typografia i reset ─────────────────────────── */
body {
  font-family: 'Montserrat', sans-serif;
  margin: 0;
  padding: 0;
  box-sizing: border-box;
  color: #28251D;
}

/* ── Skip-to-content (WCAG) ────────────────────── */
.skip-link {
  position: absolute;
  top: -100px;
  left: 1rem;
  z-index: 9999;
  background: #01696F;
  color: #fff;
  padding: 0.5rem 1rem;
  border-radius: 0 0 4px 4px;
  font-weight: 700;
  text-decoration: none;
  transition: top 0.2s;
}
.skip-link:focus {
  top: 0;
}

/* ── Navbar ─────────────────────────────────────── */
.custom-navbar {
  background: linear-gradient(to bottom, #000000, #343a40);
  padding: 10px 0;
  transition: background 0.3s ease;
  width: 100%;
}

.custom-navbar.scrolled {
  background: #000000;
  box-shadow: 0 2px 8px rgba(0,0,0,0.4);
}

.navbar {
  min-height: 60px;
}

.navbar-brand-text {
  font-size: 1.1rem;
  font-weight: 700;
  letter-spacing: 0.02em;
}

.logo img {
  max-width: 100px;
  height: auto;
}

.navbar-nav .nav-link {
  margin-left: 8px;
  color: rgba(255,255,255,0.85) !important;
  font-weight: 600;
  font-size: 0.95rem;
  padding: 0.5rem 0.75rem;
  border-radius: 4px;
  transition: color 0.2s, background 0.2s;
}

.navbar-nav .nav-link:hover,
.navbar-nav .nav-link:focus {
  color: #fff !important;
  background: rgba(255,255,255,0.1);
}

.navbar-nav .nav-link.active {
  color: #fff !important;
  background: rgba(255,255,255,0.15);
}

/* ── Hero / Intro ───────────────────────────────── */
.intro {
  min-height: 100vh;
  display: flex;
  align-items: center;
  overflow: hidden;
 /*  padding-top: 70px; kompensacja fixed navbar */
}

.intro h1 {
  font-size: 2rem;
  font-weight: 700;
  line-height: 1.3;
  margin-bottom: 1rem;
}

.intro p {
  font-size: 1.05rem;
  line-height: 1.7;
  color: #555;
}

/* CTA przyciski */
.btn-contact {
  display: inline-block;
  padding: 0.75rem 1.5rem;
  font-size: 1rem;
  font-weight: 700;
  color: #fff;
  background-color: #01696F;
  border: 2px solid #01696F;
  border-radius: 4px;
  text-align: center;
  text-decoration: none;
  transition: background 0.2s, border-color 0.2s;
  min-height: 44px; /* touch target WCAG */
  min-width: 44px;
}

.btn-contact:hover,
.btn-contact:focus {
  background-color: #0C4E54;
  border-color: #0C4E54;
  color: #fff;
}

.btn-outline-light {
  min-height: 44px;
  min-width: 44px;
}

/* ── Sekcje z animacją wjazdu ───────────────────── */
.hidden-section {
  opacity: 0;
  transform: translateY(40px);
  transition: opacity 0.5s ease, transform 0.5s ease;
}

.hidden-section.visible {
  opacity: 1;
  transform: translateY(0);
}

/* ── Layout pomocniczy ──────────────────────────── */
.container {
  max-width: 1200px;
}

.section-divider {
  border: 1px solid #D4D1CA;
  margin: 2rem 0;
}

/* ── Sekcja kontakt ─────────────────────────────── */
.contact-section {
  display: flex;
  flex-wrap: wrap;
}

.contact-card {
  background: #F7F6F2;
  border: 1px solid #D4D1CA;
  border-radius: 6px;
}

.contact-link {
  color: #01696F;
  text-decoration: none;
  font-weight: 600;
  font-size: 1.05rem;
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  min-height: 44px;
}

.contact-link:hover {
  text-decoration: underline;
  color: #0C4E54;
}

/* ── Opinie ─────────────────────────────────────── */
.testimonial {
  max-width: 620px;
  margin: 20px auto;
  font-style: italic;
  color: #555;
  padding: 1.5rem 2rem;
  background: #F7F6F2;
  border-left: 4px solid #01696F;
  border-radius: 0 6px 6px 0;
}

#testimonials .carousel-control-prev,
#testimonials .carousel-control-next {
  width: 40px;
  color: #343a40;
}

#testimonials .carousel-indicators [data-bs-target] {
  background-color: #343a40;
}

/* ── Kafelki cennikowe ──────────────────────────── */
.pricing-tiles .tile {
  display: block;
  padding: 16px;
  border: 1px solid #D4D1CA;
  border-radius: 6px;
  text-align: center;
  text-decoration: none;
  color: #333;
  transition: transform 0.25s ease, box-shadow 0.25s ease;
  background: #fff;
}

.pricing-tiles .tile:hover {
  transform: translateY(-4px);
  box-shadow: 0 6px 20px rgba(0,0,0,0.10);
}

.pricing-tiles .tile-img {
  width: 100%;
  height: 200px;
  object-fit: cover;
  border-radius: 4px;
  margin-bottom: 12px;
}

.tile-title {
  font-size: 1.1rem;
  font-weight: 700;
  margin-bottom: 6px;
  color: #28251D;
}

.tile-price {
  font-size: 1.25rem;
  font-weight: 700;
  color: #01696F;
  margin-bottom: 4px;
}

.tile-desc {
  font-size: 0.9rem;
  color: #7A7974;
  margin-bottom: 0;
}

.full-width-tile {
  margin: 12px 0;
  padding: 24px;
  border: 1px solid #D4D1CA;
  border-radius: 6px;
  text-align: center;
  background: #F7F6F2;
  transition: transform 0.25s ease;
}

.full-width-tile:hover {
  transform: translateY(-2px);
}

.full-width-tile a {
  text-decoration: none;
  color: inherit;
  display: block;
}

/* ── O nas ──────────────────────────────────────── */
.about-us {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-start;
  gap: 2rem;
}

.about-image img {
  width: 100%;
  height: auto;
  border-radius: 6px;
}

/* ── Footer ─────────────────────────────────────── */
footer {
  border-top: 1px solid #D4D1CA;
}

footer a {
  color: #01696F;
}

footer a:hover {
  color: #0C4E54;
}

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

/* ── Scroll-to-top ─────────────────────────────── */
#scrollToTop {
  position: fixed;
  bottom: 1.5rem;
  right: 1.5rem;
  z-index: 1000;
  width: 44px;
  height: 44px;
  background: #01696F;
  color: #fff;
  border: none;
  border-radius: 50%;
  font-size: 1.2rem;
  cursor: pointer;
  display: none;
  align-items: center;
  justify-content: center;
  box-shadow: 0 3px 10px rgba(0,0,0,0.25);
  transition: background 0.2s, transform 0.2s;
}
#scrollToTop:hover {
  background: #0C4E54;
  transform: translateY(-2px);
}
#scrollToTop.visible {
  display: flex;
}

/* ── Opinie – gwiazdki ──────────────────────────── */
.testimonial-stars {
  color: #f5a623;
  font-size: 1.1rem;
  letter-spacing: 2px;
  margin-bottom: 0.4rem;
}
.testimonial-source {
  font-size: 0.78rem;
  color: #7A7974;
  margin-top: 0.4rem;
  font-style: normal;
}

/* ── Blog – sekcja na stronie głównej ──────────── */
.blog-preview-section .article-card-mini {
  background: #fff;
  border: 1px solid #D4D1CA;
  border-radius: 6px;
  padding: 1.25rem;
  height: 100%;
  transition: box-shadow 0.2s;
}
.blog-preview-section .article-card-mini:hover {
  box-shadow: 0 4px 16px rgba(0,0,0,0.09);
}
.blog-preview-section .article-card-mini h3 {
  font-size: 0.95rem;
  font-weight: 700;
  margin-bottom: 0.4rem;
  line-height: 1.4;
}
.blog-preview-section .article-card-mini h3 a {
  color: #28251D;
  text-decoration: none;
}
.blog-preview-section .article-card-mini h3 a:hover {
  color: #01696F;
}
.blog-preview-section .article-card-mini .meta {
  font-size: 0.78rem;
  color: #7A7974;
  margin-bottom: 0.5rem;
}
.blog-preview-section .article-card-mini .read-link {
  font-size: 0.88rem;
  color: #01696F;
  font-weight: 600;
  text-decoration: none;
}
.blog-preview-section .article-card-mini .read-link:hover {
  text-decoration: underline;
}

/* ── Responsywność ──────────────────────────────── */
@media (max-width: 991px) {
  .intro {
    min-height: auto;
    padding-top: 90px;
    padding-bottom: 3rem;
  }

  .intro h1 {
    font-size: 1.6rem;
  }

  .hero-cta {
    flex-direction: column;
    gap: 0.75rem !important;
  }

  .hero-cta .btn {
    width: 100%;
    text-align: center;
  }

  /* #1-2: Menu hamburger – naprawa ucinania tekstu i widoczności telefonu */
  #navbarNav .navbar-nav {
    padding: 0.5rem 0;
  }
  #navbarNav .nav-link {
    white-space: normal;
    word-break: break-word;
    font-size: 0.9rem;
    padding: 0.5rem 0.5rem;
  }
  #navbarNav .btn-contact {
    white-space: normal;
    font-size: 0.85rem;
    width: 100%;
    text-align: center;
    margin-top: 0.25rem;
    display: block;
  }
  /* Zachowaj numer telefonu w menu mobilnym */
  .navbar-toggler + .collapse .btn-contact {
    display: block !important;
  }
  /* Nazwa marki w navbar – skróć na małych ekranach */
.navbar-brand-text {
  font-size: 0.88rem;
  max-width: 100px;      /* możesz też zwiększyć lub usunąć */
  overflow: visible;      /* albo po prostu usuń tę linię */
  text-overflow: clip;    /* albo usuń całkowicie */
  white-space: normal;    /* pozwala zawijać tekst */
}


@media (max-width: 767px) {
  .intro h1 {
    font-size: 1.4rem;
  }

  .contact-map, .contact-info {
    width: 100%;
    margin-bottom: 1.5rem;
  }

  .pricing-tiles .tile-img {
    height: 160px;
  }
}

@media (max-width: 480px) {
  .intro {
    padding-top: 80px;
  }

  .intro h1 {
    font-size: 1.25rem;
  }

  .testimonial {
    padding: 1rem 1.25rem;
  }

  #scrollToTop {
    bottom: 1rem;
    right: 1rem;
    width: 40px;
    height: 40px;
    font-size: 1rem;
  }
}

@media (min-width: 768px) {
  .about-us {
    flex-wrap: nowrap;
  }

  .contact-map, .contact-info {
    width: 50%;
  }
}

/* ══════════════════════════════════════════════════
   POPRAWKI RESPONSYWNOŚCI – v2
   ══════════════════════════════════════════════════ */

/* ── Hamburger menu – kolor ikony i widoczność ── */
.navbar-toggler {
  border-color: rgba(255,255,255,0.6) !important;
  padding: 6px 10px;
}
.navbar-toggler-icon {
  background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 30 30'%3e%3cpath stroke='rgba(255,255,255,0.95)' stroke-linecap='round' stroke-miterlimit='10' stroke-width='2.5' d='M4 7h22M4 15h22M4 23h22'/%3e%3c/svg%3e") !important;
}
.navbar-toggler:focus {
  box-shadow: 0 0 0 3px rgba(255,255,255,0.35);
}

/* ── Menu mobilne – rozwinięte ──────────────────── */
@media (max-width: 991px) {
  /* Tło rozwiniętego menu */
  #navbarNav {
    background: #1a1a1a;
    border-top: 1px solid rgba(255,255,255,0.12);
    padding: 0.5rem 0.75rem 0.75rem;
    margin-top: 6px;
    border-radius: 0 0 6px 6px;
  }
  /* Linki w menu mobilnym */
  #navbarNav .nav-link {
    padding: 0.6rem 0.75rem !important;
    font-size: 0.95rem !important;
    border-radius: 4px;
    margin: 2px 0;
  }
  /* Przycisk telefonu w menu mobilnym */
  #navbarNav .btn-contact {
    display: block;
    width: 100%;
    text-align: center;
    margin-top: 6px;
    padding: 0.6rem 1rem;
    font-size: 0.95rem;
    white-space: normal;
  }
  /* Nazwa marki w navbar – skróć na małych ekranach 
  .navbar-brand-text {
    font-size: 0.88rem;
    max-width: 150px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
  }*/
  /* Wyrównanie hamburger do prawej */
  .header-content {
    flex-wrap: nowrap !important;
  }
}

/* ── Padding główny (podstrony z fixed navbar) ── */
/* Strony z klasą mt-5 pt-5 na main – zwiększamy padding-top */
.main-page-content {
  padding-top: 90px !important;
}

/* ── Naprawia zacienienie nagłówka przez navbar ── */
/* Artykuły blogowe */
.article-page.container {
  padding-top: 5.5rem !important;
  margin-top: 0 !important;
}
/* Strony podrzędne (O nas, Cennik, Kontakt itp.) */
main.container.mt-5.pt-5 {
  padding-top: 5.5rem !important;
  margin-top: 0 !important;
}
/* Blog strona główna */
.blog-header.pt-5 {
  padding-top: 5.5rem !important;
}

/* ── Czyste Powietrze – hero padding na mobile ── */
.hero-cp {
  padding-top: 6rem !important;
}

/* ── Ogólne: każdy <main> z fixed navbar ────────── */
@media (max-width: 991px) {
  .article-page.container {
    padding-top: 6rem !important;
  }
  main.container.mt-5.pt-5 {
    padding-top: 6rem !important;
  }
  .blog-header.pt-5 {
    padding-top: 6rem !important;
  }
  .hero-cp {
    padding-top: 6.5rem !important;
  }
}

/* ── Responsywność – dodatkowe poprawki ─────────── */
@media (max-width: 575px) {
  /* Karty poziomów dofinansowania */
  .poziom-card { margin-bottom: 1rem; }

  /* Tabela na stronie cennik – nie wychodź poza kontener */
  table { font-size: 0.85rem; }

  /* Sekcja FAQ – lepszy padding na mobile */
  .accordion-button { font-size: 0.9rem; padding: 0.85rem 1rem; }

  /* Stopka lokalnych – zawijaj linki */
  footer p { font-size: 0.82rem; }
}

/* ── Hamburger menu – pełna lista widoczna na <480px ── */
@media (max-width: 480px) {
  #navbarNav {
    max-height: 80vh;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
  }

  #navbarNav .navbar-nav {
    display: flex !important;
    flex-direction: column !important;
    width: 100%;
  }

  #navbarNav .nav-item {
    display: block !important;
    width: 100%;
  }

  #navbarNav .nav-link,
  #navbarNav .btn-contact {
    display: block !important;
    width: 100% !important;
    visibility: visible !important;
    opacity: 1 !important;
  }
}
