/* Reset and Base Styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Poppins', sans-serif;
    line-height: 1.6;
    color: #333;
    background: linear-gradient(135deg, #1e3c72 0%, #2a5298 100%);
    min-height: 100vh;
}

/* Navigation */
nav {
    background: rgba(255, 255, 255, 0.95);
    padding: 1rem 5%;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    position: sticky;
    top: 0;
    z-index: 1000;
}

nav .container {
    max-width: 1200px;
    margin: 0 auto;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

nav .logo {
    font-size: 1.5rem;
    font-weight: 700;
    color: #00bcd4;
    text-decoration: none;
}

nav ul {
    display: flex;
    list-style: none;
    gap: 2rem;
}

nav ul li a {
    color: #333;
    text-decoration: none;
    font-weight: 500;
    transition: color 0.3s;
}

nav ul li a:hover {
    color: #00bcd4;
}

/* Hero Section */
.hero {
    text-align: center;
    padding: 100px 20px;
    color: white;
}

.hero h1 {
    font-size: 3rem;
    margin-bottom: 1rem;
    font-weight: 700;
}

.hero p {
    font-size: 1.2rem;
    margin-bottom: 2rem;
    max-width: 800px;
    margin-left: auto;
    margin-right: auto;
}

.hero button, .hero-btn {
    background: #00bcd4;
    color: white;
    border: none;
    padding: 15px 40px;
    font-size: 1.1rem;
    font-weight: 600;
    border-radius: 50px;
    cursor: pointer;
    transition: all 0.3s;
    text-decoration: none;
    display: inline-block;
}

.hero button:hover, .hero-btn:hover {
    background: #0097a7;
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(0, 188, 212, 0.4);
}

/* Sections */
section {
    padding: 60px 5%;
    max-width: 1200px;
    margin: 0 auto;
}

section h2 {
    text-align: center;
    font-size: 2.5rem;
    margin-bottom: 3rem;
    color: #1e3c72;
}

/* Notes Grid */
.notes-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 2rem;
}

.note-card {
    background: white;
    border-radius: 15px;
    padding: 20px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
    transition: transform 0.3s, box-shadow 0.3s;
    cursor: pointer;
}

.note-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.15);
}

.note-card h3 {
    color: #1e3c72;
    margin-bottom: 0.5rem;
}

.note-card p {
    color: #666;
    font-size: 0.9rem;
}

.note-card .category {
    display: inline-block;
    background: #00bcd4;
    color: white;
    padding: 5px 15px;
    border-radius: 20px;
    font-size: 0.85rem;
    margin-top: 10px;
}

/* Admin Panel */
.admin-modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.7);
    z-index: 2000;
    justify-content: center;
    align-items: center;
}

.admin-modal.active {
    display: flex;
}

.admin-content {
    background: white;
    border-radius: 20px;
    padding: 40px;
    max-width: 900px;
    width: 90%;
    max-height: 90vh;
    overflow-y: auto;
}

.admin-tabs {
    display: flex;
    gap: 10px;
    margin-bottom: 30px;
    flex-wrap: wrap;
}

.admin-tabs button {
    padding: 12px 25px;
    background: #e0e0e0;
    border: none;
    border-radius: 10px;
    cursor: pointer;
    font-weight: 600;
    transition: all 0.3s;
}

.admin-tabs button.active {
    background: #00bcd4;
    color: white;
}

.admin-section {
    display: none;
}

.admin-section.active {
    display: block;
}

/* Forms */
.upload-form, .admin-form {
    background: #f5f5f5;
    padding: 25px;
    border-radius: 15px;
    margin-bottom: 30px;
}

.upload-form label, .admin-form label {
    display: block;
    margin-bottom: 8px;
    font-weight: 600;
    color: #1e3c72;
}

.upload-form input,
.upload-form select,
.upload-form textarea,
.admin-form input,
.admin-form select {
    width: 100%;
    padding: 12px;
    margin-bottom: 15px;
    border: 2px solid #ddd;
    border-radius: 8px;
    font-family: inherit;
    font-size: 1rem;
}

.upload-form input:focus,
.upload-form select:focus,
.upload-form textarea:focus,
.admin-form input:focus,
.admin-form select:focus {
    outline: none;
    border-color: #00bcd4;
}

.upload-form button,
.admin-form button {
    background: #00bcd4;
    color: white;
    border: none;
    padding: 12px 30px;
    border-radius: 8px;
    cursor: pointer;
    font-weight: 600;
    transition: all 0.3s;
}

.upload-form button:hover,
.admin-form button:hover {
    background: #0097a7;
}

/* Uploaded Notes List */
.uploaded-notes-list {
    background: white;
    border-radius: 15px;
    padding: 20px;
}

.note-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 15px;
    border-bottom: 1px solid #eee;
}

.note-item:last-child {
    border-bottom: none;
}

.note-info h4 {
    color: #1e3c72;
    margin-bottom: 5px;
}

.note-info p {
    color: #666;
    font-size: 0.9rem;
}

.note-actions {
    display: flex;
    gap: 10px;
}

.note-actions button {
    padding: 8px 15px;
    border: none;
    border-radius: 5px;
    cursor: pointer;
    font-weight: 600;
    transition: all 0.3s;
}

.edit-btn {
    background: #ffc107;
    color: #333;
}

.edit-btn:hover {
    background: #ffb300;
}

.delete-btn {
    background: #f44336;
    color: white;
}

.delete-btn:hover {
    background: #d32f2f;
}

/* Contact Form */

.contact-form {
    max-width: 600px;
    margin: 0 auto;
    background: white;
    padding: 40px;
    border-radius: 20px;
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.1);
}

.contact-form input,
.contact-form select,
.contact-form textarea {
    width: 100%;
    padding: 12px;
    margin-bottom: 20px;
    border: 2px solid #ddd;
    border-radius: 8px;
    font-family: inherit;
}

.contact-form button {
    width: 100%;
    background: #00bcd4;
    color: white;
    border: none;
    padding: 15px;
    border-radius: 8px;
    font-size: 1.1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s;
}

.contact-form button:hover {
    background: #0097a7;
}

/* Mobile Responsive */
@media (max-width: 768px) {
    nav ul {
        flex-direction: column;
        gap: 1rem;
    }

    .hero h1 {
        font-size: 2rem;
    }

    .hero p {
        font-size: 1rem;
    }

    .notes-grid {
        grid-template-columns: 1fr;
    }

    section h2 {
        font-size: 2rem;
    }

    .admin-content {
        padding: 20px;
    }
}

/* Utility Classes */
.hidden {
    display: none;
}

.text-center {
    text-align: center;
}

.mb-1 { margin-bottom: 1rem; }
.mb-2 { margin-bottom: 2rem; }
.mt-1 { margin-top: 1rem; }
.mt-2 { margin-top: 2rem; }

/* Admin Modal Styles */
.admin-modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.7);
    z-index: 2000;
    overflow-y: auto;
    padding: 20px;
}

.admin-modal.active {
    display: flex;
    justify-content: center;
    align-items: flex-start;
    padding-top: 50px;
}

.admin-content {
    background: white;
    border-radius: 20px;
    padding: 40px;
    max-width: 900px;
    width: 100%;
    max-height: 90vh;
    overflow-y: auto;
    position: relative;
    animation: slideDown 0.3s ease;
}

@keyframes slideDown {
    from {
        opacity: 0;
        transform: translateY(-50px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.close-btn {
    position: absolute;
    top: 15px;
    right: 20px;
    font-size: 30px;
    font-weight: bold;
    color: #999;
    cursor: pointer;
    transition: color 0.3s;
}

.close-btn:hover {
    color: #333;
}

.hidden {
    display: none !important;
}

/* Admin Login Styles */
#adminLogin {
    text-align: center;
    padding: 40px 20px;
}

#adminLogin h2 {
    color: #1e3c72;
    margin-bottom: 30px;
}

#adminPassword {
    width: 100%;
    max-width: 400px;
    padding: 15px;
    margin-bottom: 20px;
    border: 2px solid #ddd;
    border-radius: 10px;
    font-size: 16px;
}

#adminPassword:focus {
    outline: none;
    border-color: #00bcd4;
}

#adminLogin button {
    background: #00bcd4;
    color: white;
    border: none;
    padding: 15px 50px;
    border-radius: 10px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s;
}

#adminLogin button:hover {
    background: #0097a7;
    transform: translateY(-2px);
}

/* Admin Panel Styles */
#adminPanel h2 {
    color: #1e3c72;
    margin-bottom: 30px;
    text-align: center;
}

.admin-tabs {
    display: flex;
    gap: 10px;
    margin-bottom: 30px;
    flex-wrap: wrap;
    justify-content: center;
}

.admin-tabs button {
    padding: 12px 25px;
    background: #e0e0e0;
    border: none;
    border-radius: 10px;
    cursor: pointer;
    font-weight: 600;
    transition: all 0.3s;
    font-size: 14px;
}

.admin-tabs button:hover {
    background: #d0d0d0;
}

.admin-tabs button.active {
    background: #00bcd4;
    color: white;
}

.admin-section {
    display: none;
}

.admin-section.active {
    display: block;
}

.admin-section h3 {
    color: #1e3c72;
    margin-bottom: 20px;
    font-size: 1.5rem;
}

/* Upload Form Styles */
.upload-form {
    background: #f5f5f5;
    padding: 25px;
    border-radius: 15px;
    margin-bottom: 30px;
}

.upload-form label {
    display: block;
    margin-bottom: 8px;
    margin-top: 15px;
    font-weight: 600;
    color: #1e3c72;
}

.upload-form input,
.upload-form select,
.upload-form textarea {
    width: 100%;
    padding: 12px;
    margin-bottom: 15px;
    border: 2px solid #ddd;
    border-radius: 8px;
    font-family: inherit;
    font-size: 1rem;
}

.upload-form input:focus,
.upload-form select:focus,
.upload-form textarea:focus {
    outline: none;
    border-color: #00bcd4;
}

.upload-form button {
    background: #00bcd4;
    color: white;
    border: none;
    padding: 12px 30px;
    border-radius: 8px;
    cursor: pointer;
    font-weight: 600;
    transition: all 0.3s;
    font-size: 16px;
}

.upload-form button:hover {
    background: #0097a7;
}

/* Uploaded Notes List */
.uploaded-notes-list {
    background: white;
    border: 1px solid #e0e0e0;
    border-radius: 15px;
    padding: 20px;
    max-height: 400px;
    overflow-y: auto;
}

.note-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 15px;
    border-bottom: 1px solid #eee;
    transition: background 0.3s;
}

.note-item:hover {
    background: #f9f9f9;
}

.note-item:last-child {
    border-bottom: none;
}

.note-info h4 {
    color: #1e3c72;
    margin-bottom: 5px;
    font-size: 16px;
}

.note-info p {
    color: #666;
    font-size: 0.9rem;
    margin: 0;
}

.note-actions {
    display: flex;
    gap: 10px;
}

.note-actions button {
    padding: 8px 15px;
    border: none;
    border-radius: 5px;
    cursor: pointer;
    font-weight: 600;
    transition: all 0.3s;
    font-size: 14px;
}

.edit-btn {
    background: #ffc107;
    color: #333;
}

.edit-btn:hover {
    background: #ffb300;
}

.delete-btn {
    background: #f44336;
    color: white;
}

.delete-btn:hover {
    background: #d32f2f;
}

/* Mobile Responsive for Admin */
@media (max-width: 768px) {
    .admin-content {
        padding: 20px;
        margin: 10px;
    }

    .admin-tabs {
        flex-direction: column;
    }

    .admin-tabs button {
        width: 100%;
    }

    .note-item {
        flex-direction: column;
        align-items: flex-start;
        gap: 15px;
    }

    .note-actions {
        width: 100%;
        justify-content: flex-end;
    }
}

/* ========== STUDY MATERIALS ACCORDION STYLES ========== */
.study-materials {
    min-height: 60vh;
    padding: 60px 20px;
    background: linear-gradient(135deg, #f5f7fa 0%, #c3cfe2 100%);
}

.study-materials h1 {
    font-family: 'Poppins', sans-serif;
    font-weight: 700;
    font-size: 2.5rem;
    color: #1e3a8a;
    text-align: center;
    margin-bottom: 40px;
}

.accordion-box {
   max-width: 900px;
    margin: 0 auto;
    padding: 20px;
    /* Optional: Ensure vertical spacing is controlled within the button/panel combo */
    display: flex; 
    flex-direction: column;
    gap: 8px; /* This replaces the margin-bottom on the accordion button */
}

.accordion {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    cursor: pointer;
    padding: 20px;
    width: 100%;
    text-align: left;
    border: none;
    outline: none;
    font-size: 1.1rem;
    font-weight: 600;
    font-family: 'Poppins', sans-serif;
    transition: all 0.3s ease;
   
    
    box-shadow: 0 4px 6px rgba(0,0,0,0.1);
}

.accordion:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 12px rgba(0,0,0,0.15);
}

.accordion.active {
    background: linear-gradient(135deg, #f093fb 0%, #f5576c 100%);
}

.panel {
   padding: 0 20px;
    background-color: white;
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.3s ease-out;
    /* Adjusted border radius to match the button's curved corners */
    border-radius: 0 0 10px 10px; 
    box-shadow: 0 4px 6px rgba(0,0,0,0.05);
    /* Add padding/margin to separate it visually from the next accordion button */
    /* margin-bottom: 8px; <--- You can use this if you don't use the gap property above */
}

.panel ul {
    list-style: none;
    padding: 20px 0;
    margin: 0;
}

.panel li {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px 0;
    border-bottom: 1px solid #e5e7eb;
}

.panel li:last-child {
    border-bottom: none;
}

.panel li span {
    font-size: 1rem;
    color: #374151;
    font-family: 'Poppins', sans-serif;
    flex: 1;
}

.download-btn {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 8px 20px;
    border-radius: 6px;
    text-decoration: none;
    font-weight: 600;
    font-size: 0.9rem;
    transition: all 0.3s ease;
    white-space: nowrap;
}

.download-btn:hover {
    transform: scale(1.05);
    box-shadow: 0 4px 8px rgba(0,0,0,0.2);
}






/* Mobile Responsive */
@media (max-width: 768px) {
    .study-materials h1 {
        font-size: 2rem;
    }
    
    .accordion {
        font-size: 1rem;
        padding: 15px;
    }
    
    .panel li {
        flex-direction: column;
        align-items: flex-start;
        gap: 10px;
    }
    
    .download-btn {
        align-self: flex-end;
    }
}


