/* ===================================================================
   CSS 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 {
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}
body {
  line-height: 1.6;
  background: #FFF7F2;
  color: #28475A;
  min-height: 100vh;
  font-family: 'Open Sans', Arial, sans-serif;
  font-size: 16px;
}
*, *:before, *:after {
  box-sizing: inherit;
}
a {
  color: #28475A;
  text-decoration: none;
  transition: color 0.2s ease;
}
a:hover, a:focus {
  color: #F6B883;
  text-decoration: underline;
}
ub, ol {
  padding-left: 24px;
  margin-bottom: 20px;
}
h1, h2, h3, h4, h5, h6 {
  color: #28475A;
  font-family: 'Montserrat', 'Open Sans', Arial, sans-serif;
  font-weight: 700;
}
h1 { font-size: 2.75rem; margin-bottom: 24px; }
@media (max-width: 768px) { h1 { font-size: 2.1rem; } }
h2 { font-size: 2rem; margin-bottom: 20px; }
h3 { font-size: 1.45rem; margin-bottom: 14px; }
h4 { font-size: 1.15rem; margin-bottom: 10px; }
h5, h6 { font-size: 1rem; margin-bottom: 8px; }
p { font-size: 1.1rem; margin-bottom: 16px; }
strong { color: #28475A; }
img { max-width: 100%; height: auto; border-radius: 10px; display: block; }
hr { border: none; border-bottom: 1px solid #ececec; margin: 2em 0; }

/* ===================================================================
   BRAND & LAYOUT VARIABLES (with fallback)
   =================================================================== */
:root {
  --primary: #28475A;
  --secondary: #82A9C2;
  --accent: #F6B883;
  --background: #FFF7F2;
  --surface: #FFFFFF;
  --shadow: 0 4px 16px 0 rgba(40,71,90,0.10);
  --shadow-hover: 0 8px 28px 0 rgba(246,184,131,0.18);
  --radius: 18px;
  --radius-lg: 30px;
  --font-display: 'Montserrat', 'Open Sans', Arial, sans-serif;
  --font-body: 'Open Sans', Arial, sans-serif;
}

body {
  background: var(--background);
  color: var(--primary);
  font-family: var(--font-body);
}

.container {
  width: 100%;
  max-width: 1160px;
  margin-left: auto;
  margin-right: auto;
  padding: 0 16px;
  display: flex;
  flex-direction: column;
  gap: 0;
}

.content-wrapper {
  width: 100%;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
}

/* SECTION SPACING & LAYOUTS */
.section {
  margin-bottom: 60px;
  padding: 40px 20px;
}
.card-container {
  display: flex;
  flex-wrap: wrap;
  gap: 24px;
}
.card {
  background: var(--surface);
  margin-bottom: 20px;
  position: relative;
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 2em 1.5em;
  flex: 1 1 320px;
  transition: box-shadow 0.18s;
  display: flex;
  flex-direction: column;
  justify-content: center;
}
.card:hover {
  box-shadow: var(--shadow-hover);
}
.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 { flex-direction: column; align-items: flex-start; gap: 16px; }
}
.testimonial-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 20px;
  background: #FFF8ED;
  padding: 20px;
  border-radius: var(--radius);
  margin-bottom: 20px;
  box-shadow: var(--shadow);
  min-width: 260px;
  max-width: 100%;
  flex: 1 1 320px;
  color: #27343D;
  font-size: 1.05rem;
  transition: box-shadow 0.18s, transform 0.12s;
}
.testimonial-card strong { color: var(--primary); font-size: 1.1em; font-weight: 600; }
.testimonial-card .stars { color: #F6B883; font-size: 1.35em; letter-spacing: 1px; }
.testimonials-slider {
  display: flex;
  flex-wrap: wrap;
  gap: 24px;
  margin-top: 8px;
}

.feature-item {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 15px;
  background: var(--surface);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 28px 20px 22px 20px;
  margin-bottom: 20px;
  min-width: 180px;
  transition: box-shadow 0.18s, transform 0.12s;
}
.feature-item img { width: 38px; height: 38px; border-radius: 10px; background: #FFF9F3; box-shadow: none; }
.feature-item h3 { margin-top: 6px; font-size: 1.19rem; color: var(--primary); }
.feature-item:hover { box-shadow: var(--shadow-hover); transform: translateY(-2px); }

@media (max-width: 768px) {
  .features-grid, .testimonials-slider { flex-direction: column; }
  .feature-item, .testimonial-card { width: 100%; max-width: 100%; }
  .card-container, .content-grid { flex-direction: column; gap: 20px; }
}

/* Features Grid */
.features-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 24px;
}

/* FAQ Styles */
.faq-list {
  display: flex;
  flex-wrap: wrap;
  gap: 24px;
  margin-top: 12px;
}
.faq-item {
  background: var(--surface);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 26px 20px 20px 20px;
  min-width: 220px;
  flex: 1 1 320px;
  margin-bottom: 20px;
  transition: box-shadow 0.18s, transform 0.13s;
}
.faq-item:hover { box-shadow: var(--shadow-hover); transform: scale(1.01); }
.faq-item h3 { font-size: 1.17rem; margin-bottom: 9px; color: var(--accent); }

@media (max-width: 768px) {
  .faq-list { flex-direction: column; gap: 16px; }
  .faq-item { width: 100%; }
}

/*.blog-list for Porady Finansowe*/
.blog-list {
  display: flex;
  flex-direction: column;
  gap: 24px;
  margin-bottom: 18px;
}
.blog-list li {
  background: var(--surface);
  padding: 21px 18px;
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  list-style: none;
  margin-bottom: 0;
}
.blog-list h3 { color: var(--accent); margin-bottom: 12px; }
.blog-list a {
  color: var(--primary);
  font-weight: 600;
  font-size: 1.04em;
  margin-top: 8px;
  display: inline-block;
  transition: color 0.18s;
}
.blog-list a:hover { color: var(--accent); }

/* ===================================================================
   HEADER & NAVIGATION STYLES
   =================================================================== */
header {
  background: var(--surface);
  box-shadow: 0 2px 10px rgba(40,71,90,0.08);
  padding-bottom: 0;
  position: sticky;
  top: 0;
  z-index: 100;
}
header .container {
  display: flex;
  align-items: center;
  flex-direction: row;
  justify-content: space-between;
  gap: 22px;
  height: 86px;
}
.logo img {
  height: 48px;
  width: auto;
  vertical-align: middle;
  border-radius: var(--radius-lg);
}
nav {
  display: flex;
  flex-direction: row;
  align-items: center;
  gap: 24px;
}
nav a {
  font-family: var(--font-display);
  font-size: 1.12rem;
  font-weight: 500;
  padding: 4px 10px;
  color: var(--primary);
  border-radius: 10px;
  transition: background 0.14s, color 0.16s;
}
nav a:hover, nav a.active {
  background: var(--accent);
  color: var(--primary);
}
.btn-primary {
  font-family: var(--font-display);
  font-size: 1.09rem;
  padding: 12px 32px;
  border: none;
  border-radius: var(--radius-lg);
  background: var(--accent);
  color: var(--primary);
  font-weight: 700;
  cursor: pointer;
  box-shadow: 0 3px 14px rgba(246,184,131,0.13);
  transition: background 0.18s, color 0.16s, box-shadow 0.14s, transform 0.13s;
  margin-left: 18px;
  text-align: center;
  outline: none;
  display: inline-block;
}
.btn-primary:hover, .btn-primary:focus {
  background: #FFD6AA;
  color: #28475A;
  box-shadow: 0 5px 22px rgba(246,184,131,0.20);
  transform: translateY(-2px) scale(1.020);
}

/* Hide desktop nav on mobile */
@media (max-width: 1024px) {
  header .container nav {
    display: none;
  }
  .btn-primary { margin-left: 0; }
}

/* ===================================================================
   MOBILE MENU STYLES
   =================================================================== */
.mobile-menu-toggle {
  display: none;
  background: var(--accent);
  color: var(--primary);
  border: none;
  font-size: 2rem;
  border-radius: 50%;
  padding: 8px 16px;
  margin-left: 5px;
  cursor: pointer;
  transition: background 0.17s, box-shadow 0.15s;
  z-index: 203;
}
.mobile-menu-toggle:focus, .mobile-menu-toggle:hover {
  background: #ffd8b0;
  box-shadow: 0 2px 15px rgba(246,184,131,0.18);
}
@media (max-width: 1024px) {
  .mobile-menu-toggle {
    display: block;
  }
}
.mobile-menu {
  position: fixed;
  top: 0; left: 0; right: 0; bottom: 0;
  background: rgba(246,184,131,0.94);
  z-index: 1999;
  transform: translateX(100%);
  transition: transform 0.32s cubic-bezier(.6,.28,0,1);
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  padding: 0;
  overflow-y: auto;
  pointer-events: none;
  opacity: 0;
}
.mobile-menu.active {
  transform: translateX(0);
  pointer-events: all;
  opacity: 1;
}
.mobile-menu-close {
  align-self: flex-end;
  background: var(--surface);
  color: var(--primary);
  border: none;
  font-size: 2.3rem;
  padding: 8px 22px 8px 8px;
  border-radius: 30px;
  margin: 18px 12px 14px 0;
  cursor: pointer;
  transition: background 0.13s, color 0.13s;
  z-index: 2000;
}
.mobile-menu-close:focus, .mobile-menu-close:hover {
  background: var(--accent);
  color: #fff;
}
.mobile-nav {
  display: flex;
  flex-direction: column;
  width: 100%;
  gap: 6px;
  margin-top: 16px;
  padding-left: 28px;
}
.mobile-nav a {
  font-size: 1.35rem;
  font-family: var(--font-display);
  color: var(--primary);
  padding: 15px 0 15px 0;
  border-radius: 12px;
  margin-right: 32px;
  margin-bottom: 6px;
  font-weight: 600;
  text-decoration: none;
  transition: background 0.16s, color 0.13s;
}
.mobile-nav a:hover, .mobile-nav a.active {
  background: var(--surface);
  color: var(--accent);
}
@media (max-width: 1024px) {
  .mobile-menu { display: flex; }
  .mobile-nav { margin-right: 18px; }
}
@media (min-width: 1025px) {
  .mobile-menu, .mobile-menu-toggle {
    display: none !important;
  }
}

/* ===================================================================
   FOOTER
   =================================================================== */
footer {
  background: #F8EFE7;
  border-top: 1px solid #f2dbcc;
  padding: 40px 0 0 0;
  font-size: 1.04rem;
}
footer .container {
  display: flex;
  flex-direction: row;
  justify-content: space-between;
  align-items: flex-start;
  gap: 40px;
  flex-wrap: wrap;
  padding-bottom: 26px;
}
.footer-brand {
  display: flex;
  align-items: center;
  gap: 13px;
  font-weight: 700;
  color: var(--primary);
  font-family: var(--font-display);
}
.footer-brand img {
  width: 40px; height: 40px;
  border-radius: var(--radius-lg);
  background: #fff;
  border: 1px solid #ffe3cd;
}

.footer-nav {
  display: flex;
  flex-direction: column;
  gap: 11px;
}
.footer-nav a {
  color: var(--primary);
  font-family: var(--font-body);
  font-size: 1.03rem;
  transition: color 0.14s;
}
.footer-nav a:hover {
  text-decoration: underline;
}
.footer-contact {
  display: flex;
  flex-direction: column;
  gap: 7px;
  color: #28475A;
  font-size: 1rem;
}
.footer-contact div, .footer-contact a {
  display: flex;
  align-items: center;
  gap: 6px;
  color: #28475A;
}
.footer-contact img {
  width: 20px; height: 20px; margin-right: 5px; border-radius: 5px; }
@media (max-width: 900px) {
  footer .container { flex-direction: column; gap: 20px; align-items: flex-start; }
}
@media (max-width: 600px) {
  footer { padding: 32px 0 0 0; font-size: 0.97rem; }
  footer .container { gap: 7px; }
  .footer-brand img { width: 32px; height: 32px; }
}

/* ===================================================================
   PRICING CARD STYLES - for cennik.html
   =================================================================== */
.pricing-cards {
  display: flex;
  flex-wrap: wrap;
  gap: 24px;
  justify-content: center;
  margin-bottom: 32px;
}
.pricing-card {
  flex: 1 1 270px;
  background: var(--surface);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow);
  padding: 36px 28px 30px 28px;
  display: flex;
  flex-direction: column;
  align-items: center;
  position: relative;
  min-width: 220px;
  max-width: 330px;
  margin-bottom: 20px;
  transition: box-shadow 0.16s, transform 0.16s;
}
.pricing-card h2 { font-size: 1.45rem; margin-bottom: 14px; }
.pricing-card .price {
  font-family: var(--font-display);
  font-size: 2.1rem;
  margin-bottom: 20px;
  color: var(--accent);
  font-weight: 700;
}
.pricing-card ul {
  margin-bottom: 28px;
  margin-top: 2px;
  padding-left: 25px;
}
.pricing-card ul li {
  margin-bottom: 8px;
  font-size: 1.0rem;
}
.pricing-card .btn-primary {
  margin-left: 0;
  min-width: 134px;
  font-size: 1.06rem;
}
.popular {
  border: 3px solid var(--accent);
  background: #FFF4E5;
  box-shadow: 0 8px 30px rgba(246,184,131,0.14);
}
.popular-badge {
  position: absolute;
  top: -16px; left: 50%;
  transform: translateX(-50%);
  background: var(--accent);
  color: var(--primary);
  font-size: 1rem;
  font-weight: bold;
  padding: 6px 20px 6px 20px;
  border-radius: 20px;
  box-shadow: var(--shadow);
}
@media (max-width: 900px) { .pricing-cards { flex-direction: column; gap: 20px; align-items: center; } .pricing-card { width: 100%; max-width: 100vw; min-width: 0; } }

/* ===================================================================
   TABLE STYLES (used on cennik.html, funkcje.html)
   =================================================================== */
table {
  width: 100%;
  border-collapse: collapse;
  background: #fff;
  margin-top: 24px;
  margin-bottom: 24px;
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  overflow: hidden;
}
thead {
  background: #fff2eb;
}
th, td {
  padding: 14px 10px;
  text-align: left;
  font-size: 1rem;
}
th {
  color: var(--primary);
  font-family: var(--font-display);
  font-weight: 600;
}
tbody tr:nth-child(odd) { background: #fef5ed; }
tbody tr:nth-child(even) { background: #ffffff; }
td {
  font-family: var(--font-body);
  color: #41586C;
}
@media (max-width: 600px) {
  table, thead, tbody, th, td, tr {
    display: block;
  }
  thead { display: none; }
  tr { margin-bottom: 20px; }
  td {
    padding: 10px 5px;
    border: none;
    position: relative;
  }
}

/* ===================================================================
   FORM & BUTTONS
   =================================================================== */
button, input[type="submit"] {
  font-family: var(--font-display);
  font-size: 1rem;
  padding: 10px 28px;
  border: none;
  border-radius: var(--radius-lg);
  cursor: pointer;
  background: var(--accent);
  color: var(--primary);
  font-weight: 700;
  box-shadow: 0 2px 10px rgba(246,184,131,0.09);
  transition: background 0.17s, color 0.15s, box-shadow 0.13s;
  outline: none;
}
button:hover, button:focus, input[type="submit"]:hover {
  background: #FFD6AA;
  color: #28475A;
  box-shadow: 0 5px 22px rgba(246,184,131,0.16);
}

/* ===================================================================
   COOKIE CONSENT BANNER AND MODAL
   =================================================================== */
.cookie-banner {
  position: fixed;
  left: 0; right: 0; bottom: 0;
  background: #fff7e5;
  color: #28475A;
  box-shadow: 0 -5px 24px rgba(40,71,90,0.11);
  padding: 20px 16px 18px 16px;
  display: flex;
  flex-direction: row;
  align-items: center;
  justify-content: space-between;
  z-index: 3200;
  gap: 18px;
  font-size: 1.08rem;
  border-radius: 24px 24px 0 0;
  animation: cookie-slideup 0.42s cubic-bezier(.5,.85,0,1);
}
@keyframes cookie-slideup {
  0% { transform: translateY(120%); opacity: 0; }
  80%{ opacity: .9; }
  100%{ transform: translateY(0); opacity: 1; }
}
.cookie-banner .cookie-text {
  flex: 2;
  font-size: 1.08rem;
  color: #28475A;
  margin-right: 8px;
}
.cookie-banner .cookie-actions {
  display: flex;
  gap: 14px;
  flex: 1 1 auto;
  align-items: center;
}
.cookie-banner button {
  font-size: 1rem;
  padding: 11px 24px;
  border-radius: var(--radius);
  border: none;
  box-shadow: 0 1px 8px rgba(246,184,131,0.10);
  font-weight: 600;
  background: var(--accent);
  color: var(--primary);
  transition: background 0.15s, box-shadow 0.13s;
  cursor: pointer;
}
.cookie-banner button:hover, .cookie-banner button:focus {
  background: #FFD6AA;
  color: #28475A;
  box-shadow: 0 3px 16px rgba(246,184,131,0.16);
}
.cookie-banner .cookie-settings-btn {
  background: var(--secondary);
  color: #fff;
}
.cookie-banner .cookie-settings-btn:hover {
  background: #a1bfd3;
  color: #28475A;
}

@media (max-width: 700px) {
  .cookie-banner {
    flex-direction: column;
    align-items: stretch;
    text-align: left;
    gap: 13px;
    padding-top: 18px;
  }
  .cookie-banner .cookie-actions { gap: 9px; }
}

.cookie-modal-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(40,71,90,0.25);
  z-index: 3201;
  display: flex;
  align-items: center;
  justify-content: center;
  animation: fadeinback 0.28s;
}
@keyframes fadeinback {from{opacity:0;}to{opacity:1;}}

.cookie-modal {
  background: #fff7e5;
  color: #28475A;
  max-width: 420px;
  margin: 0 auto;
  border-radius: var(--radius-lg);
  box-shadow: 0 8px 30px rgba(246,184,131,0.22);
  padding: 34px 30px 28px 30px;
  font-size: 1.04rem;
  position: relative;
  z-index: 3202;
  animation: modal-pop 0.30s;
  display: flex;
  flex-direction: column;
  gap: 16px;
}
@keyframes modal-pop {
  0% { transform: scale(.9); opacity: 0; }
  100% { transform: scale(1); opacity: 1; }
}
.cookie-modal h3 {
  font-size: 1.25rem;
  color: var(--primary);
  margin-bottom: 7px;
}
.cookie-category {
  display: flex;
  flex-direction: row;
  align-items: center;
  gap: 18px;
  margin-bottom: 10px;
}
.cookie-category label {
  font-weight: 600;
  color: var(--primary);
}
.cookie-category input[type="checkbox"][disabled] {
  accent-color: var(--accent);
  cursor: not-allowed;
}
.cookie-modal .cookie-actions {
  display: flex;
  gap: 10px;
  margin-top: 10px;
}
.cookie-modal .cookie-close {
  position: absolute;
  top: 8px;
  right: 15px;
  background: transparent;
  border: none;
  font-size: 1.5rem;
  color: var(--primary);
  cursor: pointer;
  padding: 6px 10px;
}
.cookie-modal .cookie-close:hover { color: var(--accent); }

@media (max-width: 500px) {
  .cookie-modal { padding: 22px 7vw; max-width: 93vw; }
}

/* ===================================================================
   UTILITY, TYPOGRAPHY and MICRO-INTERACTIONS
   =================================================================== */
.shadow-hover {
  box-shadow: var(--shadow-hover);
}
.round-small { border-radius: var(--radius); }
.round-large { border-radius: var(--radius-lg); }
.text-center { text-align: center !important; }
.mt-2 { margin-top: 16px; }
.mb-2 { margin-bottom: 16px; }
.mt-3 { margin-top: 24px; }
.mb-3 { margin-bottom: 24px; }
.mt-4 { margin-top: 32px; }
.mb-4 { margin-bottom: 32px; }

/* Scrollbar styling */
::-webkit-scrollbar { width: 9px; background: #ffe9cb; border-radius: 7px; }
::-webkit-scrollbar-thumb { background: #f1c89a; border-radius: 7px; }

/* Focus outlines for accessibility */
:focus, button:focus, a:focus, .btn-primary:focus {
  outline: 2px solid #F6B883;
  outline-offset: 2px;
}

/* Lists */
ul, ol {
  margin-bottom: 18px;
}
ul li, ol li {
  margin-bottom: 7px;
  font-size: 1.08rem;
}
ul li strong {
  color: var(--accent);
}

/* ===================================================================
   RESPONSIVENESS
   =================================================================== */
@media (max-width: 900px) {
  .container { max-width: 97vw; }
  .content-wrapper { padding-left: 0; padding-right: 0; }
}
@media (max-width: 600px) {
  .section { padding: 28px 7px; margin-bottom: 38px; }
  h1 { font-size: 1.48rem; }
  h2 { font-size: 1.18rem; }
  .content-wrapper { padding: 0; margin: 0; }
  .btn-primary, button { font-size: 1rem; padding: 10px 18px; }
}

/* ===================================================================
   HERO SECTION & CTA BUTTONS
   =================================================================== */
section:first-of-type, .hero-section {
  background-color: #FFE6C7;
  border-radius: 0 0 38px 38px;
  box-shadow: 0 8px 36px rgba(246,184,131,0.09);
  padding-bottom: 37px;
  margin-bottom: 56px;
}
section .btn-primary {
  margin-top: 18px;
}

/* ===================================================================
   ANIMATIONS FOR MICRO-INTERACTIONS
   =================================================================== */
.btn-primary, button, .pricing-card, .feature-item, .faq-item, .testimonial-card, .card {
  transition: box-shadow 0.18s, background 0.16s, color 0.14s,
    transform 0.12s, border 0.13s;
}
.btn-primary:active, button:active {
  transform: scale(0.97);
}

/* ================== CUSTOM CLASS UTILITIES ========================== */
.mt-1 { margin-top: 8px; }
.mb-1 { margin-bottom: 8px; }
.pt-1 { padding-top: 8px; }
.pb-1 { padding-bottom: 8px; }
.mt-0 { margin-top: 0; }
.mb-0 { margin-bottom: 0; }

/* ================== PRINT STYLES (optional) ========================== */
@media print {
  header, footer, .mobile-menu, .cookie-banner, .cookie-modal-backdrop { display: none !important; }
  body { background: #fff; }
}

/* ================= FADE-IN PAGE EFFECT ========================== */
body { opacity: 0; transition: opacity 0.5s; }
body.loaded { opacity: 1; }
