/*
Theme Name: Ciepły Projekt
Theme URI: https://cieplyprojekt.pl
Author: Mariusz Majchrzak
Author URI: https://cieplyprojekt.pl
Description: Własny motyw dla cieplyprojekt.pl – OZE, pompy ciepła, Czyste Powietrze
Version: 1.0
License: GNU General Public License v2 or later
Text Domain: cieplyprojekt
*/

/* === RESET & BASE === */
*, *::before, *::after { margin: 0; padding: 0; box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  font-family: 'Lato', sans-serif;
  background: #fff;
  color: #222;
  font-size: 16px;
  line-height: 1.6;
}

h1, h2, h3, h4, h5, h6 {
  font-family: 'Nunito', sans-serif;
  line-height: 1.2;
  color: #0f2744;
}

a { color: #f59e0b; text-decoration: none; }
a:hover { text-decoration: underline; }

img { max-width: 100%; height: auto; display: block; }

/* === LAYOUT === */
.site-wrapper {
  display: flex;
  flex-direction: column;
  min-height: 100vh;
}

.site-content {
  flex: 1;
}

/* === HEADER === */
.site-header {
  position: sticky;
  top: 0;
  z-index: 999;
  background: #fff;
  box-shadow: 0 1px 0 #e8e8e8;
}

/* Top bar */
.header-topbar {
  background: #0f2744;
  padding: 8px 40px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 13px;
  color: rgba(255,255,255,0.7);
}

.topbar-left { display: flex; gap: 24px; align-items: center; }
.topbar-left a { color: rgba(255,255,255,0.7); font-size: 13px; }
.topbar-left a:hover { color: #f59e0b; text-decoration: none; }
.topbar-left span { display: flex; align-items: center; gap: 6px; }

.topbar-right {
  background: rgba(34,197,94,0.2);
  border: 1px solid rgba(34,197,94,0.4);
  color: #4ade80;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.08em;
  padding: 3px 12px;
  border-radius: 20px;
}

/* Main nav */
.header-main {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 40px;
  height: 68px;
}

.site-logo {
  font-family: 'Nunito', sans-serif;
  font-size: 20px;
  font-weight: 900;
  color: #0f2744;
  text-decoration: none;
  white-space: nowrap;
}
.site-logo:hover { text-decoration: none; }
.site-logo span { color: #f59e0b; }

/* Nav links */
.main-nav ul {
  display: flex;
  gap: 6px;
  list-style: none;
  align-items: center;
}

.main-nav a {
  display: block;
  padding: 8px 14px;
  font-size: 14px;
  font-weight: 600;
  color: #444;
  border-radius: 7px;
  transition: background 0.15s, color 0.15s;
}
.main-nav a:hover,
.main-nav .current-menu-item > a,
.main-nav .current-page-ancestor > a {
  background: #f8f9fa;
  color: #0f2744;
  text-decoration: none;
}

/* Dropdown */
.main-nav .menu-item-has-children {
  position: relative;
}
.main-nav .sub-menu {
  display: none;
  position: absolute;
  top: calc(100% + 4px);
  left: 0;
  background: #fff;
  border: 1px solid #e8e8e8;
  border-radius: 12px;
  min-width: 220px;
  padding: 8px;
  box-shadow: 0 8px 32px rgba(0,0,0,0.1);
  z-index: 100;
  flex-direction: column;
  gap: 2px;
}
.main-nav .menu-item-has-children:hover > .sub-menu { display: flex; }
.main-nav .sub-menu a {
  font-size: 13px;
  padding: 9px 14px;
  border-radius: 8px;
  color: #333;
}
.main-nav .sub-menu a:hover { background: #fffbf0; color: #0f2744; }

/* CTA Button */
.header-cta {
  display: inline-block;
  background: #f59e0b;
  color: #0f2744 !important;
  font-family: 'Nunito', sans-serif;
  font-weight: 800;
  font-size: 14px;
  padding: 10px 22px;
  border-radius: 8px;
  white-space: nowrap;
  transition: background 0.15s, transform 0.1s;
  text-decoration: none !important;
}
.header-cta:hover {
  background: #d97706;
  transform: translateY(-1px);
  text-decoration: none !important;
}

/* Mobile toggle */
.nav-toggle {
  display: none;
  flex-direction: column;
  gap: 5px;
  cursor: pointer;
  padding: 6px;
  background: none;
  border: none;
}
.nav-toggle span {
  display: block;
  width: 24px;
  height: 2px;
  background: #0f2744;
  border-radius: 2px;
  transition: all 0.3s;
}

/* === FOOTER === */
.site-footer {
  background: #0f2744;
  color: rgba(255,255,255,0.7);
  overflow: visible;
}

/* Kompensacja WordPress admin bar dla zalogowanych */
.admin-bar .site-header { top: 32px; }

.footer-top {
  display: grid;
  grid-template-columns: 1.6fr 1fr 1fr 1fr;
  gap: 48px;
  padding: 80px 40px 48px;
  border-bottom: 1px solid rgba(255,255,255,0.08);
  overflow: visible;
}

/* Zapobiega ucinaniu tytułów kolumn */
.footer-col { padding-top: 4px; }

.footer-brand .footer-logo {
  font-family: 'Nunito', sans-serif;
  font-size: 20px;
  font-weight: 900;
  color: #fff;
  margin-bottom: 14px;
}
.footer-brand .footer-logo span { color: #f59e0b; }

.footer-brand p {
  font-size: 13px;
  line-height: 1.7;
  color: rgba(255,255,255,0.55);
  margin-bottom: 20px;
}

/* Social icons */
.footer-social { display: flex; gap: 10px; }
.footer-social a {
  width: 36px; height: 36px;
  border-radius: 8px;
  background: rgba(255,255,255,0.07);
  border: 1px solid rgba(255,255,255,0.1);
  display: flex; align-items: center; justify-content: center;
  font-size: 16px;
  transition: background 0.15s;
  text-decoration: none;
}
.footer-social a:hover { background: rgba(245,158,11,0.2); }

/* Footer columns */
.footer-col {
  padding-top: 8px;
}
.footer-col h4 {
  font-family: 'Nunito', sans-serif;
  font-size: 13px;
  font-weight: 800;
  color: #fff;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  line-height: 1.4;
  padding-top: 2px;
  margin-bottom: 16px;
}

.footer-col ul { list-style: none; display: flex; flex-direction: column; gap: 8px; }
.footer-col ul li a {
  font-size: 13px;
  color: rgba(255,255,255,0.55);
  transition: color 0.15s;
}
.footer-col ul li a:hover { color: #f59e0b; text-decoration: none; }

/* Contact list */
.footer-contact { list-style: none; display: flex; flex-direction: column; gap: 10px; }
.footer-contact li {
  display: flex; align-items: flex-start; gap: 10px;
  font-size: 13px; color: rgba(255,255,255,0.55);
}
.footer-contact li .fc-icon { font-size: 15px; flex-shrink: 0; margin-top: 1px; }
.footer-contact li a { color: rgba(255,255,255,0.55); }
.footer-contact li a:hover { color: #f59e0b; text-decoration: none; }

/* Hours */
.footer-hours { display: flex; flex-direction: column; gap: 6px; }
.footer-hours .day { font-size: 12px; color: rgba(255,255,255,0.4); }
.footer-hours .time { font-size: 13px; color: rgba(255,255,255,0.7); font-weight: 600; }

/* Footer bottom */
.footer-bottom {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 18px 40px;
  font-size: 12px;
  color: rgba(255,255,255,0.3);
  flex-wrap: wrap;
  gap: 8px;
}
.footer-bottom a { color: rgba(255,255,255,0.3); }
.footer-bottom a:hover { color: rgba(255,255,255,0.6); text-decoration: none; }

/* Badge CP */
.footer-cp-badge {
  display: inline-flex; align-items: center; gap: 8px;
  background: rgba(34,197,94,0.1);
  border: 1px solid rgba(34,197,94,0.25);
  color: #4ade80;
  font-size: 11px; font-weight: 700;
  padding: 4px 12px; border-radius: 20px;
}

/* === MOBILE === */
@media (max-width: 900px) {
  .header-topbar { display: none; }
  .header-main { padding: 0 20px; }

  .nav-toggle { display: flex; }

  .main-nav {
    display: none;
    position: absolute;
    top: 68px; left: 0; right: 0;
    background: #fff;
    border-top: 1px solid #e8e8e8;
    padding: 12px 20px 20px;
    box-shadow: 0 8px 24px rgba(0,0,0,0.08);
  }
  .main-nav.open { display: block; }
  .main-nav ul { flex-direction: column; gap: 2px; }
  .main-nav .sub-menu { position: static; box-shadow: none; border: none; padding-left: 16px; }
  .main-nav .menu-item-has-children:hover > .sub-menu { display: none; }
  .main-nav .menu-item-has-children.open > .sub-menu { display: flex; }
  .main-nav .menu-item-has-children > a::after { content: ' ▾'; font-size: 11px; opacity: 0.6; }
  .main-nav .menu-item-has-children.open > a::after { content: ' ▴'; }
  .header-cta { display: none; }

  .footer-top { grid-template-columns: 1fr 1fr; gap: 32px; padding: 40px 20px; }
  .footer-bottom { padding: 16px 20px; }
}

@media (max-width: 560px) {
  .footer-top { grid-template-columns: 1fr; }
}

/* === GOOGLE FONTS LOAD === */
@import url('https://fonts.googleapis.com/css2?family=Nunito:wght@400;600;700;800;900&family=Lato:wght@300;400;700&display=swap');

/* ============================================================
   FORMULARZ WYCENY – Contact Form 7
   Używany na stronie głównej i /kontakt/
   ============================================================ */

.cp-form-wrap {
  background: #fff;
  border-radius: 20px;
  padding: 44px 40px 36px;
  box-shadow: 0 4px 32px rgba(0,0,0,.08);
  max-width: 560px;
  width: 100%;
}

.cp-form-wrap h3 {
  font-family: 'Nunito', sans-serif;
  font-size: 28px; font-weight: 900;
  color: #0f2744; margin-bottom: 6px;
}

.cp-form-wrap .cp-form-sub {
  font-size: 14px; color: #888;
  margin-bottom: 30px;
  display: flex; align-items: center; gap: 5px;
}

/* Układ dwukolumnowy dla imię+telefon */
.cp-form-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
  margin-bottom: 16px;
}

/* Pojedyncze pole */
.cp-field {
  display: flex;
  flex-direction: column;
  margin-bottom: 16px;
}
.cp-field:last-of-type { margin-bottom: 0; }

/* Labelki */
.wpcf7-form .cp-field label,
.wpcf7-form .cp-form-row label {
  font-family: 'Lato', sans-serif;
  font-size: 11px; font-weight: 700;
  letter-spacing: .1em; text-transform: uppercase;
  color: #0f2744; margin-bottom: 7px;
  display: block;
}

/* Inputy, select */
.wpcf7-form input[type="text"],
.wpcf7-form input[type="email"],
.wpcf7-form input[type="tel"],
.wpcf7-form select,
.wpcf7-form textarea {
  width: 100%;
  padding: 14px 18px;
  border: 2px solid #e8e8e8;
  border-radius: 12px;
  font-family: 'Lato', sans-serif;
  font-size: 15px; color: #222;
  background: #f8f9fa;
  outline: none;
  transition: border-color .2s, box-shadow .2s, background .2s;
  appearance: none; -webkit-appearance: none;
}

.wpcf7-form input[type="text"]::placeholder,
.wpcf7-form input[type="tel"]::placeholder,
.wpcf7-form input[type="email"]::placeholder {
  color: #aaa;
}

.wpcf7-form input:focus,
.wpcf7-form select:focus,
.wpcf7-form textarea:focus {
  border-color: #f59e0b;
  background: #fff;
  box-shadow: 0 0 0 3px rgba(245,158,11,.12);
}

/* Select – strzałka */
.cp-select-wrap {
  position: relative;
}
.cp-select-wrap::after {
  content: '∨';
  position: absolute; right: 16px; top: 50%; transform: translateY(-50%);
  color: #888; font-size: 14px; pointer-events: none;
}
.cp-select-wrap select { padding-right: 40px; cursor: pointer; }

/* Przycisk submit */
.wpcf7-form input[type="submit"] {
  width: 100%;
  background: #f59e0b;
  color: #0f2744;
  font-family: 'Nunito', sans-serif;
  font-weight: 900; font-size: 18px;
  padding: 17px 28px;
  border: none; border-radius: 12px;
  cursor: pointer; margin-top: 8px;
  box-shadow: 0 4px 20px rgba(245,158,11,.35);
  transition: background .15s, transform .1s, box-shadow .15s;
  letter-spacing: .01em;
}
.wpcf7-form input[type="submit"]:hover {
  background: #d97706;
  transform: translateY(-2px);
  box-shadow: 0 8px 28px rgba(245,158,11,.4);
}

/* Nota prywatności pod przyciskiem */
.cp-form-privacy {
  text-align: center;
  font-size: 12px; color: #aaa;
  margin-top: 12px;
  display: flex; align-items: center; justify-content: center; gap: 5px;
}

/* Komunikaty CF7 */
.wpcf7-response-output {
  margin-top: 16px !important;
  padding: 12px 16px !important;
  border-radius: 10px !important;
  font-size: 14px !important;
  border: none !important;
}
.wpcf7-mail-sent-ok { background: #d1fae5 !important; color: #065f46 !important; }
.wpcf7-validation-errors,
.wpcf7-mail-sent-ng { background: #fee2e2 !important; color: #991b1b !important; }

/* Błędy walidacji */
.wpcf7-not-valid-tip {
  color: #dc2626 !important;
  font-size: 12px !important;
  margin-top: 4px !important;
}
.wpcf7-not-valid input,
.wpcf7-not-valid select {
  border-color: #dc2626 !important;
}

/* Spinner */
.wpcf7-spinner { margin-left: 12px; }

@media (max-width: 480px) {
  .cp-form-wrap { padding: 28px 20px 24px; }
  .cp-form-row { grid-template-columns: 1fr; }
  .cp-form-wrap h3 { font-size: 22px; }
}
