/*
Theme Name: ICF Karting
Text Domain: icfkarting
Theme URI: https://example.com
Author: IP-IT
Description: Motyw WordPress dla toru kartingowego ICF
Version: 1.0
Text Domain: icfkarting
*/

/* ====== RESET / BAZA ====== */

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  font-family: "Open Sans", system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  font-size: 16px;
  line-height: 1.6;
  color: #666;
  background-color: #ffffff;
}

img {
  max-width: 100%;
  height: auto;
  display: block;
}

a {
  color: #e63946;
  text-decoration: none;
}

a:hover,
a:focus {
  text-decoration: underline;
}

/* ====== LAYOUT ====== */

.container {
  width: min(1200px, 100% - 32px);
  margin: 0 auto;
}

.section {
  padding: 64px 0;
}

.section:nth-of-type(even) {
  background-color: #fff;
}

.row {
  display: flex;
  /* flex-wrap: wrap; */
  gap: 100px;
}

/* kolumny (flex) */
.col-1-2 { flex: 0 0 48%; max-width: 48%; }
.col-2-5 { flex: 0 0 30%; max-width: 30%; }
.col-3-5 { flex: 0 0 70%; max-width: 70%; }
.col-1-3 { flex: 0 0 31%; max-width: 31%; }

/* ====== NAGŁÓWEK ====== */

.site-header {
  position: sticky;
  top: 0;
  z-index: 1000;
  background: rgba(0, 0, 0, 0.9);
  backdrop-filter: blur(8px);
  color: #fff;
}

.site-header .inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 0;
}

.site-logo img {
  max-height: 60px;
}

/* menu desktop */
.main-nav ul {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  gap: 24px;
}

.main-nav a {
  color: #fff;
  font-weight: 600;
  text-transform: uppercase;
  font-size: 14px;
  letter-spacing: 0.05em;
}

.main-nav a:hover {
  color: #f1faee;
}

/* przycisk mobilny */
.mobile-toggle {
  display: none;
  background: none;
  border: 1px solid #fff;
  color: #fff;
  padding: 6px 12px;
  border-radius: 4px;
  cursor: pointer;
}

/* ====== HERO ====== */

.hero {
  position: relative;
  height: 80vh;
  min-height: 480px;
  color: #fff;
  overflow: hidden;
}

.hero video,
.hero img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.hero::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(120deg, rgba(0,0,0,0.75), rgba(0,0,0,0.4));
}

.hero .hero-content {
  position: relative;
  z-index: 1;
  height: 100%;
  max-width: 640px;
}

.hero h1 {
  font-size: clamp(32px, 4vw, 48px);
  margin: 0 0 16px;
}

.hero p {
  font-size: 18px;
  max-width: 540px;
}

/* ====== PRZYCISKI ====== */

.btn,
button.btn,
input[type="submit"].btn {
  display: inline-block;
  padding: 12px 28px;
  border-radius: 999px;
  border: none;
  background: linear-gradient(135deg, #e63946, #ff7b00);
  color: #fff;
  font-weight: 700;
  font-size: 14px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  cursor: pointer;
  transition: transform 0.15s ease, box-shadow 0.15s ease, opacity 0.15s ease;
}

.btn:hover {
  text-decoration: none;
  transform: translateY(-1px);
  box-shadow: 0 8px 18px rgba(0,0,0,0.25);
  opacity: 0.96;
}

/* ====== SEKCJA INFO (GOKARTY) ====== */

.blurb {
  text-align: center;
}

.blurb img {
  margin: 0 auto 8px;
  max-width: 72px;
}

.blurb h4 {
  margin: 0;
  font-size: 16px;
  text-transform: uppercase;
}

/* ====== PROMO ====== */

.section h2 {
  font-size: 28px;
  margin-top: 0;
  color: #222;
}

.section h3 {
  font-size: 22px;
}

.section p {
  margin-bottom: 1em;
}

/* ====== AKTUALNOŚCI / BLOG ====== */

.posts-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 24px;
}

.post-card {
  border-radius: 12px;
  overflow: hidden;
  box-shadow: 0 8px 24px rgba(0,0,0,0.08);
  background: #fff;
  display: flex;
  flex-direction: column;
  height: 100%;
}

.post-card img {
  width: 100%;
  height: 180px;
  object-fit: cover;
}

.post-card .post-body {
  padding: 16px 18px 20px;
}

.post-card h4 {
  margin: 0 0 8px;
}

.post-card h4 a {
  color: #111;
}

.post-card h4 a:hover {
  color: #e63946;
}

/* ====== STOPKA ====== */

.site-footer {
  background: #111;
  color: #eee;
  padding: 40px 0 24px;
  margin-top: 48px;
}

.footer-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 24px;
  margin-bottom: 16px;
}

.footer-logo img {
  max-height: 50px;
  margin-bottom: 8px;
}

.footer-col h4 {
  margin-top: 0;
  margin-bottom: 8px;
  font-size: 15px;
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

.site-footer a {
  color: #f1faee;
}

.site-footer a:hover {
  color: #ffb703;
}

/* ====== WORDPRESS PODSTAWOWE KLASY ====== */

.wp-block-image img,
.entry-content img {
  height: auto;
}

/* Admin bar offset dla sticky headera */
body.admin-bar .site-header {
  top: 32px;
}

/* ====== RESPONSYWNOŚĆ ====== */

@media (max-width: 992px) {
  .col-1-2,
  .col-2-5,
  .col-3-5,
  .col-1-3 {
    flex: 0 0 100%;
    max-width: 100%;
  }
}

@media (max-width: 768px) {

  .site-header .inner {
    padding-inline: 0;
  }

  .main-nav {
    display: none;
    position: absolute;
    inset-inline: 0;
    top: 100%;
    background: rgba(0,0,0,0.96);
  }

  .main-nav ul {
    flex-direction: column;
    padding: 12px 16px 16px;
    gap: 12px;
  }

  .mobile-toggle {
    display: inline-flex;
    align-items: center;
    gap: 8px;
  }

  /* jeśli w JS dodasz klasę .nav-open na body lub na headerze,
     pokaż menu: */
  body.nav-open .main-nav {
    display: block;
  }

  .hero {
    height: 70vh;
    min-height: 420px;
  }
}

.hero {
  position: relative;
  min-height: 100vh;
  overflow: hidden;
  color: #fff;
}

/* Video w tle */

.hero__video-wrapper {
  position: absolute;
  inset: 0;
  z-index: 0;
  overflow: hidden;
}

.hero__video {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

/* Ciemne „sitko” na wideo */

.hero__overlay {
  position: absolute;
  inset: 0;
  background: radial-gradient(circle, rgba(0,0,0,0.1) 0, rgba(0,0,0,0.9) 70%);
  mix-blend-mode: multiply;
  z-index: 1;
}

/* Treść w hero */

.hero__inner {
  position: relative;
  z-index: 2;
  max-width: 1200px;
  padding: 100px 10px 50px;
}

.hero__inner h1 {
  font-size: 5.5rem;            
  line-height: 1.05;
  margin-bottom: 1.8rem;
  font-weight: 700;
}

.hero__inner p {
  font-size: 1.125rem;
  line-height: 1.6;
  max-width: 600px;
  margin-bottom: 2.5rem;
}

.hero__inner p span {
  text-decoration: underline;
}

.hero__buttons {
  display: flex;
  flex-wrap: wrap;
  gap: 1.5rem;
}

/* Przyciski */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 1rem 2.5rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .05em;
  border: none;
  cursor: pointer;
  text-decoration: none;
}

/* duży biały owal – TORY KARTINGOWE */

.btn--oval {
  background: #fff;
  color: #e02b20;
  border-radius: 999px;
  font-size: 1.1rem;
}

/* czerwony prostokąt – Nasze gokarty */

.btn--secondary {
  background: #e02b20;
  color: #fff;
  border-radius: 4px;
}

/* Responsywność */

@media (max-width: 980px) {
  .hero__inner {
    padding-top: 120px;
  }
  .hero__inner h1 {
    font-size: 3rem;
  }
}

@media (max-width: 600px) {
  .hero__inner h1 {
    font-size: 2.4rem;
  }
  .hero__buttons {
    flex-direction: column;
    align-items: flex-start;
  }
}


/* -------- Sekcja "Szykuj się na ostrą jazdę!" (flagi) -------- */

.section-flags {
  position: relative;
  padding: 2rem 0 5rem;
  background: #ffffff;
  overflow: hidden;
}

/* Skośne czarne tło po lewej (jak w oryginalnym ICF) */
.section-flags::before {
  content: "";
  position: absolute;
  left: 0;
  top: -17%;
  width: 60%;
  height: 94%;
  background: #000;
  transform: skewY(-50deg);
  transform-origin: top left;

}

/* żeby treść była nad pseudo-elementem */
.section-flags .container {
  position: relative;
  z-index: 1;
}

/* główny rząd: obraz + tekst pionowo wyśrodkowane */
.section-flags-main {
  margin-bottom: 4rem;
}

.section-flags-image img {
  display: block;
  max-width: 100%;
  height: auto;

  
    filter: blur(0px);
    transform: translateX(50px) scale3d(1.000, 1.000, 1.000) rotate3d(0, 0, 1, 19deg);
    opacity: 1.000;
    transition: filter 200ms linear, transform 200ms linear, opacity 200ms linear;

}

/* tekst po prawej – podobnie jak w Divi */
.section-flags-text h2 {
  font-size: clamp(2.4rem, 3vw, 3.2rem);
  line-height: 1.1;
  margin-bottom: 1.5rem;
  padding-top: 140px;
}

.section-flags-text p {
  font-size: 1rem;
  line-height: 1.7;
}

/* rząd ikonek – wszystkie w jednym rzędzie */
.section-flags .features-row {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 2.5rem 1rem;
}

/* nadpisanie siatki 1/2 tylko w tym rzędzie,
   żeby nie były na 50% szerokości */
.section-flags .features-row .col-1-2 {
  flex: 0 0 auto;
  width: auto;
}

.section-flags .blurb {
  text-align: center;
  max-width: 12rem;
  margin: 0 auto;
}

.section-flags .blurb img {
  display: block;
  max-width: 100px;
  margin: 0 auto 1rem;
}

.section-flags .blurb h4 {
  font-size: 0.8rem;
  text-transform: uppercase;
  letter-spacing: 0.03em;
}

/* RWD – pod 768px flaga nad tekstem, ikony w dwóch kolumnach */
@media (max-width: 768px) {
  .section-flags-main {
    flex-direction: column;
    text-align: center;
  }

  .section-flags-text p {
    margin: 0 auto;
  }

  .section-flags .features-row {
    justify-content: center;
  }
}

/* -------- Sekcja 100% Satysfakcji -------- */

.section-satisfaction {
  padding: 6rem 0;
  background: #ffffff;
}

.section-satisfaction .row {
  align-items: center;
}

/* lewa kolumna */
.section-satisfaction-left h2 {
  font-size: clamp(2.2rem, 3vw, 3rem);
  line-height: 1.1;
  font-weight: 800;
  max-width: 28ch;
  margin-bottom: 2rem;
}

/* przycisk */
.section-satisfaction .btn.btn-primary {
  display: inline-block;
  padding: 0.9rem 2.8rem;
  border-radius: 10px;
  background: #000000;
  color: #ffffff;
  text-decoration: none;
  text-transform: uppercase;
  font-weight: 700;
  letter-spacing: 0.06em;
  font-size: 0.95rem;
  transition: background 0.2s ease, transform 0.2s ease;
}

.section-satisfaction .btn.btn-primary:hover,
.section-satisfaction .btn.btn-primary:focus {
  background: #e02b20;
  transform: translateY(-1px);
}

/* prawa kolumna – tekst */
.section-satisfaction-right p {
  font-size: 1rem;
  line-height: 1.7;
  margin-bottom: 1rem;
  max-width: 40rem;
}

/* RWD */
@media (max-width: 900px) {
  .section-satisfaction .row {
    flex-direction: column;
  }

  .section-satisfaction-left,
  .section-satisfaction-right {
    width: 100%;
  }

  .section-satisfaction-left h2,
  .section-satisfaction-right p {
    max-width: 100%;
  }

  .section-satisfaction-left {
    margin-bottom: 2.5rem;
  }
}

/* ========= SEKCJA Z TŁEM + CZERWONĄ SZARFĄ ========= */

/* wrapper z tłem zdjęciowym */
.section-features-wrapper {
  position: relative;
  padding-top: 8rem;
  padding-bottom: 0;
  background: #000;
  overflow: hidden;
}

/* zdjęcie toru w tle – pod całą sekcją */
.section-features-wrapper::before {
  content: "";
  position: absolute;
  inset: 0;
  background-image: url("<?php echo get_stylesheet_directory_uri(); ?>/assets/images/sekcja-tor-bg.jpg");
  background-size: cover;
  background-position: center;
  opacity: 0.55;           /* lekkie przyciemnienie */
  z-index: -2;
}

/* czerwona szarfa z ukośnymi krawędziami */
.section-features-ribbon {
  position: relative;
  padding: 6rem 0 8rem;
  background: #e02b20;
  color: #ffffff;
  clip-path: polygon(0 35%, 100% 0, 100% 75%, 0 100%);
  z-index: 1;
}

/* siatka z trzema „kafelkami” */
.features-grid {
  display: flex;
  gap: 3rem;
  justify-content: center;
  text-align: center;
  max-width: 1100px;
  margin: 0 auto;
}

.feature-item {
  flex: 1 1 0;
  max-width: 320px;
}

.feature-item img {
  display: block;
  margin: 0 auto 1.5rem;
  max-width: 100px;
  height: auto;
}

.feature-item h4 {
  font-size: 1.05rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  margin-bottom: 0.75rem;
}

.feature-item p {
  font-size: 0.95rem;
  line-height: 1.6;
}

/* środkowy kafelek lekko wyróżniony */
.feature-item-main {
  transform: translateY(-10px);
  font-weight: 700;
}

/* RWD – na mobile kafelki pod sobą */
@media (max-width: 900px) {
  .section-features-wrapper {
    padding-top: 4rem;
  }

  .section-features-ribbon {
    clip-path: none;
    padding: 4rem 0 4rem;
  }

  .features-grid {
    flex-direction: column;
    gap: 2.5rem;
  }

  .feature-item-main {
    transform: none;
  }
}