/* ============================================
   Uffculme Scouts - Main Stylesheet
   Visual style inspired by Scouts "Skills for Life" theme
   ============================================ */

/* ---- Reset & Base ---- */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
body {
  font-family: 'Nunito Sans', 'Segoe UI', sans-serif;
  font-size: 16px;
  line-height: 1.6;
  color: #333;
  background: #fff;
  -webkit-font-smoothing: antialiased;
}
a { color: #7413dc; text-decoration: none; transition: color .25s; }
a:hover { color: #23a950; }
img { max-width: 100%; height: auto; display: block; }
ul { list-style: none; }
h1,h2,h3,h4,h5,h6 { line-height: 1.2; font-weight: 700; color: #1d1d1b; }
h1 { font-size: 2.4rem; }
h2 { font-size: 2rem; }
h3 { font-size: 1.5rem; }
h4 { font-size: 1.25rem; }
p { margin-bottom: 1rem; }

/* ---- Utility ---- */
.wrapper { max-width: 1200px; margin: 0 auto; padding: 0 20px; }
.cf::after { content: ''; display: table; clear: both; }
.btn {
  display: inline-block;
  padding: 12px 28px;
  border-radius: 50px;
  font-weight: 700;
  font-size: .95rem;
  text-align: center;
  transition: all .3s;
  cursor: pointer;
  border: 2px solid transparent;
  text-decoration: none;
}
.btn-primary { background: #7413dc; color: #fff; }
.btn-primary:hover { background: #5e0fb3; color: #fff; }
.btn-green { background: #23a950; color: #fff; }
.btn-green:hover { background: #1b8a3f; color: #fff; }
.btn-outline { background: transparent; border-color: #fff; color: #fff; }
.btn-outline:hover { background: #fff; color: #7413dc; }
.btn-white { background: #fff; color: #7413dc; }
.btn-white:hover { background: #f0e6ff; color: #7413dc; }
.text-center { text-align: center; }
.section-padding { padding: 60px 0; }

/* ---- Header ---- */
.site-header {
  background: #fff;
  box-shadow: 0 2px 8px rgba(0,0,0,.08);
  position: sticky;
  top: 0;
  z-index: 1000;
}
.header-main {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 0;
}
.logo-area {
  display: flex;
  align-items: center;
  gap: 12px;
  text-decoration: none;
  color: #1d1d1b;
}
.logo-area img {
  height: 50px;
  width: auto;
}
.logo-area .logo-text {
  font-size: 1.35rem;
  font-weight: 800;
  color: #7413dc;
}
.header-right {
  display: flex;
  align-items: center;
  gap: 16px;
}
.join-btn {
  background: #7413dc;
  color: #fff;
  padding: 10px 24px;
  border-radius: 50px;
  font-weight: 700;
  font-size: .9rem;
  transition: background .3s;
}
.join-btn:hover { background: #5e0fb3; color: #fff; }

/* Hamburger */
.hamburger {
  display: none;
  flex-direction: column;
  cursor: pointer;
  gap: 5px;
  padding: 4px;
}
.hamburger span {
  display: block;
  width: 26px;
  height: 3px;
  background: #333;
  border-radius: 3px;
  transition: all .3s;
}
.hamburger.active span:nth-child(1) { transform: rotate(45deg) translate(5px, 6px); }
.hamburger.active span:nth-child(2) { opacity: 0; }
.hamburger.active span:nth-child(3) { transform: rotate(-45deg) translate(5px, -6px); }

/* Main Navigation */
.main-nav {
  background: #7413dc;
}
.main-nav .wrapper {
  display: flex;
  align-items: center;
}
.nav-menu {
  display: flex;
  gap: 0;
  width: 100%;
}
.nav-menu > li {
  position: relative;
}
.nav-menu > li > a {
  display: block;
  padding: 14px 18px;
  color: #fff;
  font-weight: 600;
  font-size: .9rem;
  transition: background .3s;
}
.nav-menu > li > a:hover,
.nav-menu > li.active > a {
  background: rgba(255,255,255,.15);
  color: #fff;
}
/* Dropdown */
.nav-menu > li > .sub-menu {
  display: none;
  position: absolute;
  top: 100%;
  left: 0;
  background: #fff;
  min-width: 220px;
  box-shadow: 0 4px 16px rgba(0,0,0,.12);
  border-radius: 0 0 8px 8px;
  z-index: 100;
}
.nav-menu > li:hover > .sub-menu { display: block; }
.sub-menu li a {
  display: block;
  padding: 10px 18px;
  color: #333;
  font-size: .88rem;
  transition: background .2s;
}
.sub-menu li a:hover { background: #f5ebff; color: #7413dc; }

/* ---- Hero / Slideshow ---- */
.hero {
  position: relative;
  height: 500px;
  overflow: hidden;
  background: #1d1d1b;
}
.hero-slides {
  position: absolute;
  inset: 0;
}
.hero-slides .slide {
  position: absolute;
  inset: 0;
  opacity: 0;
  transition: opacity 1.5s ease-in-out;
  background-size: cover;
  background-position: center;
}
.hero-slides .slide.active { opacity: 1; }
.hero-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(to right, rgba(0,0,0,.6) 0%, rgba(0,0,0,.2) 100%);
  z-index: 1;
}
.hero-content {
  position: relative;
  z-index: 2;
  height: 100%;
  display: flex;
  align-items: center;
}
.hero-text {
  max-width: 600px;
  color: #fff;
}
.hero-text h2 {
  font-size: 2.5rem;
  color: #fff;
  margin-bottom: 16px;
  line-height: 1.15;
}
.hero-text p {
  font-size: 1.15rem;
  margin-bottom: 24px;
  opacity: .95;
}
.hero-text .btn-row {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
}

/* ---- Page Hero (inner pages) ---- */
.page-hero {
  background: #7413dc;
  padding: 50px 0;
  color: #fff;
  text-align: center;
}
.page-hero h1 { color: #fff; margin-bottom: 8px; }
.page-hero p { color: rgba(255,255,255,.85); font-size: 1.1rem; }

/* ---- Welcome Section ---- */
.welcome-section {
  padding: 70px 0;
}
.welcome-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 50px;
  align-items: center;
}
.welcome-text h1 span {
  color: #7413dc;
}
.welcome-text p {
  color: #555;
  font-size: 1.05rem;
}
.welcome-image {
  position: relative;
}
.welcome-image img {
  border-radius: 12px;
  box-shadow: 0 8px 30px rgba(0,0,0,.12);
}
.welcome-image::after {
  content: '';
  position: absolute;
  width: 80%;
  height: 80%;
  background: #23a950;
  border-radius: 12px;
  bottom: -20px;
  right: -20px;
  z-index: -1;
}

/* ---- Age Sections ---- */
.age-section { 
  background: #f7f7f7; 
  padding: 60px 0; 
}
.age-section h3 {
  text-align: center;
  margin-bottom: 40px;
  font-size: 1.8rem;
}
.age-blocks {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  gap: 20px;
  max-width: 800px;
  margin: 0 auto;
}
.age-block {
  background: #fff;
  border-radius: 12px;
  padding: 30px 16px;
  text-align: center;
  box-shadow: 0 2px 12px rgba(0,0,0,.06);
  transition: transform .3s, box-shadow .3s;
}
.age-block:hover {
  transform: translateY(-4px);
  box-shadow: 0 8px 24px rgba(0,0,0,.1);
}
.age-block img {
  width: 56px;
  height: 56px;
  margin: 0 auto 12px;
}
.age-block .section-name {
  font-weight: 700;
  font-size: .95rem;
  display: block;
  margin-bottom: 4px;
  color: #1d1d1b;
}
.age-block .age-range {
  font-size: .85rem;
  color: #666;
}

/* Section-specific colours */
.age-block.squirrels { border-top: 4px solid #e22e12; }
.age-block.beavers { border-top: 4px solid #006ddf; }
.age-block.cubs { border-top: 4px solid #23a950; }
.age-block.scouts { border-top: 4px solid #004851; }
.age-block.explorers { border-top: 4px solid #003982; }

/* ---- Schedule Table ---- */
.schedule-section { padding: 60px 0; }
.schedule-section h3 { text-align: center; margin-bottom: 30px; }
.schedule-table {
  width: 100%;
  max-width: 700px;
  margin: 0 auto;
  border-collapse: collapse;
  border-radius: 12px;
  overflow: hidden;
  box-shadow: 0 2px 12px rgba(0,0,0,.06);
}
.schedule-table thead { background: #7413dc; color: #fff; }
.schedule-table th,
.schedule-table td {
  padding: 14px 20px;
  text-align: left;
  font-size: .95rem;
}
.schedule-table tbody tr { background: #fff; }
.schedule-table tbody tr:nth-child(even) { background: #f9f5ff; }
.schedule-table tbody tr:hover { background: #f0e6ff; }

/* ---- Volunteer CTA ---- */
.volunteer-cta {
  background: linear-gradient(135deg, #7413dc 0%, #23a950 100%);
  color: #fff;
  padding: 60px 0;
  text-align: center;
}
.volunteer-cta h3 { color: #fff; font-size: 1.8rem; margin-bottom: 12px; }
.volunteer-cta p { font-size: 1.1rem; opacity: .9; margin-bottom: 24px; max-width: 600px; margin-left: auto; margin-right: auto; }

/* ---- Gallery Preview ---- */
.gallery-section {
  padding: 60px 0;
  background: #f7f7f7;
}
.gallery-section h3 { text-align: center; margin-bottom: 30px; }
.gallery-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 16px;
}
.gallery-grid img {
  width: 100%;
  height: 200px;
  object-fit: cover;
  border-radius: 10px;
  transition: transform .3s;
}
.gallery-grid img:hover { transform: scale(1.03); }
.gallery-section .text-center { margin-top: 30px; }

/* ---- Join Banner ---- */
.join-banner {
  background: #1d1d1b;
  color: #fff;
  padding: 50px 0;
  text-align: center;
}
.join-banner h3 { color: #fff; font-size: 1.6rem; margin-bottom: 8px; }
.join-banner p { opacity: .85; margin-bottom: 20px; }

/* ---- Dwayne Fields Section ---- */
.dwayne-section {
  background: #004851;
  color: #fff;
  padding: 40px 0;
}
.dwayne-inner {
  display: flex;
  align-items: center;
  gap: 40px;
}
.dwayne-text h6 {
  font-size: 1.1rem;
  font-weight: 700;
  margin-bottom: 8px;
  color: #fff;
}
.dwayne-text p {
  font-size: .92rem;
  opacity: .9;
  margin-bottom: 12px;
}
.dwayne-text a { color: #23a950; font-weight: 600; }
.dwayne-text a:hover { color: #fff; }

/* ---- Footer ---- */
.site-footer {
  background: #1d1d1b;
  color: #ccc;
  padding: 50px 0 30px;
}
.footer-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 40px;
  margin-bottom: 40px;
}
.footer-col h4 { color: #fff; margin-bottom: 16px; font-size: 1rem; }
.footer-col ul li { margin-bottom: 8px; }
.footer-col ul li a { color: #ccc; font-size: .9rem; }
.footer-col ul li a:hover { color: #23a950; }
.footer-col p { font-size: .9rem; line-height: 1.7; }
.footer-bottom {
  border-top: 1px solid #333;
  padding-top: 20px;
  text-align: center;
  font-size: .85rem;
  color: #888;
}

/* ---- Content Pages ---- */
.content-section { padding: 60px 0; }
.content-section h2 { margin-bottom: 20px; }
.content-section h4 { margin-bottom: 12px; margin-top: 24px; }
.content-section p { color: #555; }
.content-section ul { padding-left: 20px; margin-bottom: 1rem; }
.content-section ul li { margin-bottom: 6px; color: #555; list-style: disc; }

/* Two-column content */
.content-two-col {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 50px;
  align-items: start;
}

/* ---- Section Cards (Join page) ---- */
.section-card {
  background: #fff;
  border-radius: 16px;
  padding: 40px;
  margin-bottom: 40px;
  box-shadow: 0 2px 16px rgba(0,0,0,.06);
}
.section-card h3 { margin-bottom: 16px; }
.section-card p { color: #555; }
.section-card .btn { margin-top: 16px; }
.section-card.squirrels-card { border-left: 5px solid #e22e12; }
.section-card.beavers-card { border-left: 5px solid #006ddf; }
.section-card.cubs-card { border-left: 5px solid #23a950; }
.section-card.scouts-card { border-left: 5px solid #004851; }

/* ---- Contact ---- */
.contact-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 50px;
  align-items: start;
}
.contact-info h4 { margin-bottom: 12px; }
.contact-info p { margin-bottom: 16px; }
.contact-form label {
  display: block;
  margin-bottom: 4px;
  font-weight: 600;
  font-size: .9rem;
  color: #333;
}
.contact-form input,
.contact-form textarea,
.contact-form select {
  width: 100%;
  padding: 12px 16px;
  border: 2px solid #ddd;
  border-radius: 8px;
  font-size: .95rem;
  font-family: inherit;
  margin-bottom: 16px;
  transition: border-color .3s;
}
.contact-form input:focus,
.contact-form textarea:focus {
  outline: none;
  border-color: #7413dc;
}
.contact-form textarea { min-height: 120px; resize: vertical; }

/* ---- Donations ---- */
.donation-cards {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 24px;
}
.donation-card {
  background: #fff;
  border-radius: 16px;
  padding: 36px;
  text-align: center;
  box-shadow: 0 2px 16px rgba(0,0,0,.06);
  transition: transform .3s;
}
.donation-card:hover { transform: translateY(-4px); }
.donation-card h4 { margin-bottom: 12px; }
.donation-card p { color: #666; font-size: .92rem; margin-bottom: 20px; }
.donation-card .btn { width: 100%; }

/* ---- Events ---- */
.events-embed {
  max-width: 800px;
  margin: 0 auto;
}
.fb-event-card {
  background: #fff;
  border-radius: 12px;
  padding: 24px;
  margin-bottom: 20px;
  box-shadow: 0 2px 12px rgba(0,0,0,.06);
  display: flex;
  gap: 20px;
  align-items: flex-start;
}
.fb-event-date {
  background: #7413dc;
  color: #fff;
  border-radius: 10px;
  padding: 12px 16px;
  text-align: center;
  min-width: 70px;
  flex-shrink: 0;
}
.fb-event-date .month {
  font-size: .75rem;
  text-transform: uppercase;
  font-weight: 700;
}
.fb-event-date .day {
  font-size: 1.6rem;
  font-weight: 800;
  line-height: 1;
}
.fb-event-info h4 { margin-bottom: 6px; }
.fb-event-info p { color: #666; font-size: .9rem; margin-bottom: 8px; }

/* ---- Responsive ---- */
@media (max-width: 968px) {
  .welcome-grid,
  .content-two-col,
  .contact-grid { grid-template-columns: 1fr; }
  .hero { height: 400px; }
  .hero-text h2 { font-size: 2rem; }
  .footer-grid { grid-template-columns: 1fr 1fr; }
  .welcome-image::after { display: none; }
}

@media (max-width: 768px) {
  /* Mobile nav */
  .main-nav .nav-menu { 
    display: none; 
    flex-direction: column;
  }
  .main-nav .nav-menu.open { display: flex; }
  .nav-menu > li > a { padding: 12px 18px; border-bottom: 1px solid rgba(255,255,255,.1); }
  .nav-menu > li > .sub-menu {
    position: static;
    box-shadow: none;
    background: #6210b5;
    display: none;
  }
  .nav-menu > li.sub-open > .sub-menu { display: block; }
  .sub-menu li a { color: #fff; padding: 10px 30px; }
  .sub-menu li a:hover { background: rgba(255,255,255,.1); color: #fff; }
  .hamburger { display: flex; }
  .header-right .join-btn { display: none; }
  
  .hero { height: 350px; }
  .hero-text h2 { font-size: 1.6rem; }
  .hero-text p { font-size: 1rem; }
  .hero-text .btn { padding: 10px 20px; font-size: .85rem; }
  .hero-text .btn-row { gap: 8px; }
  
  .page-hero { padding: 35px 0; }
  .page-hero h1 { font-size: 1.8rem; }

  .section-padding { padding: 40px 0; }
  .section-card { padding: 24px; margin-bottom: 24px; }
  
  .age-section, .schedule-section, .gallery-section { padding: 40px 0; }
  .volunteer-cta, .join-banner { padding: 40px 0; }
  .volunteer-cta h3 { font-size: 1.4rem; }
  .volunteer-cta p { font-size: 1rem; }

  .age-blocks { grid-template-columns: repeat(2, 1fr); }
  .footer-grid { grid-template-columns: 1fr; }
  .gallery-grid { grid-template-columns: 1fr 1fr; }
  .donation-cards { grid-template-columns: 1fr; }
  
  .fb-event-card { flex-direction: column; }

  /* Responsive table */
  .schedule-table-wrap { overflow-x: auto; -webkit-overflow-scrolling: touch; }
  .schedule-table th, .schedule-table td { padding: 10px 14px; font-size: .88rem; white-space: nowrap; }

  /* Responsive iframes */
  iframe { max-width: 100% !important; }

  /* Contact info stacking */
  .contact-info h3 { font-size: 1.3rem; }
}

@media (max-width: 480px) {
  h1 { font-size: 1.6rem; }
  h2 { font-size: 1.3rem; }
  h3 { font-size: 1.2rem; }
  .wrapper { padding: 0 16px; }
  .hero { height: 280px; }
  .hero-text h2 { font-size: 1.35rem; }
  .hero-text p { font-size: .9rem; }
  .age-blocks { grid-template-columns: 1fr 1fr; gap: 12px; }
  .age-block { padding: 20px 12px; }
  .gallery-grid { grid-template-columns: 1fr; }
  .btn { padding: 10px 20px; font-size: .88rem; }
  .section-card { padding: 20px; }
  .donation-card { padding: 24px; }
  .site-footer { padding: 35px 0 20px; }
}

/* ---- Additional mobile helpers ---- */
a[href^="mailto:"] { word-break: break-all; }
.schedule-table-wrap { border-radius: 12px; overflow: hidden; box-shadow: 0 2px 12px rgba(0,0,0,.06); }
.schedule-table { box-shadow: none; border-radius: 0; }
