﻿/* =========================================
   Importación de Fuentes (Tailwind config)
   ========================================= */
@import url('https://fonts.googleapis.com/css2?family=Montserrat:wght@700;800&family=Open+Sans:wght@400;600;700&display=swap');

/* =========================================
   Variables de Diseño (Basado en Tailwind)
   ========================================= */
:root {
    /* Brand Colors */
    --color-primary: #3b4e5d;  /* brand-blue */
    --color-secondary: #cc2027; /* brand-red */
    --color-accent: #f4c127;    /* brand-yellow */
    --color-bg: #f8fafc;        /* brand-light */
    
    /* System Colors */
    --color-text: #333333;
    --color-white: #ffffff;
    --color-whatsapp: #25d366;
    
    /* Fonts */
    --font-main: 'Open Sans', sans-serif;
    --font-heading: 'Montserrat', sans-serif;
    
    /* Borders */
    --border-radius: 8px;
    --flat-border: 1px solid #e2e8f0;
}

/* =========================================
   Reset y Base
   ========================================= */
*
html {
 
	scroll-behavior: smooth;
}
{
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: var(--font-main);
    color: var(--color-text);
    background-color: var(--color-bg);
    line-height: 1.6;
}

h1, h2, h3, h4, h5, h6 {
    font-family: var(--font-heading);
    color: var(--color-primary);
}

.container {
    width: 90%;
    max-width: 1200px;
    margin: 0 auto;
}

a {
    text-decoration: none;
    color: inherit;
}

/* =========================================
   Utilidades (WP-like behavior)
   ========================================= */
.section-padding {
    padding-top: 5rem;
    padding-bottom: 5rem;
}

/* =========================================
   Navegación (Header)
   ========================================= */
.main-header {
    background-color: var(--color-white);
    border-bottom: var(--flat-border);
    position: sticky;
    top: 0;
    z-index: 100;
}

.nav-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    height: 80px;
}

.logo a {
    display: flex;
    align-items: center;
}

.nav-links {
    display: flex;
    list-style: none;
    gap: 2rem;
    align-items: center;
}

.nav-links a {
    font-weight: 600;
    color: var(--color-primary);
    transition: color 0.3s ease;
}

.nav-links a:hover {
    color: var(--color-secondary);
}

/* =========================================
   Estilos del Menú Desplegable (Dropdown)
   ========================================= */

/* Posicionamiento del item padre */
.dropdown {
    position: relative;
    display: inline-block;
}

/* Contenedor oculto del submenú */
.dropdown-content {
    display: none;
    position: absolute;
    background-color: #ffffff;
    min-width: 220px;
    box-shadow: 0px 8px 16px 0px rgba(0,0,0,0.1);
    z-index: 1001;
    list-style: none;
    padding: 0;
    border-radius: 4px;
    border-top: 3px solid var(--color-secondary); /* Detalle en rojo OSCAR */
}

/* Estilos de los enlaces del submenú */
.dropdown-content li {
    border-bottom: 1px solid #f1f1f1;
}

.dropdown-content a {
    color: var(--color-primary) !important;
    padding: 12px 16px;
    text-decoration: none;
    display: block;
    font-size: 0.9rem;
    text-align: left;
}

.dropdown-content a:hover {
    background-color: #f8fafc;
    color: var(--color-secondary) !important;
}

/* Mostrar al pasar el ratón (Desktop) */
.dropdown:hover .dropdown-content {
    display: block;
}

/* Ajuste para móvil (dentro del menú responsive) */
@media (max-width: 768px) {
    .dropdown-content {
        position: static;
        display: none;
        width: 100%;
        box-shadow: none;
        background-color: #f1f5f9;
    }
    
    .nav-links.active .dropdown:hover .dropdown-content {
        display: block;
    }
}


/* Botones */
.btn-primary, .btn-secondary {
    padding: 0.75rem 1.5rem;
    border-radius: var(--border-radius);
    font-weight: 700;
    text-align: center;
    transition: background-color 0.3s ease, transform 0.3s ease;
    display: inline-block;
    font-family: var(--font-main);
}

.btn-primary {
    background-color: var(--color-secondary);
    color: var(--color-white) !important;
}

.btn-primary:hover {
    background-color: #a3191f;
    color: var(--color-white);
    transform: translateY(-2px);
}

.btn-secondary {
    background-color: var(--color-white);
    color: var(--color-primary);
    border: 2px solid var(--color-primary);
}

.btn-secondary:hover {
    background-color: var(--color-primary);
    color: var(--color-white);
}

/* Menú Hamburguesa (Mobile) */
.menu-toggle {
    display: none;
    flex-direction: column;
    cursor: pointer;
    gap: 5px;
}

.menu-toggle .bar {
    width: 25px;
    height: 3px;
    background-color: var(--color-primary);
    border-radius: 3px;
}

/* =========================================
   Hero Section (Efecto Parallax)
   ========================================= */
.hero {
    /* Armonización de la clase .hero-bg */
    background-image: linear-gradient(rgba(59, 78, 93, 0.85), rgba(59, 78, 93, 0.85)), url('imagenes/soluciones-oscar%20reparaciones-y-manitos-en-oviedo.jpg');
    background-size: cover;
    background-position: center;
    background-attachment: fixed; /* Parallax effect */
    color: var(--color-white);
    text-align: center;
}

.hero h1 {
    color: var(--color-white);
    font-size: 2.8rem;
    margin-bottom: 1rem;
    line-height: 1.2;
}

.hero p {
    font-size: 1.2rem;
    margin-bottom: 2rem;
    max-width: 800px;
    margin-left: auto;
    margin-right: auto;
}

/* =========================================
   Servicios (Tarjetas)
   ========================================= */
.services {
    background-color: var(--color-bg);
}

/* Fondo blanco alterno para algunas secciones */
.services[style*="background-color: #fff"] {
    background-color: var(--color-white) !important;
}

.services-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
}

/* Armonización de .service-card */
.service-card {
    background-color: var(--color-white);
    border: var(--flat-border);
    border-bottom: 4px solid transparent; /* Preparado para el hover rojo */
    border-radius: var(--border-radius);
    padding: 2.5rem 2rem;
    text-align: center;
    transition: all 0.3s ease;
}

.service-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
    border-bottom-color: var(--color-secondary); /* Borde inferior rojo */
}

.service-card .icon {
    font-size: 3rem;
    margin-bottom: 1.5rem;
}

/* =========================================
   Footer
   ========================================= */
.main-footer {
    background-color: var(--color-primary);
    color: var(--color-white);
    padding: 4rem 0 2rem 0;
}

.footer-content {
    display: flex;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 3rem;
    margin-bottom: 3rem;
}

.footer-bottom {
    text-align: center;
    padding-top: 2rem;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    font-size: 0.9rem;
}

/* =========================================
   Botón Flotante WhatsApp
   ========================================= */
.float-ws {
    position: fixed;
    width: 60px;
    height: 60px;
    bottom: 40px;
    right: 40px;
    background-color: var(--color-whatsapp);
    color: #FFF;
    border-radius: 50px;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1000;
    /* Mantenemos la animación keyframe a salvo de fallos de transición */
    animation: pulse-shadow 2s infinite;
}

.float-ws svg {
    width: 60%;
    height: 60%;
}

@keyframes pulse-shadow {
    0% {
        box-shadow: 0 0 0 0 rgba(37, 211, 102, 0.7);
    }
    70% {
        box-shadow: 0 0 0 15px rgba(37, 211, 102, 0);
    }
    100% {
        box-shadow: 0 0 0 0 rgba(37, 211, 102, 0);
    }
}

/* =========================================
   Responsive Design (Media Queries)
   ========================================= */

/* Tablets (hasta 1024px) */
@media (max-width: 1024px) {
    .container {
        width: 92%;
    }
    .hero h1 {
        font-size: 2.2rem;
    }
    .services-grid {
        gap: 1.5rem;
    }
}

/* Teléfonos y Tablets pequeñas (hasta 768px) */
@media (max-width: 768px) {
    .nav-container {
        height: 70px;
    }

    .nav-links {
        display: none; 
        flex-direction: column;
        width: 100%;
        position: absolute;
        top: 70px;
        left: 0;
        background-color: var(--color-white);
        border-bottom: var(--flat-border);
        padding: 0;
        box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
    }
    
    .nav-links li {
        width: 100%;
        text-align: center;
        border-top: 1px solid var(--color-bg);
    }

    .nav-links a {
        display: block;
        padding: 1.2rem;
    }

    .nav-links .btn-primary {
        border-radius: 0;
        width: 100%;
    }

    .nav-links.active {
        display: flex;
    }

    .menu-toggle {
        display: flex;
    }

    .section-padding {
        padding-top: 3rem;
        padding-bottom: 3rem;
    }

    .hero h1 {
        font-size: 1.8rem;
    }
    
    .hero p {
        font-size: 1rem;
    }

    .footer-content {
        flex-direction: column;
        gap: 2rem;
    }
    
    .float-ws {
        bottom: 20px;
        right: 20px;
        width: 50px;
        height: 50px;
    }
}

/* Teléfonos pequeños (hasta 480px) */
@media (max-width: 480px) {
    .services-grid {
        grid-template-columns: 1fr;
    }
}
.cookie-banner {
    position: fixed;
    bottom: 20px;
    left: 20px;
    right: 20px;
    background: #ffffff;
    box-shadow: 0 4px 25px rgba(0,0,0,0.15);
    border-radius: 12px;
    z-index: 9999;
    padding: 20px;
    display: none; /* Se activa con JS */
    border-left: 5px solid var(--color-accent);
}

.cookie-content {
    max-width: 1100px;
    margin: 0 auto;
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 20px;
    justify-content: space-between;
}

.cookie-text p {
    margin: 0;
    color: #475569;
    font-size: 0.9rem;
    line-height: 1.5;
}

.cookie-buttons {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
}

.cookie-btn {
    padding: 10px 18px;
    border-radius: 6px;
    font-size: 0.85rem;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.3s;
    border: 2px solid transparent;
}

.cookie-btn.accept {
    background-color: var(--color-primary);
    color: white;
}

.cookie-btn.reject {
    background-color: #f1f5f9;
    color: #64748b;
}

.cookie-btn.settings {
    background-color: transparent;
    color: var(--color-primary);
    border-color: var(--color-primary);
}

.cookie-btn:hover {
    transform: translateY(-2px);
    opacity: 0.9;
}

@media (max-width: 768px) {
    .cookie-content {
        flex-direction: column;
        text-align: center;
    }
    .cookie-buttons {
        width: 100%;
        justify-content: center;
    }
    .cookie-btn {
        flex: 1;
    }
}




        /* Desplazamiento suave para los enlaces internos */
        html {
            scroll-behavior: smooth;
        }

        /* Ocultar el botón hamburguesa en escritorio */
        .menu-toggle {
            display: none;
            background: none;
            border: none;
            font-size: 2rem;
            color: var(--color-primary);
            cursor: pointer;
            padding: 5px;
        }
        
        /* Solo aplicamos cambios si es pantalla móvil */
        @media (max-width: 768px) {
            .menu-toggle {
                display: block;
            }
            .nav-container {
                position: relative;
            }
            
            /* Menú móvil colapsado por defecto */
            .nav-links {
                position: absolute;
                top: 100%;
                left: 0;
                width: 100%;
                background: white;
                flex-direction: column;
                align-items: flex-start;
                padding: 0;
                box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1);
                display: none !important; /* Forzar ocultamiento hasta tener la clase active-mobile */
                z-index: 1000;
            }

            /* Clase exclusiva para mostrar el menú móvil desde JS */
            .nav-links.active-mobile {
                display: flex !important;
            }

            .nav-links li {
                width: 100%;
                border-bottom: 1px solid #f1f5f9;
            }

            .nav-links a {
                display: block;
                padding: 15px 20px;
                width: 100%;
            }

            /* Ocultar el submenú y la flecha en móvil. "Servicios" es un enlace directo. */
            .dropdown-content {
                display: none !important; 
            }
            .fa-chevron-down {
                display: none !important;
            }
        }

        /* 2. Estilos del Banner de Cookies integrados */
        .cookie-banner {
            position: fixed;
            bottom: 20px;
            left: 20px;
            right: 20px;
            background: #ffffff;
            box-shadow: 0 4px 25px rgba(0,0,0,0.15);
            border-radius: 12px;
            z-index: 9999;
            padding: 20px;
            display: none; /* Se activa con JS */
            border-left: 5px solid var(--color-accent);
        }

        .cookie-content {
            max-width: 1100px;
            margin: 0 auto;
            display: flex;
            flex-wrap: wrap;
            align-items: center;
            gap: 20px;
            justify-content: space-between;
        }

        .cookie-text p {
            margin: 0;
            color: #475569;
            font-size: 0.9rem;
            line-height: 1.5;
        }

        .cookie-buttons {
            display: flex;
            gap: 10px;
            flex-wrap: wrap;
        }

        .cookie-btn {
            padding: 10px 18px;
            border-radius: 6px;
            font-size: 0.85rem;
            font-weight: 700;
            cursor: pointer;
            transition: all 0.3s;
            border: 2px solid transparent;
        }

        .cookie-btn.accept {
            background-color: var(--color-primary);
            color: white;
        }

        .cookie-btn.reject {
            background-color: #f1f5f9;
            color: #64748b;
        }

        .cookie-btn.settings {
            background-color: transparent;
            color: var(--color-primary);
            border-color: var(--color-primary);
        }

        .cookie-btn:hover {
            transform: translateY(-2px);
            opacity: 0.9;
        }

        @media (max-width: 768px) {
            .cookie-content {
                flex-direction: column;
                text-align: center;
            }
            .cookie-buttons {
                width: 100%;
                justify-content: center;
            }
            .cookie-btn {
                flex: 1;
            }
        }
 




