/* Font Face Declarations for Vazir Font Family */
@font-face {
    font-family: 'Vazir';
    src: url('https://cdn.jsdelivr.net/gh/rastikerdar/vazir-font@v30.1.0/dist/Vazir.woff2') format('woff2');
    font-weight: normal;
    font-style: normal;
    font-display: swap;
}

@font-face {
    font-family: 'Vazir';
    src: url('https://cdn.jsdelivr.net/gh/rastikerdar/vazir-font@v30.1.0/dist/Vazir-Bold.woff2') format('woff2');
    font-weight: bold;
    font-style: normal;
    font-display: swap;
}

@font-face {
    font-family: 'Vazir';
    src: url('https://cdn.jsdelivr.net/gh/rastikerdar/vazir-font@v30.1.0/dist/Vazir-Light.woff2') format('woff2');
    font-weight: 300;
    font-style: normal;
    font-display: swap;
}

@font-face {
    font-family: 'Vazir';
    src: url('https://cdn.jsdelivr.net/gh/rastikerdar/vazir-font@v30.1.0/dist/Vazir-Medium.woff2') format('woff2');
    font-weight: 500;
    font-style: normal;
    font-display: swap;
}

/* CSS Variables for Color Scheme - Dynamically generated from system settings */

/* Global Styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Vazir', 'Tahoma', sans-serif;
    line-height: 1.6;
    color: var(--primary-300);
    background-color: var(--primary-200);
    scroll-behavior: smooth;
    /* Farsi Number Display */
    font-feature-settings: "ss01", "ss02", "ss03", "ss04", "ss05", "ss06", "ss07", "ss08", "ss09", "ss10", "ss11", "ss12", "ss13", "ss14", "ss15", "ss16", "ss17", "ss18", "ss19", "ss20";
    font-variant-numeric: persian;
}

/* Farsi Number Display for all elements */
* {
    font-feature-settings: "ss01", "ss02", "ss03", "ss04", "ss05", "ss06", "ss07", "ss08", "ss09", "ss10", "ss11", "ss12", "ss13", "ss14", "ss15", "ss16", "ss17", "ss18", "ss19", "ss20";
    font-variant-numeric: persian;
}

/* Specific classes for different font weights */
.font-light { font-weight: 300; }
.font-regular { font-weight: normal; }
.font-medium { font-weight: 500; }
.font-bold { font-weight: bold; }

/* Enhanced Farsi Text Rendering */
html {
    text-rendering: optimizeLegibility;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

/* Better number display for specific elements */
.numbers-farsi {
    font-feature-settings: "ss01", "ss02", "ss03", "ss04", "ss05", "ss06", "ss07", "ss08", "ss09", "ss10", "ss11", "ss12", "ss13", "ss14", "ss15", "ss16", "ss17", "ss18", "ss19", "ss20";
    font-variant-numeric: persian;
}

/* Ensure proper text direction for mixed content */
.mixed-content {
    unicode-bidi: embed;
}

/* Better line height for Farsi text */
.farsi-text {
    line-height: 1.8;
    text-align: justify;
    text-justify: inter-word;
}

/* Text formatting for content areas */
.content-text, .summary-text, .description-text {
    white-space: pre-line;
    word-wrap: break-word;
    overflow-wrap: break-word;
}

/* Ensure proper paragraph spacing */
p {
    margin-bottom: 1rem;
}

/* Better text rendering for content */
.resource-content-text,
.news-content,
.description-content,
.webinar-description-section .description-content {
    white-space: pre-line;
    word-wrap: break-word;
    overflow-wrap: break-word;
    line-height: 1.8;
}

/* Summary text formatting */
.resource-summary-text,
.news-summary-text,
.content-summary,
.news-card-summary,
.news-summary {
    white-space: pre-line;
    word-wrap: break-word;
    overflow-wrap: break-word;
    line-height: 1.6;
}

/* Form error styling */
.invalid-feedback {
    display: block !important;
    color: #dc3545;
    font-size: 0.875rem;
    margin-top: 0.25rem;
}

.invalid-feedback i {
    color: #dc3545;
}

.form-control.is-invalid,
.form-select.is-invalid {
    border-color: #dc3545;
    box-shadow: 0 0 0 0.2rem rgba(220, 53, 69, 0.25);
}

.alert-danger {
    background-color: #f8d7da;
    border-color: #f5c6cb;
    color: #721c24;
}

.alert-danger .alert-heading {
    color: #721c24;
    font-weight: 600;
}

/* Admin panel button groups */
.btn-group .btn-sm {
    margin: 0 1px;
}

.btn-outline-info:hover {
    color: #fff;
    background-color: #0dcaf0;
    border-color: #0dcaf0;
}

/* Responsive button groups */
@media (max-width: 768px) {
    .btn-group {
        display: flex;
        flex-wrap: wrap;
        gap: 2px;
    }
    
    .btn-group .btn-sm {
        margin: 1px 0;
        min-width: 32px;
    }
}

/* Header Styles */
.header {
    background-color: white;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
    position: sticky;
    top: 0;
    z-index: 1000;
    backdrop-filter: blur(10px);
    background-color: rgba(255, 255, 255, 0.95);
}

.navbar {
    padding: 1rem 0;
}

.navbar .container {
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.navbar-brand.ms-auto {
    margin-right: 0;
    margin-left: auto;
}

.logo {
    height: 60px;
    width: auto;
}



.navbar-nav .nav-link {
    color: var(--primary-300) !important;
    font-weight: 500;
    padding: 0.5rem 1rem !important;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    white-space: nowrap;
    flex-wrap: nowrap;
}

.navbar-nav .nav-link span {
    white-space: nowrap;
    display: inline-block;
}

.navbar-nav .nav-link:hover {
    color: var(--accent-100) !important;
    background-color: var(--primary-200);
    border-radius: 5px;
}

/* Navigation styling - Single row optimized */
.navbar-collapse {
    display: flex;
    flex-direction: row;
    justify-content: space-between;
    align-items: center;
}

.navbar-nav {
    display: flex;
    flex-wrap: nowrap;
    align-items: center;
    gap: 0.2rem;
}

.nav-item {
    flex-shrink: 0;
}

.nav-link {
    white-space: nowrap;
    font-size: 0.9rem;
    padding: 0.4rem 0.6rem !important;
}

.nav-link span {
    font-size: 0.9rem;
}

@media (max-width: 1200px) {
    .nav-link {
        font-size: 0.8rem;
        padding: 0.3rem 0.4rem !important;
    }
    
    .nav-link span {
        font-size: 0.8rem;
    }
}

@media (max-width: 992px) {
    .navbar-collapse {
        flex-direction: column;
        align-items: stretch;
    }
    
    .navbar-nav {
        flex-direction: column;
        width: 100%;
        gap: 0;
    }
    
    .nav-item {
        width: 100%;
        margin-bottom: 0.5rem;
    }
    
    .nav-link {
        width: 100%;
        justify-content: center;
        padding: 1rem !important;
        font-size: 1rem;
    }
}

.dropdown-menu {
    border: none;
    box-shadow: 0 5px 15px rgba(0,0,0,0.1);
    border-radius: 10px;
    right: 0 !important;
    left: auto !important;
    text-align: right;
    padding: 0.5rem 0;
    margin-top: 0.5rem;
}

/* Nested dropdown styling */
.dropdown-submenu {
    position: relative;
}

.dropdown-submenu .dropdown-menu {
    position: absolute;
    top: 0;
    right: 100%;
    left: auto !important;
    margin-top: 0;
    margin-right: 8px;
    border-radius: 10px;
    min-width: 220px;
    z-index: 1000;
    box-shadow: 0 8px 25px rgba(0,0,0,0.15);
    border: 1px solid rgba(0,0,0,0.1);
    opacity: 0;
    visibility: hidden;
    transform: translateX(10px);
    transition: all 0.3s ease;
}

.dropdown-submenu:hover .dropdown-menu,
.dropdown-submenu .dropdown-menu.show {
    opacity: 1;
    visibility: visible;
    transform: translateX(0);
    display: block;
}

.dropdown-submenu .dropdown-toggle::after {
    transform: rotate(-90deg);
    margin-left: 0.5rem;
    transition: transform 0.3s ease;
}

.dropdown-submenu:hover .dropdown-toggle::after {
    transform: rotate(0deg);
}

/* Ensure proper positioning for RTL */
.dropdown-menu {
    right: 0 !important;
    left: auto !important;
}

.dropdown-submenu .dropdown-menu {
    right: 100% !important;
    left: auto !important;
}

/* Complete Mobile Submenu Support */
@media (max-width: 992px) {
    /* Submenu containers */
    .dropdown-submenu {
        position: relative;
        width: 100%;
    }
    
    /* Submenu dropdowns */
    .dropdown-submenu .dropdown-menu {
        position: static !important;
        right: auto !important;
        left: auto !important;
        margin-right: 0;
        margin-top: 0.5rem;
        transform: none !important;
        box-shadow: none !important;
        border: none !important;
        background-color: rgba(0,0,0,0.05) !important;
        width: 100% !important;
        display: none;
        border-radius: 8px;
        padding: 0.5rem 0;
    }
    
    .dropdown-submenu .dropdown-menu.show {
        display: block !important;
    }
    
    /* Submenu toggle buttons */
    .dropdown-submenu .dropdown-toggle {
        position: relative;
        cursor: pointer;
    }
    
    .dropdown-submenu .dropdown-toggle::after {
        content: '◀';
        border: none !important;
        font-size: 0.7rem;
        margin-right: 0.5rem;
        transition: transform 0.3s ease;
        transform: rotate(-90deg);
        position: absolute;
        right: 1rem;
        top: 50%;
        transform: translateY(-50%) rotate(-90deg);
    }
    
    .dropdown-submenu .dropdown-toggle.show::after {
        transform: translateY(-50%) rotate(0deg);
    }
    
    /* Submenu items */
    .dropdown-submenu .dropdown-item {
        padding: 0.6rem 1rem 0.6rem 2rem;
        font-size: 0.9rem;
        margin-bottom: 0.2rem;
        color: var(--primary-300);
        transition: all 0.3s ease;
    }
    
    .dropdown-submenu .dropdown-item:hover {
        background-color: var(--accent-100);
        color: white;
        transform: translateX(-3px);
    }
}

.dropdown-item {
    color: var(--primary-300);
    padding: 0.5rem 1rem;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.dropdown-item:hover {
    background-color: var(--primary-200);
    color: var(--accent-100);
}

.dropdown-item i {
    width: 16px;
    text-align: center;
}

.dropdown-divider {
    margin: 0.5rem 0;
    border-color: var(--primary-300);
}

/* Hero Section */
.hero-section {
    background: linear-gradient(135deg, var(--bg-100) 0%, var(--bg-200) 100%);
    padding: 4rem 0;
    position: relative;
    overflow: hidden;
    min-height: 500px;
    display: flex;
    align-items: center;
    z-index: 1;
}

.hero-slider {
    position: relative;
    width: 100%;
    height: 100%;
}

.hero-slide {
    display: none;
    animation: fadeIn 1s ease-in-out;
}

.hero-slide.active {
    display: block;
}

.hero-content {
    display: flex;
    align-items: center;
    justify-content: space-between;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 2rem;
}

.hero-text {
    flex: 1;
    color: white;
    margin-left: 3rem;
}

.discount-badge {
    display: flex;
    align-items: center;
    margin-bottom: 1rem;
}

.discount-number {
    background-color: var(--accent-100);
    color: white;
    font-size: 2.5rem;
    font-weight: bold;
    padding: 0.5rem 1rem;
    border-radius: 10px;
    margin-left: 1rem;
    box-shadow: 0 5px 15px rgba(0,0,0,0.2);
}

.discount-text {
    background-color: white;
    color: var(--accent-100);
    padding: 0.5rem 1rem;
    border-radius: 5px;
    font-weight: bold;
}

.hero-text h1 {
    font-size: 2.5rem;
    margin-bottom: 1rem;
    font-weight: bold;
}

.hero-text p {
    font-size: 1.2rem;
    margin-bottom: 2rem;
    opacity: 0.9;
}

.hero-text .btn {
    background-color: white;
    color: var(--accent-100);
    border: none;
    padding: 1rem 2rem;
    border-radius: 25px;
    font-weight: bold;
    transition: all 0.3s ease;
}

.hero-text .btn:hover {
    background-color: var(--accent-100);
    color: white;
    transform: translateY(-2px);
}

.hero-image {
    flex: 1;
    text-align: center;
}

.hero-image img {
    max-width: 100%;
    height: auto;
    border-radius: 15px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.3);
}

/* Hero Navigation */
.hero-nav {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background-color: white;
    border: none;
    width: 50px;
    height: 50px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 5px 15px rgba(0,0,0,0.2);
}

.hero-nav:hover {
    background-color: var(--accent-100);
    color: white;
}

.hero-nav.prev {
    left: 2rem;
}

.hero-nav.next {
    right: 2rem;
}

.hero-dots {
    position: absolute;
    bottom: 2rem;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    gap: 1rem;
}

.dot {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background-color: rgba(255,255,255,0.5);
    cursor: pointer;
    transition: all 0.3s ease;
}

.dot.active {
    background-color: white;
    transform: scale(1.2);
}

/* Main Content */
.main-content {
    padding: 4rem 0;
    position: relative;
    z-index: 2;
    background-color: var(--primary-200);
}

.content-section {
    margin-bottom: 4rem;
    position: relative;
    background-color: white;
    border-radius: 15px;
    padding: 2rem;
    box-shadow: 0 5px 15px rgba(0,0,0,0.05);
    margin: 0 1rem 4rem 1rem;
}

.section-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 2rem;
    padding: 0 1rem;
}

.section-header h2 {
    color: var(--primary-300);
    font-size: 1.8rem;
    font-weight: bold;
    position: relative;
}

.section-header h2::before {
    content: '';
    position: absolute;
    right: -1rem;
    top: 50%;
    transform: translateY(-50%);
    width: 4px;
    height: 30px;
    background-color: var(--accent-100);
    border-radius: 2px;
}

.view-all {
    color: var(--accent-100);
    text-decoration: none;
    font-weight: bold;
    transition: all 0.3s ease;
}

.view-all:hover {
    color: var(--primary-300);
}

/* Carousel Container */
.carousel-container {
    position: relative;
    overflow: visible;
    padding: 0 0px;
}

/* Content Carousel */
.content-carousel {
    display: flex;
    gap: 1.5rem;
    overflow-x: auto;
    padding: 1rem;
    scroll-behavior: smooth;
    scrollbar-width: none;
    -ms-overflow-style: none;
    border-radius: 12px;
    background-color: rgba(255, 255, 255, 0.1);
}

.content-carousel::-webkit-scrollbar {
    display: none;
}

/* Carousel Navigation */
.carousel-nav {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    width: 100%;
    pointer-events: none;
    z-index: 10;
}

.carousel-btn {
    position: absolute;
    background-color: var(--accent-100);
    color: white;
    border: none;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.3s ease;
    pointer-events: all;
    box-shadow: 0 2px 10px rgba(0,0,0,0.2);
}

.carousel-btn:hover {
    background-color: var(--primary-300);
    transform: scale(1.1);
    box-shadow: 0 4px 15px rgba(0,0,0,0.3);
}

.carousel-btn.prev {
    right: 0px;
}

.carousel-btn.next {
    left: 0px;
}

.content-section {
    position: relative;
}

/* Content card styles - unified for all card types */
.content-card {
    min-width: 280px;
    max-width: 280px;
    width: 280px;
    min-height: 380px;
    height: auto;
    background-color: white;
    border-radius: 15px;
    overflow: hidden;
    box-shadow: 0 5px 15px rgba(0,0,0,0.1);
    transition: all 0.3s ease;
    cursor: pointer;
    text-decoration: none;
    color: inherit;
    display: flex;
    flex-direction: column;
    margin: 0 0.5rem;
}

/* Webinar cards need more height */
.webinar-card {
    min-height: 400px;
    height: auto;
}

/* Webinar cards need more content space */
.webinar-card .card-content {
    height: auto;
    min-height: 200px;
    padding: 1rem;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    flex-grow: 1;
}

.webinar-card .card-content h3 {
    height: auto;
    min-height: 2.4rem;
    margin-bottom: 0.6rem;
    overflow: visible;
    display: block;
    -webkit-line-clamp: unset;
    -webkit-box-orient: unset;
}

.webinar-card .card-content p {
    height: auto;
    min-height: 3rem;
    margin-bottom: 1rem;
    overflow: hidden;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    flex-grow: 1;
    line-height: 1.5;
    color: #666;
    font-size: 0.9rem;
}

.content-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 25px rgba(0,0,0,0.15);
    text-decoration: none;
    color: inherit;
}

.content-card img {
    width: 100%;
    height: 180px;
    object-fit: cover;
}

.card-content {
    padding: 1.5rem;
    height: auto;
    min-height: 180px;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    flex-grow: 1;
}

.card-content h3 {
    color: var(--primary-300);
    font-size: 1.1rem;
    margin-bottom: 0.8rem;
    font-weight: bold;
    line-height: 1.4;
    min-height: 2.8rem;
    height: auto;
    overflow: hidden;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
}

.card-content p {
    color: #666;
    font-size: 0.9rem;
    margin-bottom: 1rem;
    line-height: 1.6;
    min-height: 3rem;
    height: auto;
    overflow: hidden;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    flex-grow: 1;
}

.card-content .news-summary {
    color: #333;
    font-size: 0.95rem;
    margin-bottom: 1rem;
    line-height: 1.6;
    height: auto;
    min-height: 4rem;
    max-height: 8rem;
    overflow: hidden;
    display: -webkit-box;
    -webkit-line-clamp: 4;
    -webkit-box-orient: vertical;
    text-align: justify;
    text-justify: inter-word;
    font-weight: 500;
    word-wrap: break-word;
    hyphens: auto;
    flex-grow: 1;
}

.news-category-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    background: linear-gradient(135deg, var(--accent-100) 0%, var(--primary-100) 100%);
    color: white;
    padding: 0.4rem 0.8rem;
    border-radius: 20px;
    font-size: 0.8rem;
    font-weight: 600;
    margin-bottom: 0.8rem;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
}

.news-category-badge i {
    font-size: 0.9rem;
}

.card-meta .date {
    display: flex;
    align-items: center;
    gap: 0.4rem;
    color: #666;
    font-size: 0.9rem;
    font-weight: 500;
    background: none !important;
    padding: 0 !important;
    border-radius: 0 !important;
}

.card-meta .date i {
    color: var(--accent-100);
    font-size: 1rem;
}

.card-meta .news-status {
    display: flex;
    align-items: center;
    gap: 0.3rem;
    color: #28a745;
    font-size: 0.85rem;
    font-weight: 600;
}

.card-meta .news-status i {
    color: #28a745;
    font-size: 0.6rem;
}

.card-meta {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    font-size: 0.8rem;
    color: #333;
    margin-top: auto;
    flex-shrink: 0;
}

.card-meta span {
    background-color: var(--primary-200);
    padding: 0.25rem 0.75rem;
    border-radius: 15px;
    display: inline-block;
    font-size: 0.75rem;
    color: var(--primary-300);
    font-weight: 500;
}

/* استایل‌های خاص برای انواع مختلف کارت‌ها */

.card-meta .category {
    background-color: var(--bg-200);
    color: white;
}

.card-meta .type {
    background-color: var(--primary-300);
    color: white;
}

.card-meta .size,
.card-meta .duration {
    background-color: var(--bg-300);
    color: white;
}

.card-meta .views {
    background-color: var(--accent-100);
    color: white;
}

/* Webinar card specific styles */
.webinar-card .card-meta {
    display: flex;
    flex-direction: column;
    gap: 0.4rem;
    margin-top: auto;
}

.webinar-card .meta-row {
    display: flex;
    justify-content: space-between;
    gap: 0.3rem;
}

.webinar-card .meta-row span {
    flex: 1;
    background-color: var(--primary-200);
    padding: 0.2rem 0.4rem;
    border-radius: 8px;
    display: flex;
    align-items: center;
    gap: 0.2rem;
    font-size: 0.65rem;
    color: var(--primary-300);
    font-weight: 500;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.webinar-card .meta-row span i {
    font-size: 0.55rem;
    color: var(--accent-100);
}

.webinar-card .instructor {
    background-color: var(--accent-200) !important;
    color: var(--accent-100) !important;
}

.webinar-card .level {
    background-color: var(--bg-200) !important;
    color: white !important;
}

.webinar-card .date {
    background-color: var(--primary-200) !important;
    color: var(--primary-300) !important;
}

.webinar-card .time {
    background-color: var(--accent-200) !important;
    color: var(--accent-100) !important;
}

.webinar-card .status {
    align-self: flex-start;
    padding: 0.2rem 0.6rem !important;
    border-radius: 12px !important;
    font-size: 0.65rem !important;
    font-weight: 600 !important;
    display: flex !important;
    align-items: center !important;
    gap: 0.2rem !important;
}

.webinar-card .status.preparing {
    background-color: #fff3cd !important;
    color: #856404 !important;
}

.webinar-card .status.finished {
    background-color: #d4edda !important;
    color: #155724 !important;
}

.webinar-card .status i {
    font-size: 0.55rem;
}

/* Additional card styling for consistency */



/* App Download Section */
.app-download-section {
    background-color: var(--primary-300);
    padding: 3rem 0;
    margin: 2rem 0;
    position: relative;
    z-index: 2;
}

.app-download-content {
    display: flex;
    justify-content: space-around;
    align-items: center;
    flex-wrap: wrap;
    gap: 2rem;
}

.app-item {
    display: flex;
    align-items: center;
    background-color: white;
    padding: 2rem;
    border-radius: 15px;
    box-shadow: 0 5px 15px rgba(0,0,0,0.1);
    transition: all 0.3s ease;
}

.app-item:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 25px rgba(0,0,0,0.2);
}

.app-icon {
    background-color: var(--accent-100);
    color: white;
    width: 60px;
    height: 60px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    margin-left: 1rem;
}

.app-info {
    flex: 1;
}

.app-info h3 {
    color: var(--primary-300);
    font-size: 1.1rem;
    margin-bottom: 0.5rem;
    font-weight: bold;
}

.app-info p {
    color: #666;
    font-size: 0.9rem;
    margin: 0;
}

.download-btn {
    background-color: var(--accent-100);
    color: white;
    text-decoration: none;
    padding: 0.75rem 1.5rem;
    border-radius: 25px;
    font-weight: bold;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.download-btn:hover {
    background-color: var(--primary-300);
    color: white;
    transform: translateY(-2px);
}

/* News List Page Styles */
.page-header {
    background-color: white;
    border-radius: 15px;
    padding: 2rem;
    box-shadow: 0 5px 15px rgba(0,0,0,0.05);
    margin-bottom: 2rem;
}

.page-title {
    color: var(--primary-300);
    font-size: 2rem;
    font-weight: bold;
    margin-bottom: 0.5rem;
}

.search-filter-section .card {
    border: none;
    box-shadow: 0 5px 15px rgba(0,0,0,0.05);
    border-radius: 15px;
}

.news-card {
    transition: all 0.3s ease;
    border: none;
    box-shadow: 0 5px 15px rgba(0,0,0,0.05);
    border-radius: 15px;
    overflow: hidden;
}

.news-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 25px rgba(0,0,0,0.15);
}

.news-card .card-img-top {
    height: 200px;
    object-fit: cover;
}

.news-card .card-title {
    color: var(--primary-300);
    font-weight: bold;
    margin-bottom: 1rem;
}

.news-card .card-text {
    color: #666;
    line-height: 1.6;
}

.news-meta .badge {
    font-size: 0.8rem;
    margin-left: 0.5rem;
    color: #856404;
    background-color: #fff3cd;
    border: 1px solid #ffeaa7;
}

.news-footer {
    border-top: 1px solid #eee;
    padding-top: 1rem;
    margin-top: 1rem;
}

/* Pagination Styles */
.pagination .page-link {
    color: var(--primary-300);
    border: 1px solid var(--primary-200);
    margin: 0 2px;
    border-radius: 8px;
}

.pagination .page-item.active .page-link {
    background-color: var(--primary-300);
    border-color: var(--primary-300);
    color: white;
}

.pagination .page-link:hover {
    background-color: var(--primary-200);
    border-color: var(--primary-200);
    color: var(--primary-300);
}

/* Video Container Styles */
.video-container {
    position: relative;
    width: 100%;
    margin: 1rem 0;
    border-radius: 10px;
    overflow: hidden;
    box-shadow: 0 4px 15px rgba(0,0,0,0.1);
}

.video-container iframe {
    width: 100%;
    height: 400px;
    border: none;
    border-radius: 10px;
}

/* Responsive video */
@media (max-width: 768px) {
    .video-container iframe {
        height: 250px;
    }
}

/* Footer */
.footer {
    background-color: var(--primary-300);
    color: white;
    padding: 3rem 0 1rem;
    position: relative;
    z-index: 2;
}

.footer h4 {
    color: var(--accent-200);
    margin-bottom: 1.5rem;
    font-weight: bold;
    position: relative;
}

.footer h4::after {
    content: '';
    position: absolute;
    bottom: -0.5rem;
    right: 0;
    width: 50px;
    height: 3px;
    background-color: var(--accent-100);
    border-radius: 2px;
}

.footer-links {
    list-style: none;
    padding: 0;
}

.footer-links li {
    margin-bottom: 0.75rem;
}

.footer-links a {
    color: var(--text-200);
    text-decoration: none;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.footer-links a:hover {
    color: var(--accent-200);
    transform: translateX(-5px);
}

.social-links {
    display: flex;
    flex-direction: column;
    gap: 0.8rem;
}

.social-link {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    color: var(--text-200);
    text-decoration: none;
    padding: 0.5rem;
    border-radius: 5px;
    transition: all 0.3s ease;
}

.social-link:hover {
    color: var(--accent-200);
    background-color: rgba(255,255,255,0.1);
}

.social-link i {
    font-size: 1.2rem;
}

.footer-bottom {
    border-top: 1px solid rgba(255,255,255,0.1);
    margin-top: 2rem;
    padding-top: 1rem;
    text-align: center;
    color: var(--text-200);
}

/* Animations */
@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Mobile Menu Improvements */
@media (max-width: 992px) {
    .navbar-collapse {
        background-color: white;
        border-radius: 10px;
        margin-top: 1rem;
        padding: 1rem;
        box-shadow: 0 5px 15px rgba(0,0,0,0.1);
    }
    
    .navbar-nav {
        width: 100%;
    }
    
    .nav-item {
        width: 100%;
        margin-bottom: 0.5rem;
    }
    
    .nav-link {
        width: 100%;
        justify-content: center;
        padding: 1rem !important;
        border-radius: 8px;
        transition: all 0.3s ease;
        cursor: pointer;
        -webkit-tap-highlight-color: transparent;
    }
    
    .nav-link:hover {
        background-color: var(--primary-200);
    }
    
    /* Dropdown menu styling for mobile */
    .dropdown-menu {
        position: static !important;
        float: none !important;
        width: 100% !important;
        margin-top: 0.5rem;
        border: 1px solid var(--primary-200);
        border-radius: 8px;
        background-color: var(--primary-200);
        transform: none !important;
        box-shadow: none;
        opacity: 0;
        max-height: 0;
        overflow: hidden;
        transition: all 0.3s ease;
    }
    
    .dropdown-menu.show {
        opacity: 1;
        max-height: 500px;
        overflow: visible;
    }
    
    .dropdown-item {
        color: var(--primary-300);
        padding: 0.75rem 1rem;
        border-radius: 5px;
        margin-bottom: 0.25rem;
        text-align: center;
        cursor: pointer;
        -webkit-tap-highlight-color: transparent;
        transition: all 0.3s ease;
    }
    
    .dropdown-item:hover {
        background-color: var(--accent-100);
        color: white;
        transform: translateX(-5px);
    }
    
    .dropdown-item:active {
        background-color: var(--accent-200);
        transform: scale(0.98);
    }
    
    .dropdown-divider {
        margin: 0.5rem 0;
        border-color: var(--primary-300);
    }
    
    /* Arrow indicator for dropdown */
    .dropdown-toggle::after {
        content: '▼';
        border: none !important;
        font-size: 0.8rem;
        margin-right: 0.5rem;
        transition: transform 0.3s ease;
    }
    
    .dropdown-toggle.show::after {
        transform: rotate(180deg);
    }
    
    /* Better touch targets for mobile */
    .nav-link, .dropdown-item {
        min-height: 44px;
        display: flex;
        align-items: center;
        justify-content: center;
    }
    
    
    /* Accessibility improvements for mobile menu */
    /* Focus states for better accessibility */
    .nav-link:focus,
    .dropdown-item:focus {
        outline: 2px solid var(--accent-100);
        outline-offset: 2px;
        background-color: var(--primary-200);
    }
    
    /* Better visual feedback for touch interactions */
    .nav-link:active,
    .dropdown-item:active {
        background-color: var(--accent-200);
        transform: scale(0.98);
        transition: all 0.1s ease;
    }
    
    /* Improved dropdown animations */
    .dropdown-menu {
        transition: max-height 0.3s cubic-bezier(0.4, 0, 0.2, 1), 
                   opacity 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    }
    
    /* Better spacing for nested menus */
    .dropdown-submenu .dropdown-menu {
        margin-right: 1rem;
        border-right: 2px solid var(--accent-100);
    }
    
    /* Clear visual hierarchy */
    .dropdown-submenu .dropdown-item {
        background-color: rgba(0,0,0,0.02);
        font-weight: 500;
    }
    
    .dropdown-submenu .dropdown-item:hover {
        background-color: var(--accent-100);
        color: white;
    }
}

/* Responsive Design */
@media (max-width: 768px) {
    .hero-content {
        flex-direction: column;
        text-align: center;
        margin-left: 0;
    }
    
    .hero-text {
        margin-left: 0;
        margin-bottom: 2rem;
    }
    
    .hero-text h1 {
        font-size: 2rem;
    }
    
    .app-download-content {
        flex-direction: column;
    }
    
    .app-item {
        width: 100%;
    }
    
    .section-header {
        flex-direction: column;
        gap: 1.5rem;
        text-align: center;
    }
    
    .navbar-nav {
        text-align: center;
    }
    
    /* Better spacing for mobile menu */
    .navbar-collapse {
        padding: 1.5rem;
    }
    
    .nav-item {
        margin-bottom: 0.75rem;
    }
    
    .nav-link {
        font-size: 1rem;
        padding: 1.2rem !important;
    }
}

@media (max-width: 576px) {
    .hero-nav {
        width: 40px;
        height: 40px;
    }
    
    .hero-nav.prev {
        left: 1rem;
    }
    
    .hero-nav.next {
        right: 1rem;
    }
    
    .content-card {
        min-width: 250px;
    }
    
    .app-item {
        flex-direction: column;
        text-align: center;
    }
    
    .app-icon {
        margin-left: 0;
        margin-bottom: 1rem;
    }
    
    /* Enhanced mobile menu for small screens */
    .navbar-collapse {
        padding: 0.5rem;
        margin-top: 0.5rem;
    }
    
    .nav-link {
        padding: 0.8rem !important;
        font-size: 0.9rem;
    }
    
    .dropdown-item {
        padding: 0.6rem 0.8rem;
        font-size: 0.85rem;
    }
    
    /* Better touch targets for very small screens */
    .nav-link, .dropdown-item {
        min-height: 48px;
    }
    
    /* Improved submenu indicators */
    .dropdown-submenu .dropdown-item::after {
        font-size: 0.6rem;
        right: 0.8rem;
    }
}

/* News Detail Page Styles */
.news-article {
    background-color: transparent;
    padding: 0;
}

.news-title {
    color: var(--primary-300);
    font-size: 2.5rem;
    font-weight: bold;
    margin-bottom: 1rem;
}

.news-meta {
    color: white;
    font-size: 0.9rem;
}

.meta-info {
    display: flex;
    flex-wrap: wrap;
    gap: 1rem;
    align-items: center;
    color: white;
}

.meta-item {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    color: white;
}

.meta-item i {
    color: white;
}

/* Ensure buttons in news-meta are visible */
.news-meta .btn {
    color: var(--primary-300);
    background-color: white;
    border-color: var(--primary-300);
}

.news-meta .btn:hover {
    background-color: var(--primary-300);
    color: white;
    border-color: var(--primary-300);
}

.news-summary {
    background-color: var(--accent-200);
    padding: 1.5rem;
    border-radius: 8px;
    border-right: 4px solid var(--accent-100);
}

.news-content {
    line-height: 1.8;
    color: var(--text-200);
}

.content-text {
    font-size: 1.1rem;
}

.news-video {
    margin-top: 1rem;
}

.video-container {
    position: relative;
    width: 100%;
    height: 0;
    padding-bottom: 56.25%; /* 16:9 aspect ratio */
    margin-top: 1rem;
}

.video-container iframe {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    border-radius: 8px;
}

.news-attachment {
    text-align: center;
    padding: 1rem;
}

/* News Attachment Button Styles */
.btn-news-attachment {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    background-color: var(--accent-100);
    color: white;
    padding: 0.75rem 1.5rem;
    border-radius: 8px;
    text-decoration: none;
    font-weight: 500;
    transition: all 0.3s ease;
    border: 2px solid var(--accent-100);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
}

.btn-news-attachment:hover {
    background-color: var(--accent-200);
    color: white;
    border-color: var(--accent-200);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
    text-decoration: none;
}

.btn-news-attachment:active {
    transform: translateY(0);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
}

.btn-news-attachment:focus {
    outline: none;
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.3);
}

.btn-news-attachment i {
    font-size: 1.1rem;
}

.share-section {
    margin-top: 1rem;
}

.share-buttons {
    display: flex;
    gap: 1rem;
    justify-content: center;
    margin-top: 1rem;
}

/* Card Styles for News Detail */
.news-article .card {
    border: none;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    border-radius: 12px;
    margin-bottom: 1.5rem;
}

.news-article .card-body {
    padding: 2rem;
}

.news-article .card:first-child {
    background: linear-gradient(135deg, var(--primary-200) 0%, var(--primary-100) 100%);
}

.news-article .card:nth-child(2) {
    background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
}

.news-article .card:nth-child(3) {
    background: linear-gradient(135deg, var(--accent-200) 0%, var(--accent-100) 100%);
}

.news-article .card:nth-child(4) {
    background: linear-gradient(135deg, #ffffff 0%, #f8f9fa 100%);
}

.news-article .card:nth-child(5) {
    background: linear-gradient(135deg, #e3f2fd 0%, #bbdefb 100%);
}

.news-article .card:nth-child(6) {
    background: linear-gradient(135deg, #f3e5f5 0%, #e1bee7 100%);
}

.news-article .card:nth-child(7) {
    background: linear-gradient(135deg, #e8f5e8 0%, #c8e6c9 100%);
}

/* Archive Badge Styles */
.archive-badge {
    position: absolute;
    top: 10px;
    right: 10px;
    background-color: #6c757d;
    color: white;
    padding: 0.25rem 0.5rem;
    border-radius: 15px;
    font-size: 0.8rem;
    font-weight: bold;
    z-index: 10;
}

.archive-badge i {
    margin-left: 0.25rem;
}

/* Archive Page Specific Styles */
.news-archive .news-card {
    opacity: 0.8;
    transition: opacity 0.3s ease;
}

.news-archive .news-card:hover {
    opacity: 1;
}

.news-archive .card-img-top {
    position: relative;
}

.news-archive .card-img-top::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(108, 117, 125, 0.1);
    pointer-events: none;
}

/* Course Card Image Styling */
.course-card-image {
    width: 100%;
    height: 200px;
    overflow: hidden;
    border-radius: 10px 10px 0 0;
    background-color: #f8f9fa;
    display: flex;
    align-items: center;
    justify-content: center;
}

.course-card-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s ease;
}

.course-card:hover .course-card-image img {
    transform: scale(1.05);
}

.course-card-image img[src=""] {
    display: none;
}

.course-card-image:empty::after {
    content: 'تصویر موجود نیست';
    color: #6c757d;
    font-size: 14px;
} 

 