/* ═══════════════════════════════════════════════════════════════
   public-design-system.css — سیستم مشترک سایت عمومی
   بارگذاری در starting-header.php قبل از main_header.css
   ═══════════════════════════════════════════════════════════════ */

:root {
    /* برند (هماهنگ با پنل) */
    --primary:        #2c6db4;
    --primary-dark:   #0d47a1;
    --primary-light:  #e8f0fb;
    --secondary:      #1a73e8;
    --accent:         #4cc9f0;
    --accent-soft:    rgba(76, 201, 240, 0.12);

    /* وضعیت */
    --success:        #2ecc71;
    --success-dark:   #059669;
    --success-light:  #e8f8ef;
    --danger:         #e74c3c;
    --danger-dark:    #c0392b;
    --danger-light:   #fdecea;
    --warning:        #f39c12;
    --warning-light:  #fef5e7;

    /* خنثی */
    --text:           #1e293b;
    --text-soft:      #475569;
    --text-muted:     #64748b;
    --text-faint:     #94a3b8;
    --bg:             #f5f7fa;
    --bg-soft:        #f8fafc;
    --bg-card:        #ffffff;
    --border:         #eef2f7;
    --border-strong:  #e2e8f0;

    /* Radii */
    --r-sm:  8px;
    --r-md:  12px;
    --r-lg:  16px;
    --r-xl:  22px;
    --r-2xl: 30px;

    /* سایه */
    --sh-xs: 0 1px 3px rgba(15, 23, 42, 0.04);
    --sh-sm: 0 2px 10px rgba(15, 23, 42, 0.05);
    --sh-md: 0 6px 24px rgba(15, 23, 42, 0.08);
    --sh-lg: 0 16px 48px rgba(15, 23, 42, 0.12);

    /* Motion */
    --ease:   cubic-bezier(0.16, 1, 0.3, 1);
    --fast:   0.2s var(--ease);
    --normal: 0.3s var(--ease);
    --slow:   0.5s var(--ease);

    /* Layout */
    --container: 1140px;
    --header-h:  72px;
}

/* ─── Reset سبک (فقط برای عناصر خودمان) ─── */
.pub-container,
.pub-section,
.pub-features-grid,
.pub-grid-2,
.pub-grid-3,
.pub-grid-4 {
    box-sizing: border-box;
}

/* ═══════════════════════════════════════════════════════════════
   Container
   ═══════════════════════════════════════════════════════════════ */
.pub-container {
    width: 100%;
    max-width: var(--container);
    margin: 0 auto;
    padding: 0 24px;
}

/* ═══════════════════════════════════════════════════════════════
   Sections
   ═══════════════════════════════════════════════════════════════ */
.pub-section {
    padding: 80px 0;
    position: relative;
}
.pub-section-sm { padding: 50px 0; }
.pub-section-lg { padding: 110px 0; }
.pub-section-alt { background: #fff; }

.pub-section-header {
    text-align: center;
    margin-bottom: 56px;
}
.pub-section-title {
    font-size: 2.15rem;
    font-weight: 800;
    color: var(--text);
    line-height: 1.25;
    margin: 0 0 14px;
    letter-spacing: -0.3px;
}
.pub-section-subtitle {
    font-size: 1.1rem;
    color: var(--text-muted);
    max-width: 620px;
    margin: 0 auto;
    line-height: 1.85;
}
.pub-section-badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 6px 16px;
    background: var(--primary-light);
    color: var(--primary-dark);
    border-radius: 30px;
    font-size: 12.5px;
    font-weight: 700;
    margin-bottom: 16px;
    letter-spacing: 0.3px;
}
.pub-section-badge i { font-size: 12px; }

.pub-title-divider {
    display: block;
    width: 60px;
    height: 4px;
    background: linear-gradient(90deg, var(--primary), var(--accent));
    border-radius: 3px;
    margin: 0 auto 20px;
}

/* ═══════════════════════════════════════════════════════════════
   Typography
   ═══════════════════════════════════════════════════════════════ */
.pub-h1 {
    font-size: 2.75rem;
    font-weight: 800;
    line-height: 1.25;
    color: var(--text);
    letter-spacing: -0.5px;
    margin: 0 0 16px;
}
.pub-h2 {
    font-size: 2rem;
    font-weight: 800;
    line-height: 1.3;
    color: var(--text);
    letter-spacing: -0.3px;
    margin: 0 0 14px;
}
.pub-h3 {
    font-size: 1.4rem;
    font-weight: 700;
    line-height: 1.4;
    color: var(--text);
    margin: 0 0 12px;
}
.pub-lead {
    font-size: 1.15rem;
    color: var(--text-soft);
    line-height: 1.85;
    margin: 0 0 20px;
}
.pub-text {
    font-size: 1rem;
    color: var(--text-soft);
    line-height: 1.9;
    margin: 0 0 16px;
}

/* ═══════════════════════════════════════════════════════════════
   Buttons
   ═══════════════════════════════════════════════════════════════ */
.pub-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 14px 28px;
    min-height: 52px;
    font-family: inherit;
    font-size: 15px;
    font-weight: 700;
    border-radius: var(--r-md);
    border: none;
    cursor: pointer;
    transition: all var(--fast);
    text-decoration: none;
    white-space: nowrap;
    user-select: none;
    line-height: 1;
}
.pub-btn:active:not(:disabled) { transform: translateY(1px); }
.pub-btn:disabled { opacity: 0.55; cursor: not-allowed; }

.pub-btn-primary {
    background: linear-gradient(135deg, var(--primary), var(--primary-dark));
    color: #fff;
    box-shadow: 0 6px 20px rgba(44, 109, 180, 0.32);
}
.pub-btn-primary:hover:not(:disabled) {
    transform: translateY(-2px);
    box-shadow: 0 10px 28px rgba(44, 109, 180, 0.42);
    color: #fff;
}
.pub-btn-white {
    background: #fff;
    color: var(--primary-dark);
    box-shadow: 0 6px 20px rgba(15, 23, 42, 0.12);
}
.pub-btn-white:hover:not(:disabled) {
    transform: translateY(-2px);
    box-shadow: 0 10px 28px rgba(15, 23, 42, 0.18);
    color: var(--primary-dark);
}
.pub-btn-outline {
    background: transparent;
    color: var(--primary);
    border: 2px solid var(--primary);
}
.pub-btn-outline:hover:not(:disabled) {
    background: var(--primary);
    color: #fff;
    transform: translateY(-2px);
}
.pub-btn-ghost {
    background: transparent;
    color: var(--text-soft);
    border: 1.5px solid var(--border-strong);
}
.pub-btn-ghost:hover:not(:disabled) {
    background: #fff;
    border-color: var(--primary);
    color: var(--primary);
}
.pub-btn-lg { padding: 17px 36px; min-height: 58px; font-size: 16px; }
.pub-btn-sm { padding: 10px 18px; min-height: 42px; font-size: 13.5px; }
.pub-btn-block { width: 100%; }

/* ═══════════════════════════════════════════════════════════════
   Feature Cards
   ═══════════════════════════════════════════════════════════════ */
.pub-features-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 24px;
}

.pub-feature-card {
    background: #fff;
    border: 1px solid var(--border);
    border-radius: var(--r-lg);
    padding: 32px 26px;
    text-align: center;
    transition: all var(--normal);
    position: relative;
    overflow: hidden;
    height: 100%;
}
.pub-feature-card::before {
    content: '';
    position: absolute;
    top: 0; left: 0; right: 0;
    height: 4px;
    background: linear-gradient(90deg, var(--primary), var(--accent));
    transform: scaleX(0);
    transform-origin: right;
    transition: transform var(--normal);
}
.pub-feature-card:hover {
    transform: translateY(-6px);
    box-shadow: var(--sh-md);
    border-color: transparent;
}
.pub-feature-card:hover::before {
    transform: scaleX(1);
    transform-origin: left;
}

.pub-feature-icon {
    width: 76px;
    height: 76px;
    margin: 0 auto 22px;
    border-radius: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 30px;
    color: #fff;
    background: linear-gradient(135deg, var(--primary), var(--primary-dark));
    box-shadow: 0 10px 24px rgba(44, 109, 180, 0.25);
    position: relative;
}
.pub-feature-icon::after {
    content: '';
    position: absolute;
    inset: -6px;
    border-radius: 24px;
    border: 2px solid rgba(44, 109, 180, 0.15);
    opacity: 0;
    transition: opacity var(--normal);
}
.pub-feature-card:hover .pub-feature-icon::after { opacity: 1; }

.pub-feature-title {
    font-size: 1.15rem;
    font-weight: 700;
    color: var(--text);
    margin: 0 0 10px;
}
.pub-feature-desc {
    font-size: 0.95rem;
    color: var(--text-muted);
    line-height: 1.8;
    margin: 0;
}

/* ═══════════════════════════════════════════════════════════════
   Hero
   ═══════════════════════════════════════════════════════════════ */
.pub-hero {
    position: relative;
    padding: 100px 0 80px;
    background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 100%);
    color: #fff;
    overflow: hidden;
    border-radius: 0 0 30px 30px;
    margin-bottom: 40px;
}
.pub-hero::before {
    content: '';
    position: absolute;
    top: -100px; right: -100px;
    width: 400px; height: 400px;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(76, 201, 240, 0.25), transparent 70%);
    pointer-events: none;
}
.pub-hero::after {
    content: '';
    position: absolute;
    bottom: -150px; left: -100px;
    width: 500px; height: 500px;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(255, 255, 255, 0.08), transparent 70%);
    pointer-events: none;
}
.pub-hero-content { position: relative; z-index: 1; text-align: center; }
.pub-hero h1 {
    font-size: 3rem;
    font-weight: 800;
    line-height: 1.2;
    letter-spacing: -0.5px;
    margin: 0 0 20px;
    color: #fff;
}
.pub-hero p {
    font-size: 1.2rem;
    line-height: 1.85;
    opacity: 0.92;
    max-width: 700px;
    margin: 0 auto 32px;
    color: #fff;
}
.pub-hero-actions {
    display: flex;
    gap: 12px;
    justify-content: center;
    flex-wrap: wrap;
}

/* ═══════════════════════════════════════════════════════════════
   Cards (generic)
   ═══════════════════════════════════════════════════════════════ */
.pub-card {
    background: #fff;
    border: 1px solid var(--border);
    border-radius: var(--r-lg);
    padding: 28px;
    box-shadow: var(--sh-sm);
    transition: all var(--normal);
}
.pub-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--sh-md);
}

/* ═══════════════════════════════════════════════════════════════
   Form
   ═══════════════════════════════════════════════════════════════ */
.pub-form-group {
    margin-bottom: 18px;
}
.pub-form-label {
    display: block;
    font-size: 13px;
    font-weight: 600;
    color: var(--text-soft);
    margin-bottom: 8px;
    letter-spacing: 0.2px;
}
.pub-input,
.pub-textarea,
.pub-select {
    width: 100%;
    height: 52px;
    padding: 0 16px;
    background: #fff;
    border: 1.5px solid var(--border-strong);
    border-radius: var(--r-md);
    font-family: inherit;
    font-size: 14px;
    color: var(--text);
    font-weight: 500;
    transition: all var(--fast);
    outline: none;
}
.pub-textarea {
    height: auto;
    min-height: 120px;
    padding: 14px 16px;
    resize: vertical;
    line-height: 1.7;
}
.pub-input:focus,
.pub-textarea:focus,
.pub-select:focus {
    border-color: var(--primary);
    box-shadow: 0 0 0 4px rgba(44, 109, 180, 0.1);
}
.pub-input::placeholder,
.pub-textarea::placeholder {
    color: var(--text-faint);
}

/* ═══════════════════════════════════════════════════════════════
   Badges
   ═══════════════════════════════════════════════════════════════ */
.pub-badge {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 11.5px;
    font-weight: 700;
    white-space: nowrap;
}
.pub-badge-primary { background: var(--primary-light); color: var(--primary-dark); }
.pub-badge-success { background: var(--success-light); color: var(--success-dark); }
.pub-badge-danger  { background: var(--danger-light);  color: var(--danger-dark); }
.pub-badge-warning { background: var(--warning-light); color: #92400e; }

/* ═══════════════════════════════════════════════════════════════
   Alert
   ═══════════════════════════════════════════════════════════════ */
.pub-alert {
    padding: 14px 18px;
    border-radius: var(--r-md);
    font-size: 13.5px;
    line-height: 1.7;
    display: flex;
    align-items: flex-start;
    gap: 10px;
    border: 1px solid transparent;
}
.pub-alert i { flex-shrink: 0; margin-top: 2px; font-size: 15px; }
.pub-alert-success {
    background: var(--success-light);
    border-color: rgba(46, 204, 113, 0.25);
    color: var(--success-dark);
}
.pub-alert-danger {
    background: var(--danger-light);
    border-color: rgba(231, 76, 60, 0.25);
    color: var(--danger-dark);
}
.pub-alert-warning {
    background: var(--warning-light);
    border-color: rgba(243, 156, 18, 0.25);
    color: #92400e;
}
.pub-alert-info {
    background: var(--primary-light);
    border-color: rgba(44, 109, 180, 0.2);
    color: var(--primary-dark);
}

/* ═══════════════════════════════════════════════════════════════
   Utilities
   ═══════════════════════════════════════════════════════════════ */
.pub-grid-2 { display: grid; grid-template-columns: repeat(2, 1fr); gap: 24px; }
.pub-grid-3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px; }
.pub-grid-4 { display: grid; grid-template-columns: repeat(4, 1fr); gap: 20px; }
.pub-flex { display: flex; }
.pub-flex-center { display: flex; align-items: center; justify-content: center; }
.pub-flex-between { display: flex; align-items: center; justify-content: space-between; }
.pub-gap-2 { gap: 8px; }
.pub-gap-3 { gap: 12px; }
.pub-gap-4 { gap: 16px; }
.pub-text-center { text-align: center; }
.pub-mb-0 { margin-bottom: 0; }
.pub-mb-3 { margin-bottom: 12px; }
.pub-mb-4 { margin-bottom: 16px; }
.pub-mb-6 { margin-bottom: 24px; }
.pub-mt-4 { margin-top: 16px; }

/* ═══════════════════════════════════════════════════════════════
   Animations
   ═══════════════════════════════════════════════════════════════ */
@keyframes pubFadeInUp {
    from { opacity: 0; transform: translateY(20px); }
    to   { opacity: 1; transform: translateY(0); }
}
@keyframes pubFadeIn {
    from { opacity: 0; }
    to   { opacity: 1; }
}
.pub-fade-in-up { animation: pubFadeInUp 0.6s var(--ease) both; }
.pub-fade-in { animation: pubFadeIn 0.6s var(--ease) both; }

/* ═══════════════════════════════════════════════════════════════
   Responsive
   ═══════════════════════════════════════════════════════════════ */
@media (max-width: 992px) {
    .pub-h1 { font-size: 2.2rem; }
    .pub-h2 { font-size: 1.7rem; }
    .pub-section-title { font-size: 1.8rem; }
    .pub-hero h1 { font-size: 2.4rem; }
    .pub-hero p { font-size: 1.05rem; }
    .pub-section { padding: 60px 0; }
    .pub-section-lg { padding: 80px 0; }
}
@media (max-width: 768px) {
    .pub-h1 { font-size: 1.8rem; }
    .pub-h2 { font-size: 1.5rem; }
    .pub-section-title { font-size: 1.55rem; }
    .pub-lead { font-size: 1rem; }
    .pub-hero { padding: 70px 0 60px; border-radius: 0 0 24px 24px; }
    .pub-hero h1 { font-size: 1.9rem; }
    .pub-hero p { font-size: 0.98rem; }
    .pub-section { padding: 50px 0; }
    .pub-section-header { margin-bottom: 40px; }
    .pub-container { padding: 0 18px; }
    .pub-features-grid { grid-template-columns: 1fr; gap: 16px; }
    .pub-grid-2, .pub-grid-3, .pub-grid-4 { grid-template-columns: 1fr; }
}
@media (max-width: 480px) {
    .pub-h1 { font-size: 1.5rem; }
    .pub-hero h1 { font-size: 1.6rem; }
    .pub-section-title { font-size: 1.35rem; }
    .pub-btn { padding: 12px 22px; min-height: 46px; font-size: 14px; }
    .pub-btn-lg { padding: 14px 28px; min-height: 50px; font-size: 15px; }
    .pub-feature-card { padding: 22px 18px; }
    .pub-feature-icon { width: 64px; height: 64px; font-size: 26px; border-radius: 16px; }
}