/* ===========================================
   BilgiX - Main Stylesheet
   Version: 3.0 | Professional Edition
   =========================================== */

/* Reset & Base Styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Vazir', 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    line-height: 1.8;
    color: #333;
    background: #f8f9fa;
    margin: 0;
    padding: 0;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

.container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 15px;
}

.main-content {
    flex: 1;
    padding: 20px 0;
}

/* ===== Header Styles ===== */
.header-top {
    background: linear-gradient(135deg, #2c3e50, #34495e);
    color: white;
    padding: 10px 0;
    font-size: 0.9em;
    border-bottom: 1px solid rgba(255,255,255,0.1);
}

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

.date-time {
    display: flex;
    align-items: center;
    gap: 10px;
}

.date-time i {
    margin-left: 5px;
}

.social-links {
    display: flex;
    gap: 15px;
}

.social-links a {
    color: white;
    font-size: 1.1em;
    transition: all 0.3s;
    width: 30px;
    height: 30px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    background: rgba(255,255,255,0.1);
}

.social-links a:hover {
    background: rgba(255,255,255,0.2);
    transform: translateY(-2px);
}

/* Main Header */
.site-header {
    background: white;
    box-shadow: 0 4px 12px rgba(0,0,0,0.08);
    position: sticky;
    top: 0;
    z-index: 1000;
}

.header-main {
    padding: 15px 0;
    border-bottom: 1px solid #f0f0f0;
}

.header-main .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 20px;
}

.logo a {
    display: flex;
    align-items: center;
    gap: 10px;
    text-decoration: none;
    color: #2c3e50;
    font-weight: bold;
    font-size: 1.5em;
}

.logo img {
    max-height: 50px;
    width: auto;
}

.search-box {
    flex: 1;
    max-width: 500px;
}

.search-box form {
    display: flex;
    background: #f8f9fa;
    border-radius: 50px;
    overflow: hidden;
    border: 1px solid #dee2e6;
    transition: all 0.3s;
}

.search-box form:focus-within {
    border-color: #007bff;
    box-shadow: 0 0 0 3px rgba(0,123,255,0.1);
}

.search-box input {
    flex: 1;
    padding: 12px 20px;
    border: none;
    background: transparent;
    font-family: 'Vazir', sans-serif;
    font-size: 0.95em;
}

.search-box input:focus {
    outline: none;
}

.search-box button {
    background: #007bff;
    color: white;
    border: none;
    padding: 12px 25px;
    cursor: pointer;
    transition: background 0.3s;
}

.search-box button:hover {
    background: #0056b3;
}

.header-actions .btn {
    padding: 10px 20px;
    border-radius: 50px;
    text-decoration: none;
    font-weight: 500;
    transition: all 0.3s;
    display: flex;
    align-items: center;
    gap: 8px;
    white-space: nowrap;
}

/* Breaking News Ticker */
.breaking-news-ticker {
    background: linear-gradient(90deg, #dc3545, #c82333);
    color: white;
    padding: 8px 0;
    position: relative;
    overflow: hidden;
}

.breaking-news-ticker::before {
    content: '';
    position: absolute;
    left: 0;
    top: 0;
    bottom: 0;
    width: 100px;
    background: linear-gradient(90deg, rgba(220,53,69,1), transparent);
    z-index: 1;
}

.breaking-news-ticker::after {
    content: '';
    position: absolute;
    right: 0;
    top: 0;
    bottom: 0;
    width: 100px;
    background: linear-gradient(90deg, transparent, rgba(220,53,69,1));
    z-index: 1;
}

.ticker-label {
    background: #000;
    padding: 4px 15px;
    border-radius: 20px;
    margin-left: 15px;
    font-weight: bold;
    font-size: 0.85em;
    white-space: nowrap;
}

.ticker-content {
    overflow: hidden;
    position: relative;
    z-index: 2;
    display: flex;
    align-items: center;
    gap: 30px;
    animation: ticker 25s linear infinite;
}

@keyframes ticker {
    0% {
        transform: translateX(100%);
    }
    100% {
        transform: translateX(-100%);
    }
}

.ticker-item {
    color: white;
    text-decoration: none;
    padding: 4px 0;
    white-space: nowrap;
    transition: color 0.3s;
    font-size: 0.9em;
}

.ticker-item:hover {
    color: #ffc107;
}

/* Main Navigation */
.main-nav {
    background: linear-gradient(135deg, #007bff, #0056b3);
}

.main-nav ul {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    gap: 1px;
}

.main-nav li {
    position: relative;
}

.main-nav li:hover::before {
    content: '';
    position: absolute;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 80%;
    height: 3px;
    background: #ffc107;
    border-radius: 2px 2px 0 0;
}

.main-nav a {
    display: block;
    color: white;
    text-decoration: none;
    padding: 15px 20px;
    text-align: center;
    transition: all 0.3s;
    font-size: 0.95em;
    position: relative;
    overflow: hidden;
}

.main-nav a:hover,
.main-nav a.active {
    background: rgba(255,255,255,0.1);
}

.main-nav a i {
    margin-left: 8px;
    font-size: 1.1em;
}

/* ===== Footer Styles ===== */
.site-footer {
    background: linear-gradient(135deg, #2c3e50, #1a252f);
    color: white;
    padding: 60px 0 20px;
    margin-top: auto;
}

.footer-widgets {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 40px;
    margin-bottom: 40px;
}

.footer-widget h4 {
    color: white;
    margin-bottom: 20px;
    font-size: 1.3em;
    position: relative;
    padding-bottom: 10px;
}

.footer-widget h4::after {
    content: '';
    position: absolute;
    bottom: 0;
    right: 0;
    width: 50px;
    height: 2px;
    background: #007bff;
}

.footer-widget p {
    color: #bdc3c7;
    line-height: 1.8;
    margin-bottom: 20px;
}

.footer-widget ul {
    list-style: none;
    padding: 0;
}

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

.footer-widget a {
    color: #bdc3c7;
    text-decoration: none;
    transition: all 0.3s;
    display: flex;
    align-items: center;
    gap: 8px;
}

.footer-widget a:hover {
    color: white;
    transform: translateX(5px);
}

.download-app {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    background: linear-gradient(135deg, #28a745, #20c997);
    color: white;
    padding: 12px 25px;
    border-radius: 50px;
    text-decoration: none;
    font-weight: 500;
    transition: all 0.3s;
    margin-top: 15px;
    box-shadow: 0 4px 15px rgba(40,167,69,0.2);
}

.download-app:hover {
    transform: translateY(-3px);
    box-shadow: 0 6px 20px rgba(40,167,69,0.3);
    color: white;
}

.footer-bottom {
    border-top: 1px solid rgba(255,255,255,0.1);
    padding-top: 25px;
    text-align: center;
}

.footer-bottom p {
    color: #95a5a6;
    margin-bottom: 10px;
}

.footer-bottom a {
    color: #95a5a6;
    text-decoration: none;
    transition: color 0.3s;
}

.footer-bottom a:hover {
    color: white;
}

.footer-social {
    margin-top: 20px;
    display: flex;
    justify-content: center;
    gap: 15px;
}

.footer-social a {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: rgba(255,255,255,0.1);
    color: white;
    font-size: 1.2em;
    transition: all 0.3s;
}

.footer-social a:hover {
    background: rgba(255,255,255,0.2);
    transform: translateY(-3px);
}

/* ===== Utility Classes ===== */
.btn {
    display: inline-block;
    padding: 10px 20px;
    border-radius: 4px;
    text-decoration: none;
    font-weight: 500;
    transition: all 0.3s;
    cursor: pointer;
    border: none;
    font-family: 'Vazir', sans-serif;
}

.btn-primary {
    background: #007bff;
    color: white;
}

.btn-primary:hover {
    background: #0056b3;
    color: white;
}

.btn-success {
    background: #28a745;
    color: white;
}

.btn-success:hover {
    background: #218838;
    color: white;
}

.btn-danger {
    background: #dc3545;
    color: white;
}

.btn-danger:hover {
    background: #c82333;
    color: white;
}

.btn-warning {
    background: #ffc107;
    color: #212529;
}

.btn-warning:hover {
    background: #e0a800;
    color: #212529;
}

/* ===== Responsive Design ===== */
@media (max-width: 1200px) {
    .container {
        max-width: 1140px;
    }
}

@media (max-width: 992px) {
    .container {
        max-width: 960px;
    }
    
    .header-main .container {
        flex-wrap: wrap;
    }
    
    .search-box {
        order: 3;
        width: 100%;
        max-width: none;
        margin-top: 15px;
    }
    
    .main-nav ul {
        flex-wrap: wrap;
    }
    
    .main-nav li {
        flex: 0 0 calc(33.333% - 1px);
    }
    
    .footer-widgets {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 768px) {
    .container {
        max-width: 720px;
    }
    
    .header-top .container {
        flex-direction: column;
        gap: 10px;
        text-align: center;
    }
    
    .main-nav li {
        flex: 0 0 calc(50% - 1px);
    }
    
    .footer-widgets {
        grid-template-columns: 1fr;
    }
    
    .ticker-content {
        animation: ticker 15s linear infinite;
    }
}

@media (max-width: 576px) {
    .container {
        padding: 0 10px;
    }
    
    .main-nav a {
        padding: 12px 10px;
        font-size: 0.9em;
    }
    
    .main-nav li {
        flex: 0 0 100%;
    }
    
    .search-box input {
        padding: 10px 15px;
    }
    
    .search-box button {
        padding: 10px 20px;
    }
    
    .header-actions .btn {
        padding: 8px 15px;
        font-size: 0.9em;
    }
    
    .footer-social {
        gap: 10px;
    }
    
    .footer-social a {
        width: 35px;
        height: 35px;
        font-size: 1em;
    }
}

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

.fade-in {
    animation: fadeIn 0.5s ease-out;
}

/* ===== Scrollbar ===== */
::-webkit-scrollbar {
    width: 10px;
}

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

::-webkit-scrollbar-thumb {
    background: #888;
    border-radius: 5px;
}

::-webkit-scrollbar-thumb:hover {
    background: #555;
}

/* ===== Print Styles ===== */
@media print {
    .header-top,
    .main-nav,
    .search-box,
    .header-actions,
    .site-footer,
    .breaking-news-ticker {
        display: none;
    }
    
    body {
        background: white;
        color: black;
    }
    
    .container {
        max-width: 100%;
        padding: 0;
    }
}
/* خبر فوری - اصلاح رنگ و اندازه */
.breaking-news-ticker {
    background: linear-gradient(90deg, #0277bd, #01579b) !important;
    padding: 12px 0 !important;
    min-height: 50px;
    border: none !important;
}

.breaking-news-ticker::before,
.breaking-news-ticker::after {
    display: none !important;
}

.ticker-content {
    font-size: 18px !important;
    font-weight: 700 !important;
    animation: ticker 20s linear infinite !important;
    display: flex !important;
    align-items: center !important;
    gap: 30px !important;
}

.ticker-item {
    font-size: 16px !important;
    font-weight: 700 !important;
    text-shadow: 2px 2px 4px rgba(0,0,0,0.5) !important;
    color: white !important;
    text-decoration: none !important;
    white-space: nowrap !important;
}

.ticker-item:hover {
    color: #ffeb3b !important;
    text-decoration: underline !important;
}

.ticker-label {
    font-size: 16px !important;
    padding: 8px 20px !important;
    background: #01579b !important;
    border-radius: 25px !important;
    margin-left: 15px !important;
    font-weight: bold !important;
}

/* هدر اصلی - بازطراحی */
.header-main .container {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 15px 0;
    gap: 30px;
    position: relative;
}

/* بخش سمت چپ */
.header-left-group {
    display: flex;
    align-items: center;
    gap: 25px;
    order: 1;
    flex: 1;
}

/* جستجوی جدید */
.search-box-new {
    position: relative;
    min-width: 300px;
}

.search-box-new input {
    width: 100%;
    padding: 10px 45px 10px 15px;
    border: 2px solid #007bff;
    border-radius: 25px;
    font-size: 14px;
    font-family: 'Vazir', sans-serif;
    transition: all 0.3s;
}

.search-box-new input:focus {
    outline: none;
    box-shadow: 0 0 0 3px rgba(0,123,255,0.1);
}

.search-box-new button {
    position: absolute;
    left: 10px;
    top: 50%;
    transform: translateY(-50%);
    background: none;
    border: none;
    color: #007bff;
    cursor: pointer;
    font-size: 16px;
}

/* لوگو در سمت راست */
.logo-container {
    order: 3;
    text-align: right;
}

.logo-container img {
    max-height: 80px !important;
    width: auto !important;
    transition: all 0.3s;
}

/* بخش وسط - دکمه‌های اصلی */
.header-center-group {
    order: 2;
    flex: 2;
    text-align: center;
}

/* دکمه‌های دسته‌بندی اصلی */
.cat-btn-main {
    background: white;
    border: 2px solid #007bff;
    color: #007bff;
    padding: 8px 20px;
    border-radius: 25px;
    font-weight: 600;
    text-decoration: none;
    transition: all 0.3s;
    font-size: 14px;
    white-space: nowrap;
    display: inline-flex;
    align-items: center;
    gap: 8px;
}

.cat-btn-main:hover {
    background: #007bff;
    color: white;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0,123,255,0.2);
}

/* نوار دکمه‌های دسته‌بندی */
.category-buttons-bar {
    background: #f8f9fa;
    border-top: 2px solid #007bff;
    border-bottom: 1px solid #dee2e6;
    padding: 10px 0;
    margin-top: 0;
}

.category-buttons-container {
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    gap: 10px;
}

/* منوی کشویی دسته‌بندی‌ها */
.dropdown {
    position: relative;
    display: inline-block;
}

.categories-sidebar {
    position: absolute;
    right: 0;
    top: 100%;
    background: white;
    width: 280px;
    box-shadow: 0 5px 25px rgba(0,0,0,0.15);
    border-radius: 0 0 10px 10px;
    z-index: 1000;
    display: none;
    padding: 15px;
    border: 1px solid #eee;
    margin-top: 5px;
}

.categories-sidebar.active {
    display: block;
    animation: fadeIn 0.3s ease;
}

.categories-sidebar a {
    display: block;
    padding: 10px 15px;
    color: #333;
    text-decoration: none;
    border-bottom: 1px solid #eee;
    font-size: 14px;
    transition: all 0.3s;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.categories-sidebar a:hover {
    background: #f8f9fa;
    color: #007bff;
    padding-right: 20px;
}

/* حذف نوار سیاه منوی اصلی */
.main-nav {
    display: none !important;
}

/* استایل‌های ریسپانسیو جدید */
@media (max-width: 1200px) {
    .header-main .container {
        flex-wrap: wrap;
    }
    
    .header-left-group {
        order: 1;
        width: 100%;
        justify-content: center;
        margin-bottom: 15px;
    }
    
    .logo-container {
        order: 2;
        width: 100%;
        text-align: center;
    }
    
    .header-center-group {
        order: 3;
        width: 100%;
    }
    
    .search-box-new {
        min-width: 250px;
    }
}

@media (max-width: 768px) {
    .header-left-group {
        flex-direction: column;
        gap: 15px;
    }
    
    .search-box-new {
        min-width: 100%;
    }
    
    .cat-btn-main {
        padding: 6px 15px;
        font-size: 13px;
    }
    
    .ticker-content {
        font-size: 16px !important;
    }
    
    .ticker-item {
        font-size: 14px !important;
    }
    
    .logo-container img {
        max-height: 60px !important;
    }
    
    .category-buttons-container {
        justify-content: flex-start;
        overflow-x: auto;
        padding-bottom: 10px;
    }
}

@media (max-width: 576px) {
    .ticker-label {
        font-size: 14px !important;
        padding: 6px 15px !important;
    }
    
    .ticker-content {
        font-size: 14px !important;
        animation: ticker 15s linear infinite !important;
    }
}
