/* =========================================================
   Assignment #3 - Part 1: CSS Media Queries (NO Bootstrap)
   Mobile-first: base styles = mobile,
   @media (min-width: 768px)  = tablet,
   @media (min-width: 992px)  = desktop.
   ========================================================= */

/* Shared section box for this page */
.mq-section {
    max-width: 1140px;
    margin: 0 auto;
    padding: 2rem 1rem;
}

.mq-title {
    color: var(--nb-cyan);
}

/* Shows which breakpoint is active right now */
.mq-badge {
    display: inline-block;
    background-color: #7c3aed;
    color: #ffffff;
    font-weight: 700;
    padding: 0.3rem 0.8rem;
    border-radius: 6px;
}

.mq-badge::after {
    content: "Mobile (< 768px)";
}

/* ---------- Task 1: Responsive Typography ---------- */
/* Mobile (default): small fonts */
.mq-typography h1 { font-size: 1.75rem; }
.mq-typography h2 { font-size: 1.25rem; }
.mq-typography p,
.mq-text        { font-size: 0.95rem; line-height: 1.6; }

/* Tablet: medium fonts */
@media (min-width: 768px) {
    .mq-typography h1 { font-size: 2.5rem; }
    .mq-typography h2 { font-size: 1.6rem; }
    .mq-typography p,
    .mq-text        { font-size: 1.1rem; }
    .mq-badge::after { content: "Tablet (768px - 991px)"; }
}

/* Desktop: large fonts */
@media (min-width: 992px) {
    .mq-typography h1 { font-size: 3.25rem; }
    .mq-typography h2 { font-size: 2rem; }
    .mq-typography p,
    .mq-text        { font-size: 1.25rem; }
    .mq-badge::after { content: "Desktop (992px and up)"; }
}

/* ---------- Task 2: Card group ---------- */
.mq-cards {
    display: flex;
    flex-wrap: wrap;
    gap: 1.5rem;
}

/* Mobile (default): cards stacked vertically, full width */
.mq-card {
    flex: 0 0 100%;
    display: flex;
    flex-direction: column;
    background-color: var(--nb-panel);
    border: 1px solid var(--nb-border);
    border-radius: 10px;
    padding: 1.2rem;
    transition: transform 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease;
}

.mq-card:hover {
    transform: translateY(-6px);
    box-shadow: 0 10px 24px rgba(124, 58, 237, 0.35);
    border-color: #7c3aed;
}

.mq-card-img {
    width: 100%;
    height: 160px;
    object-fit: cover;
    border-radius: 8px;
    margin-bottom: 0.8rem;
}

.mq-card h3 {
    font-size: 1.2rem;
}

.mq-card-link {
    margin-top: auto;
    align-self: flex-start;
    background-color: #7c3aed;
    color: #ffffff;
    font-weight: 700;
    text-decoration: none;
    padding: 0.5rem 1.2rem;
    border-radius: 6px;
}

.mq-card-link:hover {
    background-color: var(--nb-cyan);
    color: var(--nb-bg);
}

/* Tablet: two cards in a row */
@media (min-width: 768px) {
    .mq-card {
        flex: 0 0 calc((100% - 1.5rem) / 2);
    }
}

/* Desktop: all three cards side by side */
@media (min-width: 992px) {
    .mq-card {
        flex: 0 0 calc((100% - 3rem) / 3);
    }
}
