/*
Theme Name:   CTHPA Child
Theme URI:    https://cthpa.org.uy
Description:  Child theme para Congreso Internacional CTHPA 2026
Author:       Michael Rodriguez
Author URI:   https://mrrodriguez.uy
Template:     astra
Version:      1.0.0
License:      GNU General Public License v2 or later
License URI:  http://www.gnu.org/licenses/gpl-2.0.html
Text Domain:  cthpa-child
*/

/* ============================================================================
   CTHPA CONGRESS 2026 — DESIGN TOKENS & CUSTOM STYLES
   Congreso Internacional de Seguridad e Higiene en el Trabajo
   50 años CTHPA (1976–2026)
   ========================================================================== */

/* --------------------------------------------------------------------------
   Design Tokens — Variables CSS globales
   Mapeo de los tokens del diseño a variables CSS que se pueden usar
   en todo el sitio. Estos tokens también deben configurarse en:
   - Astra Global Colors (Apariencia → Customize → Global → Colors)
   - Astra Global Typography (Apariencia → Customize → Global → Typography)
   ------------------------------------------------------------------------ */

:root {
  /* Colors — Paleta oficial CTHPA */
  --primary: #317966;           /* Verde institucional principal */
  --primary-700: #245a4d;       /* Hover de primary, gradientes oscuros */
  --primary-50: #e9f2ee;        /* Fondo suave, hover states */
  --primary-100: #d4e6dc;       /* Mapas, fondos */
  --secondary: #469A9B;         /* Teal acento (highlights, gradientes) */
  --green: #579058;             /* Verde fresco (alternativa) */
  --accent: #CAA409;            /* Dorado del aniversario 50 años */
  --accent-700: #a48708;        /* Hover de accent */

  /* Text & Backgrounds */
  --ink: #142523;               /* Texto principal / fondos oscuros */
  --ink-2: #2a3d3a;             /* Texto cuerpo */
  --ink-3: #51625f;             /* Texto secundario */
  --muted: #6b7a78;             /* Texto terciario, labels */
  --line: #e2e7e5;              /* Bordes */
  --bg: #fbfaf6;                /* Fondo de la página (off-white cálido) */
  --card: #ffffff;              /* Fondo de cards / secciones claras */

  /* Layout */
  --container: 1200px;
  --font-scale: 1;

  /* Shadows */
  --shadow-sm: 0 1px 2px rgba(20,37,35,.06), 0 2px 6px rgba(20,37,35,.04);
  --shadow-md: 0 6px 14px rgba(20,37,35,.08), 0 2px 4px rgba(20,37,35,.05);
  --shadow-lg: 0 24px 48px rgba(20,37,35,.16), 0 8px 16px rgba(20,37,35,.08);

  /* Border Radius */
  --r: 4px;
  --r-md: 8px;
  --r-lg: 14px;
}

/* --------------------------------------------------------------------------
   Base Overrides — Ajustes sobre Astra
   ------------------------------------------------------------------------ */

body {
  font-family: 'Source Sans 3', 'Source Sans Pro', system-ui, -apple-system, sans-serif;
  font-size: 17px;
  line-height: 1.55;
  color: var(--ink-2);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

h1, h2, h3, h4, h5, h6 {
  font-family: 'Source Serif 4', 'Source Serif Pro', Georgia, serif;
  font-weight: 600;
  color: var(--ink);
}

h1 {
  font-size: clamp(36px, 5vw, 60px);
  letter-spacing: -1.2px;
}

h2 {
  font-size: clamp(32px, 4vw, 48px);
  letter-spacing: -1px;
}

h3 {
  font-size: 26px;
  letter-spacing: -0.3px;
}

em {
  font-style: italic;
  color: var(--accent);
  font-weight: 600;
}

a {
  color: var(--primary);
  text-decoration: none;
  transition: color 0.15s ease;
}

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

/* --------------------------------------------------------------------------
   Container Override — Forzar padding en todas las secciones
   ------------------------------------------------------------------------ */

.ast-container,
.ast-builder-grid-row-container,
.container {
  max-width: var(--container) !important;
  margin-left: auto !important;
  margin-right: auto !important;
  padding-left: 32px !important;
  padding-right: 32px !important;
  width: 100% !important;
}

/* Todas las secciones deben respetar el container */
section,
.section-congreso,
.section-dark,
.section-bienvenida,
.section-programa,
.section-pricing,
.section-organizador,
.section-sponsors,
.section-cta-final,
.strip-inscripciones {
  width: 100% !important;
}

/* El contenido dentro de cada sección debe estar contenido */
section > .container,
.section-congreso > .container,
.section-dark > .container,
.section-bienvenida > .container,
.section-programa > .container,
.section-pricing > .container,
.section-organizador > .container,
.section-sponsors > .container,
.section-cta-final > .container {
  max-width: var(--container) !important;
  margin: 0 auto !important;
  padding-left: 32px !important;
  padding-right: 32px !important;
}

/* Mobile padding */
@media (max-width: 768px) {
  .container,
  section > .container {
    padding-left: 20px !important;
    padding-right: 20px !important;
  }
}

/* --------------------------------------------------------------------------
   Hero Section Fixes — Asegurar centrado
   ------------------------------------------------------------------------ */

.cthpa-hero {
  position: relative !important;
  min-height: 100vh;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  color: #fff !important;
  overflow: hidden;
  padding: 120px 0 100px !important;
}

.cthpa-hero__inner {
  position: relative !important;
  z-index: 1 !important;
  max-width: 1200px !important;
  text-align: center !important;
  margin: 0 auto !important;
  width: 100% !important;
}

.cthpa-hero__eyebrow,
.cthpa-hero__title,
.cthpa-hero__lead,
.cthpa-hero__meta,
.cthpa-hero__ctas,
.cthpa-hero__countdown {
  text-align: center !important;
  margin-left: auto !important;
  margin-right: auto !important;
}

.cthpa-hero__ctas {
  display: flex !important;
  justify-content: center !important;
  align-items: center !important;
  gap: 16px !important;
  flex-wrap: wrap !important;
}

/* --------------------------------------------------------------------------
   Custom Components — Elementos específicos del diseño
   ------------------------------------------------------------------------ */

/* Eyebrow labels */
.eyebrow {
  font-size: 12px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 2px;
  color: var(--muted);
}

.eyebrow.eyebrow-gold {
  color: var(--accent);
}

/* Badges */
.badge {
  display: inline-flex;
  align-items: center;
  padding: 6px 14px;
  border-radius: var(--r-md);
  font-size: 12px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 1.5px;
}

.badge-gold {
  background: linear-gradient(135deg, var(--accent), #d4b93e);
  color: var(--ink);
}

.badge-outline {
  border: 1.5px solid currentColor;
  background: transparent;
}

/* Cards */
.card {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--r-lg);
  padding: 32px;
  transition: all 0.2s ease;
}

.card:hover {
  transform: translateY(-2px);
  border-color: var(--primary);
  box-shadow: var(--shadow-md);
}

/* Glass effect (Hero meta band) */
.glass-card {
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.18);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border-radius: var(--r-lg);
}

/* Callouts */
.callout {
  padding: 20px 24px;
  border-radius: var(--r-md);
  background: rgba(70, 154, 155, 0.06);
  border-left: 3px solid var(--secondary);
  font-size: 15px;
  line-height: 1.6;
}

.callout-primary {
  background: rgba(49, 121, 102, 0.06);
  border-left-color: var(--primary);
}

.callout-accent {
  background: rgba(202, 164, 9, 0.06);
  border-left-color: var(--accent);
}

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 12px 24px;
  border-radius: var(--r-md);
  font-weight: 600;
  font-size: 15px;
  text-decoration: none;
  transition: all 0.15s ease;
  cursor: pointer;
  border: none;
}

.btn:hover {
  transform: translateY(-1px);
  box-shadow: var(--shadow-md);
}

.btn-primary {
  background: var(--primary);
  color: #fff;
}

.btn-primary:hover {
  background: var(--primary-700);
  color: #fff;
}

.btn-accent {
  background: var(--accent);
  color: var(--ink);
}

.btn-accent:hover {
  background: var(--accent-700);
  color: var(--ink);
}

.btn-outline {
  background: transparent;
  border: 2px solid currentColor;
  color: var(--primary);
}

.btn-outline:hover {
  background: var(--primary-50);
}

.btn-ghost {
  background: transparent;
  border: 1.5px solid rgba(255, 255, 255, 0.35);
  color: #fff;
}

.btn-ghost:hover {
  background: rgba(255, 255, 255, 0.15);
  border-color: rgba(255, 255, 255, 0.5);
}

.btn-xl {
  padding: 16px 32px;
  font-size: 17px;
}

/* Stats display */
.stat {
  text-align: center;
}

.stat-number {
  font-family: 'Source Serif 4', serif;
  font-size: clamp(38px, 5vw, 62px);
  font-weight: 600;
  letter-spacing: -1px;
  color: var(--primary);
  font-feature-settings: 'tnum';
}

.stat-label {
  font-size: 14px;
  color: var(--muted);
  margin-top: 4px;
}

/* Price display */
.price {
  font-family: 'Source Serif 4', serif;
  font-size: 38px;
  font-weight: 600;
  letter-spacing: -1px;
  color: var(--primary);
  font-feature-settings: 'tnum';
}

/* Gradients */
.gradient-primary {
  background: linear-gradient(135deg, var(--primary-700), var(--primary));
}

.gradient-accent {
  background: linear-gradient(135deg, var(--accent), #d4b93e);
}

.gradient-text-gold {
  background: linear-gradient(135deg, var(--accent), #d4b93e);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

/* Section backgrounds */
.section-dark {
  background: var(--ink);
  color: rgba(255, 255, 255, 0.85);
}

.section-dark h1,
.section-dark h2,
.section-dark h3 {
  color: #fff;
}

/* --------------------------------------------------------------------------
   Responsive Breakpoints
   ------------------------------------------------------------------------ */

/* 980px — Header colapsa, topbar oculta info de ubicación */
@media (max-width: 980px) {
  .topbar-left {
    display: none;
  }
}

/* 880px — Grids 2-3 col → 1 col */
@media (max-width: 880px) {
  .ast-grid-2-col,
  .ast-grid-3-col {
    grid-template-columns: 1fr;
  }
}

/* 720px — Hero meta stack, countdown 2×2 */
@media (max-width: 720px) {
  h1 {
    font-size: clamp(32px, 8vw, 48px);
  }

  .btn {
    width: 100%;
    justify-content: center;
  }
}

/* --------------------------------------------------------------------------
   Utility Classes
   ------------------------------------------------------------------------ */

.text-center { text-align: center; }
.text-primary { color: var(--primary); }
.text-accent { color: var(--accent); }
.text-muted { color: var(--muted); }
.bg-white { background: var(--card); }
.bg-dark { background: var(--ink); color: rgba(255, 255, 255, 0.85); }
.shadow-sm { box-shadow: var(--shadow-sm); }
.shadow-md { box-shadow: var(--shadow-md); }
.shadow-lg { box-shadow: var(--shadow-lg); }

/* --------------------------------------------------------------------------
   Footer Custom
   ------------------------------------------------------------------------ */

.cthpa-footer {
	position: relative;
	z-index: 10;
	background: var(--ink);
	color: rgba(255, 255, 255, 0.75);
	margin-top: 0 !important;
}

.footer-main {
	padding: 80px 0 60px;
}

.footer-grid {
	display: grid;
	grid-template-columns: 1.4fr 1fr 1fr 1.2fr;
	gap: 60px;
}

.footer-col {
	display: flex;
	flex-direction: column;
}

.footer-logo .logo-mark {
	width: 48px;
	height: 36px;
}

.footer-logo .logo-title {
	font-size: 20px;
}

.footer-logo .logo-sub {
	font-size: 9px;
}

.footer-desc {
	font-size: 15px;
	line-height: 1.6;
	color: rgba(255, 255, 255, 0.65);
	margin: 16px 0 0 0;
}

.footer-title {
	font-size: 16px;
	font-weight: 700;
	color: #fff;
	margin: 0 0 20px 0;
	text-transform: uppercase;
	letter-spacing: 0.5px;
}

.footer-menu {
	display: flex;
	flex-direction: column;
	gap: 12px;
}

.footer-menu a {
	color: rgba(255, 255, 255, 0.75);
	text-decoration: none;
	font-size: 15px;
	transition: color 0.15s ease;
}

.footer-menu a:hover {
	color: var(--accent);
}

.footer-contact {
	font-size: 15px;
	line-height: 1.6;
}

.footer-contact p {
	margin: 0;
}

.footer-contact a {
	color: rgba(255, 255, 255, 0.85);
	text-decoration: none;
	transition: color 0.15s ease;
}

.footer-contact a:hover {
	color: var(--accent);
}

@media (max-width: 880px) {
	.footer-main {
		padding: 60px 0 40px;
	}
	.footer-grid {
		grid-template-columns: 1fr;
		gap: 40px;
	}
}
