/* UPSC Theme Colors: Blue, Beige, White */
:root {
    --primary-blue: #1e3a8a;
    --secondary-blue: #3b82f6;
    --light-blue: #dbeafe;
    --beige: #f5f5dc;
    --light-beige: #fafafa;
    --white: #ffffff;
    --text-dark: #1f2937;
    --text-gray: #6b7280;
    --border-color: #e5e7eb;
    --shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    --shadow-lg: 0 10px 25px rgba(0, 0, 0, 0.15);
    --transition: all 0.3s ease;
}

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

html {
    scroll-behavior: smooth;
}

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

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

/* Header & Navigation */
header {
    background-color: var(--white);
    box-shadow: var(--shadow);
    position: fixed;
    top: 0;
    width: 100%;
    z-index: 1000;
}

.header-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem 0;
}

.logo-link {
    text-decoration: none;
    color: inherit;
    display: inline-block;
    transition: var(--transition);
}

.logo-link:hover {
    opacity: 0.8;
    transform: scale(1.02);
}

.logo-link:active {
    transform: scale(0.98);
}

.logo {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.logo img {
    height: 50px;
    width: auto;
    object-fit: contain;
}

.logo h1 {
    font-size: 1.5rem;
    color: var(--primary-blue);
    font-weight: 700;
    margin: 0;
}

nav ul {
    display: flex;
    list-style: none;
    gap: 2rem;
}

nav ul li a {
    text-decoration: none;
    color: var(--text-dark);
    font-weight: 500;
    transition: var(--transition);
    position: relative;
}

nav ul li a:hover,
nav ul li a.active {
    color: var(--primary-blue);
}

nav ul li a::after {
    content: '';
    position: absolute;
    width: 0;
    height: 2px;
    background-color: var(--primary-blue);
    bottom: -5px;
    left: 0;
    transition: var(--transition);
}

nav ul li a:hover::after,
nav ul li a.active::after {
    width: 100%;
}

.mobile-menu-btn {
    display: none;
    flex-direction: column;
    gap: 5px;
    cursor: pointer;
}

.mobile-menu-btn span {
    width: 25px;
    height: 3px;
    background-color: var(--primary-blue);
    transition: var(--transition);
}

/* Hero Section */
.hero {
    background: linear-gradient(135deg, var(--primary-blue) 0%, var(--secondary-blue) 100%);
    color: var(--white);
    padding: 120px 0 80px;
    text-align: center;
    margin-top: 70px;
}

/* Home Page Hero - Unique Color Scheme */
.hero-home {
    background: linear-gradient(135deg, #6366f1 0%, #8b5cf6 50%, #a855f7 100%);
    position: relative;
    overflow: hidden;
}

.hero-home::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: 
        radial-gradient(circle at 20% 50%, rgba(255, 255, 255, 0.1) 0%, transparent 50%),
        radial-gradient(circle at 80% 80%, rgba(139, 92, 246, 0.3) 0%, transparent 50%);
    pointer-events: none;
}

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

.hero h1 {
    font-size: 3rem;
    margin-bottom: 1rem;
    font-weight: 700;
}

.hero p {
    font-size: 1.25rem;
    margin-bottom: 2rem;
    opacity: 0.95;
}

.hero-btns {
    display: flex;
    gap: 1rem;
    justify-content: center;
    flex-wrap: wrap;
}

/* Home Page Hero Buttons */
.hero-home .primary-btn {
    background: linear-gradient(135deg, #fbbf24 0%, #f59e0b 100%);
    color: var(--white);
    box-shadow: 0 4px 15px rgba(251, 191, 36, 0.4);
}

.hero-home .primary-btn:hover {
    background: linear-gradient(135deg, #f59e0b 0%, #fbbf24 100%);
    box-shadow: 0 6px 20px rgba(251, 191, 36, 0.5);
}

.hero-home .secondary-btn {
    background-color: rgba(255, 255, 255, 0.15);
    color: var(--white);
    border: 2px solid rgba(255, 255, 255, 0.3);
    backdrop-filter: blur(10px);
}

.hero-home .secondary-btn:hover {
    background-color: rgba(255, 255, 255, 0.25);
    border-color: rgba(255, 255, 255, 0.5);
}

/* Buttons */
.btn {
    display: inline-block;
    padding: 12px 30px;
    border-radius: 8px;
    text-decoration: none;
    font-weight: 600;
    transition: var(--transition);
    cursor: pointer;
    border: none;
    text-align: center;
}

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

.primary-btn:hover {
    background-color: var(--primary-blue);
    transform: translateY(-2px);
    box-shadow: var(--shadow-lg);
}

.secondary-btn {
    background-color: var(--white);
    color: var(--primary-blue);
    border: 2px solid var(--white);
}

.secondary-btn:hover {
    background-color: transparent;
    color: var(--white);
    transform: translateY(-2px);
}

/* Sections */
section {
    padding: 60px 0;
}

#courses-section {
    background: linear-gradient(180deg, #ffffff 0%, #f8fafc 100%);
}

.section-header {
    text-align: center;
    margin-bottom: 3rem;
}

.section-header h2 {
    font-size: 2.5rem;
    color: var(--primary-blue);
    margin-bottom: 0.5rem;
}

.section-header p {
    font-size: 1.1rem;
    color: var(--text-gray);
}

#courses-section .section-header {
    margin-bottom: 1.5rem;
}

/* Course Cards */
.course-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
    gap: 2rem;
    margin-bottom: 2rem;
}

.course-card {
    background-color: var(--white);
    border-radius: 16px;
    overflow: hidden;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1), 0 2px 4px rgba(0, 0, 0, 0.06);
    transition: var(--transition);
    border: 1px solid rgba(30, 58, 138, 0.1);
    position: relative;
}

.course-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: linear-gradient(90deg, var(--primary-blue) 0%, var(--secondary-blue) 100%);
    opacity: 0;
    transition: var(--transition);
}

.course-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 20px 25px rgba(0, 0, 0, 0.15), 0 10px 10px rgba(0, 0, 0, 0.1);
    border-color: var(--secondary-blue);
}

.course-card:hover::before {
    opacity: 1;
}

.course-poster {
    width: 100%;
    height: 220px;
    overflow: hidden;
    position: relative;
    background: linear-gradient(135deg, var(--primary-blue) 0%, var(--secondary-blue) 100%);
}

.course-poster img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    border: none;
    outline: none;
}

.course-info {
    padding: 1.75rem;
}

.course-info h3 {
    font-size: 1.6rem;
    color: var(--primary-blue);
    margin-bottom: 0.75rem;
    font-weight: 700;
    line-height: 1.3;
}

.course-faculty {
    color: var(--text-gray);
    font-size: 0.95rem;
    margin-bottom: 1rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.course-faculty i {
    color: var(--secondary-blue);
}

.course-topics {
    margin: 1rem 0;
    padding: 0;
    background: #e8ffff;
    border-radius: 8px;
    border-left: 3px solid var(--secondary-blue);
    overflow: hidden;
}

.topics-header {
    padding: 1rem;
    cursor: pointer;
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 0.9rem;
    color: var(--text-gray);
    transition: var(--transition);
    user-select: none;
}

.topics-header:hover {
    background-color: rgba(255, 255, 255, 0.3);
}

.topics-header strong {
    color: var(--primary-blue);
}

.topics-toggle {
    transition: transform 0.3s ease;
    color: var(--secondary-blue);
}

.topics-header.active .topics-toggle {
    transform: rotate(180deg);
}

.topics-content {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.3s ease;
    padding: 0 1rem;
}

.topics-header.active + .topics-content {
    max-height: 500px;
    padding: 0 1rem 1rem 1rem;
}

.topics-list {
    list-style: none;
    padding: 0;
    margin: 0;
    color: var(--text-gray);
    font-size: 0.9rem;
    line-height: 1.8;
}

.topics-list li {
    padding: 0.25rem 0;
    padding-left: 1.25rem;
    position: relative;
}

.topics-list li::before {
    content: '✓';
    position: absolute;
    left: 0;
    color: var(--secondary-blue);
    font-weight: bold;
}

.course-meta {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin: 1.25rem 0;
    padding-top: 1rem;
    border-top: 2px solid var(--light-beige);
}

.course-duration,
.course-price {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    color: var(--text-gray);
    font-size: 0.9rem;
}

.course-price {
    font-weight: 700;
    color: var(--primary-blue);
    font-size: 1.1rem;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.telegram-btn {
    width: 100%;
    margin-top: 1rem;
    background: linear-gradient(135deg, #0088cc 0%, #0066aa 100%);
    color: var(--white);
    padding: 14px 24px;
    border-radius: 10px;
    text-decoration: none;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    font-weight: 600;
    font-size: 1rem;
    transition: var(--transition);
    box-shadow: 0 4px 6px rgba(0, 136, 204, 0.3);
    position: relative;
    overflow: hidden;
}

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

.telegram-btn:hover::before {
    left: 100%;
}

.telegram-btn:hover {
    background: linear-gradient(135deg, #0066aa 0%, #0088cc 100%);
    transform: translateY(-2px);
    box-shadow: 0 6px 12px rgba(0, 136, 204, 0.4);
}

.telegram-btn i {
    font-size: 1.2rem;
}

/* Search & Filter */
.search-filter-section {
    margin-bottom: 2rem;
}

.search-box {
    width: 100%;
    max-width: 500px;
    margin: 0 auto 1.5rem;
    position: relative;
}

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

.search-box input:focus {
    outline: none;
    border-color: var(--secondary-blue);
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1);
}

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

.filter-buttons {
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.filter-btn {
    padding: 8px 20px;
    border: 2px solid var(--border-color);
    background-color: var(--white);
    border-radius: 20px;
    cursor: pointer;
    font-size: 0.9rem;
    transition: var(--transition);
}

.filter-btn:hover,
.filter-btn.active {
    background-color: var(--primary-blue);
    color: var(--white);
    border-color: var(--primary-blue);
}

.faculty-filter-buttons {
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin-top: 1rem;
}

.faculty-filter-btn {
    padding: 8px 20px;
    border: 2px solid var(--border-color);
    background-color: var(--white);
    border-radius: 20px;
    cursor: pointer;
    font-size: 0.9rem;
    font-weight: 500;
    transition: var(--transition);
    color: var(--text-dark);
}

.faculty-filter-btn:hover {
    background-color: var(--light-blue);
    border-color: var(--secondary-blue);
    color: var(--primary-blue);
}

.faculty-filter-btn.active {
    background-color: var(--secondary-blue);
    color: var(--white);
    border-color: var(--secondary-blue);
}

/* About Page */
.about-content {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 3rem;
    align-items: center;
}

.about-text {
    font-size: 1.1rem;
    line-height: 1.8;
    color: var(--text-gray);
}

.about-text p {
    margin-bottom: 1.5rem;
}

.about-image {
    width: 100%;
    height: 300px;
    background: linear-gradient(135deg, var(--primary-blue) 0%, var(--secondary-blue) 100%);
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--white);
    font-size: 1.5rem;
}

/* Get Help Page */
.help-content {
    max-width: 800px;
    margin: 0 auto;
}

.help-section {
    background-color: var(--light-beige);
    padding: 2rem;
    border-radius: 12px;
    margin-bottom: 2rem;
}

.help-section h3 {
    color: var(--primary-blue);
    margin-bottom: 1rem;
    font-size: 1.5rem;
}

.help-section p {
    color: var(--text-gray);
    margin-bottom: 1rem;
    line-height: 1.8;
}

.contact-info {
    background-color: var(--white);
    padding: 2rem;
    border-radius: 12px;
    box-shadow: var(--shadow);
}

.contact-item {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin-bottom: 1.5rem;
}

.contact-item i {
    font-size: 1.5rem;
    color: var(--secondary-blue);
    width: 40px;
}

.contact-item h4 {
    color: var(--primary-blue);
    margin-bottom: 0.25rem;
}

.contact-item p {
    color: var(--text-gray);
}

/* Footer */
footer {
    background-color: var(--primary-blue);
    color: var(--white);
    padding: 3rem 0 1rem;
    margin-top: 4rem;
}

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

.footer-section h3 {
    margin-bottom: 1rem;
    font-size: 1.25rem;
}

.footer-section p,
.footer-section a {
    color: rgba(255, 255, 255, 0.9);
    text-decoration: none;
    margin-bottom: 0.5rem;
    display: block;
    transition: var(--transition);
}

.footer-section a:hover {
    color: var(--white);
    padding-left: 5px;
}

.footer-section .telegram-link,
.footer-section .social-link {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    background-color: rgba(255, 255, 255, 0.1);
    padding: 10px 20px;
    border-radius: 8px;
    margin-top: 0.5rem;
    margin-right: 0.5rem;
    margin-bottom: 0.5rem;
}

.footer-section .telegram-link:hover,
.footer-section .social-link:hover {
    background-color: rgba(255, 255, 255, 0.2);
    padding-left: 20px;
}

.footer-section .social-links {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin-top: 0.5rem;
}

.footer-bottom {
    text-align: center;
    padding-top: 2rem;
    border-top: 1px solid rgba(255, 255, 255, 0.2);
    color: rgba(255, 255, 255, 0.8);
}

/* Responsive Design */
@media (max-width: 768px) {
    .mobile-menu-btn {
        display: flex;
    }

    nav {
        position: absolute;
        top: 100%;
        left: 0;
        width: 100%;
        background-color: var(--white);
        box-shadow: var(--shadow);
        max-height: 0;
        overflow: hidden;
        transition: max-height 0.3s ease;
    }

    nav.active {
        max-height: 500px;
    }

    nav ul {
        flex-direction: column;
        padding: 1rem;
        gap: 0;
    }

    nav ul li {
        padding: 0.75rem 0;
    }

    .hero h1 {
        font-size: 2rem;
    }

    .hero p {
        font-size: 1rem;
    }

    .section-header h2 {
        font-size: 2rem;
    }

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

    .about-content {
        grid-template-columns: 1fr;
    }

    .hero-btns {
        flex-direction: column;
    }

    .btn {
        width: 100%;
    }
}

@media (max-width: 480px) {
    .hero {
        padding: 100px 0 60px;
    }

    .hero h1 {
        font-size: 1.75rem;
    }

    section {
        padding: 40px 0;
    }

    .section-header h2 {
        font-size: 1.75rem;
    }
}

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

.course-card {
    animation: fadeIn 0.5s ease;
}

/* Video Playlist Horizontal Scroll */
.video-playlist-container {
    position: relative;
    margin: 2rem 0;
}

.video-scroll-wrapper {
    position: relative;
    overflow: hidden;
    padding: 0 50px;
}

.video-scroll-container {
    display: flex;
    gap: 1.5rem;
    overflow-x: auto;
    overflow-y: hidden;
    scroll-behavior: smooth;
    padding: 1rem 0;
    scrollbar-width: thin;
    scrollbar-color: var(--secondary-blue) var(--light-beige);
    -webkit-overflow-scrolling: touch;
}

.video-scroll-container::-webkit-scrollbar {
    height: 8px;
}

.video-scroll-container::-webkit-scrollbar-track {
    background: var(--light-beige);
    border-radius: 4px;
}

.video-scroll-container::-webkit-scrollbar-thumb {
    background: var(--secondary-blue);
    border-radius: 4px;
}

.video-scroll-container::-webkit-scrollbar-thumb:hover {
    background: var(--primary-blue);
}

.video-card {
    flex: 0 0 320px;
    background-color: var(--white);
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    transition: var(--transition);
    position: relative;
    cursor: pointer;
}

.video-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 16px rgba(0, 0, 0, 0.15);
}

.video-thumbnail {
    position: relative;
    width: 100%;
    padding-top: 56.25%; /* 16:9 aspect ratio */
    background-color: var(--light-beige);
    overflow: hidden;
}

.video-thumbnail img {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.play-overlay {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 60px;
    height: 60px;
    background-color: rgba(255, 0, 0, 0.9);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: var(--transition);
    pointer-events: none;
}

.video-card:hover .play-overlay {
    background-color: rgba(255, 0, 0, 1);
    transform: translate(-50%, -50%) scale(1.1);
}

.play-overlay i {
    color: var(--white);
    font-size: 1.5rem;
    margin-left: 4px;
}

.video-duration {
    position: absolute;
    bottom: 8px;
    right: 8px;
    background-color: rgba(0, 0, 0, 0.8);
    color: var(--white);
    padding: 4px 8px;
    border-radius: 4px;
    font-size: 0.75rem;
    font-weight: 600;
}

.video-info {
    padding: 1rem;
}

.video-title {
    font-size: 1rem;
    color: var(--text-dark);
    margin: 0;
    line-height: 1.4;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    text-overflow: ellipsis;
    font-weight: 600;
}

.video-link {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 1;
    text-decoration: none;
}

.loading-message,
.error-message {
    text-align: center;
    padding: 3rem;
    color: var(--text-gray);
    font-size: 1.1rem;
}

.loading-message i {
    font-size: 2rem;
    margin-bottom: 1rem;
    display: block;
    color: var(--secondary-blue);
}

.scroll-btn {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    width: 40px;
    height: 40px;
    background-color: var(--white);
    border: 2px solid var(--secondary-blue);
    border-radius: 50%;
    display: none;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    z-index: 10;
    transition: var(--transition);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.scroll-btn:hover {
    background-color: var(--secondary-blue);
    color: var(--white);
    transform: translateY(-50%) scale(1.1);
}

.scroll-btn:active {
    transform: translateY(-50%) scale(0.95);
}

.scroll-btn-left {
    left: 0;
}

.scroll-btn-right {
    right: 0;
}

.scroll-btn i {
    font-size: 1.2rem;
    color: var(--secondary-blue);
    transition: var(--transition);
}

.scroll-btn:hover i {
    color: var(--white);
}

/* Playlist Embed Fallback */
.playlist-embed-container {
    position: relative;
    width: 100%;
    padding-top: 56.25%; /* 16:9 aspect ratio */
    margin: 2rem 0;
}

.playlist-iframe {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    border-radius: 12px;
}

/* Responsive Design for Video Playlist */
@media (max-width: 768px) {
    .video-scroll-wrapper {
        padding: 0 40px;
    }
    
    .video-card {
        flex: 0 0 280px;
    }
    
    .scroll-btn {
        width: 35px;
        height: 35px;
    }
    
    .scroll-btn i {
        font-size: 1rem;
    }
}

@media (max-width: 480px) {
    .video-scroll-wrapper {
        padding: 0 35px;
    }
    
    .video-card {
        flex: 0 0 260px;
    }
    
    .video-scroll-container {
        gap: 1rem;
    }
}

