/* ============================================================
   Soran University - Staff Portal
   Shared Theme (based on the design template)
   ============================================================ */

:root {
    --primary: #1e3a5f;
    --primary-light: #2c5282;
    --primary-dark: #15293f;
    --secondary: #d4af37;
    --accent: #e67e22;
    --text-dark: #1a202c;
    --text-light: #718096;
    --bg-light: #f7fafc;
    --bg-soft: #edf2f7;
    --white: #ffffff;
    --danger: #e53e3e;
    --success: #38a169;
    --shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
    --shadow-lg: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
    --radius: 12px;
    --radius-lg: 20px;
}

* { margin: 0; padding: 0; box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
    font-family: 'Inter', sans-serif;
    color: var(--text-dark);
    background: var(--bg-light);
    overflow-x: hidden;
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
}

/* ---------- Navigation ---------- */
.navbar {
    position: fixed;
    top: 0;
    width: 100%;
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    z-index: 1000;
    padding: 1rem 5%;
    display: flex;
    justify-content: space-between;
    align-items: center;
    box-shadow: var(--shadow);
    transition: all 0.3s ease;
}

.logo {
    display: flex;
    align-items: center;
    gap: 1rem;
    text-decoration: none;
    color: inherit;
}

.logo-icon {
    width: 50px;
    height: 50px;
    background: linear-gradient(135deg, var(--primary) 0%, var(--primary-light) 100%);
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--white);
    font-size: 1.25rem;
    font-weight: 700;
    overflow: hidden;
}
.logo-icon img { width: 100%; height: 100%; object-fit: cover; }

.logo-text h1 {
    font-family: 'Playfair Display', serif;
    font-size: 1.4rem;
    color: var(--primary);
    line-height: 1.2;
    font-weight: 600;
}

.logo-text span {
    font-size: 0.7rem;
    color: var(--text-light);
    text-transform: uppercase;
    letter-spacing: 2px;
    display: block;
}

.nav-links {
    display: flex;
    gap: 2.5rem;
    list-style: none;
    align-items: center;
}

.nav-links a {
    text-decoration: none;
    color: var(--text-dark);
    font-weight: 500;
    font-size: 0.95rem;
    position: relative;
    transition: color 0.3s ease;
}

.nav-links a::after {
    content: '';
    position: absolute;
    bottom: -5px;
    left: 0;
    width: 0;
    height: 2px;
    background: var(--secondary);
    transition: width 0.3s ease;
}

.nav-links a:hover::after,
.nav-links a.active::after { width: 100%; }

.nav-links a:hover,
.nav-links a.active { color: var(--primary); }

.nav-actions {
    display: flex;
    gap: 1rem;
    align-items: center;
}

/* ---------- Buttons ---------- */
.btn {
    padding: 0.75rem 1.5rem;
    border: none;
    border-radius: 8px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    font-size: 0.95rem;
    font-family: inherit;
}

.btn-primary {
    background: var(--primary);
    color: var(--white);
}
.btn-primary:hover {
    background: var(--primary-light);
    transform: translateY(-2px);
    box-shadow: var(--shadow-lg);
    color: var(--white);
}

.btn-secondary {
    background: transparent;
    color: var(--primary);
    border: 2px solid var(--primary);
}
.btn-secondary:hover {
    background: var(--primary);
    color: var(--white);
}

.btn-gold {
    background: var(--secondary);
    color: var(--primary);
}
.btn-gold:hover { background: #b8941d; }

.btn-block { width: 100%; }

/* ---------- Hero ---------- */
.hero {
    margin-top: 80px;
    padding: 5rem 5% 4rem;
    background: linear-gradient(135deg, var(--primary) 0%, var(--primary-light) 50%, #1a365d 100%);
    color: var(--white);
    position: relative;
    overflow: hidden;
}
.hero::before {
    content: '';
    position: absolute;
    top: -50%;
    right: -10%;
    width: 600px;
    height: 600px;
    background: rgba(212, 175, 55, 0.1);
    border-radius: 50%;
    animation: float 20s infinite ease-in-out;
}
@keyframes float {
    0%, 100% { transform: translate(0, 0) rotate(0deg); }
    50% { transform: translate(30px, 50px) rotate(180deg); }
}
.hero-content {
    max-width: 1200px;
    margin: 0 auto;
    position: relative;
    z-index: 1;
}
.hero h2 {
    font-family: 'Playfair Display', serif;
    font-size: 3.25rem;
    margin-bottom: 1.25rem;
    line-height: 1.2;
    font-weight: 600;
}
.hero p {
    font-size: 1.15rem;
    opacity: 0.9;
    max-width: 650px;
    margin-bottom: 2rem;
}

/* ---------- Search Box ---------- */
.search-box {
    background: var(--white);
    padding: 1.25rem;
    border-radius: 16px;
    box-shadow: var(--shadow-lg);
    display: flex;
    gap: 0.75rem;
    max-width: 900px;
    margin-top: 2rem;
    flex-wrap: wrap;
}
.search-input {
    flex: 1 1 250px;
    padding: 0.85rem 1.25rem;
    border: 2px solid #e2e8f0;
    border-radius: 10px;
    font-size: 1rem;
    transition: border-color 0.3s ease;
    color: var(--text-dark);
    font-family: inherit;
}
.search-input:focus { outline: none; border-color: var(--primary); }

.search-select {
    padding: 0.85rem 1rem;
    border: 2px solid #e2e8f0;
    border-radius: 10px;
    font-size: 0.95rem;
    background: var(--white);
    cursor: pointer;
    color: var(--text-dark);
    font-family: inherit;
    min-width: 150px;
}
.search-select:focus { outline: none; border-color: var(--primary); }

/* ---------- Stats ---------- */
.stats {
    padding: 4rem 5%;
    background: var(--white);
}
.stats-grid {
    max-width: 1200px;
    margin: 0 auto;
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 1.5rem;
}
.stat-card {
    text-align: center;
    padding: 2rem 1.5rem;
    border-radius: 16px;
    background: var(--bg-light);
    transition: transform 0.3s ease;
}
.stat-card:hover { transform: translateY(-5px); }
.stat-number {
    font-size: 2.75rem;
    font-weight: 700;
    color: var(--primary);
    font-family: 'Playfair Display', serif;
    line-height: 1.1;
}
.stat-label {
    color: var(--text-light);
    font-weight: 500;
    margin-top: 0.5rem;
    font-size: 0.95rem;
}

/* ---------- Section header ---------- */
.section-header {
    text-align: center;
    margin-bottom: 3rem;
}
.section-header h3 {
    font-family: 'Playfair Display', serif;
    font-size: 2.5rem;
    color: var(--primary);
    margin-bottom: 0.75rem;
    font-weight: 600;
}
.section-header p {
    color: var(--text-light);
    font-size: 1.05rem;
}

/* ---------- Directory ---------- */
.directory {
    padding: 5rem 5%;
    max-width: 1400px;
    margin: 0 auto;
}
.view-toggle {
    display: flex;
    justify-content: center;
    gap: 0.75rem;
    margin-bottom: 2.5rem;
    flex-wrap: wrap;
}
.toggle-btn {
    padding: 0.7rem 1.25rem;
    border: 2px solid #e2e8f0;
    background: var(--white);
    border-radius: 8px;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    transition: all 0.3s ease;
    font-weight: 500;
    color: var(--text-dark);
    font-family: inherit;
    font-size: 0.95rem;
}
.toggle-btn:hover { border-color: var(--primary); }
.toggle-btn.active {
    background: var(--primary);
    color: var(--white);
    border-color: var(--primary);
}

/* ---------- Staff Grid ---------- */
.staff-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 1.75rem;
}
.staff-card {
    background: var(--white);
    border-radius: 20px;
    overflow: hidden;
    box-shadow: var(--shadow);
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    display: flex;
    flex-direction: column;
}
.staff-card:hover {
    transform: translateY(-8px);
    box-shadow: var(--shadow-lg);
}
.staff-image {
    height: 260px;
    background: linear-gradient(135deg, var(--primary) 0%, var(--primary-light) 100%);
    position: relative;
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
}
.staff-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s ease;
}
.staff-card:hover .staff-image img { transform: scale(1.07); }
.staff-image .placeholder-icon {
    font-size: 6rem;
    color: rgba(255, 255, 255, 0.5);
}
.staff-badge {
    position: absolute;
    top: 1rem;
    right: 1rem;
    background: var(--secondary);
    color: var(--primary);
    padding: 0.4rem 0.85rem;
    border-radius: 20px;
    font-size: 0.7rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1px;
    z-index: 2;
}
.staff-info {
    padding: 1.4rem;
    flex: 1;
    display: flex;
    flex-direction: column;
}
.staff-name {
    font-family: 'Playfair Display', serif;
    font-size: 1.25rem;
    color: var(--primary);
    margin-bottom: 0.2rem;
    line-height: 1.3;
    font-weight: 600;
}
.staff-name a {
    color: inherit;
    text-decoration: none;
    transition: color 0.3s ease;
}
.staff-name a:hover { color: var(--accent); }
.staff-name-krd {
    font-size: 0.95rem;
    color: var(--text-light);
    margin-bottom: 0.6rem;
    direction: rtl;
    font-weight: 500;
}
.staff-role {
    color: var(--accent);
    font-weight: 600;
    font-size: 0.8rem;
    margin-bottom: 0.6rem;
    text-transform: uppercase;
    letter-spacing: 1px;
}
.staff-dept {
    color: var(--text-light);
    font-size: 0.9rem;
    margin-bottom: 1rem;
    display: flex;
    align-items: center;
    gap: 0.4rem;
}
.staff-contact {
    display: flex;
    gap: 0.6rem;
    margin-top: auto;
    padding-top: 0.5rem;
}
.contact-icon {
    width: 38px;
    height: 38px;
    border-radius: 10px;
    background: var(--bg-light);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--primary);
    transition: all 0.3s ease;
    cursor: pointer;
    text-decoration: none;
    font-size: 0.9rem;
    border: none;
    font-family: inherit;
}
.contact-icon:hover {
    background: var(--primary);
    color: var(--white);
    transform: scale(1.1);
}

/* ---------- Staff List View ---------- */
.staff-list { display: none; flex-direction: column; gap: 1rem; }
.staff-list.active { display: flex; }
.list-item {
    background: var(--white);
    border-radius: 16px;
    padding: 1.25rem;
    display: flex;
    align-items: center;
    gap: 1.5rem;
    box-shadow: var(--shadow);
    transition: all 0.3s ease;
}
.list-item:hover {
    transform: translateX(6px);
    box-shadow: var(--shadow-lg);
}
.list-image {
    width: 90px;
    height: 90px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--primary) 0%, var(--primary-light) 100%);
    overflow: hidden;
    flex-shrink: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--white);
    font-size: 2.5rem;
}
.list-image img { width: 100%; height: 100%; object-fit: cover; }
.list-info { flex: 1; min-width: 0; }
.list-info h4 {
    font-family: 'Playfair Display', serif;
    font-size: 1.2rem;
    color: var(--primary);
    margin-bottom: 0.2rem;
    font-weight: 600;
}
.list-info h4 a { color: inherit; text-decoration: none; }
.list-info h4 a:hover { color: var(--accent); }
.list-role {
    color: var(--accent);
    font-weight: 600;
    font-size: 0.8rem;
    text-transform: uppercase;
    letter-spacing: 1px;
    margin-bottom: 0.4rem;
}
.list-meta {
    display: flex;
    gap: 1.5rem;
    color: var(--text-light);
    font-size: 0.85rem;
    flex-wrap: wrap;
}
.list-meta span { display: inline-flex; align-items: center; gap: 0.3rem; }
.list-actions { display: flex; gap: 0.6rem; flex-shrink: 0; }

/* ---------- Pagination ---------- */
.pagination-wrap {
    display: flex;
    justify-content: center;
    margin-top: 3rem;
    flex-wrap: wrap;
    gap: 0.4rem;
}
.page-btn {
    min-width: 40px;
    height: 40px;
    padding: 0 0.75rem;
    border: 2px solid #e2e8f0;
    background: var(--white);
    border-radius: 8px;
    cursor: pointer;
    color: var(--text-dark);
    font-weight: 500;
    transition: all 0.3s ease;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-family: inherit;
}
.page-btn:hover:not(:disabled) { border-color: var(--primary); color: var(--primary); }
.page-btn.active {
    background: var(--primary);
    color: var(--white);
    border-color: var(--primary);
}
.page-btn:disabled { opacity: 0.4; cursor: not-allowed; }

.no-results {
    text-align: center;
    padding: 4rem 2rem;
    color: var(--text-light);
    grid-column: 1 / -1;
}
.no-results i {
    font-size: 3rem;
    margin-bottom: 1rem;
    color: var(--text-light);
    opacity: 0.5;
}

/* ---------- Departments ---------- */
.departments {
    padding: 5rem 5%;
    background: var(--white);
}
.dept-grid {
    max-width: 1200px;
    margin: 0 auto;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(230px, 1fr));
    gap: 1.25rem;
}
.dept-card {
    background: var(--bg-light);
    padding: 1.75rem 1.5rem;
    border-radius: 16px;
    text-align: center;
    transition: all 0.4s ease;
    cursor: pointer;
    border: 2px solid transparent;
    text-decoration: none;
    color: inherit;
    display: block;
}
.dept-card:hover {
    background: var(--primary);
    color: var(--white);
    transform: translateY(-5px);
    border-color: var(--secondary);
}
.dept-icon {
    font-size: 2.25rem;
    margin-bottom: 0.85rem;
    color: var(--secondary);
}
.dept-name {
    font-weight: 600;
    font-size: 1rem;
    margin-bottom: 0.4rem;
    font-family: 'Playfair Display', serif;
}
.dept-count {
    font-size: 0.85rem;
    opacity: 0.8;
}

/* ---------- Footer ---------- */
footer.site-footer {
    background: var(--primary);
    color: var(--white);
    padding: 4rem 5% 2rem;
    margin-top: auto;
}
.footer-content {
    max-width: 1200px;
    margin: 0 auto;
    display: grid;
    grid-template-columns: 2fr 1fr 1fr 1fr;
    gap: 3rem;
    margin-bottom: 3rem;
}
.footer-brand h3 {
    font-family: 'Playfair Display', serif;
    font-size: 1.6rem;
    margin-bottom: 1rem;
    font-weight: 600;
}
.footer-brand p {
    opacity: 0.8;
    line-height: 1.6;
}
.footer-links h4 {
    font-size: 0.95rem;
    margin-bottom: 1.25rem;
    color: var(--secondary);
    text-transform: uppercase;
    letter-spacing: 1px;
}
.footer-links ul { list-style: none; }
.footer-links li { margin-bottom: 0.65rem; }
.footer-links a {
    color: rgba(255, 255, 255, 0.8);
    text-decoration: none;
    transition: color 0.3s ease;
    font-size: 0.95rem;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
}
.footer-links a:hover { color: var(--secondary); }
.footer-bottom {
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    padding-top: 1.75rem;
    text-align: center;
    opacity: 0.7;
    font-size: 0.9rem;
}

/* ---------- Modal ---------- */
.modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.55);
    z-index: 2000;
    justify-content: center;
    align-items: center;
    backdrop-filter: blur(5px);
    -webkit-backdrop-filter: blur(5px);
    padding: 1rem;
}
.modal.active { display: flex; }
.modal-content {
    background: var(--white);
    border-radius: 24px;
    max-width: 600px;
    width: 100%;
    max-height: 90vh;
    overflow-y: auto;
    position: relative;
    animation: modalSlide 0.4s ease;
}
@keyframes modalSlide {
    from { opacity: 0; transform: translateY(40px); }
    to   { opacity: 1; transform: translateY(0); }
}
.modal-close {
    position: absolute;
    top: 1.25rem;
    right: 1.25rem;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: rgba(255,255,255,0.2);
    border: none;
    cursor: pointer;
    color: var(--white);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.1rem;
    transition: all 0.3s ease;
    z-index: 10;
}
.modal-close:hover { background: rgba(255,255,255,0.4); }
.modal-header {
    padding: 2rem;
    background: linear-gradient(135deg, var(--primary) 0%, var(--primary-light) 100%);
    color: var(--white);
    text-align: center;
}
.modal-avatar {
    width: 120px;
    height: 120px;
    border-radius: 50%;
    border: 4px solid var(--secondary);
    margin: 0 auto 1rem;
    overflow: hidden;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 3rem;
}
.modal-avatar img { width: 100%; height: 100%; object-fit: cover; }
.modal-header h2 {
    font-family: 'Playfair Display', serif;
    font-size: 1.6rem;
    margin-bottom: 0.25rem;
}
.modal-header .modal-role { color: var(--secondary); font-weight: 600; font-size: 0.95rem; }
.modal-body { padding: 2rem; }
.modal-body h4 {
    color: var(--primary);
    margin-bottom: 0.85rem;
    font-family: 'Playfair Display', serif;
    font-size: 1.15rem;
}
.modal-body p { color: var(--text-light); line-height: 1.6; margin-bottom: 1.25rem; }
.modal-contact { display: flex; flex-direction: column; gap: 0.6rem; margin-bottom: 1rem; }
.modal-contact-item {
    display: flex;
    align-items: center;
    gap: 0.85rem;
    padding: 0.85rem 1rem;
    background: var(--bg-light);
    border-radius: 10px;
    transition: all 0.3s ease;
    color: var(--text-dark);
    text-decoration: none;
    font-size: 0.95rem;
}
.modal-contact-item:hover { background: var(--primary); color: var(--white); }
.modal-contact-item i { width: 20px; text-align: center; color: var(--primary); transition: color 0.3s; }
.modal-contact-item:hover i { color: var(--white); }
.modal-actions {
    display: flex;
    gap: 0.6rem;
    margin-top: 1.5rem;
    flex-wrap: wrap;
}

/* ---------- Mobile menu ---------- */
.mobile-menu-btn {
    display: none;
    background: none;
    border: none;
    font-size: 1.5rem;
    color: var(--primary);
    cursor: pointer;
    padding: 0.5rem;
}

/* ---------- Reveal ---------- */
.reveal {
    opacity: 0;
    transform: translateY(30px);
    transition: all 0.7s ease;
}
.reveal.active { opacity: 1; transform: translateY(0); }

/* ---------- Generic content shell (used by profile / edit / dashboard pages) ---------- */
.page-shell {
    min-height: calc(100vh - 80px);
    padding-top: 100px;
    padding-bottom: 3rem;
}
.container-narrow { max-width: 1200px; margin: 0 auto; padding: 0 5%; }
.card {
    background: var(--white);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow);
    padding: 2rem;
}

/* ---------- Responsive ---------- */
@media (max-width: 1024px) {
    .stats-grid { grid-template-columns: repeat(2, 1fr); }
    .footer-content { grid-template-columns: 1fr 1fr; }
    .hero h2 { font-size: 2.75rem; }
}

@media (max-width: 768px) {
    .nav-links { display: none; position: absolute; top: 100%; left: 0; right: 0; background: var(--white); flex-direction: column; padding: 1rem 0; box-shadow: var(--shadow); gap: 0; }
    .nav-links.mobile-open { display: flex; }
    .nav-links li { width: 100%; text-align: center; padding: 0.75rem 0; }
    .mobile-menu-btn { display: block; }
    .hero { padding: 4rem 5% 3rem; }
    .hero h2 { font-size: 2rem; }
    .hero p { font-size: 1rem; }
    .search-box {
        flex-direction: column;
        padding: 0.75rem;
        gap: 0.5rem;
        border-radius: 12px;
        margin-top: 1.25rem;
    }
    .search-input, .search-select {
        width: 100%;
        padding: 0.7rem 0.85rem;
        font-size: 0.9rem;
        border-radius: 8px;
        min-width: 0;
    }
    .search-select { background-position: right 0.6rem center; }
    .stats-grid { grid-template-columns: 1fr 1fr; }
    .staff-grid { grid-template-columns: 1fr; }
    .list-item { flex-direction: column; text-align: center; }
    .list-meta { flex-direction: column; gap: 0.4rem; align-items: center; }
    .footer-content { grid-template-columns: 1fr; text-align: center; gap: 2rem; }
    .section-header h3 { font-size: 1.85rem; }
    .logo-text h1 { font-size: 1.1rem; }
    .logo-text span { font-size: 0.6rem; }
}

@media (max-width: 480px) {
    .stat-number { font-size: 2.25rem; }
    .navbar { padding: 0.85rem 4%; }
    .nav-actions .btn { padding: 0.5rem 1rem; font-size: 0.85rem; }
}

/* ============================================================
   LANGUAGE TOGGLE + RTL SUPPORT (Kurdish)
   ============================================================ */
.lang-toggle {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    padding: 0.5rem 0.9rem;
    background: transparent;
    color: var(--primary);
    border: 1.5px solid var(--primary);
    border-radius: 8px;
    text-decoration: none;
    font-size: 0.85rem;
    font-weight: 600;
    transition: all 0.25s ease;
    white-space: nowrap;
}
.lang-toggle:hover {
    background: var(--primary);
    color: var(--white);
}

/* Kurdish typography */
.lang-ku,
.lang-ku .navbar,
.lang-ku .hero h2,
.lang-ku .hero p,
.lang-ku .section-header h3,
.lang-ku .section-header p,
.lang-ku .staff-name,
.lang-ku .staff-name-krd,
.lang-ku .staff-role,
.lang-ku .staff-dept,
.lang-ku .stat-label,
.lang-ku .dept-name,
.lang-ku .dept-count,
.lang-ku .footer-brand,
.lang-ku .footer-brand p,
.lang-ku .footer-links h4,
.lang-ku .footer-links a,
.lang-ku .modal-header h2,
.lang-ku .modal-body,
.lang-ku .btn,
.lang-ku .lang-toggle,
.lang-ku .toggle-btn,
.lang-ku .nav-links a,
.lang-ku .logo-text {
    font-family: 'Noto Sans Arabic', Tahoma, 'Segoe UI', Arial, sans-serif !important;
}
/* Keep Playfair only on stat numbers + main brand titles in EN */
.lang-ku .stat-number {
    font-family: 'Inter', 'Noto Sans Arabic', sans-serif !important;
}

/* RTL layout adjustments */
html[dir="rtl"] body { text-align: right; }
html[dir="rtl"] .nav-links { padding-right: 0; }
html[dir="rtl"] .logo-icon { margin-right: 0; margin-left: 0.75rem; }
html[dir="rtl"] .nav-actions { flex-direction: row-reverse; }
html[dir="rtl"] .search-box { direction: rtl; }
html[dir="rtl"] .search-input { text-align: right; }
html[dir="rtl"] .staff-card,
html[dir="rtl"] .list-item { direction: rtl; }
html[dir="rtl"] .staff-contact { justify-content: flex-end; }
html[dir="rtl"] .list-info { text-align: right; }
html[dir="rtl"] .list-meta { justify-content: flex-end; }
html[dir="rtl"] .list-actions { flex-direction: row-reverse; }
html[dir="rtl"] .footer-content { direction: rtl; text-align: right; }
html[dir="rtl"] .footer-links ul li i,
html[dir="rtl"] .modal-contact-item i,
html[dir="rtl"] .staff-dept i,
html[dir="rtl"] .list-meta i {
    margin-right: 0;
    margin-left: 0.3rem;
}
html[dir="rtl"] .modal-close { left: 1.25rem; right: auto; }
html[dir="rtl"] .modal-contact-item { flex-direction: row-reverse; text-align: right; }
html[dir="rtl"] .dept-card { text-align: center; }
html[dir="rtl"] .hero-content { text-align: center; }
html[dir="rtl"] .section-header { text-align: center; }

/* Clickable staff image link wrapper */
.staff-image-link {
    display: block;
    text-decoration: none;
    color: inherit;
    cursor: pointer;
}
.staff-image-link:hover .staff-image::after {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(180deg, rgba(30,58,95,0) 50%, rgba(30,58,95,0.5) 100%);
    transition: opacity 0.3s;
    pointer-events: none;
}
.staff-image { position: relative; }
.list-image { cursor: pointer; transition: transform 0.2s; }
.list-image:hover { transform: scale(1.05); }

/* Make sure modal-actions buttons line up nicely */
.modal-actions .btn { flex: 1; min-width: 140px; justify-content: center; }

/* Mobile: hide login-button text, keep icon */
@media (max-width: 768px) {
    .nav-actions .btn-text { display: none; }
    .lang-toggle span { display: none; }
    .lang-toggle { padding: 0.5rem 0.7rem; }
}

/* Tighter search box on very small phones */
@media (max-width: 480px) {
    .search-box { padding: 0.6rem; gap: 0.4rem; }
    .search-input, .search-select {
        padding: 0.65rem 0.75rem;
        font-size: 0.85rem;
    }
    .hero h2 { font-size: 1.65rem; line-height: 1.25; }
    .hero p { font-size: 0.92rem; }
    .hero { padding: 3rem 5% 2.5rem; }
}
