/* =========================
   Global
========================= */

body {
    margin: 0;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Arial, sans-serif;
    background: #f4f4f4;
    color: #222;
    line-height: 1.6;
}

/* =========================
   Layout Container
========================= */

.container {
    max-width: 1100px;
    margin: 0 auto;
    padding: 60px 20px;
    min-height: 70vh; /* keeps footer down on short pages */
}

/* =========================
   Header
========================= */

header {
    background: #0b1f3a;
    color: white;
    padding: 18px 30px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

header nav a {
    color: white;
    margin-left: 20px;
    text-decoration: none;
    font-size: 14px;
}

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

/* =========================
   Typography
========================= */

h1 {
    font-size: 42px;
    margin-bottom: 16px;
}

h2 {
    font-size: 24px;
    margin-bottom: 16px;
}

p {
    margin-bottom: 16px;
}

/* =========================
   Article Cards (Homepage)
========================= */

.article-grid {
    display: flex;
    gap: 30px;
    flex-wrap: wrap;
}

.article-card {
    background: white;
    border-radius: 6px;
    padding: 15px;
    width: 280px;
    box-shadow: 0 2px 6px rgba(0,0,0,0.05);
    transition: transform 0.2s ease;
}

.article-card:hover {
    transform: translateY(-4px);
}

.article-card img {
    width: 100%;
    height: 190px;        /* Standardized card image height */
    object-fit: cover;    /* Crop instead of stretch */
    object-position: top;   /* Show upper portion instead of center */
    border-radius: 4px;
    margin-bottom: 12px;
    display: block;
}

.article-card {
    display: flex;
    flex-direction: column;
}

.article-card h3 {
    margin: 0 0 8px 0;
    font-size: 18px;
}

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

.card-link {
    text-decoration: none;
    color: inherit;
    display: block;
}

.card-link:hover .article-card {
    transform: translateY(-4px);
}
/* =========================
   Article Page
========================= */

.article-content img {
    max-width: 100%;
    height: auto;
    display: block;
    margin: 30px auto;
}

.article-content {
    font-size: 18px;
    line-height: 1.8;
}

/* =========================
   PUBLIC SQUARE page
========================= */
.public-square-container{
    max-width:1000px;
    margin:auto;
    padding:40px 20px;
}

.square-intro{
    color:#666;
    margin-bottom:25px;
}

.square-grid{
    display:grid;
    grid-template-columns:1fr 1fr;
    gap:30px;
    margin-bottom:30px;
}

.question-box{
    background:#f4f6fa;
    padding:20px;
    border-radius:6px;
}

.square-question{
    font-size:20px;
    font-weight:600;
}

.square-context{
    color:#555;
}

.response-form input,
.response-form textarea{
    width:100%;
    padding:10px;
    margin-bottom:10px;
    border:1px solid #ccc;
}

.policy-note{
    font-size:12px;
    color:#777;
}

.response-form button{
    background:#0b2c55;
    color:white;
    border:none;
    padding:10px 18px;
    border-radius:4px;
}

.response-card{
    border-bottom:1px solid #ddd;
    padding:15px 0;
}

.response-date{
    color:#777;
    font-size:12px;
    margin-left:10px;
}
/* =========================
   Footer
========================= */

footer {
    background: #0b1f3a;
    color: white;
    text-align: center;
    padding: 20px 0;
    font-size: 13px;
}
footer a {
    color: #7ec3ff;
    text-decoration: none;
    font-weight: 500;
}

footer a:hover {
    color: #ffffff;
    text-decoration: underline;
}

/* =========================
   Editor Notes
========================= */

.editor-notes-box {
    background: #fff3cd;
    border: 1px solid #ffeeba;
    padding: 15px;
    margin-bottom: 20px;
    border-radius: 6px;
}

.editor-notes-box h4 {
    margin-top: 0;
}

.editor-notes-box .note {
    border-top: 1px solid #e0c97f;
    padding-top: 8px;
    margin-top: 8px;
}

/* =========================
   Error Routes
========================= */

.error-container {
    text-align: center;
    padding: 40px 20px;
}

.error-image {
    display: block;
    margin: 30px auto;
    max-width: 800px;
    width: 100%;
    border-radius: 6px;
}

.error-text h1 {
    font-size: 48px;
    margin-bottom: 10px;
}

.error-text p {
    margin-bottom: 20px;
}

.btn-home {
    display: inline-block;
    padding: 10px 20px;
    background: #0b2a4a;
    color: white;
    text-decoration: none;
    border-radius: 4px;
}

/* =========================
   Error Back Ground
========================= */

.error-page{
    background-size: cover;
    background-position: center;
    height: 80vh;
    display:flex;
    align-items:center;
    justify-content:center;
}

.error-overlay{
    background: rgba(0,0,0,0.55);
    padding:40px;
    text-align:center;
    color:white;
    border-radius:6px;
}

/* 404 image */

.error-404{
    background-image:url("/static/images/404.png");
}

/* 400 image */

.error-400{
    background-image:url("/static/images/400.png");
}

/* 500 image */

.error-500{
    background-image:url("/static/images/500.png");
}

/* 502 image */

.error-502{
    background-image:url("/static/images/502.png");
}