/* Global Styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
}

:root {
    --primary-color: #4a6bff;
    --secondary-color: #6c63ff;
    --accent-color: #3f51b5;
    --text-color: #333;
    --light-text: #666;
    --bg-color: #fff;
    --light-bg: #f5f7ff;
    --border-color: #e1e4e8;
    --shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    --transition: all 0.3s ease;
    --gradient-primary: linear-gradient(135deg, var(--primary-color) 0%, var(--secondary-color) 100%);
    --gradient-light: linear-gradient(135deg, #f5f7ff 0%, #e8eeff 100%);
}

body {
    line-height: 1.6;
    color: var(--text-color);
    background-color: var(--bg-color);
}

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

section {
    padding: 80px 0;
}

.section-title {
    text-align: center;
    margin-bottom: 40px;
    font-size: 2.5rem;
    color: var(--primary-color);
    position: relative;
}

.section-title::after {
    content: '';
    display: block;
    width: 80px;
    height: 4px;
    background: var(--secondary-color);
    margin: 15px auto;
    border-radius: 2px;
}

.section-intro {
    text-align: center;
    max-width: 800px;
    margin: 0 auto 50px;
    color: var(--light-text);
    font-size: 1.1rem;
}

a {
    text-decoration: none;
    color: var(--primary-color);
    transition: var(--transition);
}

a:hover {
    color: var(--accent-color);
}

ul {
    list-style: none;
}

img {
    max-width: 100%;
    height: auto;
}

.cta-button {
    display: inline-block;
    background: var(--gradient-primary);
    color: white;
    padding: 12px 30px;
    border-radius: 30px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 1px;
    transition: var(--transition);
    box-shadow: var(--shadow);
    position: relative;
    overflow: hidden;
    z-index: 1;
}

.cta-button::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, var(--accent-color) 0%, var(--secondary-color) 100%);
    z-index: -1;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.cta-button:hover {
    color: white;
    transform: translateY(-3px);
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.15);
}

.cta-button:hover::before {
    opacity: 1;
}

/* Navigation Bar */
.navbar {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    background-color: white;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    z-index: 1000;
    padding: 15px 0;
}

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

.logo h1 {
    font-size: 1.8rem;
    color: var(--primary-color);
    font-weight: 700;
}

.nav-links {
    display: flex;
    gap: 30px;
}

.nav-links a {
    color: var(--text-color);
    font-weight: 500;
    position: relative;
}

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

.nav-links a:hover::after {
    width: 100%;
}

.admin-link {
    color: var(--accent-color) !important;
    font-weight: 600 !important;
}

.hamburger {
    display: none;
    cursor: pointer;
}

.bar {
    display: block;
    width: 25px;
    height: 3px;
    margin: 5px auto;
    background-color: var(--text-color);
    transition: var(--transition);
}

/* Hero Section */
.hero {
    background: linear-gradient(135deg, #f5f7ff 0%, #e8eeff 100%);
    padding: 100px 0 80px;
    position: relative;
    overflow: hidden;
    margin-top: 70px;
}

.hero::before {
    content: '';
    position: absolute;
    top: -50px;
    right: -50px;
    width: 200px;
    height: 200px;
    border-radius: 50%;
    background: rgba(74, 107, 255, 0.1);
    z-index: 0;
}

.hero::after {
    content: '';
    position: absolute;
    bottom: -80px;
    left: -80px;
    width: 300px;
    height: 300px;
    border-radius: 50%;
    background: rgba(108, 99, 255, 0.08);
    z-index: 0;
}

.hero-content {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 30px;
    position: relative;
    z-index: 1;
}

.hero-text {
    text-align: center;
    max-width: 800px;
    animation: fadeInUp 0.8s ease-out;
}

.hero-content h1 {
    font-size: 3rem;
    margin-bottom: 20px;
    color: var(--text-color);
    font-weight: 800;
    line-height: 1.2;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
    background: linear-gradient(to right, var(--primary-color), var(--accent-color));
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
}

.hero-content p {
    font-size: 1.3rem;
    margin-bottom: 35px;
    color: var(--light-text);
    line-height: 1.6;
    animation: fadeInUp 1s ease-out 0.2s both;
}

.hero-content .cta-button {
    padding: 15px 35px;
    font-size: 1.1rem;
    box-shadow: 0 8px 20px rgba(74, 107, 255, 0.3);
    animation: fadeInUp 1s ease-out 0.4s both;
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Introduction Section */
.intro {
    background: linear-gradient(to bottom, var(--light-bg) 0%, rgba(245, 247, 255, 0.7) 100%);
    position: relative;
    overflow: hidden;
}

.intro::before {
    content: '';
    position: absolute;
    top: 0;
    right: 0;
    width: 100%;
    height: 100%;
    background-image: radial-gradient(circle at 10% 10%, rgba(74, 107, 255, 0.05) 0%, transparent 50%),
                      radial-gradient(circle at 90% 90%, rgba(108, 99, 255, 0.05) 0%, transparent 50%);
    z-index: 0;
}

.intro-content {
    max-width: 900px;
    margin: 0 auto;
    position: relative;
    z-index: 1;
    animation: fadeIn 1s ease-out;
}

.intro-content p {
    font-size: 1.2rem;
    margin-bottom: 35px;
    text-align: center;
    color: var(--text-color);
    line-height: 1.7;
    padding: 0 20px;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.03);
}

.key-features {
    background-color: white;
    padding: 40px;
    border-radius: 15px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.08);
    transform: translateY(0);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.key-features:hover {
    transform: translateY(-5px);
    box-shadow: 0 15px 35px rgba(0, 0, 0, 0.12);
}

.key-features h2 {
    margin-bottom: 30px;
    color: var(--primary-color);
    text-align: center;
    font-size: 1.8rem;
    font-weight: 700;
    position: relative;
}

.key-features h2::after {
    content: '';
    display: block;
    width: 60px;
    height: 3px;
    background: var(--secondary-color);
    margin: 12px auto 0;
    border-radius: 2px;
}

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

.key-features li {
    padding: 20px;
    border-left: 4px solid var(--secondary-color);
    background-color: rgba(74, 107, 255, 0.05);
    border-radius: 0 10px 10px 0;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.key-features li:hover {
    background-color: rgba(74, 107, 255, 0.1);
    transform: translateX(5px);
}

.key-features li strong {
    color: var(--primary-color);
    font-weight: 700;
    display: block;
    margin-bottom: 8px;
    font-size: 1.1rem;
}

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

/* About Section */
.about {
    padding: 80px 0;
    background-color: #fff;
}

.about-content {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 20px;
    max-width: 800px;
    margin: 0 auto;
    line-height: 1.6;
}

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

.about-content p {
    margin-bottom: 20px;
    color: #555;
}

/* Features Section */
.features {
    padding: 80px 0;
    background-color: #f9f9f9;
}

.section-intro {
    text-align: center;
    max-width: 800px;
    margin: 0 auto 40px;
    color: #555;
}



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

.feature-card {
    background-color: white;
    padding: 30px;
    border-radius: 10px;
    box-shadow: var(--shadow);
    transition: var(--transition);
}

.feature-card:hover {
    transform: translateY(-10px);
    box-shadow: 0 15px 30px rgba(0, 0, 0, 0.1);
}

.feature-icon {
    font-size: 2.5rem;
    color: var(--primary-color);
    margin-bottom: 20px;
    text-align: center;
}

.feature-card h3 {
    margin-bottom: 15px;
    color: var(--primary-color);
    text-align: center;
}

.feature-card p {
    color: var(--light-text);
    margin-bottom: 10px;
}

/* Notes Section */
.notes {
    background-color: var(--light-bg);
}

/* Coding Section */
.coding {
    background-color: white;
    padding: 80px 0;
}

.coding-content {
    max-width: 1000px;
    margin: 0 auto;
}

.coding-resources-list {
    margin: 20px 0 30px;
    padding-left: 20px;
}

.coding-resources-list li {
    margin-bottom: 10px;
    position: relative;
    padding-left: 15px;
}

.coding-resources-list li::before {
    content: '•';
    position: absolute;
    left: 0;
    color: var(--primary-color);
}

.coding-categories {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 30px;
    margin-top: 30px;
}

.coding-category {
    background-color: var(--light-bg);
    border-radius: 10px;
    padding: 20px;
    box-shadow: var(--shadow);
}

.coding-category h3 {
    color: var(--primary-color);
    margin-bottom: 15px;
    font-size: 1.2rem;
    border-bottom: 2px solid var(--secondary-color);
    padding-bottom: 8px;
}

.coding-category ul {
    padding-left: 15px;
}

.coding-category li {
    margin-bottom: 8px;
    position: relative;
}

.coding-category li::before {
    content: '→';
    position: absolute;
    left: -15px;
    color: var(--secondary-color);
}

.search-container {
    display: flex;
    max-width: 600px;
    margin: 0 auto 30px;
}

#searchInput {
    flex: 1;
    padding: 12px 20px;
    border: 1px solid var(--border-color);
    border-radius: 30px 0 0 30px;
    font-size: 1rem;
    outline: none;
}

#searchButton {
    background-color: var(--primary-color);
    color: white;
    border: none;
    padding: 0 25px;
    border-radius: 0 30px 30px 0;
    cursor: pointer;
    transition: var(--transition);
}

#searchButton:hover {
    background-color: var(--accent-color);
}

.semester-selector {
    text-align: center;
    margin-bottom: 40px;
    display: flex;
    justify-content: center;
    gap: 15px;
    flex-wrap: wrap;
}

#semesterSelect, #resourceTypeSelect {
    padding: 10px 20px;
    border: 1px solid var(--border-color);
    border-radius: 30px;
    font-size: 1rem;
    outline: none;
    background-color: white;
    cursor: pointer;
}

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

.resource-card {
    background-color: white;
    border-radius: 10px;
    box-shadow: var(--shadow);
    overflow: hidden;
    transition: var(--transition);
    margin-bottom: 20px;
}

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

.resource-header {
    background-color: var(--primary-color);
    color: white;
    padding: 15px 20px;
    position: relative;
}

.notes-card .resource-header {
    background-color: var(--primary-color);
}

.coding-card .resource-header {
    background-color: #2e7d32; /* Green for coding */
}

.videos-card .resource-header {
    background-color: #c62828; /* Red for videos */
}

.resource-header h3 {
    margin: 0;
    font-size: 1.3rem;
}

.resource-type-badge {
    position: absolute;
    top: 10px;
    right: 10px;
    font-size: 0.8rem;
    background-color: rgba(255, 255, 255, 0.2);
    padding: 3px 8px;
    border-radius: 12px;
}

.semester-badge {
    display: inline-block;
    font-size: 0.8rem;
    background-color: rgba(255, 255, 255, 0.2);
    padding: 3px 8px;
    border-radius: 12px;
    margin-top: 5px;
}

.resource-body {
    padding: 20px;
}

.resource-body p {
    margin-bottom: 15px;
    color: var(--light-text);
}

.resource-link {
    display: inline-block;
    background-color: var(--secondary-color);
    color: white;
    padding: 8px 15px;
    border-radius: 5px;
    font-weight: 500;
    transition: var(--transition);
}

.coding-card .resource-link {
    background-color: #2e7d32;
}

.videos-card .resource-link {
    background-color: #c62828;
}

.resource-link:hover {
    background-color: var(--accent-color);
    color: white;
    transform: translateY(-2px);
}

.coding-card .resource-link:hover {
    background-color: #1b5e20;
}

.videos-card .resource-link:hover {
    background-color: #b71c1c;
}

/* For backward compatibility */
.note-card {
    background-color: white;
    border: 1px solid var(--border-color);
    border-radius: 10px;
    overflow: hidden;
    transition: var(--transition);
    box-shadow: var(--shadow);
}

.note-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.1);
}

.note-header {
    background-color: var(--primary-color);
    color: white;
    padding: 15px;
    font-weight: 600;
}

.note-body {
    padding: 20px;
}

.download-link {
    display: inline-block;
    background-color: var(--secondary-color);
    color: white;
    padding: 8px 15px;
    border-radius: 5px;
    font-weight: 500;
    transition: var(--transition);
}

.download-link:hover {
    background-color: var(--accent-color);
    color: white;
}

.download-link i {
    margin-right: 5px;
}

/* Newsletter Section */
.newsletter {
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--secondary-color) 100%);
    color: white;
    text-align: center;
    padding: 60px 0;
}

.newsletter h2 {
    margin-bottom: 15px;
    font-size: 2rem;
}

.newsletter p {
    margin-bottom: 30px;
    max-width: 600px;
    margin-left: auto;
    margin-right: auto;
}

.newsletter-form {
    display: flex;
    max-width: 500px;
    margin: 0 auto;
}

#emailInput {
    flex: 1;
    padding: 15px 20px;
    border: none;
    border-radius: 30px 0 0 30px;
    font-size: 1rem;
    outline: none;
}

.newsletter .cta-button {
    border-radius: 0 30px 30px 0;
    background-color: var(--accent-color);
    box-shadow: none;
}

/* Footer Section */
.footer {
    background-color: #2c3e50;
    color: white;
    padding: 60px 0 20px;
}

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

.footer-section h3 {
    margin-bottom: 20px;
    position: relative;
    display: inline-block;
}

.footer-section h3::after {
    content: '';
    position: absolute;
    left: 0;
    bottom: -8px;
    width: 50px;
    height: 2px;
    background-color: var(--secondary-color);
}

.footer-section p {
    margin-bottom: 10px;
    color: #ecf0f1;
}

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

.social-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    background-color: rgba(255, 255, 255, 0.1);
    border-radius: 50%;
    color: white;
    transition: var(--transition);
}

.social-icon:hover {
    background-color: var(--primary-color);
    transform: translateY(-3px);
}

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

.legal-links {
    margin-bottom: 10px;
}

.legal-links a {
    color: #ecf0f1;
    margin: 0 10px;
}

.legal-links a:hover {
    color: var(--secondary-color);
}

/* Responsive Design */
@media (max-width: 992px) {
    .hero-content h1 {
        font-size: 2.8rem;
    }
    
    .section-title {
        font-size: 2.2rem;
    }
    
    .key-features ul {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 768px) {
    .nav-links {
        position: fixed;
        left: -100%;
        top: 70px;
        flex-direction: column;
        background-color: white;
        width: 100%;
        text-align: center;
        transition: 0.3s;
        box-shadow: 0 10px 10px rgba(0, 0, 0, 0.1);
        padding: 20px 0;
        gap: 15px;
    }
    
    .nav-links.active {
        left: 0;
    }
    
    .hamburger {
        display: block;
    }
    
    .hamburger.active .bar:nth-child(2) {
        opacity: 0;
    }
    
    .hamburger.active .bar:nth-child(1) {
        transform: translateY(8px) rotate(45deg);
    }
    
    .hamburger.active .bar:nth-child(3) {
        transform: translateY(-8px) rotate(-45deg);
    }
    
    .hero-content h1 {
        font-size: 2.3rem;
    }
    
    .hero-content p {
        font-size: 1.1rem;
    }
    
    section {
        padding: 60px 0;
    }
    
    .features-grid {
        grid-template-columns: 1fr;
    }
    
    .newsletter-form {
        flex-direction: column;
    }
    
    #emailInput {
        border-radius: 30px;
        margin-bottom: 15px;
    }
    
    .newsletter .cta-button {
        border-radius: 30px;
    }
    
    .footer-content {
        grid-template-columns: 1fr;
        text-align: center;
    }
    
    .footer-section h3::after {
        left: 50%;
        transform: translateX(-50%);
    }
    
    .social-icons {
        justify-content: center;
    }
}

@media (max-width: 576px) {
    .hero-content h1 {
        font-size: 2rem;
    }
    
    .section-title {
        font-size: 1.8rem;
    }
    
    .search-container {
        flex-direction: column;
    }
    
    #searchInput {
        border-radius: 30px;
        margin-bottom: 10px;
    }
    
    #searchButton {
        border-radius: 30px;
        padding: 10px;
    }
    
    .semester-selector {
        display: flex;
        flex-direction: column;
        align-items: center;
        gap: 10px;
    }
    
    #semesterSelect {
        margin-left: 0;
        width: 100%;
        max-width: 300px;
    }
}