/* ============================================
   TaHaGhoLaMpouR - Main Stylesheet (Complete)
   ============================================ */

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    --primary: #6366f1;
    --primary-dark: #4f46e5;
    --accent: #ec4899;
    --text: #1f2937;
    --text-light: #6b7280;
    --text-mid: #4b5563;
    --bg: #ffffff;
    --bg-alt: #f9fafb;
    --border: #e5e7eb;
    --radius: 10px;
    --shadow: 0 4px 20px rgba(0, 0, 0, 0.06);
}

html { scroll-behavior: smooth; }

body {
    font-family: 'Vazirmatn', Tahoma, Arial, sans-serif;
    background-color: var(--bg-alt);
    color: var(--text);
    line-height: 1.9;
    direction: rtl;
    font-size: 15px;
}

a { color: inherit; text-decoration: none; }
ul { list-style: none; }
img { max-width: 100%; height: auto; }

/* ===== Container ===== */
.container {
    max-width: 1150px;
    margin: 0 auto;
    padding: 0 20px;
}

/* ===== Buttons ===== */
.btn {
    display: inline-block;
    padding: 10px 22px;
    border-radius: var(--radius);
    font-size: 14px;
    font-weight: 600;
    transition: all 0.25s ease;
    cursor: pointer;
    border: none;
    font-family: inherit;
}

.btn-primary {
    background-color: var(--primary);
    color: #ffffff;
}

.btn-primary:hover {
    background-color: var(--primary-dark);
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(99, 102, 241, 0.4);
}

.btn-outline {
    background-color: transparent;
    color: var(--text);
    border: 1.5px solid var(--border);
}

.btn-outline:hover {
    border-color: var(--primary);
    color: var(--primary);
}

/* ===== Header ===== */
.site-header {
    background-color: var(--bg);
    border-bottom: 1px solid var(--border);
    padding: 14px 0;
    position: sticky;
    top: 0;
    z-index: 1000;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.03);
}

.header-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
    flex-wrap: wrap;
    position: relative;
}

.logo a {
    display: flex;
    align-items: center;
    gap: 10px;
    font-weight: 800;
    font-size: 18px;
    color: var(--text);
}

.logo-mark {
    width: 38px;
    height: 38px;
    background: linear-gradient(135deg, var(--primary), var(--accent));
    color: #ffffff;
    border-radius: var(--radius);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 20px;
    font-weight: 900;
    flex-shrink: 0;
}

.logo-text {
    font-size: 17px;
    font-weight: 800;
}

.main-nav ul {
    display: flex;
    gap: 26px;
    align-items: center;
}

.main-nav a {
    font-size: 15px;
    color: var(--text-light);
    transition: color 0.2s ease;
    font-weight: 500;
}

.main-nav a:hover { color: var(--primary); }

.auth-buttons {
    display: flex;
    gap: 10px;
    align-items: center;
}

/* ===== Menu Toggle ===== */
.menu-toggle {
    display: none;
    flex-direction: column;
    gap: 5px;
    background: none;
    border: none;
    cursor: pointer;
    padding: 6px;
}

.menu-toggle span {
    width: 24px;
    height: 2.5px;
    background-color: var(--text);
    border-radius: 2px;
}

/* ===== Main ===== */
.site-main {
    min-height: calc(100vh - 300px);
    padding: 50px 0;
}

/* ===== Hero ===== */
.hero {
    text-align: center;
    padding: 70px 0;
}

.hero h1 {
    font-size: 42px;
    font-weight: 900;
    margin-bottom: 18px;
    background: linear-gradient(135deg, var(--primary), var(--accent));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    line-height: 1.4;
}

.hero p {
    font-size: 17px;
    color: var(--text-light);
    max-width: 620px;
    margin: 0 auto 30px;
    line-height: 2;
}

/* ===== Page Header (about / contact) ===== */
.page-header {
    text-align: center;
    margin-bottom: 50px;
}

.page-title {
    font-size: 36px;
    font-weight: 900;
    margin-bottom: 12px;
    background: linear-gradient(135deg, var(--primary), var(--accent));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    line-height: 1.4;
}

.page-subtitle {
    font-size: 16px;
    color: var(--text-light);
}

/* ===== Cards ===== */
.card {
    background-color: var(--bg);
    border: 1px solid var(--border);
    border-radius: 16px;
    padding: 22px;
    box-shadow: var(--shadow);
    transition: all 0.25s ease;
}

.card:hover {
    transform: translateY(-4px);
    box-shadow: 0 12px 30px rgba(0, 0, 0, 0.08);
}

.grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 22px;
}

/* ===== About Page ===== */
.about-grid {
    display: grid;
    grid-template-columns: 300px 1fr;
    gap: 40px;
    align-items: start;
}

.about-card {
    background: linear-gradient(135deg, var(--bg-alt), var(--bg));
    border: 1px solid var(--border);
    border-radius: 16px;
    padding: 30px 20px;
    text-align: center;
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.05);
    position: sticky;
    top: 100px;
}

.about-avatar {
    width: 100px;
    height: 100px;
    background: linear-gradient(135deg, var(--primary), var(--accent));
    color: #ffffff;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 44px;
    font-weight: 900;
    margin: 0 auto 18px;
    box-shadow: 0 10px 30px rgba(99, 102, 241, 0.35);
}

.about-card h2 {
    font-size: 22px;
    margin-bottom: 6px;
    color: var(--text);
}

.about-role {
    font-size: 14px;
    color: var(--text-light);
}

.about-content {
    background-color: var(--bg);
    border: 1px solid var(--border);
    border-radius: 16px;
    padding: 35px;
    box-shadow: var(--shadow);
}

.about-content h3 {
    font-size: 20px;
    color: var(--text);
    margin-top: 25px;
    margin-bottom: 12px;
}

.about-content h3:first-child { margin-top: 0; }

.about-content p {
    color: var(--text-mid);
    font-size: 15px;
    line-height: 2;
    margin-bottom: 12px;
}

.about-content a {
    color: var(--primary);
    font-weight: 600;
}

.about-content a:hover { text-decoration: underline; }

.about-list { margin: 15px 0; }

.about-list li {
    padding: 10px 0;
    border-bottom: 1px dashed var(--border);
    color: var(--text-mid);
    font-size: 15px;
}

.about-list li:last-child { border-bottom: none; }

/* ===== Contact Page ===== */
.contact-grid {
    display: grid;
    grid-template-columns: 1fr 1.3fr;
    gap: 30px;
    align-items: start;
}

.contact-info,
.contact-form-wrapper {
    background-color: var(--bg);
    border: 1px solid var(--border);
    border-radius: 16px;
    padding: 30px;
    box-shadow: var(--shadow);
}

.contact-info h3,
.contact-form-wrapper h3 {
    font-size: 20px;
    margin-bottom: 15px;
    color: var(--text);
}

.contact-info > p {
    color: var(--text-light);
    font-size: 14px;
    margin-bottom: 20px;
}

.contact-list li {
    display: flex;
    align-items: center;
    gap: 15px;
    padding: 14px 0;
    border-bottom: 1px solid #f3f4f6;
}

.contact-list li:last-child { border-bottom: none; }

.contact-icon {
    font-size: 24px;
    width: 48px;
    height: 48px;
    background-color: #f3f4f6;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.contact-list strong {
    display: block;
    font-size: 14px;
    color: var(--text);
    margin-bottom: 3px;
}

.contact-list p {
    font-size: 13px;
    color: var(--text-light);
}

.contact-note {
    margin-top: 20px;
    padding: 12px 15px;
    background-color: #fef3c7;
    border-radius: var(--radius);
    font-size: 13px;
    color: #92400e;
}

.form-note {
    font-size: 13px;
    color: #92400e;
    background-color: #fef3c7;
    padding: 10px 14px;
    border-radius: 8px;
    margin-bottom: 20px;
}

/* ===== Forms ===== */
.form-group { margin-bottom: 18px; }

.form-group label {
    display: block;
    margin-bottom: 8px;
    font-weight: 600;
    font-size: 14px;
    color: var(--text);
}

.form-control {
    width: 100%;
    padding: 12px 16px;
    border: 1.5px solid var(--border);
    border-radius: var(--radius);
    font-family: inherit;
    font-size: 15px;
    background-color: var(--bg);
    transition: border-color 0.2s;
    direction: rtl;
    color: var(--text);
}

.form-control:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.1);
}

.form-control:disabled {
    background-color: var(--bg-alt);
    cursor: not-allowed;
}

.btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

.btn:disabled:hover {
    transform: none;
    box-shadow: none;
}

/* ===== Footer ===== */
.site-footer {
    background-color: var(--bg-alt);
    border-top: 1px solid var(--border);
    padding: 50px 0 0;
    margin-top: 60px;
}

.footer-inner {
    display: grid;
    grid-template-columns: 2fr 1fr 1fr;
    gap: 40px;
    padding-bottom: 35px;
}

.footer-col h4 {
    margin-bottom: 15px;
    font-size: 16px;
    font-weight: 700;
    color: var(--text);
}

.footer-col p {
    color: var(--text-light);
    font-size: 14px;
    line-height: 2;
}

.footer-col ul li { margin-bottom: 10px; }

.footer-col ul a {
    color: var(--text-light);
    font-size: 14px;
    transition: color 0.2s;
}

.footer-col ul a:hover { color: var(--primary); }

.footer-bottom {
    border-top: 1px solid var(--border);
    padding: 20px 0;
    text-align: center;
    font-size: 13px;
    color: var(--text-light);
}

/* ===== Responsive ===== */
@media (max-width: 900px) {
    .menu-toggle { display: flex; }

    .main-nav {
        position: absolute;
        top: 100%;
        right: 0;
        left: 0;
        background-color: var(--bg);
        border-bottom: 1px solid var(--border);
        max-height: 0;
        overflow: hidden;
        transition: max-height 0.3s ease;
        box-shadow: 0 10px 20px rgba(0, 0, 0, 0.05);
    }

    .main-nav.open { max-height: 500px; }

    .main-nav ul {
        flex-direction: column;
        gap: 0;
        padding: 10px 20px;
        align-items: stretch;
    }

    .main-nav ul li { border-bottom: 1px solid var(--border); }
    .main-nav ul li:last-child { border-bottom: none; }
    .main-nav a { display: block; padding: 14px 0; }

    .auth-buttons .btn-outline { display: none; }

    .footer-inner {
        grid-template-columns: 1fr;
        gap: 30px;
    }

    .hero h1 { font-size: 30px; }
    .hero p { font-size: 15px; }

    .about-grid,
    .contact-grid {
        grid-template-columns: 1fr;
    }

    .about-card { position: static; }

    .page-title { font-size: 28px; }

    .about-content { padding: 25px 20px; }

    .contact-info,
    .contact-form-wrapper { padding: 22px 18px; }
}

@media (max-width: 500px) {
    .logo-text { font-size: 14px; }
    .hero h1 { font-size: 24px; }
    .btn { padding: 9px 16px; font-size: 13px; }
}

/* ============================================
   Auth Pages (Login / Register)
   ============================================ */

.auth-section {
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 40px 20px;
    min-height: calc(100vh - 400px);
}

.auth-box {
    width: 100%;
    max-width: 460px;
    background-color: var(--bg);
    border: 1px solid var(--border);
    border-radius: 20px;
    padding: 40px 35px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.06);
}

.auth-header {
    text-align: center;
    margin-bottom: 30px;
}

.auth-header h1 {
    font-size: 28px;
    font-weight: 900;
    margin-bottom: 8px;
    background: linear-gradient(135deg, var(--primary), var(--accent));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.auth-header p {
    font-size: 14px;
    color: var(--text-light);
}

.auth-form .form-group {
    margin-bottom: 18px;
}

.btn-block {
    width: 100%;
    padding: 13px;
    font-size: 15px;
    margin-top: 10px;
}

.auth-footer {
    text-align: center;
    margin-top: 22px;
    font-size: 14px;
    color: var(--text-light);
}

.auth-footer a {
    color: var(--primary);
    font-weight: 700;
    margin-right: 5px;
}

.auth-footer a:hover {
    text-decoration: underline;
}

/* ===== Alert ===== */
.alert {
    padding: 14px 18px;
    border-radius: var(--radius);
    font-size: 14px;
    margin-bottom: 22px;
    line-height: 1.9;
}

.alert-error {
    background-color: #fef2f2;
    color: #991b1b;
    border: 1px solid #fecaca;
}

.alert-error ul li {
    list-style: none;
    padding: 3px 0;
}

.alert-error ul li::before {
    content: '⚠ ';
    margin-left: 5px;
}

.alert-success {
    background-color: #ecfdf5;
    color: #065f46;
    border: 1px solid #a7f3d0;
}

.alert-success a {
    color: #065f46;
    font-weight: 700;
    text-decoration: underline;
}

@media (max-width: 500px) {
    .auth-box {
        padding: 30px 20px;
    }

    .auth-header h1 {
        font-size: 24px;
    }
}

/* ============================================
   Dashboard
   ============================================ */

.dashboard-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 20px;
    margin-bottom: 40px;
}

.dashboard-card {
    background-color: var(--bg);
    border: 1px solid var(--border);
    border-radius: 16px;
    padding: 25px 20px;
    text-align: center;
    box-shadow: var(--shadow);
    transition: all 0.25s ease;
    cursor: pointer;
}

.dashboard-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 12px 30px rgba(0, 0, 0, 0.08);
    border-color: var(--primary);
}

.dashboard-icon {
    font-size: 38px;
    margin-bottom: 12px;
}

.dashboard-card h3 {
    font-size: 17px;
    margin-bottom: 6px;
    color: var(--text);
}

.dashboard-card p {
    font-size: 13px;
    color: var(--text-light);
}

.dashboard-info {
    background-color: var(--bg);
    border: 1px solid var(--border);
    border-radius: 16px;
    padding: 25px 30px;
    box-shadow: var(--shadow);
    margin-bottom: 25px;
}

.dashboard-info h3 {
    font-size: 18px;
    margin-bottom: 15px;
    color: var(--text);
}

.dashboard-info ul li {
    padding: 10px 0;
    border-bottom: 1px solid var(--border);
    font-size: 15px;
    color: var(--text-mid);
}

.dashboard-info ul li:last-child {
    border-bottom: none;
}

.dashboard-info ul li strong {
    color: var(--text);
    margin-left: 8px;
}

.dashboard-actions {
    text-align: center;
    margin-top: 10px;
}