/* ===========================================================
   Vintage-Retro CSS for Rodzinne Wrota - Mobile-first, Flexbox
   =========================================================== */

/* RESET & NORMALIZE */
html, body, div, span, applet, object, iframe,
h1, h2, h3, h4, h5, h6, p, blockquote, pre,
a, abbr, acronym, address, big, cite, code,
del, dfn, em, img, ins, kbd, q, s, samp,
small, strike, strong, sub, sup, tt, var,
b, u, i, center,
dl, dt, dd, ol, ul, li,
fieldset, form, label, legend,
table, caption, tbody, tfoot, thead, tr, th, td,
article, aside, canvas, details, embed,
figure, figcaption, footer, header, hgroup,
menu, nav, output, ruby, section, summary,
time, mark, audio, video {
  margin: 0;
  padding: 0;
  border: 0;
  font-size: 100%;
  font: inherit;
  vertical-align: baseline;
  box-sizing: border-box;
}
html {
  font-size: 16px;
  -webkit-text-size-adjust: 100%;
  scroll-behavior: smooth;
}
body {
  line-height: 1.5;
  font-family: 'Open Sans', Arial, Helvetica, sans-serif;
  background: #FAF7EF;
  color: #42372c;
  min-height: 100vh;
}
img {
  max-width: 100%;
  display: block;
  height: auto;
}
ul, ol {
  list-style: none;
}
a {
  color: inherit;
  text-decoration: none;
  transition: color 0.2s;
}

/* FONTS (Retro flavor) */
@import url('https://fonts.googleapis.com/css2?family=Open+Sans:wght@400;700&family=Montserrat:wght@700&family=Quicksand:wght@700&family=Permanent+Marker&family=Roboto+Slab:ital,wght@0,700;1,400&display=swap');

:root {
  --color-primary: #2571B8;
  --color-secondary: #F2B233;
  --color-accent: #FFFFFF;
  --color-bg: #FAF7EF;
  --color-dark: #42372c;
  --color-muted: #e0d9cd;
  --color-paper: #FFF8F0;
  --color-highlight: #edcf99;

  --font-display: 'Montserrat', 'Roboto Slab', 'Permanent Marker', serif;
  --font-retro: 'Roboto Slab', 'Times New Roman', serif;
  --font-body: 'Open Sans', Arial, Helvetica, sans-serif;
}

/* UTILS */
.container {
  width: 100%;
  max-width: 1180px;
  margin: 0 auto;
  padding: 0 16px;
  display: flex;
  flex-direction: column;
  gap: 0;
}

.content-wrapper {
  width: 100%;
  margin: 0 auto;
}

.text-section {
  margin-bottom: 24px;
}

.section {
  margin-bottom: 60px;
  padding: 40px 20px;
  background: var(--color-paper);
  border-radius: 18px;
  box-shadow: 0 5px 28px rgba(66, 55, 44, 0.08);
  border: 1.5px solid var(--color-muted);
}

.card-container {
  display: flex;
  flex-wrap: wrap;
  gap: 24px;
}

.card {
  margin-bottom: 20px;
  position: relative;
  background: #FFF8F0;
  border-radius: 14px;
  box-shadow: 0 2px 6px rgba(37,113,184,0.08);
  border: 1.5px solid var(--color-highlight);
  padding: 20px;
  min-width: 260px;
  flex: 1 1 300px;
  transition: transform 0.15s, box-shadow 0.15s;
}
.card:hover {
  transform: translateY(-4px) scale(1.03) rotate(-1deg);
  box-shadow: 0 6px 16px rgba(37,113,184,0.13);
  border-color: var(--color-secondary);
}

.content-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 20px;
  justify-content: space-between;
}

.text-image-section {
  display: flex;
  align-items: center;
  gap: 30px;
  flex-wrap: wrap;
}

@media (max-width: 768px) {
  .text-image-section, .content-grid, .card-container {
    flex-direction: column;
    gap: 20px;
    align-items: stretch;
  }
  .container {
    padding: 0 8px;
  }
  .section {
    padding: 28px 8px;
  }
}

.testimonial-card {
  display: flex;
  align-items: center;
  gap: 20px;
  padding: 20px;
  border-radius: 16px;
  background: #fcf2e3;
  border: 2px dashed var(--color-secondary);
  margin-bottom: 24px;
  box-shadow: 0 2px 14px rgba(66,55,44,0.09);
  color: #302515;
}
.testimonial-card p {
  font-style: italic;
  font-size: 1.15rem;
  margin-right: 18px;
}
.testimonial-card b {
  font-family: var(--font-retro);
  color: var(--color-primary);
  font-size: 1rem;
}
.testimonial-card > div:last-child {
  font-size: 23px;
  letter-spacing: 0.1em;
  color: #FFC700;
  margin-left: auto;
  font-family: 'Permanent Marker','Montserrat',cursive;
}

.feature-item {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 15px;
  background: #F2B23322;
  border-radius: 12px;
  padding: 18px 18px 16px 28px;
  border: 1.5px solid #f3e6d1;
  margin-bottom: 20px;
}

/* HEADER */
header {
  width: 100%;
  background: var(--color-bg);
  border-bottom: 3px solid var(--color-secondary);
  font-family: var(--font-retro);
}
header .container {
  flex-direction: row;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 16px 8px 12px 8px;
}
.logo img {
  width: 150px;
  height: auto;
  aspect-ratio: 4/1;
}
nav {
  display: flex;
  flex-direction: row;
  gap: 20px;
  align-items: center;
}
nav a {
  font-family: var(--font-retro);
  color: #564121;
  font-weight: bold;
  font-size: 1.08rem;
  padding: 6px 10px;
  border-radius: 6px;
  transition: background 0.15s, color 0.15s;
}
nav a:hover, nav a:focus {
  background: var(--color-secondary);
  color: var(--color-primary);
}
.btn-primary {
  background: var(--color-primary);
  color: #fffdd7;
  font-family: var(--font-display) !important;
  font-size: 1.15rem;
  font-weight: bold;
  border: none;
  border-radius: 30px;
  padding: 11px 34px;
  box-shadow: 0 2px 7px rgba(37,113,184,0.11);
  cursor: pointer;
  letter-spacing: 0.07em;
  margin-left: 12px;
  text-shadow: 0 1px 0 #284991;
  transition: background 0.15s, box-shadow 0.2s, color 0.14s;
  outline: none;
}
.btn-primary:hover, .btn-primary:focus {
  background: var(--color-secondary);
  color: var(--color-primary);
  box-shadow: 0 5px 16px rgba(242,178,51, .26);
}

/* ================================
      MOBILE BURGER NAVIGATION
   ================================ */
.mobile-menu-toggle {
  display: none;
  position: fixed;
  top: 23px;
  right: 20px;
  z-index: 1002;
  background: var(--color-primary);
  color: white;
  border: none;
  border-radius: 8px;
  font-size: 2.2rem;
  width: 54px;
  height: 54px;
  box-shadow: 0 1px 8px 0 rgba(37,113,184,0.10);
  transition: background 0.16s, color 0.18s;
}
.mobile-menu-toggle:hover, .mobile-menu-toggle:focus {
  background: var(--color-secondary);
  color: var(--color-primary);
}

.mobile-menu {
  position: fixed;
  top: 0;
  left: 0;
  height: 100vh;
  width: 100vw;
  background: #f9e7c3ee;
  z-index: 2000;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  justify-content: flex-start;
  transform: translateX(-100vw);
  transition: transform 0.33s cubic-bezier(.82,.01,.18,1);
  box-shadow: 2px 0 24px rgba(66, 55, 44,.17);
}
.mobile-menu.open {
  transform: translateX(0);
}
.mobile-menu-close {
  background: var(--color-primary);
  color: #ffe;
  border: none;
  border-radius: 50%;
  width: 46px;
  height: 46px;
  font-size: 2rem;
  align-self: flex-end;
  margin: 28px 16px 18px 0;
  box-shadow: 0 1px 7px #f2b23355;
  cursor: pointer;
  transition: background 0.18s;
}
.mobile-menu-close:hover, .mobile-menu-close:focus {
  background: var(--color-secondary);
  color: var(--color-primary);
}
.mobile-nav {
  display: flex;
  flex-direction: column;
  width: 100%;
  gap: 18px;
  padding: 0 34px;
}
.mobile-nav a {
  color: #564121;
  font-family: var(--font-retro);
  font-weight: bold;
  font-size: 1.2rem;
  padding: 14px 8px;
  border-radius: 8px;
  transition: background .11s, color .13s;
  margin-bottom: 9px;
}
.mobile-nav a:hover, .mobile-nav a:focus {
  background: var(--color-secondary);
  color: var(--color-primary);
}

@media (max-width: 1050px) {
  header nav, header .btn-primary {
    display: none;
  }
  .mobile-menu-toggle {
    display: block;
  }
}
@media (min-width: 1051px) {
  .mobile-menu, .mobile-menu-toggle { display: none !important; }
}

/* ==================================
   LAYOUT: TYPOGRAPHY & HIERARCHY
   ================================== */
h1, .h1 {
  font-family: var(--font-display);
  font-size: 2.35rem;
  line-height: 1.18;
  letter-spacing: 0.02em;
  margin-bottom: 20px;
  color: var(--color-primary);
  text-shadow: 0 1px 0 #f2e6b8,0 2px 2px #f2b23333;
}
h2, .h2 {
  font-family: var(--font-retro);
  font-size: 1.6rem;
  letter-spacing: 0.01em;
  color: #b37228;
  margin-bottom: 12px;
}
h3, .h3 {
  font-family: var(--font-display);
  font-size: 1.32rem;
  color: var(--color-dark);
  margin-bottom: 10px;
}

p {
  margin-bottom: 13px;
  font-size: 1rem;
  color: #4b3a26;
}
b, strong {
  font-weight: 700;
  color: #6e440a;
  font-family: var(--font-retro);
}

ul li, ol li {
  margin-bottom: 8px;
  font-size: 1.02rem;
  color: #564121;
  position: relative;
  padding-left: 20px;
}
ul li:before {
  content: '\2605';
  position: absolute;
  left: 0;
  color: var(--color-secondary);
  font-size: 0.96em;
}
table {
  width: 100%;
  border-collapse: collapse;
  background: #FFF8F0;
  font-family: var(--font-body);
  margin-bottom: 16px;
  box-shadow: 0 2px 12px rgba(37,113,184,0.06);
}
thead {
  background: #fcf2e3;
}
thead th {
  font-family: var(--font-retro);
  color: var(--color-primary);
  font-size: 1.12rem;
  border-bottom: 2px solid var(--color-secondary);
  padding: 8px 9px;
}
tbody td {
  padding: 7px 11px;
  border-bottom: 1px solid #ecdabb;
  font-size: 1rem;
  color: #4b3a26;
}
tbody tr:last-child td {
  border-bottom: 0;
}

/* ===================================
   FOOTER
   =================================== */
footer {
  background: #f6e7ca;
  border-top: 3px solid var(--color-secondary);
  margin-top: 48px;
}
footer .container {
  flex-direction: row;
  gap: 20px;
  align-items: center;
  justify-content: space-between;
  padding: 24px 8px 20px 8px;
  flex-wrap: wrap;
}
footer nav {
  flex-direction: row;
  gap: 18px;
  color: #6e440a;
}
footer nav a {
  font-family: var(--font-retro);
  font-size: 0.98rem;
  color: #9b7422;
  padding: 6px 5px;
}
footer nav a:hover, footer nav a:focus {
  color: var(--color-primary);
  text-decoration: underline;
}
footer p {
  color: #836121;
  font-family: var(--font-retro);
  font-size: 0.94rem;
  margin: 0;
  opacity: .75;
}
footer img {
  height: 48px;
}
@media (max-width: 685px) {
  footer .container {
    flex-direction: column;
    gap: 10px;
    align-items: flex-start;
  }
  footer nav {
    gap: 9px;
    flex-wrap: wrap;
  }
}

/* ================================
    MANDATORY SPACING RULES
   (Do not alter spaces below)
   ================================ */
.section {
  margin-bottom: 60px;
  padding: 40px 20px;
}
.card-container {
  display: flex;
  flex-wrap: wrap;
  gap: 24px;
}
.card {
  margin-bottom: 20px;
  position: relative;
}
.content-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 20px;
  justify-content: space-between;
}
.text-image-section {
  display: flex;
  align-items: center;
  gap: 30px;
  flex-wrap: wrap;
}
.testimonial-card {
  display: flex;
  align-items: center;
  gap: 20px;
  padding: 20px;
}
.feature-item {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 15px;
}

/* =================================
      RESPONSIVE LAYOUTS
   ================================= */
@media (max-width: 900px) {
  header .container, footer .container {
    max-width: 100vw;
    padding: 0 10px;
  }
}
@media (max-width: 600px) {
  h1 { font-size: 1.48rem; }
  h2 { font-size: 1.13rem; }
  h3 { font-size: 1.01rem; }
  .btn-primary { padding: 8px 18px; font-size: 1em; }
  .section { padding: 22px 3px; }
  .testimonial-card { flex-direction: column; align-items: flex-start; }
  .logo img { width: 112px; }
}

/* =================================
      RETRO/VINTAGE DECOR ELEMENTS
   ================================= */
.section {
  position: relative;
  background: repeating-linear-gradient(135deg, #FFF8F0 0px, #f9e7c3 24px, #FFF8F0 32px, #FFF8F0 48px);
}
.section:before {
  content: '';
  display: block;
  position: absolute;
  top: -10px; left: -10px; right: -10px; bottom: -10px;
  border: 2px double var(--color-secondary);
  pointer-events: none;
  z-index: 0;
  border-radius: 20px;
  opacity: 0.22;
}

.card {
  background: linear-gradient(105deg, #fffdf9 68%, #f2e6b8 100%);
}
.card:after {
  content: '';
  display: block;
  position: absolute;
  right: 11px;
  bottom: 12px;
  width: 32px; height: 23px;
  background: url('../assets/deco-retro.svg') no-repeat center/contain;
  opacity: .18;
  z-index: 1;
  pointer-events: none;
}

/* =====================
      BUTTONS & INTERACTIONS
   ===================== */
.btn-primary, .cookie-banner button, .cookie-modal-actions button {
  box-shadow: 0 2px 8px #f2b23313;
  transition: background 0.13s, color 0.11s, box-shadow 0.15s;
}
.btn-primary:focus, .cookie-banner button:focus, .cookie-modal-actions button:focus {
  outline: none;
  box-shadow: 0 0 0 2px var(--color-secondary) inset, 0 1px 8px #f2b23325;
}

/* =====================
     COOKIE BANNER & MODAL
   ===================== */
.cookie-banner {
  position: fixed;
  bottom: 0; left: 0; right: 0;
  z-index: 3000;
  background: #FFF8E1;
  border-top: 2.5px solid #e8c57f;
  color: #563d16;
  font-family: var(--font-body);
  font-size: 1rem;
  box-shadow: 0 -6px 30px #b3a16811;
  padding: 17px 10px 14px 18px;
  display: flex;
  flex-direction: column;
  gap: 14px;
  align-items: flex-start;
  transition: transform 0.29s cubic-bezier(.64,.16,.33,1), opacity 0.19s;
}
.cookie-banner.hide {
  transform: translateY(100%);
  opacity: 0;
  pointer-events: none;
}
.cookie-banner .cookie-actions {
  display: flex;
  flex-direction: row;
  gap: 11px;
  margin-top: 4px;
}
.cookie-banner button {
  padding: 7px 17px;
  border-radius: 7px;
  border: none;
  font-family: var(--font-retro);
  font-weight: bold;
  font-size: 1.03rem;
  background: var(--color-primary);
  color: #fff;
  cursor: pointer;
}
.cookie-banner button.cookie-settings {
  background: var(--color-secondary);
  color: var(--color-primary);
  border: 2px solid var(--color-secondary);
}
.cookie-banner button:hover, .cookie-banner button:focus {
  filter: brightness(0.95) contrast(1.1);
  background: var(--color-secondary);
  color: var(--color-primary);
}

/* COOKIE MODAL POPUP */
.cookie-modal {
  position: fixed;
  left: 0; right: 0; top: 0; bottom: 0;
  z-index: 3100;
  background: rgba(40,27,9,0.33);
  display: flex;
  align-items: center;
  justify-content: center;
  pointer-events: auto;
  opacity: 1;
  transition: opacity 0.17s;
}
.cookie-modal.hide {
  opacity: 0;
  pointer-events: none;
}
.cookie-modal-content {
  background: #fffdf3;
  border-radius: 18px;
  max-width: 380px;
  width: 95%;
  padding: 27px 20px 22px 23px;
  box-shadow: 0 10px 56px #b3a16824;
  position: relative;
  border: 2.5px solid var(--color-secondary);
  display: flex;
  flex-direction: column;
  gap: 20px;
}
.cookie-modal-close {
  position: absolute;
  top: 9px;
  right: 10px;
  background: none;
  color: #84600a;
  border: none;
  font-size: 1.7rem;
  cursor: pointer;
  padding: 2px 7px;
}
.cookie-modal-content h3 {
  font-family: var(--font-retro);
  color: var(--color-primary);
  font-size: 1.12rem;
  margin: 0 0 7px 0;
}
.cookie-modal-categories {
  display: flex;
  flex-direction: column;
  gap: 12px;
}
.cookie-modal-category {
  display: flex;
  align-items: center;
  gap: 11px;
}
.cookie-modal-category input[type=checkbox] {
  accent-color: var(--color-primary);
  width: 18px;
  height: 18px;
}
.cookie-modal-category label {
  font-size: 1rem;
  color: #563d16;
  font-family: var(--font-retro);
}
.cookie-modal-category .always-enabled {
  color: #ae941f;
  font-size: .96em;
  margin-left: 4px;
}
.cookie-modal-actions {
  display: flex;
  flex-direction: row;
  gap: 13px;
  margin-top: 3px;
}
.cookie-modal-actions button {
  background: var(--color-primary);
  color: #fff;
  font-family: var(--font-retro);
  font-size: 1.03rem;
  font-weight: bold;
  padding: 8px 19px;
  border-radius: 7px;
  border: none;
  cursor: pointer;
  transition: background .12s, color .13s;
}
.cookie-modal-actions button.cancel {
  background: var(--color-secondary);
  color: var(--color-primary);
}
.cookie-modal-actions button:hover, .cookie-modal-actions button:focus {
  background: var(--color-secondary);
  color: var(--color-primary);
}
@media (max-width: 440px) {
  .cookie-modal-content { padding: 19px 6px 18px 9px; }
}

/* ===============================
      FORMS (optional, in case)
   =============================== */
input, select, textarea {
  font-family: var(--font-body);
  border: 1.6px solid #e8c57f;
  background: #fffde7;
  border-radius: 7px;
  padding: 7px 10px;
  font-size: 1rem;
  transition: border .13s;
}
input:focus, select:focus, textarea:focus {
  border-color: var(--color-primary);
  outline: none;
}

/* ===============================
     Misc Retro Details
   =============================== */
::-webkit-scrollbar {
  width: 13px;
  background: #fcf2e3;
  border-left: 1px solid #f2b23333;
}
::-webkit-scrollbar-thumb {
  background: #f2b23355;
  border-radius: 13px;
}
::-webkit-scrollbar-thumb:hover { background: #f2b233aa; }

hr {
  border: none;
  border-top: 1.4px dashed #f2b233cc;
  margin: 32px 0 22px 0;
}

/* ===============================
      ANIMATIONS
   =============================== */
a, .btn-primary, .mobile-menu-toggle, .mobile-menu-close, .cookie-banner button, .cookie-modal-actions button {
  transition: background .16s, color .13s, box-shadow .15s;
}
.section, .card, .testimonial-card, .feature-item {
  transition: box-shadow .19s, border .15s, background .13s;
}

/* ===============================
     REMOVE UNNECESSARY BORDERS
   =============================== */
@media (max-width: 600px) {
  thead th, tbody td {
    padding: 6px 5px;
  }
}

/* ===============================
     Z-INDEX UTILS
   =============================== */
.mobile-menu { z-index: 2000; }
.mobile-menu-toggle { z-index: 2500; }
.cookie-banner { z-index: 3000; }
.cookie-modal { z-index: 3100; }

/* ===============================
     A11Y: Focus Outline for Keyboard
   =============================== */
:focus-visible {
  outline: 2.5px solid var(--color-secondary);
  outline-offset: 2px;
}

/* =======================================
    THE END - Rodzinne Wrota Vintage CSS
   ======================================= */
