/* ==========================================================================
   Cub Scouts Pack 505 - Houston, Texas
   Modern, Lightweight, Accessible Stylesheet
   ========================================================================== */

:root {
  /* Brand Colors */
  --primary-navy: #0a2540;
  --primary-blue: #004b87;
  --primary-blue-light: #0d6efd;
  --scout-gold: #f59e0b;
  --scout-gold-hover: #d97706;
  --scout-gold-light: #fef3c7;
  --forest-green: #1b4d3e;
  --forest-green-light: #ecfdf5;
  --accent-red: #c026d3;
  --accent-amber: #b45309;

  /* Neutral Colors */
  --bg-main: #f8fafc;
  --bg-surface: #ffffff;
  --bg-alt: #f1f5f9;
  --text-main: #0f172a;
  --text-muted: #475569;
  --text-light: #64748b;
  --border-color: #e2e8f0;
  --border-light: #cbd5e1;

  /* Shadows */
  --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
  --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -2px rgba(0, 0, 0, 0.06);
  --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -4px rgba(0, 0, 0, 0.05);
  --shadow-xl: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 8px 10px -6px rgba(0, 0, 0, 0.04);

  /* Typography */
  --font-heading: 'Outfit', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;
  --font-body: 'Plus Jakarta Sans', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;

  /* Layout */
  --container-max: 1200px;
  --radius-sm: 6px;
  --radius-md: 10px;
  --radius-lg: 16px;
  --radius-full: 9999px;
  --header-height: 76px;
  --transition-fast: 0.2s ease;
  --transition-normal: 0.3s ease;
}

/* Reset & Base */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  scroll-behavior: smooth;
  font-size: 16px;
  -webkit-text-size-adjust: 100%;
}

body {
  font-family: var(--font-body);
  background-color: var(--bg-main);
  color: var(--text-main);
  line-height: 1.6;
  overflow-x: hidden;
  display: flex;
  flex-direction: column;
  min-height: 100vh;
  -webkit-tap-highlight-color: transparent;
}

button, a, input, select, textarea {
  touch-action: manipulation;
}

img {
  max-width: 100%;
  height: auto;
  display: block;
}

a {
  color: var(--primary-blue);
  text-decoration: none;
  transition: color var(--transition-fast);
}

a:hover {
  color: var(--primary-blue-light);
}

h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-heading);
  font-weight: 700;
  line-height: 1.25;
  color: var(--primary-navy);
  margin-bottom: 0.75rem;
}

/* Accessibility: Skip Link */
.skip-link {
  position: absolute;
  top: -70px;
  left: 1rem;
  background: var(--primary-navy);
  color: #ffffff;
  padding: 0.85rem 1.5rem;
  font-weight: 700;
  font-size: 0.95rem;
  border-radius: 0 0 var(--radius-md) var(--radius-md);
  border: 2px solid var(--scout-gold);
  border-top: none;
  z-index: 99999;
  transition: top 0.2s ease-in-out;
  text-decoration: none;
  box-shadow: var(--shadow-lg);
}

.skip-link:focus {
  top: 0;
  color: var(--scout-gold);
  outline: 3px solid var(--scout-gold);
  outline-offset: 2px;
}

/* Accessible Focus Indicators */
:focus-visible {
  outline: 3px solid var(--primary-blue-light);
  outline-offset: 2px;
}

button:focus-visible,
a:focus-visible,
input:focus-visible,
select:focus-visible,
textarea:focus-visible {
  outline: 3px solid var(--primary-blue);
  outline-offset: 2px;
}


h1 { font-size: 2.5rem; }
h2 { font-size: 2rem; }
h3 { font-size: 1.5rem; }
h4 { font-size: 1.25rem; }

p {
  margin-bottom: 1rem;
}

p:last-child {
  margin-bottom: 0;
}

ul, ol {
  margin-bottom: 1rem;
  padding-left: 1.5rem;
}

/* Utility Containers */
.container {
  width: 100%;
  max-width: var(--container-max);
  margin-left: auto;
  margin-right: auto;
  padding-left: 1.5rem;
  padding-right: 1.5rem;
}

.section-py {
  padding-top: 4.5rem;
  padding-bottom: 4.5rem;
}

.section-py-sm {
  padding-top: 2.5rem;
  padding-bottom: 2.5rem;
}

.text-center { text-align: center; }
.text-left { text-align: left; }
.text-right { text-align: right; }

.section-tag {
  display: inline-block;
  font-size: 0.825rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.075em;
  color: var(--primary-blue);
  background-color: #e0f2fe;
  padding: 0.35rem 0.85rem;
  border-radius: var(--radius-full);
  margin-bottom: 0.75rem;
}

.section-title {
  margin-bottom: 1rem;
}

.section-subtitle {
  font-size: 1.125rem;
  color: var(--text-muted);
  max-width: 760px;
  text-wrap: pretty; /* avoids a single word alone on the last line */
  margin-left: auto;
  margin-right: auto;
  margin-bottom: 2.5rem;
}

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  font-family: var(--font-heading);
  font-weight: 600;
  font-size: 1rem;
  padding: 0.75rem 1.5rem;
  border-radius: var(--radius-md);
  border: 2px solid transparent;
  cursor: pointer;
  transition: all var(--transition-fast);
  text-decoration: none;
  line-height: 1.25;
  white-space: nowrap;
}

.btn-primary {
  background-color: var(--scout-gold);
  color: var(--primary-navy);
  border-color: var(--scout-gold);
  box-shadow: 0 4px 10px rgba(245, 158, 11, 0.3);
}

.btn-primary:hover {
  background-color: var(--scout-gold-hover);
  border-color: var(--scout-gold-hover);
  color: #ffffff;
  transform: translateY(-2px);
  box-shadow: 0 6px 14px rgba(245, 158, 11, 0.4);
}

.btn-navy {
  background-color: var(--primary-navy);
  color: #ffffff;
  border-color: var(--primary-navy);
}

.btn-navy:hover {
  background-color: var(--primary-blue);
  border-color: var(--primary-blue);
  color: #ffffff;
  transform: translateY(-2px);
}

.btn-outline {
  background-color: transparent;
  color: var(--primary-navy);
  border-color: var(--primary-navy);
}

.btn-outline:hover {
  background-color: var(--primary-navy);
  color: #ffffff;
}

.btn-outline-white {
  background-color: transparent;
  color: #ffffff;
  border-color: #ffffff;
}

.btn-outline-white:hover {
  background-color: #ffffff;
  color: var(--primary-navy);
}

.btn-sm {
  padding: 0.45rem 0.95rem;
  font-size: 0.875rem;
  border-radius: var(--radius-sm);
}

.btn-lg {
  padding: 0.9rem 2rem;
  font-size: 1.125rem;
  border-radius: var(--radius-md);
}

.btn-group {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 1rem;
}

/* Reusable Content Boxes & Callouts */
.content-box {
  background-color: var(--bg-surface);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  padding: 2.5rem;
  box-shadow: var(--shadow-sm);
  margin-bottom: 3.5rem;
}

.content-box-highlight {
  background: linear-gradient(135deg, var(--primary-navy) 0%, #0d3864 100%);
  color: #ffffff;
  padding: 3rem;
  border-radius: var(--radius-lg);
  margin-bottom: 3.5rem;
}

.callout-card {
  background: #fffbeb;
  border: 1px solid #fef3c7;
  border-radius: var(--radius-md);
  padding: 1.5rem;
  display: flex;
  align-items: center;
  gap: 1.5rem;
  margin-top: 1.5rem;
}

.callout-card.success {
  background: #ecfdf5;
  border-color: #a7f3d0;
}

.callout-card.navy {
  background: var(--bg-alt);
  border-color: var(--border-color);
}


/* ==========================================================================
   Header & Navigation
   ========================================================================== */

.site-header {
  position: sticky;
  top: 0;
  z-index: 1000;
  /* No backdrop-filter here: it would trap the fixed-position mobile menu inside the header. */
  background-color: #fff;
  border-bottom: 1px solid var(--border-color);
  box-shadow: var(--shadow-sm);
  transition: all var(--transition-fast);
}

.nav-container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: var(--header-height);
}

.brand-logo {
  display: flex;
  align-items: center;
  gap: 0.85rem;
  text-decoration: none;
}

.brand-logo img {
  width: 48px;
  height: 48px;
  border-radius: var(--radius-sm);
  object-fit: contain;
}

.brand-text {
  display: flex;
  flex-direction: column;
}

.brand-title {
  font-family: var(--font-heading);
  font-size: 1.35rem;
  font-weight: 800;
  color: var(--primary-navy);
  line-height: 1.1;
  letter-spacing: -0.02em;
}

.brand-subtitle {
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.main-nav {
  display: flex;
  align-items: center;
  gap: 0.25rem;
}

.nav-list {
  display: flex;
  align-items: center;
  list-style: none;
  margin: 0;
  padding: 0;
  gap: 0.25rem;
}


.nav-link {
  display: flex;
  align-items: center;
  gap: 0.35rem;
  font-family: var(--font-heading);
  font-weight: 600;
  font-size: 0.95rem;
  color: var(--text-main);
  padding: 0.6rem 0.85rem;
  border-radius: var(--radius-sm);
  transition: all var(--transition-fast);
}

.nav-link:hover, .nav-link.active {
  color: var(--primary-blue);
  background-color: var(--bg-alt);
}


.nav-cta {
  margin-left: 1rem;
}

/* Mobile Menu Toggle */
.mobile-toggle {
  display: none;
  background: none;
  border: none;
  cursor: pointer;
  padding: 0.5rem;
  color: var(--primary-navy);
}

.mobile-toggle svg {
  width: 28px;
  height: 28px;
}

/* ==========================================================================
   Hero Section
   ========================================================================== */
.hero {
  position: relative;
  background: linear-gradient(135deg, var(--primary-navy) 0%, #0d3864 100%);
  color: #ffffff;
  padding: 5rem 0 6rem;
  overflow: hidden;
}

.hero::after {
  content: '';
  position: absolute;
  bottom: -1px;
  left: 0;
  right: 0;
  height: 40px;
  background: var(--bg-main);
  clip-path: polygon(0 100%, 100% 100%, 100% 0);
}

.hero-grid {
  display: grid;
  grid-template-columns: 1.15fr 0.85fr;
  gap: 3.5rem;
  align-items: center;
}

.hero-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  background: rgba(245, 158, 11, 0.2);
  border: 1px solid rgba(245, 158, 11, 0.4);
  color: var(--scout-gold-light);
  font-size: 0.875rem;
  font-weight: 600;
  padding: 0.35rem 0.95rem;
  border-radius: var(--radius-full);
  margin-bottom: 1.25rem;
}

.hero-title {
  color: #ffffff;
  font-size: 3.25rem;
  font-weight: 800;
  line-height: 1.15;
  margin-bottom: 1.25rem;
  letter-spacing: -0.02em;
}

.hero-title span {
  color: var(--scout-gold);
}

.hero-lead {
  font-size: 1.2rem;
  color: #e2e8f0;
  margin-bottom: 2rem;
  line-height: 1.6;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
  margin-bottom: 2.5rem;
}


.hero-image-card {
  position: relative;
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: var(--shadow-xl);
  border: 4px solid rgba(255, 255, 255, 0.15);
}

.hero-image-card img {
  width: 100%;
  height: 420px;
  object-fit: cover;
  transition: transform 0.6s ease;
}

.hero-image-card:hover img {
  transform: scale(1.03);
}


/* Page Banner / Hero for Inner Pages */
.page-banner {
  background: linear-gradient(135deg, var(--primary-navy) 0%, #0d3864 100%);
  color: #ffffff;
  padding: 3.5rem 0;
  text-align: center;
  position: relative;
}

.page-banner h1 {
  color: #ffffff;
  font-size: 2.5rem;
  margin-bottom: 0.5rem;
}

.page-banner p {
  color: #e2e8f0;
  font-size: 1.15rem;
  max-width: 700px;
  margin: 0 auto;
}


/* ==========================================================================
   Cards, Grids & Features
   ========================================================================== */
.grid-3 {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 2rem;
}

.grid-2 {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 2.5rem;
}

.grid-4 {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1.5rem;
}

.card {
  background-color: var(--bg-surface);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  padding: 2rem;
  box-shadow: var(--shadow-sm);
  transition: all var(--transition-normal);
  display: flex;
  flex-direction: column;
}

.card:hover {
  box-shadow: var(--shadow-lg);
  transform: translateY(-4px);
  border-color: var(--border-light);
}

.card-img-top {
  width: calc(100% + 4rem);
  margin: -2rem -2rem 1.5rem -2rem;
  height: 200px;
  object-fit: cover;
  border-top-left-radius: var(--radius-lg);
  border-top-right-radius: var(--radius-lg);
}


.card-title {
  font-size: 1.25rem;
  margin-bottom: 0.75rem;
}

.card-body {
  color: var(--text-muted);
  flex-grow: 1;
}

.card-footer {
  margin-top: 1.5rem;
  padding-top: 1rem;
  border-top: 1px solid var(--border-color);
}

/* ==========================================================================
   Footer
   ========================================================================== */
.site-footer {
  background-color: var(--primary-navy);
  color: #e2e8f0;
  padding-top: 4.5rem;
  padding-bottom: 2rem;
  margin-top: auto;
  border-top: 4px solid var(--scout-gold);
}

.footer-grid {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr; /* brand/address, Pack 505 links, Official links */
  gap: 3rem;
  margin-bottom: 3.5rem;
}

.footer-brand h3 {
  color: #ffffff;
  font-size: 1.5rem;
  margin-bottom: 0.75rem;
}

.footer-brand p {
  color: #94a3b8;
  font-size: 0.95rem;
  margin-bottom: 1.25rem;
}

.footer-col h4 {
  color: #ffffff;
  font-size: 1.1rem;
  margin-bottom: 1.25rem;
  position: relative;
  padding-bottom: 0.5rem;
}

.footer-col h4::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  width: 30px;
  height: 2px;
  background-color: var(--scout-gold);
}

.footer-links {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: 0.6rem;
}

.footer-links a {
  color: #cbd5e1;
  font-size: 0.925rem;
  transition: all var(--transition-fast);
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
}

.footer-links a:hover {
  color: var(--scout-gold);
  padding-left: 0.35rem;
}

.footer-contact-item {
  display: flex;
  align-items: flex-start;
  gap: 0.75rem;
  margin-bottom: 0.85rem;
  font-size: 0.925rem;
  color: #cbd5e1;
}

.footer-contact-item svg {
  color: var(--scout-gold);
  flex-shrink: 0;
  margin-top: 0.25rem;
}

.footer-bottom {
  padding-top: 2rem;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 0.85rem;
  color: #94a3b8;
}

.footer-bottom a {
  color: #cbd5e1;
}

.footer-bottom a:hover {
  color: var(--scout-gold);
}

/* ==========================================================================
   Photo Galleries & Media
   ========================================================================== */
.gallery-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 1.25rem;
}

.gallery-item {
  position: relative;
  border-radius: var(--radius-md);
  overflow: hidden;
  height: 220px;
  box-shadow: var(--shadow-sm);
}

.gallery-item img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.4s ease;
}

.gallery-item:hover img {
  transform: scale(1.05);
}

.gallery-caption {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  background: linear-gradient(to top, rgba(0, 0, 0, 0.8) 0%, transparent 100%);
  color: #ffffff;
  padding: 1.5rem 1rem 0.5rem;
  font-size: 0.85rem;
  font-weight: 500;
}

/* ==========================================================================
   Responsive Breakpoints & Mobile Optimization
   ========================================================================== */

/* Tablets & Small Laptops (<= 1024px) */
@media (max-width: 1024px) {
  .hero-grid {
    grid-template-columns: 1fr;
    gap: 3rem;
  }
  .footer-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 2.5rem;
  }
  .grid-3 {
    grid-template-columns: repeat(2, 1fr);
    gap: 1.5rem;
  }
  .grid-4 {
    grid-template-columns: repeat(2, 1fr);
    gap: 1.5rem;
  }
}

/* Tablets & Mobile Devices (<= 768px) */
@media (max-width: 768px) {
  :root {
    --header-height: 64px;
  }

  body.nav-open {
    overflow: hidden;
  }

  /* Typography & Spacing */
  h1 { font-size: 2rem; }
  h2 { font-size: 1.6rem; }
  h3 { font-size: 1.25rem; }
  h4 { font-size: 1.1rem; }

  .container {
    padding-left: 1.25rem;
    padding-right: 1.25rem;
  }

  .section-py {
    padding-top: 2.75rem;
    padding-bottom: 2.75rem;
  }

  .section-py-sm {
    padding-top: 1.75rem;
    padding-bottom: 1.75rem;
  }

  .section-subtitle {
    font-size: 1rem;
    margin-bottom: 1.75rem;
  }

  /* Header & Brand */
  .site-header {
    height: var(--header-height);
  }

  .nav-container {
    height: var(--header-height);
  }

  .brand-logo img {
    width: 40px;
    height: 40px;
  }

  .brand-title {
    font-size: 1.15rem;
  }

  .brand-subtitle {
    font-size: 0.68rem;
  }

  /* Mobile Toggle Button */
  .mobile-toggle {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 44px;
    height: 44px;
    padding: 0.5rem;
    border: 1px solid var(--border-color);
    border-radius: var(--radius-sm);
    color: var(--primary-navy);
    background: transparent;
    cursor: pointer;
    transition: all var(--transition-fast);
  }

  .mobile-toggle:focus-visible {
    outline: 2px solid var(--primary-blue);
    outline-offset: 2px;
  }

  .mobile-toggle:hover, .mobile-toggle.active {
    background-color: var(--bg-alt);
    border-color: var(--primary-blue);
  }

  /* Mobile Navigation Drawer */
  .main-nav {
    position: fixed;
    top: var(--header-height);
    left: 0;
    right: 0;
    bottom: 0;
    background-color: var(--bg-surface);
    flex-direction: column;
    align-items: stretch;
    padding: 1.25rem 1.25rem 2.5rem;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
    display: flex;
    opacity: 0;
    visibility: hidden;
    transform: translateY(-8px);
    transition: opacity 0.25s ease, transform 0.25s ease, visibility 0.25s ease;
    box-shadow: var(--shadow-xl);
    border-top: 1px solid var(--border-color);
    z-index: 999;
  }

  .main-nav.active {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
  }

  .nav-list {
    flex-direction: column;
    align-items: stretch;
    gap: 0.35rem;
  }

  .nav-link {
    font-size: 1.05rem;
    padding: 0.75rem 1rem;
    min-height: 44px;
    border-radius: var(--radius-md);
    display: flex;
    justify-content: space-between;
    align-items: center;
  }

  .nav-cta {
    margin-left: 0;
    margin-top: 1.25rem;
    padding-top: 1.25rem;
    border-top: 1px solid var(--border-color);
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
  }

  .nav-cta .btn {
    width: 100%;
    padding: 0.85rem;
    font-size: 1.05rem;
    min-height: 48px;
  }

  /* Hero Section */
  .hero {
    padding: 3rem 0 3.5rem;
  }

  .hero::after {
    height: 24px;
  }

  .hero-title {
    font-size: 2.15rem;
    line-height: 1.2;
  }

  .hero-lead {
    font-size: 1.05rem;
    margin-bottom: 1.5rem;
  }

  .hero-badge {
    font-size: 0.8rem;
    padding: 0.3rem 0.75rem;
  }

  /* Inner Page Banner */
  .page-banner {
    padding: 2.25rem 0;
  }

  .page-banner h1 {
    font-size: 2rem;
  }

  .page-banner p {
    font-size: 0.95rem;
  }

  /* Grids & Cards */
  .grid-3, .grid-2, .grid-4 {
    grid-template-columns: 1fr;
    gap: 1.5rem;
  }

  .grid-2 img,
  .grid-3 img,
  .grid-4 img {
    max-height: 260px;
    width: 100%;
    object-fit: cover;
  }

  .card {
    padding: 1.25rem;
  }

  .card-img-top {
    width: calc(100% + 2.5rem);
    margin: -1.25rem -1.25rem 1rem -1.25rem;
    height: 180px;
  }

  .content-box {
    padding: 1.25rem 1rem;
    margin-bottom: 2.25rem !important;
  }

  .content-box-highlight {
    padding: 1.5rem 1.25rem;
    margin-bottom: 2.25rem !important;
  }

  .callout-card {
    flex-direction: column;
    align-items: flex-start;
    gap: 0.75rem;
    padding: 1.25rem;
  }

  /* Galleries */
  .gallery-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 0.75rem;
  }

  .gallery-item {
    height: 140px;
  }

  .gallery-caption {
    font-size: 0.75rem;
    padding: 1rem 0.5rem 0.35rem;
  }

  /* Footer */
  .site-footer {
    padding-top: 3rem;
    padding-bottom: 1.5rem;
  }

  .footer-grid {
    grid-template-columns: 1fr;
    gap: 2rem;
    margin-bottom: 2.5rem;
  }

  .footer-links a {
    min-height: 38px;
    display: inline-flex;
    align-items: center;
  }

  .footer-bottom {
    flex-direction: column;
    gap: 1rem;
    text-align: center;
  }

  .footer-bottom > div:last-child {
    flex-wrap: wrap;
    justify-content: center;
    gap: 1rem;
  }

}

/* Small Phones (<= 480px) */
@media (max-width: 480px) {
  .container {
    padding-left: 1rem;
    padding-right: 1rem;
  }

  h1 { font-size: 1.85rem; }
  h2 { font-size: 1.45rem; }
  h3 { font-size: 1.2rem; }
  h4 { font-size: 1.05rem; }

  .hero {
    padding: 2.5rem 0 3rem;
  }

  .hero-title {
    font-size: 1.8rem;
  }

  .hero-actions,
  .btn-group {
    flex-direction: column;
    width: 100%;
    gap: 0.75rem;
  }

  .hero-actions .btn,
  .btn-group .btn {
    width: 100%;
    text-align: center;
  }

  .grid-2 img,
  .grid-3 img,
  .grid-4 img {
    max-height: 220px;
  }
}

/* Extra Small Phones (<= 360px) */
@media (max-width: 360px) {
  .gallery-grid {
    grid-template-columns: 1fr;
    gap: 0.75rem;
  }

  .gallery-item {
    height: 180px;
  }

  .brand-title {
    font-size: 1rem;
  }
}

/* ==========================================================================
   Print Styles
   ========================================================================== */
@media print {
  .site-header, .site-footer, .btn, .hero-actions, .mobile-toggle {
    display: none !important;
  }
  body {
    background: #ffffff;
    color: #000000;
  }
  .card, .content-box {
    border: 1px solid #ccc;
    box-shadow: none;
    break-inside: avoid;
  }
}

/* ==========================================================================
   Simple Page Components (rank grid, link lists, steps)
   ========================================================================== */
.rank-grid {
  display: grid;
  grid-template-columns: repeat(6, 1fr);
  gap: 1rem;
}

.rank-card {
  background: var(--bg-surface);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  padding: 1.25rem 0.75rem;
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.25rem;
}

.rank-card img {
  width: 72px;
  height: 72px;
  object-fit: contain;
  margin-bottom: 0.5rem;
}

.rank-card strong {
  font-family: var(--font-heading);
  color: var(--primary-navy);
}

.rank-card span {
  font-size: 0.875rem;
  color: var(--text-muted);
}

.rounded-img {
  width: 100%;
  height: 340px;
  object-fit: cover;
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-lg);
}

.link-list {
  list-style: none;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  max-width: 820px;
}

.link-list li {
  background: var(--bg-surface);
  border: 1px solid var(--border-color);
  border-left: 4px solid var(--scout-gold);
  border-radius: var(--radius-sm);
  padding: 0.85rem 1.1rem;
  color: var(--text-muted);
}

.link-list li > a:first-child {
  font-weight: 700;
  margin-right: 0.35rem;
}

.steps {
  padding-left: 1.25rem;
}

.steps li {
  margin-bottom: 0.75rem;
}

@media (max-width: 1024px) {
  .rank-grid { grid-template-columns: repeat(3, 1fr); }
}

@media (max-width: 480px) {
  .rank-grid { grid-template-columns: repeat(2, 1fr); }
  .rounded-img { height: 220px; }
}
