/* Estilos generales */
body {
    font-family: sans-serif;
    margin: 0;
    padding: 0;
    background-color: #fdecea; /* Rosado base */
    color: #555;
    overflow-x: hidden; /* Evita el desbordamiento horizontal en móviles */
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px;
}

header {
    background-color: #fff;
    padding: 20px 0;
    border-bottom: 1px solid #f9caca; /* Borde rosado claro */
}

header .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.error-message {
    display: none; /* Inicialmente ocultos */
    color: #dc3545; /* Rojo para indicar error */
    font-size: 0.9em;
    margin-top: 5px;
}

.form-group input.invalid,
.form-group select.invalid,
.form-group textarea.invalid {
    border-color: #dc3545; /* Borde rojo para campos inválidos */
    box-shadow: 0 0 5px rgba(220, 53, 69, 0.5); /* Sombra roja suave */
}

.logo img {
    max-height: 120px;
    max-width: 120px;
    margin: 0;
    padding: 0;
}

/* Estilos para la navegación de escritorio (pantallas grandes) */
.desktop-nav ul {
    list-style: none;
    padding: 0;
    margin: 0;
    display: flex;
}

.desktop-nav li {
    margin-left: 20px;
}

.desktop-nav a {
    text-decoration: none !important; /* Añadimos !important */
    color: #777;
    font-weight: bold;
    transition: color 0.3s ease;
}

.desktop-nav a:hover {
    color: #B39DDB; /* Morado claro */
    text-decoration: none !important; /* Opcional pero recomendado para evitar cualquier conflicto */
}

/* Estilos para la sección Hero */
.hero {
    background-image: url('../img/fondo.jpg');
    background-size: cover;
    color: #fff;
    text-align: center;
    padding: 150px 0;
    display: flex;
    justify-content: center;
    align-items: center;
}

.hero-content {
    background-color: rgba(233, 30, 99, 0.7); /* Rosado fuerte con transparencia */
    padding: 40px;
    border-radius: 10px;
    max-width: 800px;
}

.hero h2 {
    font-size: 3em;
    margin-bottom: 20px;
    color: #fff; /* Texto blanco sobre el fondo rosado */
}

.hero p {
    font-size: 1.4em;
    margin-bottom: 30px;
    color: #f8f8f8; /* Texto gris claro */
}

.button {
    display: inline-block;
    background-color: #B39DDB; /* Morado claro */
    color: #fff;
    padding: 15px 30px;
    /* FIX: Added !important to override other styles */
    text-decoration: none !important;
    border-radius: 5px;
    font-weight: bold;
    transition: background-color 0.3s ease;
}

.button:hover {
    background-color: #673AB7; /* Morado oscuro */
    color: #fff;
}

/* Estilos para la sección de Servicios Destacados */
.featured-section {
    padding: 60px 0;
    background-color: #fff;
}

.featured-section h2 {
    text-align: center;
    margin-bottom: 40px;
    color: #e91e63; /* Rosado fuerte */
    font-size: 2.5em;
}

.featured-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 30px;
    margin-bottom: 30px;
}

.featured-item {
    background-color: #fdf2f6; /* Rosado muy claro */
    border-radius: 10px;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
    padding: 20px;
    text-align: center;
    transition: transform 0.3s ease, box-shadow 0.3s ease;

    /* La clave del diseño, forzada con !important */
    height: 650px !important;
    display: flex !important;
    flex-direction: column !important;
    justify-content: space-between !important;
}

.featured-item img {
    width: 200px;
    height: 200px;
    border-radius: 10px;
    object-fit: cover;
    object-position: center;
    margin: 0 auto 15px;
}

.featured-item h3 {
    color: #B39DDB; /* Morado claro para el título */
    font-size: 1.7em;
    margin-bottom: 10px;
}

.featured-item p {
    color: #666;
    font-size: 1em;
    line-height: 1.6;
    margin-bottom: 20px;
    text-align: justify;
    flex-grow: 1 !important;
}

.featured-item .button {
    margin-top: auto !important;
    background-color: #B39DDB;
    color: #fff;
    padding: 15px 30px;
    text-decoration: none;
    border-radius: 5px;
    font-weight: bold;
    transition: background-color 0.3s ease;
}

.featured-item .button:hover {
    background-color: #673AB7;
}

.learn-more {
    display: inline-block;
    color: #777;
    text-decoration: none;
    font-weight: bold;
    transition: color 0.3s ease;
}

.learn-more:hover {
    color: #B39DDB;
}

.all-services-link {
    text-align: center;
}

.secondary-button {
    background-color: #fff;
    color: #e91e63;
    border: 1px solid #e91e63;
}

.secondary-button:hover {
    background-color: #B39DDB;
    border-color: #673AB7;
    color: #fff;
}

/* Estilos para la sección de Programar Cita */
.appointment-section {
    padding: 60px 0;
    background-color: #fdf2f6;
}

.appointment-section .container {
    max-width: 700px;
    background-color: #fff;
    padding: 40px;
    border-radius: 8px;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
}

.appointment-section h2 {
    text-align: center;
    margin-bottom: 30px;
    color: #B39DDB;
    font-size: 2.5em;
}

.appointment-section p {
    text-align: center;
    margin-bottom: 30px;
    color: #777;
}

.appointment-form .form-group {
    margin-bottom: 20px;
}

.appointment-form label {
    display: block;
    margin-bottom: 5px;
    color: #555;
    font-weight: bold;
}

.appointment-form input[type="text"],
.appointment-form input[type="email"],
.appointment-form input[type="tel"],
.appointment-form input[type="date"],
.appointment-form input[type="time"],
.appointment-form select,
.appointment-form textarea {
    width: 100%;
    padding: 10px;
    border: 1px solid #ddd;
    border-radius: 4px;
    box-sizing: border-box;
    font-size: 1em;
    color: #777;
}

.appointment-form textarea {
    resize: vertical;
}

.appointment-form button[type="button"] {
    background-color: #B39DDB;
    color: #fff;
    padding: 15px 30px;
    border: none;
    border-radius: 5px;
    font-size: 1.1em;
    cursor: pointer;
    transition: background-color 0.3s ease;
    width: 100%;
}

.appointment-form button[type="button"]:hover {
    background-color: #673AB7;
}

/* Estilos para la sección de Contacto */
.contact-section {
    padding: 60px 0;
    background-color: #fff;
    text-align: center;
}

.contact-section h2 {
    margin-bottom: 30px;
    color: #e91e63;
    font-size: 2.5em;
}

.contact-details {
    margin-bottom: 30px;
    font-size: 1.2em;
    color: #777;
}

.contact-details p {
    margin-bottom: 10px;
}

.contact-details i {
    margin-right: 10px;
    color: #B39DDB;
}

/* Estilos para el Footer */
footer {
    background-color: #e91e63;
    color: #fff;
    text-align: center;
    padding: 20px 0;
    font-size: 0.9em;
}

/* Estilos para el menú deslizante lateral (pantallas pequeñas) */
@media (max-width: 768px) {
    .desktop-nav {
        display: none;
    }

    header .container {
        display: flex;
        justify-content: space-between;
        align-items: center;
    }

    .menu-toggle {
        display: block;
        width: 30px;
        height: 21px;
        cursor: pointer;
        position: relative;
    }

    .bar {
        display: block;
        position: absolute;
        height: 3px;
        width: 100%;
        background-color: #B39DDB;
        opacity: 1;
        left: 0;
        transform: rotate(0deg);
        transition: .25s ease-in-out;
    }

    .bar:nth-child(1) { top: 0px; }
    .bar:nth-child(2) { top: 9px; }
    .bar:nth-child(3) { top: 18px; }

    .menu-toggle.open .bar:nth-child(1) {
        transform: rotate(45deg);
        top: 9px;
    }

    .menu-toggle.open .bar:nth-child(2) {
        opacity: 0;
        top: 9px;
    }

    .menu-toggle.open .bar:nth-child(3) {
        transform: rotate(-45deg);
        top: 9px;
    }

    .side-menu {
        position: fixed;
        top: 0;
        left: -250px;
        width: 250px;
        height: 100%;
        background-color: white;
        box-shadow: 2px 0px 5px rgba(0, 0, 0, 0.2);
        z-index: 20;
        transition: left 0.3s ease-in-out;
        padding-top: 60px;
    }

    .side-menu.open {
        left: 0;
    }

    .side-menu nav ul {
        list-style: none;
        padding: 0;
        margin: 0;
    }

    .side-menu nav ul li {
        padding: 15px 20px;
        border-bottom: 1px solid #eee;
    }

    .side-menu nav ul li a {
        color: #333;
        text-decoration: none;
        display: block;
    }
}

/* Estilos para pantallas más grandes */
@media (min-width: 769px) {
    .menu-toggle {
        display: none;
    }

    .side-menu {
        display: none;
    }
}

/* Estilos para la ventana modal flotante */
.modal {
    display: none;
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0,0,0,0.4);
    pointer-events: none;
    justify-content: center;
    align-items: center;
}

.modal.open {
    pointer-events: auto;
    display: flex;
    justify-content: center;
    align-items: center;
}

.modal-content {
    background-color: #fefefe;
    margin: 20px;
    padding: 20px;
    border: 1px solid #888;
    width: 90%;
    max-width: 700px;
    border-radius: 8px;
    position: relative;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
}

.close-button {
    color: #aaa;
    position: absolute;
    top: 10px;
    right: 15px;
    font-size: 28px;
    font-weight: bold;
    cursor: pointer;
}

.close-button:hover,
.close-button:focus {
    color: black;
    text-decoration: none;
}

#modal-titulo {
    color: #e91e63;
    margin-bottom: 10px;
}

#modal-descripcion {
    color: #555;
    line-height: 1.6;
}

/* Estilo para el desenfoque del fondo cuando el modal está abierto */
#blur-overlay.modal-open {
    filter: blur(3px);
    -webkit-filter: blur(3px);
}

#blur-overlay {
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
}

.contact-section .google-map {
    width: 100%;
    margin-top: 20px;
}

.contact-section .google-map iframe {
    width: 100%;
    height: 300px;
    border: 0;
}

/* Media query para pantallas más grandes si deseas una altura diferente */
@media (min-width: 769px) {
    .contact-section .google-map iframe {
        height: 450px;
    }
}

.contact-section .social-links {
    margin-top: 20px;
    text-align: center;
}

.contact-section .social-links a {
    display: inline-block;
    margin: 0 10px;
    font-size: 1.5em;
    color: #777;
    transition: color 0.3s ease;
}

.contact-section .social-links a:hover {
    color: #e91e63;
}

.contact-section .contact-details p {
    margin-bottom: 15px;
    font-size: 1.3em;
}

.contact-section .contact-details i {
    margin-right: 15px;
    font-size: 1.4em;
    color: #B39DDB;
}

/* Estilos para la sección de Login */
.login-section {
    padding: 40px 0;
    background-color: #fdf2f6;
}

.login-container {
    background-color: #fff;
    padding: 30px;
    border-radius: 8px;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
    max-width: 400px;
    margin: 0 auto;
    text-align: center;
}

.login-container h2 {
    color: #e91e63;
    margin-bottom: 20px;
    font-size: 2em;
}

.login-form .form-group {
    margin-bottom: 20px;
    text-align: left;
}

.login-form label {
    display: block;
    margin-bottom: 5px;
    color: #555;
    font-weight: bold;
}

.login-form input[type="text"],
.login-form input[type="password"] {
    width: 100%;
    padding: 10px;
    border: 1px solid #ddd;
    border-radius: 4px;
    box-sizing: border-box;
    font-size: 1em;
    color: #777;
}

.login-form button[type="submit"] {
    background-color: #B39DDB;
    color: #fff;
    padding: 15px 30px;
    border: none;
    border-radius: 5px;
    font-size: 1.1em;
    cursor: pointer;
    transition: background-color 0.3s ease;
    width: 100%;
    margin-top: 10px;
}

.login-form button[type="submit"]:hover {
    background-color: #673AB7;
}

.login-container .options {
    margin-top: 20px;
    font-size: 0.9em;
    color: #777;
}

.login-container .options a {
    color: #777;
    text-decoration: none;
    transition: color 0.3s ease;
}

.login-container .options a:hover {
    color: #e91e63;
}

.login-container .options span {
    margin: 0 10px;
}