/* ==========================================================================
   Gracie Barra São Mateus — Estilos Globais & Componentes
   Linhagem Gracie Barra Belo Horizonte · Guriri, São Mateus – ES
   ========================================================================== */

/* --------------------------------------------------------------------------
   1. CSS Custom Properties (:root)
   -------------------------------------------------------------------------- */
:root {
  --accent: #D7182A;
  --accent-hover: #b81423;
  --blue: #0B3D91;
  --bg: #0D0F14;
  --surface: #151925;
  --surface-alt: #1C2231;
  --card: #FFFFFF;
  --text: #11141B;
  --muted: #3A4150;
  --muted-light: #A9B0BE;
  --border: #222838;
  --border-light: #E1E4EA;
  --font-heading: 'Barlow Condensed', sans-serif;
  --font-body: 'Inter', system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
}

/* --------------------------------------------------------------------------
   2. Reset & Base
   -------------------------------------------------------------------------- */
*, *::before, *::after {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  font-family: var(--font-body);
  background: var(--bg);
  color: var(--text);
  -webkit-text-size-adjust: 100%;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-body);
  line-height: 1.5;
  overflow-x: hidden;
}

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

a {
  color: #FF4D5A;
  transition: color 0.15s ease;
}

a:hover {
  color: #FFFFFF;
}

/* --------------------------------------------------------------------------
   3. Container & Layout Classes
   -------------------------------------------------------------------------- */
.gb-root {
  container-type: inline-size;
  container-name: gb;
  width: 100%;
}

.gb-root [id] {
  scroll-margin-top: 88px;
}

.gb-link {
  color: #E6E8EC;
  text-decoration: none;
  transition: color 0.15s ease, text-decoration 0.15s ease;
}

.gb-link:hover {
  color: #FFFFFF;
  text-decoration: underline;
  text-underline-offset: 6px;
  text-decoration-thickness: 2px;
}

.gb-btn {
  transition: filter 0.15s ease, transform 0.15s ease, background-color 0.15s ease;
}

.gb-btn:hover {
  filter: brightness(1.12);
}

.gb-btn:active {
  transform: translateY(1px);
}

/* --------------------------------------------------------------------------
   4. Header & Mobile Menu
   -------------------------------------------------------------------------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 20;
  background: var(--bg);
  border-bottom: 1px solid var(--border);
}

.gb-menu-btn {
  display: none;
  width: 44px;
  height: 44px;
  border-radius: 4px;
  border: 1px solid #3A4152;
  background: transparent;
  color: #FFFFFF;
  cursor: pointer;
  padding: 0;
  align-items: center;
  justify-content: center;
  transition: background-color 0.15s ease, border-color 0.15s ease;
}

.gb-menu-btn:hover {
  border-color: #FFFFFF;
}

.gb-mobile-panel {
  display: none;
  flex-direction: column;
  gap: 2px;
  padding: 8px clamp(16px, 5cqi, 64px) 24px;
  border-top: 1px solid var(--border);
  background: var(--bg);
}

.site-header.is-open .gb-mobile-panel {
  display: flex !important;
}

/* --------------------------------------------------------------------------
   5. Schedule Filter & Dimming
   -------------------------------------------------------------------------- */
.gb-filter-btn {
  height: 44px;
  padding: 0 18px;
  border-radius: 999px;
  cursor: pointer;
  font-family: var(--font-body);
  font-weight: 600;
  font-size: 14px;
  background: transparent;
  color: #E6E8EC;
  border: 1px solid #3A4152;
  transition: background-color 0.2s ease, color 0.2s ease, border-color 0.2s ease;
}

.gb-filter-btn:hover {
  border-color: #FFFFFF;
  color: #FFFFFF;
}

.gb-filter-btn[aria-pressed="true"],
.gb-filter-btn.is-active {
  background: #FFFFFF;
  color: #0D0F14;
  border-color: #FFFFFF;
}

.is-dimmed {
  opacity: 0.25 !important;
  filter: grayscale(40%);
  transition: opacity 0.2s ease, filter 0.2s ease;
}

/* --------------------------------------------------------------------------
   5b. Modalidades Grid & Square Media Cards
   -------------------------------------------------------------------------- */
.gb-modalidades-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 260px), 1fr));
  gap: 20px;
  align-items: stretch;
}

.gb-modalidade-card {
  background: #FFFFFF;
  border: 1px solid #E1E4EA;
  border-radius: 6px;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  height: 100%;
}

.gb-modalidade-media {
  position: relative;
  width: 100%;
  aspect-ratio: 1 / 1;
  overflow: hidden;
  border-bottom: 1px solid #E1E4EA;
  background: #151925;
  flex-shrink: 0;
}

.gb-modalidade-media picture {
  display: block;
  width: 100%;
  height: 100%;
}

.gb-modalidade-media img {
  display: block;
  width: 100%;
  height: 100% !important;
  aspect-ratio: 1 / 1;
  object-fit: cover;
}

/* --------------------------------------------------------------------------
   6. Floating WhatsApp Button
   -------------------------------------------------------------------------- */
.gb-wa-float {
  position: fixed;
  right: 20px;
  bottom: 20px;
  z-index: 30;
  display: inline-flex;
  align-items: center;
  gap: 10px;
  height: 56px;
  padding: 0 22px 0 18px;
  border-radius: 999px;
  background: var(--accent);
  color: #FFFFFF;
  text-decoration: none;
  font-weight: 700;
  font-size: 15px;
  box-shadow: 0 10px 28px rgba(0, 0, 0, 0.35);
}

/* --------------------------------------------------------------------------
   7. Container Queries & Responsive Overrides
   -------------------------------------------------------------------------- */
@container gb (max-width: 920px) {
  .gb-nav {
    display: none !important;
  }
  .gb-cta-top {
    display: none !important;
  }
  .gb-menu-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
  }
}

@container gb (min-width: 921px) {
  .gb-mobile-panel {
    display: none !important;
  }
}

@container gb (min-width: 700px) {
  .gb-span2 {
    grid-column: span 2;
    grid-row: span 2;
  }
}

/* Fallback media queries for browsers lacking container queries support */
@media (max-width: 920px) {
  .gb-nav {
    display: none;
  }
  .gb-cta-top {
    display: none;
  }
  .gb-menu-btn {
    display: inline-flex;
  }
}

@media (min-width: 921px) {
  .gb-mobile-panel {
    display: none !important;
  }
}

/* --------------------------------------------------------------------------
   8. Accessibility & Utilities
   -------------------------------------------------------------------------- */
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 3px;
}
