/*
 Theme Name:   Bricks Child Theme
 Theme URI:    https://bricksbuilder.io/
 Description:  Use this child theme to extend Bricks.
 Author:       Bricks
 Author URI:   https://bricksbuilder.io/
 Template:     bricks
 Version:      1.10
 Text Domain:  bricks
*/

/* ============================================
   FALLBACK PARA SÍMBOLOS MATEMÁTICOS Y GRIEGO
   ============================================ */

/* Fallback para símbolos matemáticos y alfabeto griego */
.math-content,
.greek-text {
    font-family: 'IBM Plex Sans', 'Safiro', sans-serif;
}

/* Asegurar que las fórmulas usen IBM Plex Sans */
.katex,
.mjx-chtml {
    font-family: 'IBM Plex Sans', 'Computer Modern', serif !important;
}

/* ============================================
   PREVENIR OVERFLOW HORIZONTAL
   Importante: el overflow-x va en <html>, NO en <body>.
   Si va en body, los trucos width: 100vw para forzar elementos
   full-width (ej. footer) no funcionan correctamente.
   ============================================ */

html {
    overflow-x: hidden;
}

/* ============================================
   BASE BODY
   El body ocupa el 100% del viewport. Los límites de ancho del
   contenido se aplican en wrappers internos o en clases específicas
   (ver .azh-page-content en css/azh-globals.css).

   La tipografía (font-family, font-size, font-weight, line-height,
   color) se hereda del Theme Style "Azahar Global" configurado en
   Bricks Style Manager. NO duplicar aquí.
   ============================================ */

body {
    margin: 0;
}

/* NOTA (v1.10): el body NO lleva padding-top.
   El antiguo Custom Code de Bricks declaraba padding-top: 120px (80px en
   móvil) para compensar la altura del header. Ese padding era residuo de
   cuando el header era `position: fixed` y quedaba fuera del flujo.
   Hoy #brx-header usa `position: sticky` (ver css/azh-globals.css), que sí
   ocupa su espacio en el flujo, de modo que el padding reservaba el hueco
   dos veces y empujaba el header hacia abajo hasta el primer scroll.
   Si alguna vez se vuelve a `position: fixed`, habrá que reponerlo. */

/* ============================================
   CONTENEDOR DE PÁGINA OPCIONAL
   .azh-page-content se ha movido a css/azh-globals.css (v3.0)
   junto al resto de utilidades de layout azh-*.
   ============================================ */

/* ============================================
   PÁRRAFOS Y CONTENIDO
   ============================================ */

/* Párrafos */
p {
    margin-bottom: 1.25rem;
}

/* Listas */
ul, ol {
    margin-bottom: 1.25rem;
    padding-left: 1.5rem;
}

li {
    margin-bottom: 0.5rem;
}

/* Enlaces */
a {
    color: #0eafa7;
    text-decoration: none;
    transition: color 0.2s ease;
}

a:hover {
    color: #085e5a;
    text-decoration: underline;
}

/* Énfasis fuerte (strong, b) */
strong, b {
    font-weight: 700;
    color: #05254c;
}

/* Labels con énfasis medio (para etiquetas de formularios, datos legales, etc.) */
.label-semibold {
    font-weight: 600; /* SemiBold */
    color: #05254c;
}

/* Énfasis (em, i) */
em, i {
    font-style: italic;
}

/* ============================================
   RESPONSIVE - PADDING DEL CONTENEDOR OPCIONAL
   La tipografía responsive (tamaños h1-h6 y body en móvil)
   se hereda del Theme Style de Bricks, no se replica aquí.
   ============================================ */

/* Tablets y pantallas medianas (768px - 1024px) */
/* Pantallas grandes (1440px+) */
/* Pantallas ultra anchas (1920px+) */
/* Móvil */
/* ============================================
   RESPONSIVE - TIPOGRAFÍA MÓVIL (red de seguridad)
   Estos tamaños actúan como fallback en pantallas pequeñas si
   el Theme Style de Bricks no tiene configurados sus propios
   breakpoints. Una vez se configuren los tamaños móviles
   directamente en el Theme Style, estas reglas pueden eliminarse.

   Escala v3 (-2px desde escala v2 abr 2026):
   - Desktop: H1 44 / H2 36 / H3 26 / H4 21 / H5 17 / H6 15 / Body 16
   - Móvil:   H1 36 / H2 30 / H3 22 / H4 19 / H5 16 / H6 14 / Body 15
   ============================================ */

@media (max-width: 768px) {
    body {
        font-size: 0.9375rem;  /* 15px en móvil */
    }

    h1 {
        font-size: 2.25rem;     /* 36px en móvil */
        margin-bottom: 1.25rem;
    }

    h2 {
        font-size: 1.875rem;    /* 30px en móvil */
        margin-bottom: 1rem;
    }

    h3 {
        font-size: 1.375rem;    /* 22px en móvil */
        margin-bottom: 0.875rem;
    }

    h4 {
        font-size: 1.1875rem;   /* 19px en móvil */
        margin-bottom: 0.75rem;
    }

    h5 {
        font-size: 1rem;        /* 16px en móvil */
        margin-bottom: 0.75rem;
    }

    h6 {
        font-size: 0.875rem;    /* 14px en móvil */
        margin-bottom: 0.625rem;
    }
}

/* ============================================
   UTILIDADES ADICIONALES
   ============================================ */

/* Mejora de legibilidad */
* {
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

/* Suavizado de imágenes */
img {
    max-width: 100%;
    height: auto;
}
