/* Modern Styles for Solicitud Matricula */

/* Darker Background Styling */
/* Use an overlay to darken the background images set by JS */
body#bodyfondo::before {
    content: "";
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.6);
    /* 50% opacity black overlay */
    z-index: -1;
    /* Behind content */
    pointer-events: none;
    /* Allow clicking through if needed, though it's background */
}

/* Ensure the body itself has a fallback color */
body#bodyfondo {
    background-color: #2c3e50;
    color: #333;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
}

/* External Title Styling */
.solicitud-title {
    color: #fff;
    text-align: center;
    font-weight: 300;
    font-size: 2.5rem;
    margin-bottom: 25px;
    margin-top: 10px;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.5);
}

.solicitud-title i {
    opacity: 0.9;
    margin-right: 10px;
}

/* Larger Form Window */
.modal-dialog.modal-lg {
    width: 90% !important;
    max-width: 1200px;
    margin: 30px auto;
}

/* Modern Card/Modal Styling */
.modal-content {
    border: none;
    border-radius: 15px;
    /* More rounded */
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.4);
    overflow: hidden;
    background-color: #fff;
    padding-top: 20px;
    /* Space top since header is gone */
}

/* Wizard Improvements */
.wizard {
    padding: 0 20px 20px 20px;
}

.wizard-inner {
    margin-bottom: 40px;
}

/* Connecting line adjustments */
.connecting-line {
    /* Adjust based on new tab size */
    background: #e9ecef;
    height: 4px;
    /* Thicker line */
    border-radius: 2px;
}

/* Tab modernization */
span.round-tab {
    width: 80px;
    height: 80px;
    line-height: 80px;
    font-size: 32px;
    background: #fff;
    border: 2px solid #dde1e6;
    color: #a2aab3;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.05);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.wizard li.active span.round-tab {
    background: #fff;
    border-color: #337ab7;
    /* Bootstrap primary or custom color */
    color: #337ab7;
    box-shadow: 0 0 0 5px rgba(51, 122, 183, 0.15);
    /* Ring effect */
    transform: scale(1.1);
}

.wizard li.active span.round-tab i {
    color: #337ab7;
}

span.round-tab:hover {
    border-color: #b0b8c1;
    color: #555;
    box-shadow: 0 6px 15px rgba(0, 0, 0, 0.1);
}

/* Form Controls */
.form-control {
    border-radius: 8px;
    height: 48px;
    /* Taller inputs for modern feel */
    box-shadow: none;
    border: 1px solid #dfe3e8;
    background-color: #fcfcfc;
    font-size: 14px;
    transition: all 0.2s ease;
}

.form-control:focus {
    box-shadow: 0 0 0 4px rgba(51, 122, 183, 0.1);
    border-color: #337ab7;
    background-color: #fff;
}

/* Labels */
label.control-label,
label {
    font-weight: 600;
    color: #34495e;
    margin-bottom: 8px;
    font-size: 13px;
    letter-spacing: 0.3px;
    text-transform: uppercase;
}

/* Buttons */
.btn-primary {
    background: linear-gradient(135deg, #337ab7 0%, #296294 100%);
    border: none;
    padding: 12px 30px;
    font-weight: 600;
    border-radius: 30px;
    /* Pill shape */
    box-shadow: 0 4px 15px rgba(51, 122, 183, 0.35);
    transition: transform 0.2s, box-shadow 0.2s;
    font-size: 15px;
}

.btn-primary:hover {
    background: linear-gradient(135deg, #3d8ac9 0%, #2e6ea5 100%);
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(51, 122, 183, 0.45);
}

.btn-primary:active {
    transform: translateY(0);
}

.btn-default {
    background: #f8f9fa;
    border: 1px solid #e9ecef;
    color: #212529;
    padding: 12px 30px;
    font-weight: 600;
    border-radius: 30px;
}

.btn-default:hover {
    background: #e2e6ea;
    border-color: #dae0e5;
}

/* Section/Panel specific */
.panel {
    border-radius: 12px;
    box-shadow: none;
    border: 1px solid #edf2f7;
    background: #fff;
    margin-bottom: 25px;
}

.panel-primary {
    border-color: #edf2f7;
}

.panel-info {
    border-color: #edf2f7;
}

/* Remove panel heading backgrounds for cleaner look */
.panel-primary>.panel-heading,
.panel-info>.panel-heading {
    background-color: transparent;
    border-bottom: 1px solid #edf2f7;
    color: #333;
    font-weight: bold;
}

.panel-body {
    padding: 25px;
}

/* Drop Zone */
.drop-area {
    border: 2px dashed #cfd7df;
    border-radius: 12px;
    background-color: #fbfbfc;
    transition: all 0.3s ease;
}

.drop-area:hover {
    border-color: #337ab7;
    background-color: #f0f7fc;
}



.wizard li.active:after {
    content: " ";
    position: absolute;
    left: 48%;
    opacity: 1;
    margin: 0 auto;
    bottom: 0px;
    border: 10px solid transparent;
    border-bottom-color: #5bc0de;
}

/* Mobile Responsiveness */
@media (max-width: 768px) {

    /* Maximize Modal Width */
    .modal-dialog.modal-lg {
        width: 95% !important;
        margin: 10px auto;
    }

    .modal-content {
        padding-top: 15px;
    }

    /* Shrink Title */
    .solicitud-title {
        font-size: 1.8rem;
        margin-bottom: 15px;
    }

    /* Shrink Wizard Tabs */
    span.round-tab {
        width: 50px;
        height: 50px;
        line-height: 50px;
        font-size: 20px;
    }

    /* Adjust active arrow */
    .wizard li.active:after {
        border-width: 8px;
        /* Slightly smaller arrow */
        left: 45%;
        /* approximate centering adjustment */
    }

    /* Reduce padding in panel body */
    .panel-body {
        padding: 15px;
    }

    /* Ensure wizard container doesn't overflow */
    .wizard {
        padding: 0 10px 10px 10px;
    }

    .wizard-inner {
        margin-bottom: 20px;
    }


    .btn {
        margin-top: 10px;
        padding: 6px 12px;
    }
}

/* Modern Dropzone Styles */
.modern-dropzone {
    border: 2px dashed #cbd5e0;
    border-radius: 12px;
    padding: 30px;
    min-height: 200px;
    background: linear-gradient(135deg, #f8fafc 0%, #f1f5f9 100%);
    cursor: pointer;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.modern-dropzone:hover {
    border-color: #3b82f6;
    background: linear-gradient(135deg, #eff6ff 0%, #dbeafe 100%);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(59, 130, 246, 0.15);
}

.dropzone-dragging {
    border-color: #10b981 !important;
    background: linear-gradient(135deg, #ecfdf5 0%, #d1fae5 100%) !important;
    box-shadow: 0 0 0 4px rgba(16, 185, 129, 0.1) !important;
}

.dropzone-content {
    text-align: center;
    padding: 20px;
}

.dropzone-icon {
    color: #94a3b8;
    margin-bottom: 15px;
    transition: all 0.3s ease;
}

.modern-dropzone:hover .dropzone-icon {
    color: #3b82f6;
    transform: scale(1.1);
}

.dropzone-title {
    color: #334155;
    font-weight: 600;
    margin: 10px 0;
}

.dropzone-subtitle {
    color: #64748b;
    font-size: 14px;
    margin: 0;
}

.files-preview {
    width: 100%;
}

.preview-header {
    background: white;
    padding: 12px 16px;
    border-radius: 8px;
    margin-bottom: 15px;
    font-weight: 600;
    color: #475569;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}

.preview-header .btn {
    margin-top: 10px;
    padding: 6px 12px;
}


.preview-header i {
    color: #3b82f6;
    margin-right: 8px;
}

.files-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
    gap: 15px;
}

.file-card {
    background: white;
    border-radius: 10px;
    overflow: hidden;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    transition: all 0.3s ease;
    position: relative;
}

.file-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.15);
}

.file-delete-btn {
    position: absolute;
    top: 8px;
    right: 8px;
    width: 28px;
    height: 28px;
    border-radius: 50%;
    background: rgba(239, 68, 68, 0.95);
    border: none;
    color: white;
    cursor: pointer;
    z-index: 10;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: all 0.3s ease;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
}

.file-card:hover .file-delete-btn {
    opacity: 1;
}

.file-delete-btn:hover {
    background: #dc2626;
    transform: scale(1.1);
}

.file-preview-link {
    display: block;
    text-decoration: none;
    position: relative;
}

.file-preview {
    width: 100%;
    height: 120px;
    overflow: hidden;
    background: #f1f5f9;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
}

.file-preview img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s ease;
}

.file-preview-link:hover .file-preview img {
    transform: scale(1.05);
}

.file-preview-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(59, 130, 246, 0.9);
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: opacity 0.3s ease;
    color: white;
}

.file-preview-link:hover .file-preview-overlay {
    opacity: 1;
}

.file-icon-preview {
    color: #94a3b8;
}

.file-info {
    padding: 10px;
    background: white;
}

.file-name {
    font-size: 13px;
    font-weight: 500;
    color: #334155;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    margin-bottom: 4px;
}

.file-size {
    font-size: 12px;
    color: #64748b;
}

.add-more-card {
    background: linear-gradient(135deg, #f8fafc 0%, #f1f5f9 100%);
    border: 2px dashed #cbd5e0;
    border-radius: 10px;
    min-height: 180px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.3s ease;
    color: #94a3b8;
}

.add-more-card:hover {
    border-color: #3b82f6;
    background: linear-gradient(135deg, #eff6ff 0%, #dbeafe 100%);
    color: #3b82f6;
    transform: translateY(-2px);
}

.add-more-card i {
    margin-bottom: 8px;
}

.add-more-card p {
    margin: 0;
    font-weight: 500;
    font-size: 14px;
}

.align_middle {
    vertical-align: middle !important;
}

/* Styles for File Preview Modal */
.preview-modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.85);
    z-index: 9999;
    display: none;
    /* Hidden by default */
    justify-content: center;
    align-items: center;
}

.preview-modal-overlay.active {
    display: flex;
    /* Show only when active */
}

.preview-modal-content {
    position: relative;
    max-width: 90%;
    max-height: 90%;
    box-shadow: 0 0 20px rgba(0, 0, 0, 0.5);
    background: transparent;
    border-radius: 4px;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
}

.preview-modal-close-btn {
    position: absolute;
    top: 5px;
    /* Moved inside */
    right: 5px;
    /* Moved inside */
    width: 35px;
    height: 35px;
    border-radius: 50%;
    background-color: #d9534f;
    /* Bootstrap danger */
    color: white;
    border: 2px solid white;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.3);
    cursor: pointer;
    font-size: 16px;
    display: flex;
    justify-content: center;
    align-items: center;
    transition: transform 0.2s, background-color 0.2s;
    z-index: 10001;
    outline: none;
}

.preview-modal-close-btn:hover {
    background-color: #c9302c;
    transform: scale(1.1);
}

.preview-modal-content img {
    max-width: 100%;
    max-height: 85vh;
    object-fit: contain;
    display: block;
    background-color: white;
    /* Ensure background for transparant images */
}

.preview-modal-content iframe {
    width: 80vw;
    height: 85vh;
    border: none;
    background: white;
}

/* Mobile adjustments for modal */
@media (max-width: 768px) {
    .preview-modal-content {
        max-width: 95%;
        /* Wider on mobile */
    }

    .preview-modal-content iframe {
        width: 95vw;
    }

    .preview-modal-close-btn {
        top: 5px;
        right: 5px;
        width: 30px;
        height: 30px;
        font-size: 14px;
    }
}