:root {
    --navy: #1B2B4B;
    --amber: #F5A623;
    --offwhite: #F8F7F4;
    --slate: #4A5568;
    --white: #FFFFFF;
    --font-body: 'Inter', sans-serif;
    --font-header: 'Merriweather', serif;
}

/* --- Reset & Base --- */
*, *::before, *::after {
    box-sizing: border-box;
}

body, h1, h2, h3, p, ul, li {
    margin: 0;
}

body {
    font-family: var(--font-body);
    color: var(--slate);
    background-color: var(--offwhite);
    line-height: 1.6;
    font-size: 16px;
}

.container {
    max-width: 1100px;
    margin-left: auto;
    margin-right: auto;
    padding: 0 1.5rem;
}

h1, h2, h3 {
    font-family: var(--font-header);
    color: var(--navy);
    line-height: 1.2;
    margin-bottom: 1rem;
}

h1 { font-size: 2.5rem; }
h2 { font-size: 2rem; }
h3 { font-size: 1.5rem; }

a {
    color: var(--amber);
    text-decoration: none;
}

a:hover {
    text-decoration: underline;
}

img {
    max-width: 100%;
    height: auto;
    display: block;
}

/* --- Header & Nav --- */
.site-header {
    background: var(--white);
    padding: 1rem 0;
    border-bottom: 1px solid #e0e0e0;
}

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

.logo {
    font-family: var(--font-header);
    font-weight: 700;
    font-size: 1.5rem;
    color: var(--navy);
    text-decoration: none;
}
.logo:hover { text-decoration: none; }

.main-nav ul {
    list-style: none;
    padding: 0;
    display: flex;
    gap: 1.5rem;
}

.main-nav a {
    color: var(--slate);
    font-weight: 600;
}
.main-nav a:hover {
    color: var(--amber);
    text-decoration: none;
}

.mobile-nav-toggle { display: none; }


/* --- CTA Buttons --- */
.cta-button {
    display: inline-block;
    background-color: var(--amber);
    color: var(--navy);
    padding: 0.75rem 1.5rem;
    border-radius: 5px;
    font-weight: 700;
    text-decoration: none;
    transition: background-color 0.3s ease;
}

.cta-button:hover {
    background-color: #e0930f;
    color: var(--navy);
    text-decoration: none;
}

/* --- Homepage Hero --- */
.hero {
    background-color: var(--navy);
    color: var(--white);
    padding: 4rem 0;
    text-align: center;
}
.hero h1 {
    color: var(--white);
    font-size: 3rem;
    max-width: 700px;
    margin: 0 auto 1rem;
}
.hero p {
    font-size: 1.2rem;
    color: #e0e0e0;
    max-width: 600px;
    margin: 0 auto 2rem;
}

/* --- Card Grids --- */
.card-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 2rem;
    margin: 3rem 0;
}
@media (max-width: 900px) {
    .card-grid { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 600px) {
    .card-grid { grid-template-columns: 1fr; }
}
.card {
    background: var(--white);
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    overflow: hidden;
    text-decoration: none;
    color: var(--slate);
    display: flex;
    flex-direction: column;
}
.card:hover {
    transform: translateY(-5px);
    box-shadow: 0 5px 15px rgba(0,0,0,0.05);
}
.card-image {
    height: 180px;
    background-color: var(--slate);
    background-size: cover;
    background-position: center;
}
.card-content {
    padding: 1.5rem;
    flex-grow: 1;
}
.card h3 {
    margin-top: 0;
    font-size: 1.25rem;
}
.card p {
    font-size: 0.95rem;
    margin-bottom: 0;
}

/* --- Blog Post Specific --- */
.blog-post { padding: 3rem 0; }
.blog-post-hero {
    margin-bottom: 2rem;
}
.blog-post-hero img {
    width: 100%;
    border-radius: 8px;
}
.blog-post-header {
    margin-bottom: 2rem;
    text-align: center;
}
.blog-post-meta {
    margin-bottom: 0.5rem;
}
.post-category {
    font-weight: bold;
    color: var(--amber);
    text-transform: uppercase;
    font-size: 0.8rem;
    letter-spacing: 1px;
}
.post-date {
    color: #777;
    font-size: 0.9rem;
    margin-left: 1rem;
}
.blog-post-title { font-size: 2.8rem; }
.post-excerpt {
    font-size: 1.2rem;
    color: #555;
    max-width: 800px;
    margin: 0 auto;
}
.blog-post-content {
    max-width: 750px;
    margin: 0 auto;
}
.blog-post-content h2 { margin-top: 2.5rem; }
.blog-post-content h3 { margin-top: 2rem; }
.blog-post-content p, 
.blog-post-content ul, 
.blog-post-content ol {
    margin-bottom: 1.5rem;
}
.blog-post-content ul, 
.blog-post-content ol {
    padding-left: 1.5rem;
}
.blog-post-content li {
    margin-bottom: 0.5rem;
}

.post-footer {
    text-align: center;
    margin-top: 3rem;
    padding-top: 2rem;
    border-top: 1px solid #e0e0e0;
}
.back-link {
    font-weight: bold;
    color: var(--slate);
}


/* Comparison Tables */
.comparison-table {
    width: 100%;
    border-collapse: collapse;
    margin: 2rem 0;
}
.comparison-table th, .comparison-table td {
    padding: 0.75rem 1rem;
    border: 1px solid #ddd;
    text-align: left;
}
.comparison-table th {
    background-color: var(--navy);
    color: var(--white);
    font-family: var(--font-body);
}
.comparison-table tbody tr:nth-child(even) {
    background-color: var(--white);
}

/* Star Ratings */
.stars {
    color: var(--amber);
    font-size: 1.2rem;
}

/* Pro/Con Lists */
.pros-cons {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 2rem;
    margin: 2rem 0;
}
.pros-cons h4 {
    border-bottom: 2px solid;
    padding-bottom: 0.5rem;
    margin-bottom: 1rem;
}
.pros h4 { border-color: #28a745; }
.cons h4 { border-color: #dc3545; }
.pros ul, .cons ul {
    list-style: none;
    padding: 0;
}
.pros li::before {
    content: '✓ ';
    color: #28a745;
    font-weight: bold;
    margin-right: 0.5rem;
}
.cons li::before {
    content: '✗ ';
    color: #dc3545;
    font-weight: bold;
    margin-right: 0.5rem;
}


/* --- Footer --- */
.site-footer {
    background: var(--navy);
    color: var(--offwhite);
    padding: 2rem 0;
    text-align: center;
    margin-top: 3rem;
    font-size: 0.9rem;
}

.affiliate-disclosure {
    font-style: italic;
    opacity: 0.8;
    margin-top: 0.5rem;
}


/* --- Mobile Styles --- */
@media (max-width: 768px) {
    h1 { font-size: 2rem; }
    .hero h1 { font-size: 2.2rem; }
    .blog-post-title { font-size: 2.2rem; }

    .main-nav ul {
        display: none;
        position: absolute;
        top: 70px;
        right: 0;
        background: var(--white);
        width: 100%;
        flex-direction: column;
        text-align: center;
        padding: 1rem 0;
        box-shadow: 0 5px 10px rgba(0,0,0,0.1);
    }
    .main-nav ul[data-visible] {
        display: flex;
    }
    .main-nav li {
        padding: 0.5rem 0;
    }

    .mobile-nav-toggle {
        display: block;
        background: none;
        border: none;
        cursor: pointer;
        padding: 0.5rem;
    }
    .mobile-nav-toggle .sr-only {
        position: absolute;
        width: 1px;
        height: 1px;
        padding: 0;
        margin: -1px;
        overflow: hidden;
        clip: rect(0,0,0,0);
        border: 0;
    }
    .mobile-nav-toggle::before,
    .mobile-nav-toggle::after,
    .mobile-nav-toggle span {
        content: '';
        display: block;
        width: 25px;
        height: 3px;
        background-color: var(--navy);
        margin: 5px 0;
        transition: transform 0.3s ease-out;
    }
    .mobile-nav-toggle[aria-expanded="true"]::before {
        transform: translateY(8px) rotate(45deg);
    }
    .mobile-nav-toggle[aria-expanded="true"]::after {
        transform: translateY(-8px) rotate(-45deg);
    }
    .mobile-nav-toggle[aria-expanded="true"] span {
        opacity: 0;
    }

    .pros-cons {
        grid-template-columns: 1fr;
    }
}
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0,0,0,0);
  white-space: nowrap;
  border-width: 0;
}.logo-link { display: flex; align-items: center; gap: 0.5rem; text-decoration: none; }
.logo-img { height: 36px; width: auto; }
.logo-text { font-family: 'Merriweather', serif; font-weight: 700; font-size: 1.1rem; color: var(--navy); }
.footer-logo { margin-bottom: 1rem; display: flex; align-items: center; gap: 0.5rem; }
.footer-logo img { height: 28px; width: 28px; flex-shrink: 0; }

/* --- CTA Spacing Fixes --- */
.cta-section .btn, .email-capture .btn, section .btn:last-child {
  margin-top: 1.5rem;
}
.email-capture { padding: 3rem 2rem; }

/* --- Guide Images --- */
.guide-image { width: 100%; border-radius: 8px; margin: 1.5rem 0; max-height: 400px; object-fit: cover; }

/* === FIXES AND ADDITIONS === */

/* FIX 1: Card text overlapping images */
.post-card {
  background: white;
  border-radius: 8px;
  overflow: hidden;
  box-shadow: 0 2px 8px rgba(0,0,0,0.08);
  display: flex;
  flex-direction: column;
}

.post-card img, .post-card picture {
  width: 100%;
  height: 200px;
  object-fit: cover;
  object-position: center;
  display: block;
  flex-shrink: 0;
}

.post-card-body {
  padding: 1.25rem;
  flex: 1;
  display: flex;
  flex-direction: column;
}

/* FIX 2: Hero image too tall */
.blog-post-hero {
  width: 100%;
  max-height: 420px;
  overflow: hidden;
  border-radius: 8px;
  margin-bottom: 2rem;
}

.blog-post-hero img,
.blog-post-hero picture img {
  width: 100%;
  height: 420px;
  object-fit: cover;
  object-position: center top;
  display: block;
}

/* FIX 3: Footer navigation links */
.site-footer {
  background: var(--navy, #1B2B4B);
  color: rgba(255,255,255,0.85);
  padding: 3rem 1.5rem 1.5rem;
}
.footer-inner {
  max-width: 1100px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: 2fr 1fr 1fr;
  gap: 2rem;
  margin-bottom: 2rem;
}
.footer-brand {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}
.footer-site-name {
  color: white;
  font-weight: 700;
  font-size: 1rem;
}
.footer-tagline {
  color: rgba(255,255,255,0.6);
  font-size: 0.85rem;
  margin: 0;
}
.footer-links h4 {
  color: white;
  font-size: 0.85rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin-bottom: 0.75rem;
}
.footer-links ul {
  list-style: none;
  padding: 0;
  margin: 0;
}
.footer-links li {
  margin-bottom: 0.5rem;
}
.footer-links a {
  color: rgba(255,255,255,0.7);
  text-decoration: none;
  font-size: 0.9rem;
}
.footer-links a:hover {
  color: white;
}
.footer-bottom {
  max-width: 1100px;
  margin: 0 auto;
  padding-top: 1.5rem;
  border-top: 1px solid rgba(255,255,255,0.15);
}
.footer-disclosure {
  font-size: 0.8rem;
  color: rgba(255,255,255,0.5);
  margin-bottom: 0.5rem;
}
.footer-copy {
  font-size: 0.8rem;
  color: rgba(255,255,255,0.4);
}
@media (max-width: 768px) {
  .footer-inner {
    grid-template-columns: 1fr;
  }
}

/* TASK 5: Privacy Policy and Contact pages */
.page-content {
  max-width: 780px;
  margin: 3rem auto;
  padding: 0 1.5rem;
}
.page-content h1 {
  margin-bottom: 0.5rem;
}
.page-content h2 {
  margin-top: 2rem;
  margin-bottom: 0.75rem;
  font-size: 1.25rem;
}
.page-content p {
  line-height: 1.7;
  margin-bottom: 1rem;
  color: #444;
}


/* Topic Navigation Tiles */
.topic-nav-section { padding: 3rem 0 1rem; }
.section-title { font-size: 1.4rem; margin-bottom: 1.5rem; color: var(--navy); }
.topic-nav {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 1rem;
}
.topic-tile {
    display: flex;
    flex-direction: column;
    gap: 0.35rem;
    padding: 1.25rem 1.25rem 1.25rem 1rem;
    background: #f8f9fb;
    border: 1px solid #e4e8ee;
    border-radius: 10px;
    text-decoration: none;
    color: var(--navy);
    transition: border-color 0.15s, box-shadow 0.15s, transform 0.15s;
    border-left: 4px solid var(--amber);
}
.topic-tile:hover {
    border-color: var(--amber);
    box-shadow: 0 4px 12px rgba(0,0,0,0.08);
    transform: translateY(-2px);
}
.topic-tile--accent {
    background: #f0f4f9;
    border-left-color: var(--navy);
}
.topic-icon { font-size: 1.5rem; }
.topic-label { font-weight: 700; font-size: 0.95rem; }
.topic-desc { font-size: 0.8rem; color: #666; line-height: 1.4; }

@media (max-width: 900px) { .topic-nav { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 500px) { .topic-nav { grid-template-columns: 1fr; } }
