/* ==================== */
/* RESET و تنظیمات پایه */
/* ==================== */

/* جلوگیری از انتخاب متن */
body {
    -webkit-user-select: none;
    -moz-user-select: none;
    -ms-user-select: none;
    user-select: none;
}

/* استثنا برای قسمت‌های لازم */
.search-input, 
input, 
textarea,
.error-code-badge,
#globalSearch {
    -webkit-user-select: text;
    -moz-user-select: text;
    -ms-user-select: text;
    user-select: text;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    --primary: #667eea;
    --primary-dark: #5a6fd8;
    --secondary: #764ba2;
    --accent: #f093fb;
    --light: #f8f9fa;
    --dark: #2c3e50;
    --gray: #6c757d;
    --success: #28a745;
    --warning: #ffc107;
    --danger: #dc3545;
    --shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
    --transition: all 0.3s ease;
}

body {
    font-family: 'Vazirmatn', sans-serif;
    direction: rtl;
    background-color: #f9f9f9;
    color: var(--dark);
    line-height: 1.6;
    overflow-x: hidden;
}

a {
    text-decoration: none;
    color: inherit;
}

ul {
    list-style: none;
}

.container {
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 15px;
}

/* ==================== */
/* COMPONENTS عمومی */
/* ==================== */

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 12px 24px;
    border-radius: 50px;
    font-weight: 600;
    transition: var(--transition);
    border: none;
    cursor: pointer;
    gap: 8px;
}

.btn-primary {
    background: linear-gradient(135deg, var(--primary), var(--secondary));
    color: white;
    box-shadow: var(--shadow);
}

.btn-primary:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 25px rgba(102, 126, 234, 0.4);
}

.btn-outline {
    background: transparent;
    color: var(--primary);
    border: 2px solid var(--primary);
}

.btn-outline:hover {
    background: var(--primary);
    color: white;
}

.section {
    padding: 80px 0;
}

.section-title {
    text-align: center;
    margin-bottom: 50px;
    position: relative;
}

.section-title h2 {
    font-size: 2.2rem;
    font-weight: 800;
    margin-bottom: 15px;
    background: linear-gradient(135deg, var(--primary), var(--secondary));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.section-title p {
    color: var(--gray);
    font-size: 1.1rem;
    max-width: 600px;
    margin: 0 auto;
}

.section-title::after {
    content: '';
    position: absolute;
    bottom: -15px;
    right: 50%;
    transform: translateX(50%);
    width: 50%;
    height: 4px;
    background: linear-gradient(135deg, var(--primary), var(--secondary));
    border-radius: 2px;
}

/* ==================== */
/* HEADER و NAVIGATION */
/* ==================== */

.alopk-main-header {
    background-color: #243447;
    background-image:
        linear-gradient(45deg, rgba(255,255,255,0.04) 25%, transparent 25%),
        linear-gradient(-45deg, rgba(255,255,255,0.04) 25%, transparent 25%),
        linear-gradient(45deg, transparent 75%, rgba(255,255,255,0.04) 75%),
        linear-gradient(-45deg, transparent 75%, rgba(255,255,255,0.04) 75%);
    background-size: 22px 22px;
    background-position: 0 0, 0 11px, 11px -11px, -11px 0;
    background-repeat: repeat;
    color: #fff;
    padding: 24px 0;
    box-shadow: 0 4px 20px rgba(0,0,0,0.15);
    border-bottom: 3px solid var(--primary);
    position: fixed;
    top: 0;
    right: 0;
    left: 0;
    z-index: 1000;
    transition: var(--transition);
}

.alopk-header-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    position: relative;
    z-index: 2;
}

.alopk-logo-link {
    text-decoration: none;
    color: #fff;
    transition: var(--transition);
}

.alopk-logo-text {
    display: flex;
    flex-direction: column;
}

.alopk-main-text {
    font-size: 18px;
    font-weight: bold;
    line-height: 1.3;
    color: white;
    text-shadow: 0 2px 4px rgba(0,0,0,0.3);
}

.alopk-sub-text {
    font-size: 13px;
    opacity: 0.85;
    color: #bdc3c7;
}

.alopk-header-actions {
    display: flex;
    align-items: center;
    gap: 12px;
}

.alopk-btn {
    padding: 10px 20px;
    border-radius: 25px;
    text-decoration: none;
    font-weight: bold;
    font-size: 0.9em;
    transition: var(--transition);
    display: flex;
    align-items: center;
    gap: 8px;
    border: none;
    cursor: pointer;
    font-family: inherit;
}

.alopk-nav-btn {
    background: rgba(255,255,255,0.1);
    color: white;
    border: 1px solid rgba(255,255,255,0.2);
}

.alopk-nav-btn:hover {
    background: rgba(255,255,255,0.2);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0,0,0,0.2);
}

.nav-menu {
    list-style: none;
    display: flex;
    gap: 18px;
    margin: 0;
    padding: 0;
}

.nav-link {
    color: #fff;
    text-decoration: none;
    font-size: 14px;
    padding: 4px 0;
    position: relative;
    font-weight: 600;
    transition: var(--transition);
}

.nav-link::after {
    content: "";
    position: absolute;
    right: 0;
    bottom: -4px;
    width: 0;
    height: 2px;
    background-color: #1abc9c;
    transition: width 0.3s ease;
}

.nav-link:hover {
    color: #f8f9fa;
}

.nav-link:hover::after,
.nav-link.active::after {
    width: 100%;
}

.nav-link.active {
    color: #f8f9fa;
}

.hamburger {
    display: none;
    flex-direction: column;
    gap: 4px;
    cursor: pointer;
    padding: 5px;
}

.hamburger span {
    width: 22px;
    height: 2px;
    background-color: #fff;
    transition: var(--transition);
    border-radius: 2px;
}

/* ==================== */
/* HERO SECTION */
/* ==================== */

.hero {
    background: 
        linear-gradient(135deg, rgba(102, 126, 234, 0.85) 0%, rgba(118, 75, 162, 0.85) 100%),
        linear-gradient(rgba(255, 255, 255, 0.5), rgba(255, 255, 255, 0.5)),
        url('/assets/images/pcb_header.jpg') center/cover;
    color: white;
    padding: 160px 0 80px;
    text-align: center;
    position: relative;
    overflow: hidden;
}

.hero::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 1000 1000" opacity="0.05"><polygon fill="white" points="0,0 1000,1000 0,1000"/></svg>');
    background-size: cover;
}

.hero-content {
    position: relative;
    z-index: 2;
    max-width: 800px;
    margin: 0 auto;
}

.logo {
    width: 180px;
    margin: 0 auto 20px;
    filter: drop-shadow(0 0 20px rgba(255, 255, 255, 0.5));
}

.hero h1 {
    font-size: 3rem;
    margin-bottom: 20px;
    text-shadow: 0 2px 10px rgba(0, 0, 0, 0.3);
}

.hero p {
    font-size: 1.2rem;
    margin-bottom: 30px;
    opacity: 0.9;
}

.hero-buttons {
    display: flex;
    gap: 15px;
    justify-content: center;
    flex-wrap: wrap;
}

/* ==================== */
/* SECTIONS مختلف */
/* ==================== */

/* بخش تاریخ */
.date-section {
    background: linear-gradient(135deg, var(--primary), var(--secondary));
    color: white;
    text-align: center;
    padding: 15px 0;
}

.date-container {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    direction: rtl;
}

.date-text {
    direction: rtl;
    text-align: right;
    unicode-bidi: isolate;
    white-space: nowrap;
    font-family: 'Vazirmatn', Tahoma, sans-serif;
    font-variant-numeric: tabular-nums;
    font-size: 14px;
}

.date-icon {
    font-size: 1.2rem;
}

/* بخش ویژگی‌ها */
.features {
    background: white;
}

.features-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 30px;
}

.feature-card {
    background: white;
    border-radius: 15px;
    padding: 30px;
    box-shadow: var(--shadow);
    transition: var(--transition);
    text-align: center;
    border-top: 4px solid var(--primary);
    cursor: pointer;
    text-decoration: none;
    color: inherit;
    display: block;
}

.feature-card:hover {
    transform: translateY(-10px);
    box-shadow: 0 15px 30px rgba(0, 0, 0, 0.15);
}

.feature-icon {
    width: 70px;
    height: 70px;
    background: linear-gradient(135deg, var(--primary), var(--secondary));
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 20px;
    font-size: 1.8rem;
    color: white;
}

.app-feature-icon {
    background: linear-gradient(135deg, #8fa1f0, #9a7bc9);
}

.feature-card h3 {
    font-size: 1.3rem;
    margin-bottom: 15px;
    color: var(--dark);
}

.feature-card p {
    color: var(--gray);
}

/* بخش اپلیکیشن */
.app-section {
    background: white;
}

.app-container {
    display: flex;
    align-items: center;
    gap: 50px;
}

.app-image {
    flex: 1;
    text-align: center;
}

.app-image img {
    max-width: 60%;
    border-radius: 20px;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.2);
    transition: var(--transition);
}

.app-image img:hover {
    transform: translateY(-10px) scale(1.02);
    box-shadow: 0 30px 60px rgba(0, 0, 0, 0.3);
}

.app-content {
    flex: 1;
}

.app-content h2 {
    font-size: 2rem;
    margin-bottom: 20px;
    color: var(--dark);
}

.app-content p {
    color: var(--gray);
    margin-bottom: 30px;
}

.app-features {
    margin-bottom: 30px;
}

.app-feature {
    display: flex;
    align-items: center;
    margin-bottom: 15px;
}

.app-feature i {
    color: var(--primary);
    margin-left: 10px;
    font-size: 1.2rem;
}

/* ==================== */
/* ERROR CODES SECTION */
/* ==================== */

.error-codes-section {
    background: #f8f9fa;
    padding: 80px 0;
    scroll-margin-top: 100px;
}

.search-box {
    max-width: 600px;
    margin: 0 auto 30px;
}

.search-input {
    width: 100%;
    padding: 15px 25px;
    border: 2px solid #e0e0e0;
    border-radius: 50px;
    font-size: 16px;
    font-family: 'Vazirmatn', sans-serif;
    transition: all 0.3s ease;
    text-align: right;
    background: white;
}

.search-input:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
}

.brands-filter {
    display: flex;
    justify-content: center;
    gap: 10px;
    margin-bottom: 30px;
    flex-wrap: wrap;
}

.filter-btn {
    padding: 10px 20px;
    border: 2px solid var(--primary);
    background: white;
    color: var(--primary);
    border-radius: 25px;
    cursor: pointer;
    transition: all 0.3s ease;
    font-family: 'Vazirmatn', sans-serif;
    font-weight: 600;
}

.filter-btn.active,
.filter-btn:hover {
    background: var(--primary);
    color: white;
}

/* استایل‌های کارت برند با کدهای خطا */
.brand-error-section {
    background: white;
    border-radius: 15px;
    padding: 25px;
    margin-bottom: 25px;
    box-shadow: 0 5px 15px rgba(0,0,0,0.1);
    border-right: 4px solid var(--primary);
    transition: var(--transition);
}

@media (min-width: 768px) {
    #errorCodesContent {
        display: grid;
        grid-template-columns: repeat(2, 1fr);
        gap: 25px;
    }
    
    .brand-error-section {
        margin-bottom: 0;
        padding: 20px;
    }
}

@media (min-width: 1200px) {
    #errorCodesContent {
        grid-template-columns: repeat(3, 1fr);
        gap: 30px;
    }
    
    .brand-error-section {
        padding: 25px;
    }
}

@media (min-width: 1400px) {
    #errorCodesContent {
        grid-template-columns: repeat(3, 1fr);
        gap: 35px;
    }
}

.brand-error-header {
    display: flex;
    align-items: center;
    gap: 15px;
    margin-bottom: 20px;
    padding-bottom: 15px;
    border-bottom: 1px solid #eee;
    cursor: pointer;
    transition: var(--transition);
}

.brand-error-header:hover {
    transform: translateX(-5px);
}

.brand-error-header.active {
    margin-bottom: 0;
    border-bottom: none;
}

.brand-error-logo {
    width: 60px;
    height: 60px;
    object-fit: contain;
    border-radius: 10px;
    background: white;
    padding: 5px;
    box-shadow: 0 3px 10px rgba(0,0,0,0.1);
    transition: var(--transition);
}

.brand-error-header.active .brand-error-logo {
    transform: scale(1.1);
}

.brand-error-title {
    font-size: 1.4rem;
    color: var(--dark);
    margin: 0;
    transition: var(--transition);
}

.brand-error-header.active .brand-error-title {
    color: var(--primary);
}

.brand-error-count {
    background: var(--primary);
    color: white;
    padding: 4px 12px;
    border-radius: 15px;
    font-size: 0.9rem;
    margin-right: auto;
    transition: var(--transition);
}

.brand-error-header.active .brand-error-count {
    background: var(--secondary);
}

.brand-toggle {
    width: 30px;
    height: 30px;
    border-radius: 50%;
    background: var(--primary);
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: var(--transition);
    transform: rotate(0deg);
}

.brand-error-header.active .brand-toggle {
    transform: rotate(180deg);
    background: var(--secondary);
}

.brand-error-content {
    max-height: 0;
    overflow: hidden;
    transition: all 0.4s ease;
}

.brand-error-content.active {
    max-height: none;
    overflow-y: auto;
    height: auto;
}

.brand-error-content.active::-webkit-scrollbar {
    width: 8px;
}

.brand-error-content.active::-webkit-scrollbar-track {
    background: #f1f1f1;
    border-radius: 10px;
}

.brand-error-content.active::-webkit-scrollbar-thumb {
    background: var(--primary);
    border-radius: 10px;
}

.brand-error-content.active::-webkit-scrollbar-thumb:hover {
    background: var(--primary-dark);
}

.model-section {
    margin: 20px 0;
    padding: 15px;
    background: #f8f9fa;
    border-radius: 10px;
    border-right: 3px solid var(--primary);
}

.model-title {
    color: var(--primary);
    margin-bottom: 10px;
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 1.1rem;
}

.error-codes-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 15px;
}

.error-code-item {
    background: white;
    padding: 15px;
    border-radius: 10px;
    transition: all 0.3s ease;
    box-shadow: 0 2px 5px rgba(0,0,0,0.1);
    border-right: 4px solid var(--gray);
    position: relative;
    overflow: hidden;
}

.error-code-item.low {
    border-right-color: var(--success);
    background: linear-gradient(135deg, #f8fff8, #ffffff);
}

.error-code-item.medium {
    border-right-color: var(--warning);
    background: linear-gradient(135deg, #fffbf0, #ffffff);
}

.error-code-item.high {
    border-right-color: var(--danger);
    background: linear-gradient(135deg, #fff5f5, #ffffff);
}

.error-code-item:hover {
    transform: translateY(-3px);
    box-shadow: 0 5px 15px rgba(0,0,0,0.15);
}

.error-code-badge {
    background: var(--dark);
    color: white;
    padding: 4px 10px;
    border-radius: 6px;
    font-weight: bold;
    font-family: 'Courier New', monospace;
    margin-left: 10px;
    font-size: 0.9rem;
}

.error-severity {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    padding: 3px 8px;
    border-radius: 12px;
    font-size: 0.75rem;
    font-weight: bold;
    margin-right: 8px;
}

.severity-low {
    background: var(--success);
    color: white;
}

.severity-medium {
    background: var(--warning);
    color: #856404;
}

.severity-high {
    background: var(--danger);
    color: white;
}

.error-desc {
    margin: 8px 0 0 0;
    color: var(--gray);
    font-size: 0.85rem;
    line-height: 1.5;
}

.no-results {
    text-align: center;
    padding: 40px;
    color: var(--gray);
    font-size: 1.1rem;
}

/* ==================== */
/* بخش برندهای پکیج */
/* ==================== */

.brands-section {
    background: #f8f9fa;
    padding: 80px 0;
}

.brands-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
    gap: 15px;
    margin-top: 40px;
}

@media (min-width: 992px) {
    .brands-grid {
        grid-template-columns: repeat(4, 1fr);
        gap: 20px;
    }
}

@media (min-width: 1200px) {
    .brands-grid {
        grid-template-columns: repeat(5, 1fr);
    }
}

.brand-card {
    background: white;
    border-radius: 12px;
    padding: 15px 10px;
    text-align: center;
    box-shadow: var(--shadow);
    transition: var(--transition);
    text-decoration: none;
    color: inherit;
    border: 2px solid transparent;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    min-height: 140px;
    position: relative;
    cursor: pointer;
}

.brand-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 25px rgba(0,0,0,0.15);
    border-color: var(--primary);
}

.brand-logo {
    width: 50px;
    height: 50px;
    object-fit: contain;
    margin-bottom: 10px;
    border-radius: 8px;
    background: white;
    padding: 5px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
}

.brand-card h3 {
    font-size: 0.9rem;
    margin-bottom: 5px;
    color: var(--dark);
    font-weight: 700;
}

.brand-card p {
    color: var(--gray);
    font-size: 0.75rem;
    line-height: 1.4;
}

.coming-soon {
    opacity: 0.6;
    cursor: not-allowed;
}

.coming-soon-badge {
    background: var(--warning);
    color: #856404;
    padding: 2px 6px;
    border-radius: 8px;
    font-size: 0.6rem;
    font-weight: bold;
    margin-top: 5px;
}

.view-all-brands {
    text-align: center;
    margin-top: 40px;
}

/* استایل‌های رسپانسیو برای کارت‌ها */
.brand-card-responsive {
    margin-bottom: 25px;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 5px 20px rgba(0,0,0,0.1);
    transition: all 0.3s ease;
    break-inside: avoid;
    page-break-inside: avoid;
}

.brand-card-responsive:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 25px rgba(0,0,0,0.15);
}

/* برای صفحه‌های بزرگ - نمایش سه ستونی */
@media (min-width: 1200px) {
    #errorCodesContent {
        column-count: 3;
        column-gap: 25px;
    }
    
    .brand-card-responsive {
        display: inline-block;
        width: 100%;
        margin-bottom: 25px;
    }
}

/* برای تبلت - نمایش دو ستونی */
@media (min-width: 768px) and (max-width: 1199px) {
    #errorCodesContent {
        column-count: 2;
        column-gap: 20px;
    }
    
    .brand-card-responsive {
        display: inline-block;
        width: 100%;
        margin-bottom: 20px;
    }
}

/* برای موبایل - نمایش تک ستونی */
@media (max-width: 767px) {
    #errorCodesContent {
        column-count: 1;
    }
    
    .brand-card-responsive {
        margin-bottom: 15px;
    }
    
    .card-header-responsive {
        padding: 15px !important;
        flex-wrap: wrap !important;
    }
    
    .card-header-responsive h3 {
        font-size: 1.1rem !important;
        white-space: normal !important;
    }
    
    .card-header-responsive img {
        width: 40px !important;
        height: 40px !important;
        margin-left: 10px !important;
    }
    
    .error-code-responsive {
        font-size: 1rem !important;
        padding: 8px 12px !important;
        min-width: 70px !important;
    }
    
    .error-table-responsive th,
    .error-table-responsive td {
        padding: 12px 10px !important;
        font-size: 0.9rem;
    }
    
    .model-card-responsive {
        padding: 15px !important;
    }
}

/* انیمیشن باز شدن کارت */
@keyframes slideDown {
    from {
        opacity: 0;
        max-height: 0;
    }
    to {
        opacity: 1;
        max-height: 5000px;
    }
}

.card-content-responsive {
    animation: slideDown 0.4s ease-out;
}

/* برای جلوگیری از قطع شدن در ستون‌ها */
.model-card-responsive {
    break-inside: avoid;
    page-break-inside: avoid;
}

/* اسکرول نرم برای موبایل */
.error-table-responsive {
    -webkit-overflow-scrolling: touch;
}

/* استایل برای زمانی که کارت باز است */
.brand-card-responsive.open {
    z-index: 100;
    position: relative;
}
/* ==================== */
/* FEEDBACK SECTION */
/* ==================== */

.feedback-section {
    background: #f8f9fa;
    padding: 60px 20px;
    border-top: 1px solid #e9ecef;
}

.feedback-container {
    max-width: 800px;
    margin: 0 auto;
    background: #fff;
    border-radius: 15px;
    padding: 30px;
    box-shadow: 0 5px 15px rgba(0,0,0,0.05);
    border: 1px solid #eaeaea;
}

.feedback-header {
    text-align: center;
    margin-bottom: 30px;
    padding-bottom: 20px;
    border-bottom: 2px dashed #eee;
}

.feedback-header h3 {
    font-size: 1.4rem;
    color: #2c3e50;
    margin-bottom: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
}

.feedback-header p {
    color: #6c757d;
    font-size: 1rem;
    line-height: 1.6;
}

.feedback-box {
    padding: 20px;
}

.star-rating {
    text-align: center;
    margin-bottom: 25px;
}

.stars {
    display: inline-flex;
    direction: ltr;
    gap: 5px;
    margin-bottom: 10px;
}

.star {
    font-size: 2.5rem;
    color: #ccc;
    cursor: pointer;
    transition: all 0.2s ease;
    user-select: none;
}

.star:hover,
.star.active {
    color: #FFC107;
    text-shadow: 0 0 10px rgba(255, 193, 7, 0.3);
    transform: scale(1.1);
}

.rating-text {
    font-size: 0.9rem;
    color: #6c757d;
    margin-top: 5px;
    text-align: center;
}

.feedback-buttons {
    display: flex;
    justify-content: center;
    gap: 15px;
    margin-top: 30px;
    flex-wrap: wrap;
}

.feedback-btn {
    padding: 12px 25px;
    border-radius: 50px;
    font-weight: 600;
    font-size: 0.95rem;
    transition: all 0.3s ease;
    border: 2px solid transparent;
    cursor: pointer;
}

.missing-code-btn {
    background: #fff3cd;
    color: #856404;
    border-color: #ffeaa7;
}

.missing-code-btn:hover {
    background: #ffeaa7;
    transform: translateY(-3px);
    box-shadow: 0 5px 15px rgba(255, 193, 7, 0.2);
}

.send-feedback-btn {
    background: #d1ecf1;
    color: #0c5460;
    border-color: #bee5eb;
}

.send-feedback-btn:hover {
    background: #bee5eb;
    transform: translateY(-3px);
    box-shadow: 0 5px 15px rgba(23, 162, 184, 0.2);
}

.thank-you-message {
    text-align: center;
    margin-top: 20px;
    padding: 15px;
    background: #d4edda;
    color: #155724;
    border-radius: 10px;
    display: none;
    font-weight: 600;
    animation: fadeIn 0.5s ease;
}

.thank-you-message i {
    color: #28a745;
    font-size: 1.2rem;
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(10px); }
    to { opacity: 1; transform: translateY(0); }
}

/* ==================== */
/* ENAMAD SECTION */
/* ==================== */

.enamad-section {
    background: #f8f9fa;
    padding: 40px 0;
    text-align: center;
    border-top: 1px solid #e9ecef;
}

.enamad-container {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 15px;
}

.enamad-text {
    color: var(--gray);
    font-size: 0.9rem;
}

/* ==================== */
/* FOOTER STYLES - کاملا اصلاح شده */
/* ==================== */

.footer {
    background-color: #243447;
    background-image:
        linear-gradient(45deg, rgba(255,255,255,0.04) 25%, transparent 25%),
        linear-gradient(-45deg, rgba(255,255,255,0.04) 25%, transparent 25%),
        linear-gradient(45deg, transparent 75%, rgba(255,255,255,0.04) 75%),
        linear-gradient(-45deg, transparent 75%, rgba(255,255,255,0.04) 75%);
    background-size: 22px 22px;
    background-position: 0 0, 0 11px, 11px -11px, -11px 0;
    background-repeat: repeat;
    padding: 50px 0 20px;
    font-family: 'Vazirmatn', sans-serif;
    color: #fff;
    border-top: 3px solid #667eea;
    direction: rtl;
    text-align: center;
}

.footer .container {
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 15px;
}

.footer-content {
    display: flex;
    justify-content: space-around;
    align-items: flex-start;
    flex-wrap: wrap;
    gap: 20px;
    margin-bottom: 30px;
}

/* ستون‌ها */
.footer-column {
    flex: 1;
    min-width: 250px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: flex-start;
    padding: 0 10px;
}

/* ==================== */
/* ستون چپ - کاملا اصلاح شده */
/* ==================== */
.footer-left-col {
    align-items: center;
    text-align: center;
}

.footer-links-wrapper {
    display: flex;
    flex-direction: column;
    align-items: center;
    width: 100%;
    max-width: 220px;
}

/* فونت "لینک‌های مفید" بسیار کوچک و یکدست */
.footer-links-title {
    font-weight: 500;
    font-size: 9px !important;
    margin-bottom: 3px !important;
    color: #fff;
    white-space: nowrap;
    line-height: 1;
    letter-spacing: 0.3px;
    text-align: center;
    width: 100%;
}

/* خط بسیار کوتاه و یکدست - مشکل دوپاره حل شد */
.footer .footer-links-hr {
        width: 100px !important;  /* طول خط - می‌توانید تغییر دهید */
        height: 2px !important;   /* ضخامت خط */
        background: #667eea !important; /* رنگ خط */
        border: none !important;
        margin: 0 auto 15px auto !important; /* وسط‌چین و فاصله از پایین */
        border-radius: 2px !important;
        opacity: 0.9 !important;
        transition: width 0.3s ease !important;
    }

.footer-links-list {
    list-style: none;
    padding: 0;
    margin: 0 0 15px 0;
    width: 100%;
}

.footer-links-list li {
    margin-bottom: 6px;
}

/* لینک‌های فعال با ظاهر واضح */
.footer-link {
    text-decoration: none !important;
    color: #bdc3c7 !important;
    font-size: 11px;
    transition: all 0.3s ease !important;
    display: block;
    padding: 4px 8px !important;
    cursor: pointer !important;
    border-radius: 3px;
    border: 1px solid transparent !important;
    background: transparent !important;
}

.footer-link:hover {
    color: #fff !important;
    background-color: rgba(102, 126, 234, 0.15) !important;
    border-color: rgba(102, 126, 234, 0.3) !important;
    transform: translateX(-3px) !important;
}

/* ایمیل با ظاهر مخصوص */
.footer-contact-link {
    display: inline-block;
    color: #667eea !important;
    font-size: 10px;
    text-decoration: none !important;
    padding: 5px 10px !important;
    border-radius: 3px;
    background: rgba(255,255,255,0.05);
    border: 1px solid rgba(102, 126, 234, 0.2);
    margin-top: 5px;
    cursor: pointer !important;
    font-family: 'Courier New', monospace !important;
    direction: ltr !important;
    letter-spacing: 0.5px;
    transition: all 0.3s ease !important;
}

.footer-contact-link:hover {
    color: #fff !important;
    background: rgba(102, 126, 234, 0.2) !important;
    border-color: rgba(102, 126, 234, 0.4) !important;
    transform: translateY(-2px) !important;
}

/* ==================== */
/* ستون وسط: اینماد */
/* ==================== */
.footer-center-col {
    align-items: center;
}

.enamad-link {
    display: block;
    text-decoration: none;
    margin-bottom: 8px;
    transition: transform 0.3s ease;
}

.enamad-link:hover {
    transform: scale(1.05);
}

.enamad-logo {
    height: 100px;
    width: auto;
    margin: 0 auto;
    filter: brightness(0) invert(1);
    opacity: 0.9;
    display: block !important;
}

.enamad-text {
    font-size: 11px;
    color: #bdc3c7;
    margin-top: 5px;
}

/* ==================== */
/* ستون راست: لوگو + متن */
/* ==================== */
.footer-right-col {
    align-items: center;
}

.footer-logo {
    height: 60px;
    width: auto;
    margin-bottom: 10px;
    filter: brightness(0) invert(1);
    opacity: 0.9;
}

.footer-logo-text {
    font-size: 12px;
    line-height: 1.5;
    color: #bdc3c7;
    max-width: 220px;
}

/* ==================== */
/* پایین فوتر */
/* ==================== */
.footer-bottom {
    text-align: center;
    font-size: 11px;
    color: #95a5a6;
    padding-top: 20px;
    border-top: 1px solid rgba(255,255,255,0.1);
    width: 100%;
    margin-top: 25px;
}

/* ==================== */
/* ریسپانسیو موبایل */
/* ==================== */
@media (max-width: 768px) {
    .footer-content {
        flex-direction: column;
        align-items: center;
        gap: 30px;
    }
    
    .footer-column {
        width: 100%;
        max-width: 280px;
    }
    
    .footer-links-title {
        font-size: 8px;
    }
    
    .footer-links-hr {
        width: 8px;
    }
    
    .footer-link {
        font-size: 10px;
    }
    
    .footer-contact-link {
        font-size: 9px;
    }
    
    .enamad-logo {
        height: 90px;
    }
    
    .footer-logo {
        height: 50px;
    }
}

/* ==================== */
/* استایل‌های اضافی */
/* ==================== */

.app-promo-btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background: linear-gradient(135deg, var(--success), #20c997);
    color: white;
    padding: 10px 20px;
    border-radius: 25px;
    text-decoration: none;
    font-weight: 600;
    font-size: 0.9rem;
    transition: var(--transition);
    margin-top: 10px;
    box-shadow: 0 3px 10px rgba(40, 167, 69, 0.3);
}

.app-promo-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(40, 167, 69, 0.4);
    color: white;
}

.app-promo-banner {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 25px;
    border-radius: 15px;
    margin-bottom: 30px;
    box-shadow: 0 10px 30px rgba(102, 126, 234, 0.3);
    border: 2px solid rgba(255, 255, 255, 0.2);
    animation: fadeInUp 0.8s ease-out;
}

.promo-content {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
    flex-wrap: wrap;
}

.promo-content i {
    font-size: 2.5rem;
    opacity: 0.9;
}

.promo-text {
    flex: 1;
    min-width: 250px;
}

.promo-text h3 {
    font-size: 1.3rem;
    margin-bottom: 8px;
    font-weight: 700;
}

.promo-text p {
    font-size: 1rem;
    opacity: 0.9;
    margin: 0;
}

.promo-btn {
    background: rgba(255, 255, 255, 0.2);
    color: white;
    padding: 12px 25px;
    border-radius: 50px;
    text-decoration: none;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 8px;
    transition: all 0.3s ease;
    border: 2px solid rgba(255, 255, 255, 0.3);
    white-space: nowrap;
}

.promo-btn:hover {
    background: rgba(255, 255, 255, 0.3);
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.2);
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.coming-soon-card {
    position: relative;
    cursor: not-allowed;
    opacity: 0.8;
}

.coming-soon-card:hover {
    transform: none !important;
    box-shadow: var(--shadow) !important;
}

.coming-soon-badge {
    background: linear-gradient(135deg, var(--warning), #ff9800);
    color: white;
    padding: 8px 16px;
    border-radius: 25px;
    font-size: 0.9rem;
    font-weight: bold;
    margin-top: 15px;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    box-shadow: 0 3px 10px rgba(255, 193, 7, 0.3);
    animation: pulse 2s infinite;
}

@keyframes pulse {
    0% {
        transform: scale(1);
        box-shadow: 0 3px 10px rgba(255, 193, 7, 0.3);
    }
    50% {
        transform: scale(1.05);
        box-shadow: 0 5px 15px rgba(255, 193, 7, 0.5);
    }
    100% {
        transform: scale(1);
        box-shadow: 0 3px 10px rgba(255, 193, 7, 0.3);
    }
}

/* ==================== */
/* MEDIA QUERIES */
/* ==================== */

@media (max-width: 992px) {
    .app-container {
        flex-direction: column;
        gap: 30px;
    }
    
    .app-image, .app-content {
        flex: none;
        width: 100%;
    }
    
    .app-content h2 {
        font-size: 1.8rem;
    }
}

@media (max-width: 768px) {
    .alopk-main-text {
        font-size: 16px;
    }

    .alopk-sub-text {
        font-size: 12px;
    }
    
    .alopk-header-container {
        flex-direction: row;
        justify-content: space-between;
        text-align: center;
        gap: 10px;
        padding: 0 16px;
    }
    
    .alopk-btn {
        padding: 8px 16px;
        font-size: 0.8em;
    }

    .nav-menu {
        position: fixed;
        top: 70px;
        right: -100%;
        flex-direction: column;
        background: #243447;
        background-image:
            linear-gradient(45deg, rgba(255,255,255,0.04) 25%, transparent 25%),
            linear-gradient(-45deg, rgba(255,255,255,0.04) 25%, transparent 25%),
            linear-gradient(45deg, transparent 75%, rgba(255,255,255,0.04) 75%),
            linear-gradient(-45deg, transparent 75%, rgba(255,255,255,0.04) 75%);
        background-size: 22px 22px;
        background-position: 0 0, 0 11px, 11px -11px, -11px 0;
        background-repeat: repeat;
        width: 80%;
        height: calc(100vh - 70px);
        padding: 30px;
        box-shadow: -5px 0 15px rgba(0, 0, 0, 0.1);
        transition: var(--transition);
        gap: 20px;
        display: flex;
    }

    .nav-menu.active {
        right: 0;
    }

    .hamburger {
        display: flex;
        order: -1;
        margin-right: auto;
    }

    .hamburger.active span:nth-child(1) {
        transform: rotate(45deg) translate(5px, 5px);
    }

    .hamburger.active span:nth-child(2) {
        opacity: 0;
    }

    .hamburger.active span:nth-child(3) {
        transform: rotate(-45deg) translate(7px, -6px);
    }

    .hero {
        padding: 140px 0 60px;
    }

    .hero h1 {
        font-size: 2.2rem;
    }

    .hero p {
        font-size: 1rem;
    }

    .section {
        padding: 60px 0;
    }

    .section-title h2 {
        font-size: 1.8rem;
    }

    .date-container {
        gap: 8px;
    }

    .date-icon {
        font-size: 1.1rem;
    }

    .date-text {
        font-size: 1rem;
    }

    .floating-support {
        left: 15px;
        bottom: 15px;
    }

    .support-content {
        width: 260px;
    }
    
    .app-content h2 {
        font-size: 1.6rem;
    }

    /* رسپانسیو برای برندها */
    .brands-grid {
        grid-template-columns: repeat(auto-fit, minmax(130px, 1fr));
        gap: 10px;
    }
    
    .brand-card {
        padding: 12px 8px;
        min-height: 120px;
    }
    
    .brand-logo {
        width: 45px;
        height: 45px;
    }
    
    .brand-card h3 {
        font-size: 0.85rem;
    }

    .error-codes-grid {
        grid-template-columns: 1fr;
    }
    
    .brand-error-header {
        flex-direction: column;
        text-align: center;
        gap: 10px;
    }
    
    .brand-error-count {
        margin-right: 0;
    }

    .brands-filter {
        gap: 8px;
    }

    .filter-btn {
        padding: 8px 16px;
        font-size: 0.85rem;
    }
    
    .promo-content {
        flex-direction: column;
        text-align: center;
    }
    
    .promo-text {
        min-width: auto;
    }
    
    .promo-btn {
        width: 100%;
        justify-content: center;
    }
    
    .feedback-container {
        padding: 20px;
    }
    
    .feedback-header h3 {
        font-size: 1.2rem;
    }
    
    .star {
        font-size: 2rem;
    }
    
    .feedback-buttons {
        flex-direction: column;
        align-items: center;
    }
    
    .feedback-btn {
        width: 100%;
        max-width: 280px;
    }
}

@media (max-width: 576px) {
    .hero {
        padding: 120px 0 40px;
    }

    .hero h1 {
        font-size: 1.8rem;
    }

    .hero-buttons {
        flex-direction: column;
        align-items: center;
    }

    .btn {
        width: 100%;
        max-width: 280px;
    }

    .features-grid {
        grid-template-columns: 1fr;
    }

    .section-title h2 {
        font-size: 1.6rem;
    }
    
    .app-content h2 {
        font-size: 1.4rem;
    }

    /* رسپانسیو برای برندها در موبایل */
    .brands-grid {
        grid-template-columns: repeat(3, 1fr);
        gap: 8px;
    }
    
    .brand-card {
        min-height: 110px;
        padding: 10px 5px;
    }
    
    .brand-logo {
        width: 40px;
        height: 40px;
    }
    
    .brand-card h3 {
        font-size: 0.8rem;
    }

    .brand-card p {
        font-size: 0.7rem;
    }
    
    .feedback-section {
        padding: 40px 10px;
    }
    
    .feedback-header h3 {
        font-size: 1.1rem;
        flex-direction: column;
        gap: 5px;
    }
    
    .feedback-question p {
        font-size: 1rem;
    }
}

/* ==================== */
/* استایل‌های جدید برای کارت‌های کد خطا */
/* ==================== */

/* بهبود نمایش کارت‌ها در موبایل */
@media (max-width: 767px) {
    .brand-error-section {
        margin-bottom: 20px !important;
        border-radius: 10px !important;
    }
    
    .brand-error-header {
        padding: 15px !important;
        flex-wrap: wrap !important;
    }
    
    .brand-error-logo {
        width: 45px !important;
        height: 45px !important;
    }
    
    .brand-error-title {
        font-size: 1.1rem !important;
        line-height: 1.3 !important;
    }
    
    .brand-error-count {
        font-size: 0.8rem !important;
        padding: 3px 10px !important;
        margin-top: 5px !important;
        order: 3;
        width: 100%;
        text-align: center;
    }
    
    .brand-toggle {
        width: 25px !important;
        height: 25px !important;
        font-size: 0.9rem !important;
    }
}

/* نمایش عمودی کدهای خطا (بدون نیاز به اسکرول افقی) */
.error-codes-vertical {
    display: flex;
    flex-direction: column;
    gap: 15px;
    width: 100%;
    max-width: 100%;
    overflow: visible;
}

.error-item-vertical {
    background: #f8f9fa;
    border-radius: 10px;
    padding: 15px;
    border: 1px solid #e9ecef;
    display: flex;
    flex-direction: column;
    gap: 10px;
    transition: all 0.3s ease;
    word-break: break-word;
    overflow-wrap: break-word;
    break-inside: avoid;
}

.error-item-vertical:hover {
    background: #f1f3f5;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0,0,0,0.1);
}

.error-code-main {
    display: flex;
    align-items: center;
    gap: 15px;
    flex-wrap: wrap;
    margin-bottom: 8px;
    padding-bottom: 8px;
    border-bottom: 1px dashed #dee2e6;
}

.error-code-badge-vertical {
    background: linear-gradient(135deg, #ff416c 0%, #ff4b2b 100%);
    color: white;
    padding: 10px 15px;
    border-radius: 8px;
    font-family: 'Courier New', monospace;
    font-weight: bold;
    font-size: 1.2rem;
    min-width: 80px;
    text-align: center;
    box-shadow: 0 3px 8px rgba(255, 65, 108, 0.2);
    flex-shrink: 0;
}

.error-severity-badge {
    padding: 6px 15px;
    border-radius: 20px;
    font-size: 0.85rem;
    font-weight: 600;
    display: inline-flex;
    align-items: center;
    gap: 5px;
}

.severity-critical {
    background: linear-gradient(135deg, #dc3545 0%, #c82333 100%);
    color: white;
}

.severity-high {
    background: linear-gradient(135deg, #fd7e14 0%, #e8590c 100%);
    color: white;
}

.severity-medium {
    background: linear-gradient(135deg, #ffc107 0%, #e0a800 100%);
    color: #212529;
}

.severity-low {
    background: linear-gradient(135deg, #28a745 0%, #218838 100%);
    color: white;
}

.severity-info {
    background: linear-gradient(135deg, #17a2b8 0%, #138496 100%);
    color: white;
}

.error-description-vertical {
    color: #495057;
    line-height: 1.7;
    font-size: 0.95rem;
    padding: 10px 0;
    text-align: justify;
    width: 100%;
}

/* بستن سایر کارت‌ها */
.brand-error-section.active {
    z-index: 10;
    position: relative;
}

/* هایلایت کارت انتخاب شده */
.brand-error-section.highlighted {
    animation: pulse-highlight 2s ease-in-out;
    box-shadow: 0 0 0 3px #4CAF50, 0 10px 30px rgba(0,0,0,0.15) !important;
}

@keyframes pulse-highlight {
    0%, 100% { box-shadow: 0 0 0 0 rgba(76, 175, 80, 0.3); }
    50% { box-shadow: 0 0 0 10px rgba(76, 175, 80, 0.1); }
}

/* استایل برای باز کردن خودکار در موبایل */
@media (max-width: 767px) {
    .brand-error-content {
        max-height: none !important;
        transition: all 0.4s ease !important;
    }
    
    .error-item-vertical {
        padding: 12px !important;
    }
    
    .error-code-badge-vertical {
        font-size: 1.1rem !important;
        padding: 8px 12px !important;
        min-width: 70px !important;
    }
    
    .error-description-vertical {
        font-size: 0.9rem !important;
        line-height: 1.6 !important;
    }
}

/* ============================================ */
/* استایل‌های ضروری برای کارت‌های کد خطا */
/* ============================================ */

/* بازسازی کامل نمایش کدهای خطا */
.brand-error-content table {
    display: none !important; /* مخفی کردن جدول قدیمی */
}

/* نمایش جدید عمودی کدهای خطا */
.error-codes-vertical-container {
    display: flex !important;
    flex-direction: column !important;
    gap: 15px !important;
    width: 100% !important;
    margin-top: 15px !important;
}

.error-card-vertical {
    background: white !important;
    border-radius: 12px !important;
    padding: 20px !important;
    border: 2px solid #e9ecef !important;
    box-shadow: 0 3px 10px rgba(0,0,0,0.08) !important;
    transition: all 0.3s ease !important;
    break-inside: avoid !important;
    page-break-inside: avoid !important;
}

.error-card-vertical:hover {
    transform: translateY(-3px) !important;
    box-shadow: 0 6px 20px rgba(0,0,0,0.12) !important;
    border-color: #667eea !important;
}

.error-code-display {
    display: flex !important;
    flex-direction: column !important;
    gap: 12px !important;
    width: 100% !important;
}

.error-code-header {
    display: flex !important;
    align-items: center !important;
    gap: 15px !important;
    flex-wrap: wrap !important;
    padding-bottom: 12px !important;
    border-bottom: 2px dashed #dee2e6 !important;
    margin-bottom: 12px !important;
}

.error-code-number {
    background: linear-gradient(135deg, #ff416c 0%, #ff4b2b 100%) !important;
    color: white !important;
    padding: 12px 20px !important;
    border-radius: 10px !important;
    font-family: 'Courier New', monospace !important;
    font-weight: bold !important;
    font-size: 1.3rem !important;
    min-width: 100px !important;
    text-align: center !important;
    box-shadow: 0 4px 10px rgba(255, 65, 108, 0.3) !important;
    flex-shrink: 0 !important;
}

.error-severity-tag {
    padding: 8px 18px !important;
    border-radius: 25px !important;
    font-size: 0.9rem !important;
    font-weight: 700 !important;
    display: inline-flex !important;
    align-items: center !important;
    gap: 8px !important;
    text-transform: uppercase !important;
    letter-spacing: 0.5px !important;
}

.severity-critical {
    background: linear-gradient(135deg, #dc3545 0%, #c82333 100%) !important;
    color: white !important;
}

.severity-high {
    background: linear-gradient(135deg, #fd7e14 0%, #e8590c 100%) !important;
    color: white !important;
}

.severity-medium {
    background: linear-gradient(135deg, #ffc107 0%, #e0a800 100%) !important;
    color: #212529 !important;
}

.severity-low {
    background: linear-gradient(135deg, #28a745 0%, #218838 100%) !important;
    color: white !important;
}

.severity-info {
    background: linear-gradient(135deg, #17a2b8 0%, #138496 100%) !important;
    color: white !important;
}

.error-description-text {
    color: #2c3e50 !important;
    line-height: 1.8 !important;
    font-size: 1rem !important;
    padding: 15px !important;
    background: #f8f9fa !important;
    border-radius: 10px !important;
    border-right: 4px solid #667eea !important;
    text-align: justify !important;
    word-break: break-word !important;
    overflow-wrap: break-word !important;
    white-space: pre-line !important;
}

/* استایل برای موبایل */
@media (max-width: 768px) {
    .error-card-vertical {
        padding: 15px !important;
        margin-bottom: 10px !important;
    }
    
    .error-code-number {
        font-size: 1.1rem !important;
        padding: 10px 15px !important;
        min-width: 80px !important;
    }
    
    .error-severity-tag {
        font-size: 0.8rem !important;
        padding: 6px 12px !important;
    }
    
    .error-description-text {
        font-size: 0.9rem !important;
        padding: 12px !important;
        line-height: 1.6 !important;
    }
    
    .error-code-header {
        gap: 10px !important;
        padding-bottom: 10px !important;
        margin-bottom: 10px !important;
    }
}

/* هایلایت کارت انتخاب شده */
.brand-error-section.brand-highlighted {
    animation: highlightGlow 2s ease-in-out !important;
    box-shadow: 0 0 0 3px #4CAF50, 0 10px 35px rgba(76, 175, 80, 0.25) !important;
    position: relative !important;
    z-index: 100 !important;
}

@keyframes highlightGlow {
    0%, 100% { 
        box-shadow: 0 0 0 0 rgba(76, 175, 80, 0), 0 5px 15px rgba(0,0,0,0.1) !important; 
    }
    50% { 
        box-shadow: 0 0 0 8px rgba(76, 175, 80, 0.15), 0 10px 35px rgba(76, 175, 80, 0.3) !important; 
    }
}

/* استایل برای کارت باز - بستن سایر کارت‌ها */
.brand-error-section.brand-open {
    z-index: 50 !important;
}

.brand-error-section:not(.brand-open) .brand-error-content {
    display: none !important;
    max-height: 0 !important;
    overflow: hidden !important;
}

.brand-error-section.brand-open .brand-error-content {
    display: block !important;
    max-height: 5000px !important;
    animation: fadeInUp 0.5s ease-out !important;
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* بهبود آیکون toggle */
.brand-toggle i {
    transition: transform 0.3s ease !important;
}

.brand-error-section.brand-open .brand-toggle i {
    transform: rotate(180deg) !important;
}

/* ============================================ */
/* اصلاحات نهایی برای کارت‌های کد خطا */
/* ============================================ */

/* برداشتن محدودیت ارتفاع و فعال کردن اسکرول داخلی */
.brand-error-content {
    max-height: none !important;
    overflow-y: auto !important;
    max-height: 80vh !important;
    padding: 15px !important;
}

/* استایل اسکرول داخلی */
.brand-error-content::-webkit-scrollbar {
    width: 8px !important;
}

.brand-error-content::-webkit-scrollbar-track {
    background: #f1f1f1 !important;
    border-radius: 10px !important;
}

.brand-error-content::-webkit-scrollbar-thumb {
    background: #667eea !important;
    border-radius: 10px !important;
}

.brand-error-content::-webkit-scrollbar-thumb:hover {
    background: #5a6fd8 !important;
}

/* بهبود نمایش کارت کد خطا - انعطاف پذیر */
.error-card-vertical {
    min-height: auto !important;
    max-height: none !important;
    overflow: visible !important;
}

.error-code-display {
    display: flex !important;
    flex-direction: column !important;
    gap: 15px !important;
    width: 100% !important;
}

/* نمایش کد خطا و سطح بندی در دو سطر مجزا */
.error-code-header {
    display: flex !important;
    flex-direction: column !important;
    align-items: flex-start !important;
    gap: 10px !important;
    padding-bottom: 15px !important;
    border-bottom: 2px dashed #dee2e6 !important;
    margin-bottom: 15px !important;
}

.error-code-number {
    font-size: 1.4rem !important;
    padding: 12px 25px !important;
    min-width: 120px !important;
    max-width: 100% !important;
    word-break: break-all !important;
    white-space: normal !important;
    line-height: 1.3 !important;
    text-align: center !important;
}

/* بهبود سطح بندی */
.error-severity-tag {
    padding: 10px 20px !important;
    font-size: 1rem !important;
    margin-top: 5px !important;
    width: fit-content !important;
}

/* تغییر نام سطح‌ها */
.severity-critical .fa-exclamation-circle::before {
    content: "\f071" !important; /* آیکون خطر */
}

.severity-high .fa-exclamation-circle::before {
    content: "\f06a" !important; /* آیکون تعجب */
}

/* بهبود توضیحات طولانی */
.error-description-text {
    white-space: pre-wrap !important;
    word-wrap: break-word !important;
    overflow-wrap: anywhere !important;
    hyphens: auto !important;
    line-height: 1.8 !important;
    text-align: right !important;
    padding: 20px !important;
    background: linear-gradient(to right, #f8f9fa, #ffffff) !important;
    border-radius: 12px !important;
    border: 1px solid #e9ecef !important;
    box-shadow: inset 0 2px 4px rgba(0,0,0,0.05) !important;
}

/* اسکرول نرم برای محتوای طولانی */
.brand-error-content {
    scroll-behavior: smooth !important;
    -webkit-overflow-scrolling: touch !important;
}

/* تنظیم اسکرول به ابتدای کارت */
.brand-error-section.scroll-to-top {
    scroll-margin-top: 120px !important;
}

/* استایل برای موبایل */
@media (max-width: 768px) {
    .brand-error-content {
        max-height: 70vh !important;
        padding: 10px !important;
    }
    
    .error-code-number {
        font-size: 1.2rem !important;
        padding: 10px 15px !important;
        min-width: 100px !important;
    }
    
    .error-severity-tag {
        font-size: 0.9rem !important;
        padding: 8px 15px !important;
    }
    
    .error-description-text {
        padding: 15px !important;
        font-size: 0.95rem !important;
        line-height: 1.7 !important;
    }
    
    .brand-error-section.scroll-to-top {
        scroll-margin-top: 100px !important;
    }
}

/* استایل برای کدهای طولانی */
.error-code-long {
    font-size: 1.1rem !important;
    padding: 10px 15px !important;
    min-width: auto !important;
    width: 100% !important;
    text-align: center !important;
}

/* نمایش کد و سطح در دو خط */
.error-code-two-line {
    display: flex !important;
    flex-direction: column !important;
    gap: 8px !important;
    width: 100% !important;
}

/* ============================================ */
/* اصلاحات نهایی - وسط چین کردن محتوا */
/* ============================================ */

/* وسط چین کردن کل محتوای کارت */
.brand-error-content {
    text-align: center !important;
    display: flex !important;
    flex-direction: column !important;
    align-items: center !important;
}

/* وسط چین کردن کانتینر کدهای خطا */
.error-codes-vertical-container {
    width: 100% !important;
    max-width: 800px !important;
    margin: 0 auto !important;
    align-items: center !important;
}

/* وسط چین کردن کارت هر کد خطا */
.error-card-vertical {
    width: 100% !important;
    max-width: 700px !important;
    margin: 0 auto 15px auto !important;
    display: flex !important;
    flex-direction: column !important;
    align-items: center !important;
}

/* وسط چین کردن هدر کد خطا */
.error-code-header {
    align-items: center !important;
    text-align: center !important;
}

/* وسط چین کردن کد خطا */
.error-code-number,
.error-code-long {
    margin: 0 auto !important;
    display: block !important;
}

/* وسط چین کردن سطح بندی */
.error-severity-tag {
    margin: 10px auto !important;
    display: inline-block !important;
}

/* وسط چین کردن توضیحات */
.error-description-text {
    text-align: center !important;
    direction: rtl !important;
    text-align: justify !important;
    text-align-last: center !important;
}

/* وسط چین برای حالت دوخطی */
.error-code-two-line {
    align-items: center !important;
    text-align: center !important;
}

/* وسط چین کردن عنوان مدل */
.model-section h4.model-title {
    justify-content: center !important;
    text-align: center !important;
}

/* برای موبایل */
@media (max-width: 768px) {
    .error-card-vertical {
        max-width: 95% !important;
    }
    
    .error-description-text {
        text-align: center !important;
        text-align-last: center !important;
    }
}

/* جلوگیری از اعمال فونت Vazirmatn روی تاریخ */
#date-container,
#current-date,
#date-container * {
    font-family: Tahoma, Arial, sans-serif !important;
    font-feature-settings: normal !important;
    font-variant-ligatures: normal !important;
    text-rendering: auto !important;
}

/* غیرفعال کردن ویژگی‌های RTL فونت برای تاریخ */
#current-date {
    unicode-bidi: plaintext !important;
    direction: rtl !important;
}

.survey-results {
    background: #f8f9fa;
    border-radius: 10px;
    padding: 15px;
    margin: 15px 0;
    border: 1px solid #e0e0e0;
}

.results-summary {
    margin-bottom: 20px;
}

.stats {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: 15px;
    margin-top: 10px;
}

.stat-item {
    background: white;
    padding: 10px;
    border-radius: 8px;
    text-align: center;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.stat-label {
    display: block;
    color: #666;
    font-size: 12px;
    margin-bottom: 5px;
}

.stat-value {
    font-size: 24px;
    font-weight: bold;
    color: #2c3e50;
}

.rating-distribution {
    margin: 20px 0;
}

.distribution-bars {
    margin-top: 10px;
}

.bar-row {
    display: flex;
    align-items: center;
    margin: 8px 0;
    gap: 10px;
}

.bar-label {
    width: 70px;
    font-size: 14px;
}

.bar-container {
    flex: 1;
    height: 20px;
    background: #e0e0e0;
    border-radius: 10px;
    overflow: hidden;
}

.bar-fill {
    height: 100%;
    background: linear-gradient(90deg, #4CAF50, #8BC34A);
    width: 0%;
    transition: width 1s ease;
}

.bar-percentage {
    width: 40px;
    text-align: right;
    font-weight: bold;
}

.recent-comments {
    max-height: 200px;
    overflow-y: auto;
    border-top: 1px solid #ddd;
    padding-top: 15px;
}

.comment-item {
    background: white;
    padding: 10px;
    margin: 8px 0;
    border-radius: 6px;
    border-right: 3px solid #4CAF50;
}

.comment-author {
    font-weight: bold;
    color: #2c3e50;
    margin-bottom: 5px;
}

.comment-text {
    color: #555;
    font-size: 14px;
}

.toggle-results-btn {
    width: 100%;
    padding: 10px;
    background: #6c757d;
    color: white;
    border: none;
    border-radius: 5px;
    cursor: pointer;
    margin-top: 15px;
    transition: background 0.3s;
}

.toggle-results-btn:hover {
    background: #5a6268;
}

/* در فایل CSS یا بخش <style> کد قبلی، این قسمت‌ها را جایگزین کنید */

/* رنگ‌های واقعی و دقیق اپلیکیشن‌ها - نسخه بهبود یافته */
.platform-link.bale-real {
    background: linear-gradient(145deg, 
        #00A65A 0%,      /* سبز اصلی بله */
        #008F4E 30%,     /* سبز تیره‌تر */
        #007D44 100%     /* سبز تیره */
    );
    box-shadow: 
        0 10px 30px rgba(0, 166, 90, 0.25),
        inset 0 1px 1px rgba(255, 255, 255, 0.3);
}

.platform-link.eitaa-real {
    background: linear-gradient(145deg, 
        #FF6B35 0%,      /* نارنجی اصلی ایتا */
        #FF5722 30%,     /* نارنجی تیره‌تر */
        #FF4500 100%     /* نارنجی پررنگ */
    );
    box-shadow: 
        0 10px 30px rgba(255, 107, 53, 0.25),
        inset 0 1px 1px rgba(255, 255, 255, 0.3);
}

.platform-link.telegram-real {
    background: linear-gradient(145deg, 
        #0088CC 0%,      /* آبی اصلی تلگرام */
        #0077B3 30%,     /* آبی تیره‌تر */
        #006699 100%     /* آبی تیره */
    );
    box-shadow: 
        0 10px 30px rgba(0, 136, 204, 0.25),
        inset 0 1px 1px rgba(255, 255, 255, 0.3);
}

/* افکت hover با رنگ‌های متناسب و درخشان */
.platform-link.bale-real:hover {
    box-shadow: 
        0 18px 40px rgba(0, 166, 90, 0.4),
        0 0 30px rgba(0, 166, 90, 0.3),
        inset 0 1px 1px rgba(255, 255, 255, 0.4);
}

.platform-link.eitaa-real:hover {
    box-shadow: 
        0 9px 20px rgba(255, 107, 53, 0.4),
        0 0 30px rgba(255, 107, 53, 0.3),
        inset 0 1px 1px rgba(255, 255, 255, 0.4);
}

.platform-link.telegram-real:hover {
    box-shadow: 
        0 18px 40px rgba(0, 136, 204, 0.4),
        0 0 30px rgba(0, 136, 204, 0.3),
        inset 0 1px 1px rgba(255, 255, 255, 0.4);
}

/* اضافه کردن درخشش نرم به لوگوها */
.platform-link.bale-real .platform-logo {
    filter: 
        drop-shadow(0 6px 12px rgba(0, 166, 90, 0.4))
        brightness(1.1);
}

.platform-link.eitaa-real .platform-logo {
    filter: 
        drop-shadow(0 4px 8px rgba(255, 107, 53, 0.4))
        brightness(1.1);
}

.platform-link.telegram-real .platform-logo {
    filter: 
        drop-shadow(0 6px 12px rgba(0, 136, 204, 0.4))
        brightness(1.1);
}

.platform-link.eitaa-real .platform-logo {
    /* سایه سفید ضخیم دور لوگو */
    filter: 
        drop-shadow(0 0 2px #fff)
        drop-shadow(0 0 4px #fff)
        drop-shadow(0 0 6px #fff)
        drop-shadow(0 4px 8px rgba(255, 107, 53, 0.4));
    
    /* یا از outline استفاده کنید */
    outline: 3px solid rgba(255, 255, 255, 0.7);
    outline-offset: -2px;
    border-radius: 8px;
}

/* حالت hover */
.platform-link.eitaa-real:hover .platform-logo {
    filter: 
        drop-shadow(0 0 4px #fff)
        drop-shadow(0 0 8px #fff)
        drop-shadow(0 0 12px #fff)
        drop-shadow(0 4px 8px rgba(255, 107, 53, 0.6));
    outline: 4px solid rgba(255, 255, 255, 0.9);
}

/* حالت hover لوگوها */
.platform-link.bale-real:hover .platform-logo {
    filter: 
        drop-shadow(0 8px 16px rgba(0, 166, 90, 0.6))
        brightness(1.2);
}

.platform-link.telegram-real:hover .platform-logo {
    filter: 
        drop-shadow(0 8px 16px rgba(0, 136, 204, 0.6))
        brightness(1.2);
}

.approved-comment {
    background-color: #f9f9f9;
    border-radius: 10px;
    padding: 15px;
    margin-bottom: 20px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    font-family: 'Vazirmatn', sans-serif;
    text-align: center; /* وسط‌چین کردن متن */
}

/* استایل ستاره‌ها */
.rating {
    font-size: 20px;
    color: #ffcc00;
    margin-bottom: 10px;
}

/* متن نظر */
.comment-text {
    font-size: 16px;
    line-height: 1.6;
    color: #333;
    margin-bottom: 15px;
    text-align: center; /* وسط‌چین کردن متن */
}

/* برند، مدل و کد خطا */
.comment-meta {
    font-size: 14px;
    color: #666;
    margin-top: 10px;
    text-align: center; /* وسط‌چین کردن متن */
}

/* تاریخ ارسال */
.comment-date {
    font-size: 12px;
    color: #aaa;
    text-align: center;
    margin-top: 10px;
}

/* ریسپانسیو */
@media (max-width: 768px) {
    .approved-comment {
        padding: 10px;
        margin-bottom: 15px;
    }

    .rating {
        font-size: 18px;
    }

    .comment-text {
        font-size: 14px;
    }

    .comment-meta {
        font-size: 12px;
    }

    .comment-date {
        font-size: 10px;
    }
}

/* مخفی کردن همه کارت‌ها به صورت پیش‌فرض */
.brand-card {
    display: none;
}

/* استایل هایلایت کردن کارت برند */
.highlighted-brand-card {
    border: 2px solid #4CAF50 !important;
    box-shadow: 0 0 15px rgba(76, 175, 80, 0.6) !important;
    transition: all 0.3s ease;
}
