/* --- Visual Identity --- */
:root {
    --primary: #264653;   /* Charcoal */
    --secondary: #2A9D8F; /* Teal */
    --accent: #F49056;    /* Coral */
    --highlight: #F9BD6F; /* Gold */
    --light: #F4F1DE;     /* Sensory-friendly Off-white */
    --white: #ffffff;
}

/* --- Global Reset & Scroll Fixes --- */
*, *::before, *::after {
    box-sizing: border-box; /* The essential fix for mobile width */
}

html, body {
    overflow-x: hidden; /* Prevents the "right-scroll" glitch */
    width: 100%;
    position: relative;
    margin: 0;
    padding: 0;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    line-height: 1.6;
    color: var(--primary);
    background-color: var(--white);
}

.container {
    max-width: 1100px;
    margin: 0 auto;
    padding: 2rem;
}

/* --- Centered Home Header (Main Page) --- */
.home-header {
    background: var(--white);
    padding: 2.5rem 1rem 2rem 1rem;
    text-align: center;
    border-bottom: 2px solid #eee;
    width: 100%;
}

.home-logo {
    width: 100%; /* Makes logo fluid */
    max-width: 280px; /* Limits size on desktop */
    height: auto;
    display: block;
    margin: 0 auto 1.5rem auto;
}

.home-nav {
    display: flex;
    justify-content: center;
    gap: 25px;
    flex-wrap: wrap; /* Prevents links from pushing off-screen on small phones */
}

.home-nav a {
    text-decoration: none;
    color: var(--primary);
    font-size: 1.1rem;
    font-weight: 600;
    transition: color 0.3s;
}

.home-nav a:hover { color: var(--secondary); }

/* --- Sub-page Navigation (Brand Bar) --- */
.brand-bar { 
    background: var(--white); 
    padding: 15px 25px; 
    border-bottom: 2px solid #eee; 
    display: flex; 
    justify-content: space-between; 
    align-items: center; 
    position: sticky; 
    top: 0; 
    z-index: 1000;
    width: 100%;
}

.brand-link { 
    display: flex; 
    align-items: center; 
    text-decoration: none; 
    color: var(--primary); 
    font-weight: bold; 
    font-size: 1.2rem;
}

.brand-logo-small { 
    height: 60px; 
    width: auto; 
    margin-right: 15px; 
}

.brand-nav a { 
    margin-left: 20px; 
    text-decoration: none; 
    color: var(--primary); 
    font-size: 1rem; 
    font-weight: 600;
}

/* --- Hero Section --- */
.hero {
    padding: 5rem 1.5rem;
    text-align: center;
    background-color: var(--light);
    border-bottom: 1px solid #eee;
}

.hero h1 { font-size: 2.8rem; color: var(--primary); margin-bottom: 1rem; }
.hero p { font-size: 1.2rem; max-width: 800px; margin: 0 auto 2.5rem auto; color: #444; }

/* --- Services & Cards --- */
.services-wrapper {
    background-color: var(--white);
    padding: 5rem 1rem;
}

.services {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 30px;
    max-width: 1100px;
    margin: 0 auto;
}

.card {
    background: var(--white);
    padding: 2.5rem;
    border-radius: 15px;
    box-shadow: 0 10px 30px rgba(22, 155, 162, 0.08); 
    border-top: 5px solid var(--secondary);
    transition: all 0.3s ease;
    text-decoration: none;
    color: inherit;
    display: flex;
    flex-direction: column;
}

.card:hover { 
    transform: translateY(-8px); 
    border-top-color: var(--accent);
    box-shadow: 0 12px 35px rgba(22, 155, 162, 0.15);
}

.card h2, .card h3 { color: var(--primary); margin-top: 0; font-size: 1.4rem; }

/* --- Buttons --- */
.btn {
    display: inline-block;
    padding: 14px 32px;
    background-color: var(--secondary);
    color: var(--white) !important;
    text-decoration: none;
    border-radius: 50px; 
    font-weight: bold;
    transition: background 0.3s;
}

.btn:hover { background-color: var(--primary); }

.btn-outline {
    background-color: transparent;
    color: var(--primary) !important;
    border: 2px solid var(--primary);
}

/* --- CTA Section --- */
.cta-section {
    background: var(--primary); 
    color: var(--white); 
    padding: 5rem 1rem; 
    text-align: center;
}

/* --- Article Library Specifics --- */
.category-label {
    font-size: 0.9rem;
    text-transform: uppercase;
    letter-spacing: 2px;
    color: var(--secondary);
    font-weight: bold;
    margin: 50px 0 20px;
    display: block;
    border-bottom: 3px solid var(--light);
    padding-bottom: 8px;
}

.article-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
    gap: 30px;
    align-items: stretch;
}

.read-more {
    margin-top: auto;
    padding-top: 15px;
    font-size: 0.9rem;
    font-weight: bold;
    color: var(--secondary);
}

/* --- Footer --- */
footer {
    text-align: center;
    padding: 3rem 1rem;
    background: #f9f9f9;
    color: #888;
    font-size: 0.9rem;
}

/* --- Mobile Responsive Adjustments --- */
@media (max-width: 600px) {
    .hero h1 { font-size: 2rem; }
    .home-header { padding: 2rem 0.5rem; }
    .home-logo { max-width: 220px; }
    .home-nav { gap: 12px; }
    
    .brand-bar { flex-direction: column; gap: 15px; text-align: center; }
    .brand-nav { margin: 0; display: flex; justify-content: center; width: 100%; }
    .brand-nav a { margin: 0 10px; font-size: 0.9rem; }
}