/* Estilos propios de Optipro (se cargan después del tema Salient). */

.opti-h1 {
    font-size: clamp(30px, 4vw, 46px);
    line-height: 1.15;
    margin: 0 0 1.2rem;
}

.opti-hero {
    margin: 0 0 2rem;
    text-align: center;
}

.opti-hero img {
    width: auto !important;
    max-width: 100%;
    max-height: 420px;
    height: auto !important;
    display: inline-block;
    border-radius: 14px;
}

.entradilla {
    font-size: 1.15rem;
    line-height: 1.6;
}

.botones {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
    margin: 1.4rem 0 0.6rem;
}

.boton {
    background: #ce0e2d;
    color: #fff !important;
    padding: 11px 18px;
    border-radius: 8px;
    font-weight: 600;
    font-size: 15px;
    text-decoration: none !important;
    display: inline-block;
}

.boton:hover {
    background: #a80b25;
}

.galeria {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 16px;
    margin: 2rem 0;
}

.galeria figure {
    margin: 0;
}

.galeria img {
    width: 100%;
    height: auto;
    display: block;
    border-radius: 10px;
}

.galeria figcaption {
    font-size: 0.85rem;
    color: #666;
    margin-top: 6px;
}

/* --- Portada --- */
.opti-home {
    --rojo: #ce0e2d;
}

.opti-home .hero {
    background: #141414;
    color: #fff;
    border-radius: 16px;
    padding: 42px;
    display: grid;
    grid-template-columns: minmax(0, 1.05fr) minmax(0, .95fr);
    gap: 34px;
    align-items: center;
    margin-bottom: 36px;
}

.opti-home .hero h1 {
    color: #fff;
    font-size: clamp(28px, 3.6vw, 44px);
    line-height: 1.12;
    margin: 10px 0 0;
}

.opti-home .kicker {
    color: var(--rojo);
    text-transform: uppercase;
    letter-spacing: 1.4px;
    font-weight: 700;
    font-size: 12.5px;
}

.opti-home .hero p {
    color: #c7c7c7;
    font-size: 17px;
}

.opti-home .hero figure {
    margin: 0;
}

.opti-home .hero img {
    width: 100%;
    height: auto;
    max-height: 380px;
    object-fit: cover;
    border-radius: 14px;
}

.opti-home .seccion {
    padding: 34px 0;
    border-bottom: 1px solid #eee;
}

.opti-home .seccion:last-child {
    border-bottom: 0;
}

.opti-home h2 {
    font-size: clamp(24px, 2.6vw, 32px);
    margin: 0 0 8px;
}

.opti-home .sub {
    color: #6b6b6b;
    margin: 0 0 24px;
    max-width: 70ch;
}

.opti-home .grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 20px;
}

.opti-home .card {
    border: 1px solid #e3e3df;
    border-radius: 12px;
    overflow: hidden;
    background: #fff;
    text-decoration: none;
    color: inherit;
    display: flex;
    flex-direction: column;
}

.opti-home .card img {
    width: 100%;
    height: 160px;
    object-fit: cover;
    display: block;
}

.opti-home .card .cuerpo {
    padding: 16px 18px 20px;
}

.opti-home .card h3 {
    margin: 0 0 6px;
    font-size: 18px;
}

.opti-home .card p {
    margin: 0;
    color: #6b6b6b;
    font-size: 14.5px;
}

.opti-home .mas {
    color: var(--rojo);
    font-weight: 600;
    margin-top: 10px;
    font-size: 14px;
}

.opti-home .pasos {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 22px;
}

.opti-home .paso {
    border-top: 3px solid var(--rojo);
    padding-top: 12px;
}

.opti-home .paso .num {
    color: var(--rojo);
    font-weight: 800;
    font-size: 12.5px;
    letter-spacing: 1px;
}

.opti-home .paso h3 {
    margin: 6px 0;
    font-size: 17px;
}

.opti-home .paso p {
    margin: 0;
    color: #6b6b6b;
    font-size: 14.5px;
}

.opti-home .kpis {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(170px, 1fr));
    gap: 16px;
    margin: 20px 0;
}

.opti-home .kpi {
    background: #141414;
    color: #fff;
    border-radius: 12px;
    padding: 20px;
}

.opti-home .kpi strong {
    display: block;
    font-size: 32px;
    color: #fff;
}

.opti-home .kpi span {
    color: #bdbdbd;
    font-size: 13px;
}

.opti-home .cta {
    background: #141414;
    color: #fff;
    border-radius: 14px;
    padding: 26px 28px;
}

.opti-home .cta h2 {
    color: #fff;
}

.opti-home .cta p {
    color: #c9c9c9;
}

.opti-home .enlace-flecha {
    color: var(--rojo);
    font-weight: 600;
    text-decoration: none;
}

.opti-home .boton.secundario {
    background: transparent;
    border: 1px solid #4a4a4a;
    color: #fff !important;
}

@media (max-width: 820px) {
    .opti-home .hero {
        grid-template-columns: 1fr;
        padding: 26px;
    }
}

/* --- Menú principal --- */
#header-outer .opti-contacto-btn {
    margin-left: 18px;
}

#header-outer .opti-contacto-btn > a {
    background: #ce0e2d;
    color: #fff !important;
    padding: 9px 18px !important;
    border-radius: 8px;
    line-height: 1.2 !important;
}

#header-outer .opti-contacto-btn > a:hover {
    background: #a80b25;
}

#header-outer .opti-contacto-btn > a span {
    color: #fff;
}

.home #header-outer .opti-inicio > a,
.home #header-outer .opti-inicio > a span {
    color: #ce0e2d;
}

@media (min-width: 1000px) {
    #header-outer .container {
        max-width: 100% !important;
        width: 100% !important;
        padding-left: 32px !important;
        padding-right: 32px !important;
    }

    #header-outer #logo img {
        max-width: 140px !important;
        height: auto !important;
    }

    #header-outer nav > ul.sf-menu > li {
        margin-left: 0 !important;
    }

    #header-outer nav > ul.sf-menu > li > a {
        font-size: 11.5px !important;
        padding-left: 4px !important;
        padding-right: 4px !important;
        white-space: nowrap;
    }

    #header-outer nav > ul.sf-menu > li > a .menu-title-text {
        white-space: nowrap;
    }

    #header-outer .opti-contacto-btn {
        margin-left: 6px !important;
    }

    #header-outer .opti-contacto-btn > a {
        padding: 7px 9px !important;
        font-size: 11.5px !important;
    }
}

@media (min-width: 1400px) {
    #header-outer #logo img {
        max-width: 165px !important;
    }

    #header-outer nav > ul.sf-menu > li > a {
        font-size: 13px !important;
        padding-left: 8px !important;
        padding-right: 8px !important;
    }

    #header-outer .opti-contacto-btn > a {
        font-size: 13px !important;
        padding: 8px 14px !important;
    }
}

/* Cabecera oscura con logo claro */
@media (min-width: 1000px) {
    #header-outer,
    #header-outer .container,
    #header-outer .row,
    #header-outer .col {
        background-color: #141414 !important;
    }

    #header-outer #logo img {
        content: url('/wp-content/themes/optipro3/optipro-blanco.svg');
    }

    #header-outer nav > ul.sf-menu > li > a {
        color: #cfcfcf !important;
    }

    #header-outer nav > ul.sf-menu > li > a:hover,
    #header-outer nav > ul.sf-menu > li.current-menu-item > a {
        color: #ffffff !important;
    }

    #header-outer nav > ul.sf-menu > li > a .menu-title-text {
        color: inherit !important;
    }

    .home #header-outer .opti-inicio > a,
    .home #header-outer .opti-inicio > a span {
        color: #ffffff !important;
    }
}
