/* ============================================
   استایل‌های اصلی سایت حقوق ورزشی توسا
   ============================================ */

/* --- فونت و تنظیمات پایه --- */
body {
    font-family: 'Vazirmatn', sans-serif;
    background-color: #f8fafc;
    color: #1e293b;
    line-height: 1.7;
    direction: rtl;
}

/* --- رنگ‌های اصلی --- */
:root {
    --primary-color: #e60000;
    --primary-hover: #c00000;
    --dark-bg: #0a1628;
    --dark-bg-light: #1a2744;
    --footer-bg: #0b1120;
    --text-muted: #6c757d;
    --border-color: #e5e7eb;
}

/* --- Navbar --- */
#mainNavbar {
    transition: all 0.3s ease;
}

#mainNavbar .navbar-brand .brand-text {
    line-height: 1.2;
}

#mainNavbar .nav-link.active {
    color: #fff !important;
    background: rgba(230, 0, 0, 0.2);
    border-radius: 8px;
}

#mainNavbar .dropdown-menu {
    border: none;
    box-shadow: 0 10px 30px rgba(0,0,0,0.15);
    border-radius: 12px;
    padding: 8px;
}

#mainNavbar .dropdown-item {
    border-radius: 8px;
    padding: 10px 16px;
    font-size: 0.9rem;
    transition: all 0.2s;
}

#mainNavbar .dropdown-item:hover {
    background: #f1f5f9;
    color: var(--primary-color);
}

/* --- Hero Section --- */
.hero-section {
    background: var(--dark-bg);
    color: white;
    padding-top: 120px;
    padding-bottom: 60px;
    position: relative;
    overflow: hidden;
}

.hero-section::before {
    content: '';
    position: absolute;
    inset: 0;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='80' height='138.564'%3E%3Cpath d='M40 0l40 23.094v46.188L40 92.376 0 69.282V23.094z' fill='none' stroke='%23ffffff' stroke-width='1'/%3E%3C/svg%3E");
    opacity: 0.03;
}

.hero-subtitle {
    color: var(--primary-color);
    font-weight: bold;
    font-size: 1.2rem;
    margin-bottom: 10px;
}

.hero-title {
    font-weight: 900;
    line-height: 1.3;
    font-size: 2.8rem;
}

.hero-title .highlight {
    color: var(--primary-color);
}

.hero-description {
    color: #cbd5e1;
    margin-top: 20px;
    line-height: 1.8;
    font-size: 1rem;
}

.hero-buttons {
    margin-top: 30px;
    display: flex;
    gap: 16px;
    flex-wrap: wrap;
}

.btn-hero-primary {
    background: var(--primary-color);
    color: white;
    padding: 12px 28px;
    border-radius: 50px;
    text-decoration: none;
    font-weight: bold;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    transition: all 0.3s;
    border: none;
    box-shadow: 0 4px 15px rgba(230, 0, 0, 0.3);
}

.btn-hero-primary:hover {
    background: var(--primary-hover);
    color: white;
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(230, 0, 0, 0.4);
}

.btn-hero-outline {
    border: 2px solid rgba(255,255,255,0.3);
    color: white;
    padding: 12px 28px;
    border-radius: 50px;
    text-decoration: none;
    font-weight: bold;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    transition: all 0.3s;
}

.btn-hero-outline:hover {
    background: rgba(255,255,255,0.1);
    color: white;
    border-color: rgba(255,255,255,0.5);
}

/* --- Hero Image & Hex Badges --- */
.hero-main-frame {
    position: relative;
    display: inline-block;
}

.hero-main-frame img {
    max-width: 100%;
    height: auto;
    border-radius: 50%;
    border: 4px solid var(--dark-bg);
    box-shadow: 0 20px 40px rgba(0,0,0,0.3);
}

.hex-badge {
    width: 100px;
    height: 115px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    position: absolute;
    clip-path: polygon(50% 0%, 100% 25%, 100% 75%, 50% 100%, 0% 75%, 0% 25%);
    transition: transform 0.3s;
    z-index: 10;
}

.hex-badge:hover {
    transform: scale(1.1);
}

.hex-badge.red {
    background: var(--primary-color);
    color: white;
}

.hex-badge.white {
    background: white;
    color: var(--dark-bg);
}

.hex-badge-top {
    top: 20px;
    right: 20px;
}

.hex-badge-middle {
    top: 50%;
    right: -20px;
    transform: translateY(-50%);
}

.hex-badge-bottom {
    bottom: 20px;
    right: 60px;
}

.hex-badge i {
    font-size: 1.5rem;
    margin-bottom: 4px;
}

.hex-number {
    font-size: 1.2rem;
    font-weight: 900;
    line-height: 1;
}

.hex-text {
    font-size: 0.7rem;
    font-weight: 500;
    margin-top: 4px;
}

/* --- Search Box --- */
.search-box-container {
    background: white;
    border-radius: 16px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.1);
    padding: 28px;
    margin-top: -40px;
    position: relative;
    z-index: 10;
    border: 1px solid var(--border-color);
}

.search-box-container h5 {
    color: var(--dark-bg);
    font-weight: bold;
}

.search-box-container .form-select,
.search-box-container .form-control {
    border: 1px solid #e2e8f0;
    border-radius: 10px;
    padding: 10px 14px;
    font-size: 0.9rem;
    transition: all 0.2s;
}

.search-box-container .form-select:focus,
.search-box-container .form-control:focus {
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(230, 0, 0, 0.1);
}

/* --- دکمه اصلی --- */
.btn-primary-custom {
    background: var(--primary-color);
    color: white;
    border: none;
    font-weight: bold;
    transition: all 0.3s;
}

.btn-primary-custom:hover {
    background: var(--primary-hover);
    color: white;
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(230, 0, 0, 0.3);
}

/* --- Section Title --- */
.section-title-wrapper {
    display: flex;
    align-items: center;
    gap: 16px;
    margin-bottom: 30px;
}

.section-title-line {
    width: 60px;
    height: 4px;
    background: var(--primary-color);
    border-radius: 2px;
}

.section-title {
    font-weight: 900;
    color: var(--dark-bg);
    font-size: 1.5rem;
    margin: 0;
    white-space: nowrap;
}

/* --- Category Icons --- */
.category-icon-box {
    width: 70px;
    height: 70px;
    background: #f1f5f9;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 10px;
    font-size: 1.8rem;
    color: var(--primary-color);
    border: 2px solid var(--primary-color);
    overflow: hidden;
    transition: all 0.3s;
}

.category-item:hover .category-icon-box {
    background: var(--primary-color);
    color: white;
    transform: translateY(-5px);
    box-shadow: 0 8px 20px rgba(230, 0, 0, 0.2);
}

.category-title {
    font-weight: bold;
    font-size: 0.9rem;
    color: var(--dark-bg);
}

/* --- Case Cards --- */
.case-card {
    border: none;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 4px 6px rgba(0,0,0,0.05);
    transition: all 0.3s;
    height: 100%;
}

.case-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 25px rgba(0,0,0,0.1);
}

.case-img-wrapper {
    position: relative;
    height: 200px;
    overflow: hidden;
}

.case-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s;
}

.case-card:hover .case-img {
    transform: scale(1.1);
}

.case-badge {
    position: absolute;
    top: 12px;
    right: 12px;
    background: var(--primary-color);
    color: white;
    font-size: 0.7rem;
    font-weight: bold;
    padding: 5px 12px;
    border-radius: 20px;
    z-index: 2;
}

.case-body {
    padding: 20px;
}

.case-title {
    font-size: 1rem;
    font-weight: bold;
    margin-bottom: 12px;
    height: 48px;
    overflow: hidden;
    color: var(--dark-bg);
    line-height: 1.5;
}

.case-meta {
    font-size: 0.8rem;
    color: var(--text-muted);
    margin-bottom: 16px;
    display: flex;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 8px;
}

.case-footer {
    border-top: 1px solid var(--border-color);
    padding-top: 12px;
}

.read-more {
    color: var(--primary-color);
    text-decoration: none;
    font-size: 0.85rem;
    font-weight: bold;
    display: inline-flex;
    align-items: center;
    gap: 4px;
    transition: all 0.2s;
}

.read-more:hover {
    color: var(--primary-hover);
    gap: 8px;
}

/* --- Stats Section --- */
.stats-section {
    background: linear-gradient(to right, var(--dark-bg), var(--dark-bg-light));
    color: white;
    padding: 50px 0;
    margin-top: 40px;
    border-radius: 16px;
}

.stat-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
}

.stat-icon-hex {
    width: 60px;
    height: 60px;
    background: rgba(230, 0, 0, 0.2);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    color: var(--primary-color);
    margin-bottom: 12px;
}

.stat-info h3 {
    font-weight: 900;
    margin-bottom: 4px;
    font-size: 1.8rem;
}

.stat-info p {
    font-size: 0.9rem;
    opacity: 0.8;
    margin: 0;
}

/* --- List Cards (News & Articles) --- */
.list-card {
    background: white;
    border-radius: 12px;
    padding: 24px;
    box-shadow: 0 4px 6px rgba(0,0,0,0.05);
    height: 100%;
    border: 1px solid var(--border-color);
}

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

.list-title {
    font-size: 1.1rem;
    font-weight: bold;
    margin: 0;
    color: var(--dark-bg);
    display: flex;
    align-items: center;
    gap: 8px;
}

.list-item {
    display: flex;
    gap: 16px;
    margin-bottom: 16px;
    padding-bottom: 16px;
    border-bottom: 1px solid #f0f0f0;
    transition: background 0.2s;
}

.list-item:last-child {
    border-bottom: none;
    margin-bottom: 0;
    padding-bottom: 0;
}

.list-item:hover {
    background: #f8fafc;
    border-radius: 8px;
    padding: 8px;
    margin: 0 -8px 16px;
}

.list-item-img {
    width: 80px;
    height: 80px;
    object-fit: cover;
    border-radius: 10px;
    flex-shrink: 0;
    border: 1px solid var(--border-color);
}

.list-item h4 {
    font-size: 0.95rem;
    font-weight: bold;
    margin-bottom: 4px;
    line-height: 1.4;
    color: var(--dark-bg);
}

.list-item p {
    font-size: 0.8rem;
    color: var(--text-muted);
    margin: 0;
    line-height: 1.5;
}

.list-item-date {
    font-size: 0.75rem;
    color: #999;
    white-space: nowrap;
}

/* --- Footer --- */
.footer-section {
    background: var(--footer-bg);
    color: #9ca3af;
    padding-top: 60px;
    padding-bottom: 30px;
    margin-top: 60px;
    border-top: 1px solid rgba(255,255,255,0.05);
}

.footer-brand {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 16px;
}

.footer-brand .brand-icon {
    width: 40px;
    height: 40px;
    background: var(--primary-color);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 1.2rem;
}

.footer-title {
    color: white;
    font-weight: bold;
    margin-bottom: 16px;
    font-size: 1.1rem;
}

.footer-links {
    list-style: none;
    padding: 0;
    margin: 0;
}

.footer-links li {
    margin-bottom: 12px;
}

.footer-links a {
    color: #9ca3af;
    text-decoration: none;
    transition: all 0.3s;
    font-size: 0.9rem;
}

.footer-links a:hover {
    color: white;
    padding-right: 5px;
}

.footer-cta {
    background: rgba(255,255,255,0.05);
    padding: 24px;
    border-radius: 16px;
    border: 1px solid rgba(255,255,255,0.1);
}

/* --- Responsive --- */
@media (max-width: 991px) {
    .hero-title {
        font-size: 2rem;
    }

    .hero-section {
        padding-top: 100px;
    }

    .hex-badge {
        width: 80px;
        height: 92px;
    }

    .hex-number {
        font-size: 1rem;
    }

    .hex-text {
        font-size: 0.6rem;
    }
}

@media (max-width: 767px) {
    .hero-title {
        font-size: 1.7rem;
    }

    .hero-buttons {
        flex-direction: column;
    }

    .btn-hero-primary,
    .btn-hero-outline {
        width: 100%;
        justify-content: center;
    }

    .section-title {
        font-size: 1.2rem;
    }

    .search-box-container {
        margin-top: -20px;
        padding: 20px;
    }

    .stat-info h3 {
        font-size: 1.4rem;
    }

    .list-item-img {
        width: 60px;
        height: 60px;
    }
}

/* --- Utilities --- */
.text-primary-custom {
    color: var(--primary-color) !important;
}

.bg-primary-custom {
    background-color: var(--primary-color) !important;
}

.border-primary-custom {
    border-color: var(--primary-color) !important;
}

/* --- Scrollbar --- */
::-webkit-scrollbar {
    width: 8px;
    height: 8px;
}

::-webkit-scrollbar-track {
    background: #f1f5f9;
}

::-webkit-scrollbar-thumb {
    background: #cbd5e1;
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: #94a3b8;
}

/* --- Selection --- */
::selection {
    background: var(--primary-color);
    color: white;
}

/* --- Animations --- */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.fade-in-up {
    animation: fadeInUp 0.6s ease-out;
}

/* --- Loading Spinner --- */
.spinner-border-sm {
    width: 1rem;
    height: 1rem;
    border-width: 0.2em;
}

/* --- Alerts --- */
.alert {
    border-radius: 12px;
    border: none;
    padding: 16px 20px;
}

.alert-success {
    background: #dcfce7;
    color: #166534;
}

.alert-danger {
    background: #fee2e2;
    color: #991b1b;
}

.alert-info {
    background: #dbeafe;
    color: #1e40af;
}
