/* --- Variables Globales (Colores del Logo) --- */
:root {
    --color-rojo: #C00000;
    --color-gris: #595959;
    --color-gris-claro: #f4f4f4;
    --color-texto: #333;
    --color-blanco: #ffffff;
}

/* --- Reseteo Global y Tipografía --- */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: Arial, sans-serif;
    line-height: 1.6;
    color: var(--color-texto);
}

.container {
    width: 90%;
    max-width: 1100px;
    margin: auto;
}

h1, h2, h3 {
    color: var(--color-gris);
    margin-bottom: 20px;
}

p {
    margin-bottom: 15px;
}

/* --- Encabezado y Navegación --- */
.navbar {
    background: var(--color-blanco);
    box-shadow: 0 2px 5px rgba(0,0,0,0.1);
    padding: 1rem 0;
    position: sticky;
    top: 0;
    z-index: 100;
}

.navbar-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    width: 90%;
    max-width: 1100px;
    margin: auto;
}

.logo img {
    height: 50px; /* Ajusta según sea necesario */
}

.nav-links {
    list-style: none;
    display: flex;
}

.nav-links li {
    margin-left: 20px;
}

.nav-links a {
    text-decoration: none;
    color: var(--color-gris);
    font-weight: bold;
    padding: 5px 10px;
    transition: color 0.3s, border-bottom 0.3s;
    border-bottom: 2px solid transparent;
}

.nav-links a:hover,
.nav-links a.active {
    color: var(--color-rojo);
    border-bottom: 2px solid var(--color-rojo);
}

.menu-toggle {
    display: none;
    font-size: 1.8rem;
    color: var(--color-gris);
    cursor: pointer;
}

/* --- Botón CTA (Call to Action) --- */
.cta-button {
    display: inline-block;
    background-color: var(--color-rojo);
    color: var(--color-blanco);
    padding: 12px 25px;
    text-decoration: none;
    border-radius: 5px;
    font-weight: bold;
    transition: background-color 0.3s;
}

.cta-button:hover {
    background-color: #a00000; /* Un rojo más oscuro */
}

/* --- Sección Hero (Inicio) --- */
.hero {
    height: 60vh;
    /* Reemplaza con una imagen de fondo de tu laboratorio */
    background: url('/images/heroIndex.jpg') no-repeat center center/cover;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    text-align: center;
    color: var(--color-blanco);
    padding: 20px;
}

.hero h1 {
    color: var(--color-blanco);
    font-size: 2.5rem;
    text-shadow: 2px 2px 4px rgba(0,0,0,0.7);
}

/* --- Secciones Generales --- */
.content-section {
    padding: 60px 0;
}

.content-section:nth-child(odd) {
    background-color: var(--color-gris-claro);
}

/* --- Mapa --- */
.map-container {
    text-align: center;
}
.map-container iframe {
    width: 100%;
    max-width: 800px;
    height: 400px;
    border: 0;
    border-radius: 8px;
    box-shadow: 0 4px 10px rgba(0,0,0,0.1);
    margin-bottom: 20px;
}

/* --- Galería (Nosotros) --- */
.gallery-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 15px;
}

.gallery-grid img {
    width: 100%;
    height: 200px;
    object-fit: cover;
    border-radius: 8px;
    box-shadow: 0 2px 5px rgba(0,0,0,0.1);
    transition: transform 0.3s;
}

.gallery-grid img:hover {
    transform: scale(1.05);
}

/* --- Servicios --- */
.services-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 20px;
}

.service-item {
    background: var(--color-blanco);
    padding: 20px;
    border-radius: 8px;
    box-shadow: 0 2px 5px rgba(0,0,0,0.1);
}

.service-item h3 {
    color: var(--color-rojo);
}

/* --- Contacto --- */
.contact-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 40px;
    align-items: start;
}

.contact-info h3 {
    color: var(--color-rojo);
}

.contact-buttons {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.contact-button {
    display: inline-block;
    padding: 15px 20px;
    text-decoration: none;
    color: var(--color-blanco);
    font-weight: bold;
    border-radius: 5px;
    text-align: center;
    transition: opacity 0.3s;
}
.contact-button i {
    margin-right: 10px;
}

.contact-button.call { background-color: var(--color-gris); }
.contact-button.whatsapp { background-color: #25D366; }
.contact-button.facebook { background-color: #1877F2; }

.contact-button:hover {
    opacity: 0.9;
}

.contact-form label {
    display: block;
    margin-bottom: 5px;
    font-weight: bold;
}
.contact-form input,
.contact-form textarea {
    width: 100%;
    padding: 10px;
    margin-bottom: 15px;
    border: 1px solid #ccc;
    border-radius: 5px;
}

/* --- Pie de Página (Footer) --- */
footer {
    background-color: var(--color-gris);
    color: var(--color-blanco);
    text-align: center;
    padding: 30px 20px;
    margin-top: 40px;
}
footer p {
    margin: 5px 0;
}

/* --- Responsive (Móvil) --- */
@media (max-width: 768px) {
    .nav-links {
        display: none;
        flex-direction: column;
        width: 100%;
        background: var(--color-blanco);
        position: absolute;
        top: 70px; /* Altura del navbar */
        left: 0;
        box-shadow: 0 4px 10px rgba(0,0,0,0.1);
    }

    .nav-links.active {
        display: flex;
    }

    .nav-links li {
        margin: 0;
        width: 100%;
        text-align: center;
    }

    .nav-links a {
        padding: 15px;
        display: block;
        width: 100%;
        border-bottom: 1px solid var(--color-gris-claro);
    }

    .nav-links a:hover,
    .nav-links a.active {
        border-bottom: 1px solid var(--color-rojo);
    }

    .menu-toggle {
        display: block;
    }

    .hero h1 {
        font-size: 1.8rem;
    }

    .contact-grid {
        grid-template-columns: 1fr;
    }
}

/* --- Botón Scroll-to-Top --- */
#scrollTopBtn {
    display: none; /* Oculto por defecto */
    position: fixed; /* Se queda fijo en la pantalla */
    bottom: 20px;
    right: 30px;
    z-index: 99; /* Se asegura que esté sobre otro contenido */
    border: none;
    outline: none;
    background-color: var(--color-rojo); /* Color del logo */
    color: white;
    cursor: pointer;
    border-radius: 50%; /* Forma circular */
    font-size: 18px; /* Tamaño del ícono */
    width: 50px;
    height: 50px;
    box-shadow: 0 4px 8px rgba(0,0,0,0.2);
    transition: background-color 0.3s, opacity 0.3s;
}

#scrollTopBtn:hover {
    background-color: #a00000; /* Rojo más oscuro (de .cta-button) */
}