:root{
  --primary:#2f7da3;
  --primary-dark:#235f7c;
  --accent:#eef7fc;
  --text:#16202a;
  --muted:#6b7785;
  --line:#dce7ee;
  --white:#ffffff;
  --bg:#f8fbfd;
  --shadow:0 18px 50px rgba(19, 48, 74, 0.08);
  --shadow-soft:0 10px 30px rgba(19, 48, 74, 0.06);
  --radius:22px;
  --container:1200px;
  --transition:all .35s ease;
}

*{
  box-sizing:border-box;
}

html{
  scroll-behavior:smooth;
}

body{
  margin:0;
  font-family:'Manrope', Arial, sans-serif;
  color:var(--text);
  background:var(--white);
  line-height:1.6;
}

img{
  max-width:100%;
  display:block;
}

a{
  color:inherit;
}

.container{
  width:min(100% - 32px, var(--container));
  margin-inline:auto;
}

/* HEADER */
.site-header{
  position:sticky;
  top:0;
  z-index:1000;
  background:rgba(255,255,255,0.92);
  backdrop-filter:blur(12px);
  border-bottom:1px solid rgba(220,231,238,0.9);
}

.header-inner{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:20px;
  min-height:88px;
}

.brand{
  display:flex;
  align-items:center;
  gap:14px;
  text-decoration:none;
}

.brand-logo{
  width:62px;
  height:62px;
  object-fit:contain;
  border-radius:12px;
}

.brand-text{
  display:flex;
  flex-direction:column;
  gap:2px;
}

.brand-title{
  font-weight:800;
  font-size:1.1rem;
  line-height:1.1;
}

.brand-subtitle{
  font-size:.92rem;
  color:var(--muted);
}

.main-nav{
  display:flex;
  align-items:center;
  gap:6px;
}

.main-nav a{
  text-decoration:none;
  padding:10px 14px;
  border-radius:999px;
  color:#394552;
  font-weight:700;
  transition:var(--transition);
}

.main-nav a:hover{
  background:var(--accent);
  color:var(--primary-dark);
}

.menu-toggle{
  display:none;
  width:48px;
  height:48px;
  border:none;
  background:var(--accent);
  border-radius:12px;
  cursor:pointer;
  padding:10px;
}

.menu-toggle span{
  display:block;
  height:2px;
  background:var(--text);
  margin:6px 0;
  transition:var(--transition);
}

/* LOTTERY HERO */
.lottery-hero{
  position:relative;
  min-height:360px;
  display:flex;
  align-items:center;
  overflow:hidden;
  background:#dfeaf1;
}

.lottery-hero__bg{
  position:absolute;
  inset:0;
}

.lottery-hero__bg img{
  width:100%;
  height:100%;
  object-fit:cover;
}

.lottery-hero__overlay{
  position:absolute;
  inset:0;
  background:linear-gradient(90deg, rgba(12, 27, 39, 0.72) 0%, rgba(12, 27, 39, 0.42) 44%, rgba(12, 27, 39, 0.20) 100%);
}

.lottery-hero__content{
  position:relative;
  z-index:2;
  max-width:760px;
  color:var(--white);
  padding:52px 0;
}

.lottery-hero__badge{
  display:inline-flex;
  align-items:center;
  gap:8px;
  padding:8px 14px;
  background:rgba(255,255,255,0.15);
  color:#ffffff;
  border:1px solid rgba(255,255,255,0.18);
  border-radius:999px;
  font-weight:800;
  font-size:.86rem;
  margin-bottom:16px;
  backdrop-filter:blur(8px);
}

.lottery-hero__content h2{
  margin:0 0 14px;
  font-size:clamp(2rem, 4vw, 3.4rem);
  line-height:1.02;
  letter-spacing:-0.03em;
  max-width:620px;
}

.lottery-hero__content p{
  font-size:1.05rem;
  max-width:640px;
  margin:0 0 24px;
  color:rgba(255,255,255,0.92);
}

.lottery-hero__actions{
  display:flex;
  gap:12px;
  flex-wrap:wrap;
}

/* SEPARATORE TRA LOTTERIA E HERO */
.site-divider{
  background:#ffffff;
  padding:34px 0 26px;
  position:relative;
  z-index:5;
}

.site-divider__inner{
  background:linear-gradient(180deg, #f8fbfd 0%, #eef7fc 100%);
  border:1px solid #dce7ee;
  border-radius:24px;
  padding:26px 24px;
  text-align:center;
  box-shadow:0 10px 30px rgba(19,48,74,0.06);
  max-width:820px;
  margin:0 auto;
}

.site-divider__label{
  display:inline-flex;
  align-items:center;
  justify-content:center;
  padding:8px 14px;
  border-radius:999px;
  background:#eaf5fb;
  color:#235f7c;
  font-size:.85rem;
  font-weight:800;
  margin-bottom:12px;
}

.site-divider__inner h3{
  margin:0;
  font-size:clamp(1.3rem, 2.2vw, 2rem);
  line-height:1.2;
  color:#16354a;
}

.site-divider__inner p{
  margin:10px 0 0;
  color:#6b7785;
  font-size:1rem;
}

/* HERO FULL */
.hero-full{
  position:relative;
  min-height:78vh;
  display:flex;
  align-items:center;
  overflow:hidden;
  background:#dfeaf1;
  margin-top:0;
  padding-top:0;
}

.hero-full__bg{
  position:absolute;
  inset:0;
}

.hero-full__bg img{
  width:100%;
  height:100%;
  object-fit:cover;
}

.hero-full__overlay{
  position:absolute;
  inset:0;
  background:linear-gradient(90deg, rgba(12, 27, 39, 0.64) 0%, rgba(12, 27, 39, 0.34) 36%, rgba(12, 27, 39, 0.12) 60%, rgba(12, 27, 39, 0.06) 100%);
}

.hero-full__content{
  position:relative;
  z-index:2;
  max-width:760px;
  color:var(--white);
  padding:70px 0;
}

.eyebrow{
  display:inline-flex;
  align-items:center;
  gap:8px;
  padding:8px 14px;
  background:rgba(255,255,255,0.15);
  color:#ffffff;
  border:1px solid rgba(255,255,255,0.18);
  border-radius:999px;
  font-weight:800;
  font-size:.86rem;
  margin-bottom:18px;
  backdrop-filter:blur(8px);
}

.hero-full__content h1{
  margin:0 0 16px;
  font-size:clamp(2.4rem, 5vw, 5.3rem);
  line-height:0.98;
  letter-spacing:-0.04em;
  max-width:700px;
}

.hero-full__description{
  font-size:1.1rem;
  max-width:650px;
  margin:0 0 28px;
  color:rgba(255,255,255,0.92);
}

.hero-actions{
  display:flex;
  gap:12px;
  flex-wrap:wrap;
}

/* HERO SUMMARY */
.hero-summary-section{
  margin-top:-54px;
  position:relative;
  z-index:5;
}

.hero-summary-card{
  background:var(--white);
  border:1px solid var(--line);
  border-radius:26px;
  padding:26px 28px;
  box-shadow:var(--shadow);
  max-width:760px;
}

.hero-summary-card h3{
  margin:0 0 14px;
  font-size:1.15rem;
  color:var(--text);
}

.hero-summary-card ul{
  margin:0;
  padding-left:20px;
  color:var(--muted);
}

.hero-summary-card li + li{
  margin-top:10px;
}

/* BUTTONS */
.btn{
  display:inline-flex;
  align-items:center;
  justify-content:center;
  gap:8px;
  min-height:52px;
  padding:0 20px;
  border-radius:14px;
  text-decoration:none;
  font-weight:800;
  transition:var(--transition);
}

.btn-primary{
  background:linear-gradient(135deg, var(--primary) 0%, #3d94bd 100%);
  color:var(--white);
  box-shadow:0 12px 25px rgba(47,125,163,0.24);
}

.btn-primary:hover{
  transform:translateY(-2px);
  box-shadow:0 16px 32px rgba(47,125,163,0.28);
}

.btn-secondary{
  background:rgba(255,255,255,0.96);
  color:var(--text);
  border:1px solid rgba(255,255,255,0.45);
}

.btn-secondary:hover{
  transform:translateY(-2px);
  background:#ffffff;
}

/* SECTIONS */
.content-section{
  padding:48px 0;
}

.content-section.alt{
  background:linear-gradient(180deg, #fbfdff 0%, #f6fbfe 100%);
}

.split-grid{
  display:grid;
  grid-template-columns:1fr 1fr;
  gap:34px;
  align-items:center;
}

.split-grid.reverse .section-text{
  order:2;
}

.split-grid.reverse .section-media{
  order:1;
}

.section-label{
  display:inline-block;
  margin-bottom:12px;
  padding:7px 12px;
  border-radius:999px;
  background:#eaf5fb;
  color:var(--primary-dark);
  font-size:.84rem;
  font-weight:800;
}

.section-text h2{
  margin:0 0 14px;
  font-size:clamp(1.7rem, 2.8vw, 2.8rem);
  line-height:1.12;
  letter-spacing:-0.02em;
}

.section-text p{
  margin:0 0 22px;
  color:var(--muted);
  font-size:1rem;
}

.tag-list{
  display:flex;
  flex-wrap:wrap;
  gap:10px;
}

.tag-list span{
  padding:9px 14px;
  background:var(--white);
  border:1px solid var(--line);
  border-radius:999px;
  font-size:.9rem;
  font-weight:700;
  color:#44505d;
  box-shadow:0 4px 12px rgba(19,48,74,0.04);
}

.section-media img{
  width:100%;
  border-radius:26px;
  box-shadow:var(--shadow);
  object-fit:cover;
}

/* FOOTER */
.site-footer{
  margin-top:36px;
  padding:56px 0 22px;
  background:linear-gradient(180deg, #16354a 0%, #102c3d 100%);
  color:var(--white);
}

.footer-grid{
  display:grid;
  grid-template-columns:1.3fr .8fr .8fr;
  gap:26px;
}

.footer-box{
  background:rgba(255,255,255,0.04);
  border:1px solid rgba(255,255,255,0.09);
  border-radius:24px;
  padding:26px;
  backdrop-filter:blur(8px);
}

.footer-box h2,
.footer-box h3{
  margin-top:0;
}

.footer-box p{
  color:rgba(255,255,255,0.78);
}

.footer-actions{
  display:flex;
  gap:12px;
  flex-wrap:wrap;
  margin-top:18px;
}

.footer-list{
  list-style:none;
  padding:0;
  margin:0;
}

.footer-list li{
  margin-bottom:12px;
  color:rgba(255,255,255,0.82);
}

.footer-list a{
  text-decoration:none;
  color:rgba(255,255,255,0.86);
}

.footer-list a:hover{
  color:#ffffff;
}

.footer-bottom{
  padding-top:24px;
  text-align:center;
  color:rgba(255,255,255,0.7);
  font-size:.95rem;
}

/* ANIMATIONS */
.reveal{
  opacity:0;
  transform:translateY(30px);
  transition:opacity .8s ease, transform .8s ease;
}

.reveal.visible{
  opacity:1;
  transform:translateY(0);
}

.delay-1{
  transition-delay:.12s;
}

.delay-2{
  transition-delay:.24s;
}

/* LOTTERY POPUP */
.lottery-modal{
  position:fixed;
  inset:0;
  z-index:3000;
  display:none;
  overflow-y:auto;
  padding:20px 12px;
  -webkit-overflow-scrolling:touch;
}

.lottery-modal.is-open{
  display:block;
}

.lottery-modal__backdrop{
  position:fixed;
  inset:0;
  background:rgba(9, 20, 29, 0.62);
  backdrop-filter:blur(4px);
}

.lottery-modal__dialog{
  position:relative;
  width:min(1180px, 100%);
  margin:0 auto;
  background:#ffffff;
  border-radius:28px;
  box-shadow:0 30px 80px rgba(10, 37, 58, 0.28);
  border:1px solid rgba(220,231,238,0.9);
  padding:28px;
  z-index:2;
}

.lottery-modal__close{
  position:absolute;
  top:14px;
  right:14px;
  width:48px;
  height:48px;
  border:none;
  border-radius:14px;
  background:#eef6fb;
  color:#16354a;
  font-size:28px;
  cursor:pointer;
  transition:all .25s ease;
}

.lottery-modal__close:hover{
  background:#dceef8;
  transform:scale(1.04);
}

.lottery-modal__header{
  padding-right:60px;
  margin-bottom:22px;
}

.lottery-badge{
  display:inline-flex;
  align-items:center;
  padding:8px 14px;
  border-radius:999px;
  background:#eaf5fb;
  color:#235f7c;
  font-size:.85rem;
  font-weight:800;
  margin-bottom:14px;
}

.lottery-modal__header h2{
  margin:0 0 10px;
  font-size:clamp(1.8rem, 2.6vw, 2.8rem);
  line-height:1.08;
  color:#16354a;
}

.lottery-modal__subtitle{
  margin:0;
  color:#5f7282;
  font-size:1rem;
}

.lottery-modal__content{
  display:grid;
  grid-template-columns:320px 1fr;
  gap:24px;
  align-items:start;
}

.lottery-info{
  display:grid;
  gap:16px;
  position:sticky;
  top:10px;
}

.lottery-info__box{
  background:linear-gradient(180deg, #fbfdff 0%, #f4f9fc 100%);
  border:1px solid #dce7ee;
  border-radius:22px;
  padding:20px;
  box-shadow:0 10px 24px rgba(19,48,74,0.05);
}

.lottery-info__box h3{
  margin:0 0 12px;
  font-size:1.05rem;
  color:#16354a;
}

.lottery-info__box p,
.lottery-info__box li{
  color:#617384;
}

.lottery-info__box ul{
  margin:0;
  padding-left:18px;
}

.lottery-grid-wrap{
  min-width:0;
}

.lottery-grid-head{
  margin-bottom:16px;
}

.lottery-grid-head h3{
  margin:0 0 6px;
  color:#16354a;
}

.lottery-grid-head p{
  margin:0;
  color:#6b7785;
}

.lottery-grid-public{
  display:grid;
  grid-template-columns:repeat(3, 1fr);
  gap:12px;
}

.lottery-item-public{
  background:#ffffff;
  border:1px solid #dce7ee;
  border-radius:18px;
  padding:12px;
  box-shadow:0 8px 20px rgba(19,48,74,0.04);
  transition:all .25s ease;
}

.lottery-item-public:hover{
  transform:translateY(-2px);
  box-shadow:0 14px 28px rgba(19,48,74,0.08);
}

.lottery-item-public.is-occupied{
  border-color:rgba(47,125,163,0.28);
  background:linear-gradient(180deg, #fbfeff 0%, #f3f9fc 100%);
}

.lottery-item-public.is-free{
  border-style:dashed;
}

.lottery-item-public__top{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:10px;
  margin-bottom:10px;
}

.lottery-number{
  display:inline-flex;
  align-items:center;
  justify-content:center;
  min-width:42px;
  height:42px;
  padding:0 12px;
  border-radius:999px;
  background:#eaf5fb;
  color:#235f7c;
  font-weight:800;
  font-size:.95rem;
}

.lottery-status{
  font-size:.8rem;
  font-weight:800;
  color:#6a7988;
}

.lottery-item-public.is-occupied .lottery-status{
  color:#235f7c;
}

.lottery-name{
  width:100%;
  min-height:46px;
  border-radius:12px;
  border:1px solid #dce7ee;
  background:#f8fbfd;
  padding:0 12px;
  color:#263644;
  font-weight:600;
  font-size:.94rem;
}

.lottery-name::placeholder{
  color:#9aa8b5;
}

/* RESPONSIVE */
@media (max-width: 1100px){
  .lottery-modal__content{
    grid-template-columns:1fr;
  }

  .lottery-info{
    position:static;
  }
}

@media (max-width: 1024px){
  .split-grid,
  .footer-grid{
    grid-template-columns:1fr;
  }

  .split-grid.reverse .section-text,
  .split-grid.reverse .section-media{
    order:initial;
  }

  .hero-full{
    min-height:68vh;
    margin-top:0;
    padding-top:0;
  }

  .lottery-hero{
    min-height:320px;
  }
}

@media (max-width: 860px){
  .menu-toggle{
    display:block;
  }

  .main-nav{
    position:absolute;
    top:88px;
    right:16px;
    left:16px;
    background:rgba(255,255,255,0.98);
    border:1px solid var(--line);
    border-radius:20px;
    box-shadow:var(--shadow);
    flex-direction:column;
    align-items:stretch;
    padding:12px;
    opacity:0;
    visibility:hidden;
    transform:translateY(-10px);
    transition:var(--transition);
  }

  .main-nav.open{
    opacity:1;
    visibility:visible;
    transform:translateY(0);
  }

  .main-nav a{
    padding:12px 14px;
    border-radius:12px;
  }

  .lottery-hero{
    min-height:300px;
  }

  .lottery-hero__overlay{
    background:linear-gradient(180deg, rgba(12, 27, 39, 0.68) 0%, rgba(12, 27, 39, 0.36) 100%);
  }

  .lottery-hero__content{
    padding:38px 0;
  }

  .hero-full{
    min-height:64vh;
    margin-top:0;
    padding-top:0;
  }

  .hero-full__overlay{
    background:linear-gradient(180deg, rgba(12, 27, 39, 0.58) 0%, rgba(12, 27, 39, 0.34) 100%);
  }

  .hero-full__content{
    padding:48px 0 54px;
  }

  .hero-full__content h1{
    font-size:2.4rem;
    line-height:1.02;
  }

  .hero-full__description{
    font-size:1rem;
  }

  .hero-summary-section{
    margin-top:-34px;
  }

  .hero-summary-card{
    padding:22px 20px;
    border-radius:20px;
  }

  .section-text h2{
    font-size:1.8rem;
  }

  .lottery-grid-public{
    grid-template-columns:repeat(2, 1fr);
  }

  .lottery-modal__dialog{
    padding:22px 16px;
    border-radius:22px;
  }

  .lottery-modal__header{
    padding-right:48px;
  }
}

@media (max-width: 640px){
  .container{
    width:min(100% - 24px, var(--container));
  }

  .header-inner{
    min-height:76px;
  }

  .brand-logo{
    width:50px;
    height:50px;
  }

  .brand-title{
    font-size:1rem;
  }

  .brand-subtitle{
    font-size:.82rem;
  }

  .lottery-hero{
    min-height:280px;
  }

  .lottery-hero__content{
    padding:34px 0;
  }

  .hero-full{
    min-height:58vh;
  }

  .hero-full__content{
    padding:34px 0 40px;
  }

  .hero-actions,
  .footer-actions,
  .lottery-hero__actions{
    flex-direction:column;
    align-items:stretch;
  }

  .btn{
    width:100%;
  }

  .content-section{
    padding:28px 0;
  }

  .site-footer{
    padding-top:36px;
  }

  .footer-box{
    padding:20px;
  }

  .site-divider{
    padding:22px 0 18px;
  }

  .site-divider__inner{
    padding:20px 16px;
    border-radius:18px;
  }

  .site-divider__inner h3{
    font-size:1.2rem;
  }
}

@media (max-width: 520px){
  .hero-full__content h1{
    font-size:2rem;
  }

  .lottery-hero__content h2{
    font-size:1.8rem;
  }

  .lottery-grid-public{
    grid-template-columns:1fr;
  }

  .lottery-modal{
    padding:10px;
  }

  .lottery-modal__dialog{
    padding:18px 14px;
  }

  .lottery-modal__close{
    width:42px;
    height:42px;
    font-size:24px;
    top:10px;
    right:10px;
  }
}