/* ============================================
   ESTILOS PERSONALIZADOS - CORTE LÁSER INDUSTRIAL
   ============================================ */

/* Configuración de fuente base */
body {
    font-family: 'Rajdhani', 'Inter', 'Roboto', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
}

/* Fuente industrial para títulos principales */
h1, h2, h3, h4, h5, h6 {
    font-family: 'Rajdhani', 'Orbitron', sans-serif;
    font-weight: 600;
    letter-spacing: 0.5px;
}

/* Ajuste para títulos grandes - mantener horizontal */
section.relative.min-h-screen h1,
.hero-section h1 {
    word-wrap: break-word;
    overflow-wrap: break-word;
    max-width: 100%;
    white-space: normal;
    line-height: 1.1 !important;
    display: block;
    width: 100%;
}

/* Evitar que el título se divida demasiado - mantener horizontal */
section.relative.min-h-screen h1 span,
.hero-section h1 span {
    display: inline;
    white-space: normal;
    word-break: keep-all;
}

/* Ajuste para títulos muy grandes */
.text-5xl, .text-6xl, .text-7xl {
    font-family: 'Rajdhani', 'Orbitron', sans-serif;
    font-weight: 700;
    letter-spacing: 1px;
}

/* ============================================
   ACCESIBILIDAD - Skip to Content
   ============================================ */
.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border-width: 0;
}

.sr-only:focus {
    position: fixed;
    width: auto;
    height: auto;
    padding: 0.5rem 1rem;
    margin: 0;
    overflow: visible;
    clip: auto;
    white-space: normal;
    z-index: 9999;
}

/* ============================================
   ESTILOS PARA LOGO
   ============================================ */

/* Logo en navegación */
nav img {
    filter: brightness(1.1);
    transition: transform 0.3s ease;
}

nav img:hover {
    transform: scale(1.05);
}

/* Logo en nav: tamaño lo define Tailwind en index.html (evitar forzar altura baja en móvil) */

/* ============================================
   ESTILOS PARA PLACEHOLDERS EDITABLES
   ============================================ */

/* Placeholder content - Contenido editable claramente marcado */
.placeholder-content {
    background: linear-gradient(135deg, rgba(59, 130, 246, 0.1) 0%, rgba(59, 130, 246, 0.05) 100%);
    border: 1px dashed rgba(59, 130, 246, 0.3);
    border-radius: 4px;
    padding: 2px 6px;
    display: inline-block;
    font-style: italic;
    color: rgba(156, 163, 175, 0.9);
    position: relative;
}

.placeholder-content::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: repeating-linear-gradient(
        45deg,
        transparent,
        transparent 10px,
        rgba(59, 130, 246, 0.05) 10px,
        rgba(59, 130, 246, 0.05) 20px
    );
    pointer-events: none;
    border-radius: 4px;
}

/* Placeholder para áreas grandes (imágenes, mapas) */
.placeholder-content.bg-gray-800 {
    background: linear-gradient(135deg, rgba(59, 130, 246, 0.15) 0%, rgba(59, 130, 246, 0.05) 100%);
    border: 2px dashed rgba(59, 130, 246, 0.5);
}

/* ============================================
   ANIMACIONES Y TRANSICIONES
   ============================================ */

/* Smooth scroll */
html {
    scroll-behavior: smooth;
}

/* Animación de fade-in al hacer scroll */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.fade-in-up {
    animation: fadeInUp 0.6s ease-out;
}

/* Animación de pulso para elementos destacados */
@keyframes pulse-glow {
    0%, 100% {
        box-shadow: 0 0 20px rgba(59, 130, 246, 0.3);
    }
    50% {
        box-shadow: 0 0 30px rgba(59, 130, 246, 0.6);
    }
}

.pulse-glow {
    animation: pulse-glow 2s ease-in-out infinite;
}

/* ============================================
   ESTILOS PARA FAQ (ACORDEÓN)
   ============================================ */

.faq-item {
    transition: all 0.3s ease;
}

.faq-item.active .faq-answer {
    display: block;
    animation: fadeInUp 0.3s ease-out;
}

.faq-item.active .faq-icon {
    transform: rotate(180deg);
}

.faq-answer {
    display: none;
}

/* ============================================
   ESTILOS PARA NAVEGACIÓN
   ============================================ */

/* Efecto de hover en enlaces de navegación */
nav a {
    position: relative;
}

nav a::after {
    content: '';
    position: absolute;
    bottom: -4px;
    left: 0;
    width: 0;
    height: 2px;
    background: #3b82f6;
    transition: width 0.3s ease;
}

nav a:hover::after {
    width: 100%;
}

/* ============================================
   ESTILOS PARA FORMULARIO
   ============================================ */

/* Focus states mejorados */
input:focus,
select:focus,
textarea:focus {
    border-color: #3b82f6;
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1);
}

/* ============================================
   JERARQUÍA Y SPACING GLOBAL - B2B PREMIUM
   ============================================ */

/* Aumentar espacio vertical entre secciones */
section {
    padding-top: 5rem;
    padding-bottom: 5rem;
}

@media (min-width: 1024px) {
    section {
        padding-top: 6rem;
        padding-bottom: 6rem;
    }
}

/* Max-widths consistentes para mejor legibilidad */
.max-w-7xl {
    max-width: 80rem;
}

/* Mejor ritmo visual en párrafos */
p {
    line-height: 1.75;
    margin-bottom: 1.25rem;
}

/* Espaciado mejorado en listas */
ul, ol {
    margin-bottom: 1.5rem;
}

li {
    margin-bottom: 0.75rem;
}

/* ============================================
   RESPONSIVE ADJUSTMENTS
   ============================================ */

@media (max-width: 768px) {
    /* Ajustes para móvil */
    .placeholder-content {
        font-size: 0.9em;
        padding: 1px 4px;
    }
    
    /* Padding para sticky CTA móvil */
    body {
        padding-bottom: 80px;
    }
    
    /* Ajuste para chatbot en móvil */
    #chatbot-container {
        bottom: 100px;
    }
    
    /* Reducir padding en móvil */
    section {
        padding-top: 3rem;
        padding-bottom: 3rem;
    }
}

/* ============================================
   UTILIDADES ADICIONALES
   ============================================ */

/* Efecto de brillo láser sutil */
.laser-glow {
    position: relative;
}

.laser-glow::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(
        90deg,
        transparent,
        rgba(59, 130, 246, 0.2),
        transparent
    );
    animation: laser-sweep 3s infinite;
}

@keyframes laser-sweep {
    0% {
        left: -100%;
    }
    100% {
        left: 100%;
    }
}

/* Scrollbar personalizado (opcional) */
::-webkit-scrollbar {
    width: 10px;
}

::-webkit-scrollbar-track {
    background: #1f2937;
}

::-webkit-scrollbar-thumb {
    background: #3b82f6;
    border-radius: 5px;
}

::-webkit-scrollbar-thumb:hover {
    background: #2563eb;
}

/* ============================================
   ESTILOS PARA CHATBOT CON IA
   ============================================ */

/* Animación de entrada del chatbot */
@keyframes slideInUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

#chatbot-window {
    animation: slideInUp 0.3s ease-out;
}

/* Botón flotante con pulso */
#chatbot-toggle {
    box-shadow: 0 10px 25px rgba(59, 130, 246, 0.4);
}

#chatbot-toggle:hover {
    box-shadow: 0 15px 35px rgba(59, 130, 246, 0.6);
}

/* Scrollbar personalizado para el chat */
#chat-messages::-webkit-scrollbar {
    width: 6px;
}

#chat-messages::-webkit-scrollbar-track {
    background: #1f2937;
    border-radius: 10px;
}

#chat-messages::-webkit-scrollbar-thumb {
    background: #3b82f6;
    border-radius: 10px;
}

#chat-messages::-webkit-scrollbar-thumb:hover {
    background: #2563eb;
}

/* Animación de mensajes */
#chat-messages > div {
    animation: fadeInUp 0.3s ease-out;
}

/* Efecto de hover en botones del chat */
#chat-form button:hover {
    transform: scale(1.05);
}

/* Indicador de escritura animado */
@keyframes bounce {
    0%, 80%, 100% {
        transform: scale(0);
    }
    40% {
        transform: scale(1);
    }
}

#typing-indicator .animate-bounce {
    animation: bounce 1.4s infinite ease-in-out;
}

/* Responsive para chatbot y WhatsApp */
@media (max-width: 640px) {
    #chatbot-container {
        bottom: 1rem;
        right: 1rem;
        gap: 0.75rem;
    }
    
    #chatbot-window {
        width: calc(100vw - 2rem);
        height: calc(100vh - 120px);
        max-height: 600px;
        right: 0;
    }
    
    #chatbot-toggle,
    #chatbot-container a {
        width: 56px;
        height: 56px;
    }
}

/* Efecto de notificación (badge de mensajes nuevos) */
.chat-notification {
    position: absolute;
    top: -5px;
    right: -5px;
    width: 20px;
    height: 20px;
    background: #ef4444;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 12px;
    font-weight: bold;
    animation: pulse 2s infinite;
}

@keyframes pulse {
    0%, 100% {
        transform: scale(1);
    }
    50% {
        transform: scale(1.1);
    }
}

/* Estilos para enlaces en mensajes del bot */
#chat-messages a {
    color: #60a5fa;
    text-decoration: underline;
}

#chat-messages a:hover {
    color: #93c5fd;
}

/* Mejora de legibilidad en mensajes */
#chat-messages strong {
    font-weight: 600;
    color: #e5e7eb;
}

#chat-messages em {
    font-style: italic;
}

/* ============================================
   ESTILOS PARA CARRUSEL HERO
   ============================================ */

.hero-carousel-container {
    position: relative;
    width: 100%;
    min-height: 500px;
    max-height: 700px;
    height: auto;
}

#hero-carousel {
    width: 100%;
    height: auto;
    min-height: 500px;
    max-height: 700px;
    position: relative;
}

@media (min-width: 768px) {
    .hero-carousel-container,
    #hero-carousel {
        min-height: 550px;
        max-height: 650px;
    }
}

@media (min-width: 1024px) {
    .hero-carousel-container,
    #hero-carousel {
        min-height: 600px;
        max-height: 700px;
    }
}

.hero-carousel-item {
    display: none;
    width: 100%;
    height: 100%;
    position: absolute;
    top: 0;
    left: 0;
    opacity: 0;
    transition: opacity 0.5s ease-in-out;
}

.hero-carousel-item.active {
    display: block !important;
    position: relative;
    width: 100%;
    height: auto;
    min-height: 500px;
    max-height: 700px;
    opacity: 1;
}

@media (min-width: 768px) {
    .hero-carousel-item.active {
        min-height: 550px;
        max-height: 650px;
    }
}

@media (min-width: 1024px) {
    .hero-carousel-item.active {
        min-height: 600px;
        max-height: 700px;
    }
}

.hero-carousel-item img,
.hero-carousel-item video {
    width: 100% !important;
    height: auto !important;
    min-height: 500px !important;
    max-height: 700px !important;
    object-fit: contain;
    display: block;
    position: relative;
}

@media (min-width: 768px) {
    .hero-carousel-item img,
    .hero-carousel-item video {
        min-height: 550px !important;
        max-height: 650px !important;
    }
}

@media (min-width: 1024px) {
    .hero-carousel-item img,
    .hero-carousel-item video {
        min-height: 600px !important;
        max-height: 700px !important;
    }
}

/* Flechas del carrusel - removidas según solicitud del usuario */

/* Indicadores del carrusel */
#carousel-indicators {
    display: flex;
    gap: 0.5rem;
}

.carousel-indicator {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.4);
    border: 2px solid rgba(255, 255, 255, 0.6);
    cursor: pointer;
    transition: all 0.3s ease;
}

.carousel-indicator.active {
    background: #3b82f6;
    border-color: #60a5fa;
    transform: scale(1.2);
}

.carousel-indicator:hover {
    background: rgba(255, 255, 255, 0.6);
}

/* Responsive para carrusel */
@media (max-width: 768px) {
    .hero-carousel-container {
        min-height: 400px;
    }
    
    #carousel-prev,
    #carousel-next {
        padding: 0.5rem;
        width: 40px;
        height: 40px;
    }
    
    #carousel-prev svg,
    #carousel-next svg {
        width: 1rem;
        height: 1rem;
    }
}

/* ============================================
   Tarjeta — Especificaciones técnicas (tecnología)
   ============================================ */
.spec-card {
    font-feature-settings: "tnum" 1, "lnum" 1;
}

.spec-card h3 {
    letter-spacing: -0.02em;
}

.spec-card .spec-label {
    font-family: 'Inter', system-ui, sans-serif;
    font-size: 0.75rem;
    font-weight: 600;
    letter-spacing: 0.08em;
    line-height: 1.4;
    text-transform: uppercase;
    color: rgb(156 163 175);
}

@media (min-width: 640px) {
    .spec-card .spec-label {
        font-size: 0.8125rem;
        letter-spacing: 0.07em;
    }
}

.spec-card .spec-value {
    font-family: 'Rajdhani', 'Inter', system-ui, sans-serif;
    font-size: 1rem;
    font-weight: 600;
    letter-spacing: 0.03em;
    line-height: 1.35;
    text-align: left;
}

@media (min-width: 640px) {
    .spec-card .spec-value {
        text-align: right;
    }
}

.spec-tubo-list {
    list-style: none;
    margin: 0;
    padding: 0;
}

.spec-tubo-list li {
    display: flex;
    align-items: flex-start;
    gap: 0.65rem;
    letter-spacing: 0.015em;
}

.spec-tubo-dot {
    flex-shrink: 0;
    width: 6px;
    height: 6px;
    margin-top: 0.5em;
    border-radius: 9999px;
    background: linear-gradient(135deg, rgb(96 165 250), rgb(59 130 246));
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.18);
}

/* Video tecnología: caja tipo “móvil” centrada (9:16) → el clip llena el escenario sin franja negra lateral */
.maquina-video-shell {
    min-height: min(36vh, 260px);
    padding-block: 0.125rem;
}

.maquina-video-frame {
    display: flex;
    align-items: center;
    justify-content: center;
    margin-left: auto;
    margin-right: auto;
    height: clamp(280px, 54vh, 520px);
    width: min(100%, calc(clamp(280px, 54vh, 520px) * 9 / 16));
    max-width: 100%;
}

@media (min-width: 768px) {
    .maquina-video-frame {
        height: clamp(300px, 56vh, 540px);
        width: min(100%, calc(clamp(300px, 56vh, 540px) * 9 / 16));
    }
}

.maquina-video-el {
    display: block;
    margin: auto;
    max-width: 100%;
    max-height: 100%;
    width: auto;
    height: auto;
    object-fit: contain;
    object-position: center center;
}

@media (min-width: 640px) {
    .spec-tubo-list {
        text-align: right;
    }

    .spec-tubo-list li {
        justify-content: flex-end;
    }

    .spec-tubo-dot {
        margin-top: 0.45em;
    }
}

/* ============================================
   SERVICIOS EXPANDIBLES (hover / focus / tap)
   ============================================ */

.services-expand-section {
    padding-top: 2.5rem !important;
    padding-bottom: 2.5rem !important;
    background:
        radial-gradient(ellipse at top, rgba(59, 130, 246, 0.08), transparent 55%),
        #111827;
}

.services-expand-list {
    display: flex;
    flex-direction: column;
    gap: 0.85rem;
}

.service-expand-item {
    border: 1px solid rgba(59, 130, 246, 0.28);
    border-radius: 0.75rem;
    background: linear-gradient(180deg, rgba(31, 41, 55, 0.95) 0%, rgba(17, 24, 39, 0.98) 100%);
    box-shadow: 0 8px 28px rgba(0, 0, 0, 0.28);
    overflow: hidden;
    transition: border-color 0.35s ease, box-shadow 0.35s ease, transform 0.35s ease;
    outline: none;
}

.service-expand-item:hover {
    border-color: rgba(96, 165, 250, 0.45);
}

.service-expand-item:focus-within,
.service-expand-item.is-open {
    border-color: rgba(96, 165, 250, 0.75);
    box-shadow: 0 0 0 1px rgba(59, 130, 246, 0.25), 0 14px 40px rgba(37, 99, 235, 0.18);
    transform: translateY(-1px);
}

.service-expand-bar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    min-height: 4.25rem;
    padding: 1rem 1.35rem;
    cursor: pointer;
    background: linear-gradient(90deg, rgba(37, 99, 235, 0.14), transparent 55%);
}

.service-expand-title {
    margin: 0;
    font-family: 'Rajdhani', 'Orbitron', sans-serif;
    font-size: clamp(1.25rem, 2.2vw, 1.65rem);
    font-weight: 700;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    color: #dbeafe;
}

.service-expand-panel {
    display: grid;
    grid-template-rows: 0fr;
    transition: grid-template-rows 0.45s ease;
}

.service-expand-item:focus-within .service-expand-panel,
.service-expand-item.is-open .service-expand-panel {
    grid-template-rows: 1fr;
}

.service-expand-inner {
    min-height: 0;
    overflow: hidden;
    display: grid;
    gap: 1.25rem;
    padding: 0 1.35rem;
    opacity: 0;
    transition: opacity 0.3s ease, padding 0.45s ease;
}

.service-expand-item:focus-within .service-expand-inner,
.service-expand-item.is-open .service-expand-inner {
    padding-top: 0.25rem;
    padding-bottom: 1.35rem;
    opacity: 1;
}

.service-expand-inner--media-left,
.service-expand-inner--media-right {
    grid-template-columns: 1fr;
}

@media (min-width: 768px) {
    .service-expand-inner--media-left,
    .service-expand-inner--media-right {
        grid-template-columns: 1.05fr 1fr;
        align-items: center;
        gap: 1.75rem;
    }

    .service-expand-inner--media-right .service-expand-copy {
        order: 1;
    }

    .service-expand-inner--media-right .service-expand-media {
        order: 2;
    }
}

.service-expand-media {
    position: relative;
    min-height: 180px;
    border-radius: 0.65rem;
    overflow: hidden;
    border: 1px solid rgba(75, 85, 99, 0.7);
    background:
        linear-gradient(135deg, rgba(30, 58, 138, 0.35), rgba(17, 24, 39, 0.9)),
        repeating-linear-gradient(
            135deg,
            transparent,
            transparent 12px,
            rgba(59, 130, 246, 0.05) 12px,
            rgba(59, 130, 246, 0.05) 24px
        );
}

.service-expand-media img {
    display: block;
    width: 100%;
    height: 100%;
    min-height: 180px;
    max-height: 240px;
    object-fit: cover;
}

.service-expand-media-fallback {
    position: absolute;
    inset: 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 0.75rem;
    color: #60a5fa;
    padding: 1rem;
    text-align: center;
}

.service-expand-media-fallback[hidden] {
    display: none !important;
}

.service-expand-media-fallback svg {
    width: 3.5rem;
    height: 3.5rem;
    opacity: 0.85;
}

.service-expand-media-fallback span {
    font-size: 0.85rem;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    color: #93c5fd;
}

.service-expand-copy {
    color: #d1d5db;
}

.service-expand-copy p {
    margin-bottom: 0.85rem;
}

.service-expand-lead {
    color: #e5e7eb;
    font-size: 1.05rem;
    font-weight: 600;
}

.service-expand-cta {
    display: inline-flex;
    align-items: center;
    margin-top: 0.25rem;
    padding: 0.55rem 1rem;
    border-radius: 0.5rem;
    background: #2563eb;
    color: #fff;
    font-weight: 600;
    font-size: 0.95rem;
    text-decoration: none;
    transition: background-color 0.25s ease, transform 0.25s ease;
}

.service-expand-cta:hover {
    background: #1d4ed8;
    transform: translateY(-1px);
}

@media (max-width: 767px) {
    .service-expand-bar {
        min-height: 3.75rem;
        padding: 0.9rem 1.1rem;
    }

    .service-expand-title {
        letter-spacing: 0.02em;
    }
}

.service-expand-media.service-video-carousel {
    min-height: 0;
    padding: 0;
    border: none;
    background: transparent;
}

.service-video-carousel--single .service-video-nav,
.service-video-carousel--single .service-video-dots {
    display: none;
}

/* Carrusel de videos en servicios expandibles (formato vertical) */
.service-video-carousel {
    position: relative;
    width: min(100%, 280px);
    margin-inline: auto;
    aspect-ratio: 9 / 16;
    min-height: 0;
    background: #0b1220;
    overflow: hidden;
    border: 1px solid rgba(75, 85, 99, 0.7);
    border-radius: 0.65rem;
}

@media (min-width: 768px) {
    .service-video-carousel {
        width: min(100%, 320px);
    }
}

.service-video-track {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
}

.service-video-slide {
    display: none;
    width: 100%;
    height: 100%;
}

.service-video-slide.is-active {
    display: block;
}

.service-video-slide video {
    display: block;
    width: 100%;
    height: 100%;
    min-height: 0;
    max-height: none;
    object-fit: cover;
    object-position: center center;
    background: #000;
}

.service-video-nav {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    z-index: 2;
    width: 2.4rem;
    height: 2.4rem;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 9999px;
    border: 1px solid rgba(147, 197, 253, 0.45);
    background: rgba(17, 24, 39, 0.82);
    color: #93c5fd;
    cursor: pointer;
    transition: background-color 0.2s ease, color 0.2s ease, transform 0.2s ease;
}

.service-video-nav:hover {
    background: rgba(37, 99, 235, 0.9);
    color: #fff;
}

.service-video-nav svg {
    width: 1.25rem;
    height: 1.25rem;
}

.service-video-nav--prev {
    left: 0.55rem;
}

.service-video-nav--next {
    right: 0.55rem;
}

.service-video-dots {
    position: absolute;
    left: 0;
    right: 0;
    bottom: 0.55rem;
    display: flex;
    justify-content: center;
    gap: 0.4rem;
    z-index: 2;
    pointer-events: none;
}

.service-video-dots span {
    width: 0.45rem;
    height: 0.45rem;
    border-radius: 9999px;
    background: rgba(148, 163, 184, 0.55);
}

.service-video-dots span.is-active {
    background: #60a5fa;
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.25);
}

/* Alinear carrusel vertical con el texto en desktop */
@media (min-width: 768px) {
    .service-expand-inner--media-left:has(.service-video-carousel) {
        grid-template-columns: minmax(240px, 320px) 1fr;
        align-items: center;
    }

    .service-expand-inner--media-right:has(.service-video-carousel) {
        grid-template-columns: 1fr minmax(240px, 320px);
        align-items: center;
    }
}

