/* ==========================================================================
   Clarity Compare - Blogs Listing Page Stylesheet
   ========================================================================== */

:root {
  --primary: #2563EB;
  --primary-hover: #1D4ED8;
  --dark-slate: #0F172A;
  --text-main: #1E293B;
  --text-muted: #64748B;
  --bg-light: #F8FAFC;
  --card-bg: #FFFFFF;
  --border-color: #E2E8F0;
  --font-family: 'Poppins', sans-serif;
  --shadow-sm: 0 1px 3px rgba(0,0,0,0.05);
  --shadow-md: 0 4px 6px -1px rgba(0,0,0,0.07), 0 2px 4px -1px rgba(0,0,0,0.04);
  --shadow-lg: 0 20px 25px -5px rgba(0,0,0,0.08), 0 10px 10px -5px rgba(0,0,0,0.03);
}

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

body {
  font-family: var(--font-family);
  background-color: var(--bg-light);
  color: var(--text-main);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

a {
  text-decoration: none;
  color: inherit;
}

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

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

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

.brand-logo {
  height: 44px;
  width: auto;
}

.quotezone-partner {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  font-size: 0.8rem;
  color: #64748B;
  font-weight: 500;
}

.quotezone-logo {
  height: 22px;
  width: auto;
}

/* Listing Hero Section */
.blogs-hero {
  background: linear-gradient(135deg, #0F172A 0%, #1E3A8A 50%, #2563EB 100%);
  color: #FFFFFF;
  padding: 4.5rem 0 4rem 0;
  text-align: center;
  position: relative;
  overflow: hidden;
}

.blogs-hero::before {
  content: '';
  position: absolute;
  top: -50%;
  left: -50%;
  width: 200%;
  height: 200%;
  background: radial-gradient(circle, rgba(255,255,255,0.05) 0%, transparent 60%);
  pointer-events: none;
}

.hero-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  background: rgba(255, 255, 255, 0.15);
  backdrop-filter: blur(8px);
  padding: 0.4rem 1.25rem;
  border-radius: 9999px;
  font-size: 0.85rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin-bottom: 1.25rem;
  border: 1px solid rgba(255, 255, 255, 0.2);
}

.hero-title {
  font-size: 2.75rem;
  font-weight: 800;
  line-height: 1.2;
  margin-bottom: 1rem;
  letter-spacing: -0.02em;
}

.hero-subtitle {
  font-size: 1.15rem;
  color: #E2E8F0;
  max-width: 680px;
  margin: 0 auto;
  font-weight: 400;
  line-height: 1.6;
}

/* Category Filter Tabs */
.filter-container {
  margin-top: -1.75rem;
  margin-bottom: 3rem;
  position: relative;
  z-index: 10;
}

.filter-pills {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 0.75rem;
  flex-wrap: wrap;
  background: #FFFFFF;
  padding: 0.75rem 1rem;
  border-radius: 9999px;
  box-shadow: var(--shadow-md);
  border: 1px solid var(--border-color);
  max-width: max-content;
  margin: 0 auto;
}

.filter-btn {
  background: transparent;
  border: none;
  padding: 0.5rem 1.25rem;
  border-radius: 9999px;
  font-family: inherit;
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--text-muted);
  cursor: pointer;
  transition: all 0.25s ease;
}

.filter-btn.active,
.filter-btn:hover {
  background: var(--primary);
  color: #FFFFFF;
}

/* Featured Article Card */
.featured-section {
  margin-bottom: 3.5rem;
}

.featured-card {
  background: var(--card-bg);
  border-radius: 20px;
  overflow: hidden;
  border: 1px solid var(--border-color);
  box-shadow: var(--shadow-md);
  display: grid;
  grid-template-columns: 1.2fr 1fr;
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.featured-card:hover {
  transform: translateY(-6px);
  box-shadow: var(--shadow-lg);
}

.featured-img-wrapper {
  position: relative;
  overflow: hidden;
  min-height: 340px;
}

.featured-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.5s ease;
}

.featured-card:hover .featured-img {
  transform: scale(1.04);
}

.featured-content {
  padding: 2.5rem;
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.card-category-badge {
  display: inline-block;
  background: #EFF6FF;
  color: var(--primary);
  font-size: 0.75rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  padding: 0.35rem 0.85rem;
  border-radius: 9999px;
  margin-bottom: 1rem;
  width: max-content;
}

.featured-title {
  font-size: 1.65rem;
  font-weight: 800;
  color: var(--text-main);
  line-height: 1.35;
  margin-bottom: 1rem;
  transition: color 0.2s ease;
}

.featured-card:hover .featured-title {
  color: var(--primary);
}

.featured-excerpt {
  font-size: 0.95rem;
  color: var(--text-muted);
  line-height: 1.65;
  margin-bottom: 1.5rem;
}

.card-meta-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-top: auto;
  padding-top: 1rem;
  border-top: 1px solid #F1F5F9;
}

.card-date {
  font-size: 0.85rem;
  color: var(--text-muted);
  font-weight: 500;
}

.read-more-link {
  font-size: 0.9rem;
  font-weight: 700;
  color: var(--primary);
  display: flex;
  align-items: center;
  gap: 0.4rem;
  transition: gap 0.2s ease;
}

.featured-card:hover .read-more-link {
  gap: 0.65rem;
}

/* Main Grid Section */
.grid-section-title {
  font-size: 1.75rem;
  font-weight: 800;
  color: var(--text-main);
  margin-bottom: 2rem;
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.grid-section-title::after {
  content: '';
  flex: 1;
  height: 2px;
  background: #E2E8F0;
  border-radius: 2px;
}

.blogs-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(340px, 1fr));
  gap: 2rem;
  margin-bottom: 5rem;
}

/* Standard Article Card */
.blog-card {
  background: var(--card-bg);
  border-radius: 16px;
  overflow: hidden;
  border: 1px solid var(--border-color);
  box-shadow: var(--shadow-sm);
  display: flex;
  flex-direction: column;
  transition: transform 0.3s ease, box-shadow 0.3s ease, border-color 0.3s ease;
}

.blog-card:hover {
  transform: translateY(-6px);
  box-shadow: var(--shadow-md);
  border-color: #CBD5E1;
}

.blog-card-img-wrapper {
  position: relative;
  width: 100%;
  height: 210px;
  overflow: hidden;
  background: #E2E8F0;
}

.blog-card-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.4s ease;
}

.blog-card:hover .blog-card-img {
  transform: scale(1.05);
}

.blog-card-body {
  padding: 1.5rem;
  display: flex;
  flex-direction: column;
  flex: 1;
}

.blog-card-title {
  font-size: 1.15rem;
  font-weight: 700;
  color: var(--text-main);
  line-height: 1.4;
  margin-bottom: 0.75rem;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  transition: color 0.2s ease;
}

.blog-card:hover .blog-card-title {
  color: var(--primary);
}

.blog-card-excerpt {
  font-size: 0.9rem;
  color: var(--text-muted);
  line-height: 1.6;
  margin-bottom: 1.25rem;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

/* Callout CTA Banner */
.blogs-cta-banner {
  background: linear-gradient(135deg, #1E293B 0%, #0F172A 100%);
  border-radius: 20px;
  padding: 3rem 2.5rem;
  color: #FFFFFF;
  margin-bottom: 5rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 2rem;
  box-shadow: var(--shadow-lg);
  border: 1px solid rgba(255, 255, 255, 0.1);
}

.cta-banner-content h3 {
  font-size: 1.75rem;
  font-weight: 800;
  margin-bottom: 0.5rem;
}

.cta-banner-content p {
  color: #94A3B8;
  font-size: 1rem;
}

.btn-cta-white {
  background: var(--primary);
  color: #FFFFFF;
  padding: 0.9rem 2rem;
  border-radius: 9999px;
  font-weight: 700;
  font-size: 0.95rem;
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
  box-shadow: 0 4px 12px rgba(37, 99, 235, 0.3);
  transition: all 0.25s ease;
  white-space: nowrap;
}

.btn-cta-white:hover {
  background: var(--primary-hover);
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(37, 99, 235, 0.4);
}

/* --- Map Section --- */
.footer-map-section {
  width: 100%;
  line-height: 0;
  margin: 0;
  padding: 0;
  overflow: hidden;
  background: #F1F5F9;
  border-top: 1px solid #E2E8F0;
}

.footer-map-section iframe {
  width: 100%;
  height: 220px;
  border: 0;
  display: block;
}

/* Footer */
.site-footer {
  background: #0F172A;
  color: #94A3B8;
  border-top: 6px solid #2563EB;
  padding: 3.5rem 0 1.5rem 0;
}

.footer-grid {
  display: grid;
  grid-template-columns: 1.5fr 1.3fr 1.2fr 1fr;
  gap: 2.5rem;
  margin-bottom: 2.5rem;
}

.footer-logo {
  height: 44px;
  margin-bottom: 0.75rem;
}

.footer-about-text {
  font-size: 0.88rem;
  line-height: 1.55;
  color: #94A3B8;
  margin-bottom: 1.25rem;
  max-width: 320px;
}

.footer-social-icons {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.social-circle {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 42px;
  height: 42px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.1);
  color: #FFFFFF;
  text-decoration: none;
  font-size: 1.15rem;
  transition: background 0.2s ease, transform 0.2s ease;
}

.social-circle:hover {
  background: #2563EB;
  color: #FFFFFF;
  transform: translateY(-2px);
}

.footer-title {
  font-size: 0.85rem;
  font-weight: 800;
  color: #60A5FA;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin-bottom: 1rem;
}

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

.footer-list li {
  font-size: 0.85rem;
  color: #94A3B8;
  margin-bottom: 0.5rem;
  transition: color 0.2s;
}

.footer-list a {
  color: #94A3B8;
  text-decoration: none;
  transition: color 0.2s;
}

.footer-list a:hover {
  color: #FFFFFF;
}

.footer-dropdown {
  margin-bottom: 0.6rem;
}

.footer-dropdown summary {
  font-size: 0.85rem;
  font-weight: 600;
  color: #E2E8F0;
  cursor: pointer;
  list-style: none;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.35rem 0;
  transition: color 0.2s ease;
}

.footer-dropdown summary::-webkit-details-marker {
  display: none;
}

.footer-dropdown summary:hover {
  color: #60A5FA;
}

.footer-dropdown summary::after {
  content: '›';
  font-size: 1.1rem;
  line-height: 1;
  transition: transform 0.2s ease;
}

.footer-dropdown[open] summary::after {
  transform: rotate(90deg);
}

.footer-sublist {
  list-style: none;
  padding-left: 0.75rem;
  margin: 0.35rem 0 0.6rem 0;
  border-left: 2px solid rgba(37, 99, 235, 0.4);
}

.footer-sublist li {
  margin-bottom: 0.35rem;
}

.footer-sublist a {
  font-size: 0.82rem;
  color: #94A3B8;
  text-decoration: none;
  transition: color 0.2s ease;
}

.footer-sublist a:hover {
  color: #FFFFFF;
}

.footer-email-link {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: #94A3B8;
  text-decoration: none;
  transition: color 0.2s;
}

.footer-email-link:hover {
  color: #FFFFFF;
}

.footer-bottom {
  text-align: center;
  font-size: 0.8rem;
  color: #64748B;
  padding-top: 1.5rem;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
}

/* Responsive Media Queries */
@media (max-width: 992px) {
  .featured-card {
    grid-template-columns: 1fr;
  }
  .featured-img-wrapper {
    min-height: 240px;
  }
  .footer-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 2rem;
  }
}

@media (max-width: 600px) {
  .site-header {
    padding: 0.75rem 0;
  }
  .brand-logo {
    height: 34px;
  }
  .quotezone-partner span {
    display: none !important;
  }
  .quotezone-logo {
    height: 15px !important;
    width: auto;
  }
  .hero-title {
    font-size: 2rem;
  }
  .blogs-hero {
    padding: 3rem 0 3.5rem 0;
  }
  .featured-content {
    padding: 1.5rem;
  }
  .featured-title {
    font-size: 1.3rem;
  }
  .blogs-cta-banner {
    flex-direction: column;
    text-align: center;
    padding: 2rem 1.5rem;
  }
  .footer-grid {
    grid-template-columns: 1fr;
  }
  .filter-pills {
    border-radius: 12px;
    width: 100%;
  }
}

/* --- Floating Buttons (Bottom Right Stacked) --- */
.floating-whatsapp-btn {
  position: fixed;
  bottom: 2rem;
  right: 2rem;
  width: 54px;
  height: 54px;
  border-radius: 50%;
  background: #25D366;
  color: #FFFFFF;
  display: flex;
  align-items: center;
  justify-content: center;
  text-decoration: none;
  z-index: 9990;
  box-shadow: 0 4px 16px rgba(37, 211, 102, 0.45);
  transition: transform 0.25s ease, background 0.25s ease, box-shadow 0.25s ease;
}

.floating-whatsapp-btn:hover {
  background: #20BA5A;
  transform: scale(1.08) translateY(-2px);
  box-shadow: 0 6px 22px rgba(37, 211, 102, 0.6);
}

.scroll-top-btn {
  position: fixed;
  bottom: 6rem;
  right: 2.15rem;
  width: 48px;
  height: 48px;
  border-radius: 50%;
  background: #2563EB;
  color: #FFFFFF;
  border: none;
  font-size: 1.15rem;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  z-index: 9990;
  box-shadow: 0 4px 14px rgba(37, 99, 235, 0.4);
  opacity: 0;
  visibility: hidden;
  transform: scale(0.8);
  transition: opacity 0.3s ease, visibility 0.3s ease, transform 0.3s ease, background 0.2s ease, box-shadow 0.2s ease;
}

.scroll-top-btn.active {
  opacity: 1;
  visibility: visible;
  transform: scale(1);
}

.scroll-top-btn:hover {
  background: #1D4ED8;
  transform: scale(1.08) translateY(-2px);
  box-shadow: 0 6px 20px rgba(37, 99, 235, 0.5);
}

@media (max-width: 768px) {
  .site-header {
    padding: 0.75rem 0;
  }
  .brand-logo {
    height: 34px;
  }
  .quotezone-partner span {
    display: none !important;
  }
  .quotezone-logo {
    height: 15px !important;
    width: auto;
  }
  .floating-whatsapp-btn {
    bottom: 1.25rem;
    right: 1.25rem;
    width: 48px;
    height: 48px;
  }
  .scroll-top-btn {
    bottom: 4.75rem;
    right: 1.35rem;
    width: 44px;
    height: 44px;
    font-size: 1.05rem;
  }
}

/* --- Quote Modal --- */
.modal-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.6);
  backdrop-filter: blur(4px);
  z-index: 2000;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  visibility: hidden;
  transition: all 0.25s ease;
}

.modal-overlay.active {
  opacity: 1;
  visibility: visible;
}

.modal-card {
  background: #FFFFFF;
  border-radius: 16px;
  width: 90%;
  max-width: 500px;
  padding: 2rem;
  position: relative;
  box-shadow: 0 10px 30px rgba(0,0,0,0.2);
}

.modal-close-btn {
  position: absolute;
  top: 1rem;
  right: 1rem;
  background: #F1F5F9;
  border: none;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  font-size: 1.1rem;
  cursor: pointer;
}

/* --- Exit Intent Window Jump Modal --- */
.exit-modal-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(15, 23, 42, 0.65);
  backdrop-filter: blur(4px);
  z-index: 9999;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.3s ease, visibility 0.3s ease;
  padding: 1rem;
}

.exit-modal-overlay.active {
  opacity: 1;
  visibility: visible;
}

.exit-modal-card {
  background: #ffffff;
  border-radius: 12px;
  width: 100%;
  max-width: 620px;
  padding: 2.25rem 2.25rem 2.5rem 2.25rem;
  position: relative;
  text-align: center;
  box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.35);
  transform: scale(0.92);
  transition: transform 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

.exit-modal-overlay.active .exit-modal-card {
  transform: scale(1);
}

.exit-modal-close {
  position: absolute;
  top: -14px;
  right: -14px;
  background: #2563eb;
  color: #ffffff;
  border: 3px solid #ffffff;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 14px;
  cursor: pointer;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
  transition: background 0.2s ease, transform 0.2s ease;
  z-index: 10;
}

.exit-modal-close:hover {
  background: #1d4ed8;
  transform: scale(1.1);
}

.exit-modal-header {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  font-size: 0.85rem;
  color: #64748b;
  font-weight: 500;
  margin-bottom: 0.75rem;
}

.exit-modal-header img {
  height: 26px;
  width: auto;
}

.exit-modal-title {
  font-size: 1.85rem;
  font-weight: 900;
  color: #1e293b;
  text-transform: uppercase;
  letter-spacing: -0.01em;
  margin-bottom: 0.75rem;
  line-height: 1.2;
}

.exit-modal-body {
  font-size: 0.92rem;
  color: #475569;
  line-height: 1.55;
  max-width: 520px;
  margin: 0 auto 1.75rem auto;
}

.exit-modal-form {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.75rem;
  width: 100%;
  max-width: 560px;
  margin: 0 auto;
}

.exit-reg-box {
  display: flex;
  align-items: center;
  border: 2px solid #000000;
  border-radius: 9999px;
  overflow: hidden;
  height: 52px;
  min-height: 52px;
  max-height: 52px;
  flex: 1;
  min-width: 0;
  background: #ffffff;
  padding: 0 1.5rem;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.04);
  box-sizing: border-box;
}

.exit-reg-input {
  width: 100%;
  height: 100%;
  border: none;
  outline: none;
  padding: 0;
  font-weight: 800;
  font-size: 1.05rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: #1e293b;
  font-family: inherit;
  background: transparent;
  text-align: center;
  box-sizing: border-box;
}

.exit-reg-input::placeholder {
  color: #64748b;
  font-weight: 800;
  letter-spacing: 0.1em;
  opacity: 1;
}

.exit-modal-btn {
  background: #16a34a;
  color: #ffffff;
  border: none;
  height: 52px;
  min-height: 52px;
  max-height: 52px;
  padding: 0 1.75rem;
  border-radius: 9999px;
  font-weight: 800;
  font-size: 0.88rem;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  transition: background 0.2s ease, box-shadow 0.2s ease;
  white-space: nowrap;
  text-transform: uppercase;
  letter-spacing: 0.02em;
  font-family: inherit;
  box-shadow: 0 4px 14px rgba(22, 163, 74, 0.3);
  box-sizing: border-box;
}

.exit-modal-btn:hover {
  background: #15803d;
  box-shadow: 0 6px 18px rgba(22, 163, 74, 0.4);
}
