/*!
 * Webcampista - Bootstrap 5 "capado" (solo layout/utilities + navbar básico)
 * Objetivo: footer/header/navbar sin tocar XenForo.
 * Nota: evita resets globales (body, html, a, button...) para no romper XF.
 */

/* =========================
   Scope obligatorio
   ========================= */
.wc-bs5,
.wc-bs5 * {
  box-sizing: border-box;
}

/* =========================
   Containers
   ========================= */
.wc-bs5 .container,
.wc-bs5 .container-fluid {
  width: 100%;
  padding-right: 12px;
  padding-left: 12px;
  margin-right: auto;
  margin-left: auto;
}

@media (min-width: 576px) {
  .wc-bs5 .container { max-width: 540px; }
}
@media (min-width: 768px) {
  .wc-bs5 .container { max-width: 720px; }
}
@media (min-width: 992px) {
  .wc-bs5 .container { max-width: 960px; }
}
@media (min-width: 1200px) {
  .wc-bs5 .container { max-width: 1140px; }
}
@media (min-width: 1400px) {
  .wc-bs5 .container { max-width: 1320px; }
}

/* =========================
   Grid (row/col básicos)
   ========================= */
.wc-bs5 .row {
  display: flex;
  flex-wrap: wrap;
  margin-right: -12px;
  margin-left: -12px;
}
.wc-bs5 .row > * {
  box-sizing: border-box;
  flex-shrink: 0;
  width: 100%;
  max-width: 100%;
  padding-right: 12px;
  padding-left: 12px;
}

/* cols genéricas */
.wc-bs5 .col { flex: 1 0 0%; }
.wc-bs5 .col-6 { flex: 0 0 auto; width: 50%; }
.wc-bs5 .col-12 { flex: 0 0 auto; width: 100%; }

/* breakpoints útiles (mínimos) */
@media (min-width: 768px) {
  .wc-bs5 .col-md-4 { flex: 0 0 auto; width: 33.333333%; }
  .wc-bs5 .col-md-8 { flex: 0 0 auto; width: 66.666667%; }
}
@media (min-width: 992px) {
  .wc-bs5 .col-lg-10 { flex: 0 0 auto; width: 83.333333%; }
  .wc-bs5 .offset-lg-1 { margin-left: 8.333333%; }
}
@media (min-width: 1200px) {
  .wc-bs5 .col-xl-8 { flex: 0 0 auto; width: 66.666667%; }
  .wc-bs5 .offset-xl-2 { margin-left: 16.666667%; }
}

/* =========================
   Display / flex utilities (mínimas)
   ========================= */
.wc-bs5 .d-flex { display: flex !important; }
.wc-bs5 .d-inline-block { display: inline-block !important; }
.wc-bs5 .flex-column { flex-direction: column !important; }

.wc-bs5 .align-items-center { align-items: center !important; }
.wc-bs5 .justify-content-center { justify-content: center !important; }
.wc-bs5 .justify-content-between { justify-content: space-between !important; }

.wc-bs5 .text-center { text-align: center !important; }
.wc-bs5 .text-start { text-align: left !important; }
.wc-bs5 .text-end { text-align: right !important; }

.wc-bs5 .w-100 { width: 100% !important; }
.wc-bs5 .min-vh-100 { min-height: 100vh !important; }

/* responsive display mínimo */
.wc-bs5 .d-none { display: none !important; }
@media (min-width: 768px) {
  .wc-bs5 .d-md-block { display: block !important; }
}

/* =========================
   Spacing (solo lo que solemos usar)
   ========================= */
.wc-bs5 .p-0 { padding: 0 !important; }
.wc-bs5 .p-2 { padding: .5rem !important; }
.wc-bs5 .p-3 { padding: 1rem !important; }
.wc-bs5 .py-2 { padding-top: .5rem !important; padding-bottom: .5rem !important; }
.wc-bs5 .py-3 { padding-top: 1rem !important; padding-bottom: 1rem !important; }

.wc-bs5 .m-0 { margin: 0 !important; }
.wc-bs5 .mb-0 { margin-bottom: 0 !important; }
.wc-bs5 .mb-2 { margin-bottom: .5rem !important; }
.wc-bs5 .me-1 { margin-right: .25rem !important; }
.wc-bs5 .ms-2 { margin-left: .5rem !important; }
.wc-bs5 .mx-2 { margin-left: .5rem !important; margin-right: .5rem !important; }
.wc-bs5 .my-4 { margin-top: 1.5rem !important; margin-bottom: 1.5rem !important; }
.wc-bs5 .mt-1 { margin-top: .25rem !important; }

/* =========================
   Borders / HR / rounding (mínimo)
   ========================= */
.wc-bs5 .rounded { border-radius: .375rem !important; }

.wc-bs5 hr {
  margin: 1rem 0;
  border: 0;
  border-top: 1px solid rgba(0,0,0,.1);
}
.wc-bs5 .m-0 { margin: 0 !important; }

/* =========================
   Links / small
   ========================= */
.wc-bs5 .small { font-size: .875em; }
.wc-bs5 .text-decoration-none { text-decoration: none !important; }
.wc-bs5 .text-decoration-underline { text-decoration: underline !important; }

/* OJO: No tocamos colores globales de XF.
   Definimos utilidades "text-primary" solo dentro del scope */
.wc-bs5 .text-primary { color: #0d6efd !important; }

/* =========================
   Navbar (mínimo, sin reset global)
   ========================= */
.wc-bs5 .navbar {
  position: relative;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  padding: .5rem 0;
}

.wc-bs5 .navbar .container,
.wc-bs5 .navbar .container-fluid {
  display: flex;
  flex-wrap: inherit;
  align-items: center;
  justify-content: space-between;
}

.wc-bs5 .navbar-brand {
  display: inline-block;
  padding-top: .3125rem;
  padding-bottom: .3125rem;
  margin-right: 1rem;
  font-size: 1.25rem;
  line-height: inherit;
  white-space: nowrap;
}

.wc-bs5 .navbar-nav {
  display: flex;
  flex-direction: column;
  padding-left: 0;
  margin: 0;
  list-style: none;
}
@media (min-width: 768px) {
  .wc-bs5 .navbar-nav { flex-direction: row; }
}

.wc-bs5 .nav-link {
  display: block;
  padding: .5rem .75rem;
  text-decoration: none;
}

.wc-bs5 .navbar-expand-md .navbar-collapse {
  flex-basis: 100%;
  flex-grow: 1;
  align-items: center;
}
@media (min-width: 768px) {
  .wc-bs5 .navbar-expand-md .navbar-collapse {
    display: flex !important;
    flex-basis: auto;
  }
}

/* toggler (solo el botón; el show/hide lo hará XF/tu JS o BS bundle si lo pones) */
.wc-bs5 .navbar-toggler {
  padding: .25rem .75rem;
  font-size: 1.25rem;
  line-height: 1;
  background: transparent;
  border: 1px solid rgba(255,255,255,.25);
  border-radius: .375rem;
}

.wc-bs5 .navbar-toggler-icon {
  display: inline-block;
  width: 1.5em;
  height: 1.5em;
  vertical-align: middle;
  background-repeat: no-repeat;
  background-position: center;
  background-size: 100%;
  /* icono tipo BS (blanco) */
  background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 30 30'%3e%3cpath stroke='rgba(255,255,255,0.9)' stroke-linecap='round' stroke-miterlimit='10' stroke-width='2' d='M4 7h22M4 15h22M4 23h22'/%3e%3c/svg%3e");
}

/* "dark" para navbar (solo colores, sin variables) */
.wc-bs5 .navbar-dark .nav-link { color: rgba(255,255,255,.9); }
.wc-bs5 .navbar-dark .nav-link:hover { color: #fff; }
.wc-bs5 .navbar-dark .navbar-brand { color: #fff; }

/* fixed-top (por si lo usamos) */
.wc-bs5 .fixed-top {
  position: fixed;
  top: 0;
  right: 0;
  left: 0;
  z-index: 1030;
}

/* collapse helper (si metes JS) */
.wc-bs5 .collapse:not(.show) { display: none; }
.wc-bs5 .collapsing {
  height: 0;
  overflow: hidden;
  transition: height .35s ease;
}

/* =====================================================
   EXTENSIÓN GRID RESPONSIVE (para publicidad legacy)
   ===================================================== */

/* --- sm ≥576px --- */
@media (min-width: 576px) {
  .wc-bs5 .col-sm-3 { flex: 0 0 auto; width: 25%; }
  .wc-bs5 .col-sm-6 { flex: 0 0 auto; width: 50%; }

  .wc-bs5 .d-sm-block { display: block !important; }
  .wc-bs5 .d-sm-none  { display: none !important; }
}

/* --- md ≥768px --- */
@media (min-width: 768px) {
  .wc-bs5 .col-md-3 { flex: 0 0 auto; width: 25%; }
  .wc-bs5 .col-md-6 { flex: 0 0 auto; width: 50%; }
}

/* --- lg ≥992px --- */
@media (min-width: 992px) {
  .wc-bs5 .col-lg-2 { flex: 0 0 auto; width: 16.666667%; }
  .wc-bs5 .col-lg-6 { flex: 0 0 auto; width: 50%; }

  .wc-bs5 .d-lg-block { display: block !important; }
  .wc-bs5 .d-lg-none  { display: none !important; }
}

/* --- xl ≥1200px --- */
@media (min-width: 1200px) {
  .wc-bs5 .col-xl-2 { flex: 0 0 auto; width: 16.666667%; }
  .wc-bs5 .col-xl-6 { flex: 0 0 auto; width: 50%; }
}

/* =========================
   Navbar – extras necesarios
   ========================= */

.wc-bs5 .me-auto {
  margin-right: auto !important;
}

.wc-bs5 .nav-item.active > .nav-link,
.wc-bs5 .nav-link.active {
  background-color: #026647;
  color: #fff !important;
  border-radius: 4px;
}

.wc-bs5 .visually-hidden {
  position: absolute !important;
  width: 1px !important;
  height: 1px !important;
  padding: 0 !important;
  margin: -1px !important;
  overflow: hidden !important;
  clip: rect(0, 0, 0, 0) !important;
  white-space: nowrap !important;
  border: 0 !important;
}

.wc-bs5 .navbar {
  min-height: 56px;
}

.wc-bs5 .navbar-nav {
  gap: .1rem;
}

.wc-bs5 .wc-navbar {
  background-color: #058656;
}

/* =========================
   Navbar – comportamiento correcto por breakpoint
   ========================= */

/* Desktop: ocultar hamburguesa */
@media (min-width: 768px) {
  .wc-bs5 .navbar-toggler {
    display: none !important;
  }
}

/* Desktop: el contenedor del menú ocupa todo el ancho */
.wc-bs5 .wc-nav-desktop {
  flex: 1 1 auto;
}

.wc-bs5 .navbar-nav {
  margin-right: auto;
}

.wc-bs5 .navbar.fixed-top {
  max-width: 100%;
  overflow-x: clip;
}

/* =====================================================
   FIX overflow publicidad wc-bs5 dentro de XenForo
   ===================================================== */

.p-body-inner > .wc-bs5 {
  max-width: 100%;
  overflow-x: clip;
}

.p-body-inner > .wc-bs5 .row {
  margin-left: 0;
  margin-right: 0;
}

/* =====================================================
   FIX overflow Webcampista header / footer
   ===================================================== */

.p-pageWrapper > .wc-bs5,
.p-pageWrapper .wc-footer {
  max-width: 100%;
  overflow-x: clip;
}


/* =====================================================
   FIX DEFINITIVO overflow por textos accesibles (XF)
   ===================================================== */


.p-pageWrapper {
  overflow-x: clip;
}

