:root{
  --blue:#142A59;
  --nav-offset:50px; /* offset for sticky header when jumping to anchors */
}

*{ box-sizing:border-box; }

html{
  scroll-behavior:smooth;
  scroll-padding-top:var(--nav-offset);
}

section[id]{
  scroll-margin-top:var(--nav-offset);
}

body{
  margin:0;
  font-family:'League Spartan',sans-serif;
  line-height:1.5;
}

/* HEADER */
.header{
  background:#fff;
  position:sticky;
  top:0;
  z-index:1000;
  border-bottom:1px solid rgba(20,42,89,.12);
}

.header-inner{
  max-width:1200px;
  margin:auto;
  padding:1.1rem 1rem;
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:1rem;
}

.logo-wrap img{
  height:90px;
  transition:height .25s ease;
}

.header.scrolled .logo-wrap img{
  height:55px;
}

/* NAV */
.nav{
  display:flex;
  align-items:center;
  gap:0.75rem;
  position:relative;
}

.nav-toggle{
  display:none; /* shown on mobile */
  width:44px;
  height:44px;
  border-radius:10px;
  border:2px solid rgba(20,42,89,.2);
  background:#fff;
  cursor:pointer;
  align-items:center;
  justify-content:center;
}

.nav-toggle-bars span{
  display:block;
  width:20px;
  height:2px;
  background:var(--blue);
  margin:4px 0;
  border-radius:2px;
}

.nav-links{
  display:flex;
  list-style:none;
  margin:0;
  padding:0;
  gap:1.1rem;
}

.nav-links a{
  color:var(--blue);
  text-decoration:none;
  font-weight:600;
}

.nav-links a:hover{
  text-decoration:underline;
}

/* Mobile menu layout */
@media (max-width: 768px){
  .nav-toggle{ display:flex; }

  .nav-links{
    display:none;
    position:absolute;
    right:0;
    top:calc(100% + 10px);
    background:#fff;
    border:2px solid rgba(20,42,89,.15);
    border-radius:12px;
    padding:0.75rem;
    width:min(320px, calc(100vw - 2rem));
    flex-direction:column;
    gap:0.6rem;
    box-shadow:0 14px 32px rgba(20,42,89,.12);
  }

  .header.nav-open .nav-links{
    display:flex;
  }

  .nav-links a{
    padding:0.55rem 0.6rem;
    border-radius:10px;
  }

  .nav-links a:hover{
    background:rgba(20,42,89,.06);
    text-decoration:none;
  }

  /* slightly larger anchor offset on small screens */
  :root{ --nav-offset: 95px; }
}

/* SECTIONS */
.section{
  padding:2.5rem 1.25rem;
}

.section h2{
  text-align:center;
  font-size:2.2rem;
  font-weight:700;
  margin:0 0 1.2rem 0;
}

.section-white{ background:#fff; color:var(--blue); }
.section-blue{ background:var(--blue); color:#fff; }

/* HERO */
.hero{
  position:relative;
  background:url("../img/pickleball_generic.jpg") center/cover no-repeat;
  color:#fff;
  padding:5rem 1.25rem;
}

.hero-overlay{
  position:absolute;
  inset:0;
  background:rgba(20,42,89,.5);
}

.hero-content{
  position:relative;
  max-width:900px;
  margin:auto;
  text-align:left;
}

.hero-byline{
  font-size:1.25rem;
  font-weight:400;
  margin:0 0 .75rem 0;
}

.hero h1{
  font-size:3.2rem;
  font-weight:700;
  margin:0 0 1.2rem 0;
}

/* BUTTONS */
.btn{
  display:inline-flex;
  align-items:center;
  justify-content:center;
  padding:0.8rem 1.6rem;
  border-radius:6px;
  font-weight:700;
  text-decoration:none;
  border:none;
  cursor:pointer;
}

.btn.primary{
  background:var(--blue);
  color:#fff;
}

.section-blue .btn.primary,
.hero .btn.primary{
  background:#fff;
  color:var(--blue);
}

.btn.outline{
  background:transparent;
  border:2px solid currentColor;
  color:currentColor;
}

/* SESSIONS */
.sessions-container{
  max-width:1100px;
  margin:auto;
  max-height:700px;
  overflow-y:auto;
  padding:0.5rem;
}

.os-buttons{
  display:flex;
  gap:0.75rem;
  justify-content:center;
  flex-wrap:wrap;
  margin-bottom:1rem;
}

/* GALLERY */
.gallery-container{
  max-width:1200px;
  margin:auto;
  max-height:600px;
  overflow-y:auto;
  padding:0.25rem;
}

.gallery{
  display:grid;
  grid-template-columns:repeat(auto-fit,minmax(220px,1fr));
  gap:1rem;
}

.gallery img{
  width:100%;
  height:220px;
  object-fit:cover;
  border-radius:8px;
}

/* FACEBOOK */
.facebook-wrap{
  display:flex;
  justify-content:center;
}

/* ABOUT background */
#about{
  position:relative;
  background:url("../img/PickleballsBackground.png") center/cover no-repeat;
  color:#fff;
}

#about::before{
  content:"";
  position:absolute;
  inset:0;
  background:rgba(20,42,89,.78);
}

#about > *{
  position:relative;
}

.about-text{
  max-width:900px;
  margin:auto;
  font-size:1.1rem;
  line-height:1.7;
}

/* CONTACT */
.contact-grid{
  max-width:1100px;
  margin:auto;
  display:grid;
  grid-template-columns:1fr 1fr;
  gap:2rem;
  align-items:start;
}

.contact-form label{
  display:flex;
  flex-direction:column;
  font-weight:600;
  margin-bottom:1rem;
}

.contact-form input,
.contact-form textarea{
  margin-top:0.4rem;
  padding:0.65rem;
  font-family:inherit;
  font-size:1rem;
  border:1px solid #cfcfcf;
  border-radius:6px;
}

.contact-form textarea{ resize:vertical; }

.form-error{
  margin-top:1rem;
  color:#b00020;
  font-weight:600;
}

.hp{ display:none; }

.form-success-block{
  border:2px solid rgba(20,42,89,.18);
  border-radius:12px;
  padding:1.25rem;
  background:rgba(20,42,89,.05);
}

.form-success-block h3{
  margin:0 0 0.5rem 0;
  font-size:1.6rem;
  color:var(--blue);
}

.form-success-block p{
  margin:0 0 1rem 0;
  color:#1f2f57;
}

.contact-highlight{
  font-size:1.2rem;
  margin-top:0;
}

.address{
  margin-top:1rem;
  font-size:1.05rem;
}

.map-wrap iframe{
  width:100%;
  height:260px;
  border:0;
  border-radius:8px;
  margin-top:1rem;
}

/* REGISTRATION */
.registration-content{
  max-width:800px;
  margin:auto;
  text-align:center;
}

.registration-intro{
  font-size:1.15rem;
  margin-bottom:1.5rem;
}

.registration-links{
  display:flex;
  flex-direction:column;
  align-items:center;
  gap:0.9rem;
}

.registration-links .btn{
  width:100%;
  max-width:460px;
}

/* SPONSORS (uniform logo height) */
.sponsors-wrap{
  max-width:1100px;
  margin:1.5rem auto 0;
  display:grid;
  grid-template-columns:repeat(3,minmax(0,1fr));
  gap:1.25rem;
  align-items:stretch;
}

.sponsor-card{
  display:flex;
  flex-direction:column;
  align-items:center;
  justify-content:center;
  text-decoration:none;
  background:#fff;
  border:2px solid rgba(20,42,89,.15);
  border-radius:12px;
  padding:1.25rem;
  transition:transform .15s ease, box-shadow .15s ease;
}

.sponsor-card:hover{
  transform:translateY(-2px);
  box-shadow:0 10px 22px rgba(20,42,89,.12);
}

.sponsor-logo{
  height:110px;
  width:100%;
  display:flex;
  align-items:center;
  justify-content:center;
}

.sponsor-logo img{
  max-height:100%;
  max-width:100%;
  object-fit:contain;
  display:block;
}

.sponsor-name{
  margin-top:0.85rem;
  font-weight:700;
  color:var(--blue);
  text-align:center;
}

@media (max-width:900px){
  .sponsors-wrap{ grid-template-columns:1fr; }
  .sponsor-logo{ height:100px; }
}

/* MOBILE general */
@media (max-width:768px){
  .contact-grid{ grid-template-columns:1fr; }
  .hero h1{ font-size:2.4rem; }
  .logo-wrap img{ height:70px; }
  .header.scrolled .logo-wrap img{ height:50px; }
}
