/* Global Reset & Typography */
* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

:root {
  --navy-dark: #102131;
  --navy-light: #274667;
  --gold: #fab938;
  --gold-dark: #d69818;
  --text-dark: #333333;
  --text-light: #ffffff;
  --bg-light: #eef0f2;
}

body {
  font-family: Arial, Helvetica, sans-serif;
  color: var(--text-dark);
  background-color: var(--bg-light);
  line-height: 1.6;
}

.container {
  width: 100%;
  max-width: 1140px;
  margin: 0 auto;
  padding: 0 20px;
}

/* Top Branding Header */
.top-bar {
  background-color: var(--navy-dark);
  padding: 20px 0;
  border-bottom: 2px solid var(--gold);
}

.logo {
  color: var(--text-light);
  font-size: 24px;
  font-weight: bold;
  text-transform: uppercase;
  letter-spacing: 1px;
}

/* Hero Section */
.hero-section {
  background: linear-gradient(to bottom, var(--navy-dark), var(--navy-light));
  padding: 60px 0;
  border-bottom: 6px solid var(--gold);
  color: var(--text-light);
}

.hero-content {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: 40px;
}

.headline {
  font-size: 42px;
  font-weight: bold;
  margin-bottom: 20px;
  line-height: 1.2;
}

.sub-headline {
  font-size: 20px;
  max-width: 800px;
  margin: 0 auto;
  color: #d1dfed;
}

.hero-media {
  width: 100%;
  max-width: 800px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 30px;
}

.video-wrapper {
  width: 100%;
  background-color: #000;
  border: 4px solid #fff;
  border-radius: 8px;
  box-shadow: 0 10px 30px rgba(0,0,0,0.5);
  overflow: hidden;
}

.video-placeholder {
  width: 100%;
  aspect-ratio: 16 / 9;
  background-color: #333;
  background-image: linear-gradient(45deg, #222 25%, transparent 25%, transparent 75%, #222 75%, #222), 
                    linear-gradient(45deg, #222 25%, transparent 25%, transparent 75%, #222 75%, #222);
  background-size: 20px 20px;
  background-position: 0 0, 10px 10px;
  display: flex;
  justify-content: center;
  align-items: center;
}

.play-btn {
  background-color: var(--gold);
  color: var(--navy-dark);
  border: none;
  border-radius: 50%;
  cursor: pointer;
  display: flex;
  justify-content: center;
  align-items: center;
  transition: transform 0.2s, background-color 0.2s;
}

.play-btn:hover {
  background-color: var(--gold-dark);
  transform: scale(1.05);
}

.video-play {
  width: 80px;
  height: 80px;
}

.cta-button {
  background-color: #0a9d09; /* Green CTA matching typical direct response styles */
  background-image: linear-gradient(to bottom, #11b710, #0a9d09);
  color: #fff;
  font-size: 24px;
  font-weight: bold;
  padding: 20px 40px;
  border: 2px solid #066a06;
  border-radius: 5px;
  box-shadow: 0 4px 6px rgba(0,0,0,0.3), inset 0 1px 0 #42b641;
  cursor: pointer;
  text-transform: uppercase;
  transition: all 0.2s;
  width: 100%;
  max-width: 500px;
}

.cta-button:hover {
  background-image: linear-gradient(to bottom, #0a9d09, #087d07);
  box-shadow: 0 2px 4px rgba(0,0,0,0.4), inset 0 1px 0 #2a962a;
}

/* Main Content Section */
.main-content {
  background-color: #ffffff;
  padding: 60px 0;
  min-height: 500px;
}

.section-title {
  font-size: 28px;
  color: var(--navy-dark);
  margin-bottom: 20px;
  font-weight: bold;
}

.border-bottom {
  border-bottom: 3px solid var(--gold);
  padding-bottom: 10px;
}

/* Audio Player */
.audio-container {
  margin-bottom: 40px;
  background-color: var(--bg-light);
  padding: 30px;
  border-radius: 8px;
  border: 1px solid #ccc;
}

.audio-player {
  display: flex;
  align-items: center;
  gap: 20px;
  background-color: #fff;
  padding: 15px 25px;
  border-radius: 50px;
  border: 1px solid #ccc;
  box-shadow: 0 2px 5px rgba(0,0,0,0.05);
}

.audio-play {
  width: 50px;
  height: 50px;
  background-color: var(--navy-dark);
  color: #fff;
}

.audio-play:hover {
  background-color: var(--navy-light);
}

.audio-timeline {
  flex-grow: 1;
  height: 8px;
  background-color: #e0e0e0;
  border-radius: 4px;
  position: relative;
}

.audio-progress {
  position: absolute;
  top: 0;
  left: 0;
  height: 100%;
  width: 30%;
  background-color: var(--gold);
  border-radius: 4px;
}

.audio-progress::after {
  content: '';
  position: absolute;
  right: -8px;
  top: -4px;
  width: 16px;
  height: 16px;
  background-color: var(--navy-dark);
  border-radius: 50%;
  box-shadow: 0 1px 3px rgba(0,0,0,0.3);
}

/* Summary Box */
.summary-box {
  background-color: #fff;
  border: 2px solid var(--navy-light);
  border-radius: 8px;
  padding: 30px;
  margin-bottom: 50px;
  box-shadow: 0 4px 15px rgba(0,0,0,0.05);
}

.summary-list {
  list-style: none;
}

.summary-list li {
  position: relative;
  padding-left: 30px;
  margin-bottom: 15px;
  font-size: 18px;
}

.summary-list li::before {
  content: '✓';
  position: absolute;
  left: 0;
  top: 0;
  color: #0a9d09;
  font-weight: bold;
  font-size: 20px;
}

/* Ebook Content */
.ebook-text {
  max-width: 900px;
  margin: 0 auto;
}

.chapter {
  margin-bottom: 40px;
}

.chapter h3 {
  font-size: 24px;
  color: var(--navy-light);
  margin-bottom: 15px;
}

.chapter p {
  font-size: 18px;
  margin-bottom: 15px;
  color: #444;
}

.chapter ul {
  margin-left: 20px;
  margin-bottom: 15px;
}

.chapter li {
  font-size: 18px;
  margin-bottom: 10px;
  color: #444;
}

/* Footer */
.footer {
  background-color: var(--navy-dark);
  color: #8fa5ba;
  text-align: center;
  padding: 30px 0;
  font-size: 14px;
}

/* Responsive */
@media (max-width: 768px) {
  .headline {
    font-size: 32px;
  }
  .sub-headline {
    font-size: 18px;
  }
  .audio-player {
    flex-direction: column;
    border-radius: 10px;
  }
  .audio-timeline {
    width: 100%;
  }
}

/* --- OPG Guides Ebook Layout --- */
.guide-container {
  display: flex;
  flex-direction: column;
  gap: 30px;
  margin-top: 40px;
}

@media (min-width: 900px) {
  .guide-container {
    flex-direction: row;
    align-items: flex-start;
  }
}

.guide-sidebar {
  flex: 0 0 280px;
  background-color: #f8fafc;
  border-radius: 8px;
  border: 1px solid #e2e8f0;
  padding: 20px;
  position: sticky;
  top: 20px;
  max-height: calc(100vh - 40px);
  overflow-y: auto;
}

.guide-sidebar-header {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 16px;
  font-weight: bold;
  color: #1B2D3F;
  margin-bottom: 15px;
  border-bottom: 2px solid #F45300;
  padding-bottom: 10px;
}

.guide-toc-list {
  list-style: none;
  padding: 0;
  margin: 0;
}

.guide-toc-list li {
  margin-bottom: 10px;
}

.guide-toc-list a {
  text-decoration: none;
  color: #475569;
  font-size: 14px;
  line-height: 1.4;
  display: block;
  transition: color 0.2s;
}

.guide-toc-list a:hover {
  color: #F45300;
}

.guide-main-content {
  flex: 1;
  min-width: 0;
}

.guide-main-content .ebook-text {
  background: transparent;
  box-shadow: none;
  padding: 0;
}

.guide-main-content h3 {
  font-size: 22px;
  color: #1B2D3F;
  margin-top: 30px;
  margin-bottom: 15px;
  scroll-margin-top: 20px;
}

.guide-main-content p {
  font-size: 17px;
  line-height: 1.7;
  color: #334155;
  margin-bottom: 20px;
}

.guide-main-content ul {
  margin-bottom: 20px;
  padding-left: 20px;
}

.guide-main-content li {
  font-size: 17px;
  line-height: 1.7;
  color: #334155;
  margin-bottom: 8px;
}

/* Table Styles */
.guide-table {
  width: 100%;
  border-collapse: collapse;
  margin-top: 20px;
  margin-bottom: 30px;
  font-size: 16px;
}
.guide-table th, .guide-table td {
  border: 1px solid #e2e8f0;
  padding: 12px 16px;
  text-align: left;
}
.guide-table th {
  background-color: #f1f5f9;
  color: #1B2D3F;
  font-weight: 600;
}
.guide-table tr:nth-child(even) {
  background-color: #f8fafc;
}

/* Additional Mobile Responsive Fixes */
@media (max-width: 768px) {
  .guide-table {
    display: block;
    width: 100%;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
  }
  
  .guide-table th, .guide-table td {
    white-space: nowrap; /* Prevents text from wrapping and breaking table layout on small screens */
  }

  .guide-sidebar {
    position: static; /* Disable sticky on mobile so it scrolls naturally */
    max-height: 400px; /* Prevent it from taking too much vertical space */
  }
  
  .hero-content {
    gap: 20px;
  }
  
  .summary-box {
    padding: 20px;
  }
}

/* Global Overflow Fix */
html, body {
  overflow-x: clip;
  width: 100%;
  max-width: 100vw;
}

img {
  max-width: 100%;
}

.top-logo {
  height: 45px;
  max-width: 100%;
  object-fit: contain;
}

/* Ensure long words or URLs break */
p, li, h1, h2, h3, h4, h5, h6, a {
  word-wrap: break-word;
  overflow-wrap: break-word;
}

/* Bulletproof Mobile Fixes */
@media (max-width: 768px) {
  * {
    box-sizing: border-box !important;
  }
  
  html, body {
    width: 100% !important;
    max-width: 100vw !important;
    overflow-x: clip !important;
    margin: 0 !important;
    padding: 0 !important;
  }
  
  .container {
    width: 100% !important;
    max-width: 100vw !important;
    padding: 0 15px !important;
    overflow: clip !important;
  }
  
  .hero-content, .hero-text, .hero-media, .sub-headline, .headline, .video-wrapper {
    width: 100% !important;
    max-width: 100% !important;
  }
  
  .cta-button {
    width: 100% !important;
    max-width: 100% !important;
    padding: 15px 20px !important;
    font-size: 18px !important;
    white-space: normal !important; /* Allow button text to wrap */
    height: auto !important;
  }
  
  .headline {
    font-size: 28px !important;
    line-height: 1.3 !important;
    word-wrap: break-word !important;
  }
  
  .sub-headline {
    font-size: 16px !important;
    line-height: 1.5 !important;
  }
}

/* TOC Dropdown Styles */
.guide-sidebar-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  cursor: pointer;
  list-style: none; /* Hide default triangle */
  user-select: none;
}
.guide-sidebar-header::-webkit-details-marker {
  display: none;
}
.guide-toc-details .chevron-icon {
  transition: transform 0.3s ease;
  transform: rotate(-90deg); /* Point right when closed */
}
.guide-toc-details[open] .chevron-icon {
  transform: rotate(0deg); /* Point down when open */
}

/* Mobile Sticky TOC Fix */
@media (max-width: 768px) {
  .guide-sidebar {
    flex: none !important; /* Fix the 280px fixed height issue */
    width: 100% !important;
    position: sticky !important;
    top: 5px !important;
    z-index: 100 !important;
    max-height: 60vh !important; /* Allow scrolling inside TOC if it's too long */
    overflow-y: auto !important;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1) !important;
  }
}

/* Ensure sticky header doesn't overlap titles when scrolled to */
@media (max-width: 768px) {
  .guide-main-content h3, 
  .guide-main-content h2,
  *[id] {
    scroll-margin-top: 110px !important; 
  }
}

/* Trust Section Styles */
.trust-section {
  background-color: #ffffff;
  padding-top: 40px;
  padding-bottom: 0;
}

.trust-logos {
  max-width: 1000px;
  margin: 0 auto 80px auto; /* 80px bottom margin gives space for the overlapping head */
  padding: 0 20px;
}

.trust-logos img {
  width: 100%;
  height: auto;
  display: block;
}

.trust-quote-banner {
  background: linear-gradient(to bottom, #1A314A, #0C1A28);
  position: relative;
  padding: 40px 0;
  border-top: 3px solid #1A314A;
  border-bottom: 3px solid #0C1A28;
}

.trust-quote-container {
  max-width: 1140px;
  margin: 0 auto;
  position: static; /* Let portrait position relative to banner */
}

.trust-quote-text {
  color: #ffffff;
  font-size: 28px;
  font-weight: 500;
  line-height: 1.4;
  padding: 0 350px 0 40px; /* Right padding to avoid portrait */
  position: relative;
  z-index: 2;
}

.trust-quote-text .highlight {
  color: #fab938;
  font-weight: bold;
  font-style: italic;
}

.quote-author {
  display: block;
  font-size: 22px;
  font-style: italic;
  font-weight: bold;
  margin-top: 15px;
  text-align: right;
}

.trust-portrait {
  position: absolute;
  right: 10%;
  bottom: 0;
  width: 320px; /* adjust based on the actual image */
  z-index: 1;
  pointer-events: none;
}

.trust-portrait img {
  width: 100%;
  display: block;
  height: auto;
}

@media (max-width: 768px) {
  .trust-section {
    margin: 20px 15px;
    border: 1px solid #c0cdd6;
    border-radius: 8px;
    overflow: hidden;
  }
  .trust-logos {
    margin-bottom: 30px;
    padding: 20px 15px 0 15px;
  }
  .trust-quote-banner {
    padding: 25px 0 20px 0;
    margin-top: 0;
    border-top: none; /* Looks like there is no border-top in screenshot, or maybe a subtle one */
  }
  .trust-quote-container {
    flex-direction: row;
    align-items: flex-end;
  }
  .trust-quote-text {
    width: 60%;
    padding: 0 10px 0 20px;
    font-size: 16px;
    text-align: left;
    margin-bottom: 0;
  }
  .trust-quote-text p {
    margin-bottom: 0;
  }
  .quote-author {
    text-align: left;
    padding-right: 0;
    margin-top: 10px;
    font-size: 16px;
  }
  .quote-author::before {
    content: "- ";
  }
  .trust-portrait {
    position: absolute;
    right: -10px;
    bottom: 0;
    width: 45%;
    margin: 0;
  }
}

/* Video Note Styles */
.video-note {
  color: rgba(255, 255, 255, 0.8);
  font-size: 15px;
  text-align: center;
  margin-top: 20px;
  line-height: 1.5;
  max-width: 600px;
  margin-left: auto;
  margin-right: auto;
  font-style: italic;
}

/* Podcast Note Styles */
.podcast-note {
  margin-top: 15px;
  font-size: 15px;
  color: #64748b;
  text-align: center;
  font-style: italic;
  line-height: 1.5;
}

/* Center podcast title on mobile */
@media (max-width: 768px) {
  .audio-container .section-title {
    text-align: center;
  }
}

/* Pre-Video Section Styles */
.pre-video-section {
  background-color: #ffffff;
  padding: 50px 20px;
  color: #1B2D3F;
}
.pre-video-section .container {
  max-width: 1100px;
  margin: 0 auto;
}
.dark-headline {
  font-size: 38px;
  font-weight: 800;
  text-align: center;
  color: #0F172A;
  margin-bottom: 10px;
  line-height: 1.2;
}
.dark-sub-headline {
  font-size: 24px;
  font-style: italic;
  text-align: center;
  color: #334155;
  margin-bottom: 50px;
}
.pre-video-grid {
  display: flex;
  gap: 50px;
  align-items: flex-start;
}
.pre-video-text {
  flex: 1;
  font-size: 18px;
  line-height: 1.7;
  color: #1e293b;
}
.pre-video-text p {
  margin-bottom: 22px;
}
.pre-video-text strong {
  font-weight: 800;
  color: #0F172A;
}
.pre-video-cta {
  width: 350px;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
}
.mobile-cta-top {
  display: flex;
  flex-direction: column;
  align-items: center;
}
.mobile-cta-top .blue-quote {
  order: -1;
  font-size: 22px;
  color: #1e40af;
  font-style: italic;
  font-weight: 700;
  margin-bottom: 20px;
  line-height: 1.4;
}
.mobile-cta-top .ebook-cover-img {
  width: 100%;
  max-width: 280px;
  height: auto;
  margin-bottom: 25px;
  filter: drop-shadow(0px 10px 15px rgba(0,0,0,0.2));
}
.green-button {
  background-color: #16a34a;
  color: white;
  font-size: 22px;
  font-weight: bold;
  border: none;
  border-radius: 6px;
  padding: 18px 30px;
  width: 100%;
  cursor: pointer;
  box-shadow: 0 6px 12px rgba(22, 163, 74, 0.3);
  transition: transform 0.2s, background-color 0.2s;
}
.green-button:hover {
  background-color: #15803d;
  transform: translateY(-2px);
}

/* Mobile styles for pre-video section */
@media (max-width: 768px) {
  .pre-video-section {
    padding: 30px 15px;
  }
  .dark-headline {
    font-size: 28px;
  }
  .dark-sub-headline {
    font-size: 18px;
    margin-bottom: 30px;
  }
  .pre-video-grid {
    flex-direction: column;
    gap: 30px;
  }
  .pre-video-cta {
    width: 100%;
    order: -1; /* Put CTA above text */
  }
  .mobile-cta-top {
    flex-direction: row;
    justify-content: center;
    gap: 15px;
    margin-bottom: 20px;
    align-items: center;
  }
  .mobile-cta-top .ebook-cover-img {
    width: 45%;
    max-width: 200px;
    margin-bottom: 0;
    order: 0;
  }
  .mobile-cta-top .blue-quote {
    order: 1;
    font-size: 16px;
    margin-bottom: 0;
    text-align: left;
    flex: 1;
  }
  .green-button {
    margin-bottom: 20px;
  }
}

/* Summary Content Styles */
.summary-content h3 {
  font-size: 20px;
  color: #1e3a8a; /* Using a nice dark blue matching the theme instead of orange */
  margin-top: 30px;
  margin-bottom: 15px;
  border-bottom: 2px solid #e2e8f0;
  padding-bottom: 8px;
}
.summary-content h3:first-child {
  margin-top: 10px;
}
.summary-content ul {
  list-style-type: none;
  padding-left: 0;
  margin-bottom: 20px;
}
.summary-content > ul > li {
  position: relative;
  padding-left: 24px;
  font-size: 16px;
  color: #334155;
  margin-bottom: 12px;
  line-height: 1.6;
}
.summary-content > ul > li::before {
  content: "✓";
  position: absolute;
  left: 0;
  color: #16a34a;
  font-weight: bold;
}
.summary-content li ul {
  list-style-type: circle;
  padding-left: 24px;
  margin-top: 8px;
  margin-bottom: 0;
}
.summary-content li ul li {
  padding-left: 0;
  margin-bottom: 6px;
}
.summary-content li ul li::before {
  content: none;
}

/* Accordion Styles for Summary */
.summary-details {
  border-bottom: 2px solid #e2e8f0;
  margin-bottom: 5px;
  background-color: #f8fafc; /* light background to make it look like a card */
  border-radius: 6px;
  overflow: hidden;
}
.summary-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  cursor: pointer;
  list-style: none; 
  padding: 15px 20px;
  background-color: #ffffff;
  transition: background-color 0.2s;
}
.summary-header:hover {
  background-color: #f1f5f9;
}
.summary-header::-webkit-details-marker {
  display: none; 
}
.summary-header h3 {
  border-bottom: none; 
  margin: 0;
  flex: 1;
  font-size: 18px; /* Slightly smaller to fit nicely in one line */
  padding-bottom: 0;
}
.summary-details .chevron-icon {
  transition: transform 0.3s ease;
  min-width: 24px;
}
.summary-details[open] .chevron-icon {
  transform: rotate(180deg);
}
.summary-body {
  padding: 20px;
  border-top: 1px solid #e2e8f0;
}
/* Override previous margin */
.summary-content > ul {
    margin-bottom: 0;
}

/* Custom Multi-Video Player Styles */
.custom-video-player {
  position: relative;
  width: 100%;
  border-radius: 12px;
  overflow: hidden;
  box-shadow: 0 10px 25px rgba(0,0,0,0.3);
  background: #000;
  margin-bottom: 20px;
}
.video-iframe-container {
  position: relative;
  width: 100%;
  padding-bottom: 56.25%; /* 16:9 aspect ratio */
}
.video-iframe-container iframe {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  border: none;
}
.segmented-progress-bar {
  position: relative;
  width: 100%;
  padding: 15px 10px;
  display: flex;
  gap: 6px;
  background: #111; /* Solid dark background to distinguish from video */
  z-index: 10;
  border-top: 1px solid #333; /* subtle separator */
}
.progress-segment-wrapper {
  flex: 1;
  cursor: pointer;
  padding: 5px 0; /* Increase clickable area */
  position: relative;
}
.progress-segment {
  width: 100%;
  height: 4px;
  background-color: rgba(255, 255, 255, 0.3);
  border-radius: 2px;
  overflow: hidden;
  transition: height 0.2s;
}
.progress-segment-wrapper:hover .progress-segment {
  height: 6px;
  background-color: rgba(255, 255, 255, 0.4);
}
.segment-fill {
  height: 100%;
  width: 0%;
  background-color: #ed1c24; /* Red color matching branding */
  border-radius: 2px;
  /* Remove transition to allow smooth dragging/seeking */
  pointer-events: none; 
}
.video-tooltip {
  position: absolute;
  background-color: rgba(0, 0, 0, 0.9);
  color: white;
  padding: 8px 14px;
  border-radius: 6px;
  font-size: 14px;
  font-weight: bold;
  pointer-events: none;
  opacity: 0;
  transition: opacity 0.2s;
  white-space: nowrap;
  z-index: 20;
  transform: translateX(-50%);
  box-shadow: 0 4px 6px rgba(0,0,0,0.3);
  border: 1px solid rgba(255,255,255,0.1);
}

/* Lead Popup Modal */
.lead-popup-overlay {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.6);
  z-index: 9999;
  justify-content: center;
  align-items: center;
  padding: 15px;
}
.lead-popup-overlay.active {
  display: flex;
}
.lead-popup-modal {
  background: white;
  width: 100%;
  max-width: 500px;
  border-radius: 4px;
  padding: 25px 20px;
  position: relative;
  text-align: center;
  box-shadow: 0 5px 30px rgba(0,0,0,0.3);
  font-family: Arial, sans-serif;
  border: 1px solid #ccc; 
}
.lead-popup-close {
  position: absolute;
  top: 10px;
  right: 15px;
  font-size: 28px;
  background: none;
  border: none;
  cursor: pointer;
  line-height: 1;
  color: #000;
  font-weight: bold;
}
.lead-popup-intro {
  font-size: 14px;
  color: #000;
  margin-bottom: 5px;
  line-height: 1.4;
  padding: 0 20px;
}
.lead-popup-image {
  text-align: center;
}
.lead-popup-image img {
  width: 180px;
  height: auto;
  margin: 0 auto;
  display: block;
  margin-bottom: -5px; 
  position: relative;
  z-index: 1;
}
.lead-popup-banner {
  background-color: #00c853; /* Vibrant Green */
  color: #000;
  padding: 10px 15px;
  margin-bottom: 20px;
  position: relative;
  z-index: 2;
}
.lead-popup-banner h2 {
  margin: 0;
  font-size: 20px;
  font-weight: bold;
  line-height: 1.2;
}
.lead-popup-question {
  font-size: 14px;
  color: #000;
  margin-bottom: 25px;
}
.lead-popup-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 15px;
  text-align: left;
  margin-bottom: 30px;
  padding: 0 10px;
}
@media (max-width: 480px) {
  .lead-popup-grid {
    grid-template-columns: 1fr;
  }
}
.custom-checkbox-label {
  display: flex;
  align-items: flex-start;
  font-size: 13px;
  color: #000;
  cursor: pointer;
  line-height: 1.3;
}
.custom-checkbox-label input {
  display: none; 
}
.custom-checkbox {
  width: 20px;
  height: 20px;
  border: 1px solid #999;
  background: white;
  margin-right: 10px;
  display: inline-flex;
  justify-content: center;
  align-items: center;
  flex-shrink: 0;
  border-radius: 2px;
}
.custom-checkbox-label input:checked + .custom-checkbox {
  /* Checked state */
}
.custom-checkbox-label input:checked + .custom-checkbox::after {
  content: '✔';
  color: #00c853;
  font-size: 16px;
  font-weight: bold;
}
.lead-popup-submit {
  background: linear-gradient(to bottom, #ffeb3b, #ff9800);
  border: 1px solid #b26a00;
  color: #000;
  font-weight: bold;
  font-size: 16px;
  padding: 12px 30px;
  border-radius: 4px;
  cursor: pointer;
  box-shadow: 0 2px 5px rgba(0,0,0,0.2);
  width: 80%;
  max-width: 300px;
  transition: opacity 0.2s;
  margin-bottom: 10px;
}
.lead-popup-submit:hover {
  opacity: 0.9;
}

.lead-popup-never-show {
  display: block;
  font-size: 13px;
  color: #666;
  text-decoration: underline;
  margin-top: 10px;
  cursor: pointer;
}
.lead-popup-never-show:hover {
  color: #000;
}

/* Loan Popup Modal */
.loan-popup-overlay {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.6);
  z-index: 10000;
  justify-content: center;
  align-items: center;
  padding: 15px;
}
.loan-popup-overlay.active {
  display: flex;
}
.loan-popup-modal {
  background: white;
  width: 100%;
  max-width: 550px;
  border-radius: 4px;
  padding: 30px 25px;
  position: relative;
  text-align: center;
  box-shadow: 0 5px 30px rgba(0,0,0,0.3);
  font-family: Arial, sans-serif;
  border: 1px solid #ccc;
}
.loan-popup-close {
  position: absolute;
  top: 10px;
  right: 15px;
  font-size: 28px;
  background: none;
  border: none;
  cursor: pointer;
  line-height: 1;
  color: #000;
  font-weight: bold;
}
.loan-popup-intro {
  font-size: 11px;
  color: #666;
  margin-bottom: 20px;
  line-height: 1.4;
  padding: 0 20px;
}
.loan-popup-title {
  font-size: 28px;
  font-weight: bold;
  color: #000;
  margin: 0 0 15px 0;
  line-height: 1.2;
}
.loan-popup-subtitle {
  font-size: 22px;
  color: #000;
  margin: 0 0 5px 0;
}
.loan-popup-rate {
  font-size: 56px;
  font-weight: bold;
  color: #009e45; 
  margin: 0 0 20px 0;
  line-height: 1;
}
.loan-popup-content {
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 25px;
  gap: 20px;
}
.loan-popup-image {
  flex: 0 0 160px;
}
.loan-popup-image img {
  width: 100%;
  height: auto;
  display: block;
}
.loan-popup-bullets {
  flex: 1;
  text-align: left;
}
.loan-popup-bullets ul {
  list-style: none;
  padding: 0;
  margin: 0;
}
.loan-popup-bullets li {
  font-size: 14px;
  color: #000;
  margin-bottom: 15px;
  display: flex;
  align-items: flex-start;
  line-height: 1.4;
}
.loan-tick {
  color: #00c853;
  font-size: 20px;
  font-weight: bold;
  margin-right: 10px;
  line-height: 1;
}
.loan-popup-submit {
  display: inline-block;
  background: linear-gradient(to bottom, #ffeb3b, #ff9800);
  border: 1px solid #b26a00;
  color: #000;
  font-weight: bold;
  font-size: 24px;
  padding: 15px 30px;
  border-radius: 6px;
  cursor: pointer;
  box-shadow: 0 4px 6px rgba(0,0,0,0.2);
  width: 100%;
  max-width: 400px;
  text-decoration: none;
  transition: transform 0.1s, box-shadow 0.1s;
  margin-bottom: 15px;
}
.loan-popup-submit:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 12px rgba(0,0,0,0.3);
  color: #000;
}
.loan-popup-footer-text {
  font-size: 12px;
  color: #000;
  margin: 0 0 10px 0;
}
.loan-popup-never-show {
  font-size: 13px;
  color: #000;
  text-decoration: underline;
  cursor: pointer;
}
.loan-popup-never-show:hover {
  color: #666;
}
@media (max-width: 500px) {
  .loan-popup-content {
    flex-direction: column;
  }
  .loan-popup-image {
    flex: 0 0 120px;
    margin-bottom: 15px;
  }
}

/* Responsive Modal Fixes */
.lead-popup-overlay, .loan-popup-overlay {
  align-items: flex-start !important; /* Allow top alignment for scrolling */
  overflow-y: auto !important;
  padding: 40px 15px !important; /* Give some breathing room at top/bottom */
}
.lead-popup-modal, .loan-popup-modal {
  margin: auto !important; /* Centers when smaller than viewport, scrolls when larger */
}

/* Mobile Specific Adjustments */
@media (max-width: 500px) {
  /* Lead Popup Mobile */
  .lead-popup-modal {
    padding: 25px 15px !important;
  }
  .lead-popup-banner h2 {
    font-size: 18px !important;
  }
  .lead-popup-grid {
    grid-template-columns: 1fr !important;
    gap: 12px !important;
    margin-bottom: 20px !important;
  }
  .lead-popup-image img {
    width: 140px !important;
  }
  
  /* Loan Popup Mobile */
  .loan-popup-modal {
    padding: 30px 15px 20px 15px !important;
  }
  .loan-popup-intro {
    font-size: 10px !important;
    margin-bottom: 15px !important;
  }
  .loan-popup-title {
    font-size: 22px !important;
    margin-bottom: 10px !important;
  }
  .loan-popup-subtitle {
    font-size: 18px !important;
  }
  .loan-popup-rate {
    font-size: 42px !important;
    margin-bottom: 15px !important;
  }
  .loan-popup-content {
    flex-direction: column !important;
    gap: 10px !important;
    margin-bottom: 15px !important;
  }
  .loan-popup-image {
    flex: 0 0 auto !important;
    margin-bottom: 0 !important;
  }
  .loan-popup-image img {
    max-height: 140px !important;
    width: auto !important;
    margin: 0 auto !important;
  }
  .loan-popup-bullets li {
    font-size: 13px !important;
    margin-bottom: 8px !important;
  }
  .loan-popup-submit {
    font-size: 20px !important;
    padding: 12px 20px !important;
    margin-bottom: 10px !important;
  }
  .loan-popup-close {
    top: 5px !important;
    right: 10px !important;
  }
}

/* Fix for very small height screens (landscape mobile) */
@media (max-height: 600px) {
  .lead-popup-overlay, .loan-popup-overlay {
    padding: 15px !important;
  }
  .loan-popup-image img, .lead-popup-image img {
    max-height: 100px !important;
  }
}

/* Fix gap between image and button in Loan Popup */
.loan-popup-content {
    margin-bottom: 0 !important; /* Remove the 25px gap */
}
.loan-popup-image {
    margin-bottom: -5px !important; /* Pull the image slightly down to touch the button, overcoming any transparent padding in the PNG */
    position: relative;
    z-index: 5; /* Ensure image sits ON TOP of the button if it overlaps */
}
.loan-popup-submit {
    position: relative;
    z-index: 1; /* Button stays below the image */
    margin-top: 0 !important;
}
.loan-popup-bullets {
    margin-bottom: 15px !important; /* Ensure bullets still have some breathing room above the button */
}

/* On mobile, the flex-direction is column, so the image is above the bullets. We need to handle that carefully. */
@media (max-width: 500px) {
  .loan-popup-image {
      margin-bottom: 0 !important; /* reset for mobile where it's stacked above bullets */
  }
}

/* --- PERFECT LAYOUT MATCH --- */
@media (min-width: 501px) {
  .loan-popup-modal {
    max-width: 550px !important;
    padding: 40px 40px 20px 40px !important;
  }
  .loan-popup-title {
    font-size: 32px !important;
    margin-bottom: 25px !important;
    padding: 0 20px !important;
  }
  .loan-popup-subtitle {
    font-size: 24px !important;
    margin-bottom: 10px !important;
  }
  .loan-popup-rate {
    font-size: 64px !important;
    margin-bottom: 10px !important;
  }
  .loan-popup-content {
    display: flex !important;
    align-items: flex-end !important; /* Bottom align image and bullets */
    margin-bottom: 0 !important;
    gap: 0 !important; /* Control spacing carefully */
  }
  .loan-popup-image {
    flex: 0 0 240px !important; /* Exact width to match proportion */
    margin-bottom: -4px !important; /* Flush with button */
    margin-right: 15px !important;
    position: relative;
    z-index: 5;
  }
  .loan-popup-image img {
    width: 100% !important;
    display: block !important;
  }
  .loan-popup-bullets {
    flex: 1 !important;
    margin-bottom: 30px !important; /* Push bullets up from the button */
  }
  .loan-popup-bullets li {
    font-size: 15px !important;
    margin-bottom: 18px !important;
    line-height: 1.3 !important;
  }
  .loan-tick {
    font-size: 22px !important;
    margin-right: 12px !important;
  }
  .loan-popup-submit {
    display: block !important;
    width: 100% !important;
    max-width: none !important;
    font-size: 32px !important;
    padding: 18px 0 !important;
    border-radius: 8px !important;
    margin-bottom: 20px !important;
    box-sizing: border-box !important;
  }
  .loan-popup-footer-text {
    margin-bottom: 15px !important;
    font-size: 11px !important;
    color: #333 !important;
  }
  .loan-popup-never-show {
    font-size: 14px !important;
    font-weight: bold !important;
  }
}

/* Fix z-index: Button on top of portrait */
.loan-popup-image {
    z-index: 1 !important;
}
.loan-popup-submit {
    z-index: 5 !important;
    position: relative !important; /* Ensure z-index takes effect */
}

/* --- Smart YouTube Link Blockers --- */
.yt-blocker {
  position: absolute;
  z-index: 10;
}
#yt-blocker-center {
  cursor: pointer;
}

/* DESKTOP (Full size) */
@media (min-width: 501px) {
  #yt-blocker-top-left {
    top: 0; left: 0; width: 80%; height: 60px;
  }
  #yt-blocker-center {
    top: 60px; left: 0; width: calc(100% - 80px); height: calc(100% - 60px);
  }
  /* On Desktop, Fullscreen is often hovering above the logo. So we cover the logo at right:0, but keep height small (50px). */
  #yt-blocker-bottom-right {
    bottom: 0; right: 0; width: 120px; height: 50px;
  }
}

/* MOBILE (Small screens) */
@media (max-width: 500px) {
  #yt-blocker-top-left {
    top: 0; left: 0; width: 70%; height: 50px;
  }
  #yt-blocker-center {
    top: 50px; left: 0; width: calc(100% - 50px); height: calc(100% - 50px);
  }
  /* On Mobile, Fullscreen is often in the exact bottom-right corner next to the logo. 
     So we leave 45px on the right open for Fullscreen, and block the logo to its left. */
  #yt-blocker-bottom-right {
    bottom: 0; right: 45px; width: 70px; height: 40px;
  }
}

/* --- MINIMAL YOUTUBE LOGO BLOCKER --- */
/* Hide all other blockers if they still exist in DOM somehow */
#yt-blocker-top-left, #yt-blocker-center {
  display: none !important;
}

#yt-blocker-bottom-right {
  position: absolute !important;
  z-index: 100 !important;
  /* background: rgba(255, 0, 0, 0.4);  Uncomment to debug exact position */
}

/* DESKTOP: Fullscreen is ABOVE the logo */
@media (min-width: 501px) {
  #yt-blocker-bottom-right {
    bottom: 5px !important; 
    right: 15px !important; 
    width: 90px !important; 
    height: 35px !important;
  }
}

/* MOBILE: Fullscreen is NEXT TO the logo on the right */
@media (max-width: 500px) {
  #yt-blocker-bottom-right {
    bottom: 5px !important; 
    right: 55px !important; /* Leave 55px for the Fullscreen button */
    width: 80px !important; 
    height: 35px !important;
  }
}

/* --- MOBILE: REVERT TO NATIVE --- */
/* The user requested to revert mobile completely to its original state */
@media (max-width: 500px) {
  #yt-blocker-bottom-right {
    display: none !important; /* Hide the blocker entirely on mobile */
  }
}

/* --- 2 SMART YOUTUBE LINK BLOCKERS (ALL DEVICES) --- */
#yt-blocker-top-left {
  position: absolute !important;
  display: block !important;
  z-index: 100 !important;
  top: 0 !important;
  left: 0 !important;
  width: 70% !important; /* Leaves 30% on the right for Volume, CC, Settings */
  height: 60px !important;
}

#yt-blocker-bottom-right {
  position: absolute !important;
  display: block !important;
  z-index: 100 !important;
  bottom: 5px !important;
  right: 10px !important;
  width: 90px !important;
  height: 40px !important; /* Low height so it doesn't cover the Fullscreen button above it */
}

/* Ensure no display:none overrides this on mobile */
@media (max-width: 500px) {
  #yt-blocker-bottom-right {
    display: block !important;
  }
}
