/* Root Variables - Qatar Theme */
:root {
    --primary-maroon: #8B1538;
    --dark-maroon: #6B0F2A;
    --light-maroon: #A91D47;
    --accent-gold: #C4A962;
    --text-dark: #2C2C2C;
    --text-light: #FFFFFF;
    --background-light: #F8F8F8;
    --background-white: #FFFFFF;
    --border-color: #E0E0E0;
    --shadow: 0 2px 8px rgba(139, 21, 56, 0.1);
    --shadow-hover: 0 4px 16px rgba(139, 21, 56, 0.15);
}

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

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    color: var(--text-dark);
    background-color: var(--background-light);
    line-height: 1.6;
}

/* Text Selection Highlight */
::selection {
    background-color: var(--primary-maroon);
    color: var(--text-light);
}

::-moz-selection {
    background-color: var(--primary-maroon);
    color: var(--text-light);
}

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

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

::-webkit-scrollbar-thumb {
    background: var(--primary-maroon);
    border: 2px solid #f1f1f1;
}

::-webkit-scrollbar-thumb:hover {
    background: var(--dark-maroon);
}

/* Firefox Scrollbar */
* {
    scrollbar-width: thin;
    scrollbar-color: var(--primary-maroon) #f1f1f1;
}

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

/* Header */
.header {
    background: #8B1538;
    padding: 0;
    position: sticky;
    top: 0;
    z-index: 1000;
    border-bottom: 2px solid rgba(196, 169, 98, 0.3);
    backdrop-filter: blur(10px);
    transition: all 0.3s ease;
}

.header::after {
    content: '';
    position: absolute;
    bottom: -2px;
    left: 0;
    right: 0;
    height: 2px;
    background: linear-gradient(90deg, transparent, var(--accent-gold), transparent);
    opacity: 0.5;
}

.header-bg {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(135deg, #8B1538 0%, #6B0F2A 50%, #8B1538 100%);
    background-size: 200% 100%;
    animation: gradientShift 15s ease infinite;
    opacity: 1;
}

@keyframes gradientShift {
    0%, 100% { background-position: 0% 50%; }
    50% { background-position: 100% 50%; }
}

.header .container {
    position: relative;
    z-index: 1;
}

.header-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1.5rem 0;
    gap: 2rem;
}

.brand {
    display: flex;
    align-items: center;
    text-decoration: none;
    transition: opacity 0.25s ease, transform 0.25s ease;
}

.brand:hover {
    opacity: 0.88;
}

.brand-logo {
    height: 48px;
    width: auto;
    display: block;
    object-fit: contain;
    filter: drop-shadow(0 2px 6px rgba(0, 0, 0, 0.25));
}

.nav {
    display: flex;
    gap: 0.5rem;
    align-items: center;
}

.nav-link {
    color: rgba(255, 255, 255, 0.9);
    text-decoration: none;
    font-weight: 500;
    font-size: 0.95rem;
    padding: 0.75rem 1.5rem;
    position: relative;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    letter-spacing: 0.3px;
    overflow: hidden;
}

.nav-link::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(255, 255, 255, 0.15);
    transform: scale(0);
    transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    z-index: -1;
}

.nav-link:hover {
    color: var(--white);
}

.nav-link:hover::before {
    transform: scale(1);
}

.nav-link.active {
    color: var(--white);
    background: rgba(255, 255, 255, 0.2);
    font-weight: 600;
}

.nav-link.active::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 20%;
    right: 20%;
    height: 3px;
    background: var(--accent-gold);
}
.nav-support {
    color: var(--text-light);
    text-decoration: none;
    font-weight: 600;
    font-size: 0.95rem;
    padding: 0.6rem 1.2rem;
    transition: all 0.3s ease;
    background: rgba(196, 169, 98, 0.15);
    border: 1px solid rgba(196, 169, 98, 0.3);
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    margin-left: 0.5rem;
}

.nav-support:hover {
    background: var(--accent-gold);
    color: var(--primary-maroon);
    border-color: var(--accent-gold);
}

.kofi-icon-nav {
    width: 18px;
    height: 18px;
}
.nav-link-cta {
    color: var(--primary-maroon);
    background: linear-gradient(135deg, var(--accent-gold) 0%, #D4B972 100%);
    text-decoration: none;
    font-weight: 700;
    font-size: 0.95rem;
    padding: 0.75rem 1.75rem;
    margin-left: 1rem;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    letter-spacing: 0.3px;
    position: relative;
    overflow: hidden;
}

.nav-link-cta::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.3), transparent);
    transition: left 0.5s ease;
}

.nav-link-cta:hover::before {
    left: 100%;
}

.nav-link-cta:hover {
    background: linear-gradient(135deg, #D4B972 0%, var(--accent-gold) 100%);
}

.nav-link-cta::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.3), transparent);
    transition: left 0.5s ease;
}

.nav-link-cta:hover {
    background: #d4b872;
}

.nav-link-cta:hover::before {
    left: 100%;
}

/* Hero Section */
.hero {
    background: linear-gradient(135deg, var(--primary-maroon) 0%, var(--dark-maroon) 100%);
    padding: 4rem 0;
    color: var(--text-light);
}

.hero-content {
    text-align: center;
    max-width: 800px;
    margin: 0 auto;
}

.hero-title {
    font-size: 2.5rem;
    font-weight: 700;
    margin-bottom: 1rem;
    letter-spacing: -1px;
}

.hero-subtitle {
    font-size: 1.125rem;
    margin-bottom: 2.5rem;
    opacity: 0.95;
    font-weight: 400;
}

/* Search and Filter Container */
.search-filter-container {
    max-width: 900px;
    margin: 0 auto;
}

/* Search Bar */
.search-bar {
    display: flex;
    gap: 0.75rem;
    margin-bottom: 1.5rem;
}

.search-input {
    flex: 1;
    padding: 1rem 1.5rem;
    border: none;
    font-size: 1rem;
    outline: none;
    transition: box-shadow 0.3s ease;
}

.search-input:focus {
}

.search-input::placeholder {
    color: #999;
}

.search-button {
    padding: 1rem 2.5rem;
    background-color: var(--accent-gold);
    color: var(--text-dark);
    border: none;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
}

.search-button:hover {
    background-color: #B89950;
}

.search-button:active {
}

/* Filters */
.filters {
    display: flex;
    gap: 0.75rem;
    align-items: center;
    justify-content: center;
    flex-wrap: wrap;
}

.filter-select {
    padding: 0.875rem 1.25rem;
    border: 2px solid rgba(255, 255, 255, 0.3);
    font-size: 0.95rem;
    color: var(--text-dark);
    background-color: var(--background-white);
    cursor: pointer;
    transition: all 0.3s ease;
    min-width: 200px;
}

.filter-select:hover {
    border-color: var(--accent-gold);
}

.filter-select:focus {
    outline: none;
    border-color: var(--accent-gold);
}

.filter-select:disabled {
    background-color: rgba(255, 255, 255, 0.7);
    cursor: not-allowed;
    opacity: 0.6;
}

.filter-reset {
    padding: 0.875rem 1.75rem;
    background-color: rgba(255, 255, 255, 0.2);
    color: var(--text-light);
    border: 2px solid rgba(255, 255, 255, 0.5);
    font-size: 0.95rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    backdrop-filter: blur(10px);
}

.filter-reset:hover {
    background-color: var(--text-light);
    color: var(--primary-maroon);
    border-color: var(--text-light);
}

.filter-reset:active {
}

/* Courses Section */
.courses-section {
    padding: 3rem 0;
    min-height: 400px;
}

.section-title {
    font-size: 1.75rem;
    font-weight: 600;
    color: var(--primary-maroon);
    margin-bottom: 2rem;
    letter-spacing: -0.5px;
}

.courses-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 1.5rem;
}

/* Course Card */
.course-card {
    background-color: var(--background-white);
    border: 1px solid var(--border-color);
    padding: 1.5rem;
    transition: all 0.3s ease;
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.course-card:hover {
    border-color: var(--primary-maroon);
}

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

.course-code {
    font-size: 0.875rem;
    font-weight: 700;
    color: var(--primary-maroon);
    text-transform: uppercase;
    letter-spacing: 0.8px;
    background-color: rgba(139, 21, 56, 0.08);
    padding: 0.375rem 0.75rem;
}

.semester-badge {
    font-size: 0.8rem;
    font-weight: 500;
    color: var(--text-dark);
    background-color: var(--background-light);
    padding: 0.25rem 0.625rem;
}

.course-name {
    font-size: 1.125rem;
    font-weight: 600;
    color: var(--text-dark);
    line-height: 1.4;
    margin: 0;
}

.course-details {
    display: flex;
    flex-direction: column;
    gap: 0.625rem;
    padding: 0.75rem 0;
    border-top: 1px solid var(--border-color);
    border-bottom: 1px solid var(--border-color);
}

.detail-item {
    display: flex;
    gap: 0.5rem;
    font-size: 0.875rem;
}

.detail-label {
    color: #666;
    font-weight: 500;
    min-width: 90px;
}

.detail-value {
    color: var(--text-dark);
    font-weight: 400;
}

.course-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: auto;
}

.resource-count {
    font-size: 0.875rem;
    color: var(--primary-maroon);
    font-weight: 600;
}

.view-button {
    padding: 0.5rem 1.25rem;
    background-color: var(--primary-maroon);
    color: var(--text-light);
    border: none;
    font-size: 0.875rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
}

.view-button:hover {
    background-color: var(--dark-maroon);
}

.view-button:active {
}

/* Pagination */
.pagination {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 1.5rem;
    margin-top: 3rem;
    padding-top: 2rem;
    border-top: 1px solid var(--border-color);
}

.pagination-btn {
    padding: 0.75rem 1.5rem;
    background-color: var(--primary-maroon);
    color: var(--text-light);
    border: none;
    font-size: 0.95rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
}

.pagination-btn:hover:not(:disabled) {
    background-color: var(--dark-maroon);
}

.pagination-btn:active:not(:disabled) {
}

.pagination-btn:disabled {
    background-color: #ccc;
    cursor: not-allowed;
    opacity: 0.5;
}

.page-info {
    font-size: 0.95rem;
    font-weight: 500;
    color: var(--text-dark);
    min-width: 120px;
    text-align: center;
}

/* About Section */
.about-header {
    text-align: center;
    margin-bottom: 2rem;
}

.about-logo {
    width: 220px;
    height: 220px;
    margin: 0 auto 1.5rem;
    display: block;
    background: white;
    padding: 0.5rem;
}

.about-section {
    padding: 4rem 0;
    min-height: calc(100vh - 200px);
    background: linear-gradient(to bottom, var(--background-white) 0%, var(--background-light) 100%);
}

.about-content {
    max-width: 850px;
    margin: 2.5rem auto 0;
    background: var(--background-white);
    padding: 3rem;
}

.about-intro {
    margin-bottom: 3rem;
    padding-bottom: 2rem;
    border-bottom: 2px solid var(--accent-gold);
}

.about-lead {
    font-size: 1.25rem;
    line-height: 1.8;
    color: var(--text-dark);
    font-weight: 400;
    margin: 0;
}

.about-block {
    margin-bottom: 2.5rem;
}

.about-block h3 {
    font-size: 1.5rem;
    font-weight: 600;
    color: var(--primary-maroon);
    margin-bottom: 1rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.about-block h3::before {
    content: '';
    width: 4px;
    height: 24px;
    background: var(--accent-gold);
}

.about-block p {
    font-size: 1.05rem;
    line-height: 1.8;
    color: #555;
}

.about-block ul {
    list-style: none;
    padding: 0;
    margin-top: 1rem;
}

.about-block ul li {
    font-size: 1.05rem;
    line-height: 1.8;
    color: #555;
    padding-left: 1.5rem;
    position: relative;
    margin-bottom: 0.75rem;
}

.about-block ul li::before {
    content: '●';
    position: absolute;
    left: 0;
    color: var(--accent-gold);
    font-weight: bold;
    font-size: 0.8rem;
}

.about-disclaimer {
    margin-top: 3rem;
    padding: 1.5rem;
    background: linear-gradient(135deg, rgba(139, 21, 56, 0.05) 0%, rgba(196, 169, 98, 0.05) 100%);
    border-left: 4px solid var(--primary-maroon);
}

.about-disclaimer p {
    font-size: 0.95rem;
    line-height: 1.6;
    color: var(--text-dark);
    margin: 0;
}

.about-disclaimer strong {
    color: var(--primary-maroon);
    font-weight: 600;
}

/* About Support Section */
.about-support {
    margin-top: 3rem;
    padding: 2rem;
    background: linear-gradient(135deg, rgba(196, 169, 98, 0.1) 0%, rgba(196, 169, 98, 0.05) 100%);
    border: 2px solid var(--accent-gold);
}

.about-support h3 {
    font-size: 1.5rem;
    font-weight: 600;
    color: var(--primary-maroon);
    margin-bottom: 1rem;
}

.about-support h3::before {
    content: '';
    display: inline-block;
    width: 4px;
    height: 1.5rem;
    background: var(--accent-gold);
    margin-right: 0.75rem;
    vertical-align: middle;
}

.about-support p {
    font-size: 1.05rem;
    line-height: 1.8;
    color: var(--text-dark);
    margin-bottom: 1rem;
}

.support-costs {
    list-style: none;
    padding: 1rem 0;
    margin: 1rem 0;
}

.support-costs li {
    padding: 0.5rem 0;
    padding-left: 2rem;
    position: relative;
    color: var(--text-dark);
    font-size: 1rem;
}

.support-costs li::before {
    content: '•';
    position: absolute;
    left: 0.5rem;
    color: var(--accent-gold);
    font-size: 1.5rem;
    line-height: 1;
}

.support-button {
    display: inline-flex;
    align-items: center;
    gap: 0.75rem;
    padding: 1rem 2rem;
    background: linear-gradient(135deg, var(--accent-gold) 0%, #D4B972 100%);
    color: var(--primary-maroon);
    text-decoration: none;
    font-size: 1.1rem;
    font-weight: 600;
    transition: all 0.3s ease;
    margin-top: 1rem;
}

.support-button:hover {
    background: linear-gradient(135deg, #D4B972 0%, var(--accent-gold) 100%);
}

.developer-button {
    color: maroon;
    text-decoration: none;
}

.kofi-icon-about {
    width: 24px;
    height: 24px;
}

/* About Contact Section */
.about-contact {
    margin-top: 3rem;
    padding: 2rem;
    background: linear-gradient(135deg, var(--primary-maroon) 0%, var(--dark-maroon) 100%);
    text-align: center;
}

.about-contact h3 {
    font-size: 1.5rem;
    font-weight: 600;
    color: var(--text-light);
    margin-bottom: 1rem;
}

.about-contact p {
    font-size: 1.05rem;
    line-height: 1.8;
    color: rgba(255, 255, 255, 0.9);
    margin-bottom: 1.5rem;
}

.contact-email {
    display: inline-flex;
    align-items: center;
    gap: 0.75rem;
    padding: 1rem 2rem;
    background: var(--background-white);
    color: var(--primary-maroon);
    text-decoration: none;
    font-size: 1.1rem;
    font-weight: 500;
    transition: all 0.3s ease;
}

.contact-email:hover {
    background: var(--accent-gold);
    color: var(--text-light);
}

.contact-email svg {
    flex-shrink: 0;
}

/* Footer */
.footer {
    background-color: var(--primary-maroon);
    color: var(--text-light);
    padding: 2rem 0;
    margin-top: 4rem;
}

.footer-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 1rem;
}

.footer-text {
    font-size: 0.9rem;
    opacity: 0.9;
}

.footer-support {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    color: var(--text-light);
    text-decoration: none;
    padding: 0.5rem 1rem;
    background-color: rgba(255, 255, 255, 0.1);
    transition: all 0.3s ease;
    font-size: 0.9rem;
    font-weight: 500;
}

.footer-support:hover {
    background-color: var(--accent-gold);
}

.kofi-icon {
    width: 20px;
    height: 20px;
}

@media (max-width: 600px) {
    .footer-content {
        flex-direction: column;
        text-align: center;
    }
}

/* Responsive Design */
@media (max-width: 768px) {
    .hero-title {
        font-size: 2rem;
    }
    
    .hero-subtitle {
        font-size: 1rem;
    }
    
    .search-bar {
        flex-direction: column;
    }
    
    .search-button {
        width: 100%;
    }
    
    .filters {
        flex-direction: column;
    }
    
    .filter-select {
        width: 100%;
    }
    
    .filter-reset {
        width: 100%;
        margin-left: 0;
    }
    
    .courses-grid {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 480px) {
    .container {
        padding: 0 15px;
    }
    
    .logo {
        font-size: 1.25rem;
    }
    
    .hero {
        padding: 1.5rem 0;
    }
    
    .hero-title {
        font-size: 1.5rem;
        margin-bottom: 0.75rem;
    }

    .hero-subtitle {
        font-size: 0.95rem;
        margin-bottom: 1.5rem;
    }

    .search-bar {
        flex-direction: column;
        gap: 0.5rem;
    }

    .search-input {
        padding: 0.875rem 1rem;
        font-size: 16px;
    }

    .search-button {
        width: 100%;
        padding: 0.875rem 1.5rem;
    }

    .filters {
        flex-direction: column;
    }

    .filter-select {
        width: 100%;
        font-size: 14px;
    }

    .filter-reset {
        width: 100%;
        margin-left: 0;
    }

    .courses-grid {
        grid-template-columns: 1fr;
    }

    .course-card {
        margin-bottom: 1rem;
    }

    .footer-content {
        flex-direction: column;
        text-align: center;
    }

    .footer-support {
        width: 100%;
        justify-content: center;
    }

    .support-button {
        width: 100%;
        justify-content: center;
        padding: 0.875rem 1.5rem;
        font-size: 1rem;
    }

    .contact-email {
        width: 100%;
        justify-content: center;
    }

    .about-contact {
        margin-top: 2rem;
        padding: 1.5rem;
    }
}

/* ── Hamburger / Mobile Navigation ──────────────────────────── */
.nav-burger {
    display: none;
    flex-direction: column;
    justify-content: center;
    gap: 5px;
    width: 40px;
    height: 40px;
    padding: 8px;
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.25);
    cursor: pointer;
    transition: background 0.2s ease;
    flex-shrink: 0;
}

.nav-burger:hover {
    background: rgba(255, 255, 255, 0.22);
}

.burger-line {
    display: block;
    width: 100%;
    height: 2px;
    background: white;
    transition: transform 0.3s ease, opacity 0.3s ease;
    transform-origin: center;
}

.nav-burger.is-open .burger-line:nth-child(1) {
}
.nav-burger.is-open .burger-line:nth-child(2) {
    opacity: 0;
    transform: scaleX(0);
}
.nav-burger.is-open .burger-line:nth-child(3) {
}

@media (max-width: 1280px) {
    .nav-burger {
        display: flex;
    }

    .header-content {
        flex-direction: row;
        align-items: center;
        padding: 1rem 0;
    }

    .brand {
        width: auto;
    }

    /* Hide nav by default; shown as dropdown when .is-open */
    .nav {
        display: none;
        position: absolute;
        top: 100%;
        left: -20px;
        right: -20px;
        flex-direction: column;
        flex-wrap: nowrap;
        gap: 0.25rem;
        background: linear-gradient(180deg, #7d1233 0%, #6B0F2A 100%);
        padding: 0.75rem;
        border-top: 1px solid rgba(196, 169, 98, 0.25);
        z-index: 999;
    }

    .nav.is-open {
        display: flex;
    }

    .nav-link {
        width: 100%;
        padding: 0.875rem 1.25rem;
        font-size: 1rem;
    }

    .nav-support {
        width: 100%;
        margin-left: 0;
        margin-top: 0.25rem;
        justify-content: center;
        padding: 0.875rem 1.25rem;
    }
}
