/* ========== HEADER STYLES ========== */

/* Navigation Drawer */
.mobile-menu-toggle {
    display: none;
    position: fixed;
    top: 15px;
    left: 15px;
    z-index: 1005;
    background: linear-gradient(135deg, #007bff, #0056b3);
    color: white;
    border: none;
    width: 50px;
    height: 50px;
    border-radius: 50%;
    font-size: 1.2rem;
    cursor: pointer;
    box-shadow: 0 4px 15px rgba(0, 123, 255, 0.3);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.mobile-menu-toggle:hover {
    transform: scale(1.1) rotate(15deg);
    box-shadow: 0 6px 20px rgba(0, 123, 255, 0.4);
}

.nav-drawer {
    position: fixed;
    top: 0;
    right: -320px;
    width: 300px;
    height: 100%;
    background: white;
    z-index: 1006;
    box-shadow: -5px 0 30px rgba(0, 0, 0, 0.15);
    transition: right 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

.nav-drawer[aria-hidden="false"] {
    right: 0;
}

.drawer-header {
    padding: 20px;
    background: linear-gradient(135deg, #1e3a8a, #3b82f6);
    color: white;
    display: flex;
    align-items: center;
    gap: 15px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.drawer-logo {
    width: 50px;
    height: 50px;
    border-radius: 10px;
    object-fit: cover;
    border: 2px solid white;
}

.drawer-header h3 {
    margin: 0;
    font-size: 1.3rem;
    font-weight: 700;
}

.drawer-header p {
    margin: 5px 0 0 0;
    font-size: 0.85rem;
    opacity: 0.9;
}

.drawer-close {
    margin-right: auto;
    background: rgba(255, 255, 255, 0.1);
    border: none;
    color: white;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
}

.drawer-close:hover {
    background: rgba(255, 255, 255, 0.2);
    transform: rotate(90deg);
}

.drawer-nav {
    flex: 1;
    padding: 20px 0;
    overflow-y: auto;
}

.drawer-link {
    display: flex;
    align-items: center;
    padding: 15px 25px;
    color: #374151;
    text-decoration: none;
    border-bottom: 1px solid #f3f4f6;
    transition: all 0.3s ease;
    font-size: 0.95rem;
}

.drawer-link:hover {
    background: #f9fafb;
    color: #3b82f6;
    padding-right: 30px;
}

.drawer-link i {
    width: 24px;
    margin-left: 10px;
    color: #6b7280;
}

.drawer-dropdown-toggle {
    display: flex;
    align-items: center;
    justify-content: space-between;
    width: 100%;
    padding: 15px 25px;
    background: none;
    border: none;
    color: #374151;
    text-align: right;
    font-size: 0.95rem;
    cursor: pointer;
    border-bottom: 1px solid #f3f4f6;
    transition: all 0.3s ease;
}

.drawer-dropdown-toggle:hover {
    background: #f9fafb;
    color: #3b82f6;
}

.dropdown-icon {
    transition: transform 0.3s ease;
}

.drawer-dropdown.open .dropdown-icon {
    transform: rotate(-90deg);
}

.drawer-dropdown-menu {
    max-height: 0;
    overflow: hidden;
    background: #fafafa;
    transition: max-height 0.4s ease;
}

.drawer-dropdown.open .drawer-dropdown-menu {
    max-height: 400px;
}

.drawer-dropdown-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 12px 25px 12px 40px;
    color: #6b7280;
    text-decoration: none;
    border-bottom: 1px solid #f0f0f0;
    transition: all 0.3s ease;
}

.drawer-dropdown-item:hover {
    background: #f0f0f0;
    color: #3b82f6;
    padding-right: 45px;
}

.category-badge {
    background: #e5e7eb;
    color: #4b5563;
    padding: 3px 10px;
    border-radius: 15px;
    font-size: 0.8rem;
    font-weight: 600;
}

.drawer-footer {
    padding: 20px;
    border-top: 1px solid #e5e7eb;
    display: flex;
    gap: 10px;
}

.drawer-admin-btn, .drawer-login-btn {
    flex: 1;
    padding: 12px;
    border-radius: 8px;
    text-decoration: none;
    text-align: center;
    font-weight: 600;
    transition: all 0.3s ease;
}

.drawer-admin-btn {
    background: linear-gradient(135deg, #10b981, #059669);
    color: white;
}

.drawer-login-btn {
    background: linear-gradient(135deg, #3b82f6, #1d4ed8);
    color: white;
}

.drawer-admin-btn:hover, .drawer-login-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
}

.nav-drawer-backdrop {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.5);
    backdrop-filter: blur(3px);
    z-index: 1005;
    animation: fadeIn 0.3s ease;
}

.nav-drawer-backdrop.active {
    display: block;
}

/* Top Bar */
.header-top-bar {
    background: linear-gradient(90deg, #1e293b, #334155);
    color: white;
    padding: 8px 0;
    font-size: 0.9rem;
}

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

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

.date-time i {
    color: #60a5fa;
}

.separator {
    opacity: 0.5;
    margin: 0 5px;
}

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

.social-links a {
    color: white;
    opacity: 0.8;
    transition: all 0.3s ease;
}

.social-links a:hover {
    opacity: 1;
    transform: translateY(-2px);
    color: #60a5fa;
}

/* Main Header */
.main-header {
    background: white;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
    position: sticky;
    top: 0;
    z-index: 1000;
    transition: transform 0.3s ease;
}

.main-header.hidden {
    transform: translateY(-100%);
}

.main-header .container {
    display: flex;
    align-items: center;
    padding: 15px 0;
}

/* Logo */
.logo-section {
    flex: 0 0 auto;
}

.logo-link {
    display: flex;
    align-items: center;
    gap: 15px;
    text-decoration: none;
}

.logo-image {
    height: 50px;
    width: auto;
    border-radius: 10px;
    object-fit: cover;
    border: 2px solid #e5e7eb;
    transition: transform 0.3s ease;
}

.logo-link:hover .logo-image {
    transform: scale(1.05);
}

.logo-text {
    display: flex;
    flex-direction: column;
}

.logo-title {
    margin: 0;
    font-size: 1.5rem;
    font-weight: 800;
    background: linear-gradient(135deg, #3b82f6, #1d4ed8);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.logo-tagline {
    margin: 5px 0 0 0;
    font-size: 0.85rem;
    color: #6b7280;
}

/* Search */
.search-section {
    flex: 1;
    max-width: 600px;
    margin: 0 30px;
}

.search-wrapper {
    position: relative;
}

.search-input {
    width: 100%;
    padding: 12px 50px 12px 20px;
    border: 2px solid #e5e7eb;
    border-radius: 12px;
    font-size: 0.95rem;
    transition: all 0.3s ease;
    background: #f9fafb;
    font-family: Vazir, sans-serif;
}

.search-input:focus {
    outline: none;
    border-color: #3b82f6;
    background: white;
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1);
}

.search-button {
    position: absolute;
    left: 10px;
    top: 50%;
    transform: translateY(-50%);
    background: linear-gradient(135deg, #3b82f6, #1d4ed8);
    border: none;
    color: white;
    width: 36px;
    height: 36px;
    border-radius: 10px;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
}

.search-button:hover {
    background: linear-gradient(135deg, #1d4ed8, #1e40af);
    transform: translateY(-50%) scale(1.05);
}

/* Actions */
.header-actions {
    display: flex;
    gap: 10px;
}

.btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 10px 20px;
    border-radius: 10px;
    text-decoration: none;
    font-weight: 600;
    font-size: 0.9rem;
    transition: all 0.3s ease;
    border: none;
    cursor: pointer;
    font-family: Vazir, sans-serif;
}

.btn-admin {
    background: linear-gradient(135deg, #10b981, #059669);
    color: white;
}

.btn-login {
    background: linear-gradient(135deg, #3b82f6, #1d4ed8);
    color: white;
}

.btn-write {
    background: linear-gradient(135deg, #f59e0b, #d97706);
    color: white;
}

.btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
}

/* Navigation */
.main-navigation {
    background: linear-gradient(135deg, #1e293b, #0f172a);
    border-top: 1px solid rgba(255, 255, 255, 0.1);
}

.main-navigation .container {
    padding: 0;
}

.nav-menu {
    display: flex;
    gap: 2px;
    padding: 0;
    margin: 0;
    list-style: none;
}

.nav-link {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 15px 20px;
    color: rgba(255, 255, 255, 0.9);
    text-decoration: none;
    font-weight: 600;
    font-size: 0.9rem;
    transition: all 0.3s ease;
    border-bottom: 3px solid transparent;
}

.nav-link:hover,
.nav-link.active {
    background: rgba(255, 255, 255, 0.05);
    color: white;
    border-bottom-color: #f59e0b;
}

/* Dropdown */
.nav-dropdown {
    position: relative;
}

.nav-dropdown-toggle {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 15px 20px;
    background: none;
    border: none;
    color: rgba(255, 255, 255, 0.9);
    font-weight: 600;
    font-size: 0.9rem;
    cursor: pointer;
    transition: all 0.3s ease;
    border-bottom: 3px solid transparent;
}

.nav-dropdown-toggle:hover {
    background: rgba(255, 255, 255, 0.05);
    color: white;
    border-bottom-color: #f59e0b;
}

.nav-dropdown-menu {
    position: absolute;
    top: 100%;
    right: 0;
    background: white;
    min-width: 280px;
    border-radius: 12px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.15);
    border: 1px solid #e5e7eb;
    display: none;
    z-index: 1001;
    overflow: hidden;
    margin-top: 5px;
}

.nav-dropdown:hover .nav-dropdown-menu {
    display: block;
    animation: slideDown 0.3s ease-out;
}

.dropdown-content {
    max-height: 400px;
    overflow-y: auto;
    padding: 10px 0;
}

.dropdown-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 12px 20px;
    color: #374151;
    text-decoration: none;
    transition: all 0.3s ease;
}

.dropdown-item:hover {
    background: #f9fafb;
    color: #3b82f6;
    padding-right: 25px;
}

.dropdown-item i {
    width: 20px;
    margin-left: 10px;
    color: #9ca3af;
}

.item-count {
    background: #e5e7eb;
    color: #6b7280;
    padding: 3px 10px;
    border-radius: 15px;
    font-size: 0.8rem;
    font-weight: 600;
}

/* Breaking News */
.breaking-news {
    background: linear-gradient(90deg, #dc2626, #ef4444);
    color: white;
    padding: 10px 0;
    overflow: hidden;
}

.breaking-news .container {
    display: flex;
    align-items: center;
    gap: 20px;
}

.breaking-label {
    display: flex;
    align-items: center;
    gap: 8px;
    background: rgba(0, 0, 0, 0.2);
    padding: 5px 15px;
    border-radius: 20px;
    font-weight: 700;
    font-size: 0.85rem;
    white-space: nowrap;
}

.breaking-ticker {
    flex: 1;
    overflow: hidden;
}

.ticker-content {
    display: inline-flex;
    align-items: center;
    gap: 30px;
    white-space: nowrap;
    animation: tickerScroll 40s linear infinite;
    padding: 5px 0;
}

.ticker-item {
    color: white;
    text-decoration: none;
    font-weight: 600;
    transition: all 0.3s ease;
}

.ticker-item:hover {
    color: #ffd700;
    text-decoration: underline;
}

.ticker-separator {
    color: rgba(255, 255, 255, 0.5);
}

/* Animations */
@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

@keyframes slideDown {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

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