/**
 * Centro Médico Don Bosco - Advanced Styles
 * ==========================================
 * PALETA basada en el logo corporativo
 * Colores Turquesa/Teal profesionales
 */

/* ===== TOP BAR ===== */
.top-bar {
    font-size: 0.875rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    background-color: #4a9d9c !important; /* Turquesa del logo */
}

.top-bar a:hover {
    opacity: 0.8;
}

.social-links a {
    width: 32px;
    height: 32px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    transition: all 0.3s ease;
}

.social-links a:hover {
    background: rgba(255, 255, 255, 0.2);
    transform: translateY(-2px);
}

/* ===== LOGO ANIMATION ===== */
.logo-wrapper {
    animation: pulse 2s infinite;
}

@keyframes pulse {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.05); }
}

.brand-text span {
    font-size: 0.9rem;
    letter-spacing: -0.5px;
}

/* ===== HERO SLIDER ===== */
.hero-slider {
    position: relative;
    height: 600px;
    min-height: 600px;
}

.heroSwiper {
    width: 100%;
    height: 100%;
}

.swiper-slide {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* Legacy: slides con fondo de imagen (stock photos) */
.slide-bg {
    position: absolute;
    top: 0; left: 0;
    width: 100%; height: 100%;
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
}

.slide-bg::before {
    content: '';
    position: absolute;
    top: 0; left: 0;
    width: 100%; height: 100%;
    background: linear-gradient(135deg, rgba(0,0,0,0.2) 0%, rgba(0,0,0,0.1) 100%);
}

.slide-content {
    position: relative;
    z-index: 10;
}

.slide-label {
    display: inline-block;
    background: rgba(74, 157, 156, 0.3);
    backdrop-filter: blur(10px);
    padding: 0.75rem 1.5rem;
    border-radius: 50px;
    color: white;
    font-weight: 600;
    font-size: 0.9rem;
    margin-bottom: 1.5rem;
    border: 1px solid rgba(255, 255, 255, 0.3);
}

.stat-card-slide {
    text-align: center;
}

.stat-card-slide h2 {
    font-size: 3rem;
    text-shadow: 2px 2px 4px rgba(0,0,0,0.3);
}

.stat-card-slide p {
    font-size: 0.9rem;
    opacity: 0.9;
}

/* ===== HERO SPLIT (fotos reales) ===== */
.hero-split-slide {
    background: linear-gradient(130deg, #0c3340 0%, #1a5c6e 55%, #0d4050 100%);
    width: 100%;
    height: 100%;
}

.hero-split-text {
    position: relative;
    z-index: 2;
    padding: 2rem 0;
}

/* Badge de especialidad */
.hero-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    background: rgba(74, 157, 156, 0.25);
    border: 1px solid rgba(74, 157, 156, 0.5);
    color: #a8dcdb;
    font-size: 0.85rem;
    font-weight: 600;
    letter-spacing: 0.04em;
    padding: 0.5rem 1.1rem;
    border-radius: 50px;
    margin-bottom: 1.4rem;
}

/* Título del hero (responsive via media query) */
.hero-title {
    font-size: 3rem;
}

/* Logo visible solo en móvil */
.hero-mobile-logo {
    height: 58px;
    width: auto;
    filter: drop-shadow(0 2px 10px rgba(0, 0, 0, 0.4));
}

/* Frase confiable — solo móvil */
.hero-trust-line {
    font-size: 0.82rem;
    letter-spacing: 0.02em;
    line-height: 1.5;
}

/* Pills de contacto — móvil */
.hero-contact-pill {
    display: inline-flex;
    align-items: center;
    gap: 0.3rem;
    font-size: 0.74rem;
    color: rgba(255, 255, 255, 0.72);
    text-decoration: none;
    background: rgba(255, 255, 255, 0.07);
    border: 1px solid rgba(255, 255, 255, 0.14);
    border-radius: 50px;
    padding: 0.35rem 0.8rem;
    transition: color 0.2s, background 0.2s, border-color 0.2s;
    white-space: nowrap;
}
.hero-contact-pill:hover {
    color: #fff;
    background: rgba(74, 157, 156, 0.25);
    border-color: rgba(74, 157, 156, 0.5);
}
.hero-contact-pill .bi {
    color: #6db5b4;
    font-size: 0.8rem;
}

/*
 * Estructura de la foto:
 *   .hero-photo-frame         → outer wrapper: borde decorativo offset + posiciona los chips
 *     .hero-photo-img         → inner clip: overflow:hidden + border-radius + sombra
 *       <img .hero-real-photo>
 *     .hero-photo-chips       → chips flotantes sobre la foto (fuera del overflow:hidden)
 */

.hero-photo-frame {
    position: relative;
    align-self: center;
    width: 100%;
    padding: 14px 4px 14px 4px;  /* espacio para chips y borde decorativo */
}

/* Borde decorativo offset (detrás del inner) */
.hero-photo-frame::before {
    content: '';
    position: absolute;
    top: 4px;
    right: -8px;
    bottom: 4px;
    left: 8px;
    border: 2px solid rgba(74, 157, 156, 0.35);
    border-radius: 22px;
    pointer-events: none;
    z-index: 0;
}

/* Inner: clip con border-radius para que la imagen quede redondeada */
.hero-photo-img {
    position: relative;
    z-index: 1;
    border-radius: 18px;
    overflow: hidden;
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.55),
                0 0 0 1px rgba(255, 255, 255, 0.06);
    line-height: 0; /* evita espacio blanco debajo del img */
}

.hero-real-photo {
    width: 100%;
    height: 450px;
    object-fit: cover;
    object-position: center top;
    display: block;
}

/* Chips flotantes: fuera del overflow:hidden, posicionados sobre el frame */
.hero-photo-chips {
    position: absolute;
    bottom: 28px;
    left: 16px;
    right: 8px;
    display: flex;
    gap: 0.5rem;
    flex-wrap: wrap;
    z-index: 2;
    justify-content: center;
}

.hero-chip {
    background: rgba(12, 51, 64, 0.88);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(74, 157, 156, 0.45);
    color: #fff;
    font-size: 0.78rem;
    font-weight: 600;
    padding: 0.4rem 0.85rem;
    border-radius: 50px;
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
}

.hero-chip i {
    color: #6db5b4;
    font-size: 0.9rem;
}

/* Ocultar foto en tablet/mobile */
@media (max-width: 991.98px) {
    .hero-photo-frame {
        display: none;
    }
}

/* Swiper Navigation */
.swiper-button-next,
.swiper-button-prev {
    color: white;
    background: rgba(74, 157, 156, 0.3);
    backdrop-filter: blur(10px);
    width: 50px;
    height: 50px;
    border-radius: 50%;
    border: 2px solid rgba(255, 255, 255, 0.3);
    transition: all 0.3s ease;
}

.swiper-button-next::after,
.swiper-button-prev::after {
    font-size: 1.2rem;
}

.swiper-button-next:hover,
.swiper-button-prev:hover {
    background: rgba(74, 157, 156, 0.5);
    transform: scale(1.1);
}

.swiper-pagination-bullet {
    width: 12px;
    height: 12px;
    background: white;
    opacity: 0.5;
}

.swiper-pagination-bullet-active {
    opacity: 1;
    background: #6db5b4; /* Turquesa claro */
    width: 30px;
    border-radius: 6px;
}

/* ===== SISTEMA DE TURNOS ===== */
.turnos-section {
    background: linear-gradient(135deg, #f9fafb 0%, #ffffff 100%);
}

.appointment-calendar {
    background: white;
    border-radius: 1rem;
    padding: 2rem;
    box-shadow: 0 10px 30px rgba(74, 157, 156, 0.1);
}

.calendar-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 2rem;
}

.calendar-grid {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    gap: 0.5rem;
    margin-top: 1rem;
}

.calendar-day {
    aspect-ratio: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 0.5rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    border: 2px solid transparent;
}

.calendar-day:hover:not(.disabled) {
    background: #e8f5f5;
    border-color: #4a9d9c;
    transform: scale(1.05);
}

.calendar-day.today {
    background: #4a9d9c;
    color: white;
}

.calendar-day.selected {
    background: #3a7d7c;
    color: white;
}

.calendar-day.disabled {
    opacity: 0.3;
    cursor: not-allowed;
}

.time-slots {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(100px, 1fr));
    gap: 0.75rem;
    margin-top: 1.5rem;
}

.time-slot {
    padding: 1rem;
    border: 2px solid #e5e7eb;
    border-radius: 0.75rem;
    text-align: center;
    cursor: pointer;
    transition: all 0.3s ease;
    font-weight: 600;
}

.time-slot:hover:not(.disabled) {
    border-color: #4a9d9c;
    background: #e8f5f5;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(74, 157, 156, 0.2);
}

.time-slot.selected {
    background: #4a9d9c;
    color: white;
    border-color: #4a9d9c;
}

.time-slot.disabled {
    opacity: 0.3;
    cursor: not-allowed;
}

/* ===== CHATBOT FAQ ===== */
.chatbot-trigger {
    position: fixed;
    bottom: 100px;
    right: 30px;
    z-index: 1040;
    width: 60px;
    height: 60px;
    background: linear-gradient(135deg, #4a9d9c 0%, #3a7d7c 100%);
    color: white;
    border-radius: 50%;
    border: none;
    box-shadow: 0 4px 20px rgba(74, 157, 156, 0.4);
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
}

.chatbot-trigger:hover {
    transform: scale(1.1);
    box-shadow: 0 6px 25px rgba(74, 157, 156, 0.6);
}

.chatbot-trigger.active {
    background: #dc2626;
}

.chatbot-window {
    position: fixed;
    bottom: 170px;
    right: 30px;
    z-index: 1030;
    width: 380px;
    max-width: calc(100vw - 60px);
    height: 550px;
    background: white;
    border-radius: 1.5rem;
    box-shadow: 0 20px 60px rgba(0,0,0,0.3);
    display: none;
    flex-direction: column;
    overflow: hidden;
}

.chatbot-window.active {
    display: flex;
    animation: slideUp 0.3s ease-out;
}

@keyframes slideUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.chatbot-header {
    background: linear-gradient(135deg, #4a9d9c 0%, #3a7d7c 100%);
    color: white;
    padding: 1.5rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.chatbot-header h5 {
    margin: 0;
    font-weight: 600;
}

.chatbot-close {
    background: none;
    border: none;
    color: white;
    font-size: 1.5rem;
    cursor: pointer;
    padding: 0;
    width: 30px;
    height: 30px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    transition: all 0.3s ease;
}

.chatbot-close:hover {
    background: rgba(255, 255, 255, 0.2);
}

.chatbot-body {
    flex: 1;
    overflow-y: auto;
    padding: 1.5rem;
    background: #f9fafb;
}

.chat-message {
    margin-bottom: 1rem;
    animation: fadeInMessage 0.5s ease-out;
    animation-fill-mode: both;
}

@keyframes fadeInMessage {
    from {
        opacity: 0;
        transform: translateY(15px) scale(0.95);
    }
    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

.message-bot {
    display: flex;
    gap: 0.75rem;
}

.message-avatar {
    width: 36px;
    height: 36px;
    background: #4a9d9c;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    flex-shrink: 0;
}

.message-content {
    background: white;
    padding: 1rem;
    border-radius: 1rem;
    border-top-left-radius: 0.25rem;
    max-width: 80%;
    box-shadow: 0 2px 8px rgba(0,0,0,0.05);
    word-wrap: break-word;
    position: relative;
}

.message-content::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(74, 157, 156, 0.1);
    border-radius: inherit;
    animation: highlightFade 2s ease-out forwards;
    pointer-events: none;
}

@keyframes highlightFade {
    0% {
        opacity: 1;
    }
    70% {
        opacity: 1;
    }
    100% {
        opacity: 0;
    }
}

.message-user {
    display: flex;
    justify-content: flex-end;
}

.message-user .message-content {
    background: #4a9d9c;
    color: white;
    border-top-right-radius: 0.25rem;
    border-top-left-radius: 1rem;
}

.faq-options {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    margin-top: 0.5rem;
}

.faq-option {
    background: white;
    border: 2px solid #4a9d9c;
    color: #4a9d9c;
    padding: 0.75rem 1rem;
    border-radius: 0.75rem;
    cursor: pointer;
    transition: all 0.3s ease;
    font-weight: 500;
    text-align: left;
}

.faq-option:hover {
    background: #4a9d9c;
    color: white;
    transform: translateX(5px);
}

.chatbot-footer {
    padding: 1rem 1.5rem;
    border-top: 1px solid #e5e7eb;
    background: white;
}

.chat-input-group {
    display: flex;
    gap: 0.5rem;
}

.chat-input {
    flex: 1;
    border: 2px solid #e5e7eb;
    border-radius: 2rem;
    padding: 0.75rem 1.25rem;
    outline: none;
    transition: all 0.3s ease;
}

.chat-input:focus {
    border-color: #4a9d9c;
}

.chat-send-btn {
    background: #4a9d9c;
    color: white;
    border: none;
    width: 45px;
    height: 45px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.3s ease;
}

.chat-send-btn:hover {
    background: #3a7d7c;
    transform: scale(1.05);
}

/* ===== WHATSAPP FLOAT ===== */
.whatsapp-float {
    position: fixed;
    bottom: 30px;
    right: 30px;
    z-index: 1040;
    width: 60px;
    height: 60px;
    background: #25D366;
    color: white;
    border-radius: 50%;
    border: none;
    box-shadow: 0 4px 20px rgba(37, 211, 102, 0.4);
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.8rem;
    animation: pulse-whatsapp 2s infinite;
}

@keyframes pulse-whatsapp {
    0%, 100% {
        box-shadow: 0 4px 20px rgba(37, 211, 102, 0.4);
    }
    50% {
        box-shadow: 0 4px 30px rgba(37, 211, 102, 0.7);
    }
}

.whatsapp-float:hover {
    transform: scale(1.1);
    background: #20ba5a;
}

.whatsapp-tooltip {
    position: absolute;
    right: 70px;
    background: white;
    padding: 0.75rem 1.25rem;
    border-radius: 0.5rem;
    box-shadow: 0 4px 12px rgba(0,0,0,0.15);
    white-space: nowrap;
    opacity: 0;
    pointer-events: none;
    transition: all 0.3s ease;
}

.whatsapp-float:hover .whatsapp-tooltip {
    opacity: 1;
    right: 75px;
}

/* ===== CONTADOR ANIMADO ===== */
.stats-counter {
    text-align: center;
}

.counter-number {
    font-size: 3.5rem;
    font-weight: 800;
    color: #ffffff;
    line-height: 1;
    display: block;
}

.counter-label {
    font-size: 1rem;
    color: #6b7280;
    margin-top: 0.5rem;
}

/* ===== TESTIMONIOS ===== */
.testimonial-card {
    background: white;
    padding: 2rem;
    border-radius: 1rem;
    box-shadow: 0 4px 20px rgba(0,0,0,0.08);
    position: relative;
    margin-top: 2rem;
}

.testimonial-quote {
    position: absolute;
    top: -1rem;
    left: 2rem;
    width: 50px;
    height: 50px;
    background: #4a9d9c;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 1.5rem;
}

.testimonial-text {
    font-style: italic;
    color: #374151;
    line-height: 1.7;
    margin-bottom: 1.5rem;
}

.testimonial-author {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.author-avatar {
    width: 50px;
    height: 50px;
    border-radius: 50%;
    background: #e8f5f5;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    color: #3a7d7c;
}

.author-info h6 {
    margin: 0;
    font-weight: 600;
}

.author-info small {
    color: #6b7280;
}

.rating {
    color: #fbbf24;
    margin-top: 0.25rem;
}

/* ===== RESPONSIVE ===== */
@media (max-width: 991.98px) {
    .hero-slider {
        height: auto;
        min-height: 560px;
    }

    /* Flechas ocultas — se superponen al texto en móvil */
    .heroSwiper .swiper-button-next,
    .heroSwiper .swiper-button-prev {
        display: none;
    }

    /* Título del hero: reducir tamaño */
    .hero-title {
        font-size: 1.9rem;
    }

    /* Más padding vertical para respirar */
    .hero-split-text {
        padding-top: 1.25rem;
        padding-bottom: 1.25rem;
    }

    /* Badge: reducir margen inferior en móvil */
    .hero-badge {
        margin-bottom: 0.9rem;
    }

    .slide-content h1 {
        font-size: 2.5rem;
    }
    
    .chatbot-window {
        width: 100%;
        height: 100vh;
        bottom: 0;
        right: 0;
        border-radius: 0;
    }
    
    .chatbot-trigger {
        bottom: 80px;
        right: 20px;
    }
    
    .whatsapp-float {
        bottom: 20px;
        right: 20px;
        width: 55px;
        height: 55px;
        font-size: 1.6rem;
    }
}

@media (max-width: 767.98px) {
    .slide-content h1 {
        font-size: 2rem;
    }
    
    .stat-card-slide h2 {
        font-size: 2rem;
    }
    
    .calendar-grid {
        gap: 0.25rem;
    }
    
    .time-slots {
        grid-template-columns: repeat(auto-fill, minmax(80px, 1fr));
    }
    
    .counter-number {
        font-size: 2.5rem;
    }
}

/* ===== ANIMACIONES ADICIONALES ===== */
.bounce {
    animation: bounce 2s infinite;
}

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

.float-animation {
    animation: float 3s ease-in-out infinite;
}

@keyframes float {
    0%, 100% {
        transform: translateY(0px);
    }
    50% {
        transform: translateY(-15px);
    }
}

/* ===== LOADING SPINNER ===== */
.loading-spinner {
    width: 40px;
    height: 40px;
    border: 4px solid #e5e7eb;
    border-top-color: #4a9d9c;
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
}

@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}
