/*
Theme Name: سامانه ثبت درخواست جابجایی معلمان ایران
Theme URI: https://github.com/example/teacher-transfer-theme
Author: Google AI Studio
Description: قالب پیشرفته و بهینه وردپرس برای ثبت و جابجایی معلمان ایران با قابلیت فیلترهای ایجکس و پنل کاربری اختصاصی.
Version: 1.0.0
License: GNU General Public License v2 or later
License URI: http://www.gnu.org/licenses/gpl-2.0.html
Text Domain: teacher-transfer
Domain Path: /languages
*/

/* --- Google Font Vazirmatn --- */
@import url('https://fonts.googleapis.com/css2?family=Vazirmatn:wght@100..900&display=swap');

/* --- Reset & Variables --- */
:root {
    --primary-color: #2563eb;       /* Soft Blue */
    --primary-hover: #1d4ed8;
    --primary-light: #eff6ff;
    
    --secondary-color: #475569;     /* Slate */
    --text-dark: #0f172a;           /* Dark Charcoal */
    --text-muted: #64748b;          /* Muted Grey */
    --bg-light: #f8fafc;            /* Off-White */
    --bg-white: #ffffff;
    
    --success-color: #10b981;       /* Active (Green) */
    --pending-color: #3b82f6;       /* Pending (Blue) */
    --success-bg: #ecfdf5;
    --pending-bg: #eff6ff;
    --completed-color: #8b5cf6;     /* Successful (Purple) */
    --completed-bg: #f5f3ff;
    
    --border-color: #e2e8f0;
    --shadow-sm: 0 1px 2px 0 rgb(0 0 0 / 0.05);
    --shadow-md: 0 4px 6px -1px rgb(0 0 0 / 0.1), 0 2px 4px -2px rgb(0 0 0 / 0.1);
    --shadow-lg: 0 10px 15px -3px rgb(0 0 0 / 0.1), 0 4px 6px -4px rgb(0 0 0 / 0.1);
    
    --font-family: 'Vazirmatn', system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
}

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

body {
    font-family: var(--font-family);
    background-color: var(--bg-light);
    color: var(--text-dark);
    direction: rtl;
    text-align: right;
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
}

a {
    color: var(--primary-color);
    text-decoration: none;
    transition: color 0.2s ease;
}

a:hover {
    color: var(--primary-hover);
}

button, input, select, textarea {
    font-family: var(--font-family);
}

/* --- Container --- */
.container {
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

/* --- Header Section --- */
.site-header {
    background-color: var(--bg-white);
    border-bottom: 1px solid var(--border-color);
    position: sticky;
    top: 0;
    z-index: 50;
    box-shadow: var(--shadow-sm);
}

.header-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    height: 70px;
}

.logo-section {
    display: flex;
    align-items: center;
    gap: 12px;
}

.logo-section img {
    height: 40px;
    width: auto;
}

.site-title {
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--text-dark);
}

.header-actions {
    display: flex;
    align-items: center;
    gap: 16px;
}

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 10px 20px;
    font-size: 0.875rem;
    font-weight: 600;
    border-radius: 8px;
    border: 1px solid transparent;
    cursor: pointer;
    transition: all 0.2s ease;
}

.btn-primary {
    background-color: var(--primary-color);
    color: var(--bg-white);
}

.btn-primary:hover {
    background-color: var(--primary-hover);
    color: var(--bg-white);
}

.btn-outline {
    background-color: transparent;
    border-color: var(--border-color);
    color: var(--secondary-color);
}

.btn-outline:hover {
    background-color: var(--bg-light);
    color: var(--text-dark);
}

.profile-link {
    display: flex;
    align-items: center;
    gap: 8px;
    font-weight: 500;
    color: var(--secondary-color);
}

.profile-link:hover {
    color: var(--primary-color);
}

.profile-icon {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background-color: var(--primary-light);
    color: var(--primary-color);
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: bold;
}

/* --- Filter Bar Section --- */
.filter-section {
    background-color: var(--bg-white);
    border-radius: 12px;
    padding: 24px;
    margin: 32px 0;
    box-shadow: var(--shadow-sm);
    border: 1px solid var(--border-color);
}

.filter-section-title {
    font-size: 1.125rem;
    font-weight: 700;
    margin-bottom: 20px;
    color: var(--text-dark);
    display: flex;
    align-items: center;
    gap: 8px;
}

.filter-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
    gap: 16px;
}

.form-group {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.form-group label {
    font-size: 0.813rem;
    font-weight: 600;
    color: var(--secondary-color);
}

.form-control {
    width: 100%;
    padding: 10px 14px;
    border-radius: 8px;
    border: 1px solid var(--border-color);
    background-color: var(--bg-white);
    color: var(--text-dark);
    font-size: 0.875rem;
    outline: none;
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.form-control:focus {
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.1);
}

/* --- Listing Grid Section --- */
.listings-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 24px;
}

.listings-title {
    font-size: 1.25rem;
    font-weight: 700;
}

.listings-count {
    font-size: 0.875rem;
    color: var(--text-muted);
}

.listing-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 24px;
    margin-bottom: 48px;
}

/* --- Card Styles --- */
.request-card {
    background-color: var(--bg-white);
    border-radius: 12px;
    border: 1px solid var(--border-color);
    overflow: hidden;
    box-shadow: var(--shadow-sm);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
    display: flex;
    flex-direction: column;
}

.request-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-md);
}

.card-header {
    padding: 16px;
    border-bottom: 1px solid var(--border-color);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.teacher-info {
    display: flex;
    align-items: center;
    gap: 8px;
}

.teacher-avatar {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background-color: #f1f5f9;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.875rem;
    color: var(--secondary-color);
}

.teacher-name {
    font-weight: 600;
    font-size: 0.875rem;
}

.status-badge {
    padding: 4px 10px;
    border-radius: 20px;
    font-size: 0.75rem;
    font-weight: 600;
}

.status-active {
    background-color: var(--success-bg);
    color: var(--success-color);
}

.status-pending {
    background-color: var(--pending-bg);
    color: var(--pending-color);
}

.status-successful {
    background-color: var(--completed-bg);
    color: var(--completed-color);
}

.card-body {
    padding: 20px;
    flex-grow: 1;
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.transfer-path {
    display: flex;
    align-items: center;
    justify-content: space-between;
    background-color: var(--bg-light);
    padding: 12px;
    border-radius: 8px;
}

.path-point {
    text-align: center;
    flex: 1;
}

.path-label {
    font-size: 0.75rem;
    color: var(--text-muted);
    margin-bottom: 4px;
}

.path-value {
    font-weight: 700;
    font-size: 0.938rem;
}

.path-arrow {
    color: var(--text-muted);
    font-size: 1.25rem;
    padding: 0 8px;
}

.meta-details {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 12px;
}

.meta-item {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.meta-label {
    font-size: 0.75rem;
    color: var(--text-muted);
}

.meta-value {
    font-size: 0.875rem;
    font-weight: 600;
}

.card-footer {
    padding: 16px;
    border-top: 1px solid var(--border-color);
    background-color: #fafafa;
}

/* --- Authentication Page --- */
.auth-container {
    max-width: 400px;
    margin: 80px auto;
    background: var(--bg-white);
    padding: 32px;
    border-radius: 12px;
    border: 1px solid var(--border-color);
    box-shadow: var(--shadow-md);
}

.auth-title {
    font-size: 1.5rem;
    font-weight: 700;
    text-align: center;
    margin-bottom: 24px;
}

/* --- Form Page Template --- */
.page-title-section {
    margin: 32px 0 16px 0;
}

.page-form-container {
    max-width: 700px;
    margin: 0 auto 48px auto;
    background-color: var(--bg-white);
    padding: 32px;
    border-radius: 12px;
    border: 1px solid var(--border-color);
    box-shadow: var(--shadow-sm);
}

/* --- Profile Page Template --- */
.profile-grid {
    display: grid;
    grid-template-columns: 280px 1fr;
    gap: 32px;
    margin: 32px 0 64px 0;
}

.profile-sidebar {
    background-color: var(--bg-white);
    padding: 24px;
    border-radius: 12px;
    border: 1px solid var(--border-color);
    height: fit-content;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 16px;
    box-shadow: var(--shadow-sm);
}

.profile-avatar {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    background-color: var(--primary-light);
    color: var(--primary-color);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2rem;
    font-weight: bold;
}

.profile-name {
    font-size: 1.125rem;
    font-weight: 700;
}

.profile-meta {
    font-size: 0.875rem;
    color: var(--text-muted);
}

.profile-content {
    display: flex;
    flex-direction: column;
    gap: 24px;
}

.my-posts-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.post-actions {
    display: flex;
    gap: 8px;
    margin-top: auto;
}

/* --- Loading Animation --- */
.loading-spinner {
    display: none;
    text-align: center;
    padding: 40px;
    grid-column: 1 / -1;
}

.spinner {
    width: 40px;
    height: 40px;
    border: 4px solid var(--border-color);
    border-top-color: var(--primary-color);
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin: 0 auto 16px auto;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

/* --- Responsive Media Queries --- */
@media (max-width: 1024px) {
    .listing-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 768px) {
    .header-container {
        flex-direction: column;
        height: auto;
        padding: 16px 0;
        gap: 12px;
    }
    
    .listing-grid {
        grid-template-columns: 1fr;
    }
    
    .profile-grid {
        grid-template-columns: 1fr;
    }
    
    .filter-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 480px) {
    .filter-grid {
        grid-template-columns: 1fr;
    }
}
