/* Sistema visual FAMAC — basado en la guía de identidad corporativa. */
:root {
    --naranja: #FF5000;
    --naranja-oscuro: #D4451D;
    --naranja-suave: rgba(255, 80, 0, 0.09);
    --oscuro: #231F20;
    --blanco: #FFFFFF;
    --gris-fondo: #F5F5F5;
    --gris-texto: #5E5E5E;
    --gris-corporativo: #BBBDC0;
    --color-principal: #231F20;
    --color-secundario: #FF5000;
    --color-texto: #231F20;
    --color-fondo: #FFFFFF;
    --color-fondo-claro: #F5F5F5;
    --wsp-color: #231F20;
    --whatsapp-color: #231F20;
    --contenedor: 1180px;
    --sombra: 0 16px 40px rgba(35, 31, 32, 0.10);
    --fuente-condensada: "Arial Narrow", "Roboto Condensed", "Helvetica Neue", Arial, sans-serif;
}

html { scroll-behavior: smooth; }

body {
    color: var(--oscuro);
    background: var(--blanco);
    font-family: "Helvetica Neue", Helvetica, Arial, sans-serif;
    line-height: 1.65;
}

body::before {
    content: "";
    display: block;
    height: 5px;
    background: var(--naranja);
    position: fixed;
    inset: 0 0 auto;
    z-index: 2000;
}

h1, h2, h3, .nav a, .btn, .btn-action, .badge-region, .city-name {
    font-family: var(--fuente-condensada);
    font-stretch: condensed;
}

h1, h2, h3 {
    line-height: 1.08;
    letter-spacing: -0.025em;
}

h1, h2 { text-transform: uppercase; }

a:focus-visible, button:focus-visible {
    outline: 3px solid var(--naranja);
    outline-offset: 4px;
}

/* Cabecera institucional */
.header {
    min-height: 84px;
    padding: 12px max(5%, calc((100vw - var(--contenedor)) / 2));
    background: rgba(255, 255, 255, 0.98);
    border-bottom: 1px solid rgba(35, 31, 32, 0.12);
    box-shadow: 0 8px 24px rgba(35, 31, 32, 0.07);
}

.logo { display: flex; align-items: center; }
.logo img { width: auto; height: 56px; object-fit: contain; }

.nav ul { gap: clamp(18px, 3vw, 38px); }
.nav a, .nav ul li a {
    color: var(--oscuro);
    font-size: 1.05rem;
    font-weight: 800;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.nav a:hover, .nav ul li a:hover, .current-page a { color: var(--naranja); }
.nav a::after { height: 4px; background: var(--naranja); }
.menu-btn, .menu-toggle {
    color: var(--oscuro);
    min-width: 44px;
    min-height: 44px;
    padding: 8px;
    border: 0;
    background: transparent;
    line-height: 1;
    border-radius: 2px;
    -webkit-tap-highlight-color: transparent;
}

.menu-btn:focus-visible, .menu-toggle:focus-visible {
    outline: 3px solid var(--naranja);
    outline-offset: 3px;
}

/* Héroes: fotografía industrial, bloque oscuro y firma naranja */
.hero-home, .nosotros-hero, .contact-hero {
    position: relative;
    isolation: isolate;
    overflow: hidden;
}

.hero-home::before, .nosotros-hero::before, .contact-hero::before {
    content: "";
    position: absolute;
    inset: 0;
    z-index: -1;
    background: linear-gradient(90deg, rgba(35,31,32,.94) 0%, rgba(35,31,32,.78) 40%, rgba(35,31,32,.15) 78%);
}

.hero-home::before {
    background: linear-gradient(90deg, rgba(255,255,255,.97) 0%, rgba(255,255,255,.91) 38%, rgba(255,255,255,.36) 57%, rgba(255,255,255,0) 72%);
}

.hero-home::after, .nosotros-hero::after, .contact-hero::after {
    content: "";
    position: absolute;
    left: 0;
    bottom: 0;
    width: min(48%, 650px);
    height: 14px;
    background: var(--naranja);
    transform: skewX(-28deg) translateX(-15px);
    transform-origin: left bottom;
}

.hero-home {
    min-height: 680px;
    height: calc(100vh - 84px);
    max-height: 900px;
    padding-inline: max(5%, calc((100vw - var(--contenedor)) / 2));
    background: url('assets/img/hero-famac-fondo.webp') no-repeat center center / cover;
}

.hero-content { position: relative; z-index: 1; max-width: 660px; }
.hero-visual {
    position: absolute;
    inset: 0 0 0 auto;
    width: 52%;
    overflow: hidden;
    pointer-events: none;
    z-index: 0;
}
.hero-visual img {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: contain;
    filter: drop-shadow(0 18px 14px rgba(35, 31, 32, .34));
}
.hero-content h1 {
    max-width: 650px;
    color: var(--oscuro);
    font-size: clamp(2.7rem, 5.2vw, 4.9rem);
    letter-spacing: -0.045em;
    text-shadow: none;
}

.hero-content p.subtitle, .hero-eyebrow {
    color: var(--naranja);
    font-size: clamp(.9rem, 1.5vw, 1.15rem);
    letter-spacing: .18em;
}

.hero-eyebrow {
    margin-bottom: 10px;
    font-weight: 800;
    text-transform: uppercase;
}

.hero-intro {
    max-width: 590px;
    margin: 18px 0 26px;
    color: var(--gris-texto);
    font-size: 1.05rem;
    line-height: 1.55;
}

.nosotros-hero, .contact-hero {
    min-height: 390px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: flex-start;
    padding: 80px max(5%, calc((100vw - var(--contenedor)) / 2));
    text-align: left;
}

.nosotros-hero h1, .contact-hero h1 { font-size: clamp(2.7rem, 6vw, 5rem); max-width: 800px; }
.nosotros-hero p, .contact-hero p { max-width: 650px; color: var(--gris-corporativo); font-size: 1.15rem; }

/* Componentes */
.section, .quienes-somos, .valores-section, .office-section {
    padding: clamp(72px, 9vw, 120px) max(5%, calc((100vw - var(--contenedor)) / 2));
}

.section h2, .valores-section h2, .office-info h2 {
    color: var(--oscuro);
    font-size: clamp(2.25rem, 4.8vw, 4rem);
    margin-bottom: 50px;
}

.section h2::before, .valores-section h2::before, .office-info h2::before {
    content: "";
    display: block;
    width: 68px;
    height: 7px;
    margin: 0 auto 18px;
    background: var(--naranja);
    transform: skewX(-28deg);
}

.office-info h2::before { margin-left: 0; }
.section h2 span, .office-info h2 span { color: var(--naranja); }
.bg-light, .valores-section, .contact-grid { background: var(--gris-fondo); }

.cta-container { gap: 14px; align-items: stretch; }
.cta-box {
    width: min(300px, 100%);
    min-height: 270px;
    padding: 24px 22px;
    color: var(--oscuro);
    background: rgba(255, 255, 255, .96);
    border: 1px solid rgba(35,31,32,.13);
    border-top: 5px solid var(--naranja);
    border-radius: 0;
    box-shadow: 0 14px 34px rgba(35,31,32,.13);
    clip-path: polygon(0 0, 96% 0, 100% 16%, 100% 100%, 0 100%);
}

.cta-box:hover { transform: translateY(-6px); }
.cta-icon { background: var(--naranja); border-radius: 0; transform: skewX(-10deg); }
.cta-icon i { transform: skewX(10deg); }
.cta-text { display: flex; flex-direction: column; min-height: 220px; }
.cta-text h3 { margin: 5px 0 10px; color: var(--oscuro); font-size: 1.45rem; text-transform: uppercase; }
.cta-text p { margin-bottom: 18px; color: var(--gris-texto); font-size: .94rem; line-height: 1.45; }
.cta-text .btn { align-self: flex-start; margin-top: auto; }
.cta-label { color: var(--naranja-oscuro); font-size: .7rem; font-weight: 800; letter-spacing: .08em; text-transform: uppercase; }

.btn, .btn-action, .btn-caso {
    border-radius: 0;
    letter-spacing: .07em;
    text-transform: uppercase;
    font-weight: 800;
}

.btn-primary, .btn-action.btn-wsp, .btn {
    background: var(--naranja);
    color: var(--blanco);
}

.btn-primary:hover, .btn-action.btn-wsp:hover, .btn:hover {
    background: var(--naranja-oscuro);
    color: var(--blanco);
}

.btn-secondary { background: var(--oscuro); color: var(--blanco); }
.btn-secondary:hover { background: var(--naranja-oscuro); color: var(--blanco); }
.btn-action.btn-wsp { background: #25D366; color: var(--blanco); }
.btn-action.btn-wsp:hover { background: #128C7E; color: var(--blanco); }
.btn-action.btn-wsp i { color: var(--blanco); }

.valor-card, .card-almacen, .producto-card, .contact-card, .mision-card, .vision-card {
    border-radius: 0;
    border: 1px solid rgba(35, 31, 32, .10);
    border-top: 5px solid var(--naranja);
    box-shadow: 0 12px 32px rgba(35, 31, 32, .07);
}

.valor-card:hover, .card-almacen:hover, .producto-card:hover, .contact-card:hover {
    transform: translateY(-6px);
    box-shadow: var(--sombra);
}

.valor-card i, .city-icon {
    color: var(--naranja);
    background: var(--blanco);
    border-radius: 0;
}

.valor-card i { border: 2px solid var(--naranja); transform: skewX(-8deg); }
.valor-card i::before { display: inline-block; transform: skewX(8deg); }
.img-container, .card-almacen img, .producto-card img, .office-image img { border-radius: 0; }
.btn-catalogo-general {
    display: block;
    width: min(100%, 900px);
    margin: 30px auto 0;
    text-align: center;
}
.badge-region { background: var(--naranja); border-radius: 0; letter-spacing: .08em; }
.brands-bar { background: var(--oscuro); border-bottom: 7px solid var(--naranja); }
.brands-bar p { color: var(--gris-corporativo); }
.brands-container { color: var(--blanco); }

.contact-grid { padding-inline: max(5%, calc((100vw - var(--contenedor)) / 2)); }
.contact-card { padding-top: 60px; }
.city-icon { border: 2px solid var(--naranja); box-shadow: 0 10px 20px rgba(35,31,32,.12); }
.city-icon { overflow: hidden; }
.city-icon img { display: block; width: 100%; height: 100%; object-fit: cover; object-position: center; }
.contact-card:first-child .city-icon img { object-position: 12% center; }
.contact-card:last-child .city-icon img { object-position: 68% center; }
.contact-card .city-name { color: var(--naranja); text-transform: uppercase; }
.address-box { background: var(--naranja-suave); border-left: 4px solid var(--naranja); border-radius: 0; }
.address-box strong, .info-item i { color: var(--naranja); }
.info-item a { color: inherit; text-decoration: none; }
.info-item a:hover { color: var(--naranja-oscuro); }
.info-item.office-whatsapp i { color: #25D366; }
.info-item.warehouse-whatsapp i { color: #25D366; }
.info-item.office-whatsapp a:hover { color: #128C7E; }
.btn-mail { border-color: var(--oscuro); color: var(--oscuro); }
.btn-map { border-color: var(--naranja); color: var(--naranja); }

.cta-productos {
    margin: 0 max(5%, calc((100vw - var(--contenedor)) / 2)) 80px;
    padding: clamp(54px, 7vw, 82px);
    color: var(--blanco);
    background: var(--oscuro);
    border-radius: 0;
    border-left: 12px solid var(--naranja);
    clip-path: polygon(0 0, 97% 0, 100% 18%, 100% 100%, 0 100%);
}

.cta-productos h2 { color: var(--blanco); }
.btn-final { border-radius: 0; text-transform: uppercase; letter-spacing: .06em; }

.whatsapp-float,
.whatsapp-float:hover {
    position: fixed;
    right: 32px;
    bottom: 32px;
    z-index: 1500;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 58px;
    height: 58px;
    font-size: 28px;
    color: var(--blanco);
    background: #25D366;
    border: 3px solid var(--blanco);
    border-radius: 0;
    box-shadow: 0 10px 28px rgba(35,31,32,.28);
    text-align: center;
    text-decoration: none;
}

.whatsapp-float:hover { background: #128C7E; transform: translateY(-4px); }

/* Pie de página */
.main-footer {
    position: relative;
    padding: 72px max(5%, calc((100vw - var(--contenedor)) / 2)) 26px;
    background: var(--oscuro);
    border-top: 10px solid var(--naranja);
}

.footer-top { border-bottom-color: rgba(187,189,192,.22); }
.footer-logo { filter: none; height: 58px; background: var(--blanco); padding: 8px 12px; }
.footer-column h3 { color: var(--naranja); letter-spacing: .04em; }
.footer-column p, .footer-column ul li a { color: var(--gris-corporativo); }
.footer-column ul li a:hover { color: var(--naranja); }
.social-icons a { background: var(--blanco); color: var(--oscuro); border-radius: 0; }
.social-icons a:hover { background: var(--naranja); color: var(--blanco); }
.footer-bottom { color: var(--gris-corporativo); }

@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after { scroll-behavior: auto !important; transition-duration: .01ms !important; }
}

@media (max-width: 768px) {
    .header { min-height: 74px; padding: 9px 5%; }
    .logo img { height: 46px; max-width: 230px; }
    .nav { top: 0; background: var(--blanco); border-left: 6px solid var(--naranja); }
    .nav ul li { border-bottom: 1px solid rgba(35,31,32,.1); }
    .hero-home { min-height: 0; height: auto; padding-block: 70px 0; flex-direction: column; background: var(--blanco); }
    .hero-home::before { display: none; }
    .hero-content h1 { font-size: clamp(2.75rem, 13vw, 4.2rem); }
    .hero-intro { color: var(--oscuro); }
    .hero-visual {
        position: relative;
        inset: auto;
        width: calc(100% + 40px);
        height: clamp(300px, 72vw, 500px);
        margin: 48px -20px 0;
        background: url('assets/img/hero-famac-fondo.webp') no-repeat center center / cover;
    }
    .cta-container { flex-direction: column; }
    .cta-box { width: 100%; min-height: 0; padding: 26px 22px; }
    .cta-text { min-height: 0; }
    .cta-text .btn { margin-top: 4px; }
    .nosotros-hero, .contact-hero { min-height: 340px; }
    .section, .quienes-somos, .valores-section, .office-section { padding-block: 68px; }
    .section h2::before, .valores-section h2::before { margin-left: 0; }
    .section h2, .valores-section h2 { text-align: left; }
    .cta-productos { margin-inline: 0; clip-path: none; }
    .whatsapp-float,
    .whatsapp-float:hover {
        right: 18px;
        bottom: 18px;
        width: 54px;
        height: 54px;
        font-size: 25px;
    }
}
