
/* =========================================
   0. THEME VARIABLES (The Engine)
   ========================================= */

:root {
  --primary: #3A506B;
  --secondary: #E8C547;
  --accent: #e67e22;
  --bg-body: #DDE4E8;
  --bg-surface: #ffffff;      /* Card/Post Background */
  --font-head: 'Lora', sans-serif;
  --font-body: 'Open Sans', sans-serif;
  --radius: 10px;
  --text-main: #333;
  --text-light: #666666;
  --starburst: #E8C547;
}



/* =========================================
   1. GLOBAL RESET & TYPOGRAPHY
   ========================================= */
body {
  margin: 0;
  font-family: var(--font-body);
  background-color: var(--bg-body);
  color: var(--text-main);
 -webkit-font-smoothing: antialiased;
  line-height: 1.6;
}

html, body { overflow-x: hidden; }
*, *::before, *::after { box-sizing: border-box; }

a { text-decoration: none; color: inherit; transition: color 0.2s; }
a:hover { color: #2980b9; }
h1, h2, h3, h4 { font-family: var(--font-head); }

/* =========================================
   2. HERO SECTION
   ========================================= */
header.hero-header {
  padding: 1.5rem 2rem;
  min-height: 350px; 
  height: auto;
  background-color: #333;
  background-size: cover;
  background-position: center;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  position: relative;
  color: #fff;
  box-shadow: 0 4px 10px rgba(0,0,0,0.2);
  /* Default image - overridden by inline HTML styles per page */
  background-image: linear-gradient(rgba(0, 0, 0, 0.3), rgba(0, 0, 0, 0.3)), url('/images/banner.webp');
}

/* SMART OVERRIDE: If this is an Article Page, shrink header to 250px */
body:has(.main-article) header.hero-header, 
body:has(.blog-post) header.hero-header {
    min-height: 250px; 
	height: auto;
}



.hero-header .hero-text {
  max-width: 900px;
  margin: 0 auto;
  z-index: 2;
  margin-top: 10px;
  background-color: rgba(0, 0, 0, 0.05); /* 50% opacity black box */
  padding: 1rem;                         /* Breathing room */
  border-radius: 8px;                    /* Matching your --radius var */
  backdrop-filter: blur(8px);            /* Blurs the photo BEHIND the text */
  border: 1px solid rgba(255, 255, 255, 0.1); /* Subtle premium edge */
}

.hero-header h1 {
  font-size: 2rem; 
  font-weight: 700;
  margin: 0 0 1rem;
  text-shadow: 2px 2px 4px rgba(0,0,0,0.6);
  letter-spacing: -1px;
  line-height: 1.2;
}

/* Home page brand title should feel proportional on large screens */
.hero-header .home-brand-title {
  font-size: clamp(2.6rem, 5.6vw, 4.6rem);
  line-height: 1.08;
  letter-spacing: -0.03em;
  margin-bottom: 0.7rem;
}

.hero-header p {
  font-size: 1.2rem;
  color: #f0f0f0;
  text-shadow: 1px 1px 2px rgba(0,0,0,0.6);
  font-weight: 400;
}

/* Home Link (Clean Arrow Style) */
.home-link {
  position: absolute;
  top: 30px; left: 30px; /* Give it more breathing room from the edge */
  
  /* Typography */
  color: rgba(255, 255, 255, 0.9) !important; /* Slightly muted white */
  font-family: var(--font-body);              /* Clean sans-serif looks better for UI */
  font-weight: 700;
  font-size: 0.75rem;                         /* Smaller, understated size */
  text-transform: uppercase;                  /* The Premium signature */
  letter-spacing: 2px;                        /* Wide spacing = Luxury */
  
  /* Layout */
  display: flex;
  align-items: center;
  gap: 10px;
  z-index: 10;
  
  /* No Box */
  background: transparent;
  padding: 0;
  border: none;
  backdrop-filter: none;
  
  transition: all 0.3s ease;
}

/* The Arrow (using CSS content so you don't need to change HTML) */
.home-link::before {
  content: '←';              /* A cleaner arrow character */
  font-size: 1.1rem;
  font-weight: 400;
  transition: transform 0.3s ease;
}

/* Hover Effects */
.home-link:hover { 
  color: #ffffff !important;      /* Brighten text */
  background: transparent;        /* Ensure box doesn't reappear */
  text-shadow: 0 2px 10px rgba(0,0,0,0.3); /* Subtle legibility lift */
}

.home-link:hover::before {
  transform: translateX(-5px);    /* Subtle slide left animation */
}


/* =========================================
   3. STICKY BAR & NAV
   ========================================= */
#sticky-original {
  position: absolute; bottom: 0; left: 0; right: 0; width: 100%;
  box-sizing: border-box; z-index: 10;
  background: linear-gradient(to top, rgba(0,0,0,0.8), transparent);
}

#sticky-clone {
  position: fixed; top: 0; left: 0; right: 0;
  display: flex; justify-content: space-between; align-items: center;
  padding: 0 20px; height: 60px;
  background: rgba(30, 30, 30, 0.95); backdrop-filter: blur(10px);
  z-index: 999; display: none;
  box-shadow: 0 2px 10px rgba(0,0,0,0.1);
}

.sticky-bar { 
    display: flex; justify-content: space-between; align-items: center; 
    padding: 15px 30px; color: #fff; 
}

.subscribe-button {
  background: var(--secondary); border: none; color: white;
  padding: 8px 16px; border-radius: 4px; cursor: pointer;
  font-weight: bold; font-size: 0.9rem; transition: filter 0.2s;
}
.subscribe-button:hover { filter: brightness(0.9); }
.icon-glyph {
  font-family: "Segoe UI Emoji", "Apple Color Emoji", "Noto Color Emoji", "Segoe UI Symbol", sans-serif;
  line-height: 1;
}

.canadian-badge {
  display: flex; align-items: center; font-weight: 600;
  font-size: 0.95rem; letter-spacing: 0.5px;
  text-shadow: 0 1px 2px rgba(0,0,0,0.5);
}

/* =========================================
   4. HOME PAGE SECTIONS
   ========================================= */
.container { width: 100%; max-width: 1100px; margin: 0 auto; padding: 0 1.25rem; }

section.site-intro {
  background: var(--bg-surface); margin-top: -40px; position: relative; z-index: 10;
  border-radius: 8px; box-shadow: 0 10px 30px rgba(0,0,0,0.08);
  padding: 1rem 2rem !important;
}
section.site-intro p { text-align: justify; }

/* Comparison Table */
.comparison-section {
  background: transparent;
  box-shadow: none;
  max-width: 980px;
  margin: 3rem auto 2rem;
  margin-bottom: 2rem;
  padding: 0;
}

.featured-spotlight {
  margin-top: 1.25rem;
}
.featured-spotlight .tool-tile.featured-tile {
  border: 1px solid color-mix(in srgb, var(--primary) 28%, var(--secondary) 22%, white);
  border-radius: calc(var(--radius) + 6px);
  background: linear-gradient(
    135deg,
    color-mix(in srgb, var(--primary) 10%, white),
    color-mix(in srgb, var(--secondary) 8%, white)
  );
  box-shadow: 0 18px 42px rgba(12, 27, 46, 0.18);
}
.featured-spotlight .featured-layout .tile-img {
  border-right: 1px solid color-mix(in srgb, var(--primary) 14%, #e8eef4);
}
.quick-picks-horizontal-wrap {
  margin: 0.9rem auto 1.25rem;
}
.quick-picks-horizontal {
  background: var(--bg-surface);
  border: 1px solid #e3e9ef;
  border-radius: var(--radius);
  box-shadow: 0 4px 15px rgba(0,0,0,0.08);
  padding: 1rem 1rem 1.1rem;
}
.quick-picks-horizontal h3 {
  margin: 0 0 0.85rem;
  text-align: center;
  font-size: 1.08rem;
  color: var(--primary);
}
.quick-picks-row {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0.85rem;
}
.quick-pick-card {
  border: 1px solid #edf2f7;
  border-radius: 10px;
  padding: 0.7rem 0.75rem 0.8rem;
  background: #fff;
  transition: box-shadow 0.2s ease, transform 0.2s ease;
}
.quick-pick-card:hover {
  box-shadow: 0 8px 16px rgba(15, 36, 60, 0.09);
  transform: translateY(-2px);
}
.quick-pick-rank {
  font-size: 0.82rem;
  font-weight: 700;
  color: #355a84;
  margin-bottom: 0.35rem;
}
.quick-pick-btn {
  margin-top: 0.55rem;
  font-size: 0.8rem;
  padding: 8px 11px;
}
.home-lower-products {
  margin: 0.5rem auto 1.5rem;
}
.home-lower-products .home-lower-featured {
  margin-bottom: 1rem;
}
.home-lower-products .home-lower-featured:last-child {
  margin-bottom: 0;
}
.section-title {
  text-align: center; font-family: var(--font-head); color: var(--primary);
  font-size: 1.8rem; margin-bottom: 1.5rem; display: inline-block; width: 100%;
}
.table-responsive {
    background: var(--bg-surface); border-radius: var(--radius); overflow: hidden;
    box-shadow: 0 4px 15px rgba(0,0,0,0.08); border: 1px solid #e0e0e0;
}
.comparison-table { width: 100%; border-collapse: collapse; min-width: 520px; table-layout: fixed; }
.comparison-table thead { background-color: var(--primary); color: white; }
.comparison-table th {
    text-align: left; padding: 14px 16px; font-family: var(--font-head);
    font-weight: 600; text-transform: uppercase; font-size: 0.85rem; letter-spacing: 0.05em;
}
.comparison-table th.col-category { width: 19%; }
.comparison-table th.col-product { width: 61%; }
.comparison-table th.col-action { width: 20%; }
.comparison-table tbody tr { border-bottom: 1px solid #eee; transition: background-color 0.2s; }
.comparison-table tbody tr:hover { background-color: #f9fbfd; }
.comparison-table td { padding: 14px 16px; vertical-align: middle; font-size: 0.96rem; color: #444; }
.comparison-table td.cell-category { white-space: nowrap; }
.comparison-table td.cell-action { text-align: right; }

.top3-product-name {
    font-weight: 700;
    color: var(--primary);
    margin-bottom: 0.2rem;
    line-height: 1.3;
}

.top3-product-teaser {
    font-size: 0.92rem;
    color: #5f6b75;
    line-height: 1.4;
}

.table-btn {
    background-color: var(--secondary); color: white !important; padding: 9px 14px;
    border-radius: 6px; font-weight: 700; font-size: 0.86rem; display: inline-block;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1); transition: all 0.2s ease; white-space: nowrap;
}
.table-btn:hover { filter: brightness(0.9); transform: translateY(-1px); }

/* =========================================
   5. LAYOUT ENGINE (Fixed 2-Column)
   ========================================= */
.breadcrumb-trail {
  max-width: 1100px;
  margin: 1rem auto 0;
  padding: 0 1.25rem;
  font-size: 0.9rem;
  color: #637285;
}

.breadcrumb-trail ol {
  margin: 0;
  padding: 0;
  list-style: none;
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem;
  align-items: center;
}

.breadcrumb-trail li {
  display: inline-flex;
  align-items: center;
}

.breadcrumb-trail li + li::before {
  content: "/";
  margin-right: 0.35rem;
  color: #9aa8b7;
}

.breadcrumb-trail a {
  color: #2b5f94;
  text-decoration: none;
}

.breadcrumb-trail a:hover {
  text-decoration: underline;
}

.breadcrumb-trail span[aria-current='page'] {
  color: #33495f;
  font-weight: 600;
}

/* When breadcrumbs sit inside the lifted content wrapper (over hero),
   switch to a high-contrast treatment for readability. */
.content-wrapper > .breadcrumb-trail {
  margin-top: 0.2rem;
  margin-bottom: 0.8rem;
}

.content-wrapper > .breadcrumb-trail ol {
  width: fit-content;
  max-width: 100%;
  padding: 0.42rem 0.8rem;
  border-radius: 999px;
  background: rgba(10, 18, 30, 0.28);
  border: 1px solid rgba(255, 255, 255, 0.16);
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.12);
  backdrop-filter: blur(2px);
}

.content-wrapper > .breadcrumb-trail a {
  color: #f2f7ff;
  font-weight: 400;
}

.content-wrapper > .breadcrumb-trail span[aria-current='page'] {
  color: #ffffff;
  font-weight: 400;
}

.content-wrapper > .breadcrumb-trail li + li::before {
  color: rgba(255, 255, 255, 0.62);
}

.content-wrapper {
  max-width: 1600px; 
  margin: -60px auto 2rem; 
  position: relative;
  z-index: 5;
  padding: 0 1rem;
}

/* The Flex Container */
.two-col-layout {
    display: flex;
    gap: 32px;             /* Tighter gap */
    align-items: flex-start;
    justify-content: center;
}

/* Left Column: Article 
   NOTE: We include .blog-post here as a backup in case your HTML 
   generator hasn't been updated to use 'main-article' */
.main-article, .blog-post {
    flex: 1;               /* Takes remaining space */
    min-width: 0;          /* Prevents overflow */
    max-width: none;
    background: var(--bg-surface); 
    padding: 2rem; 
    border-radius: var(--radius);
    box-shadow: 0 4px 20px rgba(0,0,0,0.08);
    margin: 0 auto;
}

/* Right Column: Sidebar Container */
.sidebar-column {
    width: 320px;          /* Fixed width */
    flex-shrink: 0;        /* Never shrink */
    position: sticky;      
    top: 20px;
}


@media (max-width: 1450px) {
    .two-col-layout { padding-left: 0; }
}

@media (max-width: 950px) {
    .two-col-layout { flex-direction: column; align-items: stretch; gap: 16px; }
    .sidebar-column { width: 100%; margin-top: 2rem; position: static; }
    .content-wrapper { margin-top: -20px; }
}

/* =========================================
   6. ARTICLE CONTENT STYLES
   ========================================= */
.post-date { font-size: 0.85rem; color: #888; margin-bottom: 1rem; display: block; }

.main-article h2, .blog-post h2 {
  font-family: var(--font-head); font-size: 1.8rem; color: var(--primary);
  margin-top: 2.5rem; margin-bottom: 1rem; border-bottom: 2px solid #f0f0f0; padding-bottom: 0.5rem;
}

.main-article h3, .blog-post h3 {
  font-family: var(--font-head); font-size: 1.4rem; color: var(--primary); margin-top: 2rem;
}

.main-article p, .blog-post p { 
  font-size: 1.05rem; line-height: 1.8; color: #444; margin-bottom: 1.5rem; 
}

/* Tip Lists */
.tip-list {
  background: #f8fbff; border-left: 5px solid #3498db;
  padding: 2rem 2.5rem; margin: 2rem 0; border-radius: 0 8px 8px 0;
  list-style-type: none;
}
.tip-list li { margin-bottom: 1rem; position: relative; }
.tip-list li::before {
  content: '✓'; color: var(--secondary); font-weight: bold; position: absolute; left: -20px;
}

.checklist-box {
    background: #fff; border-radius: 12px; padding: 1.5rem;
    margin: 2rem 0; box-shadow: 0 4px 15px rgba(0,0,0,0.05);
}
.checklist-box .tip-list li { margin-bottom: 0.8rem; }

/* Pros & Cons Box */
.pros-box, .cons-box {
    padding: 1rem 1.5rem;
    margin: 1.5rem 0;
    border-radius: 8px; /* Rounded corners on right only */
    font-size: 0.95rem;
    line-height: 1.6;
}

/* 1. The Pros Box (Green - Matches your Image) */
.pros-box {
    background-color: #f0fdf4; /* Very light mint green */
    border-left: 5px solid #22c55e; /* Vibrant Success Green */
    color: #14532d; /* Dark green text for contrast */
}

/* 2. The Cons Box (Amber/Orange - Matches the 'Warning' vibe) */
.cons-box {
    background-color: #fffbeb; /* Very light warm yellow */
    border-left: 5px solid #f59e0b; /* Amber/Orange Warning Color */
    color: #78350f; /* Dark brown/orange text */
}

/* List Styling (Removes default bullets so Emojis stand out) */
.pros-box ul, .cons-box ul {
    list-style-type: none; /* No dots */
    padding-left: 0;       /* Align left */
    margin: 0.5rem 0 0 0;
}

.pros-box li, .cons-box li {
    margin-bottom: 0.5rem;
    display: flex;         /* Ensures multi-line text aligns with icon */
    align-items: flex-start;
}

/* Optional: Make the Strong tags pop */
.pros-box strong, .cons-box strong {
    display: block;
    margin-bottom: 0.5rem;
    font-size: 1.1em;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

/* =========================================
   PRODUCT REVIEW LAYOUT (Spotlight Style)
   ========================================= */

.product-row {
    display: flex;
    flex-direction: column; /* Forces strict vertical stacking (Image Top, Text Bottom) */
    gap: 1.5rem;
    margin-bottom: 3rem;
    background: #fff; /* Optional: Adds a clean card look */
    border: 1px solid #eee; /* Optional: Defines the edge */
    border-radius: 8px; /* Optional: Softens corners */
    padding: 2rem; /* Adds breathing room */
}

.product-img {
    width: 100%;
    display: flex;
    justify-content: center; /* Centers the image horizontally */
    margin-bottom: 1rem;
}

.product-img img {
    max-width: 400px; /* Prevents it from being unnaturally huge on desktop */
    width: 100%;
    height: auto;
    border-radius: 8px;
    box-shadow: 0 4px 10px rgba(0,0,0,0.1);
}

.product-details {
    width: 100%; /* Ensures text takes full width */
}

/* Optional: Make the title bigger since it's now a headline */
.product-details h3 {
    margin-top: 0;
    font-size: 1.6rem;
    text-align: center; /* Centers the headline to match the image */
}

/* Center the rating too */
.product-details .rating-badge {
    text-align: center;
    display: block;
    margin-bottom: 1.5rem;
}


/* Native Ad Box */
.native-ad-box {
    background: #eaf6ff;
    border: 1px solid #3498db;
    padding: 1rem;
    border-radius: 8px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin: 1.5rem 0;
}
.native-ad-box a {
    background: #3498db;
    color: white !important;
    padding: 5px 15px;
    border-radius: 4px;
    font-weight: bold;
    font-size: 0.9rem;
}

/* =========================================
   7. SIDEBAR WIDGETS (Restored Dark Header)
   ========================================= */
.sidebar-widget {
  background: white;
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: 0 4px 15px rgba(0,0,0,0.08);
  border: 1px solid #e0e0e0;
  margin-bottom: 1.5rem;
}

.sidebar-widget h3 {
  margin: 0; 
  padding: 18px; 
  background: var(--primary); /* Dark Header */
  color: #ffffff;             /* White Text */
  text-align: center;
  font-size: 1.1rem; 
  font-weight: 700;
  letter-spacing: 0.5px;
  text-shadow: 0 1px 2px rgba(0,0,0,0.2);
}

.sidebar-widget table { width: 100%; border-collapse: collapse; }
.sidebar-widget tr { border-bottom: 1px solid #f0f0f0; transition: background 0.2s; cursor: pointer; }
.sidebar-widget tr:last-child { border-bottom: none; }
.sidebar-widget tr:hover { background: #f9f9f9; }
.sidebar-widget td { padding: 15px; font-size: 0.95rem; vertical-align: middle; }

.sidebar-link-title { font-weight: 600; color: #333; display: block; line-height: 1.4; }
.sidebar-arrow-link { color: #2980b9; font-weight: bold; font-size: 0.85rem; text-transform: uppercase; letter-spacing: 0.5px; white-space: nowrap; }
.quick-picks-widget h3 {
  font-size: 0.98rem;
  padding: 14px;
}
.quick-picks-widget td {
  padding: 11px 12px;
}
.quick-picks-widget .top3-product-name {
  font-size: 0.9rem;
  margin-bottom: 0.15rem;
}
.quick-picks-widget .top3-product-teaser {
  font-size: 0.82rem;
  line-height: 1.35;
}
.quick-picks-widget .sidebar-arrow-link {
  font-size: 0.76rem;
  letter-spacing: 0.35px;
}

/* =========================================
   8. GRID SYSTEM & TILES
   ========================================= */
.tile-grid {
  display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 2rem; padding: 3rem 0; max-width: 1200px; margin: 0 auto;
}

/* FEATURED TILE */
.tool-tile.featured-tile {
  grid-column: 1 / -1; display: flex; flex-direction: row; min-height: 320px;
  border: 2px solid #3498db; box-shadow: 0 8px 25px rgba(52, 152, 219, 0.15);
}
.featured-layout { display: flex; width: 100%; align-items: stretch; }
.featured-layout .tile-img {
    flex: 0 0 38%;
    min-height: 260px;
    background: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 1rem;
    border-right: 1px solid #eee;
    border-bottom: none;
    height: auto;
    overflow: hidden;
}
.featured-layout .tile-img a { display: flex; width: 100%; height: 100%; align-items: center; justify-content: center; }
.featured-layout .tile-img img {
    width: auto;
    height: auto;
    max-width: 92%;
    max-height: 100%;
    object-fit: contain;
    object-position: center center;
    display: block;
    margin: auto;
    transition: transform 0.3s ease;
}
.featured-layout:hover .tile-img img { transform: scale(1.05); }
.featured-layout .tile-content {
    flex: 1.5; padding: 3rem 2.5rem; display: flex; flex-direction: column; justify-content: center;
}
.featured-layout h3 { font-size: 2rem; margin-bottom: 0.5rem; font-family: var(--font-head); line-height: 1.2;}
.large-btn {
    align-self: flex-start; margin-top: 1.5rem; padding: 12px 25px !important;
    font-size: 1rem !important; background-color: var(--accent) !important;
    box-shadow: 0 4px 10px rgba(230, 126, 34, 0.3);
}
.ribbon-badge {
    position: absolute; top: 20px; right: -10px; background: #e74c3c; color: white;
    padding: 8px 15px; font-weight: bold; font-size: 0.85rem; box-shadow: 2px 2px 5px rgba(0,0,0,0.2);
    z-index: 10; text-transform: uppercase; letter-spacing: 1px;
}

/* STANDARD TILES */
.tool-tile {
  background: var(--bg-surface); border-radius: var(--radius); box-shadow: 0 2px 10px rgba(0,0,0,0.05);
  border: 1px solid #eee; display: flex; flex-direction: column;
  transition: transform 0.3s ease, box-shadow 0.3s ease; overflow: hidden; position: relative;
}
.tool-tile:hover { transform: translateY(-5px); box-shadow: 0 10px 25px rgba(0,0,0,0.1); }
.tile-label {
  position: absolute; top: 15px; left: 15px; background: rgba(255, 255, 255, 0.95);
  color: var(--primary); padding: 4px 10px; border-radius: 20px; font-size: 0.7rem; font-weight: 700;
  text-transform: uppercase; border: 1px solid #eee; box-shadow: 0 2px 5px rgba(0,0,0,0.05); z-index: 2;
}
.tile-img {
  height: 180px; width: 100%; padding: 15px; display: flex; align-items: center; justify-content: center;
  border-bottom: 1px solid #f9f9f9; background-color: #fff; box-sizing: border-box;
}
.tile-img a { display: flex; width: 100%; height: 100%; align-items: center; justify-content: center; }
.tile-img img { max-height: 150px; max-width: 100%; width: auto; height: auto; object-fit: contain;  border-radius: 8px; margin-top: 70px;}

.tile-content { padding: 1.5rem; display: flex; flex-direction: column; flex-grow: 1; }
.tile-heading { display: flex; gap: 10px; margin-bottom: 10px; }
.tile-heading-icon {
  font-size: 1.5rem;
  font-family: "Segoe UI Emoji", "Apple Color Emoji", "Noto Color Emoji", "Segoe UI Symbol", sans-serif;
}
.tile-heading-text {
  font-family: var(--font-head); font-size: 1.15rem; color: var(--primary); margin: 0; line-height: 1.3;
}
.rating-stars { color: #f1c40f; font-size: 0.9rem; margin-top: 5px; margin-bottom: 10px; }
.subtitle { font-weight: 600; color: #555; font-size: 0.95rem; margin-bottom: 10px; }
.tile-content p { font-size: 0.95rem; color: var(--text-light); line-height: 1.6; margin-bottom: 20px; }
.tile-btn-wrapper { margin-top: auto; }
.tile-btn {
  display: block; width: 100%; padding: 12px 0; background-color: #f8f9fa; color: #333 !important;
  text-align: center; border-radius: 8px; font-weight: 600; border: 1px solid #ddd; transition: all 0.2s;
}
.tile-btn:hover { background-color: var(--primary); color: white !important; border-color: var(--primary); }
.tile-lastupdate { text-align: center; font-size: 0.8rem; padding-top: 10px; }

/* Tile Starburst (Restored) */
.tile-starburst { position: absolute; top: 0; right: 0; width: 100px; height: 100px; overflow: hidden; z-index: 3; pointer-events: none; }
.tile-starburst span { position: absolute; top: 26px; right: -35px; width: 140px; text-align: center; font-size: 0.8rem; font-weight: bold; text-transform: uppercase; letter-spacing: 1px; padding: 4px 0; background-color: #e53935; color: white; transform: rotate(45deg); animation: pulse 2.5s infinite ease-in-out; }
.tile-starburst.yellow span { background-color: var(--starburst); color: #333; width: 164px; right: -47px; font-size: 0.72rem; letter-spacing: 0.8px; text-transform: uppercase; font-weight: 700; line-height: 1.05; }
.tile-starburst.editors-choice span { width: 176px; right: -53px; font-size: 0.60rem; letter-spacing: 0.45px; text-transform: uppercase; font-weight: 700; line-height: 1.03; }
@keyframes pulse { 0% { transform: rotate(45deg) scale(1); } 50% { transform: rotate(45deg) scale(1.05); } 100% { transform: rotate(45deg) scale(1); } }


/* =========================================
   9. ARTICLE CAROUSEL
   ========================================= */
.product-grid { margin-top: 3rem; background: transparent; border: none; padding: 0; }
.product-grid h2 { text-align: center; font-family: var(--font-head); margin-bottom: 2rem; color: var(--primary); }

.carousel-container { max-width: 100%; overflow-x: hidden; position: relative; }
.tile-carousel {
  overflow-x: auto; scroll-snap-type: x mandatory; -webkit-overflow-scrolling: touch;
  scroll-padding-left: 1.5rem; width: 100%; padding-bottom: 2rem; 
}
.tile-carousel::-webkit-scrollbar { height: 8px; }
.tile-carousel::-webkit-scrollbar-thumb { background: #ccc; border-radius: 4px; }
.tile-track { display: flex; gap: 1.5rem; padding: 0.5rem 1rem; width: max-content; }
.tile-track .tool-tile { width: 320px; flex-shrink: 0; scroll-snap-align: start; }


/* =========================================
   10. UTILITY TILES (Auto-Calculated Theme)
   ========================================= */
.tool-tile.utility-tile {
  background-color: color-mix(in srgb, var(--primary), white 93%);
  border: 1px solid color-mix(in srgb, var(--primary), white 80%);
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05); 
}

/* HOVER STATE */
.tool-tile.utility-tile:hover { 
  /* Darken slightly on hover (Mix 12% Primary) */
  background-color: color-mix(in srgb, var(--primary), white 88%);
  border-color: color-mix(in srgb, var(--primary), white 70%);
  transform: translateY(-3px); 
}

/* FIXING THE CONTENTS */
.tool-tile.utility-tile .tile-label { 
  background-color: var(--primary); 
  color: #ffffff; 
  border: none; 
}

.tool-tile.utility-tile .tile-btn { 
  background-color: var(--primary); 
  color: #ffffff !important; 
  border: none; 
}

.tool-tile.utility-tile .tile-label { background-color: var(--primary); color: #ffffff; border: none; }
.tool-tile.utility-tile .tile-img { background: transparent; border-bottom: none; font-size: 3.5rem; padding-bottom: 0; }
.tool-tile.utility-tile .tile-btn { background-color: var(--primary); color: #ffffff !important; border: none; transition: filter 0.2s; }
.tool-tile.utility-tile .tile-btn:hover { filter: brightness(0.85); }

/* =========================================
   11. MODAL & FOOTER
   ========================================= */
.modal {
  display: none; position: fixed; top: 0; left: 0; right: 0; bottom: 0;
  background: rgba(0, 0, 0, 0.6); justify-content: center; align-items: center; z-index: 999;
}
.modal-content {
  background: linear-gradient(to bottom right, #ffffff, #f7f9fc);
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2); text-align: left; padding: 2rem;
  border-radius: 8px; width: 90%; max-width: 700px;
}
.modal-content h3 { font-size: 1.6rem; color: var(--primary); margin-bottom: 1rem; }
.modal-content input { width: 90%; padding: 0.75rem; margin: 0.5rem 0; border-radius: 6px; border: 1px solid #ccc; }
.modal-content button { background-color: #4B7F52; color: #FF9900; border: none; padding: 0.75rem 1.5rem; border-radius: 6px; font-weight: bold; cursor: pointer; margin-top: 1rem; }

footer {
  text-align: center; font-size: 0.85rem; color: var(--text-light); padding: 2rem 1rem;
  line-height: 1.6; background-color: #eef1f3; border-top: 1px solid #ddd; margin-top: 3rem;
}
footer a { color: var(--secondary); font-weight: 600; }

/* =========================================
   12. IN-ARTICLE PRODUCT CARDS
   ========================================= */
.product-row {
  background: var(--bg-surface);
  border: 1px solid #e0e0e0;
  border-radius: var(--radius);
  padding: 2.5rem; /* Increased padding for a premium feel */
  margin: 3rem 0;
  display: flex;
  flex-direction: column; /* Stacks Image on TOP of Text */
  align-items: center;    /* Centers everything */
  gap: 1.5rem;
  box-shadow: 0 4px 20px rgba(0,0,0,0.05); /* Softer, deeper shadow */
}

.product-row .product-img { 
    width: 100%; 
    text-align: center;
    margin-bottom: 1rem;
}
.product-row .product-img img { 
    max-width: 100%; 
    width: auto;      /* Allows it to be its natural width */
    max-height: 400px; /* Increased from 150px so it can be big & detailed */
    object-fit: contain; 
    border-radius: 8px;
}
.product-row .product-details { 
    width: 100%; 
}

.product-row h3 { 
    text-align: center;
    margin-top: 0; 
    margin-bottom: 0.5rem; 
    font-size: 1.6rem; 
    color: var(--primary); 
}

.product-row .rating-badge { /* If you add a class to the rating div */
    text-align: center;
}
.product-row .price-btn {
  display: block; /* Full width block looks better in vertical layout */
  width: fit-content;
  margin: 2rem auto 0 auto; /* Center the button */
  background-color: #f1c40f; 
  color: #333; 
  font-weight: bold;
  padding: 12px 30px; 
  border-radius: 5px; 
  text-decoration: none;
  box-shadow: 0 4px 6px rgba(0,0,0,0.1); 
  transition: transform 0.2s, filter 0.2s;
}

.product-row .price-btn:hover { 
    filter: brightness(0.95); 
    transform: translateY(-2px);
}

@media (max-width: 850px) {
    .content-wrapper {
        padding: 0.75rem;
    }
    .main-article, .blog-post {
        max-width: 100%;
        width: 100%;
        max-width: 96vw;
        padding: 0.85rem;
        box-sizing: border-box;
        margin: 0 auto;
    }
    .two-col-layout { 
        gap: 12px; 
        padding-right:0;
    }
    .product-row {
        width: 100%;
        padding: 1.1rem;
        box-sizing: border-box;
    }
    .product-row { flex-direction: column; text-align: center; }
    .product-row .product-details { text-align: left; }
    .tool-tile.featured-tile { flex-direction: column; }
    .featured-layout { flex-direction: column; }
    .featured-layout .tile-img {
        border-right: none;
        border-bottom: 1px solid #eee;
        min-height: 200px;
        max-height: 240px;
        flex-basis: auto;
    }
    .featured-layout .tile-img img {
        max-height: 100%;
        max-width: 94%;
    }
    .hero-header { padding: 4rem 1rem 5rem; height: auto; }
    .hero-header .home-brand-title {
        font-size: clamp(2rem, 8vw, 3rem);
        line-height: 1.12;
        margin-bottom: 0.55rem;
    }
    .comparison-section { margin-top: 2rem; margin-bottom: 1.25rem; }
    .featured-spotlight { margin-top: 0.9rem; }
    .quick-picks-row {
        grid-template-columns: 1fr;
        gap: 0.6rem;
    }
    .quick-picks-horizontal {
        padding: 0.9rem 0.8rem 0.95rem;
    }
    .featured-tool-tile .tile-content { padding: 1rem; }
    .breadcrumb-trail {
        margin-top: 0.75rem;
        padding: 0 0.85rem;
        font-size: 0.84rem;
    }
    .content-wrapper > .breadcrumb-trail ol {
        padding: 0.36rem 0.66rem;
    }
    .tool-page-main {
        margin: 1rem auto 2rem;
        padding: 1.1rem;
    }
    .tools-archive-page { margin: 1rem auto 2rem; }
}

/* =========================================
   13. RETENTION ASSETS (Tools)
   ========================================= */
.tool-of-moment {
  margin-top: 1.25rem;
  margin-bottom: 0.8rem;
}

.featured-tool-tile {
  max-width: 980px;
  margin: 0 auto;
  border: 1px solid #dbe7f3;
  background: linear-gradient(180deg, #ffffff, #fbfdff);
}

.featured-tool-tile .tile-label {
  position: static;
  display: inline-flex;
  align-items: center;
  width: fit-content;
  margin-bottom: 0.7rem;
  background: #123f6b;
  color: #fff;
  border-color: #123f6b;
  box-shadow: none;
}

.featured-tool-tile .tile-content {
  padding: 1.25rem 1.6rem;
}

.featured-tool-tile .tile-heading-icon {
  font-size: 1.75rem;
}

.featured-tool-tile .subtitle {
  margin: 0.1rem 0 0;
  font-size: 0.85rem;
  color: #5c6f82;
  font-weight: 600;
}

.tool-page-main {
  max-width: 980px;
  margin: 2rem auto 3rem;
  background: var(--bg-surface);
  border: 1px solid #e6edf3;
  border-radius: var(--radius);
  padding: 2rem;
  box-shadow: 0 8px 24px rgba(16, 31, 48, 0.06);
}

.tool-longtail-intro {
  margin: 0 0 1rem;
  padding: 0.8rem 1rem;
  border: 1px solid #d7e8f8;
  border-radius: 10px;
  background: #f5fafe;
  color: #3b556f;
}

.tool-intro {
  margin-bottom: 1.1rem;
}

.tool-embed-wrapper {
  margin-top: 1rem;
  padding: 1.1rem;
  border: 1px solid #e6eef6;
  border-radius: 12px;
  background: #fbfdff;
}

.tool-download-box {
  border: 1px solid #e6eef6;
  border-radius: 12px;
  background: #fbfdff;
  padding: 1.2rem;
}

.tool-download-box .large-btn {
  margin-top: 0.7rem;
}

.tool-file-size {
  margin-top: 0.6rem;
  color: #5f7183;
  font-size: 0.92rem;
}

.tools-archive-page {
  max-width: 1000px;
  margin: 2rem auto 3rem;
}

.tools-archive-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 1rem;
}

.tool-archive-card {
  background: var(--bg-surface);
  border: 1px solid #e1e8f0;
  border-radius: var(--radius);
  padding: 1rem 1.1rem 1.2rem;
  box-shadow: 0 6px 20px rgba(15, 23, 42, 0.06);
}

.tool-archive-card h2 {
  margin: 0.35rem 0 0.45rem;
  font-size: 1.28rem;
  line-height: 1.28;
}

.tool-archive-card p {
  margin-top: 0;
}

.tool-archive-type {
  display: inline-block;
  font-size: 0.74rem;
  font-weight: 700;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: #234b73;
  background: #eaf2fb;
  border: 1px solid #d4e3f2;
  border-radius: 999px;
  padding: 0.28rem 0.55rem;
}

.useful-tools-widget .sidebar-tool-summary {
  margin-top: 0.25rem;
  font-size: 0.84rem;
  color: #617486;
  line-height: 1.35;
}

@media (max-width: 600px) {
  .tools-archive-grid {
    grid-template-columns: 1fr;
  }
}

/* =========================================
   14. INTERACTIVE TOOLS (Calculators)
   ========================================= */
.calculator-widget {
  background: #fdfefe; border: 2px solid #3498db; border-radius: var(--radius);
  padding: 2rem; margin: 2rem 0; text-align: center;
  box-shadow: 0 5px 15px rgba(52, 152, 219, 0.1);
}

.calc-title { font-family: var(--font-head); color: var(--primary); margin-top: 0; }
.calc-input-group { margin: 1.5rem 0; }
.calc-input {
  padding: 10px; font-size: 1.2rem; width: 120px; text-align: center;
  border: 1px solid #bdc3c7; border-radius: 6px; margin-right: 10px;
}
.calc-result {
  background: var(--secondary); color: white; padding: 1rem; border-radius: 8px;
  margin-top: 1rem; display: none;
}
.calc-btn {
  background-color: #3498db; color: white; border: none; padding: 10px 20px;
  font-size: 1rem; border-radius: 6px; cursor: pointer; font-weight: bold; transition: filter 0.2s;
}
.calc-btn:hover { filter: brightness(0.85); }

/* =========================================
   15. ARCHIVE CONTROLS
   ========================================= */
.archive-header {
  text-align: center;
  margin-bottom: 3rem;
}

.archive-controls {
  display: flex; justify-content: space-between; align-items: center;
  background: var(--bg-surface); padding: 1.5rem 2rem; border-radius: var(--radius);
  box-shadow: 0 4px 15px rgba(0,0,0,0.05); margin-bottom: 3rem; gap: 1.5rem; border: 1px solid #eee;
}

/* Filter Buttons */
.filter-group {
  display: flex; gap: 0.8rem; flex-wrap: wrap;
}
.filter-btn {
  background: transparent; border: 1px solid #ddd; padding: 8px 20px; border-radius: 20px;
  cursor: pointer; font-family: var(--font-body); font-weight: 600; font-size: 0.9rem; color: var(--text-light);
  transition: all 0.2s ease;
}
.filter-btn:hover { border-color: var(--primary); color: var(--primary); }
.filter-btn.active { background: var(--primary); color: white; border-color: var(--primary); box-shadow: 0 4px 10px rgba(44, 62, 80, 0.2); }

/* Search Box */
.search-wrapper { position: relative; flex-grow: 1; max-width: 300px; }
.archive-search {
  width: 100%; padding: 10px 15px; padding-right: 40px; 
  border: 1px solid #ddd; border-radius: 6px; 
  font-family: var(--font-body); font-size: 0.95rem; box-sizing: border-box;
}
.archive-search:focus { outline: none; border-color: var(--secondary); box-shadow: 0 0 0 3px rgba(39, 174, 96, 0.1); }
.search-icon {
  position: absolute; right: 12px; top: 50%; transform: translateY(-50%);
  color: #999; font-size: 1.1rem; pointer-events: none;
  font-family: "Segoe UI Emoji", "Apple Color Emoji", "Noto Color Emoji", "Segoe UI Symbol", sans-serif;
}

@media (max-width: 600px) {
  .archive-controls { flex-direction: column; align-items: stretch; }
  .search-wrapper { max-width: 100%; }
  .filter-group { justify-content: center; }
}

/* =========================================
   16. PRINT STYLES
   ========================================= */
@media print {
  body * { visibility: hidden; }
  header, footer, .sidebar-widget, .product-grid, .hero-header { display: none !important; }
  .printable-area, .printable-area * { visibility: visible; }
  .printable-area { position: absolute; left: 0; top: 0; width: 100%; border: 2px solid #333; }
  .print-header { display: block !important; text-align: center; margin-bottom: 2rem; }
  body { color: black !important; background: white !important; }
}



/* =========================================
   EXIT-INTENT MODAL (Conversion Optimized)
   ========================================= */

/* Native <dialog> element resetting */
dialog.exit-intent-offer {
  background: transparent;
  border: none;
  padding: 0;
  margin: auto;
  overflow: visible;
}

/* Dim and blur the background to force focus on the modal */
dialog.exit-intent-offer::backdrop {
  background: rgba(10, 36, 99, 0.85); /* Deep blue using var(--primary) tone */
  backdrop-filter: blur(5px);
}

/* Fallback for older browsers where JavaScript uses a <div> instead of <dialog> */
div.exit-intent-offer {
  position: fixed;
  top: 0; left: 0; right: 0; bottom: 0;
  background: rgba(10, 36, 99, 0.85);
  backdrop-filter: blur(5px);
  z-index: 9999;
  display: flex;
  align-items: center;
  justify-content: center;
}

/* The actual popup container */
.exit-intent-panel {
  background: var(--bg-surface);
  border-radius: 12px;
  padding: 3rem 2.5rem;
  max-width: 480px;
  width: 90%;
  text-align: center;
  box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.3);
  position: relative;
  border-top: 6px solid var(--secondary); /* High-contrast top border to catch the eye */
  animation: popIn 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275) forwards;
}

/* Typography optimized for quick scanning */
.exit-intent-panel h3 {
  font-family: var(--font-head);
  color: var(--primary);
  font-size: 2rem;
  margin-top: 0;
  margin-bottom: 0.75rem;
  line-height: 1.2;
}

.exit-intent-panel p {
  font-size: 1.1rem;
  color: var(--text-light);
  margin-bottom: 2rem;
  line-height: 1.6;
}

.exit-intent-panel strong {
  color: var(--text-main);
}

/* High-Visibility Call To Action */
.exit-intent-panel .price-btn {
  display: block;
  width: 100%;
  background-color: var(--accent); /* Orange/Accent color for maximum contrast */
  color: #ffffff;
  font-size: 1.15rem;
  font-weight: 700;
  padding: 16px 24px;
  border-radius: 8px;
  text-decoration: none;
  box-shadow: 0 4px 15px rgba(230, 126, 34, 0.4);
  transition: transform 0.2s ease, filter 0.2s ease;
  box-sizing: border-box;
}

.exit-intent-panel .price-btn:hover {
  transform: translateY(-2px);
  filter: brightness(1.05);
}

/* Subtle, out-of-the-way close button to reduce immediate bounce */
.exit-intent-close {
  position: absolute;
  top: 15px;
  right: 15px;
  background: none;
  border: none;
  font-size: 1.8rem;
  line-height: 1;
  color: #cbd5e1;
  cursor: pointer;
  transition: color 0.2s ease;
  padding: 5px;
}

.exit-intent-close:hover {
  color: #64748b;
}

/* Smooth entrance animation */
@keyframes popIn {
  0% { transform: scale(0.9); opacity: 0; }
  100% { transform: scale(1); opacity: 1; }
}



