/* Header */

.main-header {
    background: white;
    border-bottom: 1px solid #dbe8f5;
}


.top-navbar {

    display: flex;
    align-items: center;
    justify-content: center;

    flex-wrap: wrap;

}


.nav-item {

    padding: 25px 22px;

    text-decoration: none;

    color: #163a70;

    font-weight: 600;

    font-size: 15px;

    display: flex;

    gap: 8px;

    align-items: center;

}


.nav-item:hover {

    background: #eef6ff;

}


.nav-item.active {

    background: #005baa;

    color: white;

}



/* Quick Access Section */

.quick-access {

    width: 90%;
    max-width: 1200px;

    margin: 40px auto;

    padding: 50px 0;

    background: white;

}


.section-title {

    text-align: center;

    margin-bottom: 40px;

}


.section-title h2 {

    color: #006bb6;

    font-size: 32px;

}


.section-title p {

    color: #666;

    margin-top: 10px;

}



/* Access Cards */

.access-grid {

    display: grid;

    grid-template-columns: repeat(4, minmax(0,1fr));

    gap: 25px;

}



.access-card {

    background: #f8fbff;

    padding: 35px;

    min-height: 180px;

    border-radius: 12px;

    border: 1px solid #dbe8f5;

    text-decoration: none;

    transition: .3s;

}


.access-card:hover {

    transform: translateY(-5px);

    border-color:#006bb6;

}


.access-card h3 {

    color:#006bb6;

    margin-bottom:15px;

}


.access-card p {

    color:#555;

    line-height:1.6;

}



/* Databases */

.databases {

    width:90%;
    max-width:1200px;

    margin:40px auto;

    padding:50px 0;

    background:#f8fbff;

}


.database-grid {

    display:grid;

    grid-template-columns:repeat(3,minmax(0,1fr));

    gap:30px;

}



.database-card {

    background:white;

    height:180px;

    border-radius:12px;

    border:1px solid #dbe8f5;

    display:flex;

    flex-direction:column;

    justify-content:center;

    align-items:center;

    text-decoration:none;

    transition:.3s;

}



.database-card:hover {

    transform:translateY(-5px);

    border-color:#006bb6;

}



.database-card img {

    max-width:180px;

    max-height:90px;

    object-fit:contain;

}



.database-card h3 {

    color:#006bb6;

    font-size:17px;

}
/* Login Page Styling */
.login-wrapper {
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 70vh;
    padding: 40px 20px;
}

.login-card {
    background: #ffffff;
    border: 1px solid var(--kssh-border);
    border-radius: 16px;
    padding: 40px;
    width: 100%;
    max-width: 440px;
    box-shadow: var(--kssh-shadow);
}

.login-header {
    text-align: center;
    margin-bottom: 30px;
}

.login-header i {
    font-size: 42px;
    color: var(--kssh-blue);
    margin-bottom: 10px;
}

.login-header h2 {
    font-size: 22px;
    color: var(--kssh-dark-blue);
    font-weight: 800;
}

.login-header p {
    font-size: 13px;
    color: var(--kssh-muted);
}

.form-group {
    margin-bottom: 20px;
}

.form-group label {
    display: block;
    font-size: 14px;
    font-weight: 700;
    color: var(--kssh-dark-blue);
    margin-bottom: 8px;
}

.input-icon-wrapper {
    position: relative;
    display: flex;
    align-items: center;
}

.input-icon-wrapper i {
    position: absolute;
    left: 15px;
    color: var(--kssh-muted);
}

.input-icon-wrapper input {
    width: 100%;
    padding: 12px 15px 12px 42px;
    border: 1.5px solid var(--kssh-border);
    border-radius: 8px;
    font-family: 'Cairo', sans-serif;
    font-size: 14px;
    outline: none;
}

.btn-submit, .btn-save-resource {
    width: 100%;
    padding: 14px;
    background: var(--kssh-blue);
    color: white;
    border: none;
    border-radius: 8px;
    font-size: 15px;
    font-weight: 700;
    cursor: pointer;
    transition: var(--transition);
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 8px;
}

.btn-submit:hover, .btn-save-resource:hover {
    background: #004077;
}

/* Admin Dashboard Layout */
.admin-main-container {
    width: 90%;
    max-width: 1200px;
    margin: 40px auto;
}

.admin-header-bar {
    margin-bottom: 30px;
}

.admin-header-bar h2 {
    font-size: 24px;
    color: var(--kssh-dark-blue);
    font-weight: 800;
}

.admin-header-bar p {
    color: var(--kssh-muted);
    font-size: 14px;
}

.admin-grid-layout {
    display: grid;
    grid-template-columns: 1.2fr 0.8fr;
    gap: 30px;
}

.resource-form-card, .preview-box {
    background: #ffffff;
    border: 1px solid var(--kssh-border);
    border-radius: 14px;
    padding: 30px;
    box-shadow: var(--kssh-shadow);
}

.required {
    color: #dc3545;
}

.field-hint {
    font-size: 12px;
    color: var(--kssh-muted);
    margin-top: 4px;
    display: block;
}

.resource-form-card input, .resource-form-card select, .resource-form-card textarea {
    width: 100%;
    padding: 12px 15px;
    border: 1.5px solid var(--kssh-border);
    border-radius: 8px;
    font-family: 'Cairo', sans-serif;
    font-size: 14px;
    outline: none;
}

/* Live Example Card */
.preview-box h3 {
    font-size: 18px;
    color: var(--kssh-dark-blue);
    margin-bottom: 5px;
}

.preview-note {
    font-size: 13px;
    color: var(--kssh-muted);
    margin-bottom: 20px;
}

.example-card {
    border: 1px solid var(--kssh-border);
    border-radius: 10px;
    padding: 20px;
    background: #f8fafc;
    display: flex;
    gap: 15px;
}

.example-cover {
    width: 65px;
    height: 90px;
    background: #eef6ff;
    border: 1px dashed var(--kssh-blue);
    color: var(--kssh-blue);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 24px;
    border-radius: 6px;
    flex-shrink: 0;
}

.example-badge {
    background: var(--kssh-blue);
    color: white;
    font-size: 11px;
    padding: 2px 8px;
    border-radius: 4px;
    font-weight: 700;
}

.example-details h4 {
    font-size: 15px;
    color: var(--kssh-dark-blue);
    margin: 6px 0 4px;
}

.example-details p {
    font-size: 12px;
    color: var(--kssh-muted);
    line-height: 1.4;
    margin-bottom: 8px;
}

.example-link {
    font-size: 12px;
    font-weight: 700;
    color: var(--kssh-blue);
}
/* Modal التفاصيل والصور */
.modal-overlay {
    position: fixed;
    top: 0; left: 0; width: 100%; height: 100%;
    background: rgba(15, 23, 42, 0.75);
    backdrop-filter: blur(4px);
    display: none;
    justify-content: center;
    align-items: center;
    z-index: 1000;
    padding: 20px;
}

.modal-card {
    background: #ffffff;
    width: 100%;
    max-width: 700px;
    max-height: 90vh;
    overflow-y: auto;
    border-radius: 16px;
    padding: 28px;
    position: relative;
    box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.2);
    animation: fadeInModal 0.25s ease-out;
}

@keyframes fadeInModal {
    from { opacity: 0; transform: scale(0.95); }
    to { opacity: 1; transform: scale(1); }
}

.modal-close-btn {
    position: absolute;
    top: 16px; right: 20px;
    font-size: 28px;
    border: none; background: none;
    cursor: pointer; color: #64748b;
}

.modal-title { color: #0f172a; font-size: 1.3rem; margin-bottom: 6px; }
.modal-badge { display: inline-block; background: #e0f2fe; color: #0369a1; padding: 4px 10px; border-radius: 6px; font-size: 0.8rem; font-weight: 700; margin-bottom: 14px; }
.modal-description { color: #334155; font-size: 0.95rem; line-height: 1.6; margin-bottom: 20px; white-space: pre-line; }

/* ضبط مقاسات النافذة المنبثقة والصور */
.main-image-wrapper {
    width: 100%;
    height: 220px; /* تقليل الارتفاع ليتناسق مع الوصف */
    border-radius: 10px;
    overflow: hidden;
    background: #f8fafc;
    margin-bottom: 12px;
    border: 1px solid #e2e8f0;
    display: flex;
    align-items: center;
    justify-content: center;
}

.main-image-wrapper img {
    max-width: 100%;
    max-height: 100%;
    object-fit: contain; /* إظهار الصورة كاملة دون قص أو تمديد زاد عن اللزوم */
    cursor: zoom-in;
}

.thumbnails-container {
    display: flex;
    gap: 8px;
    overflow-x: auto;
    padding: 4px 0;
}

.thumb-img {
    width: 55px;
    height: 55px;
    object-fit: cover;
    border-radius: 6px;
    cursor: pointer;
    border: 2px solid transparent;
    opacity: 0.6;
    transition: all 0.2s ease;
}

.thumb-img.active, .thumb-img:hover {
    border-color: #0284c7;
    opacity: 1;
}

.fullscreen-overlay {
    position: fixed;
    top: 0; left: 0; width: 100%; height: 100%;
    background: rgba(0, 0, 0, 0.9);
    display: none;
    justify-content: center;
    align-items: center;
    z-index: 2000;
}
.fullscreen-overlay img { max-width: 90%; max-height: 90%; border-radius: 8px; }
.fullscreen-close { position: absolute; top: 20px; right: 30px; color: #fff; font-size: 40px; cursor: pointer; }