/* ==========================================================================
   Core Styling for HowToDocument.com
   ========================================================================== */

:root {
    --primary: #1e293b;   /* Slate blue for authority */
    --accent: #2563eb;    /* Clean tech blue for links/actions */
    --text: #334155;      /* Dark grey for high readability */
    --bg: #f8fafc;        /* Soft light background */
    --card-bg: #ffffff;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
    line-height: 1.6;
    color: var(--text);
    background-color: var(--bg);
    margin: 0;
    padding: 0;
}

/* ==========================================================================
   Header Section (Optimized with Dynamic Image Blend)
   ========================================================================== */

header {
    background: linear-gradient(135deg, rgba(30, 41, 59, 0.95), rgba(15, 23, 42, 0.85)), 
                url('header-bg.jpg') center/cover no-repeat;
    color: white;
    padding: 4.5rem 1rem; 
    text-align: center;
    position: relative;
    border-bottom: 4px solid var(--accent); 
}

header h1 { 
    margin: 0; 
    font-size: 2.8rem; 
    font-weight: 800; 
    letter-spacing: -0.05em;
    text-shadow: 0 2px 4px rgba(0,0,0,0.2);
}

header p { 
    margin: 0.75rem auto 0 auto; 
    opacity: 0.9; 
    font-size: 1.2rem; 
    max-width: 600px; 
    font-weight: 300;
}

/* ==========================================================================
   Layout & Component Grid
   ========================================================================== */

.container {
    max-width: 1100px;
    margin: 2rem auto;
    padding: 0 1rem;
}

.grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 1.5rem;
    margin-top: 2rem;
}

/* ==========================================================================
   Cards & Content Assets
   ========================================================================== */

.card {
    background: var(--card-bg);
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    padding: 1.5rem;
    transition: transform 0.2s, box-shadow 0.2s;
}

.card:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.05);
}

.card h3 { 
    margin-top: 0; 
    color: var(--primary); 
}

/* Action Buttons */
.btn {
    display: inline-block;
    background-color: var(--accent);
    color: white;
    padding: 0.5rem 1rem;
    text-decoration: none;
    font-weight: 500;
    border-radius: 4px;
    margin-top: 1rem;
    transition: background-color 0.2s ease;
}

.btn:hover { 
    background-color: #1d4ed8; 
}

/* ==========================================================================
   Global Footer
   ========================================================================== */

footer {
    text-align: center;
    padding: 2rem;
    margin-top: 4rem;
    border-top: 1px solid #e2e8f0;
    font-size: 0.9rem;
}