/*
    Theme Name: Ceamib refactorizado
    Theme URI: 
    Author: Marcos Manuel Molina Alvarez
    Author URI: 
    Description: Theme Diseñado para Ceamib
    Version: 1.1.0
    License: GNU General Public License v2 or later
    License URI: http://www.gnu.org/licenses/gpl-2.0.html
    Tags: ceamib, capacitaciones, flexbox, css grid, mobile first
    Text Domain: Ceamib capacitaciones
*/

/* ==========================================================================
   1. CONFIGURACIÓN Y VARIABLES (Settings)
   ========================================================================== */

:root {
    /* Fuentes */
    --font-primary: "Raleway", sans-serif;
    --font-headings: "Staatliches", sans-serif;

    /* Paleta de Colores */
    --color-primary: #04BED4;
    --color-secondary: #06aabd;
    --color-dark-gray: #19104d;
    --color-light-gray: #c9c4c4;
    --color-white: #fff;
    --color-black: #000;
}

/* ==========================================================================
   2. ESTILOS GLOBALES (Generic)
   ========================================================================== */
html {
   box-sizing: border-box;
   font-size: 62.5%; /* 1rem = 10px */
}
*, *:before, *:after {
   box-sizing: inherit;
}
body {
    font-family: var(--font-primary);
    font-size: 1.8rem;
    line-height: 2;
}

/* ==========================================================================
   3. ESTILOS BASE DE ELEMENTOS (Elements)
   ========================================================================== */
h1, h2, h3, h4 {
    font-family: var(--font-headings);
    margin: 0 0 5rem 0;
    line-height: 1.2;
}
h1 { font-size: 6rem; }
h2 { font-size: 4.8rem; }
h3 { font-size: 3.6rem; }
h4 { font-size: 2.4rem; }

p {
   margin: 0; 
}
a {
    text-decoration: none;
}
ul {
    list-style: none;
    margin: 0;
    padding: 0;
}
img {
    display: block;
    max-width: 100%;
    height: auto; 
}
hr {
    border: 1px solid var(--color-light-gray);
}

/* ==========================================================================
   4. OBJETOS Y ABSTRACCIONES (Objects)
   ========================================================================== */

/* --- Layout --- */
.contenedor {
    width: min(95%, 120rem); /* Descomentado para proveer un ancho máximo por defecto */
    margin: 0 auto;
}
.contenido-centrado {
    width: min(97%);
}
.seccion {
    padding: 2rem 0;
}
.imagen-destacada {
    margin-bottom: 3rem;
}

/* --- Utilidades --- */
.text-center {
    text-align: center;
}
.text-primary {
    color: var(--color-primary);
}
.text-blanco {
    color: var(--color-white);
}

/* ==========================================================================
   5. COMPONENTES (Components)
   ========================================================================== */

/* --- Header & Navegación --- */
.site-branding.logo {
    padding: 2rem 0;
    display: flex; /* Esto ya centra el logo dentro del .contenedor */
    justify-content: center;
}
.site-branding img {
    max-width: 300px;
}
.main-navigation.header {
    background-color: var(--color-primary);
    padding: 2rem 0;
    width: 100%; /* Ahora sí ocupará el 100% del viewport */
}
.barra-navegacion {
    display: flex;
    flex-direction: column;
    align-items: center;
}
.menu-principal {
  /* ... (el resto de tus estilos para el menú no necesitan cambiar) ... */
  display: flex;
  align-items: center;
}
.menu-principal li {
  list-style: none;
  padding: 0 15px;
  margin: 0;
}
.menu-principal a {
    font-family: var(--font-headings);
    display: block;
    text-align: center;
    color: var(--color-white);
    font-size: 2.2rem;
    padding: .5rem 2rem;
    transition: color 0.3s ease;
}
.menu-principal a:hover {
  color: var(--color-white);
}
.menu-principal .sub-menu {
  z-index: 9999;
  display: none;
  position: absolute;
  background-color: var(--color-primary);
  box-shadow: 0 8px 16px rgba(0, 0, 0, 0.2);
  opacity: 0;
  transition: opacity 0.3s ease-in-out;
}
.menu-principal li.menu-item-has-children.active > .sub-menu {
  display: block;
  opacity: 1;
}

@media (min-width: 768px) {
    .barra-navegacion {
        flex-direction: row;
        justify-content: center;
    }
    .menu-principal {
        display: flex;
        gap: 10rem;   
    }
    .menu-principal a {
        position: relative;
        z-index: 1;
    }
    .menu-principal .current_page_item > a {
        border-bottom: 5px solid var(--color-secondary);
    }
    .menu-principal a::before, 
    .menu-principal a::after {
        position: absolute;
        left: 0;
        content: '';
        display: block;
        width: 100%;
        height: 50%;
        background-color: var(--color-secondary);
        z-index: -1;
        transform: scaleX(0);
        transition: transform .6s;
    }
    .menu-principal a::before { top: 0; transform-origin: left; }
    .menu-principal a::after { top:50%; transform-origin: right; }
    .menu-principal a:hover::before { transform: scaleX(1); }
    .menu-principal a:hover::after { transform: scaleX(1); }
}

/* --- Footer --- */
.contenido-footer {
    padding: 3rem 0;
}
.copyright {
    text-align: center;
    font-family: var(--font-headings);
    font-size: 1.8rem;
    margin: 2rem 0 0 0;
}
.footer .menu-principal a {
    color: var(--color-black);
    text-align: center;
    font-size: 2.4rem;
    padding: 0 1rem;
}
.footer .menu-principal a::before, 
.footer .menu-principal a::after {
    display: none;
}
@media (min-width: 768px){
    .contenido-footer {
        display: flex;
        justify-content: space-between;
    }
    .copyright {
        font-size: 2.4rem;
        margin: 0;
    }
}

/* --- Botones --- */
.boton {
    background-color: var(--color-light-gray);
    color: var(--color-black);
    padding: 1rem 3rem;
    display: block;
    flex: 1;
    text-align: center;
    font-weight: 700;
    text-transform: uppercase;
    border-radius: .5rem;
    margin: 1rem 0;
}
.boton-primario {
    background-color: var(--color-primary);
    color: var(--color-white);
}
@media (min-width: 768px) {
    .boton {
        display: inline-block;
        flex: 0 0 auto;
    }
}

/* --- Breadcrumbs --- */
.ceamib-breadcrumbs {
    padding: 15px 0;
    font-size: 14px;
    color: #555;
    border-bottom: 1px solid #eee;
    margin-bottom: 30px;
}
.ceamib-breadcrumbs ol {
    margin: 0;
    padding: 0;
    list-style: none;
}
.ceamib-breadcrumbs li {
    display: inline;
}
.ceamib-breadcrumbs li a {
    color: #0073aa;
    text-decoration: none;
}
.ceamib-breadcrumbs li a:hover {
    text-decoration: underline;
}
.ceamib-breadcrumbs .breadcrumb-separator {
    margin: 0 8px;
    color: #777;
}


/* --- Modo mantenimiento --- */
body.page-template-page-mantenimiento .main-navigation {
    display: none;
}