/* ======================================================
   TECDIMEX — Variables de marca y override de BeAgency 4
   Paleta oficial brandbook v1 (julio 2025)
   ====================================================== */

:root {
    --primary:      #6545C7;   /* violeta acento: botones, links, iconos */
    --primary-dark: #5537B0;   /* hover/pressed */
    --dark:         #332B5C;   /* azul marino: header, footer, tarjetas oscuras */
    --darker:       #1E1436;   /* índigo profundo: extremo oscuro del gradiente */
    --white:        #FFFFFF;
}

/* ── 1. Reemplazo del rosa de la plantilla (#F74371) ─────── */

.action_button,
.action_button:visited {
    background-color: var(--primary) !important;
    border-color:     var(--primary) !important;
    color:            var(--white)   !important;
}
.action_button:hover,
.action_button:focus {
    background-color: var(--primary-dark) !important;
    border-color:     var(--primary-dark) !important;
}

.color,
.accent-color,
a.color,
.style-simple .color {
    color: var(--primary) !important;
}

.border-color,
.style-simple .border-color {
    border-color: var(--primary) !important;
}

.icon_box .icon i,
.feature_list ul li .item_icon i {
    color: var(--primary) !important;
}

/* ── 1b. Suprimir imagen de be_style.css que no existe ───── */

/* be_style.css usa home_slider.jpg como fondo decorativo del header wrapper
   en páginas sin slider; nuestro header es siempre solid dark, no la necesitamos */
body:not(.template-slider) #Header_wrapper {
    background-image: none !important;
}

/* ── 2. Header — fondo sólido siempre (WCAG AA) ─────────── */

#Header,
#Header #Top_bar,
#Header .top_bar_left,
#Header .top_bar_right_wrapper {
    background-color: var(--dark) !important;
    border-bottom: none !important;
}

/* Sticky: mismo fondo oscuro + sombra sutil */
#Header.scrolled #Top_bar,
.sticky-header #Top_bar.is-sticky,
.sticky-header.sticky-tb-color #Top_bar.is-sticky {
    background-color: var(--dark) !important;
    box-shadow: 0 2px 16px rgba(0,0,0,0.35) !important;
}

/* Nav links: blanco rgba para estado normal */
#Header #menu > ul > li > a,
#Header .menu_wrapper #menu > ul > li > a {
    color: rgba(255,255,255,.85) !important;
}

/* Hover y activo: blanco puro con subrayado violeta */
#Header #menu > ul > li > a:hover,
#Header #menu > ul > li.current-menu-item > a,
#Header #menu > ul > li.current-menu-ancestor > a {
    color: #fff !important;
    text-decoration: underline !important;
    text-decoration-color: var(--primary) !important;
    text-underline-offset: 4px !important;
}

/* Botón CTA del header: fondo violeta sobre el dark */
#Header .action_button,
#Header .top_bar_right .action_button {
    background-color: var(--primary) !important;
    border-color:     var(--primary) !important;
    color:            #fff !important;
}
#Header .action_button:hover {
    background-color: var(--primary-dark) !important;
}

/* Ícono hamburguesa móvil: blanco */
#Header .responsive-menu-toggle i,
#Header a.responsive-menu-toggle i {
    color: #fff !important;
}

/* ── 2b. Side slide (menú móvil) ───────────────────────── */

#Side_slide {
    background-color: var(--dark) !important;
    border-bottom-color: var(--darker) !important;
    border-top-color: var(--darker) !important;
}
#Side_slide #menu ul li a,
#Side_slide .close-wrapper a.close i {
    color: rgba(255,255,255,.85) !important;
}
#Side_slide #menu ul li a:hover {
    color: #fff !important;
}
#Side_slide .extras .action_button {
    background-color: var(--primary) !important;
    border-color: var(--primary) !important;
    color: #fff !important;
}

/* ── 2c. Mobile: logo y header ─────────────────────────── */

/* Logo contenido dentro del header mini en móvil */
@media (max-width: 1239px) {
    .mobile-header-mini #Top_bar #logo img {
        max-height: 38px !important;
        width: auto !important;
    }
    /* Ocultar botón demo en header mini para evitar solapamiento */
    .mobile-header-mini #Top_bar .top_bar_right .action_button {
        display: none !important;
    }
}

/* ── 2d. Cards: botones visibles en touch (sin hover) ──── */

/* Dispositivos táctiles: mostrar botones sin necesidad de hover */
@media (hover: none) {
    .product-card .product-card__cta,
    .product-card .action_button {
        opacity: 1 !important;
        visibility: visible !important;
        display: inline-block !important;
    }
}
/* Fallback por ancho para navegadores sin soporte de @media hover */
@media (max-width: 767px) {
    .product-card .action_button {
        opacity: 1 !important;
        display: inline-block !important;
    }
}

/* ── 3. Logo ────────────────────────────────────────────── */

#logo img {
    height: 38px !important;
    width: auto !important;
}

/* Texto provisional: queda oculto cuando se usa <img> */
.tecdimex-logo-text {
    font-family: 'Montserrat', sans-serif;
    font-weight: 700;
    font-size: 22px;
    color: #fff !important;
    letter-spacing: 2px;
    text-decoration: none !important;
    display: inline-block;
    padding: 5px 0;
}
.tecdimex-logo-text--footer {
    color: var(--white) !important;
    font-size: 20px;
}

/* ── 4. Hero TECDIMEX ────────────────────────────────────── */

.tecdimex-hero {
    background: linear-gradient(135deg, var(--primary) 0%, var(--darker) 100%);
    min-height: 700px;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    padding: 120px 20px 80px;
    position: relative;
}

.tecdimex-hero__content {
    max-width: 780px;
    margin: 0 auto;
}

.tecdimex-hero__eyebrow {
    font-family: 'Nunito Sans', sans-serif;
    font-size: 13px;
    font-weight: 700;
    letter-spacing: 4px;
    text-transform: uppercase;
    color: rgba(255,255,255,0.75);
    margin-bottom: 16px;
}

.tecdimex-hero__title {
    font-family: 'Nunito Sans', sans-serif;
    font-size: 52px;
    font-weight: 700;
    line-height: 1.15;
    color: var(--white);
    margin-bottom: 24px;
}

.tecdimex-hero__subtitle {
    font-size: 18px;
    line-height: 1.7;
    color: rgba(255,255,255,0.85);
    margin-bottom: 40px;
}

.tecdimex-hero__actions {
    display: flex;
    gap: 16px;
    justify-content: center;
    flex-wrap: wrap;
}

.btn-outline-hero {
    display: inline-block;
    padding: 12px 36px;
    border: 2px solid rgba(255,255,255,0.7);
    border-radius: 25px;
    color: var(--white) !important;
    font-size: 15px;
    font-weight: 600;
    text-decoration: none;
    transition: all 0.25s ease;
}
.btn-outline-hero:hover {
    background: rgba(255,255,255,0.15);
    border-color: var(--white);
}

/* ── 5. Sección CTA central ──────────────────────────────── */

.tecdimex-cta-section {
    background: linear-gradient(135deg, var(--primary) 0%, var(--darker) 100%) !important;
}

/* ── 6. Footer ───────────────────────────────────────────── */

#Footer {
    background-color: var(--dark) !important;
    color: rgba(255,255,255,0.75);
}

#Footer h6 {
    color: var(--white);
    font-weight: 700;
    margin-bottom: 12px;
}

#Footer a:hover {
    color: var(--white) !important;
}

.footer_copy {
    background-color: rgba(0,0,0,0.25) !important;
}

/* ── 7. Cards ────────────────────────────────────────────── */

.card {
    border: 1px solid #e5e5e5;
    border-radius: 8px;
    box-shadow: 0 2px 12px rgba(0,0,0,0.06);
    transition: box-shadow 0.2s ease;
}
.card:hover {
    box-shadow: 0 4px 24px rgba(101,69,199,0.14);
}

@media (max-width: 768px) {
    .tecdimex-hero__title { font-size: 34px; }
    .tecdimex-hero { min-height: 500px; }
}

/* ── 8. Page header (páginas internas) ───────────────────── */

.page-header-section {
    background: linear-gradient(135deg, var(--primary) 0%, var(--darker) 100%);
    padding: 140px 0 80px;
    text-align: left;
    position: relative;
    overflow: hidden;
}
.page-header-section h1 {
    color: var(--white);
    font-size: 42px;
    font-weight: 700;
    margin-bottom: 12px;
}
.page-header-section p {
    color: rgba(255,255,255,0.8);
    font-size: 18px;
    margin: 0;
}
/* Formas decorativas: reutiliza @keyframes heroFloat del hero principal */
.page-header-section::before {
    content: '';
    position: absolute;
    width: 420px; height: 420px;
    background: rgba(255,255,255,0.05);
    border-radius: 50%;
    top: -140px; right: -80px;
    animation: heroFloat 9s ease-in-out infinite;
    pointer-events: none;
}
.page-header-section::after {
    content: '';
    position: absolute;
    width: 240px; height: 240px;
    background: rgba(255,255,255,0.04);
    border-radius: 50%;
    bottom: -60px; left: 8%;
    animation: heroFloat 13s ease-in-out infinite reverse;
    pointer-events: none;
}
/* prefers-reduced-motion: quitar animaciones de shapes */
@media (prefers-reduced-motion: reduce) {
    .page-header-section::before,
    .page-header-section::after { animation: none; }
}

/* ── 9. Product status badges ───────────────────────────── */

.product-status-badge {
    display: inline-block;
    padding: 3px 10px;
    border-radius: 20px;
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 0.5px;
    text-transform: uppercase;
    margin-bottom: 10px;
}
.badge-produccion  { background: #e8f7ef; color: #1a7a45; }
.badge-desarrollo  { background: #fff4e5; color: #b35c00; }
.badge-proximamente{ background: #f0f0f0; color: #666; }

/* ── 10. Product card ────────────────────────────────────── */

.product-card {
    border: 1px solid #e8e8ef;
    border-radius: 10px;
    padding: 32px 28px;
    height: 100%;
    display: flex;
    flex-direction: column;
    transition: box-shadow 0.25s ease, transform 0.2s ease;
    background: #fff;
}
.product-card:hover {
    box-shadow: 0 8px 32px rgba(101,69,199,0.14);
    transform: translateY(-3px);
}
.product-card__icon {
    width: 64px;
    height: 64px;
    border-radius: 12px;
    background: linear-gradient(135deg, var(--dark), var(--primary));
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 18px;
    font-size: 28px;
    color: #fff;
    flex-shrink: 0;
}
.product-card__title {
    font-size: 20px;
    font-weight: 700;
    color: var(--dark);
    margin-bottom: 8px;
}
.product-card__tagline {
    color: #666;
    font-size: 14px;
    line-height: 1.6;
    flex-grow: 1;
    margin-bottom: 20px;
}
.product-card__cta {
    margin-top: auto;
}

.category-section-title {
    font-size: 13px;
    font-weight: 700;
    letter-spacing: 3px;
    text-transform: uppercase;
    color: var(--primary);
    border-bottom: 2px solid var(--primary);
    padding-bottom: 8px;
    margin-bottom: 30px;
    display: inline-block;
}

/* ── 11. Product detail ──────────────────────────────────── */

.product-hero {
    min-height: 480px;
    display: flex;
    align-items: flex-end;
    padding: 140px 0 60px;
    background: linear-gradient(135deg, var(--primary) 0%, var(--darker) 100%);
    position: relative;
}
.product-hero__img {
    position: absolute;
    inset: 0;
    object-fit: cover;
    width: 100%;
    height: 100%;
    opacity: 0.25;
}
.product-hero__content {
    position: relative;
    z-index: 1;
}
.product-hero__eyebrow {
    font-size: 12px;
    font-weight: 700;
    letter-spacing: 3px;
    text-transform: uppercase;
    color: rgba(255,255,255,0.7);
    margin-bottom: 10px;
}
.product-hero__title {
    font-size: 46px;
    font-weight: 700;
    color: #fff;
    line-height: 1.15;
    margin-bottom: 16px;
}
.product-hero__tagline {
    font-size: 19px;
    color: rgba(255,255,255,0.85);
    font-style: italic;
    margin-bottom: 0;
}
.product-hero__badge {
    position: absolute;
    top: 30px;
    right: 30px;
}

.section-label {
    font-size: 12px;
    font-weight: 700;
    letter-spacing: 3px;
    text-transform: uppercase;
    color: var(--primary);
    margin-bottom: 12px;
}

.feature-item {
    display: flex;
    gap: 18px;
    align-items: flex-start;
    padding: 20px 0;
    border-bottom: 1px solid #f0f0f0;
}
.feature-item:last-child { border-bottom: none; }
.feature-item__icon {
    width: 44px;
    height: 44px;
    border-radius: 8px;
    background: linear-gradient(135deg, var(--dark), var(--primary));
    display: flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    font-size: 20px;
    flex-shrink: 0;
}
.feature-item__title {
    font-size: 16px;
    font-weight: 700;
    color: var(--dark);
    margin-bottom: 4px;
}
.feature-item__desc {
    color: #666;
    font-size: 14px;
    line-height: 1.6;
    margin: 0;
}

.compliance-box {
    background: #f5f3fc;
    border-left: 4px solid var(--primary);
    padding: 24px 28px;
    border-radius: 0 8px 8px 0;
}

/* ── 12. Stats ───────────────────────────────────────────── */

.stat-item { text-align: center; padding: 20px; }
.stat-item__number {
    font-size: 52px;
    font-weight: 700;
    color: var(--primary);
    line-height: 1;
    margin-bottom: 8px;
}
.stat-item__label {
    font-size: 14px;
    color: #666;
    font-weight: 600;
}

/* ── 13. Service cards ───────────────────────────────────── */

.service-row {
    padding: 60px 0;
    border-bottom: 1px solid #f0f0f0;
}
.service-row:last-child { border-bottom: none; }
.service-icon-box {
    width: 80px;
    height: 80px;
    border-radius: 16px;
    background: linear-gradient(135deg, var(--dark), var(--primary));
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 38px;
    color: #fff;
    margin-bottom: 24px;
}

/* ── 14. CTA demo strip ──────────────────────────────────── */

.cta-demo-strip {
    background: linear-gradient(135deg, var(--primary) 0%, var(--darker) 100%);
    padding: 70px 0;
    text-align: center;
}
.cta-demo-strip h2 { color: #fff; margin-bottom: 12px; }
.cta-demo-strip p  { color: rgba(255,255,255,0.85); font-size: 17px; margin-bottom: 30px; }
.btn-white {
    background: #fff;
    color: var(--primary) !important;
    padding: 13px 40px;
    border-radius: 25px;
    font-weight: 700;
    text-decoration: none;
    display: inline-block;
    transition: box-shadow 0.2s;
}
.btn-white:hover { box-shadow: 0 4px 20px rgba(0,0,0,0.18); }

/* ── 15. Accesibilidad ───────────────────────────────────── */

:focus-visible {
    outline: 3px solid var(--primary);
    outline-offset: 3px;
    border-radius: 2px;
}

.skip-link {
    position: absolute;
    top: -100%;
    left: 16px;
    background: var(--dark);
    color: #fff !important;
    padding: 10px 20px;
    border-radius: 0 0 6px 6px;
    font-weight: 700;
    z-index: 10000;
    text-decoration: none;
}
.skip-link:focus { top: 0; }

.form-control.is-invalid {
    border-color: #c0392b;
    box-shadow: 0 0 0 3px rgba(192,57,43,0.15);
}
.invalid-feedback {
    display: block;
    color: #c0392b;
    font-size: 0.85rem;
    margin-top: 4px;
}

img { max-width: 100%; height: auto; }

/* ── 16. Blog cards ──────────────────────────────────────── */

.blog-card {
    background: #fff;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 2px 16px rgba(0,0,0,.07);
    height: 100%;
    display: flex;
    flex-direction: column;
    transition: box-shadow 0.25s ease, transform 0.2s ease;
}
.blog-card:hover {
    box-shadow: 0 8px 32px rgba(101,69,199,.14);
    transform: translateY(-3px);
}
.blog-card__thumb {
    display: block;
    height: 200px;
    overflow: hidden;
    background: linear-gradient(135deg, var(--dark), var(--primary));
    flex-shrink: 0;
}
.blog-card__thumb img { transition: transform 0.4s ease; }
.blog-card:hover .blog-card__thumb img { transform: scale(1.04); }
.blog-card__thumb--placeholder {
    display: flex;
    align-items: center;
    justify-content: center;
}
.blog-card__body {
    padding: 24px;
    flex: 1;
    display: flex;
    flex-direction: column;
}
.blog-card__date {
    font-size: 12px;
    color: var(--primary);
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: .5px;
    margin-bottom: 8px;
}
.blog-card__title {
    font-size: 1.05rem;
    font-weight: 700;
    color: var(--dark);
    margin-bottom: 12px;
    line-height: 1.4;
    flex-grow: 1;
}
.blog-card__title a {
    color: inherit;
    text-decoration: none;
}
.blog-card__title a:hover { color: var(--primary); }
.blog-card__excerpt {
    color: #666;
    font-size: .9rem;
    line-height: 1.6;
    margin-bottom: 16px;
}
.blog-card__link {
    color: var(--primary);
    font-weight: 700;
    font-size: .9rem;
    text-decoration: none;
    margin-top: auto;
}
.blog-card__link:hover { color: var(--primary-dark); }

/* ── 17. Contacto ────────────────────────────────────────── */

.contact-info-item {
    display: flex;
    gap: 16px;
    align-items: flex-start;
    margin-bottom: 24px;
}
.contact-info-item__icon {
    width: 44px;
    height: 44px;
    background: var(--primary);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    flex-shrink: 0;
}
.contact-info-item__label {
    color: #888;
    margin: 0 0 2px;
    font-size: .85rem;
}

.contact-form-wrap .form-label {
    font-weight: 600;
    color: var(--dark);
    margin-bottom: 6px;
    display: block;
}

/* ── prefers-reduced-motion: desactiva animaciones de BeTheme ── */
@media (prefers-reduced-motion: reduce) {
    .animate,
    .animate.fadeIn,
    .animate.fadeInUp,
    .animate.fadeInLeft,
    .animate.fadeInRight,
    .animate.fadeInDown {
        animation: none !important;
        opacity: 1 !important;
        transform: none !important;
        transition: none !important;
    }
}

/* ======================================================
   FASE B — Hero animado, parallax stats, scroll reveals
   ====================================================== */

/* ── Hero: formas decorativas flotantes ─────────────────── */

.tecdimex-hero { overflow: hidden; }

.hero-shape {
    position: absolute;
    border-radius: 50%;
    pointer-events: none;
}

.hero-shape--1 {
    width: 560px;
    height: 560px;
    background: rgba(255,255,255,0.05);
    top: -180px;
    right: -140px;
    animation: heroFloat 9s ease-in-out infinite;
}

.hero-shape--2 {
    width: 360px;
    height: 360px;
    background: rgba(255,255,255,0.04);
    bottom: -100px;
    left: -100px;
    animation: heroFloat 12s ease-in-out infinite reverse;
}

.hero-shape--3 {
    width: 200px;
    height: 200px;
    background: rgba(255,255,255,0.03);
    top: 40%;
    left: 60%;
    animation: heroFloat 7s ease-in-out infinite 2s;
}

@keyframes heroFloat {
    0%, 100% { transform: translateY(0) scale(1); }
    50%       { transform: translateY(-28px) scale(1.06); }
}

/* Animación de entrada del contenido del hero */
.tecdimex-hero__content {
    animation: heroContentIn 0.9s cubic-bezier(0.22,1,0.36,1) both;
}

@keyframes heroContentIn {
    from { opacity: 0; transform: translateY(30px); }
    to   { opacity: 1; transform: translateY(0); }
}

/* ── Hero: scroll hint (flecha animada) ─────────────────── */

.hero-scroll-hint {
    position: absolute;
    bottom: 30px;
    left: 50%;
    transform: translateX(-50%);
    cursor: pointer;
    opacity: 0.7;
    animation: scrollHintFadeIn 1.2s ease 1.5s both;
}

.hero-scroll-hint span {
    display: block;
    width: 20px;
    height: 20px;
    border-right: 2px solid #fff;
    border-bottom: 2px solid #fff;
    transform: rotate(45deg);
    animation: scrollBounce 1.6s ease-in-out infinite;
    margin: 0 auto;
}

@keyframes scrollBounce {
    0%, 100% { transform: rotate(45deg) translateY(0); opacity: 1; }
    50%       { transform: rotate(45deg) translateY(8px); opacity: 0.4; }
}

@keyframes scrollHintFadeIn {
    from { opacity: 0; }
    to   { opacity: 0.7; }
}

@media (max-width: 767px) {
    .hero-scroll-hint { display: none; }
    .hero-shape--1 { width: 280px; height: 280px; }
    .hero-shape--2 { width: 200px; height: 200px; }
    .hero-shape--3 { display: none; }
}

/* ── Stats: sección oscura con efecto parallax ───────────── */

.tecdimex-stats-section {
    position: relative;
    background: linear-gradient(135deg, var(--dark) 0%, var(--darker) 100%);
    background-attachment: fixed;   /* parallax en desktop */
    background-size: cover;
    padding: 0;
}

/* Mobile: deshabilitar fixed para evitar artefactos en iOS */
@media (max-width: 991px) {
    .tecdimex-stats-section { background-attachment: scroll; }
}

.tecdimex-stats-section__overlay {
    background: rgba(0,0,0,0.25);
    padding: 90px 0;
    position: relative;
    z-index: 1;
}

/* Números en blanco sobre fondo oscuro */
.stat-item__number--white {
    color: #fff !important;
    font-size: 54px;
    font-weight: 700;
    line-height: 1;
    margin-bottom: 10px;
}

.stat-item__label--white {
    color: rgba(255,255,255,0.75) !important;
    font-size: 13px;
    font-weight: 600;
    letter-spacing: 0.5px;
    text-transform: uppercase;
}

/* ── Pasos (Cómo funciona) ───────────────────────────────── */

.proceso-step {
    padding: 24px 0 24px 24px;
    border-left: 3px solid var(--primary);
    position: relative;
}

.proceso-step__num {
    font-size: 44px;
    font-weight: 900;
    color: var(--primary);
    opacity: 0.18;
    line-height: 1;
    position: absolute;
    top: 12px;
    left: 20px;
    pointer-events: none;
}

.proceso-step__title {
    font-size: 18px;
    font-weight: 700;
    color: var(--dark);
    margin-bottom: 12px;
    padding-left: 52px;
}

.proceso-step p {
    padding-left: 52px;
}

/* ── Diferenciadores: icono de servicio más pequeño ─────── */

/* Override para la sección de diferenciadores en home
   (el .service-icon-box tiene tamaño para servicios: 80×80) */
.col-md-4 .service-icon-box {
    font-size: 32px;
    width: 70px;
    height: 70px;
}

/* ── Responsive general ──────────────────────────────────── */

@media (max-width: 767px) {
    .stat-item__number--white { font-size: 38px; }
    .proceso-step__num { font-size: 32px; }
    .proceso-step__title,
    .proceso-step p { padding-left: 36px; }
}
