/*
 * Gamalac Main Stylesheet
 * Author: AI Assistant
 * Version: 1.1
 * Changes: Updated hero background to use picsum.photos
 */

/* -- VARIABLES & BASIC SETUP -- */
:root {
    --primary-color: #5d2b8b; /* Purple from logo */
    --accent-color: #a4c639;  /* Green from logo */
    --dark-color: #333333;
    --text-color: #555555;
    --light-gray-color: #f4f7f6;
    --white-color: #ffffff;
    --border-radius: 12px;
}

html {
    scroll-behavior: smooth;
    scroll-padding-top: 80px; /* Offset for fixed header */
}

body {
    font-family: 'Poppins', sans-serif;
    margin: 0;
    line-height: 1.6;
    color: var(--text-color);
    background-color: var(--white-color);
}

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

h1, h2, h3 {
    color: var(--dark-color);
    font-weight: 600;
}

h2 {
    font-size: 2.5rem;
    margin-bottom: 40px;
    text-align: center;
}

section {
    padding: 80px 0;

}

.section-light {
    background-color: var(--light-gray-color);
}

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

/* -- HEADER & NAVIGATION -- */
.main-header {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    background-color: var(--white-color);
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
    z-index: 1000;
    height: 80px;
}

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

.logo {
    height: 60px;
}

.main-nav ul {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
}

.main-nav a {
    text-decoration: none;
    color: var(--primary-color);
    font-weight: 600;
    padding: 10px 15px;
    transition: color 0.3s ease;
}

.main-nav a:hover {
    color: var(--accent-color);
}

/* ESTILOS PARA EL BOTÓN HAMBURGUESA (AÑADIDO) */
.hamburger-menu {
    display: none; /* Oculto por defecto en escritorio */
    background: none;
    border: none;
    cursor: pointer;
    padding: 10px;
    z-index: 1001; /* Debe estar sobre todo lo demás */
}

.hamburger-line {
    display: block;
    width: 25px;
    height: 3px;
    background-color: var(--primary-color);
    margin: 5px 0;
    transition: transform 0.3s ease, opacity 0.3s ease;
}

/* Animación del botón a 'X' cuando está activo */
.hamburger-menu.is-active .hamburger-line:nth-child(1) {
    transform: translateY(8px) rotate(45deg);
}
.hamburger-menu.is-active .hamburger-line:nth-child(2) {
    opacity: 0;
}
.hamburger-menu.is-active .hamburger-line:nth-child(3) {
    transform: translateY(-8px) rotate(-45deg);
}

.hamburger-menu.is-active .hamburger-line {
    background-color: var(--white-color);
}
/* CLASE PARA EVITAR SCROLL (AÑADIDO) */
.no-scroll {
    overflow: hidden;
}

/* -- HERO SLIDER -- */
#home {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 100vh;
    background-repeat: no-repeat;
    background-position: center center;
    background-size: cover;
    color: var(--white-color);
    text-align: center;
    padding-top: 80px;
    transition: background-image 0.5s ease-in-out, opacity 0.5s ease-in-out;
    opacity: 1;
}

#home.fade-out {
    opacity: 0;
}

.hero-content {
    background-color: rgba(93, 43, 139, 0.7);
    padding: 40px;
    border-radius: var(--border-radius);
    transition: opacity 0.5s ease-in-out;
    width: calc(90% - 80px);                 /* ADDED: Limits width on mobile */
    max-width: 1100px;           /* ADDED: Prevents it from being too wide on desktops */
}

.hero-content h1 {
    font-size: 3.5rem;
    color: var(--white-color);
    margin: 0 0 10px 0;
}

.button-primary {
    display: inline-block;
    background-color: var(--accent-color);
    color: var(--white-color);
    padding: 12px 25px;
    border-radius: 50px;
    text-decoration: none;
    font-weight: 600;
    transition: background-color 0.3s ease;
}
.button-primary:hover {
    background-color: #8db025;
}

/* -- CARDS (Used for Promotions & Services) -- */
.card {
    background-color: var(--white-color);
    border-radius: var(--border-radius);
    box-shadow: 0 4px 15px rgba(0,0,0,0.08);
    overflow: hidden;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    display: flex;
    flex-direction: column;
}

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

.card-content {
    padding: 20px;
    flex-grow: 1;
}

/* -- PROMOTIONS CAROUSEL -- */
.carousel-wrapper {
    position: relative;
    padding: 0 40px; /* Espacio para los botones */
}

.carousel {
    overflow: hidden;
    width: 100%;
}

.carousel-track {
    display: flex;
    transition: transform 0.5s ease-in-out;
}

.promo-card {
    flex: 0 0 100%; /* En móvil, cada tarjeta ocupa el 100% */
    margin: 0 10px;
}

/* Estilos para los botones de navegación del carrusel */
.carousel-button {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background-color: var(--white-color);
    border: 1px solid #ddd;
    border-radius: 50%;
    width: 40px;
    height: 40px;
    font-size: 20px;
    font-weight: bold;
    color: var(--primary-color);
    cursor: pointer;
    z-index: 10;
    transition: background-color 0.3s, box-shadow 0.3s;
}

.carousel-button:hover {
    background-color: var(--light-gray-color);
    box-shadow: 0 2px 5px rgba(0,0,0,0.1);
}

.carousel-button.prev {
    left: 0;
}

.carousel-button.next {
    right: 0;
}

.carousel-button:disabled {
    cursor: not-allowed;
    opacity: 0.4;
}


@media (min-width: 768px) {
    .carousel-track {
        padding: 0; /* Quitamos el padding en pantallas grandes */
    }
    .promo-card {
        flex-basis: 45%; /* 2 tarjetas visibles con un pequeño espacio */
        scroll-snap-align: start; /* Alineamos al inicio en lugar de centrar */
    }
}

@media (min-width: 992px) {
    .promo-card {
        flex-basis: 32%; /* 3 tarjetas visibles */
    }
}


/* -- PREPARATION CHECKER -- */
.preparation-checker {
    display: flex;
    justify-content: center;
    gap: 15px;
    margin: 20px 0;
}

#exam-select {
    padding: 10px;
    min-width: 250px;
    border: 1px solid #ccc;
    border-radius: 8px;
    font-family: 'Poppins', sans-serif;
}

.button-secondary {
    display: inline-block;
    background-color: var(--primary-color);
    color: var(--white-color);
    padding: 12px 25px;
    border-radius: 50px;
    text-decoration: none;
    font-weight: 600;
    border: none;
    cursor: pointer;
    transition: background-color 0.3s ease;
}

.button-secondary:hover {
    background-color: #4a2270;
}

/* BOTÓN DE WHATSAPP */
.button-whatsapp {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    background-color: #25D366;
    color: var(--white-color) !important;
    padding: 12px 25px;
    margin-top: 20px;
    border-radius: 50px;
    text-decoration: none;
    font-weight: 600;
    transition: background-color 0.3s ease, transform 0.2s ease;
}

.button-whatsapp .fab {
    font-size: 1.5rem; /* Tamaño del icono */
}

.button-whatsapp:hover {
    background-color: #1DAA51;
    transform: translateY(-2px);
}

.preparation-info {
    margin-top: 30px;
    padding: 20px;
    background-color: var(--white-color);
    border-left: 5px solid var(--accent-color);
    border-radius: var(--border-radius);
    max-width: 700px;
    margin-left: auto;
    margin-right: auto;
    text-align: left;
    display: none; /* Se muestra con JS */
}

/* -- SERVICES -- */
.services-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 40px;
}

.service-card {
    padding: 30px;
    display: flex;
    flex-direction: column; /* Diseño apilado por defecto para móvil */
    align-items: center;   /* Centrado para móvil */
    /*text-align: center;    /* Centrado para móvil */
	
}

/* El contenido textual de la tarjeta */
.service-card-content {
    display: flex;
    flex-direction: column;
    align-items: center; /* Centrado para móvil */
}

.service-icon {
    height: 150px;
    margin-bottom: 20px;
}

.service-description {
    margin-bottom: 20px;
}

.service-item-list {
    /*list-style-type: none; /* Sin viñetas en móvil */
    padding-left: 0;
    margin-top: 0;
}

.service-item-list li {
    margin-bottom: 10px;
}

/* En pantallas de tablet y más grandes, aplicamos el layout horizontal y opuesto */
@media (min-width: 768px) {
    .service-card {
        flex-direction: row; /* Cambia a layout horizontal */
        text-align: left;    /* Alinea el texto a la izquierda */
       	align-items: flex-start;
        gap: 30px;
    }

    .service-card-content {
        align-items: flex-start; /* Alinea el contenido a la izquierda */
    }

    .service-icon {
        height: 120px;
        flex-shrink: 0; /* Evita que el icono se encoja */
        margin-bottom: 0;
    }

    .service-item-list {
        list-style-type: disc; /* Muestra las viñetas en escritorio */
        padding-left: 20px;
    }

    /* Invierte el orden para la segunda tarjeta (y cualquier otra tarjeta par) */
    .services-grid .service-card:nth-child(even) {
        /*flex-direction: row-reverse;*/ 
    }
}

/* -- WHY CHOOSE US -- */
.features-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 30px;
    text-align: center;
}

/* -- HELIX GENOMA SECTION -- */
.helix-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 30px;
    align-items: center;
}

.helix-logo-container {
    text-align: center;
}

.helix-logo {
    max-width: 250px;
    width: 100%;
    border-radius: var(--border-radius);
    box-shadow: 0 5px 20px rgba(0,0,0,0.1);
}

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

.helix-intro {
    display: block;
    color: var(--primary-color);
    font-weight: 600;
    margin-bottom: 10px;
}

.helix-content h2 {
    margin-top: 0;
    margin-bottom: 5px;
}

.helix-content h4 {
    margin-top: 0;
    margin-bottom: 20px;
    font-weight: 400;
    color: var(--text-color);
}

.helix-content p {
    max-width: 600px;
    margin: 0 auto 30px auto;
}

/* Layout de dos columnas para pantallas de tablet y más grandes */
@media (min-width: 768px) {
    .helix-grid {
        grid-template-columns: 1fr 2fr;
        gap: 50px;
    }

    .helix-content {
        text-align: left;
    }

    .helix-content p {
        margin-left: 0;
    }
}

/* -- CONTACT & FOOTER -- */
.contact-header {
    margin-bottom: 30px;
}

.contact-map-full {
    width: 100%;
    border-radius: var(--border-radius);
    overflow: hidden; /* Asegura que el iframe respete el borde redondeado */
    box-shadow: 0 4px 15px rgba(0,0,0,0.1);
}

.main-footer {
    background-color: var(--dark-color);
    color: #a9a9a9; /* Un gris más claro para mejor lectura */
    padding: 60px 0 20px 0;
}

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

.footer-column h4 {
    color: var(--white-color);
    margin-bottom: 20px;
    font-size: 1.1rem;
}

.footer-logo {
    max-width: 180px;
    margin-bottom: 15px;
    /*filter: brightness(0) invert(1); /* Invierte el color del logo a blanco */
}

.footer-column ul {
    list-style: none;
    padding: 0;
}

.footer-column li {
    margin-bottom: 12px;
}

.footer-column a {
    color: #a9a9a9;
    text-decoration: none;
    transition: color 0.3s ease;
}

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

.contact-list-footer li {
    display: flex;
    align-items: flex-start;
    gap: 10px;
}

.contact-list-footer .fas, .contact-list-footer .fab {
    margin-top: 5px;
    color: var(--accent-color);
}

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

/* -- RESPONSIVE DESIGN -- */
@media (max-width: 768px) {
    h2 { font-size: 2rem; }
    .main-nav { display: none; } /* Simplificación para demo, se requeriría un menú hamburguesa con JS */
    .services-grid, .features-grid, .contact-grid { grid-template-columns: 1fr; }
    .preparation-checker { flex-direction: column; align-items: center; }
    #exam-select, .button-secondary { width: 80%; max-width: 350px; }
	.hero-content {
        padding: 25px; /* CHANGED: Adjusted padding for smaller screens */
    }
    .hero-content h1 { font-size: 1.5rem; }
}

@media (max-width: 767px) {
    /* ... reglas existentes ... */

    /* OCULTA EL MENÚ DE NAVEGACIÓN DE ESCRITORIO Y MUESTRA EL BOTÓN HAMBURGUESA (CAMBIADO) */
    .main-nav {
        position: fixed;
        top: 0;
        left: 0;
        width: 100%;
        height: 100vh;
        background-color: rgba(93, 43, 139, 0.95); /* Fondo del overlay */
        display: flex;
        justify-content: center;
        align-items: center;
        flex-direction: column;
        opacity: 0;
        visibility: hidden;
        transform: translateY(-100%);
        transition: transform 0.4s ease, opacity 0.4s ease, visibility 0.4s;
        z-index: 1000;
    }

    .main-nav.is-open {
        opacity: 1;
        visibility: visible;
        transform: translateY(0);
    }
    
    .main-nav ul {
        flex-direction: column;
        text-align: center;
    }

    .main-nav li {
        margin: 20px 0;
    }

    .main-nav a {
        color: var(--white-color);
        font-size: 1.5rem;
    }

    .hamburger-menu {
        display: block; /* Muestra el botón en móvil */
    }
}