/* ============================
   Kurdish Sorani RTL Styles
   ============================ */

:root {
    --primary-color: #8B0000;
    --secondary-color: #000000;
    --success-color: #10b981;
    --danger-color: #ef4444;
    --warning-color: #f59e0b;
    --info-color: #3b82f6;
    --dark-color: #000000;
    --light-color: #f3f4f6;
    --white-color: #ffffff;
    --border-color: #e5e7eb;
    --text-color: #000000;
    --shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    --shadow-lg: 0 10px 30px rgba(0, 0, 0, 0.15);
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif, 'Arial';
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    background-attachment: fixed;
    min-height: 100vh;
    direction: rtl;
    color: var(--text-color);
    line-height: 1.6;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px;
}

/* ============================
   Navbar
   ============================ */

.navbar {
    background: var(--white-color);
    box-shadow: var(--shadow);
    position: sticky;
    top: 0;
    z-index: 1000;
    width: 100%;
    display: block;
}

.navbar .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 15px 20px;
}

.main-content {
    min-height: calc(100vh - 80px);
    padding-top: 20px;
}

.nav-brand {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 24px;
    font-weight: bold;
    color: var(--primary-color);
    text-decoration: none;
    transition: all 0.3s ease;
    cursor: pointer;
}

.nav-brand:hover {
    color: var(--secondary-color);
    transform: scale(1.05);
}

.nav-brand:visited {
    color: var(--primary-color);
}

.nav-brand i {
    font-size: 28px;
}

.nav-menu {
    display: flex;
    list-style: none;
    gap: 10px;
    align-items: center;
}

/* ============================
   Enhanced Language Switcher
   ============================ */

.nav-language-switcher {
    position: relative;
    display: flex;
    align-items: center;
    order: -1; /* Show first on mobile */
}

.lang-toggle-btn {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 8px 12px;
    background: var(--white-color);
    border: 2px solid var(--border-color);
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.3s ease;
    font-size: 14px;
    color: var(--text-color);
    font-weight: 500;
    min-width: 100px;
    justify-content: space-between;
}

.lang-toggle-btn:hover {
    border-color: var(--primary-color);
    background: var(--light-color);
    box-shadow: 0 2px 8px rgba(139, 0, 0, 0.1);
}

.nav-language-switcher.active .lang-toggle-btn {
    border-color: var(--primary-color);
    background: var(--light-color);
    box-shadow: 0 2px 8px rgba(139, 0, 0, 0.15);
}

.nav-language-switcher.active .lang-toggle-btn .fa-chevron-down {
    transform: rotate(180deg);
}

.current-lang {
    font-weight: 600;
    white-space: nowrap;
}

.lang-dropdown-menu {
    position: absolute;
    top: calc(100% + 5px);
    left: 0;
    right: 0;
    background: var(--white-color);
    border: 2px solid var(--border-color);
    border-radius: 8px;
    box-shadow: var(--shadow-lg);
    opacity: 0;
    visibility: hidden;
    transform: translateY(-10px);
    transition: all 0.3s ease;
    z-index: 1000;
    overflow: hidden;
}

.lang-dropdown-menu.show {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.lang-option {
    display: flex;
    align-items: center;
    justify-content: space-between;
    width: 100%;
    padding: 12px 16px;
    border: none;
    background: transparent;
    cursor: pointer;
    transition: all 0.3s ease;
    text-align: left;
    color: var(--text-color);
    font-weight: 500;
    border-bottom: 1px solid var(--light-color);
}

.lang-option:last-child {
    border-bottom: none;
}

.lang-option:hover {
    background: var(--light-color);
    color: var(--primary-color);
}

.lang-option.active {
    background: var(--primary-color);
    color: var(--white-color);
}

.lang-option.active:hover {
    background: var(--primary-color);
    opacity: 0.9;
}

.lang-name {
    font-size: 14px;
}

.lang-option .fa-check {
    font-size: 12px;
    color: var(--white-color);
}

/* Enhanced User Menu */
.user-menu {
    position: relative;
}

.user-dropdown {
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 10px 15px;
    border-radius: 8px;
    transition: all 0.3s ease;
}

.user-dropdown:hover {
    background: var(--light-color);
}

.user-menu.active .user-dropdown {
    background: var(--light-color);
}

.user-menu.active .user-dropdown .fa-chevron-down {
    transform: rotate(180deg);
}

.user-dropdown-content {
    position: absolute;
    top: calc(100% + 5px);
    right: 0;
    background: var(--white-color);
    min-width: 220px;
    border: 2px solid var(--border-color);
    border-radius: 8px;
    box-shadow: var(--shadow-lg);
    opacity: 0;
    visibility: hidden;
    transform: translateY(-10px);
    transition: all 0.3s ease;
    z-index: 1000;
    overflow: hidden;
}

.user-dropdown-content.show {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.user-dropdown-content a {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 14px 18px;
    color: var(--text-color);
    text-decoration: none;
    transaction: all 0.3s ease;
    border-bottom: 1px solid var(--light-color);
    font-weight: 500;
}

.user-dropdown-content a:last-child {
    border-bottom: none;
}

.user-dropdown-content a:hover {
    background: var(--light-color);
    color: var(--primary-color);
}

.user-dropdown-content .logout-btn:hover {
    background: var(--danger-color);
    color: var(--white-color);
}

.dropdown-divider {
    height: 1px;
    background: var(--border-color);
    margin: 8px 0;
}

/* Ensure nav-menu is visible on desktop and hamburger is hidden */
@media (min-width: 769px) {
    .nav-menu {
        display: flex !important;
    }
    
    .hamburger {
        display: none !important;
    }
    
    .nav-language-switcher {
        margin-left: 15px;
    }
}

.nav-menu li a {
    text-decoration: none;
    color: var(--text-color);
    padding: 10px 20px;
    border-radius: 8px;
    transition: all 0.3s;
    display: flex;
    align-items: center;
    gap: 8px;
}

.nav-menu li a:hover,
.nav-menu li a.active {
    background: var(--primary-color);
    color: var(--white-color);
}

.user-menu {
    position: relative;
}

.user-dropdown {
    cursor: pointer;
}

.dropdown-content {
    position: absolute;
    top: 100%;
    left: 0;
    background: var(--white-color);
    min-width: 200px;
    box-shadow: var(--shadow-lg);
    border-radius: 8px;
    margin-top: 10px;
    overflow: hidden;
    opacity: 0;
    visibility: hidden;
    transform: translateY(-10px);
    transition: opacity 0.3s ease, visibility 0.3s ease, transform 0.3s ease;
    transition-delay: 0s;
}

.user-menu:hover .dropdown-content {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
    transition-delay: 0.15s;
}

.dropdown-content:hover {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.dropdown-content a {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 12px 20px;
    color: var(--text-color);
    text-decoration: none;
    transition: background 0.3s;
}

.dropdown-content a:hover {
    background: var(--light-color);
}

.hamburger {
    display: none;
    flex-direction: column;
    gap: 5px;
    cursor: pointer;
    padding: 5px;
}

.hamburger span {
    width: 25px;
    height: 3px;
    background: var(--text-color);
    border-radius: 3px;
    transition: all 0.3s;
}

.hamburger.active span:nth-child(1) {
    transform: rotate(45deg) translate(8px, 8px);
}

.hamburger.active span:nth-child(2) {
    opacity: 0;
}

.hamburger.active span:nth-child(3) {
    transform: rotate(-45deg) translate(7px, -6px);
}

@media (max-width: 768px) {
    .navbar {
        position: sticky;
        top: 0;
        z-index: 1001;
    }
    
    .navbar .container {
        position: relative;
    }

    .nav-language-switcher {
        order: 2;
        margin-right: 10px;
    }
    
    .lang-toggle-btn {
        padding: 6px 10px;
        font-size: 13px;
        min-width: 80px;
    }
    
    .lang-dropdown-menu {
        right: 0;
        left: auto;
        min-width: 140px;
    }

    .nav-menu {
        display: none;
        position: absolute;
        top: 100%;
        right: 0;
        left: 0;
        background: var(--white-color);
        flex-direction: column;
        padding: 20px;
        box-shadow: var(--shadow);
        z-index: 1000;
        border-top: 2px solid var(--border-color);
    }

    .nav-menu.active {
        display: flex !important;
        animation: slideDown 0.3s ease;
    }

    .hamburger {
        display: flex;
        z-index: 1002;
        order: 3;
    }

    .nav-menu li {
        width: 100%;
        border-bottom: 1px solid var(--light-color);
    }

    .nav-menu li:last-child {
        border-bottom: none;
    }

    .nav-menu li a {
        width: 100%;
        padding: 15px 10px;
        display: flex;
        align-items: center;
        justify-content: center;
        gap: 10px;
        text-align: center;
    }

    /* Enhanced mobile user menu */
    .user-dropdown-content {
        position: static;
        box-shadow: none;
        margin-top: 10px;
        background: var(--light-color);
        border-radius: 8px;
        opacity: 1;
        visibility: visible;
        transform: none;
        border: 1px solid var(--border-color);
    }

    .user-menu.active .user-dropdown-content,
    .user-menu .user-dropdown-content {
        display: block;
        opacity: 1;
        visibility: visible;
    }
    
    .user-dropdown-content a {
        padding: 12px 15px;
    }
}

/* ============================
   Alert Messages
   ============================ */

.alert {
    position: fixed;
    top: 80px;
    left: 50%;
    transform: translateX(-50%);
    padding: 15px 30px;
    border-radius: 8px;
    box-shadow: var(--shadow-lg);
    display: flex;
    align-items: center;
    gap: 10px;
    z-index: 2000;
    animation: slideDown 0.3s ease;
    min-width: 300px;
}

@keyframes slideDown {
    from {
        top: -100px;
        opacity: 0;
    }
    to {
        top: 80px;
        opacity: 1;
    }
}

.alert-success {
    background: var(--success-color);
    color: var(--white-color);
}

.alert-error {
    background: var(--danger-color);
    color: var(--white-color);
}

.alert-info {
    background: var(--info-color);
    color: var(--white-color);
}

.alert-close {
    background: transparent;
    border: none;
    color: var(--white-color);
    font-size: 24px;
    cursor: pointer;
    margin-right: auto;
}

/* ============================
   Hero Section
   ============================ */

.hero-section {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 40px;
    align-items: center;
    padding: 60px 0;
    background: var(--white-color);
    border-radius: 20px;
    margin: 40px auto;
    box-shadow: var(--shadow-lg);
}

.hero-content {
    padding: 40px;
}

.hero-content h1 {
    font-size: 48px;
    color: var(--primary-color);
    margin-bottom: 20px;
}

.hero-subtitle {
    font-size: 20px;
    color: var(--text-color);
    margin-bottom: 30px;
}

.hero-buttons {
    display: flex;
    gap: 15px;
}

.hero-image {
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 40px;
}

.hero-icon {
    font-size: 200px;
    color: var(--primary-color);
    opacity: 0.2;
}

@media (max-width: 768px) {
    .hero-section {
        grid-template-columns: 1fr;
    }

    .hero-content h1 {
        font-size: 32px;
    }

    .hero-icon {
        font-size: 100px;
    }
}

/* ============================
   Buttons
   ============================ */

.btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 12px 24px;
    border: none;
    border-radius: 8px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    text-decoration: none;
    transition: all 0.3s;
}

.btn-primary {
    background: var(--primary-color);
    color: var(--white-color);
}

.btn-primary:hover {
    background: #1d4ed8;
    transform: translateY(-2px);
    box-shadow: var(--shadow);
}

.btn-secondary {
    background: var(--secondary-color);
    color: var(--white-color);
}

.btn-secondary:hover {
    background: #6d28d9;
    transform: translateY(-2px);
    box-shadow: var(--shadow);
}

.btn-success {
    background: var(--success-color);
    color: var(--white-color);
}

.btn-danger {
    background: var(--danger-color);
    color: var(--white-color);
}

.btn-block {
    width: 100%;
    justify-content: center;
}

/* ============================
   Features Section
   ============================ */

.features-section {
    margin: 60px 0;
}

.section-title {
    text-align: center;
    font-size: 36px;
    color: var(--white-color);
    margin-bottom: 40px;
}

.features-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 30px;
}

.feature-card {
    background: var(--white-color);
    padding: 30px;
    border-radius: 15px;
    text-align: center;
    box-shadow: var(--shadow);
    transition: all 0.3s;
}

.feature-card:hover {
    transform: translateY(-10px);
    box-shadow: var(--shadow-lg);
}

.feature-icon {
    font-size: 48px;
    color: var(--primary-color);
    margin-bottom: 20px;
}

.feature-card h3 {
    font-size: 22px;
    color: var(--dark-color);
    margin-bottom: 15px;
}

.feature-card p {
    color: var(--text-color);
    line-height: 1.8;
}

/* ============================
   Auth Pages
   ============================ */

.auth-container {
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: calc(100vh - 200px);
    padding: 40px 20px;
}

.auth-card {
    background: var(--white-color);
    border-radius: 20px;
    box-shadow: var(--shadow-lg);
    width: 100%;
    max-width: 500px;
    overflow: hidden;
}

.auth-header {
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    color: var(--white-color);
    padding: 40px;
    text-align: center;
}

.auth-header i {
    font-size: 48px;
    margin-bottom: 15px;
}

.auth-header h2 {
    font-size: 28px;
    margin-bottom: 10px;
}

.auth-header p {
    opacity: 0.9;
}

.auth-form {
    padding: 40px;
}

.form-group {
    margin-bottom: 25px;
}

.form-group label {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 8px;
    font-weight: 600;
    color: var(--dark-color);
}

.form-group input,
.form-group select,
.form-group textarea {
    width: 100%;
    padding: 12px 15px;
    border: 2px solid var(--border-color);
    border-radius: 8px;
    font-size: 16px;
    transition: border 0.3s;
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
    outline: none;
    border-color: var(--primary-color);
}

.auth-footer {
    text-align: center;
    padding: 20px;
    background: var(--light-color);
}

.auth-footer a {
    color: var(--primary-color);
    text-decoration: none;
    font-weight: 600;
}

/* ============================
   Dashboard
   ============================ */

.dashboard-header {
    background: var(--white-color);
    padding: 30px;
    border-radius: 15px;
    margin-bottom: 30px;
    box-shadow: var(--shadow);
}

.dashboard-header h1 {
    color: var(--primary-color);
    margin-bottom: 10px;
}

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

.stat-card {
    background: var(--white-color);
    padding: 25px;
    border-radius: 15px;
    box-shadow: var(--shadow);
    display: flex;
    align-items: center;
    gap: 20px;
    transition: all 0.3s;
}

.stat-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-lg);
}

.stat-icon {
    width: 60px;
    height: 60px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 28px;
    color: var(--white-color);
}

.stat-icon.blue { background: var(--primary-color); }
.stat-icon.green { background: var(--success-color); }
.stat-icon.orange { background: var(--warning-color); }
.stat-icon.purple { background: var(--secondary-color); }

.stat-info h3 {
    font-size: 32px;
    color: var(--dark-color);
    margin-bottom: 5px;
}

.stat-info p {
    color: var(--text-color);
    font-size: 14px;
}

.quick-actions {
    background: var(--white-color);
    padding: 30px;
    border-radius: 15px;
    margin-bottom: 40px;
    box-shadow: var(--shadow);
}

.quick-actions h2 {
    color: var(--dark-color);
    margin-bottom: 20px;
}

.actions-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 15px;
}

.action-card {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 10px;
    padding: 25px;
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    color: var(--white-color);
    text-decoration: none;
    border-radius: 12px;
    transition: all 0.3s;
}

.action-card:hover {
    transform: scale(1.05);
    box-shadow: var(--shadow-lg);
}

.action-card i {
    font-size: 36px;
}

.recent-section {
    background: var(--white-color);
    padding: 30px;
    border-radius: 15px;
    box-shadow: var(--shadow);
}

.recent-section h2 {
    color: var(--dark-color);
    margin-bottom: 20px;
}

.recent-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 20px;
}

.recent-card {
    border: 2px solid var(--border-color);
    border-radius: 12px;
    padding: 20px;
}

.recent-card h3 {
    color: var(--dark-color);
    margin-bottom: 15px;
    padding-bottom: 10px;
    border-bottom: 2px solid var(--border-color);
}

.recent-list {
    margin-bottom: 15px;
}

.view-all {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    color: var(--primary-color);
    text-decoration: none;
    font-weight: 600;
}

/* ============================
   Tables
   ============================ */

.page-header {
    background: var(--white-color);
    padding: 25px;
    border-radius: 15px;
    margin-bottom: 25px;
    box-shadow: var(--shadow);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.page-header h1 {
    color: var(--primary-color);
}

.search-section {
    background: var(--white-color);
    padding: 20px;
    border-radius: 15px;
    margin-bottom: 20px;
    box-shadow: var(--shadow);
    display: flex;
    gap: 15px;
}

.search-box {
    flex: 1;
    position: relative;
}

.search-box i {
    position: absolute;
    right: 15px;
    top: 50%;
    transform: translateY(-50%);
    color: var(--text-color);
}

.search-box input {
    width: 100%;
    padding: 12px 45px 12px 15px;
    border: 2px solid var(--border-color);
    border-radius: 8px;
    font-size: 16px;
}

.filter-section select {
    padding: 12px 15px;
    border: 2px solid var(--border-color);
    border-radius: 8px;
    font-size: 16px;
}

.table-container {
    background: var(--white-color);
    border-radius: 15px;
    box-shadow: var(--shadow);
    overflow: hidden;
}

/* Default Desktop Layout - Show table, hide mobile cards */
.data-table {
    display: table;
}

.mobile-cards {
    display: none;
}

/* Desktop and larger screens (min-width: 769px) */
@media (min-width: 769px) {
    .data-table {
        display: table !important;
    }
    
    .mobile-cards {
        display: none !important;
    }
}

.data-table {
    width: 100%;
    border-collapse: collapse;
}

.data-table thead {
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    color: var(--white-color);
}

.data-table th,
.data-table td {
    padding: 15px;
    text-align: right;
}

.data-table tbody tr {
    border-bottom: 1px solid var(--border-color);
    transition: background 0.3s;
}

.data-table tbody tr:hover {
    background: var(--light-color);
}

.action-buttons {
    display: flex;
    gap: 8px;
    justify-content: flex-end;
}

.btn-icon {
    width: 35px;
    height: 35px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 6px;
    border: none;
    cursor: pointer;
    transition: all 0.3s;
}

.btn-icon.view {
    background: var(--info-color);
    color: var(--white-color);
}

.btn-icon.edit {
    background: var(--warning-color);
    color: var(--white-color);
}

.btn-icon.delete {
    background: var(--danger-color);
    color: var(--white-color);
}

/* ============================
   Modal
   ============================ */

.modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.6);
    z-index: 3000;
    align-items: center;
    justify-content: center;
}

.modal.active {
    display: flex;
}

.modal-content {
    background: var(--white-color);
    border-radius: 15px;
    width: 90%;
    max-width: 600px;
    max-height: 90vh;
    overflow-y: auto;
    box-shadow: var(--shadow-lg);
}

.modal-large {
    max-width: 900px;
}

.modal-header {
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    color: var(--white-color);
    padding: 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.modal-close {
    background: transparent;
    border: none;
    color: var(--white-color);
    font-size: 30px;
    cursor: pointer;
}

.modal-body {
    padding: 30px;
}

/* ============================
   Forms
   ============================ */

.form-container {
    background: var(--white-color);
    border-radius: 15px;
    padding: 30px;
    box-shadow: var(--shadow);
}

.form-section {
    margin-bottom: 30px;
    padding-bottom: 30px;
    border-bottom: 2px solid var(--border-color);
}

.form-section:last-child {
    border-bottom: none;
}

.form-section h3 {
    color: var(--primary-color);
    margin-bottom: 20px;
}

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

.form-actions {
    display: flex;
    gap: 15px;
    justify-content: flex-start;
    padding-top: 20px;
}

/* ============================
   Course Cards
   ============================ */

.courses-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(350px, 1fr));
    gap: 25px;
    margin-bottom: 30px;
}

.course-card {
    background: var(--white-color);
    border-radius: 15px;
    overflow: hidden;
    box-shadow: var(--shadow);
    transition: all 0.3s;
}

.course-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-lg);
}

.course-header {
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    color: var(--white-color);
    padding: 20px;
}

.course-body {
    padding: 20px;
}

.course-footer {
    padding: 15px 20px;
    background: var(--light-color);
    display: flex;
    gap: 10px;
}

/* ============================
   Pagination
   ============================ */

.pagination {
    display: flex;
    justify-content: center;
    gap: 10px;
    margin: 30px 0;
}

.pagination button {
    padding: 10px 15px;
    border: 2px solid var(--primary-color);
    background: var(--white-color);
    color: var(--primary-color);
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.3s;
}

.pagination button:hover,
.pagination button.active {
    background: var(--primary-color);
    color: var(--white-color);
}

.pagination button:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

/* ============================
   Footer
   ============================ */

.footer {
    background: var(--dark-color);
    color: var(--white-color);
    padding: 40px 0 20px;
    margin-top: 60px;
}

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

.footer-section h3,
.footer-section h4 {
    margin-bottom: 15px;
    color: var(--white-color);
}

.footer-section ul {
    list-style: none;
}

.footer-section ul li {
    margin-bottom: 10px;
}

.footer-section a {
    color: rgba(255, 255, 255, 0.8);
    text-decoration: none;
    transition: color 0.3s;
}

.footer-section a:hover {
    color: var(--white-color);
}

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

/* ============================
   Weekly Schedule Styling
   ============================ */

.weekly-schedule {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 20px;
    margin-top: 20px;
}

.day-schedule-card {
    background: var(--white-color);
    border-radius: 12px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    overflow: hidden;
}

.day-header {
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    color: var(--white-color);
    padding: 15px 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.day-header h4 {
    margin: 0;
    font-size: 1.1rem;
    display: flex;
    align-items: center;
    gap: 8px;
}

.day-games {
    padding: 15px;
    min-height: 120px;
}

.games-list-container {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.game-entry {
    background: #f8f9fa;
    border: 1px solid #e9ecef;
    border-radius: 8px;
    padding: 12px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    transition: all 0.3s ease;
}

.game-entry:hover {
    background: #e9ecef;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
}

.game-entry-info {
    display: flex;
    align-items: center;
    gap: 12px;
    flex: 1;
}

.game-number {
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    color: var(--white-color);
    width: 28px;
    height: 28px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: bold;
    font-size: 0.9rem;
    flex-shrink: 0;
}

.game-details {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.game-details strong {
    color: var(--text-color);
    font-size: 1rem;
}

.game-details small {
    color: #6c757d;
    font-size: 0.875rem;
}

.no-games {
    text-align: center;
    color: #6c757d;
    padding: 30px;
    font-style: italic;
}

.btn-icon.delete {
    background: none;
    border: none;
    color: #dc3545;
    cursor: pointer;
    padding: 8px;
    border-radius: 6px;
    transition: all 0.3s ease;
}

.btn-icon.delete:hover {
    background: #dc3545;
    color: var(--white-color);
}

.modal-actions {
    display: flex;
    gap: 10px;
    justify-content: flex-end;
}

.form-actions {
    display: flex;
    gap: 10px;
    justify-content: flex-end;
}

/* ============================
   Utilities
   ============================ */

.loading {
    text-align: center;
    padding: 40px;
    color: var(--text-color);
}

.badge {
    display: inline-block;
    padding: 4px 12px;
    border-radius: 12px;
    font-size: 12px;
    font-weight: 600;
    white-space: nowrap;
}

.badge-success {
    background: var(--success-color);
    color: var(--white-color);
}

.badge-danger {
    background: var(--danger-color);
    color: var(--white-color);
}

/* Mobile badge responsive */
@media (max-width: 480px) {
    .badge {
        font-size: 10px;
        padding: 3px 8px;
    }
}

.text-center {
    text-align: center;
}

.mt-20 {
    margin-top: 20px;
}

.mb-20 {
    margin-bottom: 20px;
}

/* Detail Sections */
.detail-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 15px;
}

.detail-grid p {
    padding: 10px;
    background: var(--light-color);
    border-radius: 8px;
}

.detail-sections {
    display: flex;
    flex-direction: column;
    gap: 25px;
}

.detail-section {
    padding: 20px;
    background: var(--light-color);
    border-radius: 12px;
}

.detail-section h3 {
    color: var(--primary-color);
    margin-bottom: 15px;
    padding-bottom: 10px;
    border-bottom: 2px solid var(--border-color);
}

.games-list {
    list-style: none;
    padding: 0;
}

.games-list li {
    padding: 10px;
    margin-bottom: 8px;
    background: var(--white-color);
    border-radius: 8px;
    border-right: 4px solid var(--primary-color);
}

.recent-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px;
    margin-bottom: 10px;
    background: var(--light-color);
    border-radius: 8px;
    transition: all 0.3s;
}

.recent-item:hover {
    background: var(--border-color);
    transform: translateX(-5px);
}

.recent-item strong {
    color: var(--dark-color);
    margin-bottom: 5px;
    display: block;
}

.recent-item p {
    color: var(--text-color);
    font-size: 14px;
    margin: 0;
}

.recent-item small {
    color: var(--text-color);
    font-size: 12px;
}

/* ============================
   Weekly Schedule View Styling
   ============================ */

.weekly-schedule-view {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 15px;
    margin-top: 15px;
}

.day-view-card {
    background: #f8f9fa;
    border: 2px solid #e9ecef;
    border-radius: 10px;
    overflow: hidden;
    transition: all 0.3s ease;
}

.day-view-card:hover {
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
    transform: translateY(-2px);
}

.day-view-header {
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    color: var(--white-color);
    padding: 12px 15px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.day-view-header h4 {
    margin: 0;
    font-size: 1rem;
    display: flex;
    align-items: center;
    gap: 8px;
}

.day-view-games {
    padding: 12px;
    min-height: 100px;
}

.game-view-entry {
    background: var(--white-color);
    border: 1px solid #e9ecef;
    border-radius: 8px;
    padding: 10px;
    margin-bottom: 8px;
    display: flex;
    align-items: center;
    gap: 10px;
    transition: all 0.2s ease;
}

.game-view-entry:hover {
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.08);
    border-color: var(--primary-color);
}

.game-view-entry:last-child {
    margin-bottom: 0;
}

.game-view-number {
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    color: var(--white-color);
    width: 26px;
    height: 26px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: bold;
    font-size: 0.85rem;
    flex-shrink: 0;
}

.game-view-details {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.game-view-details strong {
    color: var(--dark-color);
    font-size: 0.95rem;
    display: flex;
    align-items: center;
    gap: 6px;
}

.game-view-details small {
    color: #6c757d;
    font-size: 0.85rem;
    display: flex;
    align-items: center;
    gap: 6px;
}

.no-games-view {
    text-align: center;
    color: #6c757d;
    padding: 20px;
    font-style: italic;
    margin: 0;
}

.no-schedule {
    text-align: center;
    color: #6c757d;
    padding: 30px;
    font-style: italic;
    background: #f8f9fa;
    border-radius: 8px;
}

.detail-section.full-width {
    grid-column: 1 / -1;
}

/* ============================
   Share Modal Styling
   ============================ */

.share-options {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
    gap: 15px;
    padding: 10px 0;
}

.share-btn {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 10px;
    padding: 20px 15px;
    border: 2px solid #e9ecef;
    border-radius: 12px;
    background: var(--white-color);
    cursor: pointer;
    transition: all 0.3s ease;
    font-size: 0.9rem;
    font-weight: 500;
}

.share-btn:hover {
    transform: translateY(-3px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.share-btn i {
    font-size: 2rem;
}

.pdf-btn {
    color: #dc3545;
    border-color: #dc3545;
}

.pdf-btn:hover {
    background: #dc3545;
    color: var(--white-color);
}

.whatsapp-btn {
    color: #25D366;
    border-color: #25D366;
}

.whatsapp-btn:hover {
    background: #25D366;
    color: var(--white-color);
}

.facebook-btn {
    color: #1877F2;
    border-color: #1877F2;
}

.facebook-btn:hover {
    background: #1877F2;
    color: var(--white-color);
}

.twitter-btn {
    color: #1DA1F2;
    border-color: #1DA1F2;
}

.twitter-btn:hover {
    background: #1DA1F2;
    color: var(--white-color);
}

.telegram-btn {
    color: #0088cc;
    border-color: #0088cc;
}

.telegram-btn:hover {
    background: #0088cc;
    color: var(--white-color);
}

.copy-btn {
    color: #6c757d;
    border-color: #6c757d;
}

.copy-btn:hover {
    background: #6c757d;
    color: var(--white-color);
}

.web-btn {
    color: #17a2b8;
    border-color: #17a2b8;
}

.web-btn:hover {
    background: #17a2b8;
    color: var(--white-color);
}

.text-btn {
    color: #6f42c1;
    border-color: #6f42c1;
}

.text-btn:hover {
    background: #6f42c1;
    color: var(--white-color);
}

/* ============================
   Searchable Dropdown
   ============================ */

.searchable-dropdown {
    position: relative;
    width: 100%;
}

.dropdown-trigger {
    position: relative;
    cursor: pointer;
}

.dropdown-input {
    width: 100%;
    padding: 12px 40px 12px 12px;
    border: 2px solid #e5e7eb;
    border-radius: 8px;
    background: var(--white-color);
    font-size: 14px;
    cursor: pointer;
    transition: all 0.3s ease;
    direction: rtl;
}

.dropdown-input:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(74, 144, 226, 0.1);
}

.dropdown-arrow {
    position: absolute;
    left: 12px;
    top: 50%;
    transform: translateY(-50%);
    color: #6b7280;
    transition: transform 0.3s ease;
    pointer-events: none;
}

.dropdown-clear {
    position: absolute;
    left: 35px;
    top: 50%;
    transform: translateY(-50%);
    color: #6b7280;
    cursor: pointer;
    padding: 2px;
    border-radius: 50%;
    transition: all 0.3s ease;
}

.dropdown-clear:hover {
    color: #ef4444;
    background: rgba(239, 68, 68, 0.1);
}

.dropdown-menu {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: var(--white-color);
    border: 1px solid #e5e7eb;
    border-radius: 8px;
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.1);
    z-index: 1000;
    margin-top: 4px;
    opacity: 0;
    visibility: hidden;
    transform: translateY(-10px);
    transition: all 0.3s ease;
}

.searchable-dropdown.open .dropdown-menu {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.dropdown-search {
    position: relative;
    padding: 10px;
    border-bottom: 1px solid #e5e7eb;
}

.search-input {
    width: 100%;
    padding: 8px 35px 8px 12px;
    border: 1px solid #e5e7eb;
    border-radius: 6px;
    font-size: 14px;
    direction: rtl;
}

.search-input:focus {
    outline: none;
    border-color: var(--primary-color);
}

.search-icon {
    position: absolute;
    left: 12px;
    top: 50%;
    transform: translateY(-50%);
    color: #6b7280;
    pointer-events: none;
}

.dropdown-list {
    max-height: 200px;
    overflow-y: auto;
}

.dropdown-option {
    padding: 12px;
    cursor: pointer;
    transition: background-color 0.2s ease;
    border-bottom: 1px solid #f3f4f6;
    direction: rtl;
}

.dropdown-option:last-child {
    border-bottom: none;
}

.dropdown-option:hover,
.dropdown-option.focused {
    background: #f8f9fa;
}

.dropdown-option.disabled {
    color: #9ca3af;
    cursor: not-allowed;
    background: #f9fafb;
}

.dropdown-no-results {
    padding: 12px;
    text-align: center;
    color: #6b7280;
    font-style: italic;
    direction: rtl;
}

.searchable-dropdown.has-value .dropdown-input {
    border-color: var(--primary-color);
}

/* Mobile responsive */
@media (max-width: 768px) {
    .dropdown-menu {
        position: fixed;
        left: 10px;
        right: 10px;
        top: auto;
        max-height: 50vh;
    }
    
    .dropdown-list {
        max-height: calc(50vh - 60px);
    }
    
    .dropdown-option {
        padding: 15px 12px;
        font-size: 16px;
    }
    
    .search-input {
        padding: 12px 35px 12px 12px;
        font-size: 16px;
    }
}

/* ============================
   Excel Import/Export Styles
   ============================ */

.header-actions {
    display: flex;
    align-items: center;
    gap: 15px;
    flex-direction: row-reverse;
}

.excel-actions {
    display: flex;
    gap: 8px;
    flex-direction: row-reverse;
}

.excel-actions .btn {
    font-size: 13px;
    padding: 8px 12px;
    border-radius: 6px;
    transition: all 0.3s ease;
}

.excel-actions .btn:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow);
}

.file-input-container {
    position: relative;
    margin: 20px 0;
    text-align: center;
}

.file-input-container input[type="file"] {
    position: absolute;
    left: -9999px;
    opacity: 0;
}

.file-input-label {
    display: inline-block;
    padding: 15px 30px;
    background: linear-gradient(135deg, var(--info-color), var(--primary-color));
    color: var(--white-color);
    border-radius: 10px;
    cursor: pointer;
    font-size: 16px;
    font-weight: 500;
    transition: all 0.3s ease;
    border: 2px dashed transparent;
}

.file-input-label:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-lg);
    border-color: var(--primary-color);
    background: var(--white-color);
    color: var(--primary-color);
}

.file-input-label i {
    margin-left: 10px;
    font-size: 18px;
}

.file-name {
    margin-top: 10px;
    font-weight: 500;
    color: var(--success-color);
    font-size: 14px;
}

.import-instructions {
    background: var(--light-color);
    padding: 20px;
    border-radius: 10px;
    margin-bottom: 20px;
    border-right: 4px solid var(--info-color);
}

.import-instructions h3 {
    color: var(--info-color);
    margin-bottom: 15px;
    font-size: 18px;
}

.import-instructions ol {
    margin-right: 20px;
    margin-bottom: 15px;
}

.import-instructions li {
    margin-bottom: 8px;
    font-size: 14px;
    line-height: 1.5;
}

.import-results {
    margin-top: 20px;
    padding: 15px;
    border-radius: 8px;
}

.import-results .alert {
    margin-bottom: 0;
}

.import-results ul {
    margin-top: 10px;
    margin-right: 20px;
}

.import-results li {
    margin-bottom: 5px;
    font-size: 13px;
}

/* Button variants for Excel actions */
.btn-outline-success {
    color: var(--success-color);
    border: 1px solid var(--success-color);
    background: transparent;
}

.btn-outline-success:hover {
    background: var(--success-color);
    color: var(--white-color);
}

.btn-outline-info {
    color: var(--info-color);
    border: 1px solid var(--info-color);
    background: transparent;
}

.btn-outline-info:hover {
    background: var(--info-color);
    color: var(--white-color);
}

.btn-outline-warning {
    color: var(--warning-color);
    border: 1px solid var(--warning-color);
    background: transparent;
}

.btn-outline-warning:hover {
    background: var(--warning-color);
    color: var(--white-color);
}

/* Responsive design for Excel actions and Tables */
@media (max-width: 768px) {
    /* Page Header Responsive */
    .page-header {
        flex-direction: column;
        text-align: center;
        padding: 20px 15px;
        gap: 15px;
    }
    
    .page-header h1 {
        font-size: 1.5rem;
        margin: 0;
    }
    
    .header-actions {
        flex-direction: column;
        align-items: stretch;
        gap: 10px;
        width: 100%;
    }
    
    .excel-actions {
        justify-content: center;
        order: -1;
        flex-wrap: wrap;
    }
    
    .excel-actions .btn {
        flex: 1;
        font-size: 12px;
        padding: 8px 12px;
        min-width: 0;
    }
    
    /* Search Section Responsive */
    .search-section {
        padding: 15px;
        margin-bottom: 15px;
    }
    
    .search-box input {
        font-size: 16px; /* Prevent zoom on iOS */
        padding: 12px 40px 12px 12px;
    }
    
    /* Table Responsive - Card Style */
    .table-container {
        border-radius: 10px;
        margin: 0 -10px;
    }
    
    .data-table {
        display: none !important; /* Hide table on mobile */
    }
    
    /* Mobile Card Layout */
    .mobile-cards {
        display: block !important;
        padding: 10px;
    }
    
    .mobile-card {
        background: var(--white-color);
        border: 1px solid var(--border-color);
        border-radius: 10px;
        margin-bottom: 15px;
        padding: 15px;
        box-shadow: var(--shadow);
    }
    
    .mobile-card-header {
        display: flex;
        justify-content: space-between;
        align-items: center;
        margin-bottom: 12px;
        padding-bottom: 10px;
        border-bottom: 1px solid var(--light-color);
    }
    
    .mobile-card-title {
        font-weight: 600;
        color: var(--primary-color);
        font-size: 1.1rem;
    }
    
    .mobile-card-content {
        display: grid;
        gap: 8px;
        margin-bottom: 12px;
    }
    
    .mobile-card-row {
        display: flex;
        justify-content: space-between;
        align-items: center;
        padding: 5px 0;
    }
    
    .mobile-card-label {
        font-weight: 500;
        color: var(--text-color);
        font-size: 0.9rem;
    }
    
    .mobile-card-value {
        color: var(--secondary-color);
        font-size: 0.9rem;
        text-align: left;
        flex: 1;
        margin-left: 10px;
    }
    
    .mobile-card-actions {
        display: flex;
        gap: 8px;
        justify-content: center;
        padding-top: 10px;
        border-top: 1px solid var(--light-color);
    }
    
    .mobile-card-actions .btn-icon {
        flex: 1;
        max-width: 45px;
        height: 40px;
        border-radius: 8px;
    }
    
    /* Pagination Mobile */
    .pagination {
        justify-content: center;
        gap: 5px;
        padding: 15px 10px;
    }
    
    .pagination .page-btn {
        min-width: 40px;
        height: 40px;
        font-size: 14px;
    }
}

/* Tablet Responsive (481px - 768px) */
@media (min-width: 481px) and (max-width: 768px) {
    .data-table {
        display: table !important;
    }
    
    .mobile-cards {
        display: none !important;
    }
    
    .data-table th,
    .data-table td {
        padding: 10px 8px;
        font-size: 14px;
    }
    
    .page-header {
        flex-direction: row;
        text-align: left;
    }
    
    .header-actions {
        flex-direction: row;
        gap: 10px;
    }
    
    .excel-actions .btn {
        font-size: 11px;
        padding: 6px 8px;
    }
}

/* Small Mobile (max-width: 480px) */
@media (max-width: 480px) {
    .container {
        padding: 10px;
    }
    
    .page-header {
        margin-bottom: 15px;
        padding: 15px;
    }
    
    .page-header h1 {
        font-size: 1.3rem;
    }
    
    .excel-actions {
        grid-template-columns: 1fr 1fr;
        display: grid;
        gap: 8px;
    }
    
    .excel-actions .btn {
        font-size: 11px;
        padding: 8px 6px;
        text-align: center;
    }
    
    .search-section {
        padding: 12px;
    }
    
    .mobile-card {
        padding: 12px;
        margin-bottom: 12px;
    }
    
    .mobile-card-title {
        font-size: 1rem;
    }
    
    .mobile-card-actions .btn-icon {
        max-width: 40px;
        height: 35px;
        font-size: 12px;
    }
}

/* Large Screens (min-width: 1200px) */
@media (min-width: 1200px) {
    .data-table th,
    .data-table td {
        padding: 18px 20px;
    }
    
    .page-header {
        padding: 30px;
    }
    
    .excel-actions .btn {
        font-size: 14px;
        padding: 10px 15px;
        min-width: 120px;
    }
}
    
    .file-input-label {
        padding: 12px 20px;
        font-size: 14px;
    }
    
    .import-instructions {
        padding: 15px;
    }
    
    .import-instructions h3 {
        font-size: 16px;
    }
    
    .import-instructions li {
        font-size: 13px;
    }
    
    /* Modal fixes for mobile */
    .modal-content {
        width: 95%;
        max-height: 95vh;
        margin: 10px;
    }
    
    .modal-body {
        padding: 20px 15px;
    }
    
    .modal-header {
        padding: 15px;
    }
    
    .modal-header h2 {
        font-size: 18px;
    }
    
    /* Share modal mobile fixes */
    .share-options {
        grid-template-columns: repeat(2, 1fr);
        gap: 10px;
        padding: 15px 0;
        max-height: 60vh;
        overflow-y: auto;
    }
    
    .share-btn {
        padding: 15px 10px;
        font-size: 0.8rem;
        min-height: 80px;
        border: 2px solid #e9ecef;
        border-radius: 12px;
        background: var(--white-color);
        cursor: pointer;
        transition: all 0.2s ease;
        -webkit-tap-highlight-color: transparent;
        touch-action: manipulation;
    }
    
    .share-btn:active {
        transform: scale(0.95);
        background: #f8f9fa;
    }
    
    .share-btn i {
        font-size: 1.5rem;
        pointer-events: none;
    }
    
    .share-btn span {
        font-size: 0.75rem;
        line-height: 1.2;
        text-align: center;
        pointer-events: none;
    }
    
    /* Share course button mobile improvements */
    .share-course-btn {
        -webkit-tap-highlight-color: transparent;
        touch-action: manipulation;
    }
    
    .share-course-btn:active {
        transform: scale(0.95);
    }
    
    /* Modal buttons mobile improvements */
    .modal button {
        -webkit-tap-highlight-color: transparent;
        touch-action: manipulation;
    }
    
    .modal button:active {
        transform: scale(0.95);
    }
    
    /* Fix course detail sections on mobile */
    .detail-sections {
        display: block;
    }
    
    .detail-section {
        margin-bottom: 20px;
    }
    
    .detail-section.full-width {
        width: 100%;
    }
    
    /* Course footer buttons mobile fix */
    .course-footer {
        padding: 10px;
        gap: 8px;
    }
    
    .btn-icon {
        width: 35px;
        height: 35px;
        font-size: 14px;
    }
    
    /* Weekly schedule mobile view */
    .weekly-schedule-view {
        display: block;
    }
    
    .day-view-card {
        margin-bottom: 15px;
    }
    
    .day-view-games {
        max-height: none;
    }
    
    .game-view-entry {
        padding: 8px;
        font-size: 0.85rem;
    }
}

