/*
 * Sekcje strony głównej. Ładowany po main.css i site.css.
 */

/*----------------------------------------*/
/*  Dlaczego warto nam zaufać (.rs-feature-two)
/*----------------------------------------*/

/* Karty: równa wysokość, zaokrąglenie i ramka jak w formularzach */
.rs-feature-two .rs-feature-item {
  height: 100%;
  border: 1px solid #e2e6eb;
  border-radius: 8px;
}

/* Ikona na górze: ikona -> nagłówek -> opis */
.rs-feature-two .rs-feature-icon {
  margin: 0 0 30px;
  border-radius: 8px;
}

/*----------------------------------------*/
/*  Poznaj naszą ofertę (.offer-section): karuzela kart
/*----------------------------------------*/

/* Kolumny: nagłówek 40%, karuzela 60% (od lg) */
@media (min-width: 992px) {
  .offer-section .offer-col-intro {
    flex: 0 0 40%;
    max-width: 40%;
  }

  .offer-section .offer-col-slider {
    flex: 0 0 60%;
    max-width: 60%;
  }
}

/* Karty: równa wysokość, przycisk przyklejony do dołu */
.offer-section .swiper-slide {
  height: auto;
}

.offer-section .rs-services-item {
  display: flex;
  flex-direction: column;
  height: 100%;
  border-radius: 8px;
  overflow: hidden;
}

.offer-section .rs-services-content {
  display: flex;
  flex: 1;
  flex-direction: column;
}

.offer-section .rs-services-number {
  margin-top: auto;
}

/* Podkreślenie „Poznaj ofertę” (z .underline w main.css): linia 2px, 8px pod tekstem */
.offer-section .rs-services-text-btn.underline a {
  padding-bottom: 10px;
  background-position: 0 100%;
}

/*----------------------------------------*/
/*  Okrągły przycisk ze strzałką (.offer-arrow-btn), jak przycisk
/*  przewijania do góry. Oferta i poradniki.
/*----------------------------------------*/
.offer-arrow-btn {
  display: inline-flex;
  flex: none;
  align-items: center;
  justify-content: center;
  width: 46px;
  height: 46px;
  padding: 0;
  border: 0;
  border-radius: 50%;
  background: var(--rs-theme-blue);
  box-shadow: 0 0 2px rgba(0, 0, 0, 0.2);
  color: var(--rs-white);
  font-size: 16px;
  cursor: pointer;
  transition: background 0.3s ease, color 0.3s ease;
}

.offer-arrow-btn i {
  transition: transform 0.3s ease;
}

/* Hover: strzałka w prawo unosi się o 45°, strzałka w lewo symetrycznie */
.offer-section .rs-services-btn-wrapper:hover .offer-arrow-btn i,
.offer-section .rs-services-btn-wrapper:focus-within .offer-arrow-btn i,
.guide-card:hover .offer-arrow-btn i,
.guide-card:focus-within .offer-arrow-btn i,
.rs-swiper-btn.offer-arrow-btn:hover i,
.rs-swiper-btn.offer-arrow-btn:focus-visible i {
  transform: rotate(-45deg);
}

.rs-swiper-btn.offer-arrow-btn.is-prev:hover i,
.rs-swiper-btn.offer-arrow-btn.is-prev:focus-visible i {
  transform: rotate(45deg);
}

/* Nawigacja karuzeli: nadpisuje kolory z .rs-swiper-btn */
.rs-swiper-btn.offer-arrow-btn:hover {
  background: var(--rs-theme-blue);
  color: var(--rs-white);
}

/*----------------------------------------*/
/*  O firmie z zakładkami (.rs-about-three)
/*----------------------------------------*/
.rs-about-three .rs-about-thumb {
  border-radius: 8px;
}

/* Zakładki jako pastylki z odstępem 1rem */
.rs-about-three .rs-about-tab .nav {
  gap: 1rem;
}

.rs-about-three .rs-about-tab .nav-link {
  border-radius: 999px;
}

/* Niebieski pasek z main.css zamieniony na obramowanie z każdej strony.
   Bez rozsuwania (scaleX z main.css): obramowanie po prostu się pojawia. */
.rs-about-three .rs-about-tab .nav-link::after,
.rs-about-three .rs-about-tab .nav-link:hover::after,
.rs-about-three .rs-about-tab .nav-link.active::after {
  inset: 0;
  width: auto;
  height: auto;
  border: 2px solid var(--rs-theme-blue);
  border-radius: inherit;
  background: none;
  transform: none;
}

.rs-about-three .rs-about-tab .nav-link::after {
  opacity: 0;
  transition: opacity 0.2s ease;
}

.rs-about-three .rs-about-tab .nav-link:hover::after,
.rs-about-three .rs-about-tab .nav-link.active::after {
  opacity: 1;
}

/* Pionowe separatory między zakładkami są zbędne przy odstępie */
.rs-about-three .rs-about-tab .nav-item:not(:last-child) .nav-link::before {
  content: none;
}

/* Desktop: pastylki rozciągnięte do prawej krawędzi kolumny */
@media (min-width: 1200px) {
  .rs-about-three .rs-about-tab .nav-item {
    flex: 1;
  }

  .rs-about-three .rs-about-tab .nav-link {
    width: 100%;
  }
}

/*----------------------------------------*/
/*  FAQ (.rs-faq-two)
/*----------------------------------------*/
.rs-faq-two .rs-faq-thumb {
  border-radius: 8px;
}

/*----------------------------------------*/
/*  Poradniki (.guides-section): karuzela kart
/*----------------------------------------*/
.guides-section .guides-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: flex-end;
  gap: 20px;
}

@media (max-width: 991px) {
  .guides-section .guides-actions {
    justify-content: flex-start;
  }
}

.guides-section .swiper-slide {
  height: auto;
}

/* Niebieskie tło wjeżdża od dołu na hover: druga warstwa tła rośnie od 0 do 100% */
.guide-card {
  position: relative;
  display: flex;
  flex-direction: column;
  height: 100%;
  overflow: hidden;
  border-radius: 8px;
  background:
    linear-gradient(var(--rs-theme-blue), var(--rs-theme-blue)) bottom / 100% 0
      no-repeat,
    #f7f7f7;
  transition: background-size 0.5s ease;
}

.guide-card:hover,
.guide-card:focus-within {
  background-size: 100% 100%, auto;
}

.guide-card-thumb {
  overflow: hidden;
}

.guide-card-thumb img {
  display: block;
  width: 100%;
  height: 240px;
  object-fit: cover;
  transition: transform 0.5s ease;
}

.guide-card:hover .guide-card-thumb img {
  transform: scale(1.05);
}

.guide-card-content {
  display: flex;
  flex: 1;
  flex-direction: column;
  padding: 30px;
}

.guide-card-title {
  margin-bottom: 15px;
  font-size: 22px;
  line-height: 1.35;
}

.guide-card-title a {
  color: #0c3c61;
  transition: color 0.3s ease;
}

/* Cała karta jest klikalna (link z tytułu rozciągnięty na kartę) */
.guide-card-title a::after {
  position: absolute;
  inset: 0;
  z-index: 3;
  content: "";
}

.guide-card-title a:focus-visible {
  outline: none;
}

.guide-card:focus-within {
  outline: 2px solid var(--rs-theme-blue);
  outline-offset: 3px;
}

.guide-card-descrip {
  margin-bottom: 25px;
  transition: color 0.3s ease;
}

.guide-card-cta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 15px;
  margin-top: auto;
}

.guide-card-cta-text {
  font-weight: 500;
  color: var(--rs-title-primary);
  transition: color 0.3s ease;
}

/* Hover: białe teksty na niebieskim tle, przycisk odwrócony (białe koło) */
.guide-card:hover .guide-card-title a,
.guide-card:hover .guide-card-descrip,
.guide-card:hover .guide-card-cta-text,
.guide-card:focus-within .guide-card-title a,
.guide-card:focus-within .guide-card-descrip,
.guide-card:focus-within .guide-card-cta-text {
  color: var(--rs-white);
}

.guide-card:hover .offer-arrow-btn,
.guide-card:focus-within .offer-arrow-btn {
  background: var(--rs-white);
  color: var(--rs-theme-blue);
}

@media (prefers-reduced-motion: reduce) {
  .offer-arrow-btn,
  .offer-arrow-btn i,
  .guide-card,
  .guide-card-thumb img {
    transition: none;
  }
}

/*----------------------------------------*/
/*  Podstrona Oferta: siatka kart w stylu oferty ze strony głównej
/*  (.offer-grid + .rs-services-three + .offer-section)
/*----------------------------------------*/
.offer-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 30px;
  margin: 0 0 48px;
}

@media (max-width: 767px) {
  .offer-grid {
    grid-template-columns: 1fr;
  }
}

/* Na białym tle podstrony karta potrzebuje ramki (na stronie głównej leży na szarym tle) */
.offer-grid .rs-services-item {
  border: 1px solid #e2e6eb;
}

/* Tytuł karty jak h5 na stronie głównej (nadpisuje .cement-prose h3) */
.cement-prose .offer-grid .rs-services-title {
  margin: 0 0 12px;
  font-size: var(--rs-fs-h5);
  font-weight: var(--rs-fw-bold);
  line-height: 1.4;
}

.cement-prose .offer-grid .descrip {
  margin-bottom: 20px;
}

/*----------------------------------------*/
/*  Podstrona Poradnik: siatka kart jak w sekcji poradników na stronie głównej
/*----------------------------------------*/
.guides-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 30px;
  margin: 0 0 48px;
}

@media (max-width: 991px) {
  .guides-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 767px) {
  .guides-grid {
    grid-template-columns: 1fr;
  }
}

/* Tytuł i opis karty jak na stronie głównej (nadpisuje .cement-prose h3 i p) */
.cement-prose .guide-card-title {
  margin: 0 0 15px;
  font-size: 22px;
  font-weight: var(--rs-fw-bold);
  line-height: 1.35;
}

.cement-prose .guide-card-descrip {
  margin-bottom: 25px;
}
