a{
    text-decoration: none;
    text-align: center;
}
/* --- Color Variables --- */
:root {
    --primary-bg-color: #d8d3c9;
    --navbar-bg-color: #5d4a3c;
    --accent-color: #92755e;
    --card-bg: #f8f6f3;
    --text-color-dark: #333;
    --text-color-light: #fff;
    --border-color: #e0d9d0;
    --inactive-button-bg: #e0e0e0;
}

/* --- Base Styles --- */
body {
    font-family: Arial, sans-serif;
    margin: 0;
    padding: 0;
    background-color: var(--primary-bg-color);
    color: var(--text-color-dark);
}

/* --- 1. Navigation Bar --- */
.navbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 15px 30px;
    background-color: var(--navbar-bg-color);
    color: var(--text-color-light);
}

.nav-left {
    display: flex;
    align-items: center;
}

.nav-left .icon {
    font-size: 24px;
    margin-right: 10px;
}

.nav-left h1 {
    font-size: 1.2em;
    font-weight: 400;
    margin: 0;
}

.nav-right a {
    color: var(--text-color-light);
    text-decoration: none;
    margin-left: 20px;
    font-size: 0.9em;
    padding: 5px 0;
}

.nav-right .active-link {
    font-weight: bold;
}

/* --- Main Page Container & Header --- */
.study-notes-page {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

.study-notes-header-area {
    padding: 50px 0;
    text-align: center;
}

.notes-header-content {
    max-width: 700px;
    margin: 0 auto;
    padding: 40px 0 60px 0;
}

.document-icon {
    font-size: 4em;
    margin-bottom: 20px;
    color: var(--accent-color);
}

.notes-header-content h2 {
    font-size: 2.5em;
    font-weight: bold;
    margin: 0 0 15px 0;
}

.notes-header-content p {
    font-size: 1.1em;
    line-height: 1.5;
}

/* --- 2. Filter and Search Bar --- */
.filter-area {
    background-color: #f7f7f7;
    border-top: 1px solid var(--border-color);
    border-bottom: 1px solid var(--border-color);
    margin-bottom: 30px;
}

.filter-bar {
    display: flex;
    gap: 15px;
    align-items: center;
    padding: 20px;
}

.search-input-group {
    flex-grow: 1;
    display: flex;
    align-items: center;
    background-color: #fff;
    border: 1px solid var(--border-color);
    padding: 8px 12px;
    border-radius: 4px;
}

.search-icon {
    margin-right: 8px;
    color: #888;
}

.search-input-group input {
    border: none;
    outline: none;
    width: 100%;
    font-size: 1em;
}

.dropdown select {
    padding: 10px 15px;
    border: 1px solid var(--border-color);
    border-radius: 4px;
    background-color: #fff;
    cursor: pointer;
    font-size: 1em;
    /* Custom appearance removal for dropdowns */
    -webkit-appearance: none;
    -moz-appearance: none;
    appearance: none;
}

.view-toggle {
    display: flex;
    border: 1px solid var(--accent-color);
    border-radius: 4px;
    overflow: hidden;
}

.toggle-button {
    background-color: transparent;
    border: none;
    padding: 8px 15px;
    cursor: pointer;
    font-size: 0.9em;
    color: var(--accent-color);
}

.active-toggle {
    background-color: var(--accent-color) !important;
    color: var(--text-color-light) !important;
    font-weight: bold;
}

.view-toggle .toggle-button:last-child {
    border-left: 1px solid var(--accent-color);
}

/* --- 3. Note Cards Grid --- */
.cards-grid {
    padding-bottom: 40px;
}

.cards-container {
    display: flex;
    flex-wrap: wrap;
    gap: 25px;
    justify-content: center;
}

.note-card {
    width: 45%; /* Two cards per row on larger screens */
    min-width: 350px;
    background-color: var(--card-bg);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    padding: 25px;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.05);
}

/* Card content styling */
.tags { margin-bottom: 15px; }

.tag {
    display: inline-block;
    border: 1px solid var(--navbar-bg-color);
    color: var(--navbar-bg-color);
    padding: 4px 10px;
    margin-right: 8px;
    border-radius: 4px;
    font-size: 0.8em;
    font-weight: 500;
}

.title {
    font-size: 1.5em;
    font-weight: bold;
    margin: 0 0 10px 0;
}

.meta {
    font-size: 0.9em;
    color: #666;
    margin-top: 0;
    margin-bottom: 20px;
}

.actions { display: flex; gap: 0; margin-bottom: 20px; }

.btn {
    flex-grow: 1;
    border: none;
    padding: 12px 0;
    font-size: 1em;
    cursor: pointer;
    font-weight: 500;
}

.btn.active {
    background-color: var(--accent-color);
    color: white;
    border-top-left-radius: 5px;
    border-bottom-left-radius: 5px;
}

.btn.inactive {
    background-color: var(--inactive-button-bg);
    color: #666;
    border-top-right-radius: 5px;
    border-bottom-right-radius: 5px;
}

/* --- 4. Footer Section --- */
.practice-questions-section {
    background-color: var(--accent-color);
    color: var(--text-color-light);
    text-align: center;
    padding: 80px 20px;
}

.content-container {
    max-width: 700px;
    margin: 0 auto;
}

.practice-questions-section h2 {
    font-size: 2.5em;
    font-weight: bold;
    margin-top: 0;
    margin-bottom: 20px;
}

.practice-questions-section p {
    font-size: 1.2em;
    line-height: 1.5;
    margin-bottom: 40px;
}

.practice-btn {
    background-color: var(--card-bg);
    color: var(--text-color-dark);
    border: none;
    padding: 15px 30px;
    font-size: 1em;
    font-weight: bold;
    border-radius: 6px;
    cursor: pointer;
}

/* ======================================= */
/* --- RESPONSIVENESS (Media Queries) --- */
/* ======================================= */

/* Styles for screens smaller than 768px (e.g., Tablets and large phones) */
@media (max-width: 768px) {
    
    .filter-bar {
        /* Stack the search bar and dropdowns vertically */
        flex-direction: column;
        align-items: stretch;
        gap: 10px;
    }

    .search-input-group {
        /* Make search bar full width */
        width: auto;
    }

    .dropdown {
        /* Make dropdowns take full width */
        width: 100%;
    }
    
    .dropdown select {
        width: 100%;
    }

    /* Note Cards stack vertically */
    .cards-container {
        flex-direction: column;
        gap: 15px;
    }

    .note-card {
        /* Card takes nearly full width */
        width: 95%;
        min-width: auto;
    }

    .notes-header-content h2 {
        font-size: 2em;
    }
}

/* Styles for screens smaller than 480px (e.g., Mobile Phones) */
@media (max-width: 480px) {
    .navbar {
        padding: 10px 15px;
    }

    .nav-right a {
        margin-left: 10px;
    }

    .practice-questions-section {
        padding: 60px 15px;
    }
    
    .practice-questions-section h2 {
        font-size: 1.8em;
    }
    
    .practice-questions-section p {
        font-size: 1em;
    }
}