/* ========================================
   UREHABE - Estilos Personalizados
   Unidad de Rehabilitación Especializada
   ======================================== */

/* ===== BASE ===== */
html {
    scroll-behavior: smooth;
}

*, *::before, *::after {
    box-sizing: border-box;
}

html, body {
    width: 100%;
    max-width: 100%;
    overflow-x: hidden;
}

img, svg, video, canvas, iframe {
    display: block;
    max-width: 100%;
    height: auto;
}

/* ===== ANIMACIONES DE CARDS ===== */
.service-card {
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.service-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 20px 40px rgba(27, 79, 114, 0.15);
}

/* ===== WHATSAPP FLOTANTE ===== */
.whatsapp-float {
    position: fixed;
    bottom: 24px;
    right: 24px;
    z-index: 100;
    animation: pulse 2s infinite;
}

@keyframes pulse {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.05); }
}

/* ========================================
   MODAL DE AGENDAMIENTO
   ======================================== */
.modal-backdrop {
    background-color: rgba(0, 0, 0, 0.6);
    backdrop-filter: blur(4px);
}

.modal-content {
    animation: modalSlideIn 0.3s ease-out;
}

@keyframes modalSlideIn {
    from {
        opacity: 0;
        transform: scale(0.95) translateY(-20px);
    }
    to {
        opacity: 1;
        transform: scale(1) translateY(0);
    }
}

/* ========================================
   GALERÍA CARRUSEL
   ======================================== */
.gallery-carousel {
    position: relative;
    display: flex;
    align-items: center;
    gap: 1rem;
}

.gallery-viewport {
    flex: 1;
    overflow: hidden;
    border-radius: 1rem;
}

.gallery-track {
    display: flex;
    transition: transform 0.4s ease-out;
    gap: 1rem;
}

.gallery-slide {
    flex-shrink: 0;
    aspect-ratio: 4 / 3;
    border-radius: 1rem;
    overflow: hidden;
    box-shadow: 0 4px 20px rgba(27, 79, 114, 0.1);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.gallery-slide:hover {
    transform: scale(1.02);
    box-shadow: 0 8px 30px rgba(27, 79, 114, 0.2);
}

.gallery-slide img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.4s ease;
}

.gallery-slide:hover img {
    transform: scale(1.05);
}

/* Responsive: slides por vista */
/* Móvil: 1 slide */
.gallery-slide {
    width: calc(100% - 0rem);
}

/* Tablet: 2 slides */
@media (min-width: 768px) {
    .gallery-slide {
        width: calc(50% - 0.5rem);
    }
}

/* Desktop: 3 slides */
@media (min-width: 1024px) {
    .gallery-slide {
        width: calc(33.333% - 0.667rem);
    }
}

/* Botones de navegación */
.gallery-nav {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    width: 3rem;
    height: 3rem;
    background: white;
    border: none;
    border-radius: 50%;
    color: #1B4F72;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.15);
    transition: all 0.2s ease;
    z-index: 10;
}

.gallery-nav:hover {
    background: #1B4F72;
    color: white;
    transform: translateY(-50%) scale(1.1);
}

.gallery-nav:disabled {
    opacity: 0.3;
    cursor: not-allowed;
}

.gallery-prev {
    left: -1rem;
}

.gallery-next {
    right: -1rem;
}

/* En móvil, botones más pequeños y dentro del contenedor */
@media (max-width: 767px) {
    .gallery-nav {
        width: 2.5rem;
        height: 2.5rem;
    }
    
    .gallery-prev {
        left: 0.5rem;
    }
    
    .gallery-next {
        right: 0.5rem;
    }
}

/* Dots de navegación */
.gallery-dots {
    display: flex;
    justify-content: center;
    gap: 0.5rem;
    margin-top: 1.5rem;
}

.gallery-dot {
    width: 0.625rem;
    height: 0.625rem;
    border-radius: 50%;
    background: #d1d5db;
    border: none;
    cursor: pointer;
    transition: all 0.2s ease;
    padding: 0;
}

.gallery-dot:hover {
    background: #48C9B0;
}

.gallery-dot.active {
    background: #1B4F72;
    transform: scale(1.2);
}

/* ========================================
   FAQ ACORDEÓN
   ======================================== */
.faq-item {
    border: 1px solid #e5e7eb;
    border-radius: 0.75rem;
    overflow: hidden;
    background: white;
    transition: box-shadow 0.3s ease;
}

.faq-item:hover {
    box-shadow: 0 4px 15px rgba(27, 79, 114, 0.08);
}

.faq-question {
    width: 100%;
    padding: 1.25rem 1.5rem;
    background: transparent;
    border: none;
    text-align: left;
    font-size: 1rem;
    font-weight: 600;
    color: #1B4F72;
    cursor: pointer;
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 1rem;
    transition: background-color 0.2s;
}

.faq-question:hover {
    background-color: #f8f9fa;
}

.faq-icon {
    width: 1.25rem;
    height: 1.25rem;
    flex-shrink: 0;
    transition: transform 0.3s ease;
    color: #48C9B0;
}

.faq-item.active .faq-icon {
    transform: rotate(180deg);
}

.faq-answer {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.3s ease;
}

.faq-item.active .faq-answer {
    max-height: 300px;
}

.faq-answer-content {
    padding: 0 1.5rem 1.25rem;
    color: #6b7280;
    line-height: 1.7;
}

/* ========================================
   HERO - IMAGEN DE LA DOCTORA
   ======================================== */
.hero-doctor-img {
    max-height: 500px;
    object-fit: contain;
    object-position: center bottom;
}

@media (max-width: 1023px) {
    .hero-doctor-img {
        max-height: 350px;
        margin: 0 auto;
    }
}

@media (max-width: 640px) {
    .hero-doctor-img {
        max-height: 280px;
    }
}

/* ========================================
   COLABORADORES / EQUIPO
   ======================================== */

/* Contenedor de categoría */
#colaboradores .team-category {
    margin-bottom: 3rem;
}

/* Subtítulo de categoría centrado */
#colaboradores .team-category-title {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.75rem;
    margin-bottom: 1.5rem;
    text-align: center;
}

/* Contenedor de cards centrado con Flexbox */
#colaboradores .team-grid {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 1.5rem;
}

/* Card de colaborador */
.team-card {
    width: 280px;
    max-width: 100%;
    text-align: center;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

/* En móvil, cards más anchas */
@media (max-width: 639px) {
    .team-card {
        width: 100%;
        max-width: 320px;
    }
}

.team-card:hover {
    transform: translateY(-5px);
}

/* Avatar centrado */
.team-avatar {
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 1.25rem auto;
    transition: transform 0.3s ease;
}

.team-card:hover .team-avatar {
    transform: scale(1.05);
}

/* Nombre y cargo centrados */
.team-card h4,
.team-card h3 {
    text-align: center;
}

.team-card p {
    text-align: center;
}

/* Placeholder listo para reemplazar por imagen real */
/* Para usar foto real: quitar el SVG y agregar:
   <img src="img/colaboradores/nombre.jpg" alt="Nombre" class="w-full h-full object-cover rounded-full"> 
*/

