/*
Theme Name: APORDOM TEMA 2026
Theme URI: https://portuaria.gob.do
Description: Tema principal para la Autoridad Portuaria Dominicana.
Author: Enmanuel Martinez Montero
Version: 1.0.0
Text Domain: apordom-theme
*/

:root {
    --apordom-azul-oscuro: #002d5b;
    --apordom-rojo: #d11218;
    --apordom-blanco: #ffffff;
    --apordom-gris-claro: #f4f5f7;
    --apordom-texto-oscuro: #333333;
    --apordom-border: #e0e0e0;
}

/* ==========================================================================
   1. RESET Y ESTRUCTURA GLOBAL
   ========================================================================== */
body {
    margin: 0;
    font-family: 'Inter', sans-serif;
    color: var(--apordom-texto-oscuro);
    display: flex !important;
    flex-direction: column !important;
    min-height: 100vh !important; /* Footer siempre abajo */
}

.site-main {
    flex-grow: 1 !important;
}

.container-header, .container-footer {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 15px;
}

/* Limpieza de enlaces genéricos */
.entry-content a:hover, p a:hover, span a:hover {
    color: var(--apordom-rojo) !important;
    background-color: transparent !important;
}

/* Enlaces de correo */
a[href^="mailto:"] {
    color: var(--apordom-rojo) !important;
    text-decoration: none !important;
    font-weight: bold;
    transition: opacity 0.3s ease;
}
a[href^="mailto:"]:hover { opacity: 0.8; }

/* ==========================================================================
   2. HEADER Y NAVEGACIÓN
   ========================================================================== */
.apordom-header {
    position: relative !important; /* Ancla para el menú móvil */
    z-index: 1000 !important;
}

/* Barra Gobierno */
.top-bar-gov {
    background-color: var(--apordom-azul-oscuro);
    color: var(--apordom-blanco);
    font-size: 12px;
    padding: 8px 0;
}
.top-bar-gov .container-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
}
.gov-left { display: flex; align-items: center; gap: 10px; }
.gov-right a { color: var(--apordom-blanco); text-decoration: none; }

.gov-toggle-btn {
    background: transparent !important;
    border: none;
    color: var(--apordom-blanco) !important;
    cursor: pointer;
    font-size: 12px;
    display: flex;
    align-items: center;
    gap: 5px;
    padding: 0;
    box-shadow: none !important;
}
.gov-toggle-btn .arrow-down { transition: transform 0.3s ease; }
.gov-toggle-btn.is-open .arrow-down { transform: rotate(180deg); }

/* Panel Desplegable Gobierno */
.gov-info-panel {
    background-color: #001f3f;
    color: var(--apordom-blanco);
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.4s ease-out, padding 0.4s ease-out;
}
.gov-info-panel.is-open {
    max-height: 500px;
    padding: 20px 0;
}
.gov-panel-content { display: flex; gap: 30px; }
.gov-panel-col { display: flex; gap: 15px; flex: 1; }
.gov-icon-wrapper { flex-shrink: 0; }
.gov-text strong { display: block; font-size: 14px; margin-bottom: 5px; }
.gov-text p { font-size: 12px; margin: 0; line-height: 1.4; color: #cbd5e1; }

/* Header Medio (Logo y Buscador) */
.middle-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px 15px;
    background-color: var(--apordom-blanco);
}
.logo-area img { max-width: 280px; height: auto; }

/* Buscador tipo Píldora */
.header-actions {
    display: flex !important;
    align-items: center !important;
    gap: 15px !important;
}

/* ==========================================================================
   BUSCADOR TIPO PÍLDORA
   ========================================================================== */

/* 1. EL CONTENEDOR (La Píldora Blanca) */
form.search-form {
    display: flex !important;
    flex-wrap: nowrap !important; /* VITAL: Prohíbe terminantemente que el botón se separe a otra línea */
    align-items: center !important;
    border: 1px solid var(--apordom-border) !important;
    border-radius: 50px !important; /* Bordes totalmente redondeados */
    background: var(--apordom-blanco) !important;
    padding: 3px !important; /* El anillo interno que separa al botón del borde gris */
    width: 100% !important;
    max-width: 280px !important; /* En PC mide 280px, en móvil se adapta al 100% */
    box-sizing: border-box !important;
    margin: 0 !important;
}

/* 2. EL CAMPO DE TEXTO (El Resorte) */
form.search-form input[type="search"] {
    flex: 1 1 auto !important; /* MAGIA: Toma todo el espacio disponible y "empuja" al botón rojo contra el borde derecho */
    min-width: 0 !important; /* Permite que el texto se encoja en pantallas de 320px sin romper la píldora */
    border: none !important;
    background: transparent !important;
    padding: 0 15px !important;
    margin: 0 !important;
    outline: none !important;
    font-size: 14px !important;
    color: var(--apordom-texto-oscuro) !important;
    box-shadow: none !important;
}

/* Limpieza de la 'x' nativa de los navegadores para buscadores */
form.search-form input[type="search"]::-webkit-search-decoration,
form.search-form input[type="search"]::-webkit-search-cancel-button { 
    display: none !important; 
}

/* 3. EL BOTÓN ROJO (El Elemento Rígido) */
form.search-form button.search-btn {
    flex: 0 0 auto !important; /* NO crece, NO se encoge. Mantiene su tamaño sí o sí */
    background-color: var(--apordom-rojo) !important;
    color: var(--apordom-blanco) !important;
    border: none !important;
    width: 36px !important; /* Altura y anchura simétricas para un círculo perfecto */
    height: 36px !important;
    border-radius: 50% !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    cursor: pointer !important;
    padding: 0 !important;
    margin: 0 !important;
    transition: transform 0.2s ease, background-color 0.3s !important;
}

form.search-form button.search-btn:hover {
    background-color: #a80e13 !important;
    transform: scale(1.05) !important;
}

.header-separator {
    width: 1px !important;
    height: 30px !important;
    background-color: var(--apordom-border) !important;
}

.grid-btn, .mobile-menu-btn {
    background: transparent !important;
    border: none !important;
    color: var(--apordom-azul-oscuro) !important;
    cursor: pointer !important;
    padding: 5px !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    transition: color 0.3s !important;
}
.grid-btn:hover, .mobile-menu-btn:hover { color: var(--apordom-rojo) !important; }

/* Menú Principal (Azul) */
.bottom-nav { background-color: var(--apordom-azul-oscuro); }
.nav-menu {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    justify-content: space-between;
    align-items: center;
}
.nav-menu li { position: relative; }
.nav-menu a {
    display: block;
    color: var(--apordom-blanco);
    text-decoration: none;
    padding: 16px 15px;
    font-size: 15px;
    font-weight: 500;
    transition: color 0.3s, background-color 0.3s;
}
.nav-menu li a:hover,
.nav-menu li:hover > a {
    background-color: transparent !important;
    color: var(--apordom-rojo) !important;
}

/* ==========================================================================
   3. BARRA DE HERRAMIENTAS (COMPARTIR)
   ========================================================================== */
.share-tools-bar {
    background-color: var(--apordom-rojo);
    padding: 12px 0;
    width: 100%;
    border-bottom: 3px solid #b30f14;
}
.share-tools-container {
    display: flex;
    justify-content: flex-end;
    gap: 15px;
}
.share-btn {
    background-color: var(--apordom-blanco) !important;
    color: var(--apordom-azul-oscuro) !important;
    width: 38px;
    height: 38px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    text-decoration: none !important;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
    box-shadow: 0 2px 5px rgba(0,0,0,0.2);
}
.share-btn:hover {
    transform: scale(1.1) translateY(-2px);
    box-shadow: 0 4px 8px rgba(0,0,0,0.3);
}

/* ==========================================================================
   4. MODAL OGTIC (GRID 3x3 Y ACORDEÓN)
   ========================================================================== */
.modal-overlay {
    display: none; 
    position: absolute;
    top: 130px; 
    right: 5%;
    background: var(--apordom-blanco);
    box-shadow: 0 8px 24px rgba(0,0,0,0.15);
    border-radius: 8px;
    width: 320px;
    z-index: 999999;
}

#modal-enlaces .modal-content {
    max-height: 60vh !important;
    display: flex !important;
    flex-direction: column !important;
}

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 15px 20px;
    border-bottom: 2px solid var(--apordom-rojo);
}
.modal-header h3 { margin: 0; font-size: 16px; color: var(--apordom-azul-oscuro); }

button.close-btn {
    background: transparent !important;
    border: none !important;
    color: var(--apordom-azul-oscuro) !important;
    font-size: 28px !important;
    cursor: pointer !important;
    padding: 0 !important;
}
button.close-btn:hover, button.close-btn:focus { color: var(--apordom-rojo) !important; outline: none !important; }

#modal-enlaces .modal-body {
    overflow-y: auto !important;
    padding: 15px !important;
    overflow-x: hidden !important;
}

/* Acordeón */
.enlaces-group { margin-bottom: 10px; }
.enlaces-accordion-btn {
    background-color: transparent !important;
    color: var(--apordom-azul-oscuro) !important;
    cursor: pointer;
    padding: 10px 5px;
    width: 100%;
    border: none;
    text-align: left;
    outline: none !important;
    font-size: 16px;
    font-weight: bold;
    display: flex;
    justify-content: space-between;
    align-items: center;
}
.enlaces-accordion-btn:hover { color: var(--apordom-rojo) !important; }
.enlaces-accordion-btn .arrow { transition: transform 0.3s; font-size: 14px; color: #6c757d; }
.enlaces-accordion-btn:hover .arrow { color: var(--apordom-rojo) !important; }
.enlaces-accordion-btn:not(.active) .arrow { transform: rotate(-90deg); }
.enlaces-divider { border: 0; height: 1px; background: var(--apordom-border); margin: 5px 0 15px 0; }

/* Grid 3x3 */
#modal-enlaces .enlaces-grid {
    display: grid !important;
    grid-template-columns: repeat(3, 1fr) !important;
    gap: 15px 5px !important;
    width: 100% !important;
    padding: 0 !important;
}
#modal-enlaces .enlace-item {
    display: flex !important;
    flex-direction: column !important;
    align-items: center !important;
    justify-content: flex-start !important;
    text-align: center !important;
    text-decoration: none !important;
    width: 100% !important;
}
#modal-enlaces .enlace-icon {
    width: 50px !important;
    height: 50px !important;
    min-width: 50px !important;
    min-height: 50px !important;
    border-radius: 50% !important;
    border: 1px solid var(--apordom-border) !important;
    background: #fff !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    margin: 0 auto 5px auto !important;
    overflow: hidden !important;
}
#modal-enlaces .enlace-icon img {
    width: 30px !important;
    height: 30px !important;
    object-fit: contain !important;
    display: block !important;
}
#modal-enlaces .enlace-item span {
    font-size: 11px !important;
    color: var(--apordom-azul-oscuro) !important;
    font-weight: bold !important;
    line-height: 1.1 !important;
    word-wrap: break-word !important;
}

/* Custom Scroll */
.custom-scroll::-webkit-scrollbar { width: 6px; }
.custom-scroll::-webkit-scrollbar-track { background: var(--apordom-gris-claro); }
.custom-scroll::-webkit-scrollbar-thumb { background: var(--apordom-azul-oscuro); border-radius: 10px; }

/* ==========================================================================
   5. WIDGET DE ACCESIBILIDAD (Botón Flotante)
   ========================================================================== */
.a11y-widget-container {
    position: fixed !important;
    bottom: 90px !important;
    right: 20px !important;
    z-index: 999999 !important;
    width: auto !important;
    height: auto !important;
}

.a11y-trigger-btn {
    position: relative !important;
    background-color: transparent !important;
    border: none !important;
    width: 55px !important;
    height: 55px !important;
    min-width: 55px !important;
    min-height: 55px !important;
    border-radius: 50% !important;
    padding: 0 !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    overflow: hidden !important;
    cursor: pointer !important;
    box-shadow: 0 4px 10px rgba(0,0,0,0.2) !important;
    transition: transform 0.3s ease !important;
}
.a11y-trigger-btn:hover { transform: scale(1.1) !important; }

.a11y-trigger-btn img, .a11y-icon-image {
    width: 100% !important;
    height: 100% !important;
    object-fit: cover !important;
    display: block !important;
}

/* Panel Desplegable Accesibilidad */
.a11y-panel {
    position: absolute;
    bottom: 80px;
    right: 0;
    width: 320px;
    background: var(--apordom-blanco);
    border-radius: 8px;
    box-shadow: 0 5px 25px rgba(0,0,0,0.2);
    display: none;
    overflow: hidden;
}
.a11y-panel.is-active { display: block; }
.a11y-header {
    display: flex; justify-content: space-between; align-items: center;
    padding: 15px 20px; border-bottom: 2px solid var(--apordom-rojo);
}
.a11y-header h3 { margin: 0; font-size: 16px; color: var(--apordom-texto-oscuro); }
.a11y-close-btn { background: none; border: none; font-size: 20px; cursor: pointer; color: var(--apordom-rojo); }
.a11y-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; padding: 20px; }
.a11y-btn {
    background: #fff; border: 1px solid var(--apordom-border); border-radius: 6px;
    padding: 15px 10px; cursor: pointer; display: flex; flex-direction: column;
    align-items: center; gap: 10px; transition: all 0.2s;
}
.a11y-btn.is-active { border-color: var(--apordom-azul-oscuro); background: #f0f4f8; }
.a11y-icon { font-size: 20px; font-weight: bold; }
.a11y-label { font-size: 12px; color: var(--apordom-texto-oscuro); }
.a11y-reset-btn { width: 100%; padding: 15px; background: #ffebeb; color: var(--apordom-rojo); border: none; border-top: 1px solid var(--apordom-border); cursor: pointer; font-weight: bold; }

/* Clases Activas de Accesibilidad */
body.a11y-texto-grande { font-size: 120% !important; }
body.a11y-texto-grande h1, body.a11y-texto-grande h2, body.a11y-texto-grande h3 { font-size: 130% !important; }
body.a11y-escala-grises { filter: grayscale(100%) !important; }
body.a11y-contraste { background-color: #000 !important; color: #fff !important; }
body.a11y-contraste * { background-color: transparent !important; color: #fff !important; border-color: #fff !important; }
body.a11y-resaltar-links a { text-decoration: underline !important; background-color: #ffff00 !important; color: #000 !important; font-weight: bold !important; }

/* ==========================================================================
   6. FOOTER
   ========================================================================== */
.pre-footer {
    background-color: var(--apordom-blanco);
    padding: 50px 0;
    border-top: 1px solid var(--apordom-border);
}
.pre-footer .container-footer { display: flex; flex-wrap: wrap; gap: 40px; }
.footer-logos img {
    max-height: 80px; width: auto; object-fit: contain;
    object-position: left center; display: block;
}

/* Modificación: Empujar certificaciones 30px más abajo */
.footer-certificaciones { margin-top: 70px; } 

.cert-title {
    color: var(--apordom-azul-oscuro); font-size: 15px; margin-bottom: 20px;
    font-weight: 700; position: relative; text-transform: uppercase;
}
.cert-title::after {
    content: ""; position: absolute; left: 0; bottom: -10px; width: 25px; height: 3px; background-color: var(--apordom-rojo);
}
.cert-badges { display: flex; gap: 15px; align-items: center; flex-wrap: wrap; }

/* Modificación: Animación Hover en Sellos NORTIC */
.cert-badges img { 
    max-height: 90px; 
    width: auto; 
    object-fit: contain; 
    transition: transform 0.3s ease, filter 0.3s ease; 
}
.cert-badges img:hover {
    transform: scale(1.1) translateY(-3px); /* Crece ligeramente y sube */
    filter: drop-shadow(0 5px 10px rgba(0,0,0,0.15)); /* Sombra suave */
}

.footer-widgets { display: flex; flex: 1; justify-content: space-between; gap: 20px; }
.footer-col h2 {
    color: var(--apordom-azul-oscuro); font-size: 15px; margin-bottom: 15px;
    position: relative; text-transform: uppercase; font-weight: 700;
}
.footer-col h2::after {
    content: ""; position: absolute; left: 0; bottom: -8px; width: 25px; height: 3px; background-color: var(--apordom-rojo);
}
.footer-col p, .footer-links a { font-size: 14px; color: var(--apordom-texto-oscuro); line-height: 1.6; margin-top: 15px; }
.footer-links { list-style: none; padding: 0; margin: 0; margin-top: 15px; }
.footer-links li { margin-bottom: 10px; }
.footer-links a { text-decoration: none; transition: color 0.3s; }
.footer-links a:hover { color: var(--apordom-rojo); }

/* Franja Inferior Oscura (Redes) */
.footer-bottom {
    background-color: var(--apordom-azul-oscuro);
    color: var(--apordom-blanco);
    padding: 15px 0;
    font-size: 13px;
    margin-top: auto;
}
.bottom-flex {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 15px;
}
.social-siguenos { display: flex; align-items: center; gap: 15px; font-weight: 700; letter-spacing: 1px; }
.social-icons { display: flex; gap: 15px; }
.social-icons a {
    color: var(--apordom-blanco) !important;
    font-size: 18px;
    transition: color 0.3s ease, transform 0.3s ease;
    display: inline-block;
}
.social-icons a:hover { color: var(--apordom-rojo) !important; transform: translateY(-3px); }

/* ==========================================================================
   5. NOTICIAS (GRID APORDOM MODERNO)
   ========================================================================== */

.noticias-apordom .elementor-grid {
    display: grid !important;
    grid-template-columns: repeat(3, 1fr) !important;
    gap: 20px !important;
}

.noticias-apordom article.elementor-post {
    position: relative !important;
    border-radius: 12px !important;
    overflow: hidden !important;
    height: 300px !important;
    margin: 0 !important;
    padding: 0 !important;
    box-shadow: 0 4px 15px rgba(0,0,0,0.1);
    background: #000;
    border: none !important;
}

.noticias-apordom .elementor-post__thumbnail,
.noticias-apordom .elementor-post__thumbnail img {
    width: 100% !important;
    height: 100% !important;
    object-fit: cover !important;
    position: absolute !important;
    top: 0; left: 0;
    transition: transform 0.5s ease;
}

.noticias-apordom article:hover img { 
    transform: scale(1.1); 
}

.noticias-apordom .elementor-post__text {
    position: absolute !important;
    bottom: 0 !important;
    left: 0 !important;
    width: 100% !important;
    background-color: rgba(0, 45, 91, 0.95) !important; /* Azul oscuro institucional con 95% de opacidad */
    padding: 15px 40px 15px 20px !important;
    min-height: 85px;
    display: flex;
    align-items: center;
    z-index: 10;
}

/* Flecha apuntando a la derecha */
.noticias-apordom .elementor-post__text::after {
    content: '\f054';
    font-family: "Font Awesome 5 Free";
    font-weight: 900; /* Requisito estricto para iconos sólidos de FontAwesome 5 */
    position: absolute;
    right: 15px;
    top: 50%;
    transform: translateY(-50%); /* Centrado vertical matemático exacto */
    color: var(--apordom-blanco);
    font-size: 12px;
}

.noticias-apordom .elementor-post__title,
.noticias-apordom .elementor-post__title a {
    color: var(--apordom-blanco) !important;
    font-size: 14px !important;
    font-weight: 600;
    line-height: 1.3;
    letter-spacing: 0.5px !important;
    text-decoration: none !important;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

/* Ocultar el resumen de la noticia */
.noticias-apordom .elementor-post__excerpt { 
    display: none !important; 
}

/* Fecha flotante estilo placa */
.noticias-apordom .elementor-post-date {
    position: absolute !important;
    top: 15px !important;
    right: 15px !important;
    background-color: var(--apordom-azul-oscuro);
    color: var(--apordom-blanco) !important;
    padding: 4px 12px;
    border-radius: 50px;
    font-size: 10px !important;
    font-weight: bold;
    text-transform: uppercase;
    z-index: 20;
    border: 1px solid rgba(255,255,255,0.2);
}

/* Paginación Noticias */
.noticias-apordom .elementor-pagination {
    margin-top: 40px !important;
    padding: 0 !important;
    display: flex;
    justify-content: center;
    gap: 5px;
}

.noticias-apordom .page-numbers {
    background: var(--apordom-blanco);
    color: var(--apordom-azul-oscuro) !important;
    border: 1px solid var(--apordom-border);
    padding: 8px 16px;
    border-radius: 4px;
    font-weight: bold;
    transition: all 0.3s;
}

.noticias-apordom .page-numbers.current {
    background: var(--apordom-rojo) !important;
    color: var(--apordom-blanco) !important;
    border-color: var(--apordom-rojo);
}

.noticias-apordom a.page-numbers:hover {
    background: var(--apordom-azul-oscuro) !important;
    color: var(--apordom-blanco) !important;
}

/* RESPONSIVE NOTICIAS (TABLETS Y MÓVILES) */
@media (max-width: 992px) {
    .noticias-apordom .elementor-grid { 
        grid-template-columns: repeat(2, 1fr) !important; 
    }
}

@media (max-width: 768px) {
    .noticias-apordom .elementor-grid { 
        grid-template-columns: 1fr !important; 
    }
}


/* ==========================================================================
   7. PLANTILLAS GENERALES (Páginas simples, Búsqueda y Single)
   ========================================================================== */

/* Ocultar header de Elementor y líneas rojas residuales del tema viejo */
body.elementor-page-title-hidden .page-header { display: none !important; }
.entry-title::after, .post-title::after, .post-card h2::after, .post-card h3::after, h1.entry-title::after { display: none !important; }

/* Páginas Estáticas Básicas */
.apordom-page { padding: 50px 15px; background-color: var(--apordom-blanco); }
.apordom-page .page-header { margin-bottom: 0px; border-bottom: 0px solid var(--apordom-rojo); padding-bottom: 15px; }
.apordom-page .entry-title { color: var(--apordom-azul-oscuro); margin: 0; font-size: 2.5rem; }
.apordom-page .page-content { font-size: 16px; line-height: 1.8; color: var(--apordom-texto-oscuro); }

/* Resultados Búsqueda */
.apordom-search-results { padding: 50px 15px; }
.search-header { border-bottom: 2px solid var(--apordom-rojo); padding-bottom: 15px; margin-bottom: 30px; }
.search-item { margin-bottom: 30px; padding-bottom: 20px; border-bottom: 1px solid var(--apordom-border); }

/* Single y Archive genérico */
.apordom-single { padding: 50px 15px; max-width: 800px; margin: 0 auto; }
.entry-meta-category a { background-color: var(--apordom-azul-oscuro); color: var(--apordom-blanco); padding: 4px 10px; font-size: 12px; text-transform: uppercase; text-decoration: none; border-radius: 3px; }
.img-responsive { max-width: 100%; height: auto; display: block; border-radius: 5px; }

/* ==========================================================================
   8. MEDIA QUERIES (MÓVIL Y TABLET)
   ========================================================================== */

/* Lógica exclusiva para Desktop */
@media (min-width: 1025px) {
    .mobile-menu-btn { display: none !important; }
}

/* Lógica exclusiva para Móvil y Tablet */
@media (max-width: 1024px) {
    .top-bar-gov, .gov-right { display: none; }
    
    /* Header Grid Elástico */
    .header-actions {
        display: grid !important;
        grid-template-columns: 1fr auto auto !important;
        grid-template-rows: auto auto !important;
        gap: 10px 15px !important;
        width: 100% !important;
        align-items: center !important;
    }
    form.search-form { grid-column: 1 / 2 !important; grid-row: 1 / 2 !important; width: 100% !important; min-width: 120px !important; margin: 0 !important; }
    .header-separator { grid-column: 2 / 3 !important; grid-row: 1 / 2 !important; display: block !important; }
    .grid-btn { grid-column: 3 / 4 !important; grid-row: 1 / 2 !important; }
    .mobile-menu-btn {
        display: flex !important;
        grid-column: 1 / 4 !important;
        grid-row: 2 / 3 !important;
        justify-self: end !important;
        margin-top: 5px !important;
    }

    /* Menú Móvil Empujando el Contenido */
    .bottom-nav {
        display: none;
        width: 100%;
        position: static !important; /* Empuja el contenido hacia abajo */
        z-index: 999;
        box-shadow: none !important;
    }
    .bottom-nav.is-active { display: block; }
    .nav-menu { flex-direction: column; background-color: var(--apordom-azul-oscuro); }
    .nav-menu a { border-bottom: 1px solid rgba(255,255,255,0.1); }
    
    .gov-panel-content { flex-direction: column; }
}

/* Ajustes de Footer y Herramientas para pantallas pequeñas */
@media (max-width: 768px) {
    .pre-footer .container-footer { flex-direction: column; }
    .footer-widgets { flex-direction: column; gap: 30px; }
    
    /* Footer Bottom Centrado */
    .footer-bottom { padding-bottom: 20px !important; }
    .bottom-flex {
        justify-content: center !important;
        text-align: center !important;
        flex-direction: column !important;
        gap: 20px !important;
    }
    .social-siguenos { justify-content: center !important; }
    
    .share-tools-container { justify-content: center; }
}

/* ==========================================================================
   9. SUBMENÚS DESPLEGABLES (DROPDOWNS)
   ========================================================================== */

/* ---------------- ESCRITORIO (PC) ---------------- */
@media (min-width: 1025px) {
    /* Ocultar el submenú por defecto y prepararlo para flotar */
    .nav-menu .sub-menu {
        display: none !important;
        position: absolute !important;
        top: 100% !important;
        left: 0 !important;
        background-color: var(--apordom-azul-oscuro) !important;
        min-width: 220px !important;
        z-index: 1000 !important;
        box-shadow: 0 8px 16px rgba(0,0,0,0.2) !important;
        border-top: 3px solid var(--apordom-rojo) !important;
        padding: 0 !important;
        flex-direction: column !important;
        list-style: none !important; /* Elimina la viñeta del contenedor principal */
    }

    /* Asegura que los enlaces internos (li) tampoco generen círculo */
    .nav-menu .sub-menu li {
        list-style: none !important; 
    }
    /* Mostrar el submenú suavemente al pasar el mouse */
    .nav-menu li:hover > .sub-menu {
        display: flex !important;
    }

    /* Diseño de los enlaces internos del submenú */
    .nav-menu .sub-menu a {
        padding: 12px 20px !important;
        font-size: 14px !important;
        font-weight: 400 !important;
        border-bottom: 1px solid rgba(255,255,255,0.05) !important;
        white-space: normal !important; /* Evita que textos largos rompan la caja */
    }

    /* Flechita automática para los elementos que tienen submenú */
    .nav-menu .menu-item-has-children > a::after {
        content: ' \25BE'; /* Flecha hacia abajo Unicode */
        font-size: 14px;
        margin-left: 6px;
        opacity: 0.8;
    }

    /* Preparación por si agregas sub-sub-menús (Nivel 3) */
    .nav-menu .sub-menu .sub-menu {
        top: 0 !important;
        left: 100% !important; /* Se abren hacia la derecha */
        border-top: none !important;
        border-left: 3px solid var(--apordom-rojo) !important;
    }
}

/* ---------------- MÓVIL Y TABLET (EFECTO ACORDEÓN CORREGIDO) ---------------- */
@media (max-width: 1024px) {
    /* 1. Asegurar que las listas ocupen todo el ancho para anclar el botón */
    .nav-menu li {
        position: relative !important;
        width: 100% !important;
        display: block !important;
    }

    /* 2. El enlace (Centrado perfecto y protegido) */
    .nav-menu a {
        display: block !important;
        width: 100% !important;
        box-sizing: border-box !important;
        text-align: center !important; 
        /* MAGIA: 50px a los lados mantiene el texto 100% centrado y lejos de la flecha */
        padding: 16px 50px !important; 
        border-bottom: 1px solid rgba(255,255,255,0.05) !important;
    }

    /* 3. Submenús ocultos por defecto */
    .nav-menu .sub-menu {
        position: static !important;
        display: none !important; 
        background-color: rgba(0, 0, 0, 0.15) !important;
        box-shadow: none !important;
        border-top: none !important;
        padding: 0 !important;
        list-style: none !important;
        width: 100% !important;
    }

    /* Ocultamos la flecha chiquita del texto de PC */
    .nav-menu .menu-item-has-children > a::after {
        display: none !important;
    }

    /* 4. EL BOTÓN DESPLEGABLE TÁCTIL (Fijo a la derecha) */
    .submenu-toggle {
        display: flex !important;
        position: absolute !important;
        right: 0 !important;
        top: 0 !important;
        width: 53px !important; 
        height: 53px !important; /* Altura idéntica al enlace */
        align-items: center !important;
        justify-content: center !important;
        color: var(--apordom-blanco) !important;
        font-size: 14px !important;
        cursor: pointer !important;
        z-index: 10 !important;
        border-left: 1px solid rgba(255,255,255,0.1) !important;
        transition: transform 0.3s ease, background-color 0.3s ease !important;
    }

    /* 5. ESTADOS ABIERTOS */
    .nav-menu .menu-item-has-children.abierto > .sub-menu {
        display: block !important;
        animation: slideDownMenu 0.3s ease forwards !important;
    }

    .nav-menu .menu-item-has-children.abierto > .submenu-toggle {
        transform: rotate(180deg) !important;
        background-color: rgba(255,255,255,0.1) !important;
    }

    @keyframes slideDownMenu {
        from { opacity: 0; transform: translateY(-5px); }
        to { opacity: 1; transform: translateY(0); }
    }


/* ==========================================================================
   10. HEADER STICKY PROFESIONAL Y LAYOUT MÓVIL (GRID 2026)
   ========================================================================== */

@media (max-width: 1024px) {
    /* 1. LIMPIEZA */
    body { padding-top: 0 !important; } /* Ya no necesitamos forzar espacios */

    /* 2. EL ENCABEZADO COMPLETO ES EL QUE TE SIGUE */
    .apordom-header {
        display: block !important;
        position: sticky !important;
        top: -40px !important; /* MAGIA: Sube 40px ocultando la barra azul, y ahí se frena */
        z-index: 99999 !important;
    }

    /* 3. BARRA DE GOBIERNO (Se queda arriba y desaparece al bajar) */
    .top-bar-gov {
        display: block !important;
        position: relative !important; /* Flujo natural, NO fixed */
        width: 100% !important;
        height: 40px !important; /* Altura estricta para que el cálculo de -40px sea exacto */
        background-color: var(--apordom-azul-oscuro) !important;
        padding: 0 !important;
        margin: 0 !important;
    }

    .top-bar-gov .container-header {
        display: flex !important;
        justify-content: space-between !important;
        align-items: center !important;
        height: 100% !important;
        padding: 0 10px !important;
        flex-wrap: nowrap !important;
    }

    /* Manejo del texto largo de la barra azul */
    .gov-left { display: flex !important; align-items: center !important; gap: 6px !important; flex: 1 !important; overflow: hidden !important; }
    .gov-left span { font-size: 10px !important; color: var(--apordom-blanco) !important; white-space: nowrap !important; overflow: hidden !important; text-overflow: ellipsis !important; line-height: 1 !important; }
    .gov-right { display: flex !important; align-items: center !important; margin-left: 8px !important; flex-shrink: 0 !important; }
    .gov-toggle-btn { font-size: 10px !important; color: var(--apordom-blanco) !important; background: transparent !important; border: none !important; padding: 0 !important; display: flex !important; align-items: center !important; gap: 3px !important; }

    /* 4. FRANJA BLANCA (LOGO Y BUSCADOR) */
    .middle-header {
        position: relative !important; /* Ya está dentro de un contenedor sticky, no necesita ser sticky otra vez */
        background-color: var(--apordom-blanco) !important;
        display: flex !important;
        align-items: flex-start !important; 
        justify-content: space-between !important;
        padding: 10px 15px !important;
        box-shadow: 0 4px 10px rgba(0,0,0,0.05) !important;
        gap: 15px !important;
    }

    /* 5. ALINEACIÓN EXACTA: LOGO VS BUSCADOR */
    .logo-area {
        flex: 0 0 auto !important;
        height: 40px !important; /* Altura forzada para igualar al buscador */
        display: flex !important;
        align-items: center !important;
    }
    .logo-area img { max-width: 120px !important; display: block !important; }

    /* Contenedor de acciones (Agrupa buscador, grid y menú) */
    .header-actions {
        display: flex !important;
        flex: 1 !important;
        flex-wrap: wrap !important; 
        align-items: center !important;
        justify-content: flex-end !important;
        gap: 10px !important;
    }

    form.search-form {
        flex: 1 !important; 
        height: 40px !important; 
        display: flex !important;
        align-items: center !important;
        margin: 0 !important;
    }

    .grid-btn {
        height: 40px !important; 
        display: flex !important;
        align-items: center !important;
        padding-left: 10px !important;
        border-left: 1px solid var(--apordom-border) !important;
    }

    /* 6. MENÚ MÓVIL (A LA DERECHA, EMPUJANDO CONTENIDO) */
    .mobile-menu-btn {
        flex: 0 0 100% !important; 
        display: flex !important;
        justify-content: flex-end !important; 
        margin-top: 10px !important;
    }

    .header-separator { display: none !important; }

    /* Garantizar que el menú desplegable empuje el contenido */
    .bottom-nav {
        position: static !important; 
        width: 100% !important;
    }
}
/* ---------------- 2. LAS 3 LÍNEAS GRISES Y CERTIFICACIONES LIBERADAS ---------------- */

/* DESKTOP: Certificaciones por fuera (debajo) de las líneas */
@media (min-width: 1025px) {
    .pre-footer {
        border-top: 1px solid var(--apordom-border) !important; /* LÍNEA 1: Superior */
        border-bottom: 1px solid var(--apordom-border) !important; /* LÍNEA 2: Inferior */
        margin-bottom: 150px !important; /* Creamos un colchón de espacio abajo */
        padding-bottom: 40px !important;
    }
    .pre-footer .container-footer {
        position: relative !important;
        display: flex !important;
        align-items: stretch !important;
    }
    .footer-widgets {
        border-left: 1px solid var(--apordom-border) !important; /* LÍNEA 3: Vertical */
        padding-left: 40px !important;
        margin-left: 20px !important;
        flex: 1 !important;
    }
    
    /* Expulsamos a las certificaciones de la caja grís con position absolute */
    .footer-certificaciones {
        position: absolute !important;
        bottom: -165px !important; /* La colocamos a salvo, debajo de la Línea 2 */
        left: 15px !important;
        margin: 0 !important;
    }
}

/* MÓVIL: Certificaciones abajo de todo, junto a la franja oscura */
@media (max-width: 1024px) {
    .pre-footer .container-footer {
        display: flex !important;
        flex-direction: column !important;
    }
    
    /* Desempaquetamos los logos para reordenarlos individualmente */
    .footer-logos {
        display: contents !important; 
    }
    
    /* Los widgets ahora son un "sándwich" de líneas grises */
    .footer-widgets {
        order: 2 !important;
        border-top: 1px solid var(--apordom-border) !important;
        border-bottom: 1px solid var(--apordom-border) !important;
        padding: 30px 0 !important;
        margin: 20px 0 !important;
        width: 100% !important;
    }
    
    /* Mandamos las certificaciones a la última posición */
    .footer-certificaciones {
        order: 3 !important; /* Baja al final del todo */
        width: 100% !important;
        display: flex !important;
        flex-direction: column !important;
        align-items: center !important;
        margin-bottom: 20px !important;
        margin-top: 10px !important;
    }
    .cert-badges {
        justify-content: center !important;
    }
	 }
/* ==========================================================================
   TIPOGRAFÍA GLOBAL, ENLACES Y MENÚS (CONTROL ABSOLUTO)
   ========================================================================== */

/* 1. COMPORTAMIENTO POR DEFECTO PARA TODOS LOS TÍTULOS */
/* Si no le pones ninguna clase, todos serán Azul Oscuro por defecto */
h1, h2, h3, h4, h5, h6, 
.elementor-widget-heading .elementor-heading-title {
    color: var(--apordom-azul-oscuro) !important;
    font-family: 'Inter', sans-serif !important;
    margin-top: 0;
}

/* 2. OPCIONES PARA CAMBIAR EL COLOR DE CUALQUIER TÍTULO INDIVIDUALMENTE */
/* Uso: Escribe "titulo-rojo", "titulo-blanco" o "titulo-oscuro" en la pestaña "Avanzado > Clases CSS" de Elementor */
.titulo-rojo, .elementor-widget-heading.titulo-rojo .elementor-heading-title { color: var(--apordom-rojo) !important; }
.titulo-blanco, .elementor-widget-heading.titulo-blanco .elementor-heading-title { color: var(--apordom-blanco) !important; }
.titulo-oscuro, .elementor-widget-heading.titulo-oscuro .elementor-heading-title { color: var(--apordom-texto-oscuro) !important; }
.titulo-azul, .elementor-widget-heading.titulo-azul .elementor-heading-title { color: var(--apordom-azul-oscuro) !important; }

/* --------------------------------------------------------------------------
   (Opcional) Si en lugar de usar clases prefieres que CADA etiqueta 
   tenga un color estricto por defecto en toda la web, borra la Sección 1 
   y descomenta (quita los /*) de las líneas de abajo:
   
   h1 { color: var(--apordom-azul-oscuro) !important; }
   h2 { color: var(--apordom-rojo) !important; }
   h3 { color: var(--apordom-texto-oscuro) !important; }
   h4, h5, h6 { color: var(--apordom-azul-oscuro) !important; }
   -------------------------------------------------------------------------- */

/* 3. ENLACES GLOBALES (Textos dentro de la página) */
a, 
.elementor-text-editor a, 
.elementor-icon-box-title a {
    color: var(--apordom-rojo) !important; /* Color principal de tus enlaces */
    text-decoration: none !important;
    transition: color 0.3s ease-in-out, background-color 0.3s ease !important;
}

/* Efecto Hover global para los enlaces */
a:hover, 
.elementor-text-editor a:hover, 
.elementor-icon-box-title a:hover {
    color: var(--apordom-azul-oscuro) !important; /* Cambia a azul al pasar el mouse */
    text-decoration: none !important;
}

/* 4. EXCEPCIÓN 1: MENÚ PRINCIPAL Y MÓVIL EN BLANCO ESTRICTO */
/* Esto bloquea la regla anterior para que el menú siempre mantenga su color corporativo */
.nav-menu a,
.bottom-nav a {
    color: var(--apordom-blanco) !important;
}

.nav-menu a:hover,
.bottom-nav a:hover {
    color: var(--apordom-rojo) !important; /* Hover sutil para indicar interacción */
    background-color: transparent !important;
}

/* 5. EXCEPCIÓN 2: BOTONES */
/* Si un enlace es un botón, obligamos a que su texto sea blanco */
.elementor-button, .btn, .search-btn {
    color: var(--apordom-blanco) !important;
}
.elementor-button:hover, .btn:hover {
    color: var(--apordom-blanco) !important;
}
/* ==========================================================================
   ACORDEÓN DE CERTIFICACIONES (VERSIÓN MÓVIL CON SPAN HTML)
   ========================================================================== */

/* 1. ESCRITORIO: Ocultamos la flecha porque siempre está abierto */
@media (min-width: 1025px) {
    .footer-certificaciones h4.cert-title .arrow {
        display: none !important;
    }
}

/* 2. MÓVIL: Encendemos la flecha y aplicamos la lógica del acordeón */
@media (max-width: 1024px) {
    .footer-certificaciones h4.cert-title {
        display: flex !important;
        justify-content: center !important;
        align-items: center !important;
        gap: 8px !important;
        cursor: pointer !important;
        width: 100% !important;
        padding: 10px 0 !important;
        margin: 0 !important;
        user-select: none !important;
        -webkit-tap-highlight-color: transparent !important;
    }
}
    /* Aquí encendemos la flecha física del HTML para móviles */
    .footer-certificaciones h4.cert-title .arrow {
        display: inline-block !important; /* La hacemos visible */
        font-size: 16px !important;
        color: #6c757d !important; /* Gris institucional */
        transition: transform 0.3s ease !important;
    }

    /* Ocultar los sellos por defecto */
    .footer-certificaciones .cert-badges {
        display: none !important; 
        width: 100% !important;
        justify-content: center !important;
        gap: 15px !important;
        margin-top: 15px !important;
    }

    /* ESTADOS ACTIVOS (Al hacer clic) */
    .footer-certificaciones.abierto h4.cert-title .arrow {
        transform: rotate(180deg) !important;
    }

    .footer-certificaciones.abierto .cert-badges {
        display: flex !important;
        animation: fadeInCert 0.3s ease-in forwards !important;
    }

/* ==========================================================================
   PÁGINA ERROR 404
   ========================================================================== */

.apordom-page-404 {
    padding: 60px 15px 100px 15px;
    background-color: var(--apordom-gris-claro);
    text-align: center;
}

/* El Número 404 Gigante */
.error-hero-section {
    margin-bottom: 40px;
}
.error-code-giant {
    font-size: 10rem !important;
    font-weight: 800;
    color: var(--apordom-azul-oscuro) !important;
    line-height: 1;
    margin: 0;
    text-shadow: 4px 4px 0px rgba(0,0,0,0.05);
}

/* Botones Sociales 404 */
.apordom-social-share-404 {
    display: flex;
    justify-content: center;
    gap: 15px;
    margin-top: 20px;
}
.apordom-social-share-404 a {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 45px;
    height: 45px;
    border-radius: 50%;
    background-color: var(--apordom-blanco);
    color: var(--apordom-azul-oscuro) !important;
    font-size: 18px;
    box-shadow: 0 4px 10px rgba(0,0,0,0.05);
    transition: all 0.3s ease !important;
}
.apordom-social-share-404 a:hover {
    background-color: var(--apordom-rojo) !important;
    color: var(--apordom-blanco) !important;
    transform: translateY(-3px);
    box-shadow: 0 6px 15px rgba(209, 18, 24, 0.3);
}

/* Tarjeta de Información y Brújula */
.apordom-404-bottom-bar {
    background: var(--apordom-blanco);
    border: 1px solid var(--apordom-border);
    border-radius: 12px;
    padding: 40px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.05);
    max-width: 900px;
    margin: 0 auto;
    text-align: left;
}
.apordom-bar-container {
    display: flex;
    flex-wrap: wrap;
    gap: 30px;
    align-items: center;
}
.apordom-bar-icon {
    flex: 0 0 auto;
    font-size: 60px;
    color: var(--apordom-rojo);
    opacity: 0.8;
}

/* Textos e Instrucciones */
.apordom-bar-text {
    flex: 1 1 300px;
}
.apordom-bar-text h2 {
    font-size: 22px;
    margin-bottom: 10px;
}
.apordom-msg-main {
    font-size: 15px;
    color: var(--apordom-texto-oscuro);
    line-height: 1.6;
    margin-bottom: 20px;
}
.apordom-suggestions {
    background: var(--apordom-gris-claro);
    padding: 20px;
    border-radius: 8px;
    border-left: 4px solid var(--apordom-azul-oscuro);
}
.apordom-suggestions strong {
    color: var(--apordom-azul-oscuro);
    display: block;
    margin-bottom: 10px;
    font-size: 15px;
}
.apordom-suggestions ul {
    list-style: none;
    padding: 0;
    margin: 0 0 15px 0;
}
.apordom-suggestions li {
    font-size: 14px;
    margin-bottom: 8px;
    display: flex;
    align-items: flex-start;
    gap: 10px;
}
.apordom-suggestions li i {
    color: var(--apordom-rojo);
    margin-top: 4px;
}
.apordom-support-note {
    font-size: 12px;
    color: #666;
    font-style: italic;
}

/* Botones de Acción (Inicio / Soporte) */
.apordom-bar-actions {
    flex: 0 0 auto;
    display: flex;
    flex-direction: column;
    gap: 15px;
    min-width: 150px;
}
.apordom-btn-404 {
    display: flex !important;
    align-items: center;
    justify-content: center;
    gap: 10px;
    padding: 12px 20px;
    border-radius: 6px;
    font-weight: 600;
    font-size: 14px;
    text-transform: uppercase;
    transition: all 0.3s ease !important;
}
.apordom-btn-404.solid {
    background-color: var(--apordom-azul-oscuro) !important;
    color: var(--apordom-blanco) !important;
    border: 2px solid var(--apordom-azul-oscuro);
}
.apordom-btn-404.solid:hover {
    background-color: transparent !important;
    color: var(--apordom-azul-oscuro) !important;
}
.apordom-btn-404.ghost {
    background-color: transparent !important;
    color: var(--apordom-rojo) !important;
    border: 2px solid var(--apordom-rojo);
}
.apordom-btn-404.ghost:hover {
    background-color: var(--apordom-rojo) !important;
    color: var(--apordom-blanco) !important;
}

/* Responsive 404 */
@media (max-width: 768px) {
    .error-code-giant { font-size: 6rem !important; }
    .apordom-404-bottom-bar { padding: 25px; text-align: center; }
    .apordom-bar-container { flex-direction: column; text-align: center; gap: 20px; }
    .apordom-suggestions { text-align: left; }
    .apordom-bar-actions { width: 100%; flex-direction: row; flex-wrap: wrap; }
    .apordom-btn-404 { flex: 1; }
}
	/* ==========================================================================
   NOTICIAS (ESTILO TARJETAS BLANCAS CORPORATIVAS)
   ========================================================================== */

/* 1. Contenedor de la Cuadrícula */
.portuaria-grid-container {
    display: grid !important;
    grid-template-columns: repeat(3, 1fr) !important;
    gap: 30px !important;
    width: 100%;
}

/* 2. Diseño de la Tarjeta Blanca */
.portuaria-card {
    background-color: var(--apordom-blanco, #ffffff) !important;
    border-radius: 8px !important;
    overflow: hidden !important;
    box-shadow: 0 5px 20px rgba(0,0,0,0.05) !important;
    display: flex !important;
    flex-direction: column !important;
    /* La franja roja gruesa en la parte inferior */
    border-bottom: 4px solid var(--apordom-rojo) !important; 
    transition: transform 0.3s ease, box-shadow 0.3s ease !important;
}

.portuaria-card:hover {
    transform: translateY(-5px) !important;
    box-shadow: 0 10px 25px rgba(0,0,0,0.1) !important;
}

/* 3. Contenedor de la Imagen y Fecha Flotante */
.portuaria-img-wrap {
    position: relative !important;
    width: 100% !important;
    height: 220px !important; /* Altura uniforme para todas las fotos */
    overflow: hidden !important;
}

.portuaria-img-wrap img {
    width: 100% !important;
    height: 100% !important;
    object-fit: cover !important;
    display: block !important;
    transition: transform 0.5s ease !important;
}

.portuaria-card:hover .portuaria-img-wrap img {
    transform: scale(1.05) !important;
}

/* La etiqueta azul oscura de la fecha (Arriba a la izquierda) */
.portuaria-date {
    position: absolute !important;
    top: 15px !important;
    left: 15px !important;
    background-color: var(--apordom-azul-oscuro) !important;
    color: var(--apordom-blanco) !important;
    font-size: 11px !important;
    font-weight: 700 !important;
    text-transform: uppercase !important;
    padding: 6px 12px !important;
    border-radius: 4px !important;
    z-index: 2 !important;
}

/* 4. Contenedor del Texto (Título, Resumen y Botón) */
.portuaria-content {
    padding: 25px !important;
    display: flex !important;
    flex-direction: column !important;
    flex-grow: 1 !important; /* Permite que el botón se empuje hacia abajo */
}

/* Título de la noticia */
.portuaria-title {
    margin: 0 0 15px 0 !important;
    font-size: 16px !important;
    line-height: 1.5 !important;
}

.portuaria-title a {
    color: var(--apordom-azul-oscuro) !important;
    text-decoration: none !important;
    font-weight: 700 !important;
}

/* La pequeña línea roja separadora debajo del título */
.portuaria-title::after {
    content: "" !important;
    display: block !important;
    width: 30px !important;
    height: 3px !important;
    background-color: var(--apordom-rojo) !important;
    margin-top: 15px !important;
}

/* Resumen (Excerpt) gris */
.portuaria-excerpt {
    color: var(--apordom-texto-oscuro, #555) !important;
    font-size: 14px !important;
    line-height: 1.6 !important;
    margin-bottom: 20px !important;
    flex-grow: 1 !important; /* Empuja el botón "Leer más" al fondo */
    
    /* Limita el texto a exactamente 3 líneas */
    display: -webkit-box !important;
    -webkit-line-clamp: 3 !important;
    -webkit-box-orient: vertical !important;
    overflow: hidden !important;
}

/* 5. Enlace "LEER MÁS >" */
.portuaria-read-more {
    margin-top: auto !important;
}

.portuaria-read-more a {
    font-size: 12px !important;
    font-weight: 700 !important;
    color: var(--apordom-azul-oscuro) !important;
    text-transform: uppercase !important;
    text-decoration: none !important;
    letter-spacing: 1px !important;
    display: inline-flex !important;
    align-items: center !important;
}

/* La flechita roja generada por CSS */
.portuaria-read-more a::after {
    content: "›" !important;
    color: var(--apordom-rojo) !important;
    font-size: 18px !important;
    margin-left: 6px !important;
    line-height: 1 !important;
    transition: transform 0.3s ease !important;
}

.portuaria-read-more a:hover::after {
    transform: translateX(5px) !important; /* La flecha se mueve al pasar el mouse */
}

/* ==========================================================================
   RESPONSIVE (TABLETS Y MÓVILES)
   ========================================================================== */
@media (max-width: 992px) {
    .portuaria-grid-container {
        grid-template-columns: repeat(2, 1fr) !important;
    }
}

@media (max-width: 768px) {
    .portuaria-grid-container {
        grid-template-columns: 1fr !important;
    }
}