/*
 * Rediseño del sitio público SIC-UES.
 * Se aplica encima del tema base (Vega, plantilla WordPress convertida) para
 * sustituir su apariencia genérica por una identidad propia de la
 * Secretaría de Investigaciones Científicas: tipografía serif+sans,
 * paleta de rojo institucional/tinta/marfil, y tratamiento editorial en
 * vez de fotografías de stock. Se carga después de custom.css en ambos
 * layouts (default.htm y clean.htm) para poder sobreescribir sin abusar
 * de !important.
 */

:root {
    --sic-rojo: #7a1620;
    --sic-rojo-oscuro: #4a0d15;
    --sic-rojo-claro: #f8ecec;
    --sic-tinta: #201d1a;
    --sic-gris: #5b574f;
    --sic-gris-suave: #8a857a;
    --sic-gris-claro: #f6f4ef;
    --sic-borde: #e5e0d4;
    --sic-oro: #a9822f;
    --sic-serif: "Source Serif 4", Georgia, "Times New Roman", serif;
    --sic-sans: "Lato", -apple-system, BlinkMacSystemFont, "Segoe UI", Helvetica, Arial, sans-serif;
}

body {
    font-family: var(--sic-sans);
    color: var(--sic-tinta);
}

a {
    color: var(--sic-rojo);
}

a:hover,
a:focus {
    color: var(--sic-rojo-oscuro);
}

/* ===== Barra superior de contacto ===== */

.header {
    background: var(--sic-tinta);
    padding: 7px 0;
    border-bottom: 3px solid var(--sic-rojo);
}

.header .top-menu {
    margin: 0;
    padding: 0;
    list-style: none;
}

.header .top-menu li {
    display: inline-block;
}

.header-left .menu-item span,
.header-left .menu-item a {
    color: #cfc9bd !important;
    font-family: var(--sic-sans);
    font-size: 11.5px !important;
    letter-spacing: .02em;
}

.header-left .menu-item i {
    color: var(--sic-oro);
    margin-right: 5px;
}

.header-right {
    text-align: right;
}

.header-right .social-menu li {
    margin-left: 14px;
}

.header-right .social-menu a {
    color: #cfc9bd;
    font-size: 11px;
    font-weight: 700;
    letter-spacing: .08em;
    text-transform: uppercase;
}

.header-right .social-menu a:hover {
    color: #fff;
}

/* Redes que el administrador puede activar desde "Administrar sitio web" y
   que el tema original no traía: mismos íconos, según el dominio del enlace */
.social-menu a[href*="tiktok.com"]:before {
    content: "001";
}

.social-menu a[href*="://x.com"]:before,
.social-menu a[href*="://www.x.com"]:before {
    content: "099";
}

.social-menu a[href*="youtu.be"]:before {
    content: "16a";
}

.social-menu a[href*="fb.com"]:before,
.social-menu a[href*="fb.me"]:before {
    content: "09a";
}

.header-toggle {
    background: var(--sic-tinta);
    color: #cfc9bd;
}

/* ===== Navegación principal ===== */

.navbar-custom {
    background: #fff;
    border: none;
    border-bottom: 1px solid var(--sic-borde);
    box-shadow: 0 2px 10px rgba(32, 29, 26, .05);
    min-height: 92px;
}

.navbar-custom .navbar-header {
    display: flex;
    align-items: center;
    min-height: 92px;
}

.sic-marca {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 14px 0;
    text-decoration: none !important;
}

.sic-marca img {
    height: 58px;
    width: auto;
}

.sic-marca-texto {
    display: flex;
    flex-direction: column;
    line-height: 1.15;
}

.sic-marca-texto strong {
    font-family: var(--sic-serif);
    font-size: 19px;
    color: var(--sic-tinta);
    font-weight: 700;
}

.sic-marca-texto span {
    font-size: 11px;
    letter-spacing: .08em;
    text-transform: uppercase;
    color: var(--sic-rojo);
    font-weight: 700;
}

.navbar-custom .menu-header {
    display: flex;
    align-items: center;
}

.navbar-custom .menu-header > li > a {
    font-family: var(--sic-sans);
    font-size: 12.5px;
    font-weight: 700;
    letter-spacing: .06em;
    text-transform: uppercase;
    color: var(--sic-tinta) !important;
    padding: 12px 16px !important;
    position: relative;
    background: transparent !important;
}

.navbar-custom .menu-header > li > a::after {
    content: "";
    position: absolute;
    left: 16px;
    right: 16px;
    bottom: 8px;
    height: 2px;
    background: var(--sic-rojo);
    transform: scaleX(0);
    transform-origin: left;
    transition: transform .18s ease;
}

.navbar-custom .menu-header > li > a:hover::after,
.navbar-custom .menu-header > li.active > a::after {
    transform: scaleX(1);
}

.navbar-custom .menu-header > li > a:hover,
.navbar-custom .menu-header > li.active > a {
    color: var(--sic-rojo) !important;
}

.navbar-toggle {
    border-color: var(--sic-borde);
}

.navbar-toggle .fa-bars {
    color: var(--sic-rojo);
}

/* ===== Botones ===== */

.btn-primary-custom,
.btn-inverse {
    font-family: var(--sic-sans);
    font-weight: 700;
    font-size: 12px;
    letter-spacing: .06em;
    text-transform: uppercase;
    border-radius: 2px;
    padding: 11px 26px;
    border: 1px solid var(--sic-rojo);
    transition: all .15s ease;
}

.btn-primary-custom {
    background: var(--sic-rojo);
    color: #fff !important;
}

.btn-primary-custom:hover {
    background: var(--sic-rojo-oscuro);
    border-color: var(--sic-rojo-oscuro);
    color: #fff !important;
}

.btn-inverse {
    background: transparent;
    color: var(--sic-rojo) !important;
}

.btn-inverse:hover {
    background: var(--sic-rojo);
    color: #fff !important;
}

/* ===== Encabezados de sección compartidos ===== */

.block-title {
    font-family: var(--sic-serif);
    font-weight: 700;
    color: var(--sic-tinta);
    position: relative;
    padding-bottom: 18px;
    margin-bottom: 40px !important;
}

.block-title::after {
    content: "";
    position: absolute;
    left: 50%;
    bottom: 0;
    transform: translateX(-50%);
    width: 56px;
    height: 3px;
    background: var(--sic-rojo);
}

.text-center .block-title::after,
#welcome .block-title::after,
#4cols .block-title::after,
#latest .block-title::after {
    left: 50%;
}

/* ===== Hero de inicio (sustituye la foto de stock con parallax) ===== */

.sic-hero {
    position: relative;
    background: var(--sic-tinta);
    background-image:
        linear-gradient(135deg, rgba(122, 22, 32, .94), rgba(32, 29, 26, .97)),
        repeating-linear-gradient(45deg, rgba(255, 255, 255, .035) 0, rgba(255, 255, 255, .035) 1px, transparent 1px, transparent 26px);
    padding: 100px 20px 88px;
    text-align: center;
    overflow: hidden;
    border-bottom: 4px solid var(--sic-oro);
}

.sic-hero::before {
    content: "";
    position: absolute;
    inset: 0;
    background: radial-gradient(ellipse at top, rgba(255, 255, 255, .06), transparent 60%);
    pointer-events: none;
}

.sic-hero .sic-hero-escudo {
    height: 92px;
    width: auto;
    margin-bottom: 26px;
    filter: drop-shadow(0 4px 10px rgba(0, 0, 0, .35));
}

.sic-hero .sic-hero-kicker {
    display: inline-block;
    font-family: var(--sic-sans);
    font-size: 12px;
    font-weight: 700;
    letter-spacing: .18em;
    text-transform: uppercase;
    color: var(--sic-oro);
    margin-bottom: 18px;
}

.sic-hero h1 {
    font-family: var(--sic-serif);
    font-size: 42px;
    font-weight: 700;
    color: #fff;
    margin: 0 auto 18px;
    max-width: 760px;
    line-height: 1.25;
}

.sic-hero .description {
    max-width: 620px;
    margin: 0 auto;
    color: #e7ded9;
    font-size: 17px;
    font-style: italic;
    font-family: var(--sic-serif);
}

.sic-hero .description p {
    margin: 0;
}

/* ===== Bienvenida / misión ===== */

#welcome {
    padding: 76px 0;
}

#welcome .description {
    max-width: 900px;
    margin: 0 auto;
    text-align: center;
    position: relative;
    padding: 0 20px;
}

#welcome .description p:first-of-type {
    font-family: var(--sic-serif);
    font-size: 22px;
    line-height: 1.65;
    color: var(--sic-tinta);
    font-style: italic;
}

#welcome .description p:first-of-type::before {
    content: "\201C";
    display: block;
    font-family: var(--sic-serif);
    font-size: 64px;
    line-height: 1;
    color: var(--sic-rojo);
    margin-bottom: 6px;
}

#welcome .btn-margin-top {
    margin-top: 26px;
}

/* ===== Áreas / líneas prioritarias ===== */

#4cols {
    background: var(--sic-gris-claro);
    padding: 76px 0;
}

#4cols .description {
    max-width: 760px;
    margin: 0 auto 20px;
    color: var(--sic-gris);
}

#4cols .cols {
    display: flex;
    flex-wrap: wrap;
    gap: 28px;
    justify-content: center;
}

#4cols .content-icon {
    background: #fff;
    border: 1px solid var(--sic-borde);
    border-radius: 3px;
    padding: 30px 26px 26px;
    height: 100%;
    display: flex;
    flex-direction: column;
    box-shadow: 0 1px 3px rgba(32, 29, 26, .04);
}

#4cols .content-icon .icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 46px;
    height: 46px;
    border-radius: 50%;
    background: var(--sic-rojo-claro);
    margin-bottom: 16px;
}

#4cols .content-icon .icon i {
    color: var(--sic-rojo);
    font-size: 19px;
}

#4cols .content-icon .title a {
    font-family: var(--sic-serif);
    font-size: 18px;
    color: var(--sic-tinta);
}

#4cols .content-icon .body {
    flex: 1;
    margin: 10px 0 16px;
}

.sic-lista-simple {
    list-style: none;
    margin: 0;
    padding: 0;
}

.sic-lista-simple li {
    padding: 7px 0 7px 20px;
    border-bottom: 1px dashed var(--sic-borde);
    position: relative;
    font-size: 14px;
    color: var(--sic-tinta);
}

.sic-lista-simple li:last-child {
    border-bottom: none;
}

.sic-lista-simple li::before {
    content: "";
    position: absolute;
    left: 0;
    top: 15px;
    width: 7px;
    height: 7px;
    background: var(--sic-rojo);
}

.sic-lista-vacia {
    color: var(--sic-gris-suave);
    font-style: italic;
    font-size: 13.5px;
    padding: 6px 0;
}

.sic-lista-ver-todas {
    display: block;
    margin-top: 10px;
    font-size: 12.5px;
    font-weight: 700;
    letter-spacing: .04em;
    text-transform: uppercase;
    color: var(--sic-rojo);
}

#4cols .foot {
    margin-top: auto;
    padding-top: 6px;
}

/* ===== Sección "Investigación" (antes "posts" con fotos de stock) ===== */

#latest {
    padding: 76px 0;
}

#latest .recent-entry {
    border: 1px solid var(--sic-borde);
    border-top: 3px solid var(--sic-rojo);
    background: #fff;
    height: 100%;
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

#latest .recent-entry-image {
    margin: 0 0 20px;
    overflow: hidden;
    height: 190px;
    border-bottom: 1px solid var(--sic-borde);
}

#latest .recent-entry-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    filter: grayscale(45%) contrast(1.02);
    transition: filter .3s ease, transform .4s ease;
}

#latest .recent-entry:hover .recent-entry-image img {
    filter: grayscale(0%);
    transform: scale(1.04);
}

#latest .recent-entry-title,
#latest .recent-entry-content,
#latest .recent-entry-meta {
    padding-left: 26px;
    padding-right: 26px;
}

#latest .recent-entry-title {
    font-family: var(--sic-serif);
    font-size: 19px;
    margin: 0 0 12px;
}

#latest .recent-entry-title a {
    color: var(--sic-tinta);
}

#latest .recent-entry-content {
    flex: 1;
    color: var(--sic-gris);
    font-size: 14px;
    line-height: 1.6;
}

#latest .recent-entry-meta {
    margin-top: 16px;
    padding-top: 14px;
    padding-bottom: 24px;
    border-top: 1px solid var(--sic-borde);
    font-size: 11.5px;
    letter-spacing: .04em;
    text-transform: uppercase;
    color: var(--sic-gris-suave);
}

#latest .recent-entry-meta a {
    color: var(--sic-rojo);
}

/* ===== Pie de página ===== */

.footer-widgets.bg-footer {
    background: var(--sic-tinta);
    padding: 64px 0 40px;
}

.footer-widgets .widget-title {
    font-family: var(--sic-serif);
    color: #fff;
    font-size: 17px;
    margin-bottom: 18px;
    padding-bottom: 10px;
    border-bottom: 2px solid var(--sic-rojo);
    display: inline-block;
}

.footer-widgets .textwidget,
.footer-widgets .icon-list {
    color: #c9c3b8;
    font-size: 13.5px;
    line-height: 1.8;
}

.footer-widgets .icon-list {
    list-style: none;
    margin: 0;
    padding: 0;
}

.footer-widgets .icon-list li {
    margin-bottom: 10px;
}

.footer-widgets .icon-list i {
    color: var(--sic-oro);
    width: 20px;
}

.footer-widgets .btn-social-icon {
    background: rgba(255, 255, 255, .08);
    border: none;
    color: #fff;
    margin-top: 14px;
}

.footer-widgets .btn-social-icon:hover {
    background: var(--sic-rojo);
}

.sic-footer-enlaces {
    list-style: none;
    margin: 0;
    padding: 0;
}

.sic-footer-enlaces li {
    border-bottom: 1px solid rgba(255, 255, 255, .08);
}

.sic-footer-enlaces li:last-child {
    border-bottom: none;
}

.footer-widgets .sic-footer-enlaces a {
    display: block;
    padding: 9px 0;
    color: #c9c3b8 !important;
    font-size: 13.5px;
}

.footer-widgets .sic-footer-enlaces a:hover {
    color: var(--sic-oro) !important;
    padding-left: 4px;
}

.sic-footer-enlaces i {
    color: var(--sic-rojo);
    margin-right: 8px;
    font-size: 11px;
}

.footer {
    background: var(--sic-rojo-oscuro);
    padding: 16px 0;
}

.footer .nav-foot {
    list-style: none;
    margin: 0;
    padding: 0;
}

.footer .nav-foot a {
    color: #e7ded9;
    font-size: 11.5px;
    letter-spacing: .02em;
}

.footer .nav-foot a:hover {
    color: #fff;
}

.footer .copyright {
    color: #e7ded9;
    font-size: 12px;
    text-align: right;
}

.footer .copyright a {
    color: #fff;
    font-weight: 700;
}

/* ===== Responsivo ===== */

@media (max-width: 991px) {
    .navbar-custom .navbar-header {
        min-height: 76px;
    }

    .sic-marca img {
        height: 46px;
    }

    .sic-marca-texto strong {
        font-size: 16px;
    }

    .sic-hero {
        padding: 70px 18px 60px;
    }

    .sic-hero h1 {
        font-size: 30px;
    }

    #welcome .description p:first-of-type {
        font-size: 19px;
    }
}

@media (max-width: 767px) {
    .header-right {
        text-align: center;
        margin-top: 4px;
    }

    .header-left {
        text-align: center;
    }

    .footer .copyright {
        text-align: center;
        margin-top: 10px;
    }
}

@media (max-width: 480px) {
    .sic-hero h1 {
        font-size: 25px;
    }

    .sic-hero .description {
        font-size: 15px;
    }
}
