/*
Theme Name: Asmarpe Child
Theme URI: https://asmarpe.org.pe
Description: Child theme para ASMARPE basado en Twenty Twenty-Five
Author: InfoEscomar
Template: twentytwentyfive
Version: 1.0.0
Text Domain: asmarpe-child
*/

/* ========================================
   TIPOGRAFÍA GLOBAL
   ======================================== */

body {
    font-family: 'Roboto', sans-serif;
    font-size: 16px;
    font-weight: 400;
    line-height: 1.6;
    color: var(--wp--preset--color--text);
}

/* Títulos */
h1, h2, h3, h4, h5, h6 {
    font-family: 'Roboto Slab', 'Roboto', serif;
    font-weight: 500;
    line-height: 1.3;
    color: var(--wp--preset--color--accent);
    margin-bottom: 0.5em;
}

h1 { font-size: 2.5rem; }
h2 { font-size: 2rem; }
h3 { font-size: 1.5rem; }
h4 { font-size: 1.25rem; }
h5 { font-size: 1.1rem; }
h6 { font-size: 1rem; }

/* Párrafos */
p {
    margin-bottom: 1rem;
}

/* Links */
a {
    color: var(--wp--preset--color--primary);
    text-decoration: none;
    transition: color 0.3s ease;
}

a:hover {
    color: var(--wp--preset--color--accent);
}

/* ========================================
   MENÚ PRINCIPAL - HEADER
   ======================================== */

header .wp-block-navigation-item a {
    text-transform: uppercase;
    letter-spacing: 0.5px;
    padding: 10px 15px;
    transition: all 0.3s ease;
    position: relative;
    color: var(--wp--preset--color--secondary);
}

header .wp-block-navigation-item a:hover {
    color: var(--wp--preset--color--accent);
}

header .wp-block-navigation-item.current-menu-item > a,
header .wp-block-navigation-item.current-menu-ancestor > a {
    color: var(--wp--preset--color--accent);
}

header .wp-block-navigation-item.current-menu-item > a::after,
header .wp-block-navigation-item.current-menu-ancestor > a::after {
    content: "";
    position: absolute;
    bottom: 0;
    left: 15px;
    right: 15px;
    height: 3px;
    background-color: var(--wp--preset--color--accent);
}

/* Mostrar la barrita también en hover (SOLO menú principal) */
header > * .wp-block-navigation-item:not(.has-child) > a:hover::after,
header .wp-block-navigation > .wp-block-navigation-item > a:hover::after,
header .wp-block-navigation > ul > .wp-block-navigation-item > a:hover::after {
    content: "";
    position: absolute;
    bottom: 0;
    left: 15px;
    right: 15px;
    height: 3px;
    background-color: var(--wp--preset--color--accent);
}

/* ========================================
   SUBMENÚS (DROPDOWN)
   ======================================== */

header .wp-block-navigation__submenu-container {
    background: var(--wp--preset--color--white);
    border: 1px solid var(--wp--preset--color--light-bg);
    border-top: 3px solid var(--wp--preset--color--accent);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
    padding: 10px 0;
    min-width: 220px;
}

header .wp-block-navigation__submenu-container .wp-block-navigation-item a {
    padding: 10px 20px;
    color: var(--wp--preset--color--secondary);
    font-size: 0.8rem;
    text-transform: none;
    min-width: max-content;
    white-space: nowrap;
}

header .wp-block-navigation__submenu-container .wp-block-navigation-item a:hover {
    background-color: var(--wp--preset--color--light-bg);
    color: var(--wp--preset--color--accent);
}

header .wp-block-navigation__submenu-container .wp-block-navigation-item.current-menu-item a {
    color: var(--wp--preset--color--secondary);
    background-color: var(--wp--preset--color--light-bg);
}

header .wp-block-navigation__submenu-container .wp-block-navigation-item a::after {
    display: none;
}

header .wp-block-navigation__submenu-icon {
    margin-left: 5px;
    width: 10px;
    height: 10px;
}

/* PASO 1: quitar subrayado (underline) en menú y submenú */
header .wp-block-navigation-item a,
header .wp-block-navigation-item a:hover,
header .wp-block-navigation-item a:focus,
header .wp-block-navigation-item a:active {
    text-decoration: none !important;
}


/* ========================================
   TÍTULO CON LÍNEA DECORATIVA (reutilizable)
   ======================================== */

/* Clase base para títulos con línea decorativa */
.asmarpe-titulo-decorado {
    font-weight: 400;
    position: relative;
    padding-bottom: 15px;
    margin-bottom: 20px;
    width: fit-content;
}

.asmarpe-titulo-decorado::after {
    content: "";
    position: absolute;
    left: 0;
    bottom: 0;
    width: 60%;
    height: 1.5px;
    background-color: currentColor;
}

/* Variante centrada */
.asmarpe-titulo-decorado--centrado {
    margin-left: auto;
    margin-right: auto;
}

.asmarpe-titulo-decorado--centrado::after {
    left: 20%;
    width: 60%;
}

/* Variante con línea más gruesa */
.asmarpe-titulo-decorado--grueso::after {
    height: 3px;
}

/* Variante con línea más ancha */
.asmarpe-titulo-decorado--ancho::after {
    width: 80%;
}

/* Clases de compatibilidad (mantener por ahora) */
.titulo-linea {
    font-weight: 400;
    position: relative;
    padding-bottom: 15px;
    margin-bottom: 20px;
    width: fit-content;
}

.titulo-linea::after {
    content: "";
    position: absolute;
    left: 0;
    bottom: 0;
    width: 50%;
    height: 1.5px;
    background-color: currentColor;
}

.titulo-linea-centro {
    position: relative;
    padding-bottom: 15px;
    margin-bottom: 20px;
    width: fit-content;
    margin-left: auto;
    margin-right: auto;
}

.titulo-linea-centro::after {
    content: "";
    position: absolute;
    left: 20%;
    bottom: 0;
    width: 50%;
    height: 3px;
    background-color: currentColor;
}

/* ========================================
   SIDEBAR - Títulos usando el sistema decorado
   ======================================== */

.wp-block-column:first-child > .wp-block-group h2 {
    color: var(--wp--preset--color--accent);
}

/* Aplicar automáticamente el estilo decorado a títulos del sidebar */
.wp-block-column:first-child > .wp-block-group h2 {
    font-weight: 400;
    position: relative;
    padding-bottom: 15px;
    margin-bottom: 20px;
    width: fit-content;
}

.wp-block-column:first-child > .wp-block-group h2::after {
    content: "";
    position: absolute;
    left: 0;
    bottom: 0;
    width: 60%;
    height: 1.5px;
    background-color: currentColor;
}

/* ========================================
   FOOTER - Títulos usando el sistema decorado
   ======================================== */

footer h4 {
    color: var(--wp--preset--color--primary);
}

/* Aplicar automáticamente el estilo decorado a títulos del footer */
footer h4 {
    font-weight: 400;
    position: relative;
    padding-bottom: 15px;
    margin-bottom: 20px;
    width: fit-content;
}

footer h4::after {
    content: "";
    position: absolute;
    left: 0;
    bottom: 0;
    width: 50%;
    height: 1.5px;
    background-color: currentColor;
}

.footer-contacto {
    list-style: none;
    padding-left: 0;
    margin-left: 0;
}

.footer-contacto li {
    margin-bottom: 10px;
}

.footer-contacto i {
    color: var(--wp--preset--color--primary);
    margin-right: 8px;
    width: 20px;
    text-align: center;
}

/* ========================================
   GRID DE ASOCIADOS
   ======================================== */

.asmarpe-asociados-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 20px;
    padding: 20px 0;
}

.asmarpe-asociado-card {
    display: flex;
    flex-direction: row;
    background: var(--wp--preset--color--white);
    border: 1px solid var(--wp--preset--color--light-bg);
    border-radius: 4px;
    overflow: hidden;
    box-shadow: 0 2px 4px rgba(0,0,0,0.05);
}

.asmarpe-asociado-imagen {
    flex: 0 0 200px;
}

.asmarpe-asociado-imagen img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.asmarpe-asociado-contenido {
    padding: 20px;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.asmarpe-asociado-contenido h3 {
    color: var(--wp--preset--color--accent);
    margin: 0 0 10px 0;
    font-size: 1.1rem;
}

.asmarpe-asociado-direccion {
    color: var(--wp--preset--color--text);
    font-size: 0.9rem;
    margin: 0 0 8px 0;
}

.asmarpe-asociado-web a {
    color: var(--wp--preset--color--primary);
    font-size: 0.9rem;
    text-decoration: none;
}

.asmarpe-asociado-web a:hover {
    color: var(--wp--preset--color--accent);
}

@media (max-width: 900px) {
    .asmarpe-asociados-grid {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 600px) {
    .asmarpe-asociado-card {
        flex-direction: column;
    }
    
    .asmarpe-asociado-imagen {
        flex: 0 0 200px;
    }
}

/* ========================================
   CAROUSEL DE LOGOS
   ======================================== */
/* Los estilos del carousel se han movido a:
   /assets/css/carousel-animations.css

   El carousel soporta 2 tipos de animación:
   - continuous (scroll continuo)
   - groups (grupos con pausa)

   Configuración disponible en:
   Apariencia > Personalizar > ASMARPE Carousel
*/

/* ========================================
   METASLIDER FULL WIDTH
   ======================================== */

.metaslider,
.metaslider-flex {
    width: 100vw !important;
    max-width: 100vw !important;
    margin-left: calc(-50vw + 50%) !important;
    position: relative;
}

.metaslider .flexslider {
    max-width: none !important;
}

.metaslider .slides img {
    width: 100%;
    height: auto;
    max-height: 600px;
    object-fit: cover;
    image-rendering: -webkit-optimize-contrast;
}

/* ========================================
   CARDS DEL INICIO
   ======================================== */

.asmarpe-cards-inicio .wp-block-column {
    background: var(--wp--preset--color--white);
    border-radius: 4px;
    overflow: hidden;
    box-shadow: 0 2px 8px rgba(0,0,0,0.08);
    padding-bottom: 20px;
}

.asmarpe-cards-inicio .wp-block-column img {
    width: 100%;
    height: 200px;
    object-fit: cover;
    margin-bottom: 0;
}

.asmarpe-cards-inicio .wp-block-column h4 {
    color: var(--wp--preset--color--accent);
    padding: 20px 20px 0;
    margin: 0;
}

.asmarpe-cards-inicio .wp-block-column p {
    padding: 0 20px;
    margin: 0 0 10px 0;
    color: var(--wp--preset--color--text);
    font-size: 0.95rem;
}

.asmarpe-cards-inicio .wp-block-buttons {
    padding: 10px 20px 0;
}

.asmarpe-cards-inicio .wp-block-button__link {
    background-color: var(--wp--preset--color--accent);
    border-radius: 4px;
    color: var(--wp--preset--color--white);
    font-size: 0.9rem;
    padding: 10px 20px;
}

.asmarpe-cards-inicio .wp-block-button__link:hover {
    background-color: var(--wp--preset--color--secondary);
}


/* ========================================
   DISPOSITIVO MÓVIL O ANCHOS REDUCIDOS
   ======================================== */


/* Oculta TOP BAR (Bienvenidos / Email / Telf) - responsive */
@media (max-width: 875px){
    header > .wp-block-group:first-child{
        display: none !important;
    }
}

/* Menú responsive: permitir varias filas pero con filas más juntas */
header .wp-block-navigation__responsive-container-content .wp-block-navigation__container{
    justify-content: center !important;
    row-gap: 10px !important;
}
