/* ==========================================================
   CAPITÁN MARÍTIMO
   DISEÑO DEFINITIVO
   ========================================================== */

:root {
    --cm-navy: #071d2b;
    --cm-blue: #0d3b57;
    --cm-ocean: #176b87;
    --cm-light: #f4f7f8;
    --cm-border: #dce5e9;
    --cm-text: #17232b;
    --cm-muted: #71808a;
}

* {
    box-sizing: border-box;
}

/* ==========================================================
   CABECERA
   ========================================================== */

.site-header {
    background: #176f9d !important;
    box-shadow: 0 1px 0 rgba(0,0,0,.08);
}

.site-header-content {
    max-width: 1040px !important;
    min-height: 64px;
    margin: 0 auto !important;
    padding: 7px 18px !important;

    display: flex !important;
    align-items: center !important;
    justify-content: space-between !important;
}

.site-header .custom-logo {
    display: block;
    width: auto !important;
    max-width: 122px !important;
    max-height: 50px !important;
    object-fit: contain;
}

.site-header nav ul,
.site-header .menu {
    margin: 0 !important;
    padding: 0 !important;
}

.site-header nav li,
.site-header .menu li {
    list-style: none !important;
}

.site-header nav a,
.site-header .menu a {
    font-weight: 500;
    text-decoration: none;
    transition: opacity .2s ease;
}

.site-header nav a:hover,
.site-header .menu a:hover {
    opacity: .72;
}


/* ==========================================================
   PORTADA
   ========================================================== */

body.home .cm-home {
    width: 100% !important;
    margin: 0 !important;
    padding: 0 !important;
    background: #fff !important;
}

body.home .cm-container {
    width: calc(100% - 40px) !important;
    max-width: 1180px !important;
    margin: 0 auto !important;
    padding: 40px 0 55px !important;
}


/* INTRO */

body.home .cm-intro {
    margin: 0 0 25px !important;
}

body.home .cm-eyebrow {
    display: block;
    margin-bottom: 6px;

    color: var(--cm-ocean);
    font-size: 11px;
    font-weight: 800;
    letter-spacing: .13em;
    text-transform: uppercase;
}

body.home .cm-intro h1 {
    margin: 0 0 7px !important;

    color: var(--cm-navy);
    font-size: clamp(36px,4vw,50px) !important;
    line-height: 1.05 !important;
    font-weight: 800;
    letter-spacing: -.035em;
}

body.home .cm-intro p {
    margin: 0 !important;

    color: var(--cm-muted);
    font-size: 16px;
    line-height: 1.5;
}


/* ==========================================================
   HERO
   ========================================================== */

body.home .cm-hero {
    display: grid !important;
    grid-template-columns: minmax(0, 1.65fr) minmax(340px, .85fr) !important;
    gap: 18px !important;

    width: 100% !important;
    margin: 0 0 44px !important;
}

body.home .cm-hero-main {
    min-width: 0 !important;
}

body.home .cm-hero-side {
    display: grid !important;
    grid-template-columns: repeat(2,minmax(0,1fr)) !important;
    gap: 14px !important;

    min-width: 0 !important;
}


/* ==========================================================
   TARJETAS
   ========================================================== */

body.home .cm-card {
    position: relative !important;

    width: 100% !important;
    margin: 0 !important;
    padding: 0 !important;

    overflow: hidden !important;

    background: #fff !important;
    border: 1px solid var(--cm-border) !important;
    border-radius: 7px !important;

    box-shadow: 0 2px 8px rgba(7,29,43,.045) !important;
}

body.home .cm-card-link {
    display: block !important;
    width: 100% !important;

    color: inherit !important;
    text-decoration: none !important;
}

body.home .cm-card-image {
    width: 100% !important;
    margin: 0 !important;
    padding: 0 !important;

    overflow: hidden !important;
    background: #e9eff2;
}

body.home .cm-card-image img {
    display: block !important;

    width: 100% !important;
    max-width: 100% !important;
    height: 100% !important;

    margin: 0 !important;

    object-fit: cover !important;

    transition: transform .3s ease;
}

body.home .cm-card:hover .cm-card-image img {
    transform: scale(1.025);
}

body.home .cm-card-body {
    display: block !important;
}

body.home .cm-card h2 {
    color: var(--cm-text) !important;
}

body.home .cm-card:hover h2 {
    color: var(--cm-ocean) !important;
}


/* PRINCIPAL */

body.home .cm-lead .cm-card-image {
    height: 390px !important;
}

body.home .cm-lead .cm-card-body {
    padding: 18px 20px 20px !important;
}

body.home .cm-lead h2 {
    margin: 6px 0 7px !important;

    font-size: 26px !important;
    line-height: 1.15 !important;
    font-weight: 750 !important;
    letter-spacing: -.025em;
}

body.home .cm-lead p {
    margin: 0 0 7px !important;

    color: #64737c;
    font-size: 14px;
    line-height: 1.45;
}


/* SECUNDARIAS */

body.home .cm-secondary .cm-card-image {
    height: 125px !important;
}

body.home .cm-secondary .cm-card-body {
    padding: 10px 11px 12px !important;
}

body.home .cm-secondary h2 {
    margin: 4px 0 !important;

    font-size: 14px !important;
    line-height: 1.23 !important;
    font-weight: 700 !important;
}


/* METADATOS */

body.home .cm-category {
    display: inline-block;

    color: var(--cm-ocean) !important;

    font-size: 10px !important;
    line-height: 1.2;
    font-weight: 800;
    letter-spacing: .055em;
    text-transform: uppercase;
}

body.home .cm-date {
    display: block;

    margin-top: 5px;

    color: #849198 !important;

    font-size: 11px !important;
}


/* ==========================================================
   SECCIONES
   ========================================================== */

body.home .cm-section {
    width: 100% !important;
    margin: 0 0 42px !important;
}

body.home .cm-section-heading {
    display: flex !important;
    align-items: center !important;
    justify-content: space-between !important;

    margin: 0 0 17px !important;
    padding: 0 0 9px !important;

    border-bottom: 1px solid var(--cm-border) !important;
}

body.home .cm-section-heading h2 {
    position: relative;

    margin: 0 !important;

    color: var(--cm-navy) !important;

    font-size: 22px !important;
    line-height: 1.2 !important;
    font-weight: 800;
    letter-spacing: -.025em;
}

body.home .cm-section-heading h2::after {
    content: "";

    position: absolute;
    left: 0;
    bottom: -11px;

    width: 42px;
    height: 3px;

    background: var(--cm-ocean);
}

body.home .cm-section-heading span {
    color: #89969d;
    font-size: 12px;
}


/* ==========================================================
   ÚLTIMAS NOTICIAS
   ========================================================== */

body.home .cm-latest-grid {
    display: grid !important;
    grid-template-columns: repeat(2,minmax(0,1fr)) !important;

    gap: 0 30px !important;

    width: 100% !important;
}

body.home .cm-latest-card {
    width: 100% !important;

    margin: 0 !important;
    padding: 14px 0 !important;

    border-bottom: 1px solid #e5eaed !important;
}

body.home .cm-latest-card > a {
    display: block !important;

    color: inherit !important;
    text-decoration: none !important;
}

body.home .cm-latest-card img {
    display: none !important;
}

body.home .cm-latest-card h3 {
    margin: 4px 0 !important;

    color: var(--cm-text) !important;

    font-size: 17px !important;
    line-height: 1.28 !important;
    font-weight: 700 !important;
    letter-spacing: -.015em;
}

body.home .cm-latest-card:hover h3 {
    color: var(--cm-ocean) !important;
}


/* ==========================================================
   ACTUALIDAD POR SECTORES
   ========================================================== */

body.home .cm-sector-grid {
    display: grid !important;
    grid-template-columns: repeat(2,minmax(0,1fr)) !important;

    gap: 18px !important;

    width: 100% !important;
}

body.home .cm-sector {
    width: 100% !important;
    margin: 0 !important;
    padding: 17px !important;

    background: #f7f9fa !important;

    border: 1px solid var(--cm-border) !important;
    border-radius: 7px !important;
}

body.home .cm-sector-title {
    margin: 0 0 12px !important;
    padding-bottom: 8px;

    border-bottom: 1px solid #dce5e9;
}

body.home .cm-sector-title h3 {
    margin: 0 !important;

    color: var(--cm-navy) !important;

    font-size: 18px !important;
    line-height: 1.2 !important;
    font-weight: 800 !important;
}

body.home .cm-sector-title a {
    color: inherit !important;
    text-decoration: none !important;
}

body.home .cm-sector-main {
    display: grid !important;
    grid-template-columns: 145px minmax(0,1fr) !important;

    gap: 13px !important;

    align-items: center !important;

    margin-bottom: 10px !important;

    color: inherit !important;
    text-decoration: none !important;
}

body.home .cm-sector-main img {
    display: block !important;

    width: 145px !important;
    height: 90px !important;

    object-fit: cover !important;

    border-radius: 4px !important;
}

body.home .cm-sector-main h4 {
    margin: 0 !important;

    color: var(--cm-text) !important;

    font-size: 15px !important;
    line-height: 1.25 !important;
    font-weight: 700 !important;
}

body.home .cm-sector-main:hover h4 {
    color: var(--cm-ocean) !important;
}

body.home .cm-sector-links {
    margin: 0 !important;
    padding: 0 !important;
}

body.home .cm-sector-links a {
    position: relative;

    display: block !important;

    padding: 7px 0 7px 13px !important;

    color: #344650 !important;

    border-top: 1px solid #e3e8eb;

    font-size: 13px !important;
    line-height: 1.3 !important;

    text-decoration: none !important;
}

body.home .cm-sector-links a::before {
    content: "";

    position: absolute;
    left: 0;
    top: 14px;

    width: 4px;
    height: 4px;

    border-radius: 50%;

    background: var(--cm-ocean);
}

body.home .cm-sector-links a:hover {
    color: var(--cm-ocean) !important;
}


/* ==========================================================
   MÁS ACTUALIDAD
   ========================================================== */

body.home .cm-more-grid {
    display: grid !important;

    grid-template-columns: repeat(4,minmax(0,1fr)) !important;

    gap: 16px !important;

    width: 100% !important;
}

body.home .cm-more-grid .cm-card-image {
    height: 140px !important;
}

body.home .cm-more-grid .cm-card-body {
    padding: 12px !important;
}

body.home .cm-more-grid .cm-card h2 {
    margin: 4px 0 !important;

    font-size: 15px !important;
    line-height: 1.27 !important;
    font-weight: 700 !important;
}


/* ==========================================================
   FOOTER
   ========================================================== */

footer {
    margin-top: 30px !important;
}

footer .content-footer {
    max-width: 1040px !important;
    margin: 0 auto !important;
}

footer .custom-logo {
    width: auto !important;
    max-width: 125px !important;
    height: auto !important;
}

footer a {
    transition: opacity .2s ease;
}

footer a:hover {
    opacity: .72;
}


/* ==========================================================
   TABLET
   ========================================================== */

@media (max-width: 950px) {

    body.home .cm-container {
        width: calc(100% - 32px) !important;
    }

    body.home .cm-hero {
        grid-template-columns: 1.35fr .85fr !important;
    }

    body.home .cm-hero-side {
        grid-template-columns: 1fr !important;
    }

    body.home .cm-secondary .cm-card-image {
        height: 115px !important;
    }

    body.home .cm-more-grid {
        grid-template-columns: repeat(2,minmax(0,1fr)) !important;
    }
}


/* ==========================================================
   MÓVIL
   ========================================================== */

@media (max-width: 700px) {

    body.home .cm-container {
        width: calc(100% - 26px) !important;
        padding: 26px 0 40px !important;
    }

    body.home .cm-intro h1 {
        font-size: 34px !important;
    }

    body.home .cm-intro p {
        font-size: 15px !important;
    }

    body.home .cm-hero {
        display: block !important;
    }

    body.home .cm-hero-main {
        margin-bottom: 13px !important;
    }

    body.home .cm-hero-side {
        display: grid !important;
        grid-template-columns: repeat(2,minmax(0,1fr)) !important;
        gap: 10px !important;
    }

    body.home .cm-lead .cm-card-image {
        height: 255px !important;
    }

    body.home .cm-lead h2 {
        font-size: 21px !important;
    }

    body.home .cm-secondary .cm-card-image {
        height: 105px !important;
    }

    body.home .cm-secondary h2 {
        font-size: 13px !important;
    }

    body.home .cm-latest-grid,
    body.home .cm-sector-grid {
        grid-template-columns: 1fr !important;
    }

    body.home .cm-sector-main {
        grid-template-columns: 120px minmax(0,1fr) !important;
    }

    body.home .cm-sector-main img {
        width: 120px !important;
        height: 78px !important;
    }

    body.home .cm-more-grid {
        grid-template-columns: repeat(2,minmax(0,1fr)) !important;
        gap: 10px !important;
    }

    body.home .cm-more-grid .cm-card-image {
        height: 105px !important;
    }

    body.home .cm-section-heading span {
        display: none;
    }
}

@media (max-width: 430px) {

    body.home .cm-hero-side {
        grid-template-columns: 1fr !important;
    }

    body.home .cm-secondary {
        display: grid !important;
        grid-template-columns: 125px minmax(0,1fr) !important;
    }

    body.home .cm-secondary .cm-card-link {
        display: contents !important;
    }

    body.home .cm-secondary .cm-card-image {
        height: 100% !important;
        min-height: 105px;
    }

    body.home .cm-more-grid {
        grid-template-columns: 1fr !important;
    }
}



/* ==========================================================
   FIX DEFINITIVO DE ANCHO — PORTADA CAPITÁN MARÍTIMO
   ========================================================== */

/*
 * La portada personalizada no utiliza los contenedores de ASAP.
 * Le damos su propio ancho editorial.
 */

body.home .cm-home {
    display: block !important;
    width: 100% !important;
    max-width: none !important;

    margin: 0 !important;
    padding: 0 !important;

    box-sizing: border-box !important;

    background: #fff;
}

body.home .cm-home > .cm-container {
    display: block !important;

    width: calc(100% - 48px) !important;
    max-width: 1180px !important;

    margin-left: auto !important;
    margin-right: auto !important;

    padding: 34px 0 54px !important;

    box-sizing: border-box !important;
}


/* ---------- INTRO ---------- */

body.home .cm-intro {
    width: 100% !important;
    max-width: 760px !important;

    margin: 0 0 28px !important;
    padding: 0 !important;
}


/* ---------- HERO ---------- */

body.home .cm-hero {
    display: grid !important;

    grid-template-columns:
        minmax(0, 1.62fr)
        minmax(300px, .88fr) !important;

    gap: 20px !important;

    width: 100% !important;
    max-width: 100% !important;

    margin: 0 !important;
    padding: 0 !important;

    align-items: stretch !important;
}

body.home .cm-hero-main,
body.home .cm-hero-side {
    width: 100% !important;
    max-width: 100% !important;
    min-width: 0 !important;

    margin: 0 !important;
    padding: 0 !important;
}


/* Principal */

body.home .cm-lead {
    width: 100% !important;
    max-width: 100% !important;
}

body.home .cm-lead .cm-card-image {
    width: 100% !important;
    height: 360px !important;

    overflow: hidden !important;
}

body.home .cm-lead .cm-card-image img {
    width: 100% !important;
    height: 100% !important;

    object-fit: cover !important;
}


/* Secundarias */

body.home .cm-hero-side {
    display: grid !important;

    grid-template-columns: repeat(2, minmax(0, 1fr)) !important;

    gap: 12px !important;

    align-content: stretch !important;
}

body.home .cm-secondary {
    width: 100% !important;
    max-width: 100% !important;
    min-width: 0 !important;
}

body.home .cm-secondary .cm-card-image {
    width: 100% !important;
    height: 120px !important;

    overflow: hidden !important;
}

body.home .cm-secondary .cm-card-image img {
    width: 100% !important;
    height: 100% !important;

    object-fit: cover !important;
}


/* ---------- RESTO DE PORTADA ---------- */

body.home .cm-section,
body.home .cm-latest-section,
body.home .cm-sectors,
body.home .cm-more-section {
    width: 100% !important;
    max-width: 100% !important;

    margin-left: 0 !important;
    margin-right: 0 !important;
}

body.home .cm-latest-grid,
body.home .cm-sector-grid,
body.home .cm-more-grid {
    width: 100% !important;
    max-width: 100% !important;
}


/* ==========================================================
   TABLET
   ========================================================== */

@media (max-width: 950px) {

    body.home .cm-home > .cm-container {
        width: calc(100% - 32px) !important;
        max-width: 100% !important;

        padding-top: 28px !important;
    }

    body.home .cm-hero {
        grid-template-columns:
            minmax(0, 1.35fr)
            minmax(260px, .85fr) !important;

        gap: 16px !important;
    }

    body.home .cm-hero-side {
        grid-template-columns: 1fr !important;
    }

    body.home .cm-lead .cm-card-image {
        height: 330px !important;
    }

    body.home .cm-secondary .cm-card-image {
        height: 125px !important;
    }
}


/* ==========================================================
   MÓVIL
   ========================================================== */

@media (max-width: 700px) {

    body.home .cm-home > .cm-container {
        width: calc(100% - 26px) !important;

        padding-top: 24px !important;
        padding-bottom: 38px !important;
    }

    body.home .cm-hero {
        display: block !important;
    }

    body.home .cm-hero-main {
        margin-bottom: 14px !important;
    }

    body.home .cm-lead .cm-card-image {
        height: 245px !important;
    }

    body.home .cm-hero-side {
        display: grid !important;

        grid-template-columns:
            repeat(2, minmax(0, 1fr)) !important;

        gap: 10px !important;
    }

    body.home .cm-secondary .cm-card-image {
        height: 105px !important;
    }
}


/* ==========================================================
   MÓVIL PEQUEÑO
   ========================================================== */

@media (max-width: 430px) {

    body.home .cm-hero-side {
        grid-template-columns: 1fr !important;
    }

    body.home .cm-secondary {
        display: block !important;
    }

    body.home .cm-secondary .cm-card-link {
        display: grid !important;

        grid-template-columns:
            125px minmax(0, 1fr) !important;
    }

    body.home .cm-secondary .cm-card-image {
        height: 110px !important;
    }
}

