/*
Theme Name:  Wnuk bez ryzyka
Description: Motyw dla projektu społecznego "Wnuk bez ryzyka" – gmina Piła. Profilaktyka uzależnień i dialog międzypokoleniowy.
Version:     1.0.0
Author:      [Twoje imię i nazwisko]
License:     GNU General Public License v2
License URI: http://www.gnu.org/licenses/gpl-2.0.html
Text Domain: wnuk-bez-ryzyka
*/

/* ============================================================
   WNUK BEZ RYZYKA — style.css
   ============================================================ */

:root {
  --primary:      #1a4f6e;
  --primary-dark: #0d2f44;
  --secondary:    #1a6fa8;
  --accent:       #c0550a;
  --accent-dark:  #a04008;
  --light-bg:     #eef6fb;
  --text:         #1a252f;
  --text-light:   #3d5166;
  --white:        #ffffff;
  --border:       #c8dff0;
  --shadow:       0 4px 24px rgba(26, 82, 118, 0.12);
  --radius:       12px;
}

/* ---- RESET & BASE ---- */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; font-size: 19px; }

body {
  font-family: 'Lato', sans-serif;
  color: var(--text);
  line-height: 1.85;
  background: var(--white);
}

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

a { color: var(--secondary); }
a:hover { color: var(--accent); }

/* ---- TYPOGRAPHY ---- */
h1 { font-size: clamp(2.1rem, 5vw, 3.4rem); font-weight: 900; line-height: 1.15; }
h2 { font-size: clamp(1.7rem, 3vw, 2.2rem); font-weight: 700; line-height: 1.25; margin-bottom: 1.1rem; color: var(--primary); }
h3 { font-size: 1.3rem; font-weight: 700; margin-bottom: 0.75rem; color: var(--primary); }
h4 { font-size: 1.05rem; font-weight: 700; margin-bottom: 0.4rem; }
p  { margin-bottom: 1rem; }
p:last-child { margin-bottom: 0; }

/* ---- LAYOUT ---- */
.container {
  max-width: 1100px;
  margin: 0 auto;
  padding: 0 1.5rem;
}

section { padding: 5rem 0; }

.bg-white { background: var(--white); }
.bg-light  { background: var(--light-bg); }

.two-col {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 3.5rem;
  align-items: start;
}

/* ---- NAVIGATION ---- */
#navbar {
  background: var(--primary);
  position: sticky;
  top: 0;
  z-index: 999;
  transition: box-shadow 0.3s;
}

#navbar.scrolled { box-shadow: 0 2px 16px rgba(0,0,0,0.25); }

.nav-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1rem 1.5rem;
  max-width: 1100px;
  margin: 0 auto;
}

.nav-logo {
  font-size: 1.15rem;
  font-weight: 900;
  color: white;
  text-decoration: none;
  letter-spacing: -0.3px;
}
.nav-logo span { color: var(--accent); }

.nav-links {
  display: flex;
  list-style: none;
  gap: 1.5rem;
  align-items: center;
}

.nav-links a {
  color: rgba(255,255,255,0.88);
  text-decoration: none;
  font-size: 0.92rem;
  font-weight: 600;
  transition: color 0.2s;
}
.nav-links a:hover { color: var(--accent); }

/* ---- DROPDOWN ---- */
.has-dropdown { position: relative; }

.dropdown {
  display: none;
  position: absolute;
  top: calc(100% + 10px);
  left: 50%;
  transform: translateX(-50%);
  background: var(--primary-dark);
  border-radius: 10px;
  min-width: 230px;
  list-style: none;
  padding: 0.5rem 0;
  box-shadow: 0 8px 24px rgba(0,0,0,0.3);
  z-index: 200;
}

.dropdown::before {
  content: '';
  position: absolute;
  top: -6px;
  left: 50%;
  transform: translateX(-50%);
  border-left: 6px solid transparent;
  border-right: 6px solid transparent;
  border-bottom: 6px solid var(--primary-dark);
}

.dropdown li a {
  display: block;
  padding: 0.6rem 1.25rem;
  font-size: 0.9rem;
  white-space: nowrap;
  border-radius: 0;
}
.dropdown li a:hover {
  background: rgba(255,255,255,0.08);
  color: var(--accent);
}

.has-dropdown.open .dropdown { display: block; }

/* ---- NAV CTA ---- */
.nav-links .nav-cta {
  background: var(--accent);
  color: white;
  padding: 0.45rem 1.1rem;
  border-radius: 20px;
}
.nav-links .nav-cta:hover { background: var(--accent-dark); color: white; }

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

/* ---- HERO ---- */
#hero {
  background:
    linear-gradient(135deg, rgba(26,82,118,0.88) 0%, rgba(26,82,118,0.70) 100%),
    #1a4f6e;
  min-height: 85vh;
  display: flex;
  align-items: center;
  padding: 6rem 0 5rem;
  color: white;
  position: relative;
}

.hero-inner {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 3rem;
  align-items: center;
  width: 100%;
  position: relative;
}

.hero-content { position: relative; max-width: 580px; }

/* Karta ebooka */
.ebook-card {
  background: rgba(255,255,255,0.12);
  border: 1px solid rgba(255,255,255,0.25);
  border-radius: 16px;
  backdrop-filter: blur(8px);
  display: flex;
  flex-direction: column;
  width: 260px;
  overflow: hidden;
  box-shadow: 0 8px 32px rgba(0,0,0,0.25);
}

.ebook-cover {
  background: linear-gradient(160deg, #0d2f44 0%, #1a6fa8 100%);
  padding: 1.5rem 1.5rem 1rem;
  display: flex;
  justify-content: center;
}

.ebook-cover-placeholder {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.75rem;
  padding: 1rem 0;
}

.ebook-icon { font-size: 3rem; }

.ebook-info {
  padding: 1.25rem 1.25rem 1.5rem;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.ebook-label {
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 1px;
  color: var(--accent);
  margin: 0;
}

.ebook-info h3 {
  font-size: 1rem;
  color: white;
  margin: 0;
  line-height: 1.35;
}

.ebook-desc {
  font-size: 0.82rem;
  color: rgba(255,255,255,0.75);
  margin: 0;
  line-height: 1.5;
}

.btn-ebook {
  background: white;
  color: var(--primary);
  font-size: 0.9rem;
  padding: 0.75rem 1rem;
  text-align: center;
  margin-top: 0.5rem;
  border-radius: 8px;
  font-weight: 700;
  text-decoration: none;
  transition: all 0.2s;
  display: block;
}
.btn-ebook:hover {
  background: var(--accent);
  color: white;
  transform: translateY(-2px);
}

@media (max-width: 900px) {
  .hero-inner { grid-template-columns: 1fr; justify-items: start; }
  .ebook-card { flex-direction: row; width: 100%; max-width: 500px; }
  .ebook-cover { width: 120px; flex-shrink: 0; padding: 1rem; }
  .ebook-cover-placeholder { padding: 0; }
  .ebook-icon { font-size: 2rem; }
}

.scroll-down {
  position: absolute;
  bottom: 2rem;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.4rem;
  color: rgba(255,255,255,0.8);
  text-decoration: none;
  font-size: 0.82rem;
  font-weight: 600;
  letter-spacing: 1px;
  text-transform: uppercase;
  animation: bounce 2s infinite;
  transition: color 0.2s, opacity 0.4s;
}
.scroll-down:hover { color: white; }

@keyframes bounce {
  0%, 100% { transform: translateX(-50%) translateY(0); }
  50%       { transform: translateX(-50%) translateY(8px); }
}

#hero h1 { color: white; margin-bottom: 1.25rem; }
#hero h1 .accent { color: var(--accent); }

.hero-lead {
  font-size: 1.15rem;
  opacity: 0.92;
  max-width: 580px;
  margin-bottom: 2.25rem;
  line-height: 1.65;
}

.hero-actions { display: flex; gap: 1rem; flex-wrap: wrap; }

/* ---- BUTTONS ---- */
.btn {
  display: inline-block;
  padding: 1rem 2.2rem;
  border-radius: 8px;
  font-weight: 700;
  font-size: 1.05rem;
  text-decoration: none;
  transition: all 0.2s;
  cursor: pointer;
  border: none;
  font-family: inherit;
  letter-spacing: 0.2px;
}

.btn-accent { background: var(--accent); color: white; }
.btn-accent:hover {
  background: var(--accent-dark);
  color: white;
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(192,85,10,0.35);
}

.btn-outline-white {
  border: 2px solid rgba(255,255,255,0.65);
  color: white;
  background: transparent;
}
.btn-outline-white:hover {
  background: rgba(255,255,255,0.12);
  color: white;
  border-color: white;
}

/* ---- STAT STRIP ---- */
.stat-strip { background: var(--primary-dark); padding: 3rem 0; }

.stat-strip-inner {
  display: flex;
  justify-content: space-around;
  flex-wrap: wrap;
  gap: 2rem;
  text-align: center;
}

.stat-item .number {
  display: block;
  font-size: 2.4rem;
  font-weight: 900;
  color: var(--accent);
  line-height: 1;
  margin-bottom: 0.4rem;
}

.stat-item .label {
  font-size: 0.88rem;
  color: rgba(255,255,255,0.78);
  line-height: 1.4;
}

/* ---- SECTION HEADER ---- */
.section-header { margin-bottom: 2.5rem; }

.section-tag {
  font-size: 0.82rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 1.5px;
  color: var(--secondary);
  margin-bottom: 0.5rem;
}

/* ---- CARDS ---- */
.cards-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 1.75rem;
  margin-top: 2rem;
}

.card {
  background: var(--white);
  border-radius: var(--radius);
  padding: 1.75rem;
  box-shadow: var(--shadow);
  border-top: 4px solid var(--secondary);
  transition: transform 0.2s, box-shadow 0.2s;
}
.card:hover {
  transform: translateY(-4px);
  box-shadow: 0 8px 32px rgba(26,82,118,0.14);
}

.card-icon { font-size: 2.2rem; margin-bottom: 0.75rem; }

/* ---- IMAGE PLACEHOLDER ---- */
.section-img {
  display: block;
  width: 100%;
  aspect-ratio: 4 / 3;
  object-fit: cover;
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  background: linear-gradient(135deg, var(--light-bg) 0%, #cde4f4 100%);
}

/* Wariant pionowy — dla zdjęć portretowych (np. sekcja "O projekcie").
   Proporcje dopasowane do zdjęcia + contain, by nic nie ucinać
   (na dole zdjęcia jest pasek z logo sponsorów). */
.section-img--portrait {
  aspect-ratio: 3555 / 5008;
  object-fit: contain;
}

/* Blok dofinansowania w sekcji "O projekcie" */
.project-funding {
  margin-top: 2rem;
  padding: 2rem;
  background: var(--light-bg);
  border-radius: var(--radius);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 2rem;
  flex-wrap: wrap;
}
.project-funding-text {
  margin: 0;
  font-size: 0.92rem;
  line-height: 1.6;
  color: var(--text-light);
  flex: 1 1 360px;
}
.project-logos {
  display: flex;
  align-items: center;
  gap: 1.5rem;
  flex-shrink: 0;
}
.project-logos img {
  height: 64px;
  width: auto;
}

/* Klauzula dofinansowania + logotypy w stopce (kolumna brand) */
.footer-funding-text {
  font-size: 0.85rem;
  line-height: 1.6;
  width: 100%;
  margin: 0;
}
.footer-logos {
  display: flex;
  align-items: center;
  gap: 1rem;
  flex-shrink: 0;
}
.footer-logos img {
  height: 56px;
  width: auto;
  background: #fff;
  padding: 0.5rem 0.75rem;
  border-radius: 8px;
}

/* ---- HIGHLIGHT BOX ---- */
.highlight-box {
  background: #fef9f0;
  border-left: 4px solid var(--accent);
  border-radius: 0 var(--radius) var(--radius) 0;
  padding: 1.25rem 1.5rem;
  margin: 1.5rem 0;
  font-size: 0.97rem;
}

/* ---- CHECKLIST ---- */
.checklist { list-style: none; margin-top: 1rem; }
.checklist li { padding: 0.35rem 0 0.35rem 1.9rem; position: relative; }
.checklist li::before { content: '✓'; position: absolute; left: 0; color: #27ae60; font-weight: 900; }

/* ---- WARNING SIGNS LIST ---- */
.signs-list { list-style: none; margin-top: 1.25rem; }
.signs-list li {
  padding: 0.65rem 0 0.65rem 2rem;
  position: relative;
  border-bottom: 1px solid var(--border);
  font-size: 0.96rem;
}
.signs-list li:last-child { border-bottom: none; }
.signs-list li::before { content: '⚠'; position: absolute; left: 0; color: var(--accent); font-size: 0.9rem; top: 0.7rem; }

/* ---- TIPS GRID ---- */
.tips-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 1.5rem;
  margin-top: 1.5rem;
}

.tip-card {
  background: var(--white);
  border-radius: var(--radius);
  padding: 1.5rem 1.25rem;
  box-shadow: var(--shadow);
  text-align: center;
}

.tip-icon { font-size: 2rem; margin-bottom: 0.6rem; display: block; }
.tip-card h4 { color: var(--primary); margin-bottom: 0.4rem; }
.tip-card p { font-size: 0.9rem; color: var(--text-light); margin: 0; }

/* ---- MYTHS & FACTS ---- */
.myth-fact-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 1.5rem;
  margin-top: 2rem;
}

.myth-card {
  background: var(--white);
  border-radius: var(--radius);
  padding: 1.5rem 1.75rem;
  box-shadow: var(--shadow);
  border-left: 5px solid;
}
.myth-card.mit  { border-color: #e74c3c; }
.myth-card.fakt { border-color: #27ae60; }
.myth-card p { font-size: 0.94rem; color: var(--text-light); margin-top: 0.5rem; margin-bottom: 0; }

.myth-label { font-size: 0.75rem; font-weight: 900; letter-spacing: 1.5px; text-transform: uppercase; margin-bottom: 0.35rem; }
.myth-label.mit  { color: #e74c3c; }
.myth-label.fakt { color: #27ae60; }

/* ---- HOTLINES ---- */
.hotline-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 1rem;
  margin-top: 1.5rem;
}

.hotline-card {
  background: var(--primary);
  color: white;
  border-radius: var(--radius);
  padding: 1.5rem 1.25rem;
  text-align: center;
  font-size: 0.92rem;
}

.hotline-number {
  display: block;
  font-size: 1.7rem;
  font-weight: 900;
  color: var(--accent);
  margin: 0.5rem 0;
  letter-spacing: -0.5px;
}

/* ---- HELP CARDS ---- */
.help-cards {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 1.75rem;
  margin-top: 2rem;
}

.help-cards-2col  { grid-template-columns: 1fr 1fr; }
.cards-grid-2col  { grid-template-columns: 1fr 1fr; }

.help-card {
  background: var(--white);
  border-radius: var(--radius);
  padding: 1.75rem;
  box-shadow: var(--shadow);
  border-top: 4px solid var(--primary);
}

.help-card h3 { font-size: 1.05rem; padding-bottom: 0.75rem; border-bottom: 1px solid var(--border); margin-bottom: 1rem; }

.contact-info { list-style: none; }
.contact-info li { padding: 0.3rem 0; font-size: 0.92rem; }
.contact-info .label { font-weight: 700; font-size: 0.78rem; text-transform: uppercase; letter-spacing: 0.5px; color: var(--text-light); }

/* ---- CONTACT FORM ---- */
.contact-form-wrap {
  background: var(--white);
  border-radius: var(--radius);
  padding: 2rem;
  box-shadow: var(--shadow);
}

/* ---- FOOTER ---- */
footer {
  background: var(--primary-dark);
  color: rgba(255,255,255,0.78);
  padding: 3.5rem 0 1.5rem;
}

.footer-grid {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr;
  gap: 3rem;
  margin-bottom: 2.5rem;
}

.footer-brand strong { display: block; font-size: 1.15rem; color: white; margin-bottom: 0.75rem; }
.footer-brand p { font-size: 0.9rem; margin-bottom: 0.4rem; }

.footer-links { list-style: none; }
.footer-links li { margin-bottom: 0.5rem; }
.footer-links a { color: rgba(255,255,255,0.7); text-decoration: none; font-size: 0.9rem; transition: color 0.2s; }
.footer-links a:hover { color: var(--accent); }

.footer-bottom {
  border-top: 1px solid rgba(255,255,255,0.12);
  padding-top: 1.25rem;
  text-align: center;
  font-size: 0.82rem;
  opacity: 0.55;
}

/* ============================================================
   RESPONSIVE
   ============================================================ */

@media (max-width: 900px) {
  .footer-grid { grid-template-columns: 1fr 1fr; }
  .footer-grid > div:first-child { grid-column: 1 / -1; }
}

@media (max-width: 768px) {
  html { font-size: 18px; }
  section { padding: 3rem 0; }
  .two-col { grid-template-columns: 1fr; gap: 2rem; }
  .help-cards-2col  { grid-template-columns: 1fr; }
  .cards-grid-2col  { grid-template-columns: 1fr; }
  #hero { min-height: 70vh; padding: 4rem 0 5rem; }
  .nav-toggle { display: flex; }
  .nav-links {
    display: none;
    position: absolute;
    top: 100%;
    left: 0; right: 0;
    background: var(--primary-dark);
    flex-direction: column;
    align-items: flex-start;
    padding: 1rem 1.5rem 1.5rem;
    gap: 0.75rem;
    box-shadow: 0 4px 16px rgba(0,0,0,0.3);
  }
  .nav-links.open { display: flex; }
  .nav-links a { font-size: 1rem; }
  .dropdown {
    display: block;
    position: static;
    transform: none;
    box-shadow: none;
    background: rgba(255,255,255,0.06);
    border-radius: 8px;
    padding: 0.25rem 0 0.25rem 1rem;
    margin-top: 0.25rem;
    min-width: unset;
    width: 100%;
  }
  .dropdown::before { display: none; }
  .has-dropdown { width: 100%; }
  .stat-strip-inner { flex-direction: column; gap: 1.5rem; }
  .footer-grid { grid-template-columns: 1fr; gap: 1.5rem; }
  .hero-actions { flex-direction: column; align-items: flex-start; }
  .myth-fact-grid { grid-template-columns: 1fr; }
}

@media (max-width: 480px) {
  html { font-size: 17px; }
  .container { padding: 0 1rem; }
  .help-cards { grid-template-columns: 1fr; }
  .hotline-grid { grid-template-columns: 1fr 1fr; }
  .tips-grid { grid-template-columns: 1fr 1fr; }
}

@media (max-width: 360px) {
  html { font-size: 16px; }
  .hotline-grid { grid-template-columns: 1fr; }
  .tips-grid    { grid-template-columns: 1fr; }
  .btn { padding: 0.9rem 1.5rem; font-size: 1rem; }
  .stat-item .number { font-size: 2rem; }
}

/* ============================================================
   FORMULARZ KONTAKTOWY (Contact Form 7)
   Dopasowanie pól CF7 do wyglądu reszty strony
   ============================================================ */
.wpcf7-form p { margin: 0 0 1.1rem; }

.wpcf7-form label {
  display: block;
  font-weight: 700;
  font-size: 0.92rem;
  color: var(--primary);
  margin-bottom: 0.35rem;
}

.wpcf7-form input[type="text"],
.wpcf7-form input[type="email"],
.wpcf7-form textarea {
  width: 100%;
  padding: 0.8rem 1rem;
  border: 1px solid var(--border);
  border-radius: 8px;
  font-size: 1rem;
  font-family: inherit;
  color: var(--text);
  background: var(--white);
  transition: border-color 0.2s, box-shadow 0.2s;
}
.wpcf7-form input[type="text"]:focus,
.wpcf7-form input[type="email"]:focus,
.wpcf7-form textarea:focus {
  outline: none;
  border-color: var(--secondary);
  box-shadow: 0 0 0 3px rgba(26, 111, 168, 0.15);
}
.wpcf7-form textarea { min-height: 140px; resize: vertical; }

/* Zgoda RODO / pole wyboru */
.wpcf7-form .wpcf7-acceptance .wpcf7-list-item { margin: 0; }
.wpcf7-form .wpcf7-acceptance label {
  display: flex;
  align-items: flex-start;
  gap: 0.5rem;
  font-weight: 400;
  font-size: 0.85rem;
  color: var(--text-light);
}
.wpcf7-form .wpcf7-acceptance input[type="checkbox"] {
  margin-top: 0.2rem;
  flex-shrink: 0;
}

/* Przycisk „Wyślij" — jak .btn .btn-accent */
.wpcf7-form .wpcf7-submit {
  display: inline-block;
  width: 100%;
  padding: 1rem 2.2rem;
  background: var(--accent);
  color: #fff;
  border: none;
  border-radius: 8px;
  font-size: 1.05rem;
  font-weight: 700;
  font-family: inherit;
  letter-spacing: 0.2px;
  cursor: pointer;
  transition: all 0.2s;
}
.wpcf7-form .wpcf7-submit:hover {
  background: var(--accent-dark);
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(192, 85, 10, 0.35);
}

/* Walidacja i komunikaty */
.wpcf7-not-valid-tip { color: #c0392b; font-size: 0.85rem; margin-top: 0.25rem; }
.wpcf7-form input.wpcf7-not-valid,
.wpcf7-form textarea.wpcf7-not-valid { border-color: #c0392b; }

.wpcf7-response-output {
  margin: 1rem 0 0 !important;
  padding: 0.75rem 1rem !important;
  border-radius: 8px;
  font-size: 0.9rem;
}
.wpcf7 form.invalid .wpcf7-response-output,
.wpcf7 form.unaccepted .wpcf7-response-output {
  border-color: #e0a800;
  background: #fff8e6;
  color: #7a5b00;
}
.wpcf7 form.sent .wpcf7-response-output {
  border-color: #2e7d32;
  background: #eafaf0;
  color: #1e5e22;
}
.wpcf7-spinner { margin: 0.5rem auto 0; }
