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

/* --- Body --- */
body {
    font-family: Arial, sans-serif;
    background: #f7f7f7;
    color: #333;
    line-height: 1.5;
    display: flex;
    flex-direction: column;
    min-height: 100vh;
}

/* --- Header --- */
header {
    background: #ddd;
    padding: 12px 20px;
    border-bottom: 1px solid #bbb;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

header .logo {
    font-size: 20px;
    font-weight: bold;
    color: #222;
}

header nav a {
    margin-left: 15px;
    text-decoration: none;
    color: #333;
    font-size: 15px;
}

header nav a:hover {
    text-decoration: underline;
}

/* --- Layout Wrapper --- */
.main-wrapper {
    display: flex;
    flex: 1;
    min-height: 0;
}

/* --- Sidebar --- */
.sidebar {
    width: 220px;
    background: #e6e6e6;
    padding: 20px;
    border-right: 1px solid #ccc;
    overflow-y: auto;
}

.sidebar h3 {
    margin-bottom: 10px;
    font-size: 18px;
    color: #222;
}

.sidebar ul {
    list-style: none;
    margin-bottom: 20px;
}

.sidebar li {
    margin-bottom: 6px;
}

.sidebar a {
    text-decoration: none;
    color: #333;
    font-size: 15px;
}

.sidebar a:hover {
    text-decoration: underline;
}

.sidebar a.active {
    font-weight: bold;
    text-decoration: underline;
}

.sidebar ul:first-of-type {
    margin-bottom: 25px;
}

/* --- Content --- */
.content {
    flex: 1;
    padding: 30px;
    background: #fff;
    overflow-y: auto;
}

.content h1 {
    margin-bottom: 25px;
    font-size: 26px;
    color: #222;
}

/* --- Resource Grid --- */
.resources-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 25px;
}

/* --- Resource Block --- */
.resource {
    background: #fafafa;
    border: 1px solid #ddd;
    padding: 15px;
    border-radius: 4px;
    display: flex;
    gap: 15px;
}

/* --- Thumbnail --- */
.resource img {
    width: 120px;
    height: 160px; /* fixed height for consistency */
    object-fit: contain; /* shrink to fit, no cropping */
    border: 1px solid #ccc;
    background: #fff; /* optional: gives a clean frame */
    padding: 4px; /* optional: adds breathing room */
    box-shadow: 0 0 4px rgba(0,0,0,0.15); /* subtle shadow */
    border-radius: 3px; /* rounded corners */
}

/* --- Resource Text --- */
.resource-content {
    flex: 1;
}

.resource-content h2 {
    margin-bottom: 8px;
    font-size: 18px;
}

.resource-content p {
    margin-bottom: 12px;
}

/* --- Buttons --- */
.btn {
    display: inline-block;
    padding: 8px 14px;
    margin-right: 10px;
    margin-bottom: 6px;
    background: #4285f4;
    color: #fff;
    text-decoration: none;
    border-radius: 3px;
    font-size: 14px;
}

.btn:hover {
    background: #2a6adf;
}

/* --- Footer --- */
footer {
    background: #ddd;
    padding: 10px 20px;
    border-top: 1px solid #bbb;
    text-align: center;
    font-size: 14px;
    color: #444;
}

/* --- Landing Page Layout --- */
.landing-content {
    max-width: 900px;
    margin: 40px auto;
    padding: 0 20px;
}

.landing-content h1 {
    font-size: 32px;
    margin-bottom: 15px;
}

.landing-content .intro {
    margin-bottom: 30px;
    font-size: 16px;
    color: #555;
}

/* --- Subject Grid --- */
.subject-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 25px;
}

.subject-card {
    display: block;
    background: #fafafa;
    border: 1px solid #ddd;
    padding: 20px;
    border-radius: 4px;
    text-decoration: none;
    color: #333;
    transition: background 0.2s, border-color 0.2s;
}

.subject-card:hover {
    background: #f0f0f0;
    border-color: #bbb;
}

.subject-card h2 {
    margin-bottom: 8px;
    font-size: 20px;
}

.subject-card p {
    font-size: 14px;
    color: #555;
}

