/* ============================================
   XTINFIRE — Estilos personalizados
   Soluciones Integrales Contra Incendios
   ============================================ */

:root {
    --xf-red:        #E51E1E;
    --xf-red-dark:   #B81515;
    --xf-red-deep:   #8B0F0F;
    --xf-black:      #0A0A0A;
    --xf-dark:       #1A1A1A;
    --xf-gray:       #6c757d;
    --xf-light:      #f8f9fa;
    --xf-white:      #ffffff;
}

/* ---------- Base ---------- */
* { box-sizing: border-box; }

body {
    font-family: 'Open Sans', -apple-system, BlinkMacSystemFont, sans-serif;
    color: #2a2a2a;
    line-height: 1.6;
    overflow-x: hidden;
}

h1, h2, h3, h4, h5, h6,
.navbar-brand, .btn, .nav-link {
    font-family: 'Montserrat', sans-serif;
}

.text-danger { color: var(--xf-red) !important; }
.bg-danger   { background-color: var(--xf-red) !important; }

/* ---------- Botones ---------- */
.btn-danger {
    background-color: var(--xf-red);
    border-color: var(--xf-red);
    color: #fff;
    font-weight: 600;
    letter-spacing: 0.3px;
    transition: all 0.25s ease;
}
.btn-danger:hover,
.btn-danger:focus {
    background-color: var(--xf-red-dark);
    border-color: var(--xf-red-dark);
    transform: translateY(-1px);
    box-shadow: 0 6px 18px rgba(229, 30, 30, 0.35);
}
.btn-outline-danger {
    color: var(--xf-red);
    border: 2px solid var(--xf-red);
    background-color: #fff;
    font-weight: 600;
}
.btn-outline-danger:hover {
    background-color: var(--xf-red);
    color: #fff;
    transform: translateY(-1px);
    box-shadow: 0 6px 18px rgba(229, 30, 30, 0.25);
}
.btn-hero {
    padding: 0.75rem 1.6rem;
    border-radius: 8px;
    font-size: 1rem;
}
.btn-cotiza {
    border-radius: 8px;
    font-weight: 600;
    padding: 0.55rem 1.4rem;
}

/* ---------- Navbar ---------- */
.navbar {
    border-bottom: 1px solid rgba(0,0,0,0.05);
}
.logo-img {
    height: 42px;
    width: auto;
}
.navbar-nav .nav-link {
    color: #2a2a2a;
    font-weight: 500;
    margin: 0 0.5rem;
    position: relative;
    transition: color 0.2s;
}
.navbar-nav .nav-link:hover { color: var(--xf-red); }
.navbar-nav .nav-link.active {
    color: var(--xf-red);
    font-weight: 600;
}
.navbar-nav .nav-link.active::after {
    content: '';
    position: absolute;
    bottom: -4px;
    left: 50%;
    transform: translateX(-50%);
    width: 24px;
    height: 2px;
    background: var(--xf-red);
    border-radius: 2px;
}

/* ---------- Hero ---------- */
.hero-section {
    padding: 80px 0 60px;
    background:
        linear-gradient(120deg, #fff 0%, #fff 50%, #fff5f5 100%);
    position: relative;
    overflow: hidden;
}

.hero-title {
    font-weight: 900;
    font-size: clamp(2.2rem, 5vw, 4rem);
    line-height: 1.05;
    letter-spacing: -0.5px;
    margin-bottom: 1.2rem;
    color: var(--xf-black);
}

.hero-subtitle {
    color: #6c757d;
    font-size: 1.1rem;
    margin-bottom: 1.8rem;
    line-height: 1.5;
}

.hero-checks {
    margin-top: 1rem;
    font-size: 1rem;
    color: #2a2a2a;
}
.hero-checks li {
    padding: 0.35rem 0;
    font-weight: 500;
}
.hero-checks i {
    font-size: 1.1rem;
}

/* Hero image / X background */
.hero-image-wrapper {
    position: relative;
    min-height: 480px;
    display: flex;
    align-items: center;
    justify-content: center;
}
.hero-image-box {
    position: relative;
    width: 100%;
    height: 100%;
    min-height: 500px;
    display: flex;
    align-items: center;
    justify-content: center;
}
.hero-bg-x {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%) scale(1.4);
    width: 110%;
    max-width: 700px;
    opacity: 1;
    z-index: 1;
    mix-blend-mode: multiply;
    filter: drop-shadow(0 0 60px rgba(229, 30, 30, 0.3));
}
.hero-extintor {
    position: relative;
    z-index: 2;
    max-height: 540px;
    width: auto;
    filter: drop-shadow(0 25px 40px rgba(0, 0, 0, 0.35));
    animation: float 4s ease-in-out infinite;
}
@keyframes float {
    0%, 100% { transform: translateY(0); }
    50%      { transform: translateY(-12px); }
}

/* Smoke effect background */
.hero-section::before {
    content: '';
    position: absolute;
    top: 0;
    right: 0;
    width: 55%;
    height: 100%;
    background:
        radial-gradient(ellipse at 70% 50%, rgba(229, 30, 30, 0.18) 0%, transparent 60%),
        radial-gradient(ellipse at 90% 30%, rgba(255, 100, 100, 0.12) 0%, transparent 50%);
    z-index: 0;
    pointer-events: none;
}
.hero-section .container { position: relative; z-index: 2; }

/* ---------- Sección Servicios ---------- */
.services-section {
    padding: 80px 0;
    background: #fff;
}
.section-eyebrow {
    font-size: 0.9rem;
    letter-spacing: 2.5px;
    text-transform: uppercase;
}
.section-title {
    font-weight: 900;
    font-size: clamp(1.8rem, 4vw, 2.8rem);
    line-height: 1.1;
    letter-spacing: -0.3px;
}
.section-subtitle {
    font-size: 1.05rem;
    max-width: 640px;
    margin: 0 auto;
}

/* Tarjetas de servicio */
.service-card {
    background: #fff;
    border: 1px solid #eee;
    border-radius: 14px;
    padding: 2rem 1.5rem;
    text-align: center;
    transition: all 0.3s ease;
    box-shadow: 0 2px 8px rgba(0,0,0,0.03);
    position: relative;
    overflow: hidden;
}
.service-card::before {
    content: '';
    position: absolute;
    top: 0; left: 0;
    width: 100%;
    height: 4px;
    background: var(--xf-red);
    transform: scaleX(0);
    transform-origin: left;
    transition: transform 0.35s ease;
}
.service-card:hover {
    transform: translateY(-6px);
    box-shadow: 0 18px 35px rgba(0,0,0,0.08);
    border-color: rgba(229, 30, 30, 0.2);
}
.service-card:hover::before {
    transform: scaleX(1);
}
.service-icon {
    font-size: 3rem;
    color: var(--xf-red);
    margin-bottom: 1.2rem;
    height: 70px;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
}
.service-icon .tool-overlay {
    position: absolute;
    font-size: 1.4rem;
    bottom: 8px;
    right: calc(50% - 35px);
    color: var(--xf-red-dark);
}
.service-title {
    font-weight: 800;
    font-size: 1.05rem;
    color: var(--xf-black);
    letter-spacing: 0.3px;
    margin-bottom: 1rem;
    line-height: 1.25;
}
.service-desc {
    color: #6c757d;
    font-size: 0.92rem;
    line-height: 1.55;
    margin-bottom: 1.2rem;
}
.service-link {
    color: var(--xf-red);
    text-decoration: none;
    font-weight: 600;
    font-size: 0.9rem;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    transition: gap 0.25s;
}
.service-link:hover {
    color: var(--xf-red-dark);
    gap: 12px;
}

/* ---------- Sección Stats ---------- */
.stats-section {
    background: linear-gradient(135deg, var(--xf-red) 0%, var(--xf-red-dark) 100%);
    padding: 60px 0;
    color: #fff;
    position: relative;
    overflow: hidden;
}
.stats-section::before {
    content: '';
    position: absolute;
    inset: 0;
    background:
        radial-gradient(circle at 10% 50%, rgba(255,255,255,0.08) 0%, transparent 30%),
        radial-gradient(circle at 90% 50%, rgba(0,0,0,0.15) 0%, transparent 35%);
    pointer-events: none;
}
.stat-item {
    position: relative;
    z-index: 2;
    padding: 1rem 0.5rem;
}
.stat-icon {
    font-size: 2.2rem;
    margin-bottom: 0.8rem;
    opacity: 0.95;
}
.stat-number {
    font-weight: 900;
    font-size: 2.5rem;
    margin-bottom: 0.3rem;
    letter-spacing: -0.5px;
}
.stat-label {
    font-size: 0.95rem;
    margin-bottom: 0;
    opacity: 0.92;
    font-weight: 500;
}

/* Separadores verticales en stats (desktop) */
@media (min-width: 992px) {
    .stat-item:not(:last-child)::after {
        content: '';
        position: absolute;
        right: 0;
        top: 20%;
        height: 60%;
        width: 1px;
        background: rgba(255,255,255,0.25);
    }
}

/* ---------- Sección Nosotros / About ---------- */
.about-section {
    background: #fff;
    padding: 80px 0;
}
.about-mission-box {
    background: var(--xf-black);
    color: #fff;
    border-radius: 14px;
    padding: 3rem 2.5rem;
    text-align: center;
    box-shadow: 0 12px 30px rgba(0,0,0,0.18);
    position: relative;
    overflow: hidden;
}
.about-mission-box::after {
    content: '';
    position: absolute;
    top: -40%;
    right: -20%;
    width: 60%;
    height: 80%;
    background: radial-gradient(circle, rgba(229,30,30,0.15) 0%, transparent 70%);
    pointer-events: none;
}
.mission-logo {
    width: 90px;
    height: auto;
    margin-bottom: 1.5rem;
    position: relative;
    z-index: 2;
}
.mission-text {
    font-size: 1.05rem;
    line-height: 1.65;
    margin-bottom: 0;
    position: relative;
    z-index: 2;
    color: #f0f0f0;
}
.about-title {
    font-weight: 900;
    font-size: clamp(1.8rem, 3.5vw, 2.6rem);
    line-height: 1.1;
    margin-bottom: 1.2rem;
    letter-spacing: -0.3px;
}
.about-text {
    font-size: 1.05rem;
    line-height: 1.6;
    margin-bottom: 1.5rem;
}

/* ---------- Footer CTA ---------- */
.cta-footer {
    background: var(--xf-black);
    color: #fff;
    padding: 35px 0;
    border-top: 3px solid var(--xf-red);
}
.cta-title {
    font-weight: 800;
    font-size: 1.4rem;
    margin-bottom: 0.3rem;
    letter-spacing: 0.3px;
}
.cta-subtitle {
    color: #b8b8b8;
    font-size: 0.95rem;
}
.btn-cotiza-cta {
    padding: 0.75rem 1.8rem;
    border-radius: 8px;
    font-weight: 600;
}

/* ---------- Site Footer ---------- */
.site-footer {
    background: #050505;
    padding: 30px 0 20px !important;
    border-top: 1px solid rgba(255,255,255,0.05);
}
.footer-logo {
    height: 38px;
    width: auto;
    opacity: 0.95;
}
.site-footer p { color: #888; }

/* ---------- Responsive ---------- */
@media (max-width: 991.98px) {
    .navbar-nav { padding: 1rem 0; }
    .navbar-nav .nav-link { margin: 0.25rem 0; }
    .btn-cotiza { margin-top: 0.5rem; width: fit-content; }

    .hero-section { padding: 50px 0 30px; }
    .hero-image-wrapper { min-height: 400px; margin-top: 2rem; }
    .hero-extintor { max-height: 400px; }

    .about-mission-box { padding: 2.5rem 1.5rem; }
    .cta-footer { text-align: center; }
    .cta-footer .text-md-end { text-align: center !important; margin-top: 1rem; }
}

@media (max-width: 575.98px) {
    .hero-title    { font-size: 2.2rem; }
    .section-title { font-size: 1.8rem; }
    .stat-number   { font-size: 2rem; }
    .hero-buttons .btn { width: 100%; }
}

/* ============================================
   SECCIÓN CURSOS (DETALLE)
   ============================================ */
.courses-section {
    background: linear-gradient(180deg, #f8f9fa 0%, #ffffff 100%);
    padding: 80px 0;
}

/* Tarjetas grandes de curso */
.course-card {
    background: #fff;
    border: 1px solid #eee;
    border-radius: 14px;
    padding: 2.2rem 2rem;
    transition: all 0.3s ease;
    box-shadow: 0 2px 8px rgba(0,0,0,0.03);
    position: relative;
    overflow: hidden;
}
.course-card::before {
    content: '';
    position: absolute;
    top: 0; left: 0;
    width: 4px;
    height: 100%;
    background: var(--xf-red);
    transform: scaleY(0);
    transform-origin: top;
    transition: transform 0.4s ease;
}
.course-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 18px 40px rgba(0,0,0,0.08);
    border-color: rgba(229,30,30,0.2);
}
.course-card:hover::before {
    transform: scaleY(1);
}
.course-icon {
    width: 70px;
    height: 70px;
    border-radius: 14px;
    background: rgba(229,30,30,0.08);
    color: var(--xf-red);
    font-size: 2rem;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 1.2rem;
}
.course-title {
    font-weight: 800;
    font-size: 1.15rem;
    color: var(--xf-black);
    letter-spacing: 0.3px;
    margin-bottom: 0.7rem;
    line-height: 1.25;
}
.course-desc {
    color: #6c757d;
    font-size: 0.95rem;
    line-height: 1.55;
    margin-bottom: 1.2rem;
}
.course-list {
    list-style: none;
    padding-left: 0;
    margin-bottom: 0;
}
.course-list li {
    padding: 0.4rem 0;
    color: #2a2a2a;
    font-size: 0.92rem;
    display: flex;
    align-items: flex-start;
    gap: 10px;
    line-height: 1.45;
}
.course-list li i {
    flex-shrink: 0;
    margin-top: 4px;
    font-size: 0.95rem;
}

/* ¿Por qué elegirnos? */
.why-choose-section {
    background: #f8f9fa;
    border-radius: 18px;
    padding: 3rem 2.5rem;
    border: 1px solid #eee;
}
.why-title {
    font-weight: 900;
    font-size: clamp(1.5rem, 2.6vw, 2rem);
    line-height: 1.15;
    letter-spacing: -0.2px;
    margin-bottom: 0;
}
.why-item {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    background: #fff;
    padding: 1rem 1.2rem;
    border-radius: 10px;
    border: 1px solid #eee;
    height: 100%;
    transition: all 0.25s;
}
.why-item:hover {
    border-color: var(--xf-red);
    transform: translateX(3px);
}
.why-item i {
    font-size: 1.4rem;
    margin-top: 2px;
    flex-shrink: 0;
}
.why-item span {
    font-weight: 500;
    color: #2a2a2a;
    font-size: 0.94rem;
    line-height: 1.4;
}

/* Documentación */
.docs-title {
    font-size: clamp(1.5rem, 3vw, 2.2rem);
    color: var(--xf-black);
}
.doc-card {
    background: #fff;
    padding: 2rem 1.5rem;
    border-radius: 12px;
    text-align: center;
    border: 1px solid #eee;
    transition: all 0.3s ease;
}
.doc-card:hover {
    border-color: var(--xf-red);
    box-shadow: 0 12px 25px rgba(229,30,30,0.1);
    transform: translateY(-4px);
}
.doc-icon {
    width: 70px;
    height: 70px;
    margin: 0 auto 1.2rem;
    background: linear-gradient(135deg, var(--xf-red), var(--xf-red-dark));
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    font-size: 1.6rem;
    box-shadow: 0 8px 20px rgba(229,30,30,0.25);
}
.doc-card h4 {
    font-family: 'Montserrat', sans-serif;
    font-weight: 800;
    font-size: 1rem;
    margin-bottom: 0.5rem;
    color: var(--xf-black);
    letter-spacing: 0.3px;
}
.doc-card p {
    color: #6c757d;
    font-size: 0.88rem;
    line-height: 1.5;
    margin-bottom: 0;
}

/* Catálogo otros cursos (caja negra) */
.other-courses-box {
    background: var(--xf-black);
    color: #fff;
    border-radius: 18px;
    padding: 3rem 2.5rem;
    position: relative;
    overflow: hidden;
}
.other-courses-box::before {
    content: '';
    position: absolute;
    top: -50%;
    right: -10%;
    width: 50%;
    height: 200%;
    background: radial-gradient(circle, rgba(229,30,30,0.18) 0%, transparent 60%);
    pointer-events: none;
}
.other-courses-title {
    font-family: 'Montserrat', sans-serif;
    font-weight: 900;
    font-size: clamp(1.5rem, 3vw, 2.2rem);
    color: #fff;
    letter-spacing: 0.2px;
    margin-bottom: 0;
    position: relative;
    z-index: 2;
}
.stps-badge {
    background: var(--xf-red);
    padding: 1rem 1.3rem;
    border-radius: 12px;
    display: inline-flex;
    align-items: center;
    gap: 12px;
    color: #fff;
    box-shadow: 0 8px 20px rgba(229,30,30,0.3);
    position: relative;
    z-index: 2;
}
.stps-badge i { font-size: 1.8rem; }
.stps-badge strong {
    display: block;
    font-size: 1.3rem;
    font-weight: 800;
    line-height: 1;
    font-family: 'Montserrat', sans-serif;
}
.stps-badge span {
    font-size: 0.78rem;
    opacity: 0.95;
    font-weight: 500;
    line-height: 1.2;
}
.course-pills {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    position: relative;
    z-index: 2;
}
.course-pill {
    background: rgba(255,255,255,0.08);
    border: 1px solid rgba(255,255,255,0.15);
    color: #fff;
    padding: 0.5rem 1rem;
    border-radius: 30px;
    font-size: 0.85rem;
    font-weight: 500;
    transition: all 0.25s;
    cursor: default;
}
.course-pill:hover {
    background: var(--xf-red);
    border-color: var(--xf-red);
    transform: translateY(-2px);
}
.stps-link {
    color: rgba(255,255,255,0.7);
    text-decoration: none;
    font-size: 0.85rem;
    font-weight: 500;
    position: relative;
    z-index: 2;
    transition: color 0.25s;
}
.stps-link:hover {
    color: var(--xf-red);
}

/* ============================================
   SECCIÓN CONSULTORÍA
   ============================================ */
.consulting-section {
    background: #fff;
    padding: 80px 0;
}
.consult-card {
    background: #fff;
    border: 1px solid #eee;
    border-radius: 14px;
    padding: 2rem 1.8rem;
    position: relative;
    transition: all 0.3s;
    overflow: hidden;
}
.consult-card:hover {
    border-color: var(--xf-red);
    transform: translateY(-4px);
    box-shadow: 0 15px 35px rgba(0,0,0,0.07);
}
.consult-card.highlight {
    background: linear-gradient(135deg, var(--xf-red), var(--xf-red-dark));
    color: #fff;
    border-color: transparent;
    box-shadow: 0 12px 30px rgba(229,30,30,0.25);
}
.consult-card.highlight h4 { color: #fff; }
.consult-card.highlight p  { color: rgba(255,255,255,0.92); }
.consult-card.highlight .consult-num { color: rgba(255,255,255,0.25); }
.consult-num {
    font-family: 'Montserrat', sans-serif;
    font-weight: 900;
    font-size: 3.5rem;
    line-height: 1;
    color: rgba(229,30,30,0.12);
    position: absolute;
    top: 0.6rem;
    right: 1.2rem;
    letter-spacing: -2px;
}
.consult-card h4 {
    font-family: 'Montserrat', sans-serif;
    font-weight: 800;
    font-size: 1.1rem;
    margin-bottom: 0.7rem;
    color: var(--xf-black);
    position: relative;
    z-index: 2;
    letter-spacing: 0.2px;
    line-height: 1.25;
}
.consult-card p {
    color: #6c757d;
    font-size: 0.92rem;
    line-height: 1.55;
    margin-bottom: 0;
    position: relative;
    z-index: 2;
}

/* Responsive cursos / consultoría */
@media (max-width: 767.98px) {
    .courses-section,
    .consulting-section { padding: 60px 0; }
    .why-choose-section { padding: 2rem 1.5rem; }
    .other-courses-box  { padding: 2rem 1.5rem; }
    .stps-badge {
        width: 100%;
        justify-content: center;
        margin-top: 0.5rem;
    }
}

/* ---------- Animaciones de entrada ---------- */
.fade-in-up {
    opacity: 0;
    transform: translateY(20px);
    animation: fadeInUp 0.8s ease forwards;
}
@keyframes fadeInUp {
    to { opacity: 1; transform: translateY(0); }
}
.hero-text       { animation: fadeInUp 0.8s ease 0.1s forwards; opacity: 0; }
.hero-image-wrapper { animation: fadeInUp 0.8s ease 0.3s forwards; opacity: 0; }
