/* ====== Design tokens ====== */
:root{
  --primary:#1e6fba;
  --primary-dark:#155d9d;
  --secondary:#2c8ac9;
  --accent:#3ba3e3;
  --dark:#1e293b;
  --darker:#0f172a;
  --light:#f0f8ff;
  --gray:#7b9cba;
  --success:#2e94cc;

  --gradient-primary:linear-gradient(135deg,#1e6fba,#2c8ac9);
  --gradient-accent:linear-gradient(135deg,#3ba3e3,#2c8ac9);
  --gradient-card:linear-gradient(135deg,#ffffff,#e6f2ff);

  --shadow-sm:0 4px 6px -1px rgba(0,0,0,.1),0 2px 4px -1px rgba(0,0,0,.06);
  --shadow-md:0 10px 15px -3px rgba(0,0,0,.1),0 4px 6px -2px rgba(0,0,0,.05);
  --shadow-lg:0 20px 25px -5px rgba(0,0,0,.1),0 10px 10px -5px rgba(0,0,0,.04);

  --radius:10px;
  --transition:all .3s cubic-bezier(.4,0,.2,1);

  /* Wysokości dla poprawnego rozwijania menu spod headera */
  --topbar-height:40px;     /* desktop: top navbar widoczny */
  --header-height:80px;     /* faktyczna wysokość headera */
  --nav-top:calc(var(--topbar-height) + var(--header-height));
}

/* Nadpisy na mobile – topbar znika, menu startuje spod headera */
@media (max-width:768px){
  :root{
    --topbar-height:0px;
    --header-height:76px;  /* dostosuj jeśli masz inną wysokość headera na mobile */
    --nav-top:var(--header-height);
  }
}

/* ====== Base ====== */
*{margin:0;padding:0;box-sizing:border-box;}
html{font-size:15px;}
body{
  font-family:'Inter',sans-serif;
  color:var(--dark);
  line-height:1.5;
  overflow-x:hidden;
  font-size:.9rem;
}
h1,h2,h3,h4,h5,h6{font-weight:700;line-height:1.2;margin-bottom:.875rem;}
h1{font-size:2.5rem;}
h2{font-size:1.75rem;}
h3{font-size:1.5rem;}
p{margin-bottom:1.25rem;font-size:.95rem;}
a{color:var(--primary);text-decoration:none;transition:var(--transition);}
.container{max-width:1100px;margin:0 auto;padding:0 1.25rem;}

/* ====== Buttons ====== */
.btn{
  display:inline-flex;align-items:center;justify-content:center;
  padding:.55rem 1rem;border-radius:8px;font-weight:600;transition:var(--transition);
  border:0;cursor:pointer;gap:.4rem;font-size:.85rem;
}
.btn-sm{padding:.3rem .6rem;font-size:.75rem;border-radius:6px;}
.btn-primary{background:var(--gradient-primary);color:#fff;box-shadow:var(--shadow-md);}
.btn-primary:hover{transform:translateY(-2px);box-shadow:var(--shadow-lg);}
.btn-secondary{background:transparent;color:var(--primary);border:2px solid var(--primary);}
.btn-secondary:hover{background:var(--primary);color:#fff;}
.btn-accent{background:var(--gradient-accent);color:#fff;}
.btn-outline-primary{background:transparent;color:var(--primary);border:2px solid var(--primary);}
.btn-outline-primary:hover{background:var(--primary);color:#fff;}

/* ====== Sections ====== */
.section{padding:2rem 0;}
.section-title{text-align:center;margin-bottom:2.5rem;}
.section-title h2{position:relative;display:inline-block;margin-bottom:1.25rem;}
  .section-title h2::after{
    content:'';position:absolute;bottom:-8px;left:50%;transform:translateX(-50%);
    width:50px;height:3px;background:var(--gradient-primary);border-radius:2px;
  }

/* ====== Modals ====== */
.modal{display:none;position:fixed;inset:0;background:rgba(0,0,0,.5);z-index:1100;align-items:center;justify-content:center;}
.modal-content{background:#fff;padding:1.1rem;border-radius:var(--radius);width:90%;max-width:360px;box-shadow:var(--shadow-lg);}
.modal-header{display:flex;justify-content:space-between;align-items:center;margin-bottom:.9rem;}
.modal-header h3{font-size:1.1rem;}
.modal-close{background:none;border:0;font-size:1.5rem;cursor:pointer;color:var(--dark);}
.form-group{margin-bottom:.8rem;}
.form-group label{display:block;margin-bottom:.4rem;font-weight:500;font-size:.85rem;}
.form-group input{width:100%;padding:.55rem .75rem;border:1px solid #ddd;border-radius:8px;font-size:.9rem;}
.form-footer{margin-top:1rem;text-align:center;font-size:.85rem;}
.social-login{margin-top:.9rem;text-align:center;}
.social-login .btn{margin-bottom:.5rem;width:100%;justify-content:center;}
.btn-google{background:#DB4437;color:#fff;border:0;}
.btn-google:hover{background:#c23325;color:#fff;}
.domain-warning{display:none;background:#ffebee;color:#c62828;padding:8px;border-radius:5px;margin-top:15px;font-size:.85rem;}

/* ====== User dashboard ====== */
.user-dashboard{display:none;margin-top:calc(var(--topbar-height) + var(--header-height) + 40px);margin-bottom:20px;padding:2rem;background:#fff;border-radius:var(--radius);box-shadow:var(--shadow-md);}
.user-header{display:flex;justify-content:space-between;align-items:center;margin-bottom:2rem;padding-bottom:1rem;border-bottom:1px solid #eee;}
.offers-wrapper{display:flex;flex-direction:column;gap:2rem;}
.offers-section{display:flex;flex-direction:column;gap:1rem;}
.offers-section-header{display:flex;justify-content:space-between;align-items:center;gap:1rem;}
.offers-subtitle{margin:0;font-size:1rem;font-weight:600;color:#1f2a3d;display:flex;align-items:center;gap:.5rem;}
.offers-subtitle i{color:var(--primary);}
.offers-section-note{font-size:.85rem;color:#6d7686;}
.dashboard-empty{margin:0;padding:1rem;border-radius:10px;background:#f7f9fd;border:1px dashed #c8d4e5;font-size:.9rem;color:#5b6575;}
.offers-grid{display:grid;grid-template-columns:repeat(auto-fill,minmax(260px,1fr));gap:1rem;}
.offer-card{background:#fff;border-radius:14px;box-shadow:0 4px 12px rgba(15,23,42,.08);padding:1rem;cursor:pointer;transition:transform .2s ease,box-shadow .2s ease;margin-bottom:1rem;display:flex;flex-direction:row;align-items:stretch;gap:1rem;overflow:hidden;}
.offer-card:hover{transform:translateY(-4px);box-shadow:0 8px 22px rgba(15,23,42,.12);}
.offer-card--stacked{flex-direction:column;}
.offer-card--reverse{flex-direction:row-reverse;}
.offer-card__media{position:relative;flex:0 0 180px;min-height:120px;border-radius:12px;overflow:hidden;background:none;display:flex;align-items:center;justify-content:center;font-weight:600;font-size:.82rem;text-align:center;padding:0;}
.offer-card__media img{width:100%;height:100%;object-fit:cover;display:block;border-radius:inherit;}
.offer-card--stacked .offer-card__media{flex:0 0 auto;width:100%;aspect-ratio:16/9;min-height:0;}
.offer-card__media::after{display:none;}
.offer-card__media--empty{background:linear-gradient(135deg,#f3f4f6,#e5e7eb);color:#4b5563;}
.offer-card__body{flex:1;display:flex;flex-direction:column;gap:.65rem;min-width:0;}
.offer-title{font-size:1rem;font-weight:600;margin:0;color:#1f2937;}
.offer-card h5{margin:0;font-size:1.05rem;color:var(--primary);}
.offer-details{font-size:.86rem;color:#4b5563;line-height:1.5;margin:0;display:flex;flex-direction:column;gap:.35rem;}
.offer-card p{margin:0;font-size:.9rem;color:#4b5563;}
.offer-actions{display:flex;gap:.5rem;flex-wrap:wrap;}
.offer-actions.center{justify-content:center;}
.offer-card__body .offer-actions{margin-top:auto;}
.favorites-grid .offer-card{background:#e9f3ff;border:1px solid #c7ddf8;box-shadow:none;}
.favorites-grid .offer-card:hover{box-shadow:0 6px 14px rgba(30,111,186,.2);transform:translateY(-2px);}
.favorites-grid .offer-title{color:#1a4f85;}
.favorites-grid .offer-details{color:#3f4d62;}
.favorite-meta{font-size:.8rem;color:#51617a;margin-top:.4rem;}
.favorite-ppm{color:#1f5ea8;font-size:.8rem;margin-left:.4rem;font-weight:600;}

/* ====== Home page offers grid (chessboard layout) ====== */
body.home-page .offers-grid{
  display:grid;
  grid-template-columns:repeat(auto-fit,minmax(260px,1fr));
  gap:1.5rem;
  align-items:stretch;
  grid-auto-rows:1fr;
}

@media (min-width:768px){
  body.home-page .offers-grid{
    grid-template-columns:repeat(2,minmax(0,1fr));
  }
}

body.home-page .offer-card{
  margin-bottom:0;
  height:100%;
  border:1px solid #e5effa;
}
body.home-page .offer-card .offer-card__media{aspect-ratio:16/9;}

body.home-page .offer-card .offer-actions{
  margin-top:auto;
}

@media (min-width:768px){
  body.home-page .offer-card:nth-child(4n+2),
  body.home-page .offer-card:nth-child(4n+3){
    background:#f5f9ff;
    border-color:#dbe8f7;
  }
}

/* ====== Hero ====== */
.hero{
  padding:calc(var(--topbar-height) + var(--header-height) + 12px) 0 2.5rem;
  background:linear-gradient(135deg,rgba(30,111,186,.05) 0%,rgba(44,138,201,.05) 100%);
  position:relative;overflow:hidden;
}
.hero::before{
  content:'';position:absolute;top:-80px;right:-80px;width:300px;height:300px;border-radius:50%;
  background:var(--gradient-primary);opacity:.1;filter:blur(60px);
}
.hero-content{display:grid;grid-template-columns:1fr 1fr;gap:2.5rem;align-items:center;}
.hero-text h1{
  font-size:1.9rem;margin-bottom:1.25rem;background:var(--gradient-primary);
  -webkit-background-clip:text;-webkit-text-fill-color:transparent;
}
.hero-text p{font-size:1rem;color:var(--gray);margin-bottom:1.25rem;}
.hero-buttons{display:flex;gap:.5rem;flex-wrap:wrap;}
.hero-image{position:relative;}
.hero-image img{
  width:100%;max-width:450px;height:auto;border-radius:var(--radius);box-shadow:var(--shadow-lg);
  transform:perspective(800px) rotateY(-10deg);transition:var(--transition);
}
.hero-image img:hover{transform:perspective(800px) rotateY(0);}

/* ====== Features ====== */
.features{background:#fff;}
.features-grid{display:grid;grid-template-columns:repeat(auto-fit,minmax(220px,1fr));gap:1.75rem;}
.feature-card{background:var(--gradient-card);padding:1.2rem;border-radius:var(--radius);box-shadow:var(--shadow-sm);transition:var(--transition);text-align:center;}
.feature-card:hover{transform:translateY(-5px);box-shadow:var(--shadow-md);}
.feature-icon{
  width:44px;height:44px;display:flex;align-items:center;justify-content:center;margin:0 auto 1.25rem;
  border-radius:50%;background:var(--gradient-primary);color:#fff;font-size:1.1rem;
}

/* ====== How it works ====== */
.course-info{background:linear-gradient(135deg,rgba(30,111,186,.05) 0%,rgba(44,138,201,.05) 100%);}
.info-container{display:grid;grid-template-columns:1fr 1fr;gap:3.5rem;align-items:center;}
.info-image{position:relative;}
.info-image img{width:100%;max-width:450px;height:auto;border-radius:var(--radius);box-shadow:var(--shadow-lg);}
.info-badge{position:absolute;top:-12px;right:-12px;background:var(--gradient-primary);color:#fff;padding:.45rem .9rem;border-radius:25px;font-weight:600;box-shadow:var(--shadow-md);font-size:.8rem;}
.info-content h2{margin-bottom:1.25rem;}
.info-list{list-style:none;margin-bottom:1.75rem;}
.info-list li{margin-bottom:.625rem;display:flex;align-items:center;gap:.625rem;font-size:.95rem;}

/* ====== Cookie banner ====== */
.cookie-banner{
  position:fixed;
  left:50%;
  bottom:1.5rem;
  transform:translateX(-50%);
  width:min(720px,calc(100% - 2.5rem));
  display:flex;
  gap:1.25rem;
  align-items:flex-start;
  padding:1.35rem 1.6rem;
  background:#fff;
  border:1px solid #dbe8f7;
  border-radius:18px;
  box-shadow:var(--shadow-lg);
  z-index:1400;
  transition:var(--transition);
}
.cookie-banner--hidden{
  opacity:0;
  visibility:hidden;
  pointer-events:none;
  transform:translate(-50%,20px);
}
.cookie-banner__icon{
  width:52px;
  height:52px;
  border-radius:14px;
  background:var(--gradient-primary);
  color:#fff;
  display:flex;
  align-items:center;
  justify-content:center;
  font-size:1.4rem;
  box-shadow:var(--shadow-md);
  flex-shrink:0;
}
.cookie-banner__content{flex:1;}
.cookie-banner__title{
  margin:0 0 .4rem;
  font-size:1.15rem;
  color:var(--darker);
}
.cookie-banner__text{
  margin:0 0 1.1rem;
  color:#4a5d75;
  font-size:.92rem;
}
.cookie-banner__text a{
  color:var(--primary-dark);
  font-weight:600;
}
.cookie-banner__actions{
  display:flex;
  flex-wrap:wrap;
  gap:.6rem;
  align-items:center;
}
.cookie-banner__btn{flex:0 0 auto;}
.cookie-banner__link{
  display:inline-flex;
  align-items:center;
  gap:.45rem;
  font-size:.85rem;
  font-weight:600;
  color:var(--dark);
}
.cookie-banner__link i{color:var(--primary);}
.cookie-preferences{
  position:fixed;
  right:1.5rem;
  bottom:1.5rem;
  display:inline-flex;
  align-items:center;
  gap:.5rem;
  padding:.55rem 1rem;
  border-radius:999px;
  border:1px solid #dbe8f7;
  background:#fff;
  color:var(--dark);
  font-weight:600;
  font-size:.85rem;
  box-shadow:var(--shadow-md);
  cursor:pointer;
  transition:var(--transition);
  z-index:1300;
}
.cookie-preferences i{color:var(--primary);}
.cookie-preferences:hover{
  transform:translateY(-2px);
  box-shadow:var(--shadow-lg);
}
.cookie-banner:not(.cookie-banner--hidden)~.cookie-preferences{
  opacity:0;
  visibility:hidden;
  pointer-events:none;
}
.cookie-preferences[hidden]{display:none;}

@media (max-width:768px){
  .cookie-banner{
    flex-direction:column;
    align-items:stretch;
    text-align:left;
    padding:1.2rem 1.35rem;
  }
  .cookie-banner__icon{margin-bottom:.6rem;}
  .cookie-banner__actions{flex-direction:column;align-items:stretch;}
  .cookie-banner__btn{width:100%;}
  .cookie-banner__link{justify-content:center;}
  .cookie-preferences{
    right:1rem;
    bottom:1rem;
  }
}

@media (max-width:520px){
  .cookie-banner{
    width:calc(100% - 1.6rem);
    left:50%;
    transform:translate(-50%,0);
    bottom:.9rem;
  }
  .cookie-banner--hidden{
    transform:translate(-50%,15px);
  }
}
.info-list li::before{
  content:'✓';display:flex;align-items:center;justify-content:center;width:20px;height:20px;
  background:var(--success);color:#fff;border-radius:50%;font-size:.7rem;
}

/* ====== FAQ ====== */
.faq{background:linear-gradient(135deg,rgba(30,111,186,.05) 0%,rgba(44,138,201,.05) 100%);}
.faq-container{max-width:750px;margin:0 auto;}
.faq-item{margin-bottom:1.25rem;border-radius:var(--radius);overflow:hidden;box-shadow:var(--shadow-sm);background:#fff;}
.faq-question{padding:1.25rem;display:flex;justify-content:space-between;align-items:center;cursor:pointer;font-weight:600;transition:var(--transition);font-size:.95rem;}
.faq-question:hover{color:var(--primary);}
.faq-question i{transition:var(--transition);}
.faq-answer{padding:0 1.25rem;max-height:0;overflow:hidden;transition:max-height .35s cubic-bezier(.4,0,.2,1),padding .3s cubic-bezier(.4,0,.2,1);font-size:.9rem;will-change:max-height;}
.faq-item.active .faq-question i{transform:rotate(180deg);}
.faq-item.active .faq-answer{padding:0 1.25rem 1.25rem;}

/* ====== CTA ====== */
.cta{
  background:var(--gradient-primary);color:#fff;text-align:center;padding:3.5rem 0;position:relative;overflow:hidden;
}
.cta::before,.cta::after{
  content:'';position:absolute;width:250px;height:250px;border-radius:50%;background:rgba(255,255,255,.1);
}
.cta::before{top:-80px;left:-80px;}
.cta::after{bottom:-80px;right:-80px;}
.cta h2{margin-bottom:1.25rem;}
.cta p{max-width:550px;margin:0 auto 2rem;opacity:.9;}

/* ====== Footer ====== */
footer{background:var(--darker);color:#fff;padding:2.5rem 0 1.25rem}
.footer-container{display:grid;grid-template-columns:repeat(auto-fit,minmax(220px,1fr));gap:1.5rem;margin-bottom:1.5rem;}

/* POWIĘKSZONE LOGO W STOPCE */
.footer-logo{
  display:flex;align-items:center;gap:.6rem;font-weight:700;font-size:1.35rem;color:#fff;
}
.footer-logo img{height:96px;width:auto;filter:brightness(0) invert(1);}  /* dodano wysokość */

.footer-about p{opacity:.8;font-size:.9rem;line-height:1.6;margin-top:.5rem;}
.footer-links h3,.footer-contact h3{font-size:1.1rem;margin-bottom:1rem;position:relative;display:inline-block;}
.footer-links h3::after,.footer-contact h3::after{content:'';position:absolute;left:0;bottom:-6px;width:25px;height:2px;background:var(--gradient-primary);border-radius:2px;}
.footer-links ul{list-style:none;}
.footer-links li{margin-bottom:.6rem;}
.footer-links a{color:#b6c7da;font-size:.9rem;transition:var(--transition);}
.footer-links a:hover{color:#fff;padding-left:5px;}
.footer-contact p{opacity:.8;font-size:.9rem;display:flex;align-items:center;gap:.6rem;margin:.4rem 0;}
.footer-bottom{text-align:center;border-top:1px solid rgba(255,255,255,.12);padding-top:1.25rem;opacity:.75;font-size:.85rem;}

/* ====== Responsive ====== */
@media (max-width:1024px){
  html{font-size:14px;}
  .modal-content{max-width:340px;}
}

@media (max-width:992px){
  h1{font-size:2.25rem;}
  .hero-content,.info-container{grid-template-columns:1fr;gap:2.5rem;}
  .hero-text{order:2;text-align:center;}
  .hero-image{order:1;}
}

@media (max-width:768px){
  html{font-size:13px;}
  /* Footer logo: JEDEN POD DRUGIM, WYRÓWNANE DO LEWEJ */
  .footer-logo{
    flex-direction:column;
    align-items:flex-start;   /* kluczowe: LEWA krawędź */
    text-align:left;          /* dla tekstu */
    gap:.25rem;
  }
  .footer-logo img{
    width:200px;
    height:auto;
  }

  /* menu startuje spod headera (ustawione przez zmienne) */
  .hero{padding:calc(var(--header-height) + 12px) 0 2rem;}
  .hero-text h1{font-size:1.6rem;}
  .hero-buttons{justify-content:center;}
}

@media (max-width:576px){
  .section{padding:2.5rem 0;}
  .hero-text h1{font-size:1.75rem;}
  .btn{width:100%;justify-content:center;}
  .hero-buttons{flex-direction:column;}
}

@media (max-width:480px){
  html{font-size:12px;}
  .modal-content{max-width:320px;padding:1rem;}
  .feature-card{padding:1rem;}
  .hero-text h1{font-size:1.45rem;}
}

