/* ==========================================================================
   SumIndustria — estilos del frontend.
   Basados en la plantilla aprobada (mockup-frontend.html) y adaptados a la
   estructura de la nueva portada (sumindustria_nuevo_diseño.pdf).
   ========================================================================== */

:root {
    --blue: #005095;
    --blue-dk: #003d73;
    --orange: #f28c00;
    --orange-dk: #d97d00;
    --orange-lt: #fff4e0;
    --gray-bg: #ecf0f1;
    --section-alt: #f9f9ff;
    --text: #555;
    --dark: #222;
    --muted: #999;
    --border: #dde3ea;
}

* { box-sizing: border-box; }

body {
    font-family: 'Poppins', sans-serif;
    font-size: 14px;
    font-weight: 300;
    line-height: 1.625;
    color: var(--text);
    margin: 0;
    background: #fff;
}

h1, h2, h3, h4, h5, h6 { color: var(--dark); font-weight: 700; }
a { color: var(--blue); text-decoration: none; }
a:hover { color: var(--orange); }
img { max-width: 100%; height: auto; }

/* ── CABECERA ─────────────────────────────────────────────── */
.site-header { background: #fff; padding: 14px 0; }
.header-inner { display: flex; align-items: center; justify-content: space-between; gap: 16px; }
.site-logo img { height: 54px; width: auto; }
.header-mail { font-size: 0.85rem; font-weight: 600; color: var(--blue); white-space: nowrap; }
.header-mail i { margin-right: 6px; }
@media (max-width: 575px) {
    .site-logo img { height: 42px; }
    .header-mail span { display: none; }
    .header-mail i { font-size: 1.2rem; margin: 0; }
}

/* ── MENÚ ─────────────────────────────────────────────────── */
.site-nav { background: var(--blue); position: sticky; top: 0; z-index: 1000; }
.nav-inner { display: flex; align-items: center; justify-content: space-between; }
.nav-menu { display: flex; list-style: none; margin: 0; padding: 0; }
.nav-menu a {
    display: block;
    color: rgba(255,255,255,0.88);
    padding: 13px 16px;
    font-size: 0.82rem;
    font-weight: 500;
    border-bottom: 3px solid transparent;
    white-space: nowrap;
    transition: all 0.15s;
}
.nav-menu a:hover { color: #fff; background: rgba(255,255,255,0.08); }
.nav-menu li.active a { color: #fff; border-bottom-color: var(--orange); }
.hamburger { display: none; background: none; border: none; color: #fff; font-size: 1.3rem; padding: 10px 0; }
@media (max-width: 991px) {
    .hamburger { display: block; }
    .nav-inner { flex-wrap: wrap; }
    .nav-menu { display: none; flex-direction: column; width: 100%; border-top: 1px solid rgba(255,255,255,0.1); }
    .nav-menu.open { display: flex; }
    .nav-menu a { padding: 12px 16px; border-bottom: 1px solid rgba(255,255,255,0.07); }
}

/* ── TÍTULOS DE SECCIÓN ───────────────────────────────────── */
.section { padding: 52px 0; }
.section-gray { background: var(--gray-bg); }
.section-header { display: flex; align-items: flex-end; justify-content: space-between; flex-wrap: wrap; gap: 10px; margin-bottom: 24px; }
.section-title { font-size: 1.35rem; font-weight: 700; color: var(--dark); margin: 0; display: inline-block; }
.section-title::after { content: ''; display: block; width: 40px; height: 3px; background: var(--orange); margin-top: 6px; border-radius: 2px; }
.section-sub { font-size: 0.82rem; color: var(--muted); margin: 8px 0 0; }
.ver-todos { font-size: 0.8rem; color: var(--orange); font-weight: 600; white-space: nowrap; }
.ver-todos:hover { color: var(--orange); text-decoration: underline; }
@media (max-width: 767px) { .section { padding: 36px 0; } }

/* ── BOTONES ──────────────────────────────────────────────── */
.btn-si {
    display: inline-block;
    border: none;
    border-radius: 6px;
    padding: 11px 24px;
    font-size: 0.85rem;
    font-weight: 600;
    font-family: inherit;
    text-transform: uppercase;
    letter-spacing: 0.3px;
    cursor: pointer;
    transition: background 0.15s;
}
.btn-si-blue { background: var(--blue); color: #fff; }
.btn-si-blue:hover { background: var(--blue-dk); color: #fff; }
.btn-si-orange { background: var(--orange); color: #fff; }
.btn-si-orange:hover { background: var(--orange-dk); color: #fff; }

/* ── HERO ─────────────────────────────────────────────────── */
.hero {
    background: linear-gradient(135deg, var(--blue-dk) 0%, var(--blue) 60%, #1a6bbf 100%);
    color: #fff;
    padding: 48px 0;
}
/* Portada: fondo de red (diseño nuevo). Versión de 960 px en móvil; el degradado oscurece la
   izquierda para que el texto se lea bien y sirve de color mientras carga la imagen. */
.hero-portada {
    background:
        linear-gradient(90deg, rgba(0, 10, 40, 0.75) 0%, rgba(0, 10, 40, 0.35) 55%, rgba(0, 10, 40, 0) 100%),
        url("../img/hero-red-960.jpg") center bottom / cover no-repeat,
        #000a28;
}
@media (min-width: 992px) {
    .hero-portada { background-image:
        linear-gradient(90deg, rgba(0, 10, 40, 0.75) 0%, rgba(0, 10, 40, 0.35) 55%, rgba(0, 10, 40, 0) 100%),
        url("../img/hero-red-1920.jpg"); }
}
.hero-title { font-size: clamp(1.5rem, 4vw, 2.4rem); font-weight: 800; line-height: 1.2; margin-bottom: 10px; color: #fff; }
.hero-sub { font-size: clamp(0.85rem, 2vw, 1rem); opacity: 0.85; margin-bottom: 24px; }

.hero-search { max-width: 620px; }
.hero-search-tabs { display: flex; gap: 4px; }
.hero-search-tabs label {
    font-size: 0.78rem; font-weight: 600;
    padding: 6px 14px;
    border-radius: 6px 6px 0 0;
    background: rgba(255,255,255,0.15);
    color: rgba(255,255,255,0.85);
    cursor: pointer;
}
.hero-search-tabs input { position: absolute; opacity: 0; pointer-events: none; }
.hero-search-tabs label:has(input:checked) { background: #fff; color: var(--blue); }
.hero-search-tabs label:has(input:focus-visible) { outline: 2px solid var(--orange); }
.hero-search-box {
    background: #fff;
    border-radius: 0 8px 8px 8px;
    display: flex;
    align-items: center;
    overflow: hidden;
    box-shadow: 0 8px 32px rgba(0,0,0,0.2);
}
.hero-search-box i { color: #bbb; margin-left: 14px; }
.hero-search-box input { border: none; outline: none; padding: 13px 14px; font-size: 0.9rem; font-family: inherit; flex: 1; min-width: 0; color: var(--dark); }
.hero-search-box button { background: var(--orange); color: #fff; border: none; padding: 13px 22px; font-weight: 600; font-family: inherit; }
.hero-search-box button:hover { background: var(--orange-dk); }

.hero-stats { display: flex; gap: 28px; margin-top: 26px; flex-wrap: wrap; }
.hero-stat-num { font-size: 1.6rem; font-weight: 800; line-height: 1; color: #fff; }
.hero-stat-lbl { font-size: 0.72rem; opacity: 0.7; text-transform: uppercase; letter-spacing: 0.5px; }

/* Revista del trimestre (editable desde administración) */
.hero-revista {
    display: flex; align-items: center; gap: 20px;
    background: rgba(255,255,255,0.08);
    border: 1px solid rgba(255,255,255,0.15);
    border-radius: 12px;
    padding: 18px;
    color: #fff;
    transition: background 0.2s;
}
.hero-revista:hover { background: rgba(255,255,255,0.14); color: #fff; }
.hero-revista img { width: 150px; border-radius: 4px; box-shadow: 0 8px 24px rgba(0,0,0,0.35); flex-shrink: 0; }
.hero-revista-num { font-size: clamp(1.3rem, 2.4vw, 1.9rem); font-weight: 800; line-height: 1.15; text-transform: uppercase; }
.hero-revista-txt { font-size: 0.85rem; opacity: 0.85; margin-top: 8px; }
.hero-revista-cta { display: inline-block; margin-top: 12px; font-size: 0.78rem; font-weight: 600; color: var(--orange); }
@media (max-width: 575px) { .hero-revista img { width: 100px; } }

/* ── BLOQUES DE LLAMADA A LA ACCIÓN ──────────────────────── */
.cta-row { padding: 28px 0; }
.cta-card { height: 100%; border-radius: 12px; padding: 26px 28px; display: flex; flex-direction: column; }
.cta-card h2 { font-size: 1.1rem; font-weight: 800; text-transform: uppercase; margin-bottom: 8px; }
.cta-card p { font-size: 0.85rem; margin-bottom: 18px; flex: 1; }
.cta-card .btn-si { align-self: center; }
.cta-light { background: var(--gray-bg); }
.cta-light h2 { color: var(--blue); }
.cta-dark { background: var(--blue); color: rgba(255,255,255,0.88); }
.cta-dark h2 { color: #fff; }

/* ── EMPRESAS DESTACADAS (carrusel de logos) ─────────────── */
.logo-carousel { display: flex; align-items: center; gap: 8px; }
.logo-track {
    display: flex; gap: 12px;
    overflow-x: auto;
    scroll-snap-type: x mandatory;
    scroll-behavior: smooth;
    scrollbar-width: none;
    flex: 1;
    padding: 4px 0;
}
.logo-track::-webkit-scrollbar { display: none; }
.logo-item {
    flex: 0 0 calc((100% - 5 * 12px) / 6);
    scroll-snap-align: start;
    background: #fff;
    border: 1px solid var(--border);
    border-radius: 8px;
    height: 80px;
    display: flex; align-items: center; justify-content: center;
    padding: 10px;
    font-size: 0.78rem; font-weight: 700; color: #aaa; text-align: center;
    transition: all 0.2s;
}
.logo-item:hover { border-color: var(--blue); box-shadow: 0 4px 14px rgba(0,80,149,0.1); }
.logo-item img { max-height: 100%; object-fit: contain; }
@media (max-width: 1199px) { .logo-item { flex-basis: calc((100% - 3 * 12px) / 4); } }
@media (max-width: 767px) { .logo-item { flex-basis: calc((100% - 12px) / 2); } }
.carousel-btn {
    flex-shrink: 0;
    width: 36px; height: 36px;
    border-radius: 50%;
    border: 1px solid var(--border);
    background: #fff;
    color: var(--dark);
    display: flex; align-items: center; justify-content: center;
}
.carousel-btn:hover { border-color: var(--orange); color: var(--orange); }
@media (max-width: 575px) { .carousel-btn { display: none; } }

/* ── SUMINDUSTRIA ZOOM ───────────────────────────────────── */
.zoom-grid { display: grid; grid-template-columns: repeat(6, 1fr); gap: 22px; }
.zoom-item { grid-column: span 2; border-bottom: 1px solid var(--border); padding-bottom: 16px; display: flex; flex-direction: column; }
.zoom-item.zoom-main { grid-column: span 4; }
.zoom-item.zoom-wide { grid-column: span 6; }
.zoom-img {
    aspect-ratio: 16 / 10;
    background: linear-gradient(135deg, var(--blue), #1a6bbf);
    border-radius: 6px;
    overflow: hidden;
    margin-bottom: 10px;
    display: flex; align-items: center; justify-content: center;
    color: rgba(255,255,255,0.3); font-size: 2.2rem;
}
.zoom-img { position: relative; }
.zoom-img img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.zoom-wide .zoom-img { aspect-ratio: 21 / 9; }
.zoom-tag {
    align-self: flex-start;
    background: var(--orange-lt); color: var(--orange);
    font-size: 0.66rem; font-weight: 700; text-transform: uppercase; letter-spacing: 0.5px;
    padding: 2px 9px; border-radius: 12px; margin-bottom: 6px;
}
.zoom-title { font-size: 0.92rem; font-weight: 700; color: var(--blue); line-height: 1.35; margin-bottom: 6px; text-transform: uppercase; }
.zoom-main .zoom-title, .zoom-wide .zoom-title { font-size: 1.05rem; }
.zoom-item a:hover .zoom-title { color: var(--orange); }
.zoom-text { font-size: 0.8rem; line-height: 1.55; margin-bottom: 6px; }
.zoom-meta { font-size: 0.72rem; color: #aaa; margin-top: auto; display: flex; justify-content: space-between; gap: 8px; }
.zoom-meta .empresa { color: var(--orange); font-weight: 600; }
@media (max-width: 767px) {
    .zoom-grid { grid-template-columns: 1fr 1fr; gap: 16px; }
    .zoom-item, .zoom-item.zoom-main, .zoom-item.zoom-wide { grid-column: span 2; }
}

.publicidad-title { background: var(--blue); color: #fff; font-size: 0.78rem; font-weight: 700; text-transform: uppercase; letter-spacing: 0.5px; padding: 4px 10px; margin-bottom: 12px; }
.publicidad a { display: block; margin-bottom: 14px; border: 1px solid var(--border); }
.publicidad img { width: 100%; display: block; }

/* ── CATEGORÍAS ──────────────────────────────────────────── */
.cat-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 14px; }
@media (min-width: 576px) { .cat-grid { grid-template-columns: repeat(3, 1fr); } }
@media (min-width: 992px) { .cat-grid { grid-template-columns: repeat(6, 1fr); } }
.cat-card {
    background: #fff; border: 1px solid var(--border); border-radius: 10px;
    padding: 20px 14px; text-align: center; color: inherit;
    transition: all 0.2s;
}
.cat-card:hover { border-color: var(--orange); box-shadow: 0 4px 20px rgba(242,140,0,0.12); transform: translateY(-3px); color: inherit; }
.cat-icon { width: 50px; height: 50px; border-radius: 12px; display: flex; align-items: center; justify-content: center; font-size: 1.3rem; margin: 0 auto 12px; }
.cat-name { font-size: 0.78rem; font-weight: 600; color: var(--dark); margin-bottom: 3px; line-height: 1.35; }
.cat-count { font-size: 0.7rem; color: var(--muted); }

/* ── BOLETÍN ─────────────────────────────────────────────── */
.newsletter { background: var(--blue); color: #fff; padding: 44px 0; }
.newsletter-title { font-size: 1.3rem; font-weight: 700; color: #fff; margin-bottom: 6px; }
.newsletter-sub { font-size: 0.85rem; opacity: 0.8; margin: 0; }
.newsletter-ultimo { display: inline-block; margin-top: 10px; font-size: 0.8rem; font-weight: 600; color: var(--orange); }
.newsletter-ultimo:hover { color: #fff; }
.newsletter-form { display: flex; gap: 10px; max-width: 480px; flex-wrap: wrap; }
.newsletter-form input[type=email] { flex: 1; min-width: 200px; border: none; border-radius: 6px; padding: 12px 16px; font-size: 0.85rem; font-family: inherit; outline: none; }
.newsletter-form button { background: var(--orange); color: #fff; border: none; border-radius: 6px; padding: 12px 22px; font-weight: 700; font-size: 0.85rem; font-family: inherit; white-space: nowrap; }
.newsletter-form button:hover { background: var(--orange-dk); }
.newsletter-legal { font-size: 0.74rem; color: rgba(255,255,255,0.7); margin-top: 10px; display: flex; gap: 8px; align-items: flex-start; }
.newsletter-legal a { color: #fff; text-decoration: underline; }
.newsletter-msg { font-size: 0.82rem; margin-top: 10px; padding: 8px 12px; border-radius: 6px; }
.newsletter-msg.ok { background: rgba(255,255,255,0.15); }
.newsletter-msg.error { background: #fce8e6; color: #b3261e; }

/* ── PIE ─────────────────────────────────────────────────── */
.site-footer { background: var(--blue-dk); color: rgba(255,255,255,0.7); padding: 36px 0 0; }
.footer-logo img { height: 36px; filter: brightness(0) invert(1); margin-bottom: 10px; }
.footer-section-title { font-size: 0.72rem; font-weight: 700; text-transform: uppercase; letter-spacing: 1px; color: #fff; margin-bottom: 14px; }
.footer-links { list-style: none; padding: 0; margin: 0; }
.footer-links li { margin-bottom: 6px; }
.footer-links a { color: rgba(255,255,255,0.65); font-size: 0.8rem; }
.footer-links a:hover { color: var(--orange); }
.footer-social { display: flex; gap: 8px; }
.footer-social a { width: 30px; height: 30px; background: rgba(255,255,255,0.1); border-radius: 6px; display: flex; align-items: center; justify-content: center; color: rgba(255,255,255,0.7); font-size: 0.78rem; }
.footer-social a:hover { background: var(--orange); color: #fff; }
.footer-bottom { border-top: 1px solid rgba(255,255,255,0.1); margin-top: 28px; padding: 14px 0; display: flex; justify-content: space-between; align-items: center; flex-wrap: wrap; gap: 10px; font-size: 0.75rem; }
.footer-bottom a { color: rgba(255,255,255,0.5); }
.footer-bottom a:hover { color: var(--orange); }

/* ── PÁGINA DE ERROR ─────────────────────────────────────── */
.error-page { padding: 80px 0; text-align: center; }
.error-page .codigo { font-size: 4rem; font-weight: 800; color: var(--blue); line-height: 1; }
.logo-item img + .logo-alt { display: none; }

/* ── UTILIDADES ──────────────────────────────────────────── */
.min-w-0 { min-width: 0; }
.page-title { font-size: 1.5rem; font-weight: 800; margin-bottom: 18px; }
.btn-si-sm { padding: 6px 14px; font-size: 0.72rem; white-space: nowrap; flex-shrink: 0; }
.btn-si-outline {
    display: inline-block; background: transparent; color: var(--blue);
    border: 1.5px solid var(--border); border-radius: 6px; padding: 9px 18px;
    font-size: 0.82rem; font-weight: 500;
}
.btn-si-outline:hover { border-color: var(--blue); background: #f0f5fc; color: var(--blue); }
.badge-blue { background: #e8f0fb; color: var(--blue); padding: 3px 12px; border-radius: 20px; font-size: 0.7rem; font-weight: 600; }
.badge-orange { background: var(--orange); color: #fff; padding: 3px 12px; border-radius: 20px; font-size: 0.7rem; font-weight: 700; }
.empty-state { text-align: center; padding: 48px 16px; background: #fff; border: 1px dashed var(--border); border-radius: 10px; }
.empty-state i { font-size: 2.2rem; color: #c5d0da; margin-bottom: 12px; }

/* ── MIGAS DE PAN ────────────────────────────────────────── */
.breadcrumb-bar { background: var(--gray-bg); border-bottom: 1px solid #dce3ea; padding: 9px 0; }
.breadcrumb { margin: 0; font-size: 0.78rem; flex-wrap: nowrap; }
.breadcrumb-item.active { color: var(--text); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

/* ── FILTROS ─────────────────────────────────────────────── */
.filter-panel { background: #fff; border: 1px solid var(--border); border-radius: 10px; padding: 20px; margin-bottom: 20px; }
.filter-toggle {
    width: 100%; background: var(--gray-bg); border: 1px solid var(--border); border-radius: 8px;
    padding: 11px 16px; font-size: 0.85rem; font-family: inherit; font-weight: 500; color: var(--dark);
    display: none; align-items: center; justify-content: space-between;
}
@media (max-width: 991px) {
    .filter-panel { padding: 14px; }
    .filter-toggle { display: flex; }
    .filter-fields { display: none; margin-top: 14px; }
    .filter-fields.open { display: block; }
}
.filter-row-inner { display: flex; gap: 12px; flex-wrap: wrap; align-items: flex-end; }
.fgroup { display: flex; flex-direction: column; gap: 4px; flex: 1; min-width: 150px; }
.fgroup-wide { flex: 2; min-width: 220px; }
.fgroup label { font-size: 0.72rem; font-weight: 600; color: var(--muted); text-transform: uppercase; letter-spacing: 0.4px; }
.fgroup input, .fgroup select, .sort-select, .fs-input {
    border: 1.5px solid var(--border); border-radius: 6px; padding: 9px 11px;
    font-size: 0.83rem; font-family: inherit; color: var(--dark); outline: none; background: #fff; width: 100%;
}
.fgroup input:focus, .fgroup select:focus, .fs-input:focus, .sort-select:focus { border-color: var(--orange); }
.filter-actions { display: flex; gap: 8px; align-items: flex-end; }

.filter-sidebar { position: sticky; top: 64px; background: #fff; border: 1px solid var(--border); border-radius: 10px; padding: 20px; }
.fs-section + .fs-section { border-top: 1px solid var(--border); margin-top: 16px; padding-top: 16px; }
.fs-title { font-size: 0.78rem; font-weight: 700; text-transform: uppercase; letter-spacing: 0.5px; color: var(--dark); margin-bottom: 12px; padding-bottom: 6px; border-bottom: 2px solid var(--orange); display: inline-block; }
.fs-input { margin-bottom: 10px; }
.fs-list { list-style: none; padding: 0; margin: 0; font-size: 0.8rem; }
.fs-list a { display: flex; justify-content: space-between; gap: 8px; padding: 4px 6px; border-radius: 4px; color: var(--text); line-height: 1.35; }
.fs-list a span { color: #aaa; font-size: 0.72rem; flex-shrink: 0; }
.fs-list a:hover { background: var(--orange-lt); color: var(--dark); }
.fs-list a.active { background: var(--blue); color: #fff; font-weight: 600; }
.fs-list a.active span { color: rgba(255,255,255,0.75); }
.fs-list-scroll { max-height: 320px; overflow-y: auto; }

.results-bar { display: flex; align-items: center; justify-content: space-between; margin-bottom: 16px; flex-wrap: wrap; gap: 10px; }
.results-count { font-size: 0.83rem; }
.results-count strong { color: var(--dark); font-weight: 700; }
.sort-select { width: auto; padding: 7px 11px; font-size: 0.8rem; cursor: pointer; }

/* ── TARJETAS DE EMPRESA ─────────────────────────────────── */
.company-grid { display: grid; grid-template-columns: 1fr; gap: 16px; }
@media (min-width: 576px) { .company-grid { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 1200px) { .company-grid { grid-template-columns: repeat(3, 1fr); } }
.company-card { background: #fff; border: 1px solid var(--border); border-radius: 10px; overflow: hidden; display: flex; flex-direction: column; transition: all 0.2s; }
.company-card:hover { box-shadow: 0 6px 24px rgba(0,0,0,0.1); transform: translateY(-3px); border-color: #c5d0da; }
.company-logo-area {
    height: 100px; background: var(--gray-bg); border-bottom: 1px solid var(--border);
    display: flex; align-items: center; justify-content: center; padding: 12px;
    font-size: 0.9rem; font-weight: 800; color: #aaa; text-align: center;
}
.company-logo-area img { max-height: 100%; max-width: 100%; object-fit: contain; mix-blend-mode: multiply; }
.company-logo-area img + .logo-alt { display: none; }
.company-body { padding: 16px; flex: 1; display: flex; flex-direction: column; align-items: flex-start; }
.company-badge { margin-bottom: 8px; font-size: 0.64rem; }
.company-name { font-size: 0.92rem; font-weight: 700; margin-bottom: 4px; line-height: 1.35; }
.company-name a { color: var(--dark); }
.company-name a:hover { color: var(--orange); }
.company-loc { font-size: 0.76rem; color: var(--muted); margin-bottom: 8px; }
.company-loc i { color: var(--orange); }
.company-sector {
    display: inline-block; max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
    background: #e8f0fb; color: var(--blue); font-size: 0.68rem; font-weight: 600;
    padding: 2px 9px; border-radius: 12px; margin-bottom: 10px;
}
.company-desc { font-size: 0.8rem; line-height: 1.55; margin: 0; }
.company-footer { padding: 11px 16px; border-top: 1px solid var(--border); display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.company-tel { font-size: 0.75rem; color: var(--muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

/* ── PAGINACIÓN ──────────────────────────────────────────── */
.pagination { gap: 4px; justify-content: center; flex-wrap: wrap; }
.page-link { border-radius: 6px !important; border: 1.5px solid var(--border); color: var(--blue); font-size: 0.8rem; padding: 7px 12px; }
.page-item.active .page-link { background: var(--orange); border-color: var(--orange); color: #fff; }
.page-link:hover { background: var(--orange-lt); color: var(--orange); border-color: var(--orange); }

/* ── FICHA DE EMPRESA ────────────────────────────────────── */
.ficha-header { background: #fff; border-bottom: 1px solid var(--border); padding: 28px 0; }
.ficha-logo {
    width: 120px; height: 120px; flex-shrink: 0; padding: 10px;
    background: #fff; border: 1px solid var(--border); border-radius: 10px;
    display: flex; align-items: center; justify-content: center; color: #c5d0da; font-size: 2rem;
}
.ficha-logo img { max-width: 100%; max-height: 100%; object-fit: contain; }
.ficha-logo img + .logo-alt { display: none; }
.ficha-name { font-size: clamp(1.2rem, 3vw, 1.65rem); font-weight: 800; margin-bottom: 8px; }
.ficha-badges { display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 10px; }
.ficha-meta { display: flex; gap: 8px 18px; flex-wrap: wrap; }
.ficha-meta-item { font-size: 0.8rem; color: #888; display: flex; align-items: center; gap: 6px; min-width: 0; overflow-wrap: anywhere; }
.ficha-meta-item i { color: var(--orange); width: 14px; }
@media (max-width: 575px) {
    .ficha-header { padding: 20px 0; }
    .ficha-logo { width: 72px; height: 72px; font-size: 1.4rem; }
}

.ficha-tabs { background: #fff; border-bottom: 1px solid var(--border); position: sticky; top: 50px; z-index: 900; overflow-x: auto; scrollbar-width: none; }
.ficha-tabs::-webkit-scrollbar { display: none; }
.tabs-inner { display: flex; min-width: max-content; }
.tab-btn {
    padding: 13px 18px; font-size: 0.82rem; font-weight: 500; color: #888;
    border-bottom: 3px solid transparent; display: flex; align-items: center; gap: 6px; white-space: nowrap;
}
.tab-btn:hover { color: var(--blue); }
.tab-btn.active { color: var(--blue); border-bottom-color: var(--orange); font-weight: 700; }
.tab-count { background: #f0f5fc; color: var(--blue); border-radius: 10px; padding: 1px 7px; font-size: 0.68rem; font-weight: 700; }
.tab-pane { display: none; }
.tab-pane.active { display: block; }

.ficha-content { background: var(--section-alt); padding: 28px 0 52px; }
.content-block { background: #fff; border: 1px solid var(--border); border-radius: 10px; padding: 24px; margin-bottom: 16px; }
@media (max-width: 575px) { .content-block { padding: 18px; } }
.cb-title { font-size: 0.9rem; font-weight: 700; margin-bottom: 14px; padding-bottom: 10px; border-bottom: 1px solid var(--border); display: flex; align-items: center; gap: 8px; }
.cb-title i { color: var(--orange); }
.cb-subtitle { font-size: 0.72rem; font-weight: 700; text-transform: uppercase; letter-spacing: 0.5px; color: #aaa; margin-bottom: 6px; }
.cb-text { font-size: 0.85rem; line-height: 1.75; overflow-wrap: anywhere; }
.cb-text p:last-child, .cb-text ul:last-child { margin-bottom: 0; }

.product-mini-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 12px; }
@media (min-width: 768px) { .product-mini-grid { grid-template-columns: repeat(3, 1fr); } }
.product-mini { background: #fff; border: 1px solid var(--border); border-radius: 8px; overflow: hidden; transition: all 0.2s; color: inherit; }
.product-mini:hover { box-shadow: 0 4px 16px rgba(0,0,0,0.08); transform: translateY(-2px); color: inherit; }
.pm-img { position: relative; aspect-ratio: 4 / 3; background: var(--gray-bg); display: flex; align-items: center; justify-content: center; color: #ccc; font-size: 1.8rem; }
.pm-img img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: contain; background: #fff; padding: 6px; }
.pm-body { padding: 11px; }
.pm-name { font-size: 0.8rem; font-weight: 700; color: var(--dark); margin-bottom: 3px; line-height: 1.35; }
.pm-desc { font-size: 0.72rem; line-height: 1.45; margin: 0; }

.news-item { display: flex; gap: 16px; align-items: flex-start; background: #fff; border: 1px solid var(--border); border-radius: 8px; padding: 16px; margin-bottom: 12px; color: inherit; transition: box-shadow 0.15s; }
.news-item:hover { box-shadow: 0 4px 14px rgba(0,0,0,0.07); color: inherit; }
.ni-icon { position: relative; width: 84px; height: 64px; border-radius: 6px; overflow: hidden; background: linear-gradient(135deg, var(--blue), #1a6bbf); display: flex; align-items: center; justify-content: center; color: rgba(255,255,255,0.5); font-size: 1.1rem; flex-shrink: 0; }
.ni-icon img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.ni-title { font-size: 0.88rem; font-weight: 700; color: var(--dark); margin-bottom: 4px; line-height: 1.4; }
.news-item:hover .ni-title { color: var(--orange); }
.ni-desc { font-size: 0.78rem; line-height: 1.5; margin-bottom: 5px; }
.ni-date { font-size: 0.72rem; color: #aaa; }
@media (max-width: 575px) { .ni-icon { width: 56px; height: 56px; } }

.cat-group-title { font-size: 0.85rem; font-weight: 700; margin: 18px 0 10px; }
.cat-group-title:first-child { margin-top: 0; }
.cat-doc { display: flex; gap: 14px; align-items: center; background: #fff; border: 1px solid var(--border); border-radius: 8px; padding: 14px; margin-bottom: 10px; }
.cat-doc-icon { position: relative; width: 48px; height: 62px; background: #fce8e6; border-radius: 6px; overflow: hidden; display: flex; align-items: center; justify-content: center; color: #d93025; font-size: 1.3rem; flex-shrink: 0; }
.cat-doc-icon img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.cat-doc-name { font-size: 0.85rem; font-weight: 700; color: var(--dark); margin-bottom: 2px; }
.cat-doc-meta { font-size: 0.72rem; color: #aaa; text-transform: capitalize; }
.cat-doc-dl { font-size: 0.75rem; color: var(--orange); font-weight: 600; margin-top: 5px; }

.contact-form input:not([type=checkbox]), .contact-form textarea {
    width: 100%; border: 1.5px solid var(--border); border-radius: 6px; padding: 10px 13px;
    font-size: 0.85rem; font-family: inherit; color: var(--dark); outline: none; background: #fff;
}
.contact-form input:focus, .contact-form textarea:focus { border-color: var(--orange); }
.contact-form label { font-size: 0.74rem; font-weight: 600; color: #777; margin-bottom: 4px; display: block; text-transform: uppercase; letter-spacing: 0.3px; }
.contact-form .check-label { text-transform: none; letter-spacing: 0; font-weight: 400; font-size: 0.8rem; display: flex; gap: 8px; align-items: flex-start; margin-bottom: 8px; }
.contact-form .check-label input { margin-top: 4px; }
.hp-field { position: absolute; left: -10000px; width: 1px; height: 1px; overflow: hidden; }
.field-error { display: block; font-size: 0.74rem; color: #b3261e; margin-top: 4px; }
.field-error:empty { display: none; }
.form-msg { font-size: 0.83rem; padding: 10px 14px; border-radius: 6px; margin-bottom: 16px; }
.form-msg.ok { background: #e6f4ea; color: #1e6b34; }
.form-msg.error { background: #fce8e6; color: #b3261e; }
.form-msg.error ul { margin: 0; padding-left: 18px; }
.validation-summary-valid { display: none; }

.contact-sidebar { background: #fff; border: 1px solid var(--border); border-radius: 10px; overflow: hidden; position: sticky; top: 110px; }
.cs-header { background: var(--blue); color: #fff; padding: 14px 20px; font-size: 0.85rem; font-weight: 700; }
.cs-body { padding: 18px; }
.cs-item { display: flex; gap: 11px; margin-bottom: 14px; align-items: flex-start; }
.cs-item i { color: var(--orange); width: 15px; margin-top: 3px; flex-shrink: 0; font-size: 0.85rem; }
.cs-label { font-size: 0.68rem; text-transform: uppercase; letter-spacing: 0.4px; color: #aaa; margin-bottom: 1px; }
.cs-val { font-size: 0.82rem; color: var(--dark); line-height: 1.45; margin: 0; overflow-wrap: anywhere; font-style: normal; }
.map-link {
    margin-top: 16px; border-radius: 8px; padding: 18px; border: 1px solid #bfdbfe;
    background: linear-gradient(135deg, #e8f0fb, #dbeafe); color: #3b6fd4;
    display: flex; flex-direction: column; align-items: center; gap: 6px; font-size: 0.78rem; font-weight: 600;
}
.map-link i { font-size: 1.6rem; }
.map-link:hover { color: var(--blue); border-color: var(--blue); }
@media (max-width: 991px) { .contact-sidebar, .filter-sidebar { position: static; } }

/* ── PRODUCTOS ───────────────────────────────────────────── */
.product-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 16px; }
@media (min-width: 768px) { .product-grid { grid-template-columns: repeat(3, 1fr); } }
@media (min-width: 1200px) { .product-grid { grid-template-columns: repeat(4, 1fr); } }
.product-card { background: #fff; border: 1px solid var(--border); border-radius: 10px; overflow: hidden; display: flex; flex-direction: column; color: inherit; transition: all 0.2s; }
.product-card:hover { box-shadow: 0 6px 24px rgba(0,0,0,0.1); transform: translateY(-3px); color: inherit; }
.pc-body { padding: 14px; display: flex; flex-direction: column; flex: 1; }
.pc-name { font-size: 0.85rem; font-weight: 700; color: var(--dark); line-height: 1.35; margin-bottom: 6px; }
.product-card:hover .pc-name { color: var(--orange); }
.pc-desc { font-size: 0.75rem; line-height: 1.5; margin-bottom: 8px; }
.pc-empresa { font-size: 0.72rem; color: var(--blue); font-weight: 600; margin-top: auto; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.product-mini-grid-4 { grid-template-columns: repeat(2, 1fr); }
@media (min-width: 768px) { .product-mini-grid-4 { grid-template-columns: repeat(4, 1fr); } }
.badge-gray { background: var(--gray-bg); color: var(--text); padding: 3px 12px; border-radius: 20px; font-size: 0.7rem; font-weight: 600; }
a.badge-blue:hover { background: var(--blue); color: #fff; }
.lead-text { font-size: 0.92rem; color: var(--dark); }
.anchor-offset { scroll-margin-top: 70px; }

/* Galería */
.galeria-principal {
    position: relative; aspect-ratio: 4 / 3; border: 1px solid var(--border); border-radius: 8px; overflow: hidden;
    background: var(--gray-bg); display: flex; align-items: center; justify-content: center; color: #ccc; font-size: 3rem;
}
.galeria-principal a { position: absolute; inset: 0; background: #fff; display: flex; align-items: center; justify-content: center; cursor: zoom-in; }
.galeria-principal img { max-width: 100%; max-height: 100%; object-fit: contain; }
.galeria-miniaturas { display: flex; gap: 8px; margin-top: 10px; flex-wrap: wrap; }
.galeria-miniaturas button { width: 64px; height: 64px; padding: 3px; border: 2px solid var(--border); border-radius: 6px; background: #fff; }
.galeria-miniaturas button.active, .galeria-miniaturas button:hover { border-color: var(--orange); }
.galeria-miniaturas img { width: 100%; height: 100%; object-fit: contain; }

/* ── NOTICIAS ────────────────────────────────────────────── */
.news-grid { display: grid; grid-template-columns: 1fr; gap: 18px; }
@media (min-width: 576px) { .news-grid { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 992px) { .news-grid { grid-template-columns: repeat(3, 1fr); } }
.news-card { background: #fff; border: 1px solid var(--border); border-radius: 10px; overflow: hidden; display: flex; flex-direction: column; transition: all 0.2s; }
.news-card:hover { box-shadow: 0 6px 24px rgba(0,0,0,0.09); transform: translateY(-3px); }
.news-img { position: relative; aspect-ratio: 16 / 9; background: linear-gradient(135deg, var(--blue), #1a6bbf); display: flex; align-items: center; justify-content: center; color: rgba(255,255,255,0.3); font-size: 2.2rem; }
.news-img img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; background: #fff; }
.news-body { padding: 16px; flex: 1; display: flex; flex-direction: column; }
.news-title { font-size: 0.9rem; font-weight: 700; line-height: 1.4; margin-bottom: 6px; }
.news-title a { color: var(--dark); }
.news-title a:hover { color: var(--orange); }
.news-desc { font-size: 0.78rem; line-height: 1.55; margin-bottom: 8px; }
.news-footer-row { display: flex; justify-content: space-between; align-items: center; gap: 8px; margin-top: auto; }
.news-date { font-size: 0.72rem; color: #aaa; white-space: nowrap; }
.news-co { font-size: 0.72rem; color: var(--orange); font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

.noticia-meta { display: flex; gap: 8px 18px; flex-wrap: wrap; font-size: 0.8rem; color: var(--muted); margin-bottom: 8px; }
.noticia-meta a { color: var(--orange); font-weight: 600; }
.noticia-titulo { font-size: clamp(1.3rem, 3vw, 1.9rem); font-weight: 800; line-height: 1.25; margin: 0; }
.noticia-galeria { margin: 18px 0; }
.noticia-galeria .galeria-principal { aspect-ratio: 16 / 9; }
.noticia-texto { margin-top: 14px; }
.noticia-texto img { max-width: 100%; }

.search-inline { display: flex; border: 1.5px solid var(--border); border-radius: 6px; overflow: hidden; background: #fff; min-width: 260px; }
.search-inline:focus-within { border-color: var(--orange); }
.search-inline input { border: none; outline: none; padding: 8px 12px; font-size: 0.83rem; font-family: inherit; flex: 1; min-width: 0; }
.search-inline button { border: none; background: var(--orange); color: #fff; padding: 0 14px; }
@media (max-width: 575px) { .search-inline { min-width: 0; width: 100%; } }

.sidebar-stack { display: flex; flex-direction: column; gap: 16px; }
.sidebar-stack .contact-sidebar { position: static; }
.side-box { background: #fff; border: 1px solid var(--border); border-radius: 10px; padding: 18px; }
.side-box-title { font-size: 0.78rem; font-weight: 700; text-transform: uppercase; letter-spacing: 0.5px; color: var(--dark); margin-bottom: 12px; padding-bottom: 6px; border-bottom: 2px solid var(--orange); display: inline-block; }
.side-news { list-style: none; padding: 0; margin: 0 0 12px; }
.side-news li { padding: 8px 0; border-bottom: 1px solid var(--border); }
.side-news li:last-child { border-bottom: none; }
.side-news a { display: block; font-size: 0.8rem; font-weight: 600; color: var(--dark); line-height: 1.4; }
.side-news a:hover { color: var(--orange); }
.side-news span { font-size: 0.7rem; color: #aaa; }
.cs-logo { display: flex; align-items: center; justify-content: center; height: 90px; border: 1px solid var(--border); border-radius: 8px; padding: 10px; margin-bottom: 12px; font-weight: 800; color: #aaa; text-align: center; }
.cs-logo img { max-width: 100%; max-height: 100%; object-fit: contain; }
.cs-logo img + .logo-alt { display: none; }
.cs-empresa { font-size: 0.95rem; font-weight: 700; margin-bottom: 12px; }
.cs-empresa a { color: var(--dark); }
.cs-empresa a:hover { color: var(--orange); }

/* ── BÚSQUEDA ────────────────────────────────────────────── */
.search-big { display: flex; align-items: center; background: #fff; border: 2px solid var(--border); border-radius: 8px; overflow: hidden; max-width: 760px; }
.search-big:focus-within { border-color: var(--orange); }
.search-big i { color: #bbb; margin-left: 16px; }
.search-big input { border: none; outline: none; padding: 14px; font-size: 1rem; font-family: inherit; flex: 1; min-width: 0; color: var(--dark); }
.search-big button { border: none; background: var(--orange); color: #fff; padding: 14px 24px; font-weight: 600; font-family: inherit; }
.search-big button:hover { background: var(--orange-dk); }
.search-tabs { display: flex; border-bottom: 1px solid var(--border); overflow-x: auto; scrollbar-width: none; }
.company-grid-4 { grid-template-columns: 1fr; }
@media (min-width: 576px) { .company-grid-4 { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 992px) { .company-grid-4 { grid-template-columns: repeat(3, 1fr); } }
@media (min-width: 1200px) { .company-grid-4 { grid-template-columns: repeat(4, 1fr); } }

/* ── CATEGORÍAS ──────────────────────────────────────────── */
.sector-grid { display: grid; grid-template-columns: 1fr; gap: 16px; }
@media (min-width: 768px) { .sector-grid { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 1200px) { .sector-grid { grid-template-columns: repeat(3, 1fr); } }
.sector-card { background: #fff; border: 1px solid var(--border); border-radius: 10px; padding: 18px; display: flex; flex-direction: column; transition: all 0.2s; }
.sector-card:hover { border-color: #c5d0da; box-shadow: 0 6px 24px rgba(0,0,0,0.08); }
.sector-head { display: flex; gap: 14px; align-items: center; color: inherit; margin-bottom: 12px; }
.sector-head .cat-icon { margin: 0; flex-shrink: 0; }
.sector-name { font-size: 0.92rem; font-weight: 700; color: var(--dark); line-height: 1.35; margin: 0 0 3px; }
.sector-head:hover .sector-name { color: var(--orange); }
.sector-count { font-size: 0.74rem; color: var(--muted); }
.sector-subs { list-style: none; padding: 0; margin: 0 0 12px; display: flex; flex-wrap: wrap; gap: 6px; }
.sector-subs a { display: inline-block; font-size: 0.72rem; background: var(--gray-bg); color: var(--text); padding: 3px 10px; border-radius: 12px; }
.sector-subs a:hover { background: var(--orange-lt); color: var(--orange); }
.sector-more { margin-top: auto; }

.sector-hero { background: #fff; border-bottom: 1px solid var(--border); padding: 28px 0; }
.cat-icon-lg { width: 64px; height: 64px; font-size: 1.7rem; margin: 0; flex-shrink: 0; }
.sector-filter { max-width: 260px; margin: 0; }
.subcat-list { list-style: none; padding: 0; margin: 0; columns: 1; column-gap: 24px; }
@media (min-width: 576px) { .subcat-list { columns: 2; } }
@media (min-width: 992px) { .subcat-list { columns: 3; } }
.subcat-list li { break-inside: avoid; }
.subcat-list a { display: flex; justify-content: space-between; gap: 10px; padding: 7px 10px; border-bottom: 1px solid var(--border); font-size: 0.83rem; color: var(--dark); }
.subcat-list a span { font-size: 0.72rem; color: var(--muted); flex-shrink: 0; }
.subcat-list a:hover { background: var(--orange-lt); color: var(--orange); }

/* ── REVISTAS ────────────────────────────────────────────── */
.hero-tag {
    display: inline-block; background: var(--orange); color: #fff; font-size: 0.7rem; font-weight: 700;
    text-transform: uppercase; letter-spacing: 1px; padding: 4px 14px; border-radius: 20px; margin-bottom: 14px;
}
.btn-si-light { background: #fff; color: var(--blue); }
.btn-si-light:hover { background: var(--gray-bg); color: var(--blue); }
.revista-portada {
    position: relative; display: flex; align-items: center; justify-content: center;
    aspect-ratio: 210 / 297; background: var(--gray-bg); border-radius: 4px; overflow: hidden;
    color: #c5d0da; font-size: 2rem; box-shadow: 0 4px 14px rgba(0,0,0,0.12); transition: transform 0.2s, box-shadow 0.2s;
}
.revista-portada:hover { transform: translateY(-4px); box-shadow: 0 10px 28px rgba(0,0,0,0.18); }
.revista-portada img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.revista-portada-lg { max-width: 240px; margin: 0 auto; background: rgba(255,255,255,0.1); color: rgba(255,255,255,0.4); font-size: 3rem; box-shadow: 0 12px 36px rgba(0,0,0,0.35); }
.revista-anio { font-size: 1rem; font-weight: 800; color: var(--blue); margin: 28px 0 14px; padding-bottom: 6px; border-bottom: 1px solid var(--border); }
.revista-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 22px; }
@media (min-width: 576px) { .revista-grid { grid-template-columns: repeat(3, 1fr); } }
@media (min-width: 992px) { .revista-grid { grid-template-columns: repeat(5, 1fr); } }
.revista-item { text-align: center; }
.revista-num { font-size: 0.9rem; font-weight: 800; color: var(--dark); margin-top: 12px; }
.revista-titulo { font-size: 0.76rem; color: var(--muted); }

/* ── PÁGINAS LEGALES Y FORMULARIOS ───────────────────────── */
.texto-legal { font-size: 0.86rem; line-height: 1.75; }
.texto-legal h2 { font-size: 1.05rem; font-weight: 800; color: var(--blue); margin: 28px 0 12px; text-transform: uppercase; }
.texto-legal h3 { font-size: 0.95rem; font-weight: 700; margin: 22px 0 10px; }
.texto-legal h4 { font-size: 0.88rem; font-weight: 700; margin: 18px 0 8px; }
.texto-legal p, .texto-legal li { text-align: justify; overflow-wrap: anywhere; }
.texto-legal ol, .texto-legal ul { padding-left: 28px; }
.texto-legal table { width: 100%; font-size: 0.8rem; margin: 12px 0; border-collapse: collapse; }
.texto-legal td, .texto-legal th { border: 1px solid var(--border); padding: 6px 8px; vertical-align: top; }

.contact-form fieldset { border: none; padding: 0; margin: 0 0 22px; }
.contact-form legend { font-size: 0.85rem; font-weight: 700; color: var(--blue); border-bottom: 1px solid var(--border); padding-bottom: 6px; margin-bottom: 14px; width: 100%; }
.contact-form input.input-validation-error, .contact-form textarea.input-validation-error { border-color: #b3261e; }
.form-nota { font-size: 0.74rem; color: var(--muted); margin-left: 12px; }

.info-lopd { margin-top: 24px; border: 1px solid var(--border); border-radius: 8px; background: var(--section-alt); font-size: 0.74rem; line-height: 1.55; }
.info-lopd summary { cursor: pointer; padding: 10px 14px; color: var(--text); }
.info-lopd summary strong { color: var(--blue); }
.info-lopd table { margin: 0 14px 14px; width: calc(100% - 28px); border-collapse: collapse; }
.info-lopd th, .info-lopd td { border-top: 1px solid var(--border); padding: 8px 6px; vertical-align: top; text-align: left; }
.info-lopd th { width: 110px; color: var(--dark); }
@media (max-width: 575px) { .info-lopd th { width: 80px; } }

.enviado-icono { font-size: 3.5rem; color: #1e8e3e; }
