/* Study Resources Page Styles */

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Georgia', 'Times New Roman', serif;
    background: #f5f5f0;
    min-height: 100vh;
    color: #376197;
    line-height: 1.7;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    display: flex;
    flex-direction: column;
    padding: 0;
}

/* Global Content Wrapper */
.content-wrapper {
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
    flex: 1;
    display: flex;
    flex-direction: column;
}

/* Navigation Styles are now inherited from styles.css */

/* Main Content */
.resources-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 3rem 20px;
    flex: 1;
}

.resources-header {
    text-align: center;
    margin-bottom: 3rem;
}

.resources-header h1 {
    font-size: 2.5rem;
    color: #eceeef;
    margin-bottom: 1rem;
    font-weight: 700;
}

.resources-subtitle {
    font-size: 1.1rem;
    color: #7f8c8d;
}

/* Resources Grid */
.resources-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
    gap: 2.5rem;
    margin-bottom: 3rem;
}

/* Resource Card */
.resource-card {
    background: white;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.resource-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 6px 30px rgba(0, 0, 0, 0.15);
}

/* Image Container */
.resource-image-container {
    position: relative;
    width: 100%;
    padding-top: 75%; /* 4:3 aspect ratio */
    background: #ecf0f1;
    overflow: hidden;
}

.resource-image {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s ease;
}

.resource-card:hover .resource-image {
    transform: scale(1.05);
}

/* Zoom Button */
.image-zoom-btn {
    position: absolute;
    top: 1rem;
    right: 1rem;
    background: rgba(255, 255, 255, 0.9);
    border: none;
    border-radius: 50%;
    width: 40px;
    height: 40px;
    font-size: 1.2rem;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.3s ease, transform 0.3s ease;
    opacity: 0;
}

.resource-image-container:hover .image-zoom-btn {
    opacity: 1;
}

.image-zoom-btn:hover {
    background: white;
    transform: scale(1.1);
}

/* Resource Info */
.resource-info {
    padding: 1.5rem;
}

.resource-title {
    font-size: 1.5rem;
    color: #2c3e50;
    margin-bottom: 1rem;
    font-weight: 700;
}

.resource-description {
    color: #34495e;
    margin-bottom: 1rem;
    line-height: 1.7;
}

.resource-uses {
    list-style: none;
    padding: 0;
}

.resource-uses li {
    padding: 0.5rem 0;
    padding-left: 1.5rem;
    position: relative;
    color: #34495e;
}

.resource-uses li::before {
    content: "✓";
    position: absolute;
    left: 0;
    color: #27ae60;
    font-weight: bold;
}

/* Note Section */
.resources-note {
    margin-top: 3rem;
}

.note-card {
    background: linear-gradient(135deg, #e8f4f8 0%, #f0f7ff 100%);
    border-left: 5px solid #3498db;
    border-radius: 8px;
    padding: 2rem;
}

.note-card h2 {
    font-size: 1.5rem;
    color: #2c3e50;
    margin-bottom: 1rem;
}

.note-card p {
    color: #34495e;
    margin-bottom: 1rem;
    line-height: 1.8;
}

.note-card p:last-child {
    margin-bottom: 0;
}

/* Image Modal */
.image-modal {
    display: none;
    position: fixed;
    z-index: 2000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.9);
    align-items: center;
    justify-content: center;
    padding: 2rem;
}

.image-modal.active {
    display: flex;
}

.modal-close {
    position: absolute;
    top: 2rem;
    right: 2rem;
    background: white;
    border: none;
    border-radius: 50%;
    width: 50px;
    height: 50px;
    font-size: 2rem;
    color: #2c3e50;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: transform 0.3s ease;
    z-index: 2001;
}

.modal-close:hover {
    transform: rotate(90deg);
}

.modal-image {
    max-width: 90%;
    max-height: 90%;
    object-fit: contain;
    border-radius: 8px;
}

/* Footer */
.main-footer {
    background: #2c3e50;
    color: white;
    text-align: center;
    padding: 2rem;
    margin-top: auto;
}

.main-footer p {
    margin-bottom: 0.5rem;
}

.main-footer strong {
    color: #3498db;
}

.main-footer b {
    color: #0de546;
}

/* Responsive Design */
@media (max-width: 768px) {
    .nav-menu {
        position: fixed;
        left: -100%;
        top: 60px;
        flex-direction: column;
        background: #2c3e50;
        width: 100%;
        text-align: center;
        transition: 0.3s;
        box-shadow: 0 10px 27px rgba(0, 0, 0, 0.05);
        padding: 2rem 0;
        gap: 0;
    }

    .nav-menu.active {
        left: 0;
    }

    .nav-menu li {
        width: 100%;
    }

    .nav-menu a {
        display: block;
        padding: 1rem;
        width: 100%;
    }

    .mobile-menu-btn {
        display: flex;
    }

    .resources-container {
        padding: 2rem 15px;
    }

    .resources-header h1 {
        font-size: 2rem;
    }

    .resources-grid {
        grid-template-columns: 1fr;
        gap: 2rem;
    }

    .resource-image-container {
        padding-top: 60%; /* Adjust for mobile */
    }

    .modal-close {
        top: 1rem;
        right: 1rem;
        width: 40px;
        height: 40px;
        font-size: 1.5rem;
    }
}

@media (max-width: 480px) {
    .resources-header h1 {
        font-size: 1.75rem;
    }

    .resource-info {
        padding: 1.2rem;
    }

    .resource-title {
        font-size: 1.3rem;
    }

    .note-card {
        padding: 1.5rem;
    }
}

/* Dark Mode Styles for Resources Page */
body.dark-mode {
    background: #0d1117;
    color: #e0e6ed;
}

body.dark-mode .resources-container {
    background: #0d1117;
}

body.dark-mode .resources-header h1 {
    color: #e0e6ed;
}

body.dark-mode .resources-subtitle {
    color: #8b949e;
}

body.dark-mode .search-container input {
    background-color: #0d1117;
    color: #e0e6ed;
    border-color: #30363d;
}

body.dark-mode .search-container input:focus {
    border-color: #58a6ff;
}

body.dark-mode .resource-card {
    background-color: #161b22;
    border-color: #30363d;
}

body.dark-mode .resource-card:hover {
    border-color: #58a6ff;
}

body.dark-mode .resource-title {
    color: #e0e6ed;
}

body.dark-mode .resource-description {
    color: #c9d1d9;
}

body.dark-mode .resource-uses li {
    color: #c9d1d9;
}

body.dark-mode .resource-uses li::before {
    color: #58a6ff;
}

body.dark-mode .resource-uses li:hover {
    background-color: rgba(88, 166, 255, 0.1);
}

body.dark-mode .resource-links {
    border-top-color: #30363d;
}

body.dark-mode .resource-link {
    color: #58a6ff;
}

body.dark-mode .resource-link:hover {
    color: #79c0ff;
}

body.dark-mode .category-filter {
    background-color: #0d1117;
    color: #e0e6ed;
    border-color: #30363d;
}

body.dark-mode .category-filter:checked {
    background-color: #0969da;
}

body.dark-mode .note-card {
    background-color: #161b22;
    border-color: #30363d;
}

body.dark-mode .note-card h3 {
    color: #e0e6ed;
}

body.dark-mode .note-card p {
    color: #c9d1d9;
}

body.dark-mode .modal-overlay {
    background-color: rgba(0, 0, 0, 0.7);
}

body.dark-mode .modal-content {
    background-color: #161b22;
    border-color: #30363d;
}

body.dark-mode .modal-content h2 {
    color: #e0e6ed;
}

body.dark-mode .modal-content p {
    color: #c9d1d9;
}

body.dark-mode .modal-close {
    color: #e0e6ed;
}

