/* Variables CSS */
:root {
    --primary-color: #007bff; /* Azul vibrante de la marca */
    --secondary-color: #28a745; /* Verde para acentos */
    --dark-blue: #2C3E50; /* Azul oscuro para fondos y texto */
    --light-gray: #F8F9FA; /* Gris muy claro */
    --text-color: #34495E; /* Gris oscuro para texto */
    --white: #FFFFFF;
    --whatsapp-color: #25D366; /* Verde WhatsApp */

    --font-poppins: 'Poppins', sans-serif;
    --font-lato: 'Lato', sans-serif;

    --header-height: 80px; /* Altura del header sticky */
}

/* Reset y Estilos Generales */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: var(--font-lato);
    line-height: 1.7;
    color: var(--text-color);
    background-color: var(--light-gray);
    -webkit-font-smoothing: antialiased;
    scroll-behavior: smooth; /* Habilita el scroll suave por defecto */
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 25px; /* Más padding para los lados */
}

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

a:hover {
    color: var(--dark-blue);
}

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

h1, h2, h3 {
    font-family: var(--font-poppins);
    color: var(--dark-blue);
    font-weight: 700;
    margin-bottom: 20px;
}

h1 { font-size: 4.5em; line-height: 1.1; }
h2 { font-size: 3.2em; line-height: 1.2; }
h3 { font-size: 2em; }

p {
    margin-bottom: 1.2em;
    font-size: 1.1em;
}

.section-title {
    text-align: center;
    margin-bottom: 25px;
}

.section-description {
    text-align: center;
    max-width: 800px;
    margin: 0 auto 60px;
    font-size: 1.2em;
    color: var(--text-color);
}

.btn {
    display: inline-flex; /* Usar flex para centrar contenido si hay ícono */
    align-items: center;
    justify-content: center;
    padding: 15px 35px;
    border-radius: 8px; /* Bordes ligeramente más redondeados */
    font-weight: 600;
    font-size: 1.1em;
    transition: all 0.3s ease;
    border: none;
    cursor: pointer;
    gap: 10px; /* Espacio entre texto e ícono */
}

.btn-primary {
    background-color: var(--primary-color);
    color: var(--white);
    box-shadow: 0 5px 15px rgba(0,0,0,0.2);
}

.btn-primary:hover {
    background-color: #0056b3;
    transform: translateY(-3px);
    box-shadow: 0 8px 20px rgba(0,0,0,0.3);
}

.btn-secondary {
    background-color: var(--secondary-color);
    color: var(--white);
    box-shadow: 0 5px 15px rgba(0,0,0,0.2);
}

.btn-secondary:hover {
    background-color: #218838;
    transform: translateY(-3px);
    box-shadow: 0 8px 20px rgba(0,0,0,0.3);
}

.btn-whatsapp-hero, .btn-whatsapp-header { /* Renombrado para diferenciar el de la cabecera */
    background-color: var(--whatsapp-color);
    color: var(--white);
    box-shadow: 0 5px 15px rgba(0,0,0,0.2);
}

.btn-whatsapp-hero:hover, .btn-whatsapp-header:hover {
    background-color: #1eaf53;
    transform: translateY(-3px);
    box-shadow: 0 8px 20px rgba(0,0,0,0.3);
}

/* Header */
.main-header {
    background-color: var(--white);
    padding: 15px 0;
    position: sticky;
    top: 0;
    left: 0;
    width: 100%;
    z-index: 1000;
    box-shadow: 0 2px 10px rgba(0,0,0,0.05);
    height: var(--header-height);
    display: flex;
    align-items: center;
}

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

.main-header .logo img {
    height: 60px; /* Tamaño fijo del logo */
    width: auto;
}

/* Main Navigation (Desktop) */
.main-nav {
    display: flex;
    align-items: center;
    gap: 30px; /* Espacio entre el menú de enlaces y el botón de WhatsApp */
}

.main-nav ul {
    list-style: none;
    display: flex; /* Muestra el menú de enlaces en desktop */
    gap: 25px;
    margin: 0;
}

.main-nav ul li a {
    color: var(--dark-blue);
    font-family: var(--font-poppins);
    font-size: 1.05em;
    font-weight: 500;
    padding: 5px 0;
    position: relative;
    transition: color 0.3s ease;
}

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

.main-nav ul li a:hover::after,
.main-nav ul li a.active::after {
    width: 100%;
}

.main-nav ul li a:hover {
    color: var(--primary-color);
}

/* Menu Toggle (Hamburguesa) - Oculto en desktop */
.menu-toggle {
    display: none; /* Oculto por defecto en desktop */
    background: none;
    border: none;
    font-size: 2em;
    color: var(--dark-blue);
    cursor: pointer;
    z-index: 1001; /* Asegura que esté por encima del menú colapsado */
}

/* Hero Section */
.hero-section {
    background: linear-gradient(rgba(44,62,80,0.8), rgba(44,62,80,0.8)), url('hero_dentist_bg.jpg') no-repeat center center/cover;
    height: calc(100vh - var(--header-height)); /* Altura total menos el header */
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    color: var(--white);
    text-align: center;
    position: relative;
    padding: 0 20px; /* Padding horizontal */
}

.hero-content {
    max-width: 900px;
    margin-bottom: 50px; /* Espacio para el scroll down */
}

.hero-content h1 {
    color: var(--white);
    font-weight: 700;
    text-shadow: 0 4px 8px rgba(0,0,0,0.4);
    margin-bottom: 25px;
}

.hero-content .subtitle {
    font-family: var(--font-lato);
    font-size: 1.8em;
    font-weight: 300;
    color: rgba(255,255,255,0.9);
    margin-bottom: 40px;
}

.scroll-down {
    position: absolute;
    bottom: 30px;
    left: 50%;
    transform: translateX(-50%);
    color: var(--white);
    display: flex;
    flex-direction: column;
    align-items: center;
    font-size: 1em;
    animation: bounce 2s infinite;
}

.scroll-down i {
    font-size: 1.5em;
    margin-top: 5px;
}

@keyframes bounce {
    0%, 20%, 50%, 80%, 100% {
        transform: translateY(0);
    }
    40% {
        transform: translateY(-10px);
    }
    60% {
        transform: translateY(-5px);
    }
}

/* Services Section */
.services-section {
    padding: 100px 0;
    background-color: var(--white);
}

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

.service-card {
    background-color: var(--light-gray);
    padding: 40px;
    border-radius: 12px;
    text-align: center;
    box-shadow: 0 6px 20px rgba(0,0,0,0.08);
    transition: all 0.3s ease;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    height: 100%; /* Para que todas tengan la misma altura si el contenido es variable */
}

.service-card:hover {
    transform: translateY(-10px);
    box-shadow: 0 12px 30px rgba(0,0,0,0.15);
    background-color: var(--primary-color); /* Efecto al pasar el ratón */
    color: var(--white);
}

.service-card:hover i,
.service-card:hover h3,
.service-card:hover p {
    color: var(--white);
}

.service-card i {
    font-size: 3.8em;
    color: var(--primary-color);
    margin-bottom: 25px;
    transition: color 0.3s ease;
}

.service-card h3 {
    font-size: 1.6em;
    margin-bottom: 15px;
    transition: color 0.3s ease;
}

.service-card p {
    font-size: 1em;
    line-height: 1.6;
    margin-bottom: 0;
    transition: color 0.3s ease;
}

/* About Section */
.about-section {
    background-color: var(--light-gray);
    padding: 100px 0;
}

.about-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 80px;
    align-items: center;
}

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

.about-content h2 {
    margin-bottom: 25px;
}

.about-content p {
    margin-bottom: 20px;
}

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

.about-image img {
    border-radius: 12px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.15);
}

/* Contact Section */
.contact-section {
    background-color: var(--dark-blue);
    color: var(--white);
    padding: 100px 0;
}

.contact-section .section-title,
.contact-section .section-description {
    color: var(--white);
}

.contact-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 80px;
}

.contact-form-wrapper {
    background-color: rgba(255,255,255,0.08); /* Fondo sutil para el formulario */
    padding: 40px;
    border-radius: 12px;
    box-shadow: 0 5px 20px rgba(0,0,0,0.2);
}

.contact-form input,
.contact-form textarea {
    width: 100%;
    padding: 15px;
    margin-bottom: 25px;
    border: 1px solid rgba(255,255,255,0.3);
    border-radius: 8px;
    background-color: rgba(255,255,255,0.05);
    color: var(--white);
    font-family: var(--font-lato);
    font-size: 1em;
    transition: all 0.3s ease;
}

.contact-form input:focus,
.contact-form textarea:focus {
    outline: none;
    border-color: var(--primary-color);
    background-color: rgba(255,255,255,0.1);
    box-shadow: 0 0 0 3px rgba(0,123,255,0.25);
}

.contact-form input::placeholder,
.contact-form textarea::placeholder {
    color: rgba(255,255,255,0.7);
}

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

.contact-form .btn {
    width: 100%;
    margin-top: 15px;
}

.contact-info-wrapper h3 {
    color: var(--white);
    margin-bottom: 30px;
}

.info-item {
    display: flex;
    align-items: flex-start;
    gap: 20px;
    margin-bottom: 25px;
}

.info-item i {
    font-size: 1.8em;
    color: var(--primary-color);
    line-height: 1.5; /* Para alinear con el texto de múltiples líneas */
}

.info-item p {
    font-family: var(--font-poppins);
    font-weight: 500;
    margin-bottom: 5px;
    color: rgba(255,255,255,0.9);
}

.info-item a {
    color: rgba(255,255,255,0.8);
    font-size: 1em;
    line-height: 1.4;
    display: inline-block; /* Para que cada enlace de número de teléfono esté en su propia línea */
}

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

.social-links-contact {
    display: flex;
    justify-content: flex-start;
    gap: 25px;
    margin-top: 40px;
}

.social-links-contact a {
    color: var(--white);
    font-size: 2.2em;
}

.social-links-contact a:hover {
    color: var(--primary-color);
    transform: translateY(-5px);
}


/* Footer */
.main-footer {
    background-color: var(--dark-blue);
    padding: 50px 0;
    border-top: 1px solid rgba(255,255,255,0.1);
    color: rgba(255,255,255,0.7);
}

.main-footer .container {
    text-align: center;
}

.footer-content {
    display: flex;
    flex-direction: column; /* Apilado en móvil */
    align-items: center;
    margin-bottom: 30px;
}

.footer-logo img {
    height: 50px;
    margin-bottom: 25px;
}

.footer-links-group {
    display: flex;
    gap: 30px;
    margin-bottom: 25px;
}

.footer-links-group a {
    color: rgba(255,255,255,0.7);
    font-size: 0.95em;
}

.footer-links-group a:hover {
    color: var(--primary-color);
    text-decoration: underline;
}

.copyright {
    font-size: 0.9em;
    margin-bottom: 0;
}

/* WhatsApp Floating Button */
.whatsapp-float {
    position: fixed;
    width: 65px;
    height: 65px;
    bottom: 30px;
    right: 30px;
    background-color: var(--whatsapp-color);
    color: var(--white);
    border-radius: 50%;
    text-align: center;
    font-size: 2.8em;
    line-height: 65px;
    box-shadow: 0 8px 25px rgba(0,0,0,0.3);
    z-index: 999;
    transition: transform 0.3s ease, background-color 0.3s ease;
}

.whatsapp-float:hover {
    background-color: #1eaf53;
    transform: scale(1.08);
}

/* Media Queries para Responsividad */

/* Tablets y Pequeñas Laptops */
@media (max-width: 992px) {
    h1 { font-size: 3.5em; }
    h2 { font-size: 2.5em; }
    h3 { font-size: 1.7em; }
    p { font-size: 1em; }
    .section-description { font-size: 1.05em; margin-bottom: 40px; }

    .main-header .logo img {
        height: 55px;
    }

    /* Ocultar el menú normal en pantallas pequeñas */
    .main-nav ul {
        display: none;
        flex-direction: column;
        position: absolute;
        top: var(--header-height); /* Debajo del header */
        left: 0;
        width: 100%;
        background-color: var(--white);
        box-shadow: 0 5px 10px rgba(0,0,0,0.1);
        padding: 20px 0;
        border-top: 1px solid var(--light-gray);
        z-index: 990; /* Detrás del botón de hamburguesa */
    }

    .main-nav ul.active {
        display: flex; /* Mostrar cuando la clase 'active' está presente */
    }

    .main-nav ul li {
        margin: 10px 0;
        text-align: center;
    }

    .main-nav ul li a {
        padding: 10px 0;
        display: block;
        color: var(--dark-blue); /* Ajusta color para el fondo blanco del menú móvil */
    }

    .main-nav ul li a:hover {
        color: var(--primary-color);
    }
    .main-nav ul li a::after { /* Desactivar el subrayado en el menú móvil */
        width: 0 !important; 
    }

    /* Ajustar el botón de WhatsApp en la cabecera para móvil */
    .main-nav .btn-whatsapp-header {
        position: absolute; /* Posicionamiento absoluto para controlar su ubicación */
        top: var(--header-height); /* Debajo del header */
        right: 0;
        width: 100%;
        border-radius: 0 0 8px 8px; /* Redondear solo la parte inferior */
        margin-top: 0;
        padding: 15px 0;
        z-index: 995; /* Entre el menú y el toggle */
        display: none; /* Oculto por defecto, se muestra con JS si es necesario o se reevalúa*/
        /* Considerar mostrarlo junto a los enlaces en el menú desplegable en lugar de aquí */
    }
    /* Para el propósito de este ejemplo, lo dejaremos oculto y lo mostraremos si se desea */


    /* Mostrar el botón de hamburguesa */
    .menu-toggle {
        display: block; /* Muestra el botón de hamburguesa */
    }

    .hero-section {
        height: 75vh; /* Ajusta altura del hero */
    }
    .hero-content .subtitle {
        font-size: 1.5em;
    }

    .services-grid {
        grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
        gap: 25px;
    }

    .about-grid {
        grid-template-columns: 1fr; /* Colapsa a una columna */
        gap: 50px;
    }
    .about-content {
        text-align: center;
    }

    .contact-grid {
        grid-template-columns: 1fr; /* Colapsa a una columna */
        gap: 50px;
    }
    .contact-form-wrapper, .contact-info-wrapper {
        padding: 30px;
    }
    .social-links-contact {
        justify-content: center;
    }
    .info-item {
        justify-content: center;
        text-align: left; /* Alinea el texto a la izquierda en los items de info */
    }
    
    .footer-links-group {
        flex-direction: column;
        gap: 15px;
    }
}

/* Smartphones */
@media (max-width: 768px) {
    h1 { font-size: 2.8em; }
    h2 { font-size: 2em; }
    h3 { font-size: 1.5em; }

    .main-header .logo img {
        height: 50px;
    }

    .hero-section {
        height: 70vh;
    }
    .hero-content h1 {
        font-size: 3em;
    }
    .hero-content .subtitle {
        font-size: 1.2em;
    }
    .btn {
        padding: 12px 25px;
        font-size: 1em;
    }

    .services-section, .about-section, .contact-section, .main-footer {
        padding: 80px 0;
    }
    .services-grid {
        grid-template-columns: 1fr; /* Una columna en móvil */
        gap: 20px;
    }

    .about-section .about-image {
        order: -1; /* Mueve la imagen arriba en móvil */
    }

    .contact-form input, .contact-form textarea {
        padding: 12px;
        margin-bottom: 20px;
    }

    .whatsapp-float {
        width: 55px;
        height: 55px;
        font-size: 2.2em;
        line-height: 55px;
        bottom: 20px;
        right: 20px;
    }

    .footer-links-group {
        gap: 10px;
    }
}

@media (max-width: 480px) {
    h1 { font-size: 2.2em; }
    h2 { font-size: 1.8em; }
    h3 { font-size: 1.3em; }

    .main-header .logo img {
        height: 45px;
    }

    .hero-section {
        height: 60vh;
    }
    .hero-content h1 {
        font-size: 2.5em;
    }
    .hero-content .subtitle {
        font-size: 1em;
    }

    .contact-form-wrapper {
        padding: 25px;
    }
}