/* styles.css */

/* Reset y configuración básica */
*,
*::before,
*::after {
    box-sizing: border-box;
}

html, body {
    margin: 0;
    padding: 0;
    overflow-x: hidden; /* Evita desplazamiento horizontal */
    max-width: 100%;
    font-family: Arial, sans-serif;
}

/* Para que las imágenes no se desborden */
img {
    max-width: 100%;
    height: auto;
}

/* BODY principal */
body {
    background-color: #c0e0c0; /* Fondo verde pastel */
    text-align: center;
    padding-bottom: 0px; /* Espacio extra para evitar que el footer se pegue */
    display: flex;
    flex-direction: column;
    min-height: 100vh;
}

/* Encabezado */
header {
    background-color: #c48bb8;
    padding: 20px 40px;
    color: #4a004e;
    font-weight: bold;
}

header h1 {
    margin: 0;
    font-size: 32px;
}

header h2 {
    margin: 5px 0;
    font-size: 18px;
}

/* Navegación */
.nav-container {
    background-color: #945e8a;
    width: 100%;
    display: flex;
    justify-content: center;
    box-sizing: border-box;
}

nav {
    display: flex;
    gap: 20px;
    padding: 10px 0;
}

nav a {
    color: #4a004e;
    text-decoration: none;
    font-weight: bold;
    font-size: 16px;
    padding: 5px 10px;
    transition: all 0.3s ease-in-out;
}

nav a:hover {
    text-decoration: underline;
}

/* Footer */
footer {
    background-color: #c48bb8;
    color: #4a004e;
    font-weight: bold;
    padding: 30px;
    text-align: left;
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    width: 100%;
    box-sizing: border-box;
    overflow: hidden;
    margin-top: auto; /* Empuja el footer al final de la página */
}

footer p {
    margin-bottom: 10px;
    font-size: 18px;
    text-align: left;
    font-weight: normal;
}

/* Redes sociales en el footer */
.social-icons {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 15px;
}

.social-icons a {
    display: flex;
    align-items: center;
    text-decoration: none;
    font-weight: normal;
    font-size: 18px;
    color: #4a004e;
    gap: 10px;
}

.social-icons img {
    width: 40px;
    height: 40px;
}

/* Contenedor genérico */
.container {
    width: 90%;
    max-width: 1200px;
    margin: 20px auto;
    padding: 20px;
}

/* Marco verde genérico */
.marco-verde {
    background-color: #d4edda;
    padding: 25px;
    margin: 25px auto;
    border-radius: 10px;
    max-width: 900px;
    text-align: center;
    box-sizing: border-box;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.2);
}

.marco-verde h4 {
    font-size: 18px;
    color: #3c7a3c;
    margin-bottom: 25px;
}

.marco-verde2 {
    background-color: #d4edda;
    padding: 25px;
    margin: 25px auto;
    border-radius: 10px;
    max-width: 1200px;
    display: flex;
    align-items: center;
    justify-content: flex-start;
    gap: 20px;
    box-shadow: 0 0 10px rgba(0, 0, 0, 0.1);
}

.imagenes {
    flex: 1;
    display: flex;
    justify-content: flex-start;
    gap: 10px;
}

.texto {
    flex: 1;
    text-align: left;
}

/* Contacto y formulario */
.contact-info-form-container {
    background-color: #f1f8e9;
    padding: 25px;
    margin: 25px auto;
    border-radius: 10px;
    max-width: 1200px;
    display: flex;
    justify-content: space-between;
    gap: 20px;
    box-shadow: 0 0 10px rgba(0, 0, 0, 0.1);
}

.contact-info {
    flex: 1;
    background-color: #d4edda;
    padding: 20px;
    border-radius: 10px;
    box-shadow: 0 0 10px rgba(0, 0, 0, 0.1);
    text-align: left;
}

.contact-info h2 {
    font-size: 28px;
    color: #2b5d2b;
    margin-bottom: 15px;
}

.contact-info p {
    font-size: 18px;
    margin-bottom: 15px;
}

.contact-info a {
    color: #4a004e;
    font-weight: bold;
    text-decoration: none;
    transition: color 0.3s ease-in-out;
}

.contact-info a:hover {
    color: #6c3474;
}

.contact-form {
    flex: 1;
    background-color: #d4edda;
    padding: 25px;
    border-radius: 10px;
    box-shadow: 0 0 10px rgba(0, 0, 0, 0.1);
    text-align: center;
}

.contact-form h2 {
    font-size: 28px;
    margin-bottom: 20px;
    color: #2b5d2b;
}

.contact-form input, .contact-form textarea {
    width: 100%;
    padding: 12px 16px;
    margin: 10px 0;
    border-radius: 8px;
    border: 1px solid #ccc;
    font-size: 16px;
    color: #333;
    box-sizing: border-box;
}

.contact-form textarea {
    resize: none;
    height: 100px;
}

.contact-form button {
    background-color: #4a004e;
    color: white;
    padding: 12px 24px;
    border: none;
    border-radius: 8px;
    font-size: 18px;
    cursor: pointer;
    transition: background-color 0.3s ease-in-out;
}

.contact-form button:hover {
    background-color: #6c3474;
}

/* Botones */
.botones-container {
    background-color: #d4edda;
    padding: 20px;
    width: 40%;
    display: flex;
    justify-content: center;
    border-radius: 10px;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.2);
    margin: 0 auto;
}

.botones-container2 {
    padding: 20px;
    margin: 40px auto;
    display: flex;
    justify-content: center;
    align-items: center;
    border-radius: 10px;
    max-width: 300px;
    width: 100%;
}

.botones {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    align-items: center;
    gap: 10px;
    max-width: 100%;
}

.botones button {
    background-color: #c0e0c0;
    border: none;
    padding: 12px 22px;
    font-size: 18px;
    cursor: pointer;
    border-radius: 5px;
    transition: all 0.3s ease-in-out;
    white-space: nowrap;
}

.botones button:hover {
    background-color: #c9e7c9;
    transform: scale(1.05);
}

/* Estadísticas */
.estadisticas-container {
    display: flex;
    justify-content: center;
    gap: 50px;
    margin-top: 40px;
    flex-wrap: wrap;
}

.estadisticas {
    font-size: 26px;
    font-weight: bold;
    color: #3c7a3c;
}

.estadisticas span {
    font-size: 18px;
    display: block;
}

/* Presentación */
.presentacion {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 20px;
    margin: 30px auto;
    max-width: 900px;
    flex-direction: row;
}

.imagen-farmaceutico img {
    max-width: 200px;
    height: auto;
    border-radius: 10px;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
}

.texto-farmaceutico {
    max-width: 500px;
    text-align: center;
    font-size: 20px;
    color: #347234;
}

/* Marco-verde-mapa */
.marco-verde-mapa {
    background-color: #d4edda;
    padding: 25px;
    margin: 25px auto;
    border-radius: 10px;
    max-width: 1200px;
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 20px;
    box-shadow: 0 0 10px rgba(0, 0, 0, 0.1);
}

.marco-verde-mapa .text-content {
    flex: 1;
    margin-right: 20px;
    color: #2b5d2b;
}

.marco-verde-mapa .map-container {
    flex: 1;
    text-align: center;
}

.marco-verde-mapa .map-container iframe {
    max-width: 100%;
    border-radius: 10px;
    box-shadow: 0 0 10px rgba(0, 0, 0, 0.2);
}

/* ==============================================
   Galería de marcas (3 columnas x 2 filas)
   ============================================== */
.galeria-marcas {
    display: grid;
    grid-template-columns: repeat(3, 1fr); /* 3 columnas en pantallas grandes */
    gap: 20px;
    justify-items: center;
    margin-top: 20px;
}

/* 
   Ajustamos cada imagen a un cuadrado de 300x300 px en escritorio
   para que se vean igual que la galería principal 
*/
.marca-item img {
    width: 300px;
    height: 300px; 
    object-fit: cover;  /* Recorta la imagen sin deformarla */
    border-radius: 10px;
    transition: transform 0.3s ease-in-out;
}

.marca-item:hover img {
    transform: scale(1.1);
}

.marca-item h4 {
    margin-top: 5px;
}

/* Adaptación responsive para las marcas */
@media (max-width: 768px) {
  .galeria-marcas {
    grid-template-columns: repeat(2, 1fr); /* 2 columnas en pantallas medianas */
  }
  .marca-item img {
    width: 250px;
    height: 250px;
  }
}

@media (max-width: 480px) {
  .galeria-marcas {
    grid-template-columns: repeat(1, 1fr); /* 1 columna en móviles */
  }
  .marca-item img {
    width: 200px;
    height: 200px;
  }
}

/* Galería (para la primera sección con 4 imágenes grandes) */
.galeria {
    display: grid;
    grid-template-columns: repeat(10, 1fr);
    gap: 10px;
    justify-content: center;
    margin-top: 20px;
}

.galeria img {
    border-radius: 10px;
    transition: transform 0.3s ease-in-out;
    cursor: pointer;
}

.galeria img:hover {
    transform: scale(1.05);
}

/* Lightbox (ecommerce) */
.lightbox {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.8);
    display: none;
    justify-content: center;
    align-items: center;
    z-index: 1000;
}

.lightbox img {
    max-width: 90%;
    max-height: 90%;
    border-radius: 10px;
}

.lightbox .prev, .lightbox .next {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background: rgba(255, 255, 255, 0.5);
    color: black;
    border: none;
    padding: 10px;
    cursor: pointer;
    font-size: 24px;
    border-radius: 5px;
}

.lightbox .prev {
    left: 20px;
}

.lightbox .next {
    right: 20px;
}

/* Noticia (bienvenida, ecommerce) */
.noticia-container {
    display: flex;
    justify-content: center;
    text-decoration: none;
    margin: 20px auto;
    width: 90%;
    max-width: 800px;
}

.noticia {
    background-color: #d4edda;
    padding: 20px;
    border-radius: 10px;
    box-shadow: 0 0 10px rgba(0, 0, 0, 0.1);
    max-width: 800px;
    text-align: center;
    transition: transform 0.3s ease-in-out;
    flex: 1;
    color: #3c7a3c;
}

.noticia img {
    width: 100%;
    object-fit: cover;
    border-radius: 10px;
}

.noticia h2 {
    font-size: 22px;
    color: #2b5d2b;
    margin-top: 10px;
}

.noticia p {
    font-size: 16px;
    line-height: 1.5;
}

.noticia .fecha {
    display: block;
    margin-top: 10px;
    font-size: 14px;
    color: #555;
}

.noticia:hover {
    transform: scale(1.05);
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.2);
}

/* MEDIA QUERIES */

/* Tablets y pantallas medianas (hasta 768px) */
@media (max-width: 768px) {
    header {
        padding: 15px;
    }
    header h1 {
        font-size: 24px;
    }
    header h2 {
        font-size: 16px;
    }
    
    .nav-container {
        flex-direction: column;
        align-items: center;
    }
    nav {
        flex-direction: column;
        gap: 10px;
    }

    .marco-verde,
    .marco-verde2,
    .contact-info-form-container,
    .presentacion,
    .marco-verde-mapa {
        width: 90%;
        max-width: 90%;
        margin: 20px auto;
        flex-direction: column;
        align-items: center;
    }

    .marco-verde2 {
        justify-content: center;
    }
    .imagen-farmaceutico img {
        max-width: 150px;
    }
    .texto-farmaceutico {
        font-size: 16px;
    }
    .contact-info,
    .contact-form {
        width: 100%;
        margin-bottom: 20px;
    }
    .map-container iframe {
        width: 100% !important;
        height: auto !important;
    }

    footer {
        padding: 20px;
        text-align: center;
        align-items: center;
    }
    footer p {
        font-size: 16px;
    }
    .social-icons {
        align-items: center;
    }
}

/* Móviles (hasta 480px) */
@media (max-width: 480px) {
    header h1 {
        font-size: 20px;
    }
    header h2 {
        font-size: 14px;
    }
    
    .botones button {
        width: 100%;
        font-size: 14px;
        padding: 12px;
    }
    .estadisticas {
        font-size: 20px;
    }
    .estadisticas span {
        font-size: 14px;
    }

    .presentacion {
        gap: 10px;
    }
    .imagen-farmaceutico img {
        max-width: 120px;
    }

    .marco-verde,
    .marco-verde2,
    .contact-info-form-container,
    .marco-verde-mapa {
        padding: 15px;
    }

    .map-container iframe {
        height: 300px !important;
    }
    
    .contact-info h2, .contact-form h2 {
        font-size: 20px;
    }
    
    .contact-info p {
        font-size: 14px;
    }
    .contact-form button {
        font-size: 16px;
        padding: 10px 20px;
    }
    .noticia h2 {
        font-size: 18px;
    }
    .noticia p {
        font-size: 14px;
    }
    .noticia .fecha {
        font-size: 12px;
    }
    #botones-index {
        margin: 30px auto;   /* Ajusta aquí la separación vertical que desees */
        padding: 25px;       /* Ajusta el padding para la caja en móvil */
        border-radius: 15px; /* Si quieres que coincida con la caja de bienvenida */
        max-width: 90%;      /* Para que no quede muy estrecho en pantallas pequeñas */
        width: auto;         /* Que se ajuste automáticamente */
    }
    .botones {
        flex-direction: column;
        align-items: center;
    }
}

/* ==========================================
   REGLA ESPECÍFICA PARA #botones-index
   ========================================== */
#botones-index {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background-color: #d4edda;
    padding: 25px;
    border-radius: 15px; /* Igual que la caja de bienvenida */
    box-shadow: 0 0 10px rgba(0, 0, 0, 0.1); /* Igual que la caja de bienvenida */
    max-width: 900px;    /* Limita el ancho si lo deseas */
    margin: 30px auto;   /* Separa 30px verticalmente y centra horizontalmente */
    width: fit-content;  /* Ajusta su tamaño al contenido */
    text-align: center;
}
