/*
Theme Name: CRC Campus (hijo de Twenty Twenty-Five)
Theme URI: https://controlmetrics.es
Description: Tema hijo de Twenty Twenty-Five con la plantilla de pagina "CRC Campus": landing a pantalla completa del Cycling Research Center.
Author: Control Metrics
Version: 1.3.3
Template: twentytwentyfive
Requires at least: 6.7
Tested up to: 6.8
Requires PHP: 7.4
License: GNU General Public License v2 or later
License URI: http://www.gnu.org/licenses/gpl-2.0.html
Text Domain: crc-campus
*/

/* ============================================================
   Cabecera CRC (topbar) - siempre activa en todo el sitio
   ============================================================ */
.topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  padding: 18px 60px;
  background: #000;
  border-bottom: 1px solid #161616;
}
.topbar .brand {
  display: flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
}
.topbar .brand-logo {
  height: 44px;
  width: auto;
  display: block;
}
.topbar .nav-links {
  display: flex;
  gap: 36px;
  font-size: 14.5px;
  color: #cfcfcf;
  flex-wrap: wrap;
  font-family: 'Barlow', sans-serif;
}
.topbar .nav-links a {
  text-decoration: none;
  color: #cfcfcf;
}
.topbar .nav-links a:hover {
  color: #FFE000;
}
.topbar .login-btn {
  font-family: 'Barlow', sans-serif;
  font-size: 13.5px;
  font-weight: 600;
  color: #000;
  background: #FFE000;
  padding: 10px 20px;
  border-radius: 6px;
  text-decoration: none;
  white-space: nowrap;
}
.topbar .login-btn:hover {
  filter: brightness(0.92);
}
@media (max-width: 768px) {
  .topbar {
    padding: 14px 20px;
    flex-wrap: wrap;
    gap: 14px;
  }
  .topbar .nav-links {
    gap: 18px;
    font-size: 13px;
    order: 3;
    width: 100%;
    justify-content: center;
  }
}


/* ===== CRC: fix responsive PMPro (niveles + checkout) ===== */
.pmpro .pmpro_section,
.pmpro .pmpro_card.pmpro_level_group {
  background: transparent !important;
  border: 0 !important;
  padding: 0 !important;
  border-radius: 0 !important;
}
.pmpro .pmpro_levels_table {
  width: 100% !important;
  max-width: 420px !important;
  margin: 24px auto !important;
}
.pmpro .pmpro_levels_table th,
.pmpro .pmpro_levels_table td {
  overflow-wrap: break-word !important;
  word-break: break-word !important;
}
@media (max-width: 781px) {
  .pmpro,
  .pmpro .pmpro_section,
  .pmpro .pmpro_section_content,
  .pmpro .pmpro_card,
  .pmpro .pmpro_card_content,
  .pmpro .pmpro_form,
  .pmpro .pmpro_form_fields {
    padding-left: 0 !important;
    padding-right: 0 !important;
    margin-left: 0 !important;
    margin-right: 0 !important;
    width: auto !important;
    max-width: 100% !important;
    box-sizing: border-box !important;
  }
  .pmpro .pmpro_card { padding: 20px 16px !important; }
  .pmpro .pmpro_levels_table th,
  .pmpro .pmpro_levels_table td { padding-left: 16px !important; padding-right: 16px !important; }
  .pmpro .pmpro_levels_table .pmpro_level th { font-size: clamp(20px, 6.4vw, 32px) !important; line-height: 1.15 !important; }
  .pmpro .pmpro_levels_table .pmpro_level td { font-size: clamp(22px, 7vw, 38px) !important; line-height: 1.2 !important; }
  .pmpro input[type="text"],
  .pmpro input[type="email"],
  .pmpro input[type="password"],
  .pmpro input[type="tel"],
  .pmpro input[type="number"],
  .pmpro select,
  .pmpro textarea,
  .pmpro .pmpro_form_input {
    width: 100% !important;
    max-width: 100% !important;
    box-sizing: border-box !important;
  }
  .pmpro .pmpro_btn,
  .pmpro .pmpro_btn-select,
  .pmpro .pmpro_form_submit .pmpro_btn {
    display: block !important;
    width: 100% !important;
    box-sizing: border-box !important;
    padding-left: 8px !important;
    padding-right: 8px !important;
  }
}

/* ===== CRC: legibilidad de desplegables (select) sobre fondo oscuro ===== */
.pmpro select {
  color-scheme: dark !important;
  color: #f5f5f3 !important;
  background-color: #0f1320 !important;
}
.pmpro select option,
.pmpro select optgroup {
  background-color: #0f1320 !important;
  color: #f5f5f3 !important;
}

/* ===== Footer del Campus CRC ===== */
.wp-site-blocks > footer.wp-block-template-part { display: none !important; }

.crc-footer {
  background: #05070c;
  border-top: 1px solid #242a38;
  color: #b9c0cf;
  font-size: 15px;
  line-height: 1.6;
  padding: 64px 24px 0;
}
.crc-footer a { color: #b9c0cf; text-decoration: none; }
.crc-footer a:hover,
.crc-footer a:focus-visible { color: #FFE000; text-decoration: underline; }

.crc-footer__inner {
  max-width: 1100px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1fr;
  gap: 48px 32px;
  align-items: start;
}

.crc-footer__logo { display: inline-block; margin-bottom: 20px; }
.crc-footer__logo img { height: 40px; width: auto; display: block; }
.crc-footer__tagline { margin: 0 0 20px; max-width: 42ch; color: #8e97a8; }

.crc-footer__social { list-style: none; margin: 0; padding: 0; display: flex; gap: 20px; }
.crc-footer__social a {
  text-transform: uppercase;
  letter-spacing: .08em;
  font-size: 12px;
  font-weight: 700;
}

.crc-footer__col h2 {
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: .12em;
  color: #FFE000;
  margin: 0 0 16px;
  font-weight: 700;
}
.crc-footer__col ul { list-style: none; margin: 0; padding: 0; }
.crc-footer__col li + li { margin-top: 10px; }

.crc-footer__bottom {
  max-width: 1100px;
  margin: 56px auto 0;
  padding: 24px 0 32px;
  border-top: 1px solid #1a2030;
}
.crc-footer__bottom p { margin: 0; font-size: 13px; color: #6f7889; }

@media (max-width: 900px) {
  .crc-footer__inner { grid-template-columns: 1fr 1fr; }
  .crc-footer__brand { grid-column: 1 / -1; }
}
@media (max-width: 600px) {
  .crc-footer { padding: 48px 20px 0; }
  .crc-footer__inner { grid-template-columns: 1fr; gap: 36px; }
  .crc-footer__bottom { margin-top: 40px; }
}

/* ===== Paginas legales en oscuro (hijas de /legal/) ===== */
body.page-id-112,
body.parent-pageid-112 {
  background: #05070c;
  color: #c7cddb;
}
body.page-id-112 .wp-site-blocks,
body.parent-pageid-112 .wp-site-blocks { background: #05070c; }

body.page-id-112 .entry-content,
body.parent-pageid-112 .entry-content { color: #c7cddb; }

body.page-id-112 h1, body.parent-pageid-112 h1,
body.page-id-112 h2, body.parent-pageid-112 h2,
body.page-id-112 h3, body.parent-pageid-112 h3,
body.page-id-112 strong, body.parent-pageid-112 strong { color: #f5f5f3; }

body.page-id-112 h2, body.parent-pageid-112 h2 {
  margin-top: 2.2em;
  padding-top: .8em;
  border-top: 1px solid #1a2030;
}
body.page-id-112 h3, body.parent-pageid-112 h3 { color: #FFE000; margin-top: 1.8em; }

body.page-id-112 a, body.parent-pageid-112 a { color: #FFE000; }

body.page-id-112 code, body.parent-pageid-112 code {
  background: #0f1320;
  color: #f5f5f3;
  padding: 2px 6px;
  border-radius: 4px;
  font-size: .9em;
}

body.parent-pageid-112 .entry-content table {
  width: 100%;
  border-collapse: collapse;
  margin: 1.5em 0;
  font-size: .92em;
  display: block;
  overflow-x: auto;
}
body.parent-pageid-112 .entry-content th,
body.parent-pageid-112 .entry-content td {
  border: 1px solid #242a38;
  padding: 10px 12px;
  text-align: left;
  vertical-align: top;
}
body.parent-pageid-112 .entry-content th { background: #0f1320; color: #f5f5f3; }
