/* ============================================================
   ARCHIVO: style.css
   DESCRIPCIÓN: Estilos personalizados para la landing page
   FECHA: 2026
   ============================================================ */

/* ============================================================
   1. VARIABLES GLOBALES (Paleta de colores)
   ============================================================ */
:root {
    --color-primario: #C8102E;
    --color-secundario: #1A1A1A;
    --color-terciario: #F5F5F5;
    --color-gris-medio: #6C757D;
    --color-azul: #0066B3;
    --color-verde: #28A745;
    --color-amarillo: #FFC107;
    --color-naranja: #FF6B00;
    --font-family: 'Montserrat', sans-serif;
}

/* ============================================================
   2. ESTILOS BASE
   ============================================================ */
html {
    scroll-behavior: smooth;
}

body {
    font-family: var(--font-family), Arial, sans-serif;
    padding-top: 0;
    overflow-x: hidden;
    margin: 0;
}

/* ============================================================
   3. BARRA DE NAVEGACIÓN - SIN ESPACIOS EN BLANCO
   ============================================================ */
.navbar {
    background-color: rgba(26, 26, 26, 0.95) !important;
    backdrop-filter: blur(10px);
    box-shadow: 0 2px 20px rgba(0, 0, 0, 0.3);
    transition: all 0.3s ease;
    min-height: 70px;
    padding: 0 !important;
    margin: 0 !important;
    border: none;
}

.navbar .container {
    padding-top: 5px;
    padding-bottom: 5px;
}

.navbar-brand {
    font-weight: 700;
    font-size: 1.4rem;
    padding-top: 0;
    padding-bottom: 0;
}

.navbar-brand img {
    display: inline-block;
    vertical-align: middle;
}

.navbar-brand span.text-danger {
    color: var(--color-primario) !important;
}

.nav-link {
    font-weight: 600;
    color: rgba(255, 255, 255, 0.8) !important;
    transition: color 0.3s ease;
    position: relative;
    padding-top: 5px;
    padding-bottom: 5px;
}

.nav-link:hover {
    color: #ffffff !important;
}

.nav-link::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 50%;
    width: 0;
    height: 2px;
    background: var(--color-primario);
    transition: all 0.3s ease;
    transform: translateX(-50%);
}

.nav-link:hover::after,
.nav-link.active::after {
    width: 80%;
}

.navbar .btn-danger {
    background-color: var(--color-primario) !important;
    border: none;
    font-weight: 600;
    transition: all 0.3s ease;
}

.navbar .btn-danger:hover {
    background-color: #a00d24 !important;
    transform: scale(1.05);
}

/* ============================================================
   4. SECCIÓN HERO - CONECTADA AL NAVBAR
   ============================================================ */
.hero-section {
    min-height: calc(100vh - 70px);
    background: linear-gradient(135deg, rgba(0,0,0,0.8) 0%, rgba(0,0,0,0.6) 100%),
    url('../imgs/Mecanicos-Pro.png') center/cover no-repeat;
    padding: 80px 0;
    position: relative;
    overflow: hidden;
    margin-top: 0;
    padding-top: 20px;
}

.hero-section::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background:
            radial-gradient(circle at 20% 50%, rgba(200, 16, 46, 0.1) 0%, transparent 70%),
            radial-gradient(circle at 80% 50%, rgba(200, 16, 46, 0.05) 0%, transparent 60%);
    pointer-events: none;
}

.hero-section .container {
    position: relative;
    z-index: 2;
}

.hero-section h1 {
    text-shadow: 0 4px 30px rgba(0, 0, 0, 0.5);
    line-height: 1.1;
}

.hero-section .display-2 {
    font-weight: 900;
}

/* ============================================================
   4. SECCIÓN HERO
   ============================================================ */
.hero-section {
    min-height: 100vh;
    background: linear-gradient(135deg, rgba(0,0,0,0.8) 0%, rgba(0,0,0,0.6) 100%),
    url('../imgs/Mecanicos-Pro.png') center/cover no-repeat;
    padding: 100px 0;
    position: relative;
    overflow: hidden;
}

.hero-section::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background:
            radial-gradient(circle at 20% 50%, rgba(200, 16, 46, 0.1) 0%, transparent 70%),
            radial-gradient(circle at 80% 50%, rgba(200, 16, 46, 0.05) 0%, transparent 60%);
    pointer-events: none;
}

.hero-section .container {
    position: relative;
    z-index: 2;
}

.hero-section h1 {
    text-shadow: 0 4px 30px rgba(0, 0, 0, 0.5);
    line-height: 1.1;
}

.hero-section .display-2 {
    font-weight: 900;
}

/* ============================================================
   5. SERVICIOS
   ============================================================ */
.servicio-card {
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    border-radius: 15px !important;
    overflow: hidden;
    cursor: pointer;
}

.servicio-card:hover {
    transform: translateY(-10px);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.15) !important;
}

.servicio-card .icono-servicio {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
}

.servicio-card:hover .icono-servicio {
    transform: scale(1.1) rotate(5deg);
}

.servicio-card .card-title {
    color: var(--color-secundario);
}

/* ============================================================
   6. SERVICIOS DETALLADOS
   ============================================================ */
.servicio-detalle {
    border-radius: 12px;
    background: white;
    transition: all 0.3s ease;
    border: 1px solid transparent;
}

.servicio-detalle:hover {
    border-color: var(--color-primario);
    box-shadow: 0 5px 20px rgba(200, 16, 46, 0.1);
    transform: translateX(5px);
}

.icono-servicio-sm {
    width: 50px;
    height: 50px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

/* ============================================================
   7. SECCIÓN NOSOTROS
   ============================================================ */
#nosotros {
    background: linear-gradient(135deg, var(--color-secundario) 0%, #2d2d2d 100%);
}

#nosotros img {
    border: 3px solid var(--color-primario);
    transition: all 0.5s ease;
}

#nosotros img:hover {
    transform: scale(1.02);
}

/* ============================================================
   8. FORMULARIO DE CONTACTO (Sección normal)
   ============================================================ */
#contacto .card {
    border-radius: 20px !important;
    background: white;
}

.icono-contacto {
    width: 45px;
    height: 45px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    background-color: var(--color-primario);
    color: white;
}

/* ============================================================
   9. FORMULARIO FLOTANTE (STICKY) - ESTILOS PRINCIPALES
   ============================================================ */
.formulario-sticky {
    position: fixed;
    bottom: 30px;
    right: 30px;
    z-index: 9999;
    display: flex;
    flex-direction: column;
    align-items: flex-end;
}

/* Botón de toggle (minimizado) */
.btn-toggle-formulario {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--color-primario), #a00d24);
    color: white;
    border: none;
    box-shadow: 0 4px 20px rgba(200, 16, 46, 0.5);
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    position: relative;
    font-size: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.btn-toggle-formulario:hover {
    transform: scale(1.1);
    box-shadow: 0 6px 30px rgba(200, 16, 46, 0.7);
}

.btn-toggle-formulario .badge {
    position: absolute;
    top: -5px;
    right: -5px;
    font-size: 12px;
    animation: pulse-badge 2s infinite;
}

/* Animación de pulso para el badge */
@keyframes pulse-badge {
    0% { transform: scale(1); }
    50% { transform: scale(1.2); }
    100% { transform: scale(1); }
}

/* Contenido del formulario (expandido) */
.formulario-contenido {
    background: white;
    border-radius: 16px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.2);
    width: 340px;
    max-height: 0;
    overflow: hidden;
    opacity: 0;
    transform: translateY(20px);
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    margin-bottom: 15px;
    border: 1px solid rgba(0, 0, 0, 0.08);
}

.formulario-contenido.active {
    max-height: 550px;
    opacity: 1;
    transform: translateY(0);
    padding: 20px;
    overflow-y: auto;
}

/* Header del formulario flotante */
.formulario-header {
    background: linear-gradient(135deg, var(--color-secundario), #2d2d2d);
    color: white;
    padding: 12px 15px;
    border-radius: 12px 12px 0 0;
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin: -20px -20px 15px -20px;
}

.formulario-header h5 {
    font-size: 16px;
    font-weight: 700;
}

.formulario-header .btn-close {
    filter: brightness(0) invert(1);
    opacity: 0.8;
    font-size: 14px;
}

.formulario-header .btn-close:hover {
    opacity: 1;
}

/* Estilos de los campos en el formulario flotante */
#formularioFlotanteForm .form-control,
#formularioFlotanteForm .form-control-sm {
    font-size: 13px;
    padding: 8px 12px;
    border-radius: 8px;
    border: 2px solid #e0e0e0;
    transition: all 0.3s ease;
}

#formularioFlotanteForm .form-control:focus {
    border-color: var(--color-primario);
    box-shadow: 0 0 0 0.2rem rgba(200, 16, 46, 0.15);
}

#formularioFlotanteForm .form-label {
    font-size: 12px;
    margin-bottom: 4px;
    color: #555;
}

#formularioFlotanteForm .form-check-input:checked {
    background-color: var(--color-primario);
    border-color: var(--color-primario);
}

#formularioFlotanteForm .btn-danger {
    background: linear-gradient(135deg, var(--color-primario), #a00d24);
    border: none;
    font-weight: 600;
    font-size: 14px;
    padding: 10px;
    border-radius: 10px;
    transition: all 0.3s ease;
}

#formularioFlotanteForm .btn-danger:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 20px rgba(200, 16, 46, 0.4);
}

/* Scrollbar personalizada para el formulario flotante */
.formulario-contenido::-webkit-scrollbar {
    width: 6px;
}

.formulario-contenido::-webkit-scrollbar-track {
    background: #f1f1f1;
    border-radius: 10px;
}

.formulario-contenido::-webkit-scrollbar-thumb {
    background: var(--color-primario);
    border-radius: 10px;
}

.formulario-contenido::-webkit-scrollbar-thumb:hover {
    background: #a00d24;
}

/* ============================================================
   10. FOOTER
   ============================================================ */
footer {
    background: linear-gradient(135deg, #0a0a0a 0%, var(--color-secundario) 100%);
    border-top: 3px solid var(--color-primario);
}

footer a {
    transition: color 0.3s ease;
}

footer a:hover {
    color: var(--color-primario) !important;
}

/* ============================================================
   11. ANIMACIONES Y UTILIDADES
   ============================================================ */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.fade-in {
    animation: fadeInUp 0.6s ease forwards;
}

/* Botón de "Volver arriba" (opcional) */
.scroll-top {
    position: fixed;
    bottom: 30px;
    left: 30px;
    width: 50px;
    height: 50px;
    border-radius: 50%;
    background: var(--color-primario);
    color: white;
    border: none;
    display: none;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.3s ease;
    z-index: 999;
    box-shadow: 0 4px 15px rgba(200, 16, 46, 0.4);
}

.scroll-top:hover {
    transform: scale(1.1);
    background: #a00d24;
}

/* ============================================================
   12. RESPONSIVE PARA FORMULARIO FLOTANTE
   ============================================================ */
@media (max-width: 768px) {
    .formulario-sticky {
        bottom: 20px;
        right: 20px;
    }

    .formulario-contenido {
        width: 300px;
    }

    .formulario-contenido.active {
        max-height: 500px;
        padding: 15px;
    }

    .btn-toggle-formulario {
        width: 55px;
        height: 55px;
        font-size: 20px;
    }

    .scroll-top {
        bottom: 90px;
        left: 20px;
        width: 45px;
        height: 45px;
        font-size: 18px;
    }
}

@media (max-width: 576px) {
    .formulario-sticky {
        bottom: 15px;
        right: 15px;
    }

    .formulario-contenido {
        width: 280px;
        max-height: 0;
    }

    .formulario-contenido.active {
        max-height: 450px;
        padding: 15px;
    }

    .btn-toggle-formulario {
        width: 50px;
        height: 50px;
        font-size: 18px;
    }

    .formulario-header h5 {
        font-size: 14px;
    }
}

/* ============================================================
   13. ESTILOS PARA DISPOSITIVOS TÁCTILES
   ============================================================ */
@media (hover: none) {
    .btn-toggle-formulario:hover {
        transform: none;
    }

    #formularioFlotanteForm .btn-danger:hover {
        transform: none;
    }
}