/* ============================================================
   Marhex Soluciones — capa de diseño moderna
   Se carga DESPUÉS de main.css y solo refina: colores de marca
   (rojo del logo #A02D2B), tarjetas, hero y micro-interacciones.
   ============================================================ */

:root {
    --mx-red: #A02D2B;
    --mx-red-bright: #C43B38;
    --mx-red-dark: #7E211F;
    --mx-ink: #2B1D1E;
    --mx-gray: #6B6264;
    --mx-paper: #F7F5F4;
    --mx-radius: 16px;
    --mx-shadow: 0 10px 30px rgba(43, 29, 30, 0.10);
    --mx-shadow-lg: 0 22px 45px rgba(43, 29, 30, 0.16);
}

html { scroll-behavior: smooth; }
body { font-family: "Open Sans", Helvetica, Arial, sans-serif; color: var(--mx-ink); overflow-x: hidden; }

/* ---------- Botones: del naranja genérico al rojo de marca ---------- */
.btn { border-radius: 999px; padding: 12px 34px; font-weight: 700; letter-spacing: .3px; transition: all .25s ease; }
.btn-action,
.btn-primary {
    color: #fff;
    background: var(--mx-red);
    box-shadow: 0 4px 12px rgba(43, 29, 30, 0.25);
    text-shadow: none;
    border: 0;
}
.btn-action:hover, .btn-action:focus,
.btn-primary:hover, .btn-primary:focus {
    color: #fff;
    background: var(--mx-red-dark);
    transform: translateY(-2px);
    box-shadow: 0 6px 16px rgba(43, 29, 30, 0.3);
}
.btn-action:active, .btn-primary:active { transform: translateY(0); background: var(--mx-red-dark); }

.btn-ghost {
    color: #fff;
    background: rgba(255, 255, 255, 0.08);
    box-shadow: inset 0 0 0 2px rgba(255, 255, 255, 0.55);
}
.btn-ghost:hover, .btn-ghost:focus { color: #fff; background: rgba(255, 255, 255, 0.16); box-shadow: inset 0 0 0 2px #fff; transform: translateY(-2px); }

/* ---------- Navbar ---------- */
.navbar-inverse {
    background: rgba(20, 13, 15, 0.92);
    -webkit-backdrop-filter: blur(10px);
    backdrop-filter: blur(10px);
    border: 0;
    box-shadow: 0 1px 0 rgba(255, 255, 255, 0.06);
}
.navbar-inverse .navbar-nav > li > a { color: rgba(255, 255, 255, 0.78); font-weight: 600; letter-spacing: .2px; transition: color .2s; }
.navbar-inverse .navbar-nav > li > a:hover,
.navbar-inverse .navbar-nav > li > a:focus { color: #fff; background: transparent; }
.navbar-inverse .navbar-nav > .active > a,
.navbar-inverse .navbar-nav > .active > a:hover,
.navbar-inverse .navbar-nav > .active > a:focus {
    color: #fff;
    background: transparent;
    box-shadow: inset 0 -3px 0 var(--mx-red-bright);
}
.navbar-inverse .navbar-nav > li > a.btn {
    margin: 9px 0 0 12px;
    padding: 7px 22px;
    color: #fff;
    background: linear-gradient(135deg, var(--mx-red-bright), var(--mx-red-dark));
    border-radius: 999px;
    box-shadow: 0 6px 16px rgba(160, 45, 43, 0.4);
}
.navbar-inverse .navbar-nav > li > a.btn:hover { transform: translateY(-1px); box-shadow: 0 8px 20px rgba(160, 45, 43, 0.55); }

/* ---------- Hero ---------- */
#head {
    position: relative;
    min-height: clamp(560px, 92vh, 820px);
    display: flex;
    align-items: center;
    justify-content: center;
    padding-top: 70px;
    background: #181015 url(../images/bg_header_refinery_d.jpg) no-repeat center center;
    background-size: cover;
    overflow: hidden;
}
#head::before {
    content: "";
    position: absolute;
    inset: 0;
    background:
        radial-gradient(1100px 480px at 50% 118%, rgba(160, 45, 43, 0.55) 0%, rgba(160, 45, 43, 0) 62%),
        linear-gradient(180deg, rgba(15, 9, 11, 0.72) 0%, rgba(15, 9, 11, 0.35) 45%, rgba(15, 9, 11, 0.82) 100%);
}
#head .container { position: relative; z-index: 1; }

.hero-eyebrow {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex-wrap: wrap;
    max-width: 100%;
    text-align: center;
    gap: 10px;
    color: #fff;
    background: rgba(255, 255, 255, 0.09);
    border: 1px solid rgba(255, 255, 255, 0.22);
    border-radius: 999px;
    padding: 8px 20px;
    font-size: 13px;
    font-weight: 600;
    letter-spacing: 1.4px;
    text-transform: uppercase;
    -webkit-backdrop-filter: blur(6px);
    backdrop-filter: blur(6px);
    margin-bottom: 28px;
}
.hero-eyebrow i { color: var(--mx-red-bright); }

#head .lead {
    font-size: 60px;
    font-weight: 800;
    letter-spacing: -1px;
    margin: 0 0 18px;
    text-shadow: 0 3px 24px rgba(0, 0, 0, 0.45);
}
#head .lead .accent { color: var(--mx-red-bright); }

#head .tagline {
    font-size: 18px;
    line-height: 1.75;
    color: rgba(255, 255, 255, 0.82);
    max-width: 780px;
    margin: 0 auto 38px;
}

.hero-actions { display: flex; gap: 16px; justify-content: center; flex-wrap: wrap; }

.hero-scroll {
    position: absolute;
    left: 50%;
    bottom: 26px;
    transform: translateX(-50%);
    z-index: 1;
    color: rgba(255, 255, 255, 0.65);
    font-size: 22px;
    animation: mx-bounce 2.2s infinite;
}
.hero-scroll:hover, .hero-scroll:focus { color: #fff; }
@keyframes mx-bounce {
    0%, 100% { transform: translate(-50%, 0); }
    50% { transform: translate(-50%, 9px); }
}

/* ---------- Franja de stats bajo el hero ---------- */
.stats-band { position: relative; z-index: 2; margin-top: -64px; }
.stats-card {
    background: #fff;
    border-radius: var(--mx-radius);
    box-shadow: var(--mx-shadow-lg);
    padding: 8px 18px 22px;
    text-align: center;
    border-top: 4px solid var(--mx-red);
}
.stats-card .num { font-size: 40px; font-weight: 800; color: var(--mx-red); letter-spacing: -1px; }
.stats-card .lbl { color: var(--mx-gray); font-weight: 600; font-size: 14px; margin-top: 2px; }

/* ---------- Títulos de sección ---------- */
.section-title { font-weight: 800; letter-spacing: -0.5px; color: var(--mx-ink); margin-bottom: 12px; }
.section-title::after {
    content: "";
    display: block;
    width: 64px;
    height: 4px;
    border-radius: 4px;
    background: linear-gradient(90deg, var(--mx-red-bright), var(--mx-red-dark));
    margin: 16px auto 0;
}
.section-kicker { color: var(--mx-red); font-weight: 700; text-transform: uppercase; letter-spacing: 2px; font-size: 13px; margin-bottom: 6px; }

/* ---------- Intro / cita ---------- */
.intro-quote {
    position: relative;
    max-width: 820px;
    margin: 26px auto 0;
    padding: 26px 34px;
    background: var(--mx-paper);
    border-left: 5px solid var(--mx-red);
    border-radius: 0 var(--mx-radius) var(--mx-radius) 0;
    color: var(--mx-gray);
    font-size: 16px;
    line-height: 1.8;
    font-style: italic;
}
.intro-quote .fa-quote-left { color: rgba(160, 45, 43, 0.25); font-size: 30px; margin-right: 10px; }

/* ---------- ¿Por qué elegirnos? ---------- */
.why-section { background: linear-gradient(180deg, #fff 0%, var(--mx-paper) 100%); padding: 80px 0 90px; margin: 0; border: 0; }
.why-card {
    background: #fff;
    border: 1px solid rgba(43, 29, 30, 0.06);
    border-radius: var(--mx-radius);
    box-shadow: var(--mx-shadow);
    padding: 34px 26px 30px;
    text-align: center;
    height: 100%;
    transition: transform .28s ease, box-shadow .28s ease;
}
.why-card:hover { transform: translateY(-8px); box-shadow: var(--mx-shadow-lg); }
.why-card .icon-ring {
    width: 84px;
    height: 84px;
    margin: 0 auto 22px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    background: radial-gradient(circle at 30% 25%, rgba(43, 29, 30, 0.10), rgba(43, 29, 30, 0.045));
    box-shadow: inset 0 0 0 2px rgba(43, 29, 30, 0.12);
}
.why-card .icon-ring i { font-size: 34px; color: var(--mx-red); margin: 0; display: block; }
.why-card h3 { font-size: 18px; font-weight: 800; color: var(--mx-ink); margin: 0 0 10px; }
.why-card p { color: var(--mx-gray); font-size: 14.5px; line-height: 1.7; margin: 0; }
.why-grid { display: flex; flex-wrap: wrap; }
.why-grid [class*="col-"] { display: flex; margin-bottom: 30px; }
.why-grid .why-card { width: 100%; }

/* ---------- Servicios ---------- */
.services-section { padding: 84px 0 40px; }
.service-item {
    display: flex;
    align-items: flex-start;
    gap: 14px;
    padding: 13px 14px;
    border-radius: 12px;
    transition: background .2s ease, transform .2s ease;
}
.service-item:hover { background: var(--mx-paper); transform: translateX(4px); }
.service-item .svc-icon {
    flex: 0 0 42px;
    width: 42px;
    height: 42px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, rgba(43, 29, 30, 0.09), rgba(43, 29, 30, 0.04));
    color: #5C5456;
    font-size: 17px;
    box-shadow: inset 0 0 0 1.5px rgba(43, 29, 30, 0.10);
}
.service-item .svc-text { font-weight: 600; color: var(--mx-ink); font-size: 14.5px; line-height: 1.45; padding-top: 10px; }

.services-media { position: relative; padding: 10px 0 46px 0; }
.services-media img { border-radius: var(--mx-radius); box-shadow: var(--mx-shadow-lg); width: 100%; height: auto; }
.services-media .media-secondary {
    position: absolute;
    right: -14px;
    bottom: 0;
    width: 62%;
    border: 5px solid #fff;
    border-radius: var(--mx-radius);
}
.services-media .media-badge {
    position: absolute;
    top: 18px;
    left: 18px;
    background: rgba(20, 13, 15, 0.82);
    color: #fff;
    padding: 8px 16px;
    border-radius: 999px;
    font-size: 12.5px;
    font-weight: 700;
    letter-spacing: 1px;
    text-transform: uppercase;
    -webkit-backdrop-filter: blur(4px);
    backdrop-filter: blur(4px);
}
.services-media .media-badge i { color: var(--mx-red-bright); margin-right: 7px; }

/* ---------- Banda CTA ---------- */
.cta-band {
    position: relative;
    margin-top: 60px;
    padding: 92px 0;
    background: #181015 url(../images/tanker-ship.jpg) no-repeat center 62%;
    background-size: cover;
    text-align: center;
    color: #fff;
}
.cta-band::before {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(100deg, rgba(126, 33, 31, 0.92) 0%, rgba(43, 29, 30, 0.86) 60%, rgba(20, 13, 15, 0.88) 100%);
}
.cta-band .container { position: relative; z-index: 1; }
.cta-band h2 { font-weight: 800; font-size: 34px; margin: 0 0 12px; letter-spacing: -0.5px; }
.cta-band p { color: rgba(255, 255, 255, 0.85); font-size: 17px; margin-bottom: 30px; }
.cta-band .btn-light {
    color: var(--mx-red-dark);
    background: #fff;
    box-shadow: 0 12px 28px rgba(0, 0, 0, 0.35);
    font-weight: 800;
}
.cta-band .btn-light:hover { transform: translateY(-2px); color: var(--mx-red); box-shadow: 0 16px 34px rgba(0, 0, 0, 0.45); }

/* ---------- Footer ---------- */
#footer { margin-top: 0; }
.footer1 { background: #1D1416; border-top: 4px solid var(--mx-red); padding: 46px 0 10px; font-size: 13px; }
.footer1 .widget-title { color: #fff; letter-spacing: .5px; }
.footer1 .widget-title::after { content: ""; display: block; width: 34px; height: 3px; background: var(--mx-red); border-radius: 3px; margin-top: 8px; }
.footer2 { background: #150E10; }
.follow-me-icons a {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 42px;
    height: 42px;
    margin-right: 10px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.07);
    color: #ddd;
    font-size: 17px;
    transition: all .22s ease;
    box-shadow: inset 0 0 0 1.5px rgba(255, 255, 255, 0.14);
}
.follow-me-icons a:hover { background: var(--mx-red); color: #fff; transform: translateY(-3px); }
.follow-me-icons i { float: none; margin: 0; }

/* ---------- Animaciones de aparición ---------- */
.reveal { opacity: 0; transform: translateY(26px); transition: opacity .7s ease, transform .7s ease; }
.reveal.in { opacity: 1; transform: none; }
.reveal-d1 { transition-delay: .08s; }
.reveal-d2 { transition-delay: .16s; }
.reveal-d3 { transition-delay: .24s; }
@media (prefers-reduced-motion: reduce) {
    html { scroll-behavior: auto; }
    .reveal { opacity: 1; transform: none; transition: none; }
    .hero-scroll { animation: none; }
}

/* ---------- Responsive ---------- */
@media (max-width: 991px) {
    .stats-band { margin-top: -44px; }
    .stats-card { margin-bottom: 16px; }
    .services-media { margin-bottom: 34px; }
}
@media (max-width: 767px) {
    #head { min-height: clamp(520px, 86vh, 700px); padding-top: 90px; }
    #head .lead { font-size: 34px; }
    #head .tagline { font-size: 15.5px; padding: 0 10px; }
    #head .tagline br { display: none; }
    .hero-eyebrow { font-size: 11px; letter-spacing: 1px; padding: 7px 16px; }
    .cta-band h2 { font-size: 26px; }
    .services-media .media-secondary { display: none; }
}

/* ---------- Página de contacto ---------- */
.page-hero {
    position: relative;
    background: #181015 url(../images/bg_header_refinery_d.jpg) no-repeat center 30%;
    background-size: cover;
    padding: 150px 0 74px;
    text-align: center;
    color: #fff;
}
.page-hero::before {
    content: "";
    position: absolute;
    inset: 0;
    background:
        radial-gradient(900px 380px at 50% 125%, rgba(160, 45, 43, 0.5) 0%, rgba(160, 45, 43, 0) 60%),
        linear-gradient(180deg, rgba(15, 9, 11, 0.8) 0%, rgba(15, 9, 11, 0.55) 100%);
}
.page-hero .container { position: relative; z-index: 1; }
.page-hero h1 { font-size: 44px; font-weight: 800; letter-spacing: -0.5px; margin: 0 0 14px; }
.page-hero p { color: rgba(255, 255, 255, 0.82); font-size: 16px; line-height: 1.75; max-width: 760px; margin: 0 auto; }

.contact-wrap { padding: 54px 0 26px; }

.contact-card {
    background: #fff;
    border: 1px solid rgba(43, 29, 30, 0.06);
    border-radius: var(--mx-radius);
    box-shadow: var(--mx-shadow);
    padding: 34px 36px 36px;
    margin-bottom: 30px;
}
.contact-card-title { font-size: 21px; font-weight: 800; margin: 0 0 24px; color: var(--mx-ink); }
.contact-card-title i { color: var(--mx-red); margin-right: 8px; }

.contact-label { display: block; font-size: 13px; font-weight: 700; color: var(--mx-ink); margin-bottom: 7px; }
.contact-label .req { color: var(--mx-red); }
.contact-input.form-control {
    height: auto;
    padding: 12px 16px;
    font-size: 14.5px;
    border-radius: 12px;
    border: 1.5px solid rgba(43, 29, 30, 0.14);
    box-shadow: none;
    transition: border-color .2s ease, box-shadow .2s ease;
}
textarea.contact-input.form-control { border-radius: 14px; resize: vertical; }
.contact-input.form-control:focus {
    border-color: var(--mx-red);
    box-shadow: 0 0 0 3px rgba(160, 45, 43, 0.14);
    outline: none;
}
.contact-actions { margin-top: 24px; text-align: right; }
.contact-alert { border-radius: 12px; padding: 14px 18px; }
.contact-alert i { margin-right: 6px; }

.contact-info-card {
    display: flex;
    gap: 16px;
    align-items: flex-start;
    background: #fff;
    border: 1px solid rgba(43, 29, 30, 0.06);
    border-radius: var(--mx-radius);
    box-shadow: var(--mx-shadow);
    padding: 22px 22px;
    margin-bottom: 18px;
}
.contact-info-card .cic-icon {
    flex: 0 0 52px;
    width: 52px;
    height: 52px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    background: radial-gradient(circle at 30% 25%, rgba(43, 29, 30, 0.10), rgba(43, 29, 30, 0.045));
    box-shadow: inset 0 0 0 2px rgba(43, 29, 30, 0.12);
}
.contact-info-card .cic-icon i { font-size: 20px; color: var(--mx-red); }
.contact-info-card h3 { font-size: 15px; font-weight: 800; color: var(--mx-ink); margin: 4px 0 6px; }
.contact-info-card p { color: var(--mx-gray); font-size: 13.5px; line-height: 1.7; margin: 0; }
.contact-info-card a { color: var(--mx-red); font-weight: 600; }
.contact-info-card a:hover { color: var(--mx-red-dark); }

.contact-map {
    margin: 26px 0 10px;
    border-radius: var(--mx-radius);
    overflow: hidden;
    box-shadow: var(--mx-shadow);
    border: 1px solid rgba(43, 29, 30, 0.08);
}
.contact-map iframe { display: block; }

@media (max-width: 767px) {
    .page-hero { padding: 120px 0 56px; }
    .page-hero h1 { font-size: 32px; }
    .contact-card { padding: 24px 20px; }
    .contact-actions { text-align: center; }
    .contact-actions .btn { width: 100%; }
}

/* Botón de envío del formulario de contacto: outline rojo de marca, sin fondo */
.contact-actions .btn-action {
    color: var(--mx-red);
    background: transparent;
    border: 2px solid var(--mx-red);
    box-shadow: none;
}
.contact-actions .btn-action:hover,
.contact-actions .btn-action:focus {
    color: var(--mx-red-dark);
    background: rgba(160, 45, 43, 0.06);
    border-color: var(--mx-red-dark);
    box-shadow: none;
}
.contact-actions .btn-action:active { background: rgba(160, 45, 43, 0.12); }
