/*
Theme Name: AMF Moskitiery
Description: Autorski motyw WordPress dla AMF Moskitiery - moskitiery na wymiar.
Author: AMF
Version: 1.0
*/

/* ============ RESET & VARIABLES ============ */
:root {
  --green: #2f6f4e;
  --green-dark: #24573e;
  --navy: #0f172a;
  --navy-light: #1e293b;
  --gray: #6b7280;
  --gray-light: #f3f5f2;
  --border: #e5e7eb;
  --white: #ffffff;
  --radius: 10px;
  --max-width: 1200px;
  --font: 'Segoe UI', system-ui, -apple-system, Arial, sans-serif;
}

* { box-sizing: border-box; margin: 0; padding: 0; }

html { scroll-behavior: smooth; }

body {
  font-family: var(--font);
  color: var(--navy);
  line-height: 1.6;
  background: var(--white);
}

.site-wrapper {
  max-width: 1600px;
  margin: 0 auto;
  overflow-x: hidden;
  background: var(--white);
}

img { max-width: 100%; display: block; border-radius: var(--radius); }

a { text-decoration: none; color: inherit; }

ul { list-style: none; }

.container {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 24px;
}

.eyebrow {
  color: var(--green);
  letter-spacing: 2px;
  font-size: 13px;
  font-weight: 700;
  text-transform: uppercase;
}

h1, h2, h3 { line-height: 1.15; font-weight: 800; }
h2 { font-size: 36px; margin: 8px 0 16px; }
h3 { font-size: 20px; margin-bottom: 8px; }
p { color: var(--gray); }

.section { padding: 80px 0; }
.section-alt { background: var(--gray-light); }
.section-header { max-width: 640px; margin-bottom: 48px; }
.section-header.center { margin-left: auto; margin-right: auto; text-align: center; }

/* ============ BUTTONS ============ */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 14px 26px;
  border-radius: 6px;
  font-weight: 600;
  font-size: 15px;
  cursor: pointer;
  border: 2px solid transparent;
  transition: 0.2s ease;
}
.btn-primary { background: var(--green); color: var(--white); }
.btn-primary:hover { background: var(--green-dark); }
.btn-outline { background: transparent; border-color: rgba(255,255,255,0.6); color: var(--white); }
.btn-outline:hover { background: rgba(255,255,255,0.1); }
.btn-outline-dark { background: transparent; border-color: var(--navy); color: var(--navy); }
.btn-outline-dark:hover { background: var(--navy); color: var(--white); }

/* ============ HEADER / NAV ============ */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: var(--white);
  border-bottom: 1px solid var(--border);
}
.nav-wrap {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 24px;
  max-width: var(--max-width);
  margin: 0 auto;
  gap: 24px;
}
.logo { display: flex; align-items: center; gap: 10px; font-weight: 800; font-size: 19px; flex-shrink: 0; }
.logo .custom-logo { height: 44px; width: auto; }
.logo-mark {
  background: var(--green);
  color: var(--white);
  font-size: 13px;
  font-weight: 800;
  width: 36px; height: 36px;
  border-radius: 6px;
  display: flex; align-items: center; justify-content: center;
}
.logo img.logo-image { height: 36px; width: auto; border-radius: 6px; }

.main-nav { display: flex; gap: 28px; flex: 1; justify-content: center; }
.main-nav a { font-size: 15px; font-weight: 500; color: var(--navy); }
.main-nav a:hover { color: var(--green); }

.nav-right { display: flex; align-items: center; gap: 18px; flex-shrink: 0; }
.nav-phone { display: flex; align-items: center; gap: 6px; font-size: 15px; font-weight: 600; white-space: nowrap; }

.menu-toggle {
  display: none;
  flex-direction: column;
  gap: 5px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 6px;
}
.menu-toggle span { width: 24px; height: 2px; background: var(--navy); }

/* ZWĘŻENIE BANERU W POZIOMIE (DO ŚRODKA EKRANU) */
html body section.hero,
html body .hero,
.hero {
  position: relative !important;
  display: flex !important;
  align-items: center !important;
  
  /* KLUCZOWA ZMIANA: Blokujemy rozlewanie na boki i centrujemy baner */
  max-width: 1200px !important;    /* Dopasowanie do szerokości tekstu i statystyk */
  width: 100% !important;
  margin: 0 auto !important;       /* Idealnie centruje granatowy blok na środku monitora */
  border-radius: 8px !important;   /* Eleganckie, delikatne zaokrąglenie rogów */
  
  /* Przywrócenie normalnej wysokości baneru */
  height: auto !important; 
  min-height: 400px !important;
  max-height: none !important;
  padding-top: 60px !important;   
  padding-bottom: 40px !important;
  
  background: linear-gradient(rgba(15,23,42,0.65), rgba(15,23,42,0.55)), var(--navy) !important;
  background-size: cover !important;
  background-position: center !important;
  color: var(--white) !important;
}


.hero-inner { 
  max-width: 640px; 
  padding: 20px 0 0px 0 !important; /* Maksymalnie ściskamy przestrzeń wewnątrz */
}
.hero h1 { 
  font-size: 46px !important;        /* Zmniejszamy litery z 56px, by zyskać masę miejsca w pionie */
  color: var(--white); 
  margin-top: 0 !important;
  margin-bottom: 5px !important;     /* Ciasny odstęp pod głównym napisem */
}
.hero .accent { 
  color: #6fcf97; 
  display: block; 
}
.hero p { 
  color: rgba(255,255,255,0.85); 
  font-size: 17px; 
  margin: 5px 0 10px 0 !important;   /* Maksymalnie ściskamy przestrzeń nad przyciskami */
}
.hero-actions { 
  display: flex; 
  gap: 14px; 
  flex-wrap: wrap; 
  margin-top: 5px !important;
  margin-bottom: 0 !important;       /* Likwidujemy pustą lukę pod przyciskami */
}


.stats-bar {
  background: var(--navy);
  color: var(--white);
}
.stats-grid {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 24px;
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  text-align: center;
}
.stats-grid div { padding: 10px; border-left: 1px solid rgba(255,255,255,0.15); }
.stats-grid div:first-child { border-left: none; }
.stats-grid strong { display: block; font-size: 26px; color: #6fcf97; }
.stats-grid span { font-size: 12px; letter-spacing: 1px; color: rgba(255,255,255,0.7); }

/* ============ GENERIC PAGE HEADER (podstrony) ============ */
.page-hero {
  background: var(--gray-light);
  padding: 64px 0 48px;
}
.page-hero h1 { font-size: 42px; margin-top: 6px; }

/* ============ CARDS / GRID ============ */
.grid-3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 28px; }
.grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 28px; }
.card {
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 28px;
  background: var(--white);
}
.card .icon {
  width: 44px; height: 44px;
  background: var(--gray-light);
  border-radius: 8px;
  display: flex; align-items: center; justify-content: center;
  color: var(--green);
  margin-bottom: 14px;
  font-size: 20px;
}

/* ============ REALIZACJE GALLERY ============ */
.gallery-grid {
  display: grid;
  grid-template-columns: repeat(6, 1fr);
  grid-auto-rows: 160px;
  gap: 16px;
}
.gallery-grid figure { overflow: hidden; border-radius: var(--radius); margin: 0; }
.gallery-grid img { width: 100%; height: 100%; object-fit: cover; }
.gallery-grid .g-large { grid-column: span 4; grid-row: span 2; }
.gallery-grid .g-medium { grid-column: span 2; grid-row: span 2; }
.gallery-grid .g-small { grid-column: span 2; grid-row: span 1; }

.video-wrap {
  margin-top: 40px;
  border-radius: var(--radius);
  overflow: hidden;
  background: #000;
}
.video-wrap video { width: 100%; display: block; }

/* ============ KONTAKT ============ */
.contact-grid {
  display: grid;
  grid-template-columns: 1fr 1.3fr;
  gap: 56px;
  align-items: start;
}
.contact-info-item { display: flex; gap: 14px; margin-bottom: 22px; }
.contact-info-item .icon {
  width: 40px; height: 40px;
  background: var(--gray-light);
  border-radius: 8px;
  display: flex; align-items: center; justify-content: center;
  color: var(--green);
  flex-shrink: 0;
}
.contact-info-item label { display: block; font-size: 12px; letter-spacing: 1px; color: var(--gray); text-transform: uppercase; }
.contact-info-item strong { font-size: 16px; }

form.amf-form { display: flex; flex-direction: column; gap: 18px; }
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; }
.amf-form label { display: block; font-size: 12px; letter-spacing: 1px; color: var(--gray); text-transform: uppercase; margin-bottom: 6px; }
.amf-form input, .amf-form textarea {
  width: 100%;
  padding: 12px 14px;
  border: 1px solid var(--border);
  border-radius: 6px;
  font-family: var(--font);
  font-size: 15px;
}
.amf-form textarea { min-height: 140px; resize: vertical; }
.amf-form .hint { font-size: 13px; color: var(--gray); text-align: center; }
.form-notice { padding: 14px 16px; border-radius: 8px; margin-bottom: 18px; font-size: 14px; }
.form-notice.success { background: #e7f5ec; color: var(--green-dark); }
.form-notice.error { background: #fdecec; color: #b91c1c; }

/* ============ TREŚĆ Z EDYTORA (Realizacje: galeria + wideo z bloków WP) ============ */
.entry-content { margin-top: 20px; }
.entry-content .wp-block-gallery {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
  list-style: none;
  padding: 0;
}
.entry-content .wp-block-image { margin: 0; }
.entry-content .wp-block-image img,
.entry-content figure img { border-radius: var(--radius); width: 100%; object-fit: cover; }
.entry-content .wp-block-video,
.entry-content video {
  margin-top: 40px;
  border-radius: var(--radius);
  overflow: hidden;
}
.entry-content .wp-block-video video,
.entry-content video { width: 100%; display: block; border-radius: var(--radius); }
.entry-content p { margin-bottom: 16px; }
@media (max-width: 900px) {
  .entry-content .wp-block-gallery { grid-template-columns: repeat(2, 1fr); }
}

/* ============ O NAS - checklist + zdjęcie z odznaką ============ */
.check-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px 24px;
  margin-top: 24px;
}
.check-item { display: flex; align-items: center; gap: 10px; font-size: 15px; color: var(--navy); }
.check-item .check-mark {
  width: 22px; height: 22px;
  background: #e7f5ec;
  color: var(--green);
  border-radius: 5px;
  display: flex; align-items: center; justify-content: center;
  font-size: 13px;
  flex-shrink: 0;
}
.about-photo { position: relative; }
.about-photo img { width: 100%; border-radius: 14px; }
.about-badge {
  position: absolute;
  bottom: -20px; left: -20px;
  background: var(--green);
  color: var(--white);
  padding: 20px 26px;
  border-radius: 10px;
  box-shadow: 0 10px 30px rgba(15,23,42,0.2);
}
.about-badge strong { display: block; font-size: 34px; line-height: 1; }
.about-badge span { font-size: 12px; letter-spacing: 1px; color: rgba(255,255,255,0.85); }
@media (max-width: 900px) {
  .check-grid { grid-template-columns: 1fr; }
  .about-badge { left: 12px; bottom: -16px; padding: 14px 18px; }
  .about-badge strong { font-size: 26px; }
  .about-photo { margin-top: 24px; }
}

/* ============ WYCENA - hero na zielonym tle + karty kontaktowe ============ */
.quote-hero { background: var(--green); color: var(--white); padding: 90px 0; }
.quote-hero .eyebrow { color: rgba(255,255,255,0.8); }
.quote-hero h1 { color: var(--white); font-size: 44px; margin-top: 8px; }
.quote-hero p { color: rgba(255,255,255,0.85); margin-top: 16px; font-size: 16px; max-width: 480px; }
.quote-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 48px; align-items: center; }
.quote-cards { display: flex; flex-direction: column; gap: 18px; }
.quote-card {
  display: flex; align-items: center; gap: 16px;
  border: 1px solid rgba(255,255,255,0.35);
  border-radius: 10px;
  padding: 20px 22px;
}
.quote-card .icon {
  width: 44px; height: 44px;
  border: 1px solid rgba(255,255,255,0.5);
  border-radius: 8px;
  display: flex; align-items: center; justify-content: center;
  flex-shrink: 0;
  font-size: 18px;
}
.quote-card label { display: block; font-size: 12px; letter-spacing: 1px; color: rgba(255,255,255,0.75); text-transform: uppercase; }
.quote-card strong { font-size: 17px; }
.quote-card a { color: var(--white); }
.btn-white {
  background: var(--white); color: var(--green);
  text-align: center; justify-content: center;
  padding: 16px 24px; border-radius: 8px; font-weight: 700;
}
.btn-white:hover { background: #f0f0f0; }
@media (max-width: 900px) {
  .quote-grid { grid-template-columns: 1fr; }
  .quote-hero h1 { font-size: 32px; }
}

/* ============ ZAGNIEŻDŻONA LISTA OFERTY (kategorie + podpunkty) ============ */
.nested-offer-list { list-style: none; padding: 0; margin-top: 8px; }
.nested-offer-list > li {
  position: relative;
  padding-left: 24px;
  margin-bottom: 18px;
  font-weight: 600;
  color: var(--navy);
  font-size: 16px;
}
.nested-offer-list > li::before {
  content: "";
  position: absolute;
  left: 0; top: 8px;
  width: 9px; height: 9px;
  border-radius: 50%;
  background: var(--green);
}
.nested-offer-list ul {
  list-style: none;
  padding: 0;
  margin: 10px 0 0 4px;
}
.nested-offer-list ul li {
  position: relative;
  padding-left: 22px;
  margin-bottom: 8px;
  font-weight: 400;
  color: var(--gray);
  font-size: 15px;
}
.nested-offer-list ul li::before {
  content: "";
  position: absolute;
  left: 0; top: 9px;
  width: 6px; height: 6px;
  border-radius: 50%;
  background: #b7d9c5;
}
.new-badge { color: #b91c1c; font-weight: 700; font-size: 13px; }

/* ============ FOOTER ============ */
.site-footer { background: var(--navy); color: rgba(255,255,255,0.75); padding: 32px 0; }
.footer-inner { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 16px; }
.footer-logo { display: flex; align-items: center; gap: 10px; color: var(--white); font-weight: 700; }
.footer-nav { display: flex; gap: 22px; flex-wrap: wrap; }
.footer-nav a { font-size: 14px; color: rgba(255,255,255,0.75); }
.footer-nav a:hover { color: var(--white); }
.footer-copy { font-size: 13px; color: rgba(255,255,255,0.5); }

.back-to-top {
  position: fixed;
  bottom: 24px; right: 24px;
  width: 44px; height: 44px;
  background: var(--green);
  color: var(--white);
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  cursor: pointer;
  opacity: 0;
  pointer-events: none;
  transition: 0.2s;
  z-index: 90;
}
.back-to-top.visible { opacity: 1; pointer-events: auto; }

/* ============ RESPONSIVE ============ */
@media (max-width: 900px) {
  .main-nav, .nav-phone { display: none; }
  .menu-toggle { display: flex; }
  .main-nav.open {
    display: flex;
    flex-direction: column;
    position: absolute;
    top: 100%; left: 0; right: 0;
    background: var(--white);
    padding: 16px 24px;
    border-bottom: 1px solid var(--border);
    gap: 16px;
  }
  .hero h1 { font-size: 38px; }
  .stats-grid { grid-template-columns: repeat(2, 1fr); gap: 20px; }
  .stats-grid div { border-left: none; }
  .grid-3, .grid-2 { grid-template-columns: 1fr; }
  .contact-grid { grid-template-columns: 1fr; }
  .form-row { grid-template-columns: 1fr; }
  .gallery-grid { grid-template-columns: repeat(2, 1fr); grid-auto-rows: 140px; }
  .gallery-grid .g-large { grid-column: span 2; grid-row: span 2; }
  .gallery-grid .g-medium { grid-column: span 2; grid-row: span 1; }
  .gallery-grid .g-small { grid-column: span 1; }
  .footer-inner { flex-direction: column; text-align: center; }
}
/* POPRAWKA: Bezwzględne zwężenie paska statystyk w poziomie pod wymiar baneru */
html body section.stats-bar,
html body .stats-bar,
section.stats-bar,
.stats-bar {
    max-width: 1200px !important;   /* Identyczna szerokość w poziomie jak górny baner */
    width: 100% !important;
    margin: 0 auto !important;      /* Idealnie centruje pasek na środku monitora */
    border-radius: 0 0 8px 8px !important; /* Zaokrągla tylko dolne rogi, tworząc jedną całość z banerem */
    padding-top: 15px !important;    
    padding-bottom: 15px !important;
    background-color: #0f172a !important; /* Wymuszenie ciemnego koloru tylko wewnątrz zwężonego bloku */
}

/* Usuwamy ewentualne rozlewanie tła przez kontenery nadrzędne tego paska */
section.stats-bar::before,
section.stats-bar::after {
    display: none !important;
}
/* ==========================================================================
   PERFEKCYJNE UŁOŻENIE 3 ZDJĘĆ W POZIOMIE DLA PODSTRONY JAK MIERZYĆ (ID 1120)
   ========================================================================== */
@media (max-width: 767px) {
    
    /* 1. Szukamy konkretnego wiersza z obrazkami i zamieniamy go w poziomą siatkę */
    .page-id-1120 div.vc_row-fluid:has(.vc_col-sm-4),
    .page-id-1120 .vc_row-fluid {
        display: flex !important;
        flex-direction: row !important;
        flex-wrap: nowrap !important; /* Blokujemy spadanie obrazków pod spód */
        justify-content: space-between !important;
        gap: 8px !important;           /* Estetyczne odstępy między rysunkami */
        width: 100% !important;
    }

    /* 2. Każda kolumna ze zdjęciem musi zajmować dokładnie 1/3 szerokości ekranu */
    .page-id-1120 div.vc_row-fluid:has(.vc_col-sm-4) .vc_col-sm-4,
    .page-id-1120 .vc_col-sm-4 {
        width: calc(33.33% - 6px) !important;
        max-width: calc(33.33% - 6px) !important;
        flex: none !important;
        margin: 0 !important;
        padding: 0 !important;
    }

    /* 3. Pilnujemy ostrości rysunków technicznych i ich proporcji */
    .page-id-1120 div.vc_row-fluid:has(.vc_col-sm-4) .wpb_single_image img,
    .page-id-1120 .wpb_single_image img {
        width: 100% !important;
        height: auto !important;         /* Zachowujemy napisy wymiarowe w całości */
        object-fit: contain !important;
        border-radius: 4px !important;
    }
}

