/* Generales y Reseteo */
:root {
    --primary-color: #FF6B00;
    /* Naranja DGT o similar */
    --secondary-color: #004D99;
    /* Azul DGT o similar */
    --text-color: #333;
    --light-text-color: #666;
    --background-light: #f9f9f9;
    --background-dark: #eee;
    --white: #fff;
    --border-radius: 8px;
    --transition-speed: 0.3s;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Roboto', sans-serif;
    line-height: 1.6;
    color: var(--text-color);
    background-color: var(--white);
    scroll-behavior: smooth;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

a {
    color: var(--primary-color);
    text-decoration: none;
    transition: color var(--transition-speed) ease;
}

a:hover {
    color: var(--secondary-color);
}

h1,
h2,
h3,
h4,
h5,
h6 {
    color: var(--secondary-color);
    margin-bottom: 0.8em;
    line-height: 1.2;
}

h1 {
    font-size: 2.2em;
}

h2 {
    font-size: 1.8em;
}

h3 {
    font-size: 1.4em;
}

p {
    margin-bottom: 1em;
}

img {
    max-width: 100%;
    height: auto;
    display: block;
    /* Elimina espacio extra debajo de las imágenes */
}

/* Botones */
.btn {
    display: inline-block;
    padding: 12px 25px;
    border-radius: var(--border-radius);
    font-weight: bold;
    text-align: center;
    transition: background-color var(--transition-speed) ease, transform var(--transition-speed) ease;
    border: none;
    cursor: pointer;
    font-size: 1em;
}

.btn-primary {
    background-color: var(--primary-color);
    color: var(--white);
}

.btn-primary:hover {
    background-color: var(--primary-color-dark, #e65c00);
    /* Un poco más oscuro, variable opcional */
    transform: translateY(-2px);
}

.btn-secondary {
    background-color: var(--secondary-color);
    color: var(--white);
    margin-top: 10px;
    /* Separación si hay varios botones */
}

.btn-secondary:hover {
    background-color: var(--secondary-color-dark, #003a73);
    transform: translateY(-2px);
}

.text-center {
    text-align: center;
}

.small-text {
    font-size: 0.85em;
    color: var(--light-text-color);
    margin-top: 15px;
}


/* Header */
.main-header {
    background-color: var(--white);
    padding: 15px 0;
    border-bottom: 1px solid var(--background-dark);
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.05);
    position: sticky;
    top: 0;
    z-index: 100;
}

.main-header .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo {
    font-size: 1.8em;
    font-weight: bold;
}

.logo a {
    color: var(--primary-color);
}

.logo-image {
    max-width: 50px;
    border-radius: var(--border-radius);
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
}

/* ----------- Cuenta atrás V16 (index.html) ----------- */
.countdown-section {
    background: var(--countdown-bg, #ffe5d0);
    color: var(--countdown-text, var(--text-color));
    padding: 30px 0;
    text-align: center;
}

.countdown-title {
    color: var(--countdown-title, #d35400);
    font-size: 2em;
    margin-bottom: 10px;
}

#dias-v16 {
    font-weight: bold;
    color: var(--countdown-days, #c0392b);
}

.countdown-desc {
    font-size: 1.1em;
    margin-bottom: 18px;
}

.countdown-btn {
    font-size: 1.15em;
    padding: 15px 35px;
}

.nav-toggle {
    display: none;
    /* Oculto por defecto en desktop */
    background: none;
    border: none;
    font-size: 1.8em;
    cursor: pointer;
    color: var(--secondary-color);
}

.nav-menu {
    list-style: none;
    display: flex;
    gap: 25px;
}

.nav-menu li a {
    color: var(--text-color);
    font-weight: bold;
    padding: 5px 0;
    position: relative;
}

.nav-menu li a::after {
    content: '';
    position: absolute;
    width: 0;
    height: 2px;
    background-color: var(--primary-color);
    bottom: 0;
    left: 0;
    transition: width var(--transition-speed) ease-in-out;
}

.nav-menu li a:hover::after {
    width: 100%;
}

/* Hero Section */
.hero-section {
    background-color: var(--background-light);
    padding: 60px 0;
    text-align: center;
}

.hero-section .container {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 40px;
}

.hero-content {
    max-width: 600px;
}

.hero-content h1 {
    font-size: 2.8em;
    color: var(--primary-color);
    margin-bottom: 20px;
}

.hero-content p {
    font-size: 1.2em;
    color: var(--light-text-color);
    margin-bottom: 30px;
}

.hero-image {
    max-width: 500px;
}

.hero-image img {
    border-radius: var(--border-radius);
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
}

/* Product Overview Section */
.product-overview-section {
    padding: 60px 0;
    background-color: var(--white);
    text-align: center;
}

.product-overview-section h2 {
    margin-bottom: 40px;
}

.features-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 30px;
    margin-bottom: 40px;
}

.feature-item {
    background-color: var(--background-light);
    padding: 30px;
    border-radius: var(--border-radius);
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.05);
    transition: transform var(--transition-speed) ease;
}

.feature-item:hover {
    transform: translateY(-5px);
}

.feature-item img {
    width: 60px;
    /* Tamaño para iconos/imágenes pequeñas */
    height: 60px;
    margin: 0 auto 20px;
}

.feature-item h3 {
    font-size: 1.2em;
    color: var(--secondary-color);
    margin-bottom: 10px;
}

.feature-item p {
    font-size: 0.95em;
    color: var(--light-text-color);
}

/* Call to Action Section */
.call-to-action-section {
    background-color: var(--primary-color);
    color: var(--white);
    padding: 60px 0;
    text-align: center;
}

.call-to-action-section h2 {
    color: var(--white);
    font-size: 2.5em;
    margin-bottom: 20px;
}

.call-to-action-section p {
    font-size: 1.2em;
    max-width: 800px;
    margin: 0 auto 40px;
}

.call-to-action-section .btn {
    margin: 10px;
    padding: 15px 35px;
    font-size: 1.1em;
    background-color: var(--white);
    color: var(--primary-color);
}

.call-to-action-section .btn:hover {
    background-color: var(--secondary-color);
    color: var(--white);
    transform: translateY(-3px);
}

/* Testimonials Section */
.testimonials-section {
    padding: 60px 0;
    background-color: var(--background-dark);
    text-align: center;
}

.testimonials-section h2 {
    margin-bottom: 40px;
}

.testimonials-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 30px;
}

.testimonial-item {
    background-color: var(--white);
    padding: 30px;
    border-radius: var(--border-radius);
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.05);
    font-style: italic;
    font-size: 1.05em;
    color: var(--light-text-color);
}

.testimonial-item cite {
    display: block;
    margin-top: 15px;
    font-style: normal;
    font-weight: bold;
    color: var(--secondary-color);
}

/* Blog Preview Section */
.blog-preview-section {
    padding: 60px 0;
    background-color: var(--white);
    text-align: center;
}

.blog-preview-section h2 {
    margin-bottom: 40px;
}

.blog-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 30px;
    margin-bottom: 40px;
}

.blog-post-card {
    background-color: var(--background-light);
    border-radius: var(--border-radius);
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.05);
    overflow: hidden;
    /* Para que la imagen no se salga del radio */
    text-align: left;
    transition: transform var(--transition-speed) ease;
}

.blog-post-card:hover {
    transform: translateY(-5px);
}

.blog-post-card img {
    width: 100%;
    height: 200px;
    /* Altura fija para la imagen del post */
    object-fit: cover;
    /* Recorta la imagen para que cubra el espacio */
    border-bottom: 1px solid var(--background-dark);
}

.blog-post-card h3 {
    font-size: 1.3em;
    margin: 20px 20px 10px;
}

.blog-post-card h3 a {
    color: var(--secondary-color);
}

.blog-post-card p {
    font-size: 0.95em;
    color: var(--light-text-color);
    margin: 0 20px 20px;
}

.blog-post-card .read-more {
    display: inline-block;
    padding: 0 20px 20px;
    color: var(--primary-color);
    font-weight: bold;
}


/* Footer */
.main-footer {
    background-color: var(--secondary-color);
    color: var(--white);
    padding: 40px 0 20px;
}

.main-footer .footer-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 30px;
    padding-bottom: 30px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.footer-col h3 {
    color: var(--white);
    margin-bottom: 15px;
    font-size: 1.2em;
}

.footer-col p,
.footer-col ul {
    font-size: 0.9em;
    color: rgba(255, 255, 255, 0.8);
}

.footer-col ul {
    list-style: none;
}

.footer-col ul li {
    margin-bottom: 10px;
}

.footer-col ul li a {
    color: inherit;
}

.footer-col ul li a:hover {
    color: var(--primary-color);
}

.social-links a {
    color: var(--white);
    font-size: 1.5em;
    margin-right: 15px;
    transition: color var(--transition-speed) ease;
}

.social-links a:hover {
    color: var(--primary-color);
}

.footer-bottom {
    text-align: center;
    margin-top: 20px;
    font-size: 0.8em;
    color: rgba(255, 255, 255, 0.6);
}

/* Responsividad (Mobile-First) */
/* Pequeñas pantallas (móviles) */
@media (max-width: 768px) {
    .main-header .container {
        flex-wrap: wrap;
    }

    .nav-toggle {
        display: block;
        /* Muestra el botón de menú hamburguesa */
    }

    .nav-menu {
        flex-direction: column;
        width: 100%;
        max-height: 0;
        /* Oculto por defecto */
        overflow: hidden;
        transition: max-height 0.3s ease-out;
        margin-top: 15px;
        background-color: var(--white);
        border-top: 1px solid var(--background-dark);
    }

    .nav-menu.active {
        max-height: 300px;
        /* Ajustar según el número de elementos del menú */
    }

    .nav-menu li {
        text-align: center;
        padding: 10px 0;
        border-bottom: 1px solid var(--background-dark);
    }

    .nav-menu li:last-child {
        border-bottom: none;
    }

    .hero-section .container {
        flex-direction: column;
    }

    .hero-content h1 {
        font-size: 2em;
    }

    .hero-content p {
        font-size: 1em;
    }

    .call-to-action-section h2 {
        font-size: 2em;
    }

    .call-to-action-section p {
        font-size: 1em;
    }

    .features-grid,
    .testimonials-grid,
    .blog-grid,
    .footer-grid {
        grid-template-columns: 1fr;
        /* Una columna en móviles */
    }
}

/* Tablets y pantallas medianas */
@media (min-width: 769px) and (max-width: 1024px) {
    .hero-section .container {
        flex-direction: row;
        text-align: left;
    }

    .hero-image {
        order: 2;
        /* Imagen a la derecha */
    }

    .hero-content {
        order: 1;
        /* Texto a la izquierda */
    }

    .hero-content h1 {
        font-size: 2.5em;
    }

    .features-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

/* Desktop */
@media (min-width: 1025px) {
    .hero-section .container {
        flex-direction: row;
        text-align: left;
    }

    .hero-image {
        order: 2;
    }

    .hero-content {
        order: 1;
    }

    .hero-content h1 {
        font-size: 3em;
    }

    .product-overview-section,
    .call-to-action-section,
    .testimonials-section,
    .blog-preview-section {
        padding: 80px 0;
    }
}

/* ESTILOS PARA LAS PÁGINAS ADICIONALES (normativa.html, faqs.html, contacto.html, blog.html, producto.html) */
/* Puedes crear un archivo CSS separado o añadir aquí los estilos si son simples */

.page-section {
    padding: 60px 0;
    background-color: var(--white);
}

.page-section h1,
.page-section h2 {
    text-align: center;
    margin-bottom: 40px;
}

.content-block {
    max-width: 800px;
    margin: 0 auto 30px;
    background-color: var(--background-light);
    padding: 30px;
    border-radius: var(--border-radius);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
}

.content-block p {
    margin-bottom: 15px;
}

/*
    Cambiamos la dirección del flex de 'row' (fila) a 'column' (columna)
    para apilar los elementos verticalmente.
    */
.featured-box {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    /* Alineamos la imagen a la izquierda para que no se centre */
}

/* En móvil, la imagen puede ocupar todo el ancho del contenedor. */
.featured-box img {
    width: 100%;
    max-width: 300px;
    /* Podemos limitar el ancho máximo para que no sea demasiado grande */
    margin-bottom: 15px;
    /* Añadimos espacio debajo de la imagen */
}

/* Estilos específicos para la página de Producto V16 (producto.html) */
.product-detail-section {
    padding: 60px 0;
    background-color: var(--background-light);
}

.product-detail-container {
    display: flex;
    flex-direction: column;
    gap: 40px;
    max-width: 1000px;
    margin: 0 auto;
}

.product-image-gallery {
    /* Puedes usar un slider JS aquí o simplemente varias imágenes */
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 15px;
}

.product-image-gallery img {
    border-radius: var(--border-radius);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
}

.product-info {
    padding: 20px;
    background-color: var(--white);
    border-radius: var(--border-radius);
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.05);
}

.product-info h2 {
    font-size: 2em;
    color: var(--primary-color);
    text-align: left;
    margin-bottom: 15px;
}

.product-price {
    font-size: 1.8em;
    font-weight: bold;
    color: var(--secondary-color);
    margin-bottom: 20px;
}

.product-features-list {
    list-style: none;
    margin-bottom: 20px;
}

.product-features-list li {
    margin-bottom: 10px;
    font-size: 1.05em;
    color: var(--text-color);
}

.product-features-list li i {
    color: var(--primary-color);
    margin-right: 10px;
}

.product-cta-buttons {
    display: flex;
    flex-wrap: wrap;
    gap: 15px;
    margin-top: 30px;
}

/* Media query para product-detail-container en desktop */
@media (min-width: 768px) {

    /* Estilos generales para featured-box (Escritorio por defecto) */
    .featured-box {
        background: linear-gradient(180deg, #fffaf2, #fff2e0);
        border: 1px solid #ffd1a6;
        padding: 18px;
        border-radius: 8px;
        /* Comportamiento Flex para escritorio (horizontal) */
        flex-direction: row;
        gap: 18px;
        align-items: center;
    }

    /* Estilos para la imagen dentro de featured-box */
    .featured-box img {
        width: 220px;
        border-radius: 8px;
        box-shadow: 0 8px 20px rgba(0, 0, 0, 0.06);
        /* Aseguramos que no encoja en escritorio */
        flex-shrink: 0;
    }

    .product-detail-container {
        flex-direction: row;
        /* Diseño de dos columnas para pantallas grandes */
        align-items: flex-start;
    }

    .product-image-gallery {
        flex: 1;
        /* Ocupa un espacio */
        max-width: 45%;
        /* Ajusta según tu diseño */
        grid-template-columns: repeat(2, 1fr);
    }

    .product-info {
        flex: 1.5;
        /* Ocupa más espacio */
        max-width: 55%;
    }
}


/* Estilos para página de FAQs (faqs.html) */
.faq-item {
    background-color: var(--background-light);
    border: 1px solid var(--background-dark);
    border-radius: var(--border-radius);
    margin-bottom: 15px;
    overflow: hidden;
}

.faq-question {
    padding: 18px 25px;
    background-color: var(--secondary-color);
    color: var(--white);
    cursor: pointer;
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-weight: bold;
    font-size: 1.1em;
}

.faq-question i {
    transition: transform 0.3s ease;
}

.faq-question.active i {
    transform: rotate(180deg);
}

.faq-answer {
    padding: 0 25px;
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.4s ease-out, padding 0.4s ease-out;
    background-color: var(--white);
    color: var(--text-color);
}

.faq-answer p {
    padding: 15px 0;
    /* Padding solo cuando está abierto */
}

.faq-answer.open {
    max-height: 200px;
    /* Ajusta según contenido máximo esperado */
    padding-bottom: 15px;
    /* Para que el texto no pegue abajo */
}


/* Estilos para página de Contacto (contacto.html) */
.contact-form-container {
    max-width: 600px;
    margin: 0 auto;
    background-color: var(--background-light);
    padding: 40px;
    border-radius: var(--border-radius);
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.05);
}

.contact-form label {
    display: block;
    margin-bottom: 8px;
    font-weight: bold;
    color: var(--secondary-color);
}

.contact-form input[type="text"],
.contact-form input[type="email"],
.contact-form textarea {
    width: 100%;
    padding: 12px;
    margin-bottom: 20px;
    border: 1px solid var(--background-dark);
    border-radius: var(--border-radius);
    font-size: 1em;
    color: var(--text-color);
}

.contact-form textarea {
    resize: vertical;
    min-height: 120px;
}

.contact-form button.btn-primary {
    width: 100%;
    padding: 15px;
    font-size: 1.1em;
}

/* --- Estilos para el aviso de cookies --- */
#cookie-banner {
    position: fixed;
    bottom: 0;
    left: 0;
    width: 100%;
    background-color: var(--cookie-bg, #333);
    color: var(--cookie-text, #fff);
    padding: 20px;
    z-index: 1000;
    display: flex;
    justify-content: center;
    align-items: center;
    box-shadow: 0 -2px 10px rgba(0, 0, 0, 0.2);
    box-sizing: border-box;
    animation: fadeIn 0.5s ease-in-out;
}

#cookie-banner a {
    color: var(--cookie-link, #fff);
    text-decoration: underline;
}

.cookie-banner-content {
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    align-items: center;
    max-width: 1100px;
    width: 100%;
}

.cookie-banner-content p {
    margin: 0;
    line-height: 1.6;
    flex-grow: 1;
    margin-right: 20px;
}

.cookie-buttons {
    display: flex;
    gap: 10px;
    margin-top: 10px;
}

#cookie-banner .btn {
    border: 1px solid #fff;
    font-size: 0.9em;
    padding: 8px 15px;
}

#cookie-banner .btn-primary {
    background-color: var(--primary-color);
    color: #fff;
    border: 1px solid var(--primary-color);
}

#cookie-banner .btn-primary:hover {
    background-color: var(--cookie-btn-hover, #003366);
    border-color: var(--cookie-btn-hover, #003366);
}

@media (max-width: 768px) {
    #cookie-banner {
        padding: 15px;
        flex-direction: column;
        text-align: center;
    }

    .cookie-banner-content {
        flex-direction: column;
    }

    .cookie-banner-content p {
        margin-right: 0;
        margin-bottom: 15px;
    }

    .cookie-buttons {
        justify-content: center;
    }
}