/* ==================== VARIABLES Y ESTILOS GLOBALES ==================== */
:root {
    --color-primary: #00AEEF; /* Cian */
    --color-secondary: #EC008C; /* Magenta */
    --color-accent: #FFF200; /* Amarillo */
    --color-dark: #222222;
    --color-light: #FFFFFF;
    --color-text: #333333;
    --color-grey: #f4f4f4;

    --font-heading: 'Montserrat', sans-serif;
    --font-body: 'Roboto', sans-serif;
}

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

html {
    scroll-behavior: smooth;
}

body {
    font-family: var(--font-body);
    color: var(--color-text);
    background-color: var(--color-light);
    line-height: 1.6;
}

h1, h2, h3, h4 {
    font-family: var(--font-heading);
    color: var(--color-dark);
    font-weight: 700;
}

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

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

ul {
    list-style: none;
}

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

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

.section {
    padding: 80px 0;
}

.section__title {
    font-size: 2.5rem;
    text-align: center;
    margin-bottom: 50px;
}

.button {
    display: inline-block;
    padding: 12px 28px;
    border-radius: 5px;
    font-weight: 500;
    font-family: var(--font-body);
    transition: all 0.3s ease;
    border: none;
    cursor: pointer;
}

.button--primary {
    background-color: var(--color-primary);
    color: var(--color-light);
}

.button--primary:hover {
    background-color: #008fbf;
    color: var(--color-light);
}

.button--secondary {
    background-color: var(--color-dark);
    color: var(--color-light);
}

.button--secondary:hover {
    background-color: var(--color-primary);
    color: var(--color-light);
}

/* ==================== HEADER Y NAVEGACIÓN ==================== */
.header {
    background-color: var(--color-light);
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
    position: sticky;
    top: 0;
    width: 100%;
    z-index: 100;
}

.header__container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    height: 80px;
}

.header__logo img {
    height: 50px;
}

.nav__list {
    display: flex;
    gap: 30px;
}

.nav__link {
    font-size: 1rem;
    font-weight: 500;
    color: var(--color-dark);
    position: relative;
    padding: 5px 0;
}

.nav__link.active, .nav__link:hover {
    color: var(--color-primary);
}

.nav__link::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 0;
    height: 2px;
    background-color: var(--color-primary);
    transition: width 0.3s ease;
}

.nav__link.active::after, .nav__link:hover::after {
    width: 100%;
}

/* Submenu */
.nav__item--dropdown {
    position: relative;
}

.submenu {
    position: absolute;
    top: 100%;
    left: 0;
    background-color: var(--color-light);
    box-shadow: 0 4px 15px rgba(0,0,0,0.1);
    border-radius: 5px;
    padding: 15px 0;
    opacity: 0;
    visibility: hidden;
    transform: translateY(10px);
    transition: all 0.3s ease;
    width: 220px;
}

.nav__item--dropdown:hover .submenu {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.submenu__link {
    display: block;
    padding: 8px 20px;
    color: var(--color-dark);
    white-space: nowrap;
}

.submenu__link:hover {
    background-color: var(--color-grey);
    color: var(--color-primary);
}

.nav-toggle {
    display: none; /* Oculto en escritorio */
    font-size: 2rem;
    background: none;
    border: none;
    cursor: pointer;
    color: var(--color-dark);
}

/* ==================== BANNER (HERO) ==================== */
.hero {
    background-image: url('../images/hero_banner.jpg');
    background-size: cover;
    background-position: center;
    height: 60vh;
    display: flex;
    align-items: center;
    position: relative;
    z-index: 1; /* Asegura que el banner esté en una capa superior */
}

/* Capa de superposición para mejorar la legibilidad del texto */
.hero::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.4); /* Capa oscura semitransparente */
    z-index: -1;
}

.hero__content {
    text-align: center;
    color: var(--color-light); /* Asegura que el texto sea blanco */
    position: relative;
    z-index: 2; /* Mantiene el contenido por encima de la capa */
}

.hero__title {
    font-size: 3rem;
    margin-bottom: 20px;
    color: var(--color-light);
    text-shadow: 2px 2px 4px rgba(0,0,0,0.7); /* Sombra para mayor contraste */
}

.hero__description {
    font-size: 1.2rem;
    margin-bottom: 30px;
    max-width: 600px;
    margin-left: auto;
    margin-right: auto;
    color: var(--color-light);
    text-shadow: 2px 2px 4px rgba(0,0,0,0.7); /* Sombra para mayor contraste */
}
/* ==================== PRODUCTOS DESTACADOS ==================== */
.product-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 30px;
}

.product-card {
    background-color: var(--color-light);
    border-radius: 8px;
    box-shadow: 0 4px 20px rgba(0,0,0,0.08);
    overflow: hidden;
    display: flex;
    flex-direction: column;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.product-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 25px rgba(0,0,0,0.12);
}

.product-card__image {
    width: 100%;
    height: 200px;
    object-fit: cover;
}

.product-card__content {
    padding: 25px;
    flex-grow: 1;
    display: flex;
    flex-direction: column;
}

.product-card__title {
    font-size: 1.5rem;
    margin-bottom: 10px;
}

.product-card__description {
    margin-bottom: 20px;
    flex-grow: 1;
}

/* ==================== PIE DE PÁGINA ==================== */
.footer {
    background-color: var(--color-dark);
    color: var(--color-grey);
    padding-top: 60px;
}

.footer__container {
    display: grid;
    grid-template-columns: 2fr 1fr 1fr;
    gap: 40px;
    padding-bottom: 40px;
}

.footer__logo {
    height: 40px;
    margin-bottom: 20px;
    background-color: white; /* Para que se vea sobre fondo oscuro */
    padding: 5px;
    border-radius: 5px;
}

.footer__title {
    color: var(--color-light);
    font-size: 1.2rem;
    margin-bottom: 20px;
}

.footer__list li {
    margin-bottom: 10px;
}

.footer a {
    color: var(--color-grey);
}

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

.footer__bottom {
    border-top: 1px solid #444;
    text-align: center;
    padding: 20px 0;
    font-size: 0.9rem;
}

/* ==================== DISEÑO RESPONSIVO (MÓVIL) ==================== */
@media (max-width: 768px) {
    .section__title {
        font-size: 2rem;
    }

    /* Navegación móvil */
    .nav {
        position: fixed;
        top: 80px;
        right: -100%;
        background-color: var(--color-light);
        width: 100%;
        height: calc(100vh - 80px);
        padding: 40px 0;
        transition: right 0.4s ease-in-out;
    }
    
    .nav.active {
        right: 0;
    }

    .nav__list {
        flex-direction: column;
        align-items: center;
        gap: 25px;
    }
    
    .nav__link {
        font-size: 1.2rem;
    }

    .submenu {
        position: static;
        opacity: 1;
        visibility: visible;
        transform: none;
        box-shadow: none;
        background: transparent;
        padding: 15px 0 0 0;
        width: auto;
        text-align: center;
    }

    .submenu__link {
        padding: 8px 0;
        color: var(--color-text);
    }
    
    .nav-toggle {
        display: block; /* Muestra el botón de hamburguesa */
    }

    /* Hero */
    .hero {
        height: 50vh;
    }
    .hero__title {
        font-size: 2.2rem;
    }

    /* Productos */
    .product-grid {
        grid-template-columns: 1fr;
    }
    
    /* Footer */
    .footer__container {
        grid-template-columns: 1fr;
        text-align: center;
    }

    .footer__logo {
        margin: 0 auto 20px auto;
    }

    /* <<<<<<< CAMBIO AÑADIDO >>>>>>> */
    .footer__social {
        justify-content: center; /* Centra los iconos en móvil */
    }
}

/* ==================== REDES SOCIALES EN FOOTER (MODIFICADO) ==================== */
.footer__social {
    display: flex;
    align-items: center;
    gap: 15px; /* Controla el espacio entre iconos */
    margin-top: 20px;
}

.footer__social a {
    transition: transform 0.2s ease-in-out; /* Añade transición suave al enlace */
}

.footer__social a:hover {
    transform: scale(1.1); /* Agranda el icono al pasar el cursor */
}

.footer__social img {
    height: 35px;
    width: 35px;
    border-radius: 5px;
    display: block;
}

/* ==================== PÁGINA NOSOTROS ==================== */

/* Estilo para el encabezado de las páginas interiores */
.page-header {
    background-color: var(--color-dark);
    color: var(--color-light);
    padding: 60px 0;
    text-align: center;
}

.page-header__title {
    font-size: 3rem;
    color: var(--color-light);
    margin-bottom: 10px;
}

.page-header__subtitle {
    font-size: 1.2rem;
    color: var(--color-grey);
    font-weight: 400;
}

/* Sección "Sobre nosotros" (Antecedentes) */
.about-us__grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 50px;
    align-items: center;
}

.about-us__image img {
    border-radius: 8px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.1);
}

.section__subtitle {
    font-size: 1.8rem;
    margin-bottom: 15px;
    color: var(--color-primary);
}


/* Sección Misión y Visión */
.mission-vision__grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 40px;
}

.mission-vision__card {
    background-color: var(--color-light);
    padding: 40px;
    border-radius: 8px;
    box-shadow: 0 4px 20px rgba(0,0,0,0.08);
    text-align: center;
}

.mission-vision__title {
    font-size: 1.8rem;
    margin-bottom: 15px;
    position: relative;
    display: inline-block;
    padding-bottom: 10px;
}

/* Línea decorativa bajo el título de Misión/Visión */
.mission-vision__title::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 60px;
    height: 3px;
    background-color: var(--color-primary);
}


/* Sección de Valores */
.values__grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 30px;
}

.value-card {
    background-color: var(--color-grey);
    padding: 30px;
    border-radius: 8px;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.value-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 25px rgba(0,0,0,0.12);
}

.value-card__title {
    font-size: 1.5rem;
    margin-bottom: 10px;
    color: var(--color-primary);
}

/* ==================== AJUSTES RESPONSIVOS (NOSOTROS) ==================== */
@media (max-width: 992px) {
    .about-us__grid {
        grid-template-columns: 1fr;
    }
}


@media (max-width: 768px) {
    .page-header__title {
        font-size: 2.2rem;
    }

    .mission-vision__grid {
        grid-template-columns: 1fr;
    }
}

/* ==================== PÁGINA DE CONTACTO ==================== */

.contact-info__grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 30px;
    text-align: center;
}

.contact-card {
    background-color: var(--color-grey);
    padding: 30px;
    border-radius: 8px;
    box-shadow: 0 4px 15px rgba(0,0,0,0.05);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    transition: transform 0.3s ease;
}

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

.contact-card__icon {
    width: 60px;
    height: 60px;
    margin-bottom: 20px;
}

.contact-card__title {
    font-size: 1.5rem;
    color: var(--color-primary);
    margin-bottom: 10px;
}

.contact-card__text {
    margin-bottom: 10px;
}

.contact-card__link {
    font-weight: 500;
    margin-bottom: 5px;
}

.contact-card__link:hover {
    text-decoration: underline;
}

.contact-card__button {
    margin-top: 15px;
}

/* Estilos del Formulario de Contacto */
.contact-form-section {
    background-color: var(--color-light);
}

.contact-form {
    max-width: 700px;
    margin: 0 auto;
    background-color: var(--color-grey);
    padding: 40px;
    border-radius: 8px;
    box-shadow: 0 4px 20px rgba(0,0,0,0.08);
}

.form-group {
    margin-bottom: 25px;
}

.form-group label {
    display: block;
    font-weight: 500;
    margin-bottom: 8px;
}

.form-group input,
.form-group textarea {
    width: 100%;
    padding: 12px;
    border: 1px solid #ccc;
    border-radius: 5px;
    font-family: var(--font-body);
    font-size: 1rem;
    transition: border-color 0.3s ease;
}

.form-group input:focus,
.form-group textarea:focus {
    outline: none;
    border-color: var(--color-primary);
}

/* Sección del Mapa */
.map-container {
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 4px 20px rgba(0,0,0,0.08);
    height: 450px;
}

.map-container iframe {
    width: 100%;
    height: 100%;
}

/* Ajustes Responsivos para Contacto */
@media (max-width: 992px) {
    .contact-info__grid {
        grid-template-columns: 1fr;
    }
}

/* ==================== PRODUCTOS - DETALLE DE PÁGINA (IMAGENES) ==================== */
.product-images-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 20px;
    margin-bottom: 40px;
}

.product-images-grid img {
    width: 100%;
    height: auto;
    display: block;
    border-radius: 8px;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
}

@media (max-width: 768px) {
    .product-images-grid {
        grid-template-columns: 1fr;
    }
}

/* ==================== GALERÍA ==================== */
.gallery-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 20px;
}

.gallery-item {
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 4px 15px rgba(0,0,0,0.1);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.gallery-item:hover {
    transform: scale(1.05);
    box-shadow: 0 8px 25px rgba(0,0,0,0.2);
}

.gallery-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

/* ==================== PRODUCTOS - DETALLE DE PÁGINA (IMAGENES) ==================== */
.product-images-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 20px;
    margin-bottom: 40px;
}

.product-images-grid img {
    width: 100%;
    height: auto;
    display: block;
    border-radius: 8px;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
}

@media (max-width: 768px) {
    .product-images-grid {
        grid-template-columns: 1fr;
    }
}