﻿/* Contenedor principal del perfil */
.perfil-profesional-container {
    display: flex;
    gap: 20px;
    padding: 15px;
    max-width: 1400px;
    margin: 0 auto;
    min-height: calc(100vh - 100px);
}

/* Columna izquierda - Información del profesional */
.perfil-info {
    flex: 0 0 550px; /* Aumentado a 580px como solicitaste */
    background: #fff;
    padding: 25px;
    border-radius: 12px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
    height: fit-content;
    position: sticky;
    top: 20px;
}

/* Columna derecha - Calendario compacto */
.calendario-container {
    flex: 1;
    background: #fff;
    padding: 12px; /* Reducido de 15px */
    border-radius: 12px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
    font-family: 'Segoe UI', system-ui, -apple-system, sans-serif;
    min-width: 0;
}

/* HEADER MÁS COMPACTO */
.calendario-header {
    display: flex;
    flex-direction: column;
    gap: 3px; /* Reducido de 4px */
    margin-bottom: 6px; /* Reducido de 8px */
    padding: 12px; /* Reducido de 15px */
    background: linear-gradient(135deg, #1e3a8a 0%, #3730a3 100%);
    border-radius: 6px;
    color: white;
    box-shadow: 0 1px 4px rgba(30, 58, 138, 0.15);
}

.calendario-info {
    text-align: center;
}

    .calendario-info h1 {
        margin: 0 0 2px 0;
        font-size: 0.9em; /* Reducido de 1em */
        font-weight: 700;
    }

.profesional-nombre {
    margin: 0;
    font-size: 0.7em; /* Reducido de 0.75em */
    opacity: 0.95;
}

/* NAVEGACIÓN MÁS COMPACTA */
.calendario-navegacion {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px; /* Reducido de 8px */
    background: rgba(255, 255, 255, 0.1);
    padding: 3px; /* Reducido de 4px */
    border-radius: 4px;
    font-size: 0.75em; /* Reducido de 0.8em */
}

.btn-navegacion {
    background: rgba(255, 255, 255, 0.2);
    border: none;
    color: white;
    padding: 2px 5px; /* Reducido de 3px 6px */
    border-radius: 3px;
    cursor: pointer;
    transition: all 0.3s ease;
    font-weight: 600;
    font-size: 0.65em; /* Reducido de 0.7em */
    white-space: nowrap;
    display: flex;
    align-items: center;
    gap: 2px;
}

    .btn-navegacion:hover:not(:disabled) {
        background: rgba(255, 255, 255, 0.3);
        transform: translateY(-1px);
    }

.semana-actual {
    font-size: 0.7em; /* Reducido de 0.75em */
    font-weight: 600;
    margin: 0;
    min-width: 140px; /* Reducido de 160px */
    padding: 0 4px; /* Reducido de 6px */
}

/* Selector de servicio más compacto */
.servicio-selector {
    margin-bottom: 8px; /* Reducido de 10px */
    padding: 6px; /* Reducido de 8px */
    background: white;
    border-radius: 6px;
    border: 1px solid #e2e8f0;
}

    .servicio-selector label {
        font-weight: 600;
        margin-bottom: 3px; /* Reducido de 4px */
        display: block;
        color: #1e293b;
        font-size: 0.8em; /* Reducido de 0.85em */
    }

.form-control {
    width: 100%;
    padding: 5px 6px; /* Reducido de 6px 8px */
    border: 1px solid #e2e8f0;
    border-radius: 4px;
    font-size: 0.75em; /* Reducido de 0.8em */
    transition: all 0.3s ease;
}

/* TABLA MÁS COMPACTA HORIZONTALMENTE */
.calendario-semana {
    background: white;
    border-radius: 6px;
    border: 1px solid #e2e8f0;
    overflow: hidden;
    overflow-x: auto;
}

.tabla-calendario {
    width: 100%;
    border-collapse: collapse;
    background: white;
    min-width: 380px; /* Reducido de 450px */
    font-size: 0.7em; /* Reducido de 0.75em */
}

/* Encabezados más compactos */
.header-dia {
    background: linear-gradient(135deg, #f8fafc 0%, #f1f5f9 100%);
    padding: 5px 2px; /* Reducido de 6px 4px */
    text-align: center;
    border-bottom: 1px solid #e2e8f0;
    border-right: 1px solid #f1f5f9;
    min-width: 50px; /* Reducido de 70px */
}

    .header-dia.hoy {
        background: linear-gradient(135deg, #3b82f6 0%, #1d4ed8 100%);
        color: white;
    }

.nombre-dia {
    font-weight: 700;
    font-size: 0.55em; /* Reducido de 0.6em */
    margin-bottom: 1px;
    text-transform: uppercase;
}

.fecha-dia {
    font-size: 0.8em; /* Reducido de 0.9em */
    font-weight: 800;
}

/* Celdas más compactas */
.fila-horario {
    border-bottom: 1px solid #f1f5f9;
}

.celda-hora {
    background: linear-gradient(135deg, #f8fafc 0%, #f1f5f9 100%);
    padding: 5px 2px; /* Reducido de 6px 4px */
    text-align: center;
    font-weight: 700;
    border-right: 1px solid #e2e8f0;
    min-width: 35px; /* Reducido de 45px */
    font-size: 0.7em; /* Reducido de 0.75em */
    position: sticky;
    left: 0;
    z-index: 5;
}

.celda-dia {
    padding: 1px; /* Reducido de 2px 1px */
    text-align: center;
    border-right: 1px solid #f1f5f9;
    min-width: 50px; /* Reducido de 70px */
    height: 30px; /* Reducido de 35px */
    vertical-align: middle;
    cursor: pointer;
    transition: all 0.25s ease;
}

    .celda-dia.disponible {
        background: linear-gradient(135deg, #f0fdf4 0%, #dcfce7 100%);
        border: 1px solid #16a34a;
        border-radius: 3px;
        margin: 0.5px;
    }

        .celda-dia.disponible:hover {
            background: linear-gradient(135deg, #16a34a 0%, #22c55e 100%);
            color: white;
            transform: scale(1.02);
        }

.horario-disponible,
.horario-no-disponible {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    height: 100%;
    gap: 0px;
}

    .horario-disponible span {
        font-weight: 700;
        font-size: 0.65em; /* Reducido de 0.7em */
        margin-bottom: 0px;
        color: #166534;
    }

.celda-dia.disponible:hover .horario-disponible span {
    color: white;
}

.estado {
    font-size: 0.45em; /* Reducido de 0.5em */
    font-weight: 700;
    padding: 1px 2px;
    border-radius: 2px;
    text-transform: uppercase;
}

.celda-dia.disponible .estado {
    background: #16a34a;
    color: white;
}

.celda-dia.disponible:hover .estado {
    background: white;
    color: #16a34a;
}

/* ESTILOS PARA LA INFORMACIÓN DEL PROFESIONAL (IZQUIERDA) */
.foto-perfil-container {
    text-align: center;
    margin-bottom: 15px;
}

.foto-perfil {
    width: 120px;
    height: 120px;
    border-radius: 50%;
    object-fit: cover;
    border: 3px solid #007bff;
}

.info-section {
    margin-bottom: 20px;
    padding-bottom: 15px;
    border-bottom: 1px solid #eee;
}

    .info-section h2 {
        color: #333;
        margin-bottom: 10px;
        font-size: 1.1em;
        font-weight: 600;
    }

.info-item {
    display: flex;
    justify-content: space-between;
    margin-bottom: 6px;
    padding: 4px 0;
    font-size: 0.85em;
}

    .info-item label {
        font-weight: 600;
        color: #555;
    }

    .info-item span {
        color: #333;
        text-align: right;
        max-width: 60%;
    }

.descripcion {
    line-height: 1.4;
    color: #666;
    font-size: 0.85em;
}

/* BOTONES DE COMPARTIR */
.compartir-container {
    margin-bottom: 20px;
    text-align: center;
}

.btn-compartir {
    background: linear-gradient(135deg, #3b82f6 0%, #1d4ed8 100%);
    color: white;
    border: none;
    padding: 10px 20px;
    border-radius: 8px;
    cursor: pointer;
    font-weight: 600;
    font-size: 0.9em;
    transition: all 0.3s ease;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    box-shadow: 0 2px 8px rgba(59, 130, 246, 0.3);
}

    .btn-compartir:hover {
        transform: translateY(-2px);
        box-shadow: 0 4px 12px rgba(59, 130, 246, 0.4);
    }

/* SECCIÓN DE DIRECCIÓN (ahora fuera del panel izquierdo) */
.perfil-profesional-container .info-section:last-of-type {
    margin-top: 20px;
    background: #fff;
    padding: 20px;
    border-radius: 12px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
    border: 1px solid #e2e8f0;
}

.galeria-fotos {
    margin-top: 10px;
}

.fotos-container {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(80px, 1fr));
    gap: 6px;
    margin-top: 6px;
}

.foto-item img {
    width: 100%;
    height: 60px;
    object-fit: cover;
    border-radius: 6px;
    cursor: pointer;
    transition: transform 0.3s ease;
}

    .foto-item img:hover {
        transform: scale(1.05);
    }

.no-direccion {
    color: #999;
    font-style: italic;
    font-size: 0.85em;
}

/* Título profesional */
.titulo-container {
    text-align: center;
    margin-top: 8px;
    display: flex;
    justify-content: center;
    align-items: center;
    background: #f8fafc;
    border-radius: 8px;
    padding: 8px;
    border: 1px solid #e2e8f0;
}

.titulo-imagen {
    max-width: 100%;
    max-height: 150px;
    border-radius: 6px;
    border: 1px solid #e2e8f0;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.1);
    object-fit: contain;
    background: white;
    padding: 4px;
}

/* Ajuste específico para el item del título */
.info-item:has(.titulo-container) {
    flex-direction: column;
    align-items: stretch;
}

    .info-item:has(.titulo-container) label {
        margin-bottom: 6px;
        text-align: center;
    }

/* MODAL DE COMPARTIR */
.modal-compartir {
    display: none;
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
    backdrop-filter: blur(4px);
}

.modal-compartir-contenido {
    background-color: #fff;
    margin: 5% auto;
    padding: 0;
    border-radius: 12px;
    width: 90%;
    max-width: 500px;
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.2);
    animation: modalSlideIn 0.3s ease-out;
}

@keyframes modalSlideIn {
    from {
        opacity: 0;
        transform: translateY(-50px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.modal-compartir-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px 24px;
    border-bottom: 1px solid #e2e8f0;
    background: linear-gradient(135deg, #1e3a8a 0%, #3730a3 100%);
    color: white;
    border-radius: 12px 12px 0 0;
}

    .modal-compartir-header h3 {
        margin: 0;
        font-size: 1.3em;
        font-weight: 700;
    }

.cerrar-modal {
    color: white;
    font-size: 24px;
    font-weight: bold;
    cursor: pointer;
    transition: opacity 0.3s ease;
}

    .cerrar-modal:hover {
        opacity: 0.7;
    }

.modal-compartir-body {
    padding: 24px;
}

/* Contenedor QR */
.qr-container {
    text-align: center;
    margin-bottom: 24px;
    padding: 20px;
    background: #f8fafc;
    border-radius: 8px;
    border: 1px solid #e2e8f0;
}

#qrcode {
    display: inline-block;
    margin-bottom: 12px;
    padding: 10px;
    background: white;
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.qr-descripcion {
    color: #64748b;
    font-size: 0.9em;
    margin: 0;
    font-weight: 500;
}

/* Contenedor URL */
.url-container {
    margin-bottom: 24px;
}

    .url-container label {
        display: block;
        margin-bottom: 8px;
        font-weight: 600;
        color: #374151;
        font-size: 0.95em;
    }

.url-input-group {
    display: flex;
    gap: 8px;
}

.url-input {
    flex: 1;
    padding: 10px 12px;
    border: 1px solid #d1d5db;
    border-radius: 6px;
    font-size: 0.9em;
    background: #f9fafb;
}

.btn-copiar {
    background: #10b981;
    color: white;
    border: none;
    padding: 10px 16px;
    border-radius: 6px;
    cursor: pointer;
    font-weight: 600;
    font-size: 0.9em;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    gap: 6px;
    white-space: nowrap;
}

    .btn-copiar:hover {
        background: #059669;
        transform: translateY(-1px);
    }

/* Redes sociales */
.redes-sociales p {
    margin-bottom: 12px;
    font-weight: 600;
    color: #374151;
    font-size: 0.95em;
}

.redes-botones {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
    gap: 10px;
}

.btn-redes {
    padding: 10px 12px;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    font-weight: 600;
    font-size: 0.85em;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
}

.btn-whatsapp {
    background: #25d366;
    color: white;
}

    .btn-whatsapp:hover {
        background: #128c7e;
        transform: translateY(-1px);
    }

.btn-facebook {
    background: #1877f2;
    color: white;
}

    .btn-facebook:hover {
        background: #0d5cb6;
        transform: translateY(-1px);
    }

.btn-twitter {
    background: #1da1f2;
    color: white;
}

    .btn-twitter:hover {
        background: #0d8bd9;
        transform: translateY(-1px);
    }

/* MODAL DE FOTOS */
.modal-foto {
    display: none;
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.9);
    backdrop-filter: blur(8px);
}

    .modal-foto .contenido-modal {
        display: block;
        margin: auto;
        max-width: 90%;
        max-height: 90%;
        position: absolute;
        top: 50%;
        left: 50%;
        transform: translate(-50%, -50%);
        border-radius: 8px;
        box-shadow: 0 4px 20px rgba(0, 0, 0, 0.5);
    }

    .modal-foto .cerrar-modal {
        position: absolute;
        top: 20px;
        right: 30px;
        color: white;
        font-size: 36px;
        font-weight: bold;
        cursor: pointer;
        z-index: 1001;
        background: rgba(0, 0, 0, 0.5);
        width: 40px;
        height: 40px;
        border-radius: 50%;
        display: flex;
        align-items: center;
        justify-content: center;
    }

        .modal-foto .cerrar-modal:hover {
            background: rgba(255, 255, 255, 0.2);
        }

/* MODAL COMPACTO */
.confirmar-cita-modal {
    max-width: 350px;
    max-height: 480px;
}

.modal-header {
    padding: 10px 12px;
}

    .modal-header h3 {
        font-size: 0.9em;
    }

.seccion-modal {
    padding: 8px 10px;
}

.detalle-item {
    font-size: 0.75em;
    padding: 2px 0;
}

/* Estados de no disponible */
.celda-dia.no-disponible {
    background: #f8fafc;
    color: #94a3b8;
}

.horario-no-disponible span {
    color: #94a3b8;
    font-weight: 600;
}

.dia-pasado {
    color: #cbd5e1;
    font-style: italic;
}

/* RESPONSIVE */
@media (max-width: 1024px) {
    .perfil-profesional-container {
        flex-direction: column;
        gap: 15px;
    }

    .perfil-info {
        flex: none;
        position: static;
        width: 100%;
    }

    .calendario-container {
        width: 100%;
    }
}

@media (max-width: 768px) {
    .perfil-profesional-container {
        padding: 10px;
        gap: 10px;
    }

    .perfil-info {
        padding: 15px;
    }

    .calendario-container {
        padding: 10px;
    }

    .calendario-header {
        padding: 10px;
    }

    .calendario-navegacion {
        flex-wrap: wrap;
    }

    .tabla-calendario {
        min-width: 350px; /* Reducido de 400px */
        font-size: 0.65em; /* Reducido de 0.7em */
    }

    .celda-dia {
        height: 28px; /* Reducido de 30px */
        min-width: 45px; /* Reducido de 60px */
    }

    .info-item {
        flex-direction: column;
        gap: 2px;
    }

        .info-item span {
            text-align: left;
            max-width: 100%;
        }

    .modal-compartir-contenido {
        margin: 10% auto;
        width: 95%;
    }

    .redes-botones {
        grid-template-columns: 1fr;
    }

    /* Ajuste para la sección de dirección en responsive */
    .perfil-profesional-container .info-section:last-of-type {
        margin-top: 15px;
        padding: 15px;
    }
}

@media (max-width: 480px) {
    .perfil-profesional-container {
        padding: 5px;
    }

    .perfil-info {
        padding: 12px;
    }

    .foto-perfil {
        width: 100px;
        height: 100px;
    }

    .calendario-container {
        padding: 8px;
    }

    .calendario-header {
        padding: 8px;
    }

    .btn-navegacion {
        padding: 2px 4px;
        font-size: 0.65em;
    }

    .semana-actual {
        min-width: 130px; /* Reducido de 140px */
        font-size: 0.65em; /* Reducido de 0.7em */
    }

    .tabla-calendario {
        min-width: 320px; /* Reducido de 350px */
    }

    .modal-compartir-body {
        padding: 16px;
    }

    .qr-container {
        padding: 15px;
    }

    .url-input-group {
        flex-direction: column;
    }

    /* Ajuste para la sección de dirección en móviles */
    .perfil-profesional-container .info-section:last-of-type {
        margin-top: 10px;
        padding: 12px;
    }
}

/* Scrollbar mínimo */
.calendario-semana::-webkit-scrollbar {
    height: 3px; /* Reducido de 4px */
}

.calendario-semana::-webkit-scrollbar-track {
    background: #f1f5f9;
}

.calendario-semana::-webkit-scrollbar-thumb {
    background: #cbd5e1;
    border-radius: 2px;
}


/* ===== MEJORAS ESPECÍFICAS PARA MÓVILES - PERFIL ===== */
@media (max-width: 768px) {
    /* CONTENEDOR PRINCIPAL MÓVIL */
    .perfil-profesional-container {
        flex-direction: column;
        gap: 12px;
        padding: 8px;
        min-height: auto;
    }

    /* INFORMACIÓN DEL PERFIL MÁS COMPACTA */
    .perfil-info {
        flex: none;
        width: 100%;
        padding: 16px;
        position: static;
        border-radius: 10px;
    }

    /* FOTO DE PERFIL MÁS PEQUEÑA */
    .foto-perfil-container {
        margin-bottom: 12px;
    }

    .foto-perfil {
        width: 80px;
        height: 80px;
        border-width: 2px;
    }

    /* SECCIONES DE INFORMACIÓN MÁS COMPACTAS */
    .info-section {
        margin-bottom: 16px;
        padding-bottom: 12px;
    }

        .info-section h2 {
            font-size: 16px;
            margin-bottom: 8px;
        }

    .info-item {
        flex-direction: column;
        gap: 2px;
        margin-bottom: 4px;
        padding: 3px 0;
        font-size: 14px;
    }

        .info-item span {
            text-align: left;
            max-width: 100%;
            font-size: 13px;
        }

    .descripcion {
        font-size: 13px;
        line-height: 1.4;
    }

    /* TÍTULO PROFESIONAL COMPACTO */
    .titulo-container {
        padding: 6px;
        margin-top: 6px;
    }

    .titulo-imagen {
        max-height: 100px;
    }

    /* BOTÓN COMPARTIR COMPACTO */
    .compartir-container {
        margin-bottom: 16px;
    }

    .btn-compartir {
        padding: 10px 16px;
        font-size: 14px;
        border-radius: 6px;
        min-height: 44px;
    }

        .btn-compartir:hover {
            transform: none;
        }

    /* GALERÍA DE FOTOS COMPACTA */
    .fotos-container {
        grid-template-columns: repeat(auto-fill, minmax(60px, 1fr));
        gap: 4px;
        margin-top: 4px;
    }

    .foto-item img {
        height: 50px;
        border-radius: 4px;
    }

        .foto-item img:hover {
            transform: none;
        }

    /* CALENDARIO MÁS COMPACTO */
    .calendario-container {
        padding: 10px;
        border-radius: 10px;
        width: 100%;
    }

    /* HEADER DEL CALENDARIO COMPACTO */
    .calendario-header {
        padding: 10px;
        margin-bottom: 8px;
        border-radius: 6px;
    }

    .calendario-info h1 {
        font-size: 16px;
        margin-bottom: 2px;
    }

    .profesional-nombre {
        font-size: 13px;
    }

    /* NAVEGACIÓN MÁS COMPACTA */
    .calendario-navegacion {
        gap: 4px;
        padding: 4px;
        font-size: 12px;
    }

    .btn-navegacion {
        padding: 4px 6px;
        font-size: 11px;
        border-radius: 3px;
        min-height: 28px;
    }

        .btn-navegacion:hover:not(:disabled) {
            transform: none;
        }

    .semana-actual {
        min-width: 120px;
        font-size: 12px;
        padding: 0 3px;
    }

    /* SELECTOR DE SERVICIO COMPACTO */
    .servicio-selector {
        margin-bottom: 8px;
        padding: 6px;
    }

        .servicio-selector label {
            font-size: 13px;
            margin-bottom: 3px;
        }

    .form-control {
        padding: 6px 8px;
        font-size: 14px;
        min-height: 36px;
    }

    /* TABLA DE CALENDARIO MÁS COMPACTA */
    .calendario-semana {
        border-radius: 6px;
    }

    .tabla-calendario {
        min-width: 300px;
        font-size: 11px;
    }

    /* ENCABEZADOS DE DÍA MÁS COMPACTOS */
    .header-dia {
        padding: 4px 2px;
        min-width: 40px;
    }

    .nombre-dia {
        font-size: 10px;
        margin-bottom: 1px;
    }

    .fecha-dia {
        font-size: 12px;
    }

    /* CELDAS MÁS COMPACTAS */
    .celda-hora {
        padding: 4px 2px;
        min-width: 30px;
        font-size: 11px;
        position: sticky;
        left: 0;
        z-index: 5;
    }

    .celda-dia {
        padding: 1px;
        min-width: 40px;
        height: 26px;
        cursor: pointer;
    }

        .celda-dia.disponible:hover {
            transform: none;
        }

    /* HORARIOS DISPONIBLES COMPACTOS */
    .horario-disponible span {
        font-size: 10px;
    }

    .estado {
        font-size: 8px;
        padding: 1px 2px;
    }

    /* MODALES MÓVILES */
    .modal-compartir-contenido {
        margin: 5% auto;
        width: 95%;
        max-width: 320px;
    }

    .modal-compartir-header {
        padding: 12px 16px;
    }

        .modal-compartir-header h3 {
            font-size: 16px;
        }

    .cerrar-modal {
        font-size: 20px;
    }

    .modal-compartir-body {
        padding: 16px;
    }

    /* QR COMPACTO */
    .qr-container {
        padding: 12px;
        margin-bottom: 16px;
    }

    #qrcode {
        margin-bottom: 8px;
        padding: 8px;
    }

    .qr-descripcion {
        font-size: 12px;
    }

    /* URL COMPACTA */
    .url-container label {
        font-size: 13px;
        margin-bottom: 6px;
    }

    .url-input {
        padding: 8px 10px;
        font-size: 14px;
        min-height: 36px;
    }

    .btn-copiar {
        padding: 8px 12px;
        font-size: 13px;
        min-height: 36px;
    }

        .btn-copiar:hover {
            transform: none;
        }

    /* REDES SOCIALES COMPACTAS */
    .redes-sociales p {
        font-size: 13px;
        margin-bottom: 8px;
    }

    .redes-botones {
        grid-template-columns: 1fr;
        gap: 6px;
    }

    .btn-redes {
        padding: 8px 10px;
        font-size: 13px;
        min-height: 36px;
    }

        .btn-redes:hover {
            transform: none;
        }

    /* MODAL DE FOTOS MÓVIL */
    .modal-foto .contenido-modal {
        max-width: 95%;
        max-height: 80%;
    }

    .modal-foto .cerrar-modal {
        top: 10px;
        right: 15px;
        font-size: 24px;
        width: 32px;
        height: 32px;
    }

    /* MODAL DE CONFIRMACIÓN COMPACTO */
    .confirmar-cita-modal {
        max-width: 300px;
        max-height: 400px;
    }

    .modal-header {
        padding: 8px 10px;
    }

        .modal-header h3 {
            font-size: 14px;
        }

    .seccion-modal {
        padding: 6px 8px;
    }

    .detalle-item {
        font-size: 12px;
        padding: 1px 0;
    }
}

@media (max-width: 480px) {
    /* VERSIÓN AÚN MÁS COMPACTA */
    .perfil-profesional-container {
        padding: 5px;
        gap: 8px;
    }

    .perfil-info {
        padding: 12px;
    }

    .foto-perfil {
        width: 70px;
        height: 70px;
    }

    .calendario-container {
        padding: 8px;
    }

    .calendario-header {
        padding: 8px;
    }

    .tabla-calendario {
        min-width: 280px;
        font-size: 10px;
    }

    .celda-dia {
        height: 24px;
        min-width: 35px;
    }

    .celda-hora {
        font-size: 10px;
        min-width: 25px;
    }

    .header-dia {
        min-width: 35px;
    }

    .nombre-dia {
        font-size: 9px;
    }

    .fecha-dia {
        font-size: 11px;
    }

    .horario-disponible span {
        font-size: 9px;
    }

    .modal-compartir-contenido {
        margin: 2% auto;
        width: 98%;
    }
}

@media (max-width: 360px) {
    /* VERSIÓN MÍNIMA PARA MÓVILES PEQUEÑOS */
    .perfil-info {
        padding: 10px;
    }

    .foto-perfil {
        width: 60px;
        height: 60px;
    }

    .info-section h2 {
        font-size: 15px;
    }

    .info-item {
        font-size: 13px;
    }

    .tabla-calendario {
        min-width: 260px;
    }

    .celda-dia {
        height: 22px;
        min-width: 32px;
    }
}

/* MEJORAS ESPECÍFICAS PARA MÓVILES - USABILIDAD */
@media (max-width: 768px) {
    /* Mejorar áreas táctiles */
    .btn-compartir,
    .btn-navegacion,
    .btn-copiar,
    .btn-redes,
    .celda-dia.disponible,
    .foto-item img,
    .cerrar-modal {
        -webkit-tap-highlight-color: transparent;
        cursor: pointer;
    }

        /* Estados táctiles con feedback */
        .btn-compartir:active,
        .btn-navegacion:active:not(:disabled),
        .btn-copiar:active,
        .btn-redes:active,
        .celda-dia.disponible:active,
        .foto-item img:active,
        .cerrar-modal:active {
            transform: scale(0.95);
            opacity: 0.8;
            transition: transform 0.1s ease, opacity 0.1s ease;
        }

        /* Eliminar efectos hover en móviles */
        .btn-compartir:hover,
        .btn-navegacion:hover:not(:disabled),
        .btn-copiar:hover,
        .btn-redes:hover,
        .celda-dia.disponible:hover,
        .foto-item img:hover {
            transform: none;
        }

    /* Scroll suave para iOS */
    .calendario-semana {
        -webkit-overflow-scrolling: touch;
    }

    /* Prevenir zoom en inputs */
    .form-control,
    .url-input {
        font-size: 16px !important;
    }
}

/* OPTIMIZACIONES PARA ORIENTACIÓN HORIZONTAL */
@media (max-width: 768px) and (orientation: landscape) {
    .perfil-profesional-container {
        flex-direction: row;
        gap: 10px;
    }

    .perfil-info {
        flex: 0 0 45%;
        max-height: 80vh;
        overflow-y: auto;
    }

    .calendario-container {
        flex: 1;
        max-height: 80vh;
    }

    .calendario-semana {
        max-height: 60vh;
    }
}

/* MEJORAS DE ACCESIBILIDAD EN MÓVILES */
@media (max-width: 768px) {
    .btn-compartir:focus,
    .btn-navegacion:focus,
    .btn-copiar:focus,
    .btn-redes:focus,
    .celda-dia.disponible:focus,
    .form-control:focus,
    .url-input:focus {
        outline: 2px solid #3b82f6;
        outline-offset: 1px;
    }

    /* Asegurar contraste en exteriores */
    .perfil-info,
    .calendario-container {
        background: #ffffff;
        box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
    }
}

/* SOPORTE PARA DISPOSITIVOS CON NOTCH */
@supports (padding: max(0px)) {
    @media (max-width: 768px) {
        .perfil-profesional-container {
            padding-left: max(8px, env(safe-area-inset-left));
            padding-right: max(8px, env(safe-area-inset-right));
            padding-top: max(8px, env(safe-area-inset-top));
            padding-bottom: max(8px, env(safe-area-inset-bottom));
        }
    }
}

/* SCROLLBAR MÍNIMO PARA MÓVILES */
@media (max-width: 768px) {
    .calendario-semana::-webkit-scrollbar {
        height: 2px;
    }

    .perfil-info::-webkit-scrollbar {
        width: 2px;
    }
}