/*
Theme Name: Grambet
Theme URI: https://grambet.pl
Author: Grambet
Author URI: https://grambet.pl
Description: Motyw WordPress dla Grambet – hurtownia urządzeń grzewczych
Version: 1.0.0
Requires at least: 6.0
Tested up to: 6.7
Requires PHP: 7.4
License: GNU General Public License v2 or later
License URI: https://www.gnu.org/licenses/gpl-2.0.html
Text Domain: grambet
Tags: custom-menu, custom-logo, threaded-comments, translation-ready
*/

/* =========================================================
   RESET & BASE
   ========================================================= */
/* Nadpisz kontenery z poprzednich motywów */
html, body { width: 100%; max-width: 100% !important; }
#page, #content, #wrapper, .site, .hfeed,
.page-wrapper, #main, .wrap { max-width: 100% !important; width: 100% !important; margin: 0 !important; padding: 0 !important; }
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
body {
  font-family: 'Roboto', sans-serif;
  font-size: 15px;
  color: #333;
  background: #fff;
  line-height: 1.6;
}
a { text-decoration: none; color: inherit; }
img { max-width: 100%; height: auto; display: block; }
ul { list-style: none; }

/* =========================================================
   TOP BAR
   ========================================================= */
.topbar {
  background: #cc0000;
  color: #fff;
  font-size: 13px;
  font-weight: 700;
  padding: 6px 0;
}
.topbar .container {
  display: flex;
  gap: 0;
  align-items: center;
  justify-content: flex-start;
}
.topbar .container span {
  padding: 0 20px;
}
.topbar .container span + span {
  border-left: 1px solid rgba(255,255,255,0.4);
}
.topbar a { color: #fff; }
.topbar a:hover { text-decoration: underline; }
.topbar i { margin-right: 5px; }

/* =========================================================
   SITE HEADER
   ========================================================= */
.site-header {
  background: #fff;
  border-bottom: 2px solid #cc0000;
  position: sticky;
  top: 0;
  z-index: 1000;
  box-shadow: 0 2px 10px rgba(0,0,0,0.08);
  overflow: visible;
}
.site-header-inner {
  max-width: 1530px;
  margin: 0 auto;
  padding: 10px 30px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
}
.site-logo img { height: 60px; width: auto; }
.site-logo a { display: block; }

/* =========================================================
   MAIN NAVIGATION – nieograniczona głębokość submenu
   ========================================================= */
.main-nav-wrapper { flex: 1; display: flex; justify-content: center; }

#main-menu {
  display: flex;
  align-items: center;
  gap: 2px;
  flex-wrap: wrap;
}
#main-menu li { position: relative; }

/* Poziom 1 */
#main-menu > li {
  margin-left: 10px;
  margin-right: 10px;
}
#main-menu > li > a {
  display: block;
  font-family: 'Roboto', sans-serif;
  font-size: 16px;
  font-weight: 400;
  text-transform: uppercase;
  color: #000;
  fill: #000;
  padding-left: 5px;
  padding-right: 5px;
  padding-top: 15px;
  padding-bottom: 15px;
  border-radius: 3px;
  transition: background .18s, color .18s;
  white-space: nowrap;
}
#main-menu > li > a:hover,
#main-menu > li.current-menu-item > a {
  background: #cc0000;
  color: #fff;
}
#main-menu > li.current-menu-ancestor > a {
  background: none;
  color: #000;
}
/* strzałka dla pozycji z dziećmi – poziom 1 */
#main-menu > li.menu-item-has-children > a::after { content: none; }
#main-menu > li {
  display: flex;
  flex-direction: row;
  align-items: stretch;
}
#main-menu > li > a {
  flex: 1;
}
#main-menu > li > .sub-arrow {
  display: inline-flex;
  align-items: center;
  padding: 0 6px;
  background: none;
  border: none;
  cursor: pointer;
  color: #000;
  font-size: 13px;
}

/* Dropdown ogólny – wszystkie poziomy */
#main-menu .sub-menu {
  display: none;
  position: absolute;
  background: #fff;
  min-width: 240px;
  border-top: 2px solid #cc0000;
  border-left: 1px solid #ddd;
  border-right: 1px solid #ddd;
  border-bottom: 1px solid #ddd;
  box-shadow: 4px 6px 18px rgba(0,0,0,0.12);
  z-index: 9999;
  white-space: nowrap;
}
/* Poziom 2 – pod elementem top-level */
#main-menu > li > .sub-menu {
  top: 100%;
  left: 0;
}
/* Poziom 3+ – obok rodzica */
#main-menu .sub-menu .sub-menu {
  top: 0;
  left: 100%;
}
/* Pokazuj przy hover – tylko desktop */
@media (min-width: 901px) {
  #main-menu li:hover > .sub-menu { display: block; }
}

/* Linki w submenu */
#main-menu .sub-menu a {
  display: block;
  padding: 9px 16px;
  font-size: 13px;
  color: #333;
  border-bottom: 1px solid #f2f2f2;
  transition: background .14s, color .14s;
}
#main-menu .sub-menu a:hover { background: none; color: #000; }
/* strzałka dla pozycji z dziećmi w submenu */
#main-menu .sub-menu li.menu-item-has-children > a::after { content: none; }
#main-menu .sub-menu li {
  display: flex;
  flex-direction: row;
  align-items: stretch;
}
#main-menu .sub-menu li > a { flex: 1; }
#main-menu .sub-menu li > .sub-arrow {
  display: inline-flex;
  align-items: center;
  padding: 0 10px;
  background: none;
  border: none;
  cursor: pointer;
  color: #333;
  font-size: 12px;
}
/* aktywna pozycja w submenu */
#main-menu .sub-menu li.current-menu-item > a { background: none; color: #000; }

/* =========================================================
   HEADER ICONS (koszyk, fb)
   ========================================================= */
.header-icons {
  display: flex;
  align-items: center;
  gap: 14px;
  font-size: 21px;
  flex-shrink: 0;
}
.header-icons a { color: #cc0000; transition: opacity .2s; }
.header-icons a:hover { opacity: .65; }

/* =========================================================
   MOBILE TOGGLE
   ========================================================= */
.mobile-menu-toggle {
  display: none;
  background: none;
  border: none;
  font-size: 26px;
  color: #cc0000;
  cursor: pointer;
  padding: 4px;
}

/* =========================================================
   HERO SLIDER
   ========================================================= */
.hero-slider-wrap {
  max-width: 1500px;
  margin: 10px auto 0;
}
.hero-slider {
  position: relative;
  width: 100%;
  height: 400px;
  overflow: hidden;
  background: #111;
}
.slide {
  position: absolute;
  inset: 0;
  background-size: cover;
  background-position: center;
  opacity: 0;
  transition: opacity .6s ease;
}
.slide.active { opacity: 1; }
.slide-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(0deg, rgba(0,0,0,.42), transparent 70%);
}
.slide-content {
  position: relative;
  z-index: 2;
  height: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  color: #fff;
  padding: 20px;
  text-align: center;
}
.slide-heading {
  font-size: 26px;
  font-weight: 700;
  text-shadow: 0 2px 8px rgba(0,0,0,.6);
  margin-bottom: 6px;
  animation: fadeInUp .65s ease both;
}
.slide-description {
  font-size: 15px;
  text-shadow: 0 1px 4px rgba(0,0,0,.5);
  margin-bottom: 14px;
  animation: fadeInUp .65s .1s ease both;
}
.slide-btn {
  display: inline-block;
  background: #cc0000;
  color: #fff;
  padding: 9px 28px;
  font-size: 14px;
  font-weight: 700;
  border-radius: 3px;
  transition: background .2s;
  animation: fadeInUp .65s .2s ease both;
}
.slide-btn:hover { background: #a00000; }

@keyframes fadeInUp {
  from { opacity: 0; transform: translateY(22px); }
  to   { opacity: 1; transform: translateY(0); }
}

.slider-arrow {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  z-index: 10;
  background: rgba(0,0,0,.32);
  color: #fff;
  width: 40px; height: 40px;
  border-radius: 50%;
  border: none;
  cursor: pointer;
  font-size: 17px;
  display: flex; align-items: center; justify-content: center;
  transition: background .2s;
}
.slider-arrow:hover { background: rgba(0,0,0,.6); }
.slider-arrow.prev { left: 16px; }
.slider-arrow.next { right: 16px; }

.slider-dots {
  position: absolute;
  bottom: 12px;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  gap: 7px;
  z-index: 10;
}
.slider-dot {
  width: 10px; height: 10px;
  border-radius: 50%;
  background: rgba(255,255,255,.45);
  border: none;
  cursor: pointer;
  transition: background .2s;
}
.slider-dot.active { background: #fff; }

/* =========================================================
   SECTION UTILS
   ========================================================= */
.container { max-width: 1200px; margin: 0 auto; padding: 0 20px; }
.section { padding: 40px 0; }
.section-divider {
  border: none;
  border-top: 2px solid #cc0000;
  margin: 0 auto;
  max-width: 1200px;
  padding: 0 20px;
}
.hero-slider-wrap + .container {
  margin-top: 60px;
}
.section-title {
  text-align: center;
  font-family: 'Lato', sans-serif;
  font-size: 40px;
  font-weight: 900;
  text-decoration: underline;
  text-underline-offset: 5px;
  text-decoration-color: #cc0000;
  letter-spacing: .7px;
  word-spacing: 5px;
  margin-bottom: 30px;
  color: #000;
}
.section-title .red { color: #cc0000; }

/* =========================================================
   LOGO CAROUSEL (Partnerzy)
   ========================================================= */
.logo-carousel-wrap {
  position: relative;
  overflow: hidden;
  padding: 0 44px;
}
.logo-carousel-track {
  display: flex;
  gap: 20px;
  align-items: center;
  transition: transform .5s ease;
}
.logo-carousel-track figure {
  flex: 0 0 160px;
  height: 80px;
  display: flex;
  align-items: center;
  justify-content: center;
}
.logo-carousel-track img {
  max-height: 68px;
  max-width: 150px;
  width: auto;
  object-fit: contain;
  filter: grayscale(25%);
  transition: filter .2s;
}
.logo-carousel-track img:hover { filter: none; }
.carousel-btn {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  background: none;
  color: #fff;
  border: none;
  width: 34px; height: 34px;
  border-radius: 50%;
  cursor: pointer;
  font-size: 15px;
  display: flex; align-items: center; justify-content: center;
  z-index: 5;
  transition: background .2s;
}
.carousel-btn:hover { background: #900; }
.carousel-btn.prev { left: 0; }
.carousel-btn.next { right: 0; }

/* =========================================================
   BANNERS ROW
   ========================================================= */
.banners-row {
  display: flex;
  gap: 40px;
  align-items: center;
  justify-content: center;
  flex-wrap: wrap;
  padding: 30px 20px;
  max-width: 1200px;
  margin: 0 auto;
}
.banners-row a {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px 0;
}
.banners-row img { max-height: 125px; width: auto; }

/* =========================================================
   O FIRMIE
   ========================================================= */
.about-section-outer {
  margin-top: 60px;
  position: relative;
  width: 100%;
}
.about-section-outer::before {
  content: '';
  position: absolute;
  inset: 0;
  background-image: url('https://grambet.pl/wp-content/uploads/2022/06/bg.jpg');
  background-size: cover;
  background-position: center;
  opacity: .5;
  z-index: 0;
}
.about-section-outer .about-section {
  position: relative;
  z-index: 1;
}
.about-section {
  display: flex;
  gap: 60px;
  align-items: center;
  flex-wrap: wrap;
  height: 460px;
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 20px;
}
.about-text { flex: 1; min-width: 260px; }
.about-text .section-title { text-align: center !important; }
.about-text p { margin-bottom: 12px; line-height: 1.75; color: #444; }
.about-img { flex: 0 0 320px; }
.about-img img { border-radius: 4px; }

/* =========================================================
   NA BLOGU
   ========================================================= */
.blog-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 30px;
}
.blog-card a { display: block; }
.blog-card .post-thumb {
  width: 100%;
  height: 180px;
  object-fit: cover;
  border-radius: 3px;
  margin-bottom: 12px;
  transition: opacity .2s;
}
.blog-card .post-thumb:hover { opacity: .85; }
.blog-card .post-title {
  font-size: 16px;
  font-weight: 700;
  color: #222;
  margin-bottom: 5px;
  line-height: 1.4;
}
.blog-card .post-title:hover { color: #cc0000; }
.blog-card .post-date {
  font-size: 12px;
  color: #888;
  margin-bottom: 8px;
}
.blog-card .post-excerpt {
  font-size: 13.5px;
  color: #555;
  line-height: 1.6;
}

/* =========================================================
   CTA BANNER (Zadzwoń)
   ========================================================= */
.cta-banner {
  background: #cc0000;
  color: #fff;
  text-align: center;
  padding: 36px 20px 0;
  position: relative;
}
.cta-banner .cta-sub {
  font-size: 30px;
  font-weight: 600;
  margin-bottom: 8px;
}
.cta-banner .cta-phone {
  font-size: 36px;
  font-weight: 900;
  letter-spacing: 1px;
  padding-bottom: 36px;
}
.cta-banner .cta-phone a { color: #fff; }
.cta-banner .cta-phone a:hover { text-decoration: underline; }
.footer-shape-top {
  width: 100%;
  overflow: hidden;
  line-height: 0;
  margin-bottom: -1px;
}
.footer-shape-top svg {
  display: block;
  width: 100%;
  height: 20px;
}

/* =========================================================
   FOOTER
   ========================================================= */
.site-footer {
  background: #000;
  color: #bbb;
  padding: 50px 0 0;
  margin-top: -20px;
}
.footer-inner {
  display: grid;
  grid-template-columns: 220px 1fr 180px 220px;
  gap: 40px;
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 30px 40px;
}
.footer-col-logo .footer-logo { margin-bottom: 16px; }
.footer-col-logo .footer-logo img { height: 55px; width: auto; filter: brightness(1.1); }
.footer-col-logo p { font-size: 13px; line-height: 1.7; color: #999; }

.footer-col h4 {
  color: #fff;
  font-size: 14px;
  font-weight: 700;
  margin-bottom: 14px;
  padding-bottom: 7px;
  text-transform: uppercase;
  letter-spacing: .5px;
}
.footer-address { font-size: 13px; line-height: 2; color: #aaa; }
.footer-address strong { color: #ddd; display: block; margin-bottom: 6px; font-size: 14px; }

.footer-col-contact .contact-line { font-size: 13px; margin-bottom: 6px; color: #aaa; }
.footer-col-contact .contact-line a { color: #cc0000; }
.footer-col-contact .contact-line a:hover { text-decoration: underline; }

.footer-banners { display: flex; flex-direction: column; gap: 14px; margin-top: 4px; }
.footer-banners img { max-height: 110px; width: auto; border-radius: 3px; }
.footer-banners a { display: block; }

.footer-bottom {
  border-top: 1px solid #2a2a2a;
  padding: 16px 30px;
  max-width: 1200px;
  margin: 0 auto;
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 12px;
  color: #666;
}
.footer-bottom img { height: 22px; opacity: .5; filter: invert(1); }

/* =========================================================
   CONTENT AREA (podstrony)
   ========================================================= */
.page-header {
  background: #f5f5f5;
  border-bottom: 1px solid #e0e0e0;
  padding: 24px 0;
  margin-bottom: 30px;
}
.page-header h1 { font-size: 28px; font-weight: 800; color: #222; }
.page-header .page-description { font-size: 15px; color: #666; margin-top: 6px; }

.entry-content { padding: 0 0 50px; }
.entry-content p { margin-bottom: 16px; line-height: 1.75; }
.entry-content h2 { font-size: 22px; margin: 28px 0 12px; color: #111; }
.entry-content h3 { font-size: 18px; margin: 22px 0 10px; color: #333; }
.entry-content ul, .entry-content ol { margin: 0 0 16px 20px; }
.entry-content li { margin-bottom: 6px; line-height: 1.65; }
.entry-content img { border-radius: 4px; margin: 16px 0; }


/* =========================================================
   PAGE HERO (page-about.php)
   ========================================================= */
.page-hero {
  width: 100%;
  height: 215px;
  background-image: url('https://grambet.pl/wp-content/uploads/2022/06/bg-sub.jpg');
  background-position: center center;
  background-repeat: no-repeat;
  background-size: cover;
  display: flex;
  align-items: center;
  justify-content: center;
}
.page-hero-overlay { display: none; }
.page-hero-content {
  text-align: center;
  padding: 0 20px;
}
.page-hero-title {
  font-family: 'Lato', sans-serif;
  font-size: 55px;
  font-weight: 800;
  color: #030303;
  margin: 0;
}
.page-hero-title .page-title-last {
  color: #030303;
}

/* =========================================================
   PAGE TEMPLATE (page.php)
   ========================================================= */
.page-title {
  font-family: 'Lato', sans-serif;
  font-size: 32px;
  font-weight: 800;
  text-transform: uppercase;
  text-decoration: underline;
  text-underline-offset: 5px;
  text-decoration-thickness: 2px;
  text-decoration-color: #cc0000;
  color: #000;
  text-align: center;
  padding: 0 0 16px 0;
  margin-top: 0;
  line-height: 1.2;
}
.page-title .red { color: #cc0000; }
.page-title-last {
  color: #cc0000;
}

.page-featured-image {
  float: left;
  margin: 0 30px 20px 0;
  max-width: 300px;
}
.container > .entry-content {
  padding: 0 0 40px;
}
.page-featured-image img {
  width: 100%;
  height: auto;
  border-radius: 4px;
  display: block;
}
.entry-content::after {
  content: "";
  display: table;
  clear: both;
}

/* Partnerzy statycznie (siatka) */
.partners-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 20px 30px;
  align-items: center;
  justify-content: center;
}
.partner-logo {
  flex: 0 0 auto;
  display: flex;
  align-items: center;
  justify-content: center;
  height: 70px;
}
.partner-logo img {
  max-height: 60px;
  max-width: 160px;
  width: auto;
  object-fit: contain;
  filter: grayscale(20%);
  transition: filter .2s;
}
.partner-logo img:hover { filter: none; }

/* =========================================================
   RESPONSIVE
   ========================================================= */
@media (max-width: 1100px) {
  .footer-inner { grid-template-columns: 1fr 1fr; }
}

@media (max-width: 900px) {
  .main-nav-wrapper { display: none !important; }
  .header-icons { display: none; }
  .mobile-menu-toggle { display: block; }
  .hero-slider-wrap {
  max-width: 1530px;
  margin: 0 auto;
}
.hero-slider { height: 220px; }
  .slide-heading { font-size: 18px; }
  .blog-grid { grid-template-columns: 1fr; }
  .about-section { flex-direction: column; height: auto; }
  .about-img { flex: none; width: 100%; }
  .footer-inner { grid-template-columns: 1fr; padding: 0 20px 30px; }
  .cta-banner .cta-phone { font-size: 26px; }
}

@media (max-width: 600px) {
  .topbar { flex-direction: column; gap: 4px; padding: 8px 16px; text-align: center; }
  .blog-grid { grid-template-columns: 1fr; }
  .section-title { font-size: 20px; }
}

/* =========================================================
   MOBILE MENU – osobna nawigacja
   ========================================================= */
.mobile-nav {
  display: none;
  background: #fff;
  border-top: 2px solid #cc0000;
  box-shadow: 0 8px 20px rgba(0,0,0,.12);
  width: 100%;
  z-index: 9998;
  overflow-x: hidden;
}
.mobile-nav.open { display: block; }
.mobile-nav ul { list-style: none; margin: 0; padding: 0; }
.mobile-nav li { border-bottom: 1px solid #f0f0f0; }
.mobile-item-wrap {
  display: flex;
  align-items: stretch;
}
.mobile-item-wrap a {
  flex: 1;
  padding: 13px 16px;
  font-size: 15px;
  font-weight: 500;
  color: #222;
  display: block;
}
.mobile-item-wrap a:hover { color: #cc0000; }
.mobile-toggle {
  background: none;
  border: none;
  border-left: 1px solid #eee;
  padding: 0 16px;
  cursor: pointer;
  color: #cc0000;
  font-size: 16px;
}
.mobile-toggle.open i { transform: rotate(180deg); }
.mobile-sub {
  background: #fafafa;
  border-left: 3px solid #cc0000;
}
.mobile-sub .mobile-item-wrap a {
  padding-left: 24px;
  font-size: 14px;
}
.mobile-sub .mobile-sub {
  border-left: 3px solid #ffaaaa;
  background: #f5f5f5;
}
.mobile-sub .mobile-sub .mobile-item-wrap a { padding-left: 36px; }
.mobile-sub .mobile-sub .mobile-sub .mobile-item-wrap a { padding-left: 48px; }

/* =========================================================
   ARCHIWUM – PAGINACJA
   ========================================================= */
.read-more {
  font-size: 13px;
  font-weight: 600;
  color: #cc0000;
  display: inline-block;
  margin-top: 8px;
}
.read-more:hover { text-decoration: underline; }

.archive-pagination {
  width: 100%;
  padding: 20px 0 40px;
  font-size: 15px;
  font-weight: 600;
  text-align: center;
}
.archive-prev { margin-right: 20px; }
.archive-prev a,
.archive-prev a:visited { color: #000 !important; text-decoration: none; }
.archive-prev a:hover { text-decoration: underline; }
.archive-next a,
.archive-next a:visited { color: #cc0000 !important; text-decoration: none; }
.archive-next a:hover { text-decoration: underline; }

/* =========================================================
   CONTACT FORM 7
   ========================================================= */
.cf7-title {
  font-family: 'Lato', sans-serif;
  font-size: 40px;
  font-weight: 900;
  text-decoration: underline;
  text-underline-offset: 5px;
  text-decoration-color: #cc0000;
  letter-spacing: .7px;
  word-spacing: 5px;
  text-align: center;
  color: #000;
  margin-bottom: 30px;
}
.cf7-title .red { color: #cc0000; }
.cf7-field-wrap {
  margin-bottom: 18px;
}
.cf7-field-wrap label {
  display: block;
  font-size: 14px;
  color: #222;
  margin-bottom: 6px;
  font-weight: 400;
}
.cf7-field-wrap input[type="text"],
.cf7-field-wrap input[type="email"],
.cf7-field-wrap textarea {
  width: 100%;
  border: 1px solid #cc0000;
  border-radius: 0;
  padding: 12px 14px;
  font-size: 14px;
  color: #333;
  background: #fff;
  outline: none;
  transition: border-color .2s;
  font-family: 'Roboto', sans-serif;
}
.cf7-field-wrap input[type="text"]:focus,
.cf7-field-wrap input[type="email"]:focus,
.cf7-field-wrap textarea:focus {
  border-color: #900;
}
.cf7-field-wrap textarea {
  height: 130px;
  resize: vertical;
}
.cf7-checkbox-wrap {
  font-size: 13px;
  color: #333;
  line-height: 1.5;
}
.cf7-checkbox-wrap .wpcf7-list-item { margin: 0; }
.cf7-checkbox-wrap .wpcf7-list-item-label { font-size: 13px; }
.cf7-checkbox-wrap a { color: #cc0000; text-decoration: underline; }
.wpcf7-submit {
  width: 100%;
  background: #cc0000;
  color: #fff;
  border: none;
  padding: 14px;
  font-size: 16px;
  font-weight: 600;
  cursor: pointer;
  transition: background .2s;
  font-family: 'Roboto', sans-serif;
  margin-top: 10px;
  display: block;
}
.wpcf7-submit:hover { background: #a00000; }
.wpcf7-not-valid-tip {
  color: #cc0000;
  font-size: 12px;
  margin-top: 4px;
  display: block;
}
.wpcf7-response-output {
  border: 1px solid #cc0000;
  padding: 10px 14px;
  margin-top: 16px;
  font-size: 13px;
}
.wpcf7-mail-sent-ok {
  border-color: #2a9d2a !important;
  color: #2a9d2a;
}