/* File: assets/css/profile_styles.css */
body { font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif; background-color: #f8f9fa; color: #333; margin: 0; }
.public-header { background: #fff; box-shadow: 0 2px 4px rgba(0,0,0,0.05); padding: 1rem 2rem; }
.header-container { max-width: 1200px; margin: 0 auto; display: flex; justify-content: space-between; align-items: center; }
.logo { font-weight: bold; font-size: 1.5rem; text-decoration: none; color: #007bff; }
.public-header nav a { margin-left: 1.5rem; text-decoration: none; color: #555; font-weight: 500; }
.main-content { padding: 2rem; }
.profile-container { max-width: 1100px; margin: 0 auto; background: #fff; padding: 2rem; border-radius: 8px; box-shadow: 0 4px 15px rgba(0,0,0,0.08); }
.profile-header { text-align: center; border-bottom: 1px solid #eee; padding-bottom: 1.5rem; margin-bottom: 2rem; }
.profile-header h1 { margin: 0 0 0.5rem 0; font-size: 2.5rem; }
.profile-header .category { color: #6c757d; font-size: 1.2rem; margin: 0 0 1.5rem 0; }
.profile-header .category a { color: inherit; text-decoration: none; }
.profile-header .category a:hover { text-decoration: underline; }
.btn { display: inline-block; padding: 0.8rem 1.5rem; background-color: #007bff; color: white; text-decoration: none; border-radius: 5px; font-weight: bold; transition: background-color 0.2s; }
.btn:hover { background-color: #0056b3; }
.profile-grid { display: grid; grid-template-columns: 2fr 1fr; gap: 2rem; }
.profile-section { margin-bottom: 2rem; }
.profile-section h3 { border-bottom: 2px solid #007bff; padding-bottom: 0.5rem; margin-bottom: 1rem; }
.services-list, .staff-list { list-style: none; padding: 0; }
.services-list li, .staff-list li { padding: 0.8rem 0; border-bottom: 1px solid #f0f0f0; display: flex; justify-content: space-between; align-items: center; }
.services-list li:last-child, .staff-list li:last-child { border-bottom: none; }
.services-list .price { font-weight: bold; color: #28a745; }
.staff-list a { text-decoration: none; color: #007bff; font-weight: 500; }
.staff-list a:hover { text-decoration: underline; }
.error-message { color: #dc3545; text-align: center; font-size: 1.2rem; }
#map { margin-top: 1rem; border-radius: 5px; overflow: hidden; }
.public-footer { text-align: center; padding: 2rem; margin-top: 2rem; color: #888; }

@media (max-width: 768px) { .profile-grid { grid-template-columns: 1fr; } }
/* File: assets/css/profile_styles.css (AÑADIR AL FINAL) */

/* --- CORRECCIÓN PARA ALINEAR LA LISTA DE SERVICIOS --- */

.services-list li {
    /* Convertimos el <li> en un contenedor de rejilla (grid) */
    display: grid;
    /* Definimos 3 columnas:
       1. La primera columna (nombre) toma todo el espacio posible (1fr).
       2. La segunda (duración) se ajusta a su contenido (auto).
       3. La tercera (precio) se ajusta a su contenido (auto).
    */
    grid-template-columns: 1fr auto auto;
    /* Añadimos un espacio entre las columnas */
    gap: 1rem; 
    align-items: center; /* Centra verticalmente los elementos en cada fila */
}

/* Opcional: Para pantallas más pequeñas, hacemos que los elementos se apilen */
@media (max-width: 500px) {
    .services-list li {
        grid-template-columns: 1fr; /* Una sola columna */
        gap: 0.25rem; /* Reducimos el espacio */
        text-align: center;
    }
}
/* File: assets/css/profile_styles.css (AÑADIR AL FINAL) */

/* --- ESTILOS PARA LA PÁGINA PORTAL (index.php) --- */

.portal-container {
    max-width: 1200px;
    margin: 0 auto;
}

.hero-section {
    text-align: center;
    padding: 4rem 2rem;
    background-color: #007bff;
    color: white;
    border-radius: 8px;
    margin-bottom: 2rem;
}

.hero-section h1 {
    font-size: 3rem;
    margin: 0 0 1rem 0;
}

.welcome-section {
    text-align: center;
    padding: 1rem;
    margin-bottom: 2rem;
}

.business-list-section h3 {
    text-align: center;
    font-size: 2rem;
    margin-bottom: 2rem;
    border-bottom: 2px solid #eee;
    padding-bottom: 1rem;
}

.business-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 2rem;
}

.business-card {
    background: #fff;
    border: 1px solid #e9ecef;
    border-radius: 8px;
    padding: 1.5rem;
    box-shadow: 0 4px 6px rgba(0,0,0,0.05);
    display: flex;
    flex-direction: column;
}

.business-card h4 {
    margin: 0 0 0.5rem 0;
    font-size: 1.5rem;
    color: #0056b3;
}

.business-card .category {
    color: #6c757d;
    font-weight: bold;
    margin-bottom: 1rem;
}

.business-card .address {
    color: #495057;
    margin-bottom: 1.5rem;
    flex-grow: 1; /* Empuja los botones hacia abajo */
}

.business-card .btn {
    width: 100%;
    text-align: center;
    margin-bottom: 0.5rem;
}

.business-card .profile-link {
    text-align: center;
    font-size: 0.9rem;
    color: #6c757d;
}
/* --- ESTILOS PARA LA LISTA DE CATEGORÍAS --- */
.category-list-section h3 { text-align: center; font-size: 2rem; margin-bottom: 2rem; }
.category-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 1.5rem;
}

.category-card {
    display: block;
    position: relative; /* Necesario para el overlay y el contenido */
    height: 250px;
    border-radius: 8px;
    overflow: hidden; /* Oculta las partes de la imagen que se salgan */
    text-decoration: none;
    color: white;
    box-shadow: 0 4px 10px rgba(0,0,0,0.2);
    transition: transform 0.3s ease, box-shadow 0.3s ease;

    /* Configuración de la imagen de fondo por defecto */
    background-size: cover;
    background-position: center;
}

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

/* Overlay oscuro para todas las tarjetas, para legibilidad del texto */
.category-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(to top, rgba(0,0,0,0.8) 0%, rgba(0,0,0,0.1) 60%, rgba(0,0,0,0.8) 100%);
    transition: background-color 0.3s ease;
}

.category-card:hover::before {
    background-color: rgba(0,0,0,0.4); /* El overlay se aclara un poco al pasar el ratón */
}

/* Contenido de la tarjeta (título y descripción) */
.category-card-content {
    position: absolute;
    bottom: 0;
    left: 0;
    padding: 1.5rem;
    width: 100%;
    z-index: 2;
}

.category-card h4 {
    margin: 0 0 0.5rem 0;
    color: white;
    font-size: 1.7rem;
}

.category-card p {
    margin: 0;
    color: rgba(255, 255, 255, 0.85);
    line-height: 1.4;
}


/* --- IMÁGENES DE FONDO ESPECÍFICAS PARA CADA CATEGORÍA --- */
/* ¡Añade aquí las imágenes para las categorías que crees! */
/* Usa la clase que generamos dinámicamente en el PHP */

.category-card.category-peluqueria {
    background-image: url('../img/category-hair.jpg');
}

.category-card.category-dentista {
    background-image: url('../img/category-dentist.jpg');
}

.category-card.category-fisioterapia {
    background-image: url('../img/category-physio.jpg');
}

.category-card.category-taller-mecanico {
    background-image: url('../img/category-mechanic.jpg');
}
.page-title-section { text-align: center; margin-bottom: 2rem; }

/* File: assets/css/profile_styles.css (AÑADIR AL FINAL) */

/* --- CORRECCIÓN PARA EL BOTÓN DENTRO DE BUSINESS-CARD --- */

/* 1. Aplicamos box-sizing a todos los elementos para un modelo de caja predecible.
   Esta es una práctica recomendada y muy segura de añadir al principio de cualquier CSS. */
*,
*::before,
*::after {
    box-sizing: border-box;
}

/* 2. Hacemos que la tarjeta sea un contenedor flex con dirección de columna.
   Esto nos da control sobre el crecimiento de los elementos internos. */
.business-card {
    display: flex;
    flex-direction: column;
}

/* 3. Permitimos que el contenido (como la dirección) crezca para empujar los botones hacia abajo. */
.business-card .address {
    flex-grow: 1;
}

/* 4. Aseguramos que el botón "Reservar Ahora" dentro de la tarjeta no se desborde. */
.business-card .btn {
    width: 100%; /* El botón ocupará todo el ancho disponible DENTRO del padding */
    text-align: center;
    margin-top: auto; /* Truco mágico: empuja el botón al final del contenedor flex */
    margin-bottom: 0.5rem; /* Mantenemos el espacio inferior */
}

.page-section {
    padding: 4rem 2rem;
}
.section-container {
    max-width: 1200px;
    margin: 0 auto;
}
.section-title {
    text-align: center;
    font-size: 2.5rem;
    margin-bottom: 3rem;
    color: #333;
}
.bg-light {
    background-color: #f8f9fa;
}


/* --- ESTILOS ESPECÍFICOS PARA LA SECCIÓN HERO --- */

.hero-section {
    position: relative; /* Necesario para el overlay */
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 80vh; /* Ocupa el 80% de la altura de la pantalla */
    padding: 4rem 2rem;
    text-align: center;
    color: white;

    /* La imagen de fondo */
    background-image: url('../img/hero-background.jpg'); /* ¡Asegúrate de que la ruta y el nombre son correctos! */
    background-size: cover;
    background-position: center center;
    background-attachment: fixed; /* Efecto parallax sutil */
}

/* Overlay oscuro para mejorar la legibilidad del texto */
.hero-section::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.6); /* Color negro con 60% de opacidad */
    z-index: 1; /* Se pone entre el fondo y el contenido */
}

/* Contenedor del texto y botones, para que esté por encima del overlay */
.hero-content {
    position: relative;
    z-index: 2;
    max-width: 800px;
}

.hero-title {
    font-size: 3.5rem;
    font-weight: 700;
    margin-bottom: 1rem;
    line-height: 1.2;
}

.hero-subtitle {
    font-size: 1.25rem;
    font-weight: 300;
    margin-bottom: 2.5rem;
    opacity: 0.9;
}

.hero-cta-buttons {
    display: flex;
    justify-content: center;
    gap: 1rem;
    flex-wrap: wrap; /* Para que los botones se apilen en móvil */
}

/* Estilos para los botones del Hero */
.btn.btn-lg {
    padding: 1rem 2.5rem;
    font-size: 1.1rem;
    border-radius: 30px; /* Botones más redondeados */
    text-transform: uppercase;
    font-weight: 600;
    border: 2px solid transparent;
}

.btn.btn-primary {
    background-color: #007bff;
    color: white;
}
.btn.btn-primary:hover {
    background-color: #0069d9;
}

.btn.btn-secondary {
    background-color: transparent;
    color: white;
    border-color: white;
}
.btn.btn-secondary:hover {
    background-color: white;
    color: #333;
}


/* --- Media Query para ajustar tamaños en móvil --- */
@media (max-width: 768px) {
    .hero-title {
        font-size: 2.5rem;
    }
    .hero-subtitle {
        font-size: 1.1rem;
    }
}
.for-business-grid {
    display: grid;
    grid-template-columns: 1fr 1.2fr; /* Columna de imagen más pequeña que la de texto */
    align-items: center;
    gap: 3rem;
}

.for-business-image img {
    width: 100%;
    height: auto;
    border-radius: 8px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.1);
}

.section-title-left {
    font-size: 2.5rem;
    margin-bottom: 1rem;
    color: #333;
    text-align: left; /* Título alineado a la izquierda para esta sección */
}

.section-subtitle {
    font-size: 1.1rem;
    color: #6c757d;
    line-height: 1.7;
    margin-bottom: 2.5rem;
}

.benefits-list {
    list-style: none;
    padding: 0;
    margin: 0 0 2.5rem 0;
}

.benefits-list li {
    display: flex;
    align-items: flex-start; /* Alinear icono con el inicio del texto */
    gap: 1.5rem;
    margin-bottom: 2rem;
}

.benefits-list svg {
    flex-shrink: 0; /* Evita que el icono se encoja */
    width: 32px;
    height: 32px;
    color: #007bff;
    margin-top: 5px;
}

.benefits-list h4 {
    margin: 0 0 0.5rem 0;
    font-size: 1.2rem;
    color: #333;
}

.benefits-list p {
    margin: 0;
    color: #6c757d;
    line-height: 1.6;
}

/* --- Media Query para adaptar la sección en móvil --- */
@media (max-width: 992px) {
    .for-business-grid {
        grid-template-columns: 1fr; /* Apilar las columnas en móvil */
        gap: 2rem;
    }
    .for-business-image {
        order: 2; /* Pone la imagen debajo del texto en móvil */
    }
    .for-business-content {
        order: 1;
        text-align: center;
    }
    .section-title-left {
        text-align: center;
    }
    .benefits-list li {
        flex-direction: column; /* Apilar icono y texto */
        align-items: center;
        text-align: center;
    }
}