/* ─────────────────────────────
   Basic Reset
   ───────────────────────────── */
*,
*::before,
*::after {
    box-sizing: border-box;
}

html,
body {
    margin: 0;
    padding: 0;
    height: 100%;              /* ✅ full height for flex layout */
}

/* ─────────────────────────────
   Typography + Body
   ───────────────────────────── */
body {
    display: flex;              /* ✅ make body a flex container */
    flex-direction: column;     /* header → main → footer vertical */
    min-height: 100vh;          /* at least full viewport height */
    font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
    line-height: 1.6;
    color: #222;
    background-color: #f5f5f5;
}

/* ─────────────────────────────
   Global Container
   ───────────────────────────── */
.container {
    width: 100%;
    max-width: 960px;
    margin: 0 auto;
    padding: 0 1rem;
}

/* ─────────────────────────────
   Header + Navigation
   ───────────────────────────── */
.site-header {
    background: #222;
    color: #fff;
    padding: 0.75rem 0;

    /* Sticky header */
    position: sticky;
    top: 0;
    z-index: 1000;
}

.site-header .container {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1.5rem;
}

.logo {
    margin: 0;
    font-size: 1.3rem;
    font-weight: 600;
}

.logo a {
    color: #fff;
    text-decoration: none;
}

.nav {
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
}

.nav a {
    color: #fff;
    text-decoration: none;
    font-size: 0.95rem;
    padding: 0.35rem 0.6rem;
    border-radius: 4px;
    transition: background 0.15s ease, color 0.15s ease;
}

.nav a:hover,
.nav a:focus {
    background: #fff;
    color: #222;
}


/* ─────────────────────────────
   Main Content
   ───────────────────────────── */
.site-main {
    padding: 2rem 0;
    flex: 1 0 auto;
}


.site-main h1 {
    font-size: 1.9rem;
    margin: 0 0 1rem;
}

.site-main h2 {
    font-size: 1.4rem;
    margin-top: 1.5rem;
    margin-bottom: 0.75rem;
}

.site-main p {
    margin-bottom: 0.75rem;
}

.site-main ul,
.site-main ol {
    padding-left: 1.2rem;
    margin: 0.75rem 0;
}

/* White content card */
.page-card {
    background: #fff;
    border-radius: 8px;
    padding: 1.5rem;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.05);
}

.site-main a {
    color: #4b0082;
    text-decoration: underline;
}

.site-main a:hover {
    text-decoration: none;
}

/* ─────────────────────────────
   Forms
   ───────────────────────────── */
form {
    margin-top: 1rem;
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

label {
    font-weight: 500;
    display: block;
    margin-bottom: 0.25rem;
}

input[type="text"],
input[type="email"],
input[type="url"],
textarea {
    width: 100%;
    padding: 0.6rem 0.7rem;
    border-radius: 4px;
    border: 1px solid #ccc;
    font: inherit;
}

textarea {
    min-height: 140px;
    resize: vertical;
}

button,
input[type="submit"] {
    padding: 0.65rem 1.2rem;
    border-radius: 4px;
    border: none;
    background: #4b0082;
    color: #fff;
    font-weight: 600;
    cursor: pointer;
    font: inherit;
    transition: background 0.15s ease;
}

button:hover,
input[type="submit"]:hover {
    background: #3a0064;
}

/* ─────────────────────────────
   Footer
   ───────────────────────────── */
.site-footer {
    background: #222;
    color: #ddd;
    padding: 1rem 0;
    font-size: 0.85rem;
    text-align: center;
}

.site-footer p {
    margin: 0;
}

/* ─────────────────────────────
   Blog List
   ───────────────────────────── */
.blog-list {
    list-style: none;
    padding: 0;
    margin: 0;
}

.blog-list li {
    margin-bottom: 1.2rem;
}

.blog-list a {
    font-weight: 600;
}

/* ─────────────────────────────
   Responsive Breakpoints
   ───────────────────────────── */

/* Mobile (less than 768px) */
@media (max-width: 767px) {
    .site-header .container {
        flex-direction: column;
        align-items: flex-start;
    }

    .logo {
        font-size: 1.2rem;
    }

    .nav {
        width: 100%;
        flex-wrap: wrap;
    }

    .nav a {
        padding: 0.4rem 0.5rem;
        font-size: 0.9rem;
    }

    .site-main h1 {
        font-size: 1.6rem;
    }
}

/* Tablets (768px to 1024px) */
@media (min-width: 768px) and (max-width: 1024px) {
    .container {
        max-width: 820px;
    }
}

/* Large Screens */
@media (min-width: 1200px) {
    .container {
        max-width: 1040px;
    }
}
