/* Estilos para el buscador de alumnos - Frontend */

#student-search-container {
    max-width: 800px;
    margin: 20px auto;
    padding: 20px;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
}

/* Toast Notifications */
.toast-notification {
    position: fixed;
    top: 20px;
    right: 20px;
    z-index: 10001;
    min-width: 300px;
    max-width: 500px;
    padding: 16px 20px;
    border-radius: 8px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.12);
    display: flex;
    align-items: center;
    gap: 12px;
    transform: translateX(100%);
    opacity: 0;
    transition: all 0.3s cubic-bezier(0.68, -0.55, 0.265, 1.55);
    backdrop-filter: blur(8px);
}

.toast-notification.toast-show {
    transform: translateX(0);
    opacity: 1;
}

.toast-success {
    background: linear-gradient(135deg, rgba(76, 175, 80, 0.95), rgba(56, 142, 60, 0.95));
    color: white;
    border-left: 4px solid #4caf50;
}

.toast-error {
    background: linear-gradient(135deg, rgba(244, 67, 54, 0.95), rgba(211, 47, 47, 0.95));
    color: white;
    border-left: 4px solid #f44336;
}

.toast-icon {
    font-size: 18px;
    font-weight: bold;
    width: 24px;
    height: 24px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.2);
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.toast-message {
    flex: 1;
    font-weight: 500;
    line-height: 1.4;
}

.toast-close {
    background: none;
    border: none;
    color: white;
    font-size: 20px;
    cursor: pointer;
    opacity: 0.8;
    transition: opacity 0.2s;
    padding: 0;
    width: 24px;
    height: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    flex-shrink: 0;
}

.toast-close:hover {
    opacity: 1;
    background: rgba(255, 255, 255, 0.1);
}

/* WhatsApp Links */
.whatsapp-link {
    display: inline-flex;
    align-items: center;
    margin-left: 8px;
    text-decoration: none;
    background: #25D366;
    color: white;
    padding: 6px 10px;
    border-radius: 20px;
    font-size: 12px;
    transition: all 0.3s ease;
    box-shadow: 0 2px 4px rgba(37, 211, 102, 0.3);
    vertical-align: middle;
}

.whatsapp-link:hover {
    background: #128C7E;
    transform: translateY(-1px);
    box-shadow: 0 4px 8px rgba(37, 211, 102, 0.4);
    color: white;
    text-decoration: none;
}

.whatsapp-link:focus {
    outline: 2px solid #25D366;
    outline-offset: 2px;
}

.whatsapp-icon {
    font-size: 14px;
    margin-right: 4px;
    color: white;
}

.whatsapp-link:hover .whatsapp-icon {
    animation: whatsappPulse 0.6s ease-in-out;
}

@keyframes whatsappPulse {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.1); }
}

/* Formulario de búsqueda */
.student-search-form {
    position: relative;
    margin-bottom: 30px;
}

.student-search-form label {
    display: block;
    margin-bottom: 8px;
    font-weight: 600;
    color: #333;
    font-size: 16px;
}

#student-search {
    width: 100%;
    padding: 12px 16px;
    font-size: 16px;
    border: 2px solid #ddd;
    border-radius: 8px;
    transition: border-color 0.3s ease, box-shadow 0.3s ease;
    background-color: #fff;
}

#student-search:focus {
    outline: none;
    border-color: #0073aa;
    box-shadow: 0 0 0 3px rgba(0, 115, 170, 0.1);
}

/* Sugerencias de autocompletado */
.student-suggestions {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: #fff;
    border: 1px solid #ddd;
    border-top: none;
    border-radius: 0 0 8px 8px;
    max-height: 200px;
    overflow-y: auto;
    z-index: 1000;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
    margin: 0;
    padding: 0;
    list-style: none;
}

.student-suggestions li {
    padding: 12px 16px;
    cursor: pointer;
    border-bottom: 1px solid #f0f0f0;
    transition: background-color 0.2s ease;
}

.student-suggestions li:hover,
.student-suggestions li.active {
    background-color: #f8f9fa;
}

.student-suggestions li:last-child {
    border-bottom: none;
}

.student-suggestions li.no-results {
    color: #666;
    font-style: italic;
    cursor: default;
    background-color: #f9f9f9;
}

.student-suggestions li.error-message {
    color: #dc3545;
    font-weight: 500;
    cursor: default;
    background-color: #fff5f5;
}

/* Detalles del alumno */
.student-details {
    background: #fff;
    border-radius: 12px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
    padding: 30px;
    margin-top: 20px;
    animation: fadeInUp 0.5s ease;
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.student-details h3 {
    color: #00502E;
    margin-bottom: 25px;
    font-size: 24px;
    font-weight: 700;
    border-bottom: 3px solid #00502E;
    padding-bottom: 10px;
}

.student-details h4 {
    color: #00502E;
    margin: 25px 0 15px 0;
    font-size: 20px;
    font-weight: 600;
}

.student-details h5 {
    color: #666;
    margin: 10px 0 3px 0;
    font-size: 16px;
    font-weight: 600;
}

/* Grid de información básica */
.student-info-grid {
    display: grid;
    grid-template-columns: 150px 1fr;
    gap: 30px;
    margin-bottom: 30px;
    align-items: start;
}

.student-photo {
    text-align: center;
}

.student-photo img {
    width: 200px;
    height: 250px;
    object-fit: cover;
    border-radius: 8px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    border: 3px solid #fff;
}

.student-basic-info h4 {
    color: #00502E;
    font-size: 22px;
    margin-bottom: 15px;
    margin-top: 0;
}

.student-basic-info p {
    margin: 6px 0;
    font-size: 15px;
    line-height: 0.9;
}

.student-basic-info strong {
    color: #333;
    font-weight: 600;
    display: inline-block;
    min-width: 140px;
}

/* Badges de status */
.status-badge {
    display: inline-block;
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.status-inscrito {
    background-color: #d4edda;
    color: #155724;
    border: 1px solid #c3e6cb;
}

.status-baja-temporal {
    background-color: #fff3cd;
    color: #856404;
    border: 1px solid #ffeaa7;
}

.status-baja-definitiva {
    background-color: #f8d7da;
    color: #721c24;
    border: 1px solid #f5c6cb;
}

.status-egresado {
    background-color: #d1ecf1;
    color: #0c5460;
    border: 1px solid #bee5eb;
}

/* Botón de editar en frontend */
.student-actions {
    text-align: center;
    margin-top: 25px;
    padding: 20px;
    border-top: 1px solid #eee;
}

.edit-student-frontend-btn {
    background: linear-gradient(135deg, #0073aa, #005a87);
    color: white;
    border: none;
    padding: 12px 24px;
    border-radius: 25px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 4px 12px rgba(0, 115, 170, 0.3);
    display: inline-flex;
    align-items: center;
    gap: 8px;
}

.edit-student-frontend-btn:hover {
    background: linear-gradient(135deg, #005a87, #004066);
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(0, 115, 170, 0.4);
}

.edit-icon {
    font-size: 16px;
}

/* Modal de edición frontend */
.frontend-modal {
    position: fixed;
    z-index: 10000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.6);
    backdrop-filter: blur(3px);
}

.frontend-modal-content {
    background-color: #fff;
    margin: 2% auto;
    border-radius: 12px;
    width: 90%;
    max-width: 900px;
    max-height: 90vh;
    overflow-y: auto;
    box-shadow: 0 15px 50px rgba(0, 0, 0, 0.3);
    animation: modalSlideIn 0.3s ease;
}

@keyframes modalSlideIn {
    from {
        opacity: 0;
        transform: translateY(-50px) scale(0.95);
    }
    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

.frontend-modal-header {
    background: linear-gradient(135deg, #0073aa, #005a87);
    color: white;
    padding: 20px 30px;
    border-radius: 12px 12px 0 0;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.frontend-modal-header h3 {
    margin: 0;
    font-size: 20px;
    font-weight: 600;
}

.frontend-close {
    color: white;
    font-size: 28px;
    font-weight: bold;
    cursor: pointer;
    opacity: 0.8;
    transition: opacity 0.2s;
    line-height: 1;
}

.frontend-close:hover {
    opacity: 1;
}

/* Formulario frontend */
.frontend-form-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 25px;
    padding: 30px;
}

.frontend-form-section {
    background: #f8f9fa;
    padding: 20px;
    border-radius: 8px;
    border: 1px solid #e9ecef;
}

.frontend-form-section h4 {
    margin-top: 0;
    margin-bottom: 20px;
    color: #0073aa;
    font-size: 16px;
    font-weight: 600;
    border-bottom: 2px solid #0073aa;
    padding-bottom: 8px;
}

.frontend-form-group {
    margin-bottom: 15px;
}

.frontend-form-group label {
    display: block;
    margin-bottom: 5px;
    font-weight: 600;
    color: #333;
    font-size: 14px;
}

.frontend-form-group input,
.frontend-form-group select {
    width: 100%;
    padding: 10px 12px;
    border: 1px solid #ddd;
    border-radius: 6px;
    font-size: 14px;
    transition: border-color 0.3s ease, box-shadow 0.3s ease;
    box-sizing: border-box;
    background-color: white;
}

.frontend-form-group input:focus,
.frontend-form-group select:focus {
    outline: none;
    border-color: #0073aa;
    box-shadow: 0 0 0 3px rgba(0, 115, 170, 0.1);
}

/* Estados de validación frontend */
.frontend-form-group.error input,
.frontend-form-group.error select {
    border-color: #dc3545;
}

.frontend-error-message {
    color: #dc3545;
    font-size: 12px;
    margin-top: 5px;
    display: block;
}

/* Acciones del formulario */
.frontend-form-actions {
    text-align: center;
    padding: 20px 30px;
    border-top: 1px solid #eee;
    background: #f8f9fa;
    border-radius: 0 0 12px 12px;
}

.frontend-save-btn,
.frontend-cancel-btn {
    padding: 12px 24px;
    border-radius: 6px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    margin: 0 5px;
    border: none;
}

.frontend-save-btn {
    background: linear-gradient(135deg, #28a745, #20903c);
    color: white;
    box-shadow: 0 4px 12px rgba(40, 167, 69, 0.3);
}

.frontend-save-btn:hover {
    background: linear-gradient(135deg, #20903c, #1e7e34);
    transform: translateY(-1px);
    box-shadow: 0 6px 16px rgba(40, 167, 69, 0.4);
}

.frontend-cancel-btn {
    background: #6c757d;
    color: white;
    box-shadow: 0 4px 12px rgba(108, 117, 125, 0.3);
}

.frontend-cancel-btn:hover {
    background: #5a6268;
    transform: translateY(-1px);
}

.frontend-save-btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    transform: none !important;
}

/* Grid de contactos */
.contact-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 25px;
    margin-top: 20px;
}

.contact-section {
    background: #fff5da;
    padding: 10px 20px;
    border-radius: 8px;
    border-left: 4px solid #00502E;
}

.contact-section h5 {
    margin-top: 0;
    color: #00502E;
    font-size: 16px;
    font-weight: 700;
}

.contact-section p {
    margin: 6px 0;
    font-size: 14px;
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 4px;
}

.contact-section strong {
    color: #333;
    font-weight: 600;
}

/* Sección de documentos */
.student-documents {
    background: #fff5da;
    padding: 25px;
    border-radius: 8px;
    margin-top: 25px;
    border: 1px solid #e6f3ff;
}

.student-documents h4 {
    margin-top: 0;
    color: #00502E;
}

.student-documents a {
    color: #611232;
    text-decoration: none;
    font-weight: 600;
    padding: 8px 16px;
    background: #fff;
    border-radius: 4px;
    display: inline-block;
    transition: all 0.3s ease;
    border: 1px solid #611232;
}

.student-documents a:hover {
    background: #611232;
    color: #fff;
    transform: translateY(-1px);
    box-shadow: 0 2px 8px rgba(0, 115, 170, 0.3);
}

.medical-info {
    background: #fff;
    padding: 15px;
    border-radius: 4px;
    border: 1px solid #ddd;
    margin-top: 10px;
    white-space: pre-line;
    font-size: 14px;
    line-height: 1.6;
}

/* Loading */
.loading {
    text-align: center;
    padding: 40px 20px;
    color: #666;
    font-style: italic;
}

.loading:before {
    content: '';
    display: inline-block;
    width: 20px;
    height: 20px;
    border: 2px solid #f3f3f3;
    border-top: 2px solid #0073aa;
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin-right: 10px;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* Responsive */
@media (max-width: 768px) {
    #student-search-container {
        padding: 15px;
        margin: 10px;
    }
    
    .student-details {
        padding: 20px;
    }
    
    .student-info-grid {
        grid-template-columns: 1fr;
        gap: 20px;
        text-align: center;
    }
    
    .student-photo {
        order: -1;
    }
    
    .contact-grid {
        grid-template-columns: 1fr;
        gap: 15px;
    }
    
    .student-basic-info strong {
        min-width: auto;
        display: block;
        margin-bottom: 2px;
    }
    
    .toast-notification {
        right: 10px;
        left: 10px;
        width: auto;
        min-width: auto;
        max-width: none;
    }
    
    .frontend-modal-content {
        width: 95%;
        margin: 5% auto;
    }
    
    .frontend-form-grid {
        grid-template-columns: 1fr;
        gap: 20px;
        padding: 20px;
    }
}

@media (max-width: 480px) {
    .student-details h3 {
        font-size: 20px;
    }
    
    .student-basic-info h4 {
        font-size: 18px;
    }
    
    .contact-section {
        padding: 15px;
    }
    
    #student-search {
        font-size: 16px; /* Previene zoom en iOS */
    }
    
    .toast-notification {
        top: 10px;
        right: 5px;
        left: 5px;
        padding: 12px 16px;
    }
    
    .toast-message {
        font-size: 14px;
    }
    
    .whatsapp-link {
        padding: 4px 8px;
        font-size: 11px;
        border-radius: 15px;
    }
    
    .whatsapp-icon {
        font-size: 12px;
        margin-right: 3px;
    }
}

/* Estilos para impresión */
@media print {
    #student-search-container {
        max-width: none;
        margin: 0;
        padding: 0;
    }
    
    .student-search-form {
        display: none;
    }
    
    .student-details {
        box-shadow: none;
        border: 1px solid #000;
    }
    
    .contact-section {
        break-inside: avoid;
    }
    
    .toast-notification {
        display: none !important;
    }
    
    .whatsapp-link {
        display: none;
    }
    
    .student-actions {
        display: none;
    }
}
/* Controles de búsqueda */
.search-controls {
    display: grid;
    grid-template-columns: 1fr auto;
    gap: 12px;
    align-items: end;
}

.status-filter {
    padding: 12px 16px;
    font-size: 14px;
    border: 2px solid #ddd;
    border-radius: 8px;
    background-color: #fff;
    color: #333;
    font-weight: 500;
    cursor: pointer;
    transition: border-color 0.3s ease, box-shadow 0.3s ease;
    min-width: 160px;
}

.status-filter:focus {
    outline: none;
    border-color: #0073aa;
    box-shadow: 0 0 0 3px rgba(0, 115, 170, 0.1);
}

.status-filter:hover {
    border-color: #999;
}

/* Badge en sugerencias para mostrar status */
.student-suggestions li {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.suggestion-status {
    font-size: 10px;
    padding: 2px 6px;
    border-radius: 8px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.3px;
}

.suggestion-status.inscrito {
    background-color: #d4edda;
    color: #155724;
}

.suggestion-status.baja-temporal {
    background-color: #fff3cd;
    color: #856404;
}

.suggestion-status.baja-definitiva {
    background-color: #f8d7da;
    color: #721c24;
}

.suggestion-status.egresado {
    background-color: #d1ecf1;
    color: #0c5460;
}

/* Responsive para controles de búsqueda */
@media (max-width: 768px) {
    .search-controls {
        grid-template-columns: 1fr;
        gap: 8px;
    }
    
    .status-filter {
        min-width: auto;
        width: 100%;
    }
}

@media (max-width: 480px) {
    .status-filter {
        font-size: 16px; /* Previene zoom en iOS */
        padding: 10px 14px;
    }
}
/* AGREGAR AL FINAL del frontend.css */

/* =================================== */
/* ESTILOS PARA SHORTCODE PÚBLICO     */
/* =================================== */

#student-search-public-container {
    max-width: 700px;
    margin: 20px auto;
    padding: 20px;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
}

/* Formulario de búsqueda público */
.student-search-public-form {
    position: relative;
    margin-bottom: 30px;
}

.student-search-public-form label {
    display: block;
    margin-bottom: 8px;
    font-weight: 600;
    color: #333;
    font-size: 16px;
}

#student-search-public {
    width: 100%;
    padding: 12px 16px;
    font-size: 16px;
    border: 2px solid #ddd;
    border-radius: 8px;
    transition: border-color 0.3s ease, box-shadow 0.3s ease;
    background-color: #fff;
}

#student-search-public:focus {
    outline: none;
    border-color: #00502E;
    box-shadow: 0 0 0 3px rgba(0, 80, 46, 0.1);
}

/* Sugerencias de autocompletado público */
.student-suggestions-public {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: #fff;
    border: 1px solid #ddd;
    border-top: none;
    border-radius: 0 0 8px 8px;
    max-height: 200px;
    overflow-y: auto;
    z-index: 1000;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
    margin: 0;
    padding: 0;
    list-style: none;
}

.student-suggestions-public li {
    padding: 12px 16px;
    cursor: pointer;
    border-bottom: 1px solid #f0f0f0;
    transition: background-color 0.2s ease;
}

.student-suggestions-public li:hover,
.student-suggestions-public li.active {
    background-color: #f0f8f0;
}

.student-suggestions-public li:last-child {
    border-bottom: none;
}

.student-suggestions-public li.no-results {
    color: #666;
    font-style: italic;
    cursor: default;
    background-color: #f9f9f9;
}

.student-suggestions-public li.error-message {
    color: #dc3545;
    font-weight: 500;
    cursor: default;
    background-color: #fff5f5;
}

/* Detalles del alumno público */
.student-details-public {
    background: #fff;
    border-radius: 12px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
    padding: 30px;
    margin-top: 20px;
    animation: fadeInUp 0.5s ease;
    border: 2px solid #00502E;
}

.student-details-public h3 {
    color: #00502E;
    margin-bottom: 25px;
    font-size: 24px;
    font-weight: 700;
    border-bottom: 3px solid #00502E;
    padding-bottom: 10px;
}

.student-details-public h4 {
    color: #00502E;
    margin: 25px 0 15px 0;
    font-size: 20px;
    font-weight: 600;
}

.student-details-public h5 {
    color: #666;
    margin: 10px 0 3px 0;
    font-size: 16px;
    font-weight: 600;
}

/* Grid de información básica público */
.student-info-grid-public {
    display: grid;
    grid-template-columns: 150px 1fr;
    gap: 25px;
    margin-bottom: 30px;
    align-items: start;
}

.student-photo-public {
    text-align: center;
}

.student-photo-public img {
    width: 150px;
    height: 180px;
    object-fit: cover;
    border-radius: 8px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    border: 2px solid #00502E;
}

.student-basic-info-public h4 {
    color: #00502E;
    font-size: 20px;
    margin-bottom: 15px;
    margin-top: 0;
}

.student-basic-info-public p {
    margin: 8px 0;
    font-size: 15px;
    line-height: 1.4;
}

.student-basic-info-public strong {
    color: #333;
    font-weight: 600;
    display: inline-block;
    min-width: 140px;
}

/* Grid de contactos público */
.contact-grid-public {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 20px;
    margin-top: 20px;
}

.contact-section-public {
    background: #f0f8f0;
    padding: 15px 20px;
    border-radius: 8px;
    border-left: 4px solid #00502E;
}

.contact-section-public h5 {
    margin-top: 0;
    color: #00502E;
    font-size: 16px;
    font-weight: 700;
}

.contact-section-public p {
    margin: 6px 0;
    font-size: 14px;
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 4px;
}

.contact-section-public strong {
    color: #333;
    font-weight: 600;
    min-width: 60px;
}

/* Información de contacto público */
.student-contact-info-public {
    background: #fff5da;
    padding: 25px;
    border-radius: 8px;
    margin-top: 25px;
    border: 1px solid #00502E;
}

.student-contact-info-public h4 {
    margin-top: 0;
    color: #00502E;
}

/* Botón de editar contactos */
.student-actions-public {
    text-align: center;
    margin-top: 25px;
    padding: 20px;
    border-top: 1px solid #eee;
}

.edit-contacts-btn {
    background: linear-gradient(135deg, #00502E, #003d24);
    color: white;
    border: none;
    padding: 12px 24px;
    border-radius: 25px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 4px 12px rgba(0, 80, 46, 0.3);
    display: inline-flex;
    align-items: center;
    gap: 8px;
}

.edit-contacts-btn:hover {
    background: linear-gradient(135deg, #003d24, #002f1b);
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(0, 80, 46, 0.4);
}

.edit-contacts-btn i {
    font-size: 16px;
}

/* Modal de edición de contactos público */
.public-modal {
    position: fixed;
    z-index: 10000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.6);
    backdrop-filter: blur(3px);
}

.public-modal-content {
    background-color: #fff;
    margin: 5% auto;
    border-radius: 12px;
    width: 90%;
    max-width: 800px;
    max-height: 85vh;
    overflow-y: auto;
    box-shadow: 0 15px 50px rgba(0, 0, 0, 0.3);
    animation: modalSlideIn 0.3s ease;
}

.public-modal-header {
    background: linear-gradient(135deg, #00502E, #003d24);
    color: white;
    padding: 20px 30px;
    border-radius: 12px 12px 0 0;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.public-modal-header h3 {
    margin: 0;
    font-size: 20px;
    font-weight: 600;
}

.public-close {
    color: white;
    font-size: 28px;
    font-weight: bold;
    cursor: pointer;
    opacity: 0.8;
    transition: opacity 0.2s;
    line-height: 1;
}

.public-close:hover {
    opacity: 1;
}

/* Formulario público de contactos */
.public-form-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 25px;
    padding: 30px;
}

.public-form-section {
    background: #f8f9fa;
    padding: 20px;
    border-radius: 8px;
    border: 1px solid #e9ecef;
}

.public-form-section h4 {
    margin-top: 0;
    margin-bottom: 20px;
    color: #00502E;
    font-size: 16px;
    font-weight: 600;
    border-bottom: 2px solid #00502E;
    padding-bottom: 8px;
}

.public-form-group {
    margin-bottom: 15px;
}

.public-form-group label {
    display: block;
    margin-bottom: 5px;
    font-weight: 600;
    color: #333;
    font-size: 14px;
}

.public-form-group input {
    width: 100%;
    padding: 10px 12px;
    border: 1px solid #ddd;
    border-radius: 6px;
    font-size: 14px;
    transition: border-color 0.3s ease, box-shadow 0.3s ease;
    box-sizing: border-box;
    background-color: white;
}

.public-form-group input:focus {
    outline: none;
    border-color: #00502E;
    box-shadow: 0 0 0 3px rgba(0, 80, 46, 0.1);
}

/* Estados de validación público */
.public-form-group.error input {
    border-color: #dc3545;
}

.public-error-message {
    color: #dc3545;
    font-size: 12px;
    margin-top: 5px;
    display: block;
}

/* Acciones del formulario público */
.public-form-actions {
    text-align: center;
    padding: 20px 30px;
    border-top: 1px solid #eee;
    background: #f8f9fa;
    border-radius: 0 0 12px 12px;
}

.public-save-btn,
.public-cancel-btn {
    padding: 12px 24px;
    border-radius: 6px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    margin: 0 5px;
    border: none;
}

.public-save-btn {
    background: linear-gradient(135deg, #00502E, #003d24);
    color: white;
    box-shadow: 0 4px 12px rgba(0, 80, 46, 0.3);
}

.public-save-btn:hover {
    background: linear-gradient(135deg, #003d24, #002f1b);
    transform: translateY(-1px);
    box-shadow: 0 6px 16px rgba(0, 80, 46, 0.4);
}

.public-cancel-btn {
    background: #6c757d;
    color: white;
    box-shadow: 0 4px 12px rgba(108, 117, 125, 0.3);
}

.public-cancel-btn:hover {
    background: #5a6268;
    transform: translateY(-1px);
}

.public-save-btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    transform: none !important;
}

/* Responsive para vista pública */
@media (max-width: 768px) {
    #student-search-public-container {
        padding: 15px;
        margin: 10px;
    }
    
    .student-details-public {
        padding: 20px;
    }
    
    .student-info-grid-public {
        grid-template-columns: 1fr;
        gap: 15px;
        text-align: center;
    }
    
    .student-photo-public {
        order: -1;
    }
    
    .contact-grid-public {
        grid-template-columns: 1fr;
        gap: 15px;
    }
    
    .student-basic-info-public strong {
        min-width: auto;
        display: block;
        margin-bottom: 2px;
    }
    
    .contact-section-public strong {
        min-width: auto;
        display: block;
        margin-bottom: 2px;
    }
    
    .public-modal-content {
        width: 95%;
        margin: 2% auto;
    }
    
    .public-form-grid {
        grid-template-columns: 1fr;
        gap: 20px;
        padding: 20px;
    }
}

@media (max-width: 480px) {
    .student-details-public h3 {
        font-size: 20px;
    }
    
    .student-basic-info-public h4 {
        font-size: 18px;
    }
    
    .contact-section-public {
        padding: 12px 15px;
    }
    
    #student-search-public {
        font-size: 16px; /* Previene zoom en iOS */
    }
    
    .public-form-section {
        padding: 15px;
    }
    
    .edit-contacts-btn {
        padding: 10px 20px;
        font-size: 13px;
    }
}

/* Indicador de información limitada */
.student-details-public::before {
    content: "ℹ️ Información de alumnos inscritos - Solo contactos editables";
    display: block;
    background: #e8f5e8;
    color: #2d5a2d;
    padding: 8px 12px;
    border-radius: 6px;
    font-size: 14px;
    font-weight: 500;
    margin-bottom: 20px;
    border-left: 4px solid #00502E;
}

/* Estilos para impresión de vista pública */
@media print {
    #student-search-public-container {
        max-width: none;
        margin: 0;
        padding: 0;
    }
    
    .student-search-public-form {
        display: none;
    }
    
    .student-details-public {
        box-shadow: none;
        border: 1px solid #000;
    }
    
    .contact-section-public {
        break-inside: avoid;
    }
    
    .student-details-public::before {
        display: none;
    }
    
    .student-actions-public {
        display: none;
    }
}
/* AGREGAR AL FINAL del frontend.css */

/* =================================== */
/* ESTILOS PARA SHORTCODE PÚBLICO     */
/* =================================== */

#student-search-public-container {
    max-width: 700px;
    margin: 20px auto;
    padding: 20px;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
}

/* Formulario de búsqueda público */
.student-search-public-form {
    position: relative;
    margin-bottom: 30px;
}

.student-search-public-form label {
    display: block;
    margin-bottom: 8px;
    font-weight: 600;
    color: #333;
    font-size: 16px;
}

#student-search-public {
    width: 100%;
    padding: 12px 16px;
    font-size: 16px;
    border: 2px solid #ddd;
    border-radius: 8px;
    transition: border-color 0.3s ease, box-shadow 0.3s ease;
    background-color: #fff;
}

#student-search-public:focus {
    outline: none;
    border-color: #00502E;
    box-shadow: 0 0 0 3px rgba(0, 80, 46, 0.1);
}

/* Sugerencias de autocompletado público */
.student-suggestions-public {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: #fff;
    border: 1px solid #ddd;
    border-top: none;
    border-radius: 0 0 8px 8px;
    max-height: 200px;
    overflow-y: auto;
    z-index: 1000;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
    margin: 0;
    padding: 0;
    list-style: none;
}

.student-suggestions-public li {
    padding: 12px 16px;
    cursor: pointer;
    border-bottom: 1px solid #f0f0f0;
    transition: background-color 0.2s ease;
}

.student-suggestions-public li:hover,
.student-suggestions-public li.active {
    background-color: #f0f8f0;
}

.student-suggestions-public li:last-child {
    border-bottom: none;
}

.student-suggestions-public li.no-results {
    color: #666;
    font-style: italic;
    cursor: default;
    background-color: #f9f9f9;
}

.student-suggestions-public li.error-message {
    color: #dc3545;
    font-weight: 500;
    cursor: default;
    background-color: #fff5f5;
}

/* Detalles del alumno público */
.student-details-public {
    background: #fff;
    border-radius: 12px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
    padding: 30px;
    margin-top: 20px;
    animation: fadeInUp 0.5s ease;
    border: 2px solid #00502E;
}

.student-details-public h3 {
    color: #00502E;
    margin-bottom: 25px;
    font-size: 24px;
    font-weight: 700;
    border-bottom: 3px solid #00502E;
    padding-bottom: 10px;
}

.student-details-public h4 {
    color: #00502E;
    margin: 25px 0 15px 0;
    font-size: 20px;
    font-weight: 600;
}

.student-details-public h5 {
    color: #666;
    margin: 10px 0 3px 0;
    font-size: 16px;
    font-weight: 600;
}

/* Grid de información básica público */
.student-info-grid-public {
    display: grid;
    grid-template-columns: 150px 1fr;
    gap: 25px;
    margin-bottom: 30px;
    align-items: start;
}

.student-photo-public {
    text-align: center;
}

.student-photo-public img {
    width: 150px;
    height: 180px;
    object-fit: cover;
    border-radius: 8px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    border: 2px solid #00502E;
}

.student-basic-info-public h4 {
    color: #00502E;
    font-size: 20px;
    margin-bottom: 15px;
    margin-top: 0;
}

.student-basic-info-public p {
    margin: 8px 0;
    font-size: 15px;
    line-height: 1.4;
}

.student-basic-info-public strong {
    color: #333;
    font-weight: 600;
    display: inline-block;
    min-width: 140px;
}

/* Grid de contactos público */
.contact-grid-public {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 20px;
    margin-top: 20px;
}

.contact-section-public {
    background: #f0f8f0;
    padding: 15px 20px;
    border-radius: 8px;
    border-left: 4px solid #00502E;
}

.contact-section-public h5 {
    margin-top: 0;
    color: #00502E;
    font-size: 16px;
    font-weight: 700;
}

.contact-section-public p {
    margin: 6px 0;
    font-size: 14px;
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 4px;
}

.contact-section-public strong {
    color: #333;
    font-weight: 600;
    min-width: 60px;
}

/* Información de contacto público */
.student-contact-info-public {
    background: #fff5da;
    padding: 25px;
    border-radius: 8px;
    margin-top: 25px;
    border: 1px solid #00502E;
}

.student-contact-info-public h4 {
    margin-top: 0;
    color: #00502E;
}

/* Botón de editar contactos */
.student-actions-public {
    text-align: center;
    margin-top: 25px;
    padding: 20px;
    border-top: 1px solid #eee;
}

.edit-contacts-btn {
    background: linear-gradient(135deg, #00502E, #003d24);
    color: white;
    border: none;
    padding: 12px 24px;
    border-radius: 25px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 4px 12px rgba(0, 80, 46, 0.3);
    display: inline-flex;
    align-items: center;
    gap: 8px;
}

.edit-contacts-btn:hover {
    background: linear-gradient(135deg, #003d24, #002f1b);
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(0, 80, 46, 0.4);
}

.edit-contacts-btn i {
    font-size: 16px;
}

/* Modal de edición de contactos público */
.public-modal {
    position: fixed;
    z-index: 10000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.6);
    backdrop-filter: blur(3px);
}

.public-modal-content {
    background-color: #fff;
    margin: 5% auto;
    border-radius: 12px;
    width: 90%;
    max-width: 800px;
    max-height: 85vh;
    overflow-y: auto;
    box-shadow: 0 15px 50px rgba(0, 0, 0, 0.3);
    animation: modalSlideIn 0.3s ease;
}

.public-modal-header {
    background: linear-gradient(135deg, #00502E, #003d24);
    color: white;
    padding: 20px 30px;
    border-radius: 12px 12px 0 0;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.public-modal-header h3 {
    margin: 0;
    font-size: 20px;
    font-weight: 600;
}

.public-close {
    color: white;
    font-size: 28px;
    font-weight: bold;
    cursor: pointer;
    opacity: 0.8;
    transition: opacity 0.2s;
    line-height: 1;
}

.public-close:hover {
    opacity: 1;
}

/* Formulario público de contactos */
.public-form-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 25px;
    padding: 30px;
}

.public-form-section {
    background: #f8f9fa;
    padding: 20px;
    border-radius: 8px;
    border: 1px solid #e9ecef;
}

.public-form-section h4 {
    margin-top: 0;
    margin-bottom: 20px;
    color: #00502E;
    font-size: 16px;
    font-weight: 600;
    border-bottom: 2px solid #00502E;
    padding-bottom: 8px;
}

.public-form-group {
    margin-bottom: 15px;
}

.public-form-group label {
    display: block;
    margin-bottom: 5px;
    font-weight: 600;
    color: #333;
    font-size: 14px;
}

.public-form-group input {
    width: 100%;
    padding: 10px 12px;
    border: 1px solid #ddd;
    border-radius: 6px;
    font-size: 14px;
    transition: border-color 0.3s ease, box-shadow 0.3s ease;
    box-sizing: border-box;
    background-color: white;
}

.public-form-group input:focus {
    outline: none;
    border-color: #00502E;
    box-shadow: 0 0 0 3px rgba(0, 80, 46, 0.1);
}

/* Estados de validación público */
.public-form-group.error input {
    border-color: #dc3545;
}

.public-error-message {
    color: #dc3545;
    font-size: 12px;
    margin-top: 5px;
    display: block;
}

/* Acciones del formulario público */
.public-form-actions {
    text-align: center;
    padding: 20px 30px;
    border-top: 1px solid #eee;
    background: #f8f9fa;
    border-radius: 0 0 12px 12px;
}

.public-save-btn,
.public-cancel-btn {
    padding: 12px 24px;
    border-radius: 6px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    margin: 0 5px;
    border: none;
}

.public-save-btn {
    background: linear-gradient(135deg, #00502E, #003d24);
    color: white;
    box-shadow: 0 4px 12px rgba(0, 80, 46, 0.3);
}

.public-save-btn:hover {
    background: linear-gradient(135deg, #003d24, #002f1b);
    transform: translateY(-1px);
    box-shadow: 0 6px 16px rgba(0, 80, 46, 0.4);
}

.public-cancel-btn {
    background: #6c757d;
    color: white;
    box-shadow: 0 4px 12px rgba(108, 117, 125, 0.3);
}

.public-cancel-btn:hover {
    background: #5a6268;
    transform: translateY(-1px);
}

.public-save-btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    transform: none !important;
}

/* Responsive para vista pública */
@media (max-width: 768px) {
    #student-search-public-container {
        padding: 15px;
        margin: 10px;
    }
    
    .student-details-public {
        padding: 20px;
    }
    
    .student-info-grid-public {
        grid-template-columns: 1fr;
        gap: 15px;
        text-align: center;
    }
    
    .student-photo-public {
        order: -1;
    }
    
    .contact-grid-public {
        grid-template-columns: 1fr;
        gap: 15px;
    }
    
    .student-basic-info-public strong {
        min-width: auto;
        display: block;
        margin-bottom: 2px;
    }
    
    .contact-section-public strong {
        min-width: auto;
        display: block;
        margin-bottom: 2px;
    }
    
    .public-modal-content {
        width: 95%;
        margin: 2% auto;
    }
    
    .public-form-grid {
        grid-template-columns: 1fr;
        gap: 20px;
        padding: 20px;
    }
}

@media (max-width: 480px) {
    .student-details-public h3 {
        font-size: 20px;
    }
    
    .student-basic-info-public h4 {
        font-size: 18px;
    }
    
    .contact-section-public {
        padding: 12px 15px;
    }
    
    #student-search-public {
        font-size: 16px; /* Previene zoom en iOS */
    }
    
    .public-form-section {
        padding: 15px;
    }
    
    .edit-contacts-btn {
        padding: 10px 20px;
        font-size: 13px;
    }
}

/* Indicador de información limitada */
.student-details-public::before {
    content: "ℹ️ Información de alumnos inscritos - Solo contactos editables";
    display: block;
    background: #e8f5e8;
    color: #2d5a2d;
    padding: 8px 12px;
    border-radius: 6px;
    font-size: 14px;
    font-weight: 500;
    margin-bottom: 20px;
    border-left: 4px solid #00502E;
}

/* Estilos para impresión de vista pública */
@media print {
    #student-search-public-container {
        max-width: none;
        margin: 0;
        padding: 0;
    }
    
    .student-search-public-form {
        display: none;
    }
    
    .student-details-public {
        box-shadow: none;
        border: 1px solid #000;
    }
    
    .contact-section-public {
        break-inside: avoid;
    }
    
    .student-details-public::before {
        display: none;
    }
    
    .student-actions-public {
        display: none;
    }
}
/* En frontend.css, actualizar el grid de contactos público para 4 contactos */

/* Grid de contactos público - actualizar para 4 columnas */
.contact-grid-public {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); /* Reducir min-width para 4 contactos */
    gap: 20px;
    margin-top: 20px;
}

/* Formulario público de contactos - actualizar para 4 secciones */
.public-form-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); /* Reducir min-width para 4 secciones */
    gap: 25px;
    padding: 30px;
}

/* Responsive mejorado para 4 contactos */
@media (max-width: 1024px) {
    .contact-grid-public {
        grid-template-columns: repeat(2, 1fr); /* 2 columnas en tablet */
    }
    
    .public-form-grid {
        grid-template-columns: repeat(2, 1fr); /* 2 columnas en tablet */
    }
}

@media (max-width: 768px) {
    .contact-grid-public {
        grid-template-columns: repeat(2, 1fr); /* Mantener 2 columnas en móvil grande */
        gap: 15px;
    }
    
    .public-form-grid {
        grid-template-columns: 1fr; /* 1 columna en móvil */
        gap: 20px;
        padding: 20px;
    }
    
    .contact-section-public {
        padding: 12px 15px; /* Reducir padding en móvil */
    }
}

@media (max-width: 480px) {
    .contact-grid-public {
        grid-template-columns: 1fr; /* 1 columna en móvil pequeño */
        gap: 12px;
    }
    
    .contact-section-public {
        padding: 10px 12px;
    }
    
    .contact-section-public h5 {
        font-size: 14px;
        margin-bottom: 8px;
    }
    
    .contact-section-public p {
        font-size: 13px;
        margin: 4px 0;
    }
}
/* Estilos para sugerencias con foto */
.suggestion-with-photo {
    display: flex !important;
    align-items: center !important;
    gap: 12px !important;
    padding: 10px 16px !important;
}

.suggestion-thumbnail {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    object-fit: cover;
    border: 2px solid #00502E;
    flex-shrink: 0;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.suggestion-thumbnail-placeholder {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: linear-gradient(135deg, #f0f0f0, #e0e0e0);
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    border: 2px solid #ddd;
    color: #999;
    font-size: 18px;
}

.suggestion-name {
    flex: 1;
    font-size: 14px;
    font-weight: 500;
    color: #333;
}

.suggestion-with-photo:hover {
    background-color: #f0f8f0 !important;
}

.suggestion-with-photo:hover .suggestion-thumbnail {
    border-color: #00502E;
    transform: scale(1.05);
    transition: all 0.2s ease;
}

.suggestion-with-photo:hover .suggestion-name {
    color: #00502E;
}

/* Responsive para miniaturas */
@media (max-width: 480px) {
    .suggestion-thumbnail,
    .suggestion-thumbnail-placeholder {
        width: 32px;
        height: 32px;
    }
    
    .suggestion-thumbnail-placeholder i {
        font-size: 14px;
    }
    
    .suggestion-name {
        font-size: 13px;
    }
    
    .suggestion-with-photo {
        gap: 8px !important;
        padding: 8px 12px !important;
    }
}