/* ── BLOG OPTION 1 STYLES ── */

* {
  box-sizing: border-box;
}

:root {
  --teal: #00a79d;
  --teal-dark: #007a73;
  --orange: #f4791f;
  --navy: #0d2137;
  --bg: #f8fafc;
  --white: #ffffff;
  --text-main: #0f172a;
  --text-muted: #64748b;
  --border: #e2e8f0;
  --hl-green: #36bf4e;
  --hl-sky: #0284c7;
}

body {
  background-color: var(--bg);
  color: var(--text-main);
  margin: 0;
  padding: 0;
  font-family: var(--font-body, 'Inter', sans-serif);
}

/* Hero Section */
.blog-hero {
  background: linear-gradient(160deg, #ffffff 0%, #f0fdf4 50%, #f0f9ff 100%);
  color: var(--text-main);
  padding: 80px 5% 60px;
  text-align: left;
  border-bottom: 1px solid var(--border);
}

.bh-container {
  max-width: 1100px;
  margin: 0 auto;
}

.bh-badge {
  display: inline-flex;
  align-items: center;
  background: #f0f9ff;
  border: 1px solid #bae6fd;
  color: #0284c7;
  padding: 4px 12px;
  border-radius: 4px;
  font-size: 11px;
  font-weight: 800;
  margin-bottom: 20px;
  text-transform: uppercase;
  letter-spacing: 0.6px;
}

.bh-title {
  font-family: 'Inter', sans-serif;
  font-size: clamp(32px, 4vw, 48px);
  line-height: 1.1;
  margin-bottom: 16px;
  font-weight: 900;
  color: var(--text-main);
  letter-spacing: 0.5px;
}

.hl-green {
  color: var(--hl-green);
}

.hl-sky {
  color: var(--hl-sky);
}

.bh-sub {
  font-family: 'Inter', sans-serif;
  font-size: 16px;
  color: #475569;
  line-height: 1.8;
  max-width: 520px;
  font-weight: 400;
}

/* Featured Carousel */
.featured-section {
  padding: 0 5%;
  margin-top: -60px;
  position: relative;
  z-index: 10;
}

.feat-container {
  max-width: 1200px;
  margin: 0 auto;
}

.carousel-wrapper {
  overflow: hidden;
  border-radius: 16px;
  box-shadow: 0 20px 40px rgba(13, 33, 55, 0.08);
  background: var(--white);
}

.carousel-track {
  display: grid;
  grid-template-columns: 1fr;
  width: 100%;
}

.feat-slide {
  grid-area: 1 / 1;
  min-width: 100%;
  display: grid;
  grid-template-columns: 1fr 1.2fr;
  text-decoration: none;
  color: var(--text-main);
  transform: translateX(-100%);
  transition: none;
  pointer-events: none;
}

.feat-slide.active {
  transform: translateX(0);
  transition: transform 0.8s ease-in-out;
  pointer-events: auto;
  z-index: 2;
}

.feat-slide.exit {
  transform: translateX(100%);
  transition: transform 0.8s ease-in-out;
  pointer-events: none;
  z-index: 1;
}

.feat-img {
  min-height: 400px;
}

.feat-content {
  padding: 50px 40px;
  display: flex;
  flex-direction: column;
  justify-content: center;

}

.feat-content h2 {
  font-family: var(--font-head, 'Sora', sans-serif);
  font-size: 32px;
  margin: 16px 0;
  line-height: 1.25;
}

.feat-content p {
  font-size: 16px;
  color: var(--text-muted);
  line-height: 1.6;
  margin-bottom: 30px;
}

/* Tags */
.category-tag {
  display: inline-block;
  font-size: 12px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 1px;
  padding: 4px 12px;
  border-radius: 6px;
  align-self: flex-start;
}

.tag-compliance {
  background: #fee2e2;
  color: #991b1b;
}

.tag-tech {
  background: #e0f2fe;
  color: #075985;
}

.tag-strategy {
  background: #fef3c7;
  color: #92400e;
}

.tag-case {
  background: #ede9fe;
  color: #5b21b6;
}

/* Author Meta */
.author-meta {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-top: auto;
}

.pb {
  margin-top: auto;
}

.avatar {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: var(--navy);
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 16px;
}

.author-info {
  display: flex;
  flex-direction: column;
}

.author-info .name {
  font-weight: 600;
  font-size: 14px;
}

.author-info .date {
  font-size: 13px;
  color: var(--text-muted);
}

/* Search Bar */
.search-section {
  padding: 60px 5% 20px;
  border-bottom: 1px solid var(--border);
  background: var(--bg);
}

.search-container {
  max-width: 800px;
  margin: 0 auto;
}

.search-wrap {
  position: relative;
  display: flex;
  align-items: center;
}

.blog-search-input {
  width: 100%;
  padding: 16px 24px;
  border-radius: 30px;
  border: 1px solid var(--border);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.03);
  font-size: 16px;
  font-family: inherit;
  outline: none;
  background: var(--white);
  transition: border-color 0.2s, box-shadow 0.2s;
}

.blog-search-input:focus {
  border-color: var(--teal);
  box-shadow: 0 4px 12px rgba(0, 167, 157, 0.1);
}

.search-icon {
  position: absolute;
  right: 20px;
  color: var(--text-muted);
  width: 20px;
  height: 20px;
}

/* Card Grid */
.grid-section {
  padding: 50px 5% 80px;
}

.grid-container {
  max-width: 1200px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 30px;
}

.blog-card {
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: 12px;
  overflow: hidden;
  text-decoration: none;
  color: var(--text-main);
  display: flex;
  flex-direction: column;
  transition: transform 0.2s, box-shadow 0.2s;
}

.blog-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 12px 24px rgba(0, 0, 0, 0.06);
}

.bc-img {
  height: 200px;
  width: 100%;
}

.bc-img img,
.feat-img img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.bc-content {
  padding: 24px;
  display: flex;
  flex-direction: column;
  flex: 1;
}

.bc-content h3 {
  font-family: var(--font-head, 'Sora', sans-serif);
  font-size: 20px;
  line-height: 1.35;
  margin: 12px 0;
}

.bc-content p {
  font-size: 14px;
  color: var(--text-muted);
  line-height: 1.6;
  margin-bottom: 24px;
}



/* Newsletter CTA */
.newsletter-cta {
  padding: 0;
  background: var(--white);
}

.nl-box {
  width: 100%;
  background: linear-gradient(130deg, #0d3d28 0%, #196b47 50%, #0272b0 100%);
  border-radius: 0;
  padding: 100px 5%;
  display: flex;
  justify-content: center;
  align-items: center;
  text-align: center;
  color: var(--white);
  position: relative;
  overflow: hidden;
  z-index: 1;
}

.nl-box::before {
  content: 'BLOG';
  position: absolute;
  right: -10px;
  top: 50%;
  transform: translateY(-50%);
  font-size: 160px;
  font-weight: 900;
  font-style: italic;
  color: rgba(255, 255, 255, 0.05);
  letter-spacing: -0.06em;
  pointer-events: none;
  z-index: -1;
}

.nl-box::after {
  content: '';
  position: absolute;
  width: 320px;
  height: 320px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.05);
  top: -120px;
  right: 180px;
  z-index: -1;
}

.nl-container {
  width: 100%;
  max-width: 1100px;
}

.nl-box h2 {
  font-family: var(--font-head, 'Sora', sans-serif);
  font-size: clamp(28px, 4vw, 36px);
  font-weight: 800;
  letter-spacing: -0.04em;
  color: #fff;
  margin-bottom: 20px;
  line-height: 1.1;
}

.nl-box p {
  font-size: 16px;
  color: rgba(255, 255, 255, 0.7);
  line-height: 1.65;
  margin-bottom: 30px;
  max-width: 600px;
  margin-left: auto;
  margin-right: auto;
}

.nl-form {
  display: flex;
  justify-content: center;
  max-width: 500px;
  margin: 0 auto;
  background: rgba(255, 255, 255, 0.1);
  padding: 6px;
  border-radius: 12px;
  border: 1px solid rgba(255, 255, 255, 0.18);
  position: relative;
  z-index: 10;
}

.nl-form input {
  flex: 1;
  background: transparent;
  border: none;
  color: white;
  padding: 12px 16px;
  font-size: 15px;
  outline: none;
  font-family: inherit;
}

.nl-form input::placeholder {
  color: rgba(255, 255, 255, 0.4);
}

.nl-form button {
  background: #fff;
  color: #0d3d28;
  border: none;
  padding: 12px 28px;
  border-radius: 9px;
  font-weight: 700;
  cursor: pointer;
  font-size: 14px;
  transition: all 0.2s;
  font-family: 'Inter', sans-serif;
}

.nl-form button:hover {
  background: rgba(255, 255, 255, 0.9);
  transform: translateY(-2px);
}

/* Responsive */
@media (max-width: 1024px) {
  .bh-title {
    font-size: 40px;
  }

  .feat-slide {
    display: flex;
    flex-direction: column-reverse;
  }

  .feat-img {
    min-height: 300px;
  }

  .grid-container {
    grid-template-columns: repeat(2, 1fr);
  }

  .modal-container {
    width: 70vw;
  }
}

@media (max-width: 640px) {
  .bh-title {
    font-size: 32px;
  }

  .blog-hero {
    padding: 60px 5% 80px;
  }

  .feat-content {
    padding: 30px 20px;
  }

  .feat-content h2 {
    font-size: 24px;
  }

  .grid-container {
    grid-template-columns: 1fr;
  }

  .nl-box {
    padding: 40px 20px;
  }

  .nl-form {
    flex-direction: column;
    gap: 10px;
    background: transparent;
    border: none;
    padding: 0;
  }

  .nl-form input {
    background: rgba(255, 255, 255, 0.1);
    border-radius: 6px;
    border: 1px solid rgba(255, 255, 255, 0.2);
  }

  .modal-container {
    width: 100vw;
    height: 100vh;
    right: 0;
    border-radius: 0;
  }
}

/* Modal Overlay */
.modal-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  background: rgba(13, 33, 55, 0.4);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  z-index: 9999;
  opacity: 0;
  visibility: hidden;
  transition: all 0.4s cubic-bezier(0.16, 1, 0.3, 1);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
}

.modal-overlay.active {
  opacity: 1;
  visibility: visible;
}

.modal-container {
  width: 100%;
  max-width: 1000px;
  max-height: 90vh;
  background: #f8fafc;
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-radius: 24px;
  border: 1px solid rgba(255, 255, 255, 0.3);
  box-shadow: 0 40px 100px rgba(0, 0, 0, 0.2);
  transform: scale(0.95) translateY(20px);
  transition: all 0.5s cubic-bezier(0.16, 1, 0.3, 1);
  position: relative;
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

.modal-overlay.active .modal-container {
  transform: scale(1) translateY(0);
}

.modal-close {
  position: absolute;
  top: 20px;
  right: 20px;
  background: rgba(15, 23, 42, 0.05);
  border: 1px solid rgba(15, 23, 42, 0.1);
  width: 40px;
  height: 40px;
  border-radius: 50%;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 100;
  color: var(--text-main);
  transition: all 0.2s;
}

.modal-close:hover {
  background: #ef4444;
  color: white;
  border-color: transparent;
  transform: rotate(90deg);
}

.modal-inner-content {
  overflow-y: auto;
  padding: 0px;
  scrollbar-width: thin;
  margin-top: 25px;
  scrollbar-color: var(--border) transparent;
}

.modal-inner-content::-webkit-scrollbar {
  width: 6px;
}

.modal-inner-content::-webkit-scrollbar-thumb {
  background: var(--border);
  border-radius: 10px;
}

.modal-inner-article {
  max-width: 800px;
  margin: 0 auto;
  position: relative;
  padding: 0 40px 40px;     /* ← side + bottom padding moved here */
}

.modal-sticky-header {
  position: sticky;
  top: 0;
  z-index: 10;
  background: #f8fafc;
  padding: 24px 0 14px;     /* ← top breathing room + bottom gap */
  margin: 0 0 4px;
  border-bottom: 1px solid var(--border);
}

.modal-sticky-header .category-tag {
  display: inline-block;
  margin-bottom: 8px;        /* ← gap between tag and title */
}

.modal-sticky-header h2 {
  font-family: var(--font-head, 'Sora', sans-serif);
  font-size: clamp(24px, 3.5vw, 38px);
  margin: 0;
  line-height: 1.15;
  letter-spacing: -0.03em;
}

/* .modal-inner-content h2 {
  font-family: var(--font-head, 'Sora', sans-serif);
  font-size: clamp(28px, 4vw, 42px);
  margin: 0px;
  line-height: 1.15;
  letter-spacing: -0.03em;
  position: sticky;
  top: 0;
  z-index: 10;
  background: #f8fafc;
  padding: 0 0 14px;
  border-bottom: 1px solid var(--border);
} */

.modal-body {
  padding-top: 24px;
  /* pushes content below the sticky title */
  font-size: 18px;
  line-height: 1.75;
  color: #334155;
}

.modal-meta {
  margin-bottom: 30px;
  padding-bottom: 15px;
  border-bottom: 1px solid rgba(15, 23, 42, 0.08);
}

.modal-hero-img {
  width: 100%;
  height: 300px;
  border-radius: 16px;
  margin-bottom: 32px;
  background-size: cover !important;
  background-position: center !important;
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.1);
}

.modal-body {
  font-size: 18px;
  line-height: 1.75;
  color: #334155;
}

.modal-body p {
  margin-bottom: 24px;
  line-height: 1.85;
}

.modal-text {
  margin-top: 10px;
}

.modal-text p {
  margin-bottom: 28px;
  font-size: 18px;
  line-height: 1.9;
  color: #475569; /* Slightly more muted for better readability on light bg */
}

/* Subheadings - Reusable Component Style */
.modal-text h4 {
  color: var(--hl-sky);
  font-family: 'Sora', sans-serif;
  font-size: 22px;
  font-weight: 700;
  margin: 45px 0 15px;
  letter-spacing: -0.02em;
  display: block;
}

.modal-text h4:first-child {
  margin-top: 10px;
}

.modal-text ul {
  margin-bottom: 30px;
  padding-left: 20px;
}

.modal-text li {
  margin-bottom: 12px;
  line-height: 1.7;
  color: #475569;
}

.modal-text strong {
  color: var(--text-main);
  font-weight: 700;
}

.modal-lead {
  font-size: 22px;
  line-height: 1.5;
  font-weight: 600;
  color: var(--text-main);
  margin-bottom: 32px !important;
  background: linear-gradient(90deg, var(--teal-dark), var(--navy));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

@media (max-width: 1024px) {
  .modal-container {
    max-width: 90vw;
  }
}

@media (max-width: 640px) {
  .modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    padding: 0 !important; /* Removes desktop padding completely on mobile */
    display: block;        /* Changes layout context to fix viewport jumping */
    overflow: hidden;
  }

  .modal-container {
    width: 100vw !important;
    max-width: 100vw !important;
    height: 100vh !important;
    max-height: 100vh !important;
    border-radius: 0 !important;
    margin: 0 !important;
    display: flex;
    flex-direction: column;
  }

  .modal-sticky-header {
    position: sticky;
    top: -3;
    z-index: 99 !important;      /* Pushes header on top of the scrolling body text */
    background: #f8fafc !important; /* Blocks text below from showing through transparent gaps */
    padding: 56px 16px 12px !important; /* 55px top padding stops title from overlapping your close button */
    margin: 0 !important;
    border-bottom: 1px solid var(--border);
  }

  .modal-inner-content {
    flex: 1;
    overflow-y: auto !important; /* Confines all vertical scrolling strictly inside this container */
    -webkit-overflow-scrolling: touch; /* Ensures smooth, natural swipe scrolling on iOS */
    padding: 0 !important; 
  }

  .modal-inner-article {
    padding: 16px 16px 40px !important; /* Tighter side padding for clean screen use */
  }

  .modal-hero-img {
    height: 200px !important; /* Scales image down comfortably for mobile screens */
  }

  .modal-close {
    top: 12px !important;
    right: 12px !important;
    z-index: 100 !important; /* Guarantees the close button sits at the absolute surface layer */
  }
}

@media (max-width: 480px) {

  .popup-box {

    max-width: 80%;

    padding: 20px 15px;

    border-radius: 14px;

  }

  .popup-box p {

    font-size: 14px;

    line-height: 1.6;

  }

  .popup-box button {

    width: 100%;

    margin-top: 14px;

  }

}
/*.popup {*/
/*  display:none;*/
/*  justify-content: center;*/
/*  align-items: center;*/
 
/*    background: #ffffff;*/
/*    padding: 28px 26px;*/
/*    border-radius: 16px;*/
/*    width: 340px;*/
/*    text-align: center;*/
/*    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.15);*/
/*    animation: slideUp 0.35s ease;*/

/*}*/



/* POPUP OVERLAY */
.popup {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0,0,0,0.5);
  display: none;
  justify-content: center;
  align-items: center;
  z-index: 9999;
}
 

/* POPUP BOX */
.popup-box {
  background: #ffffff;
  padding: 26px 26px;
  border-radius: 16px;
  width: 380px;
  text-align: center;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.15);
  animation: slideUp 0.35s ease;
}

/* BUTTON */
.popup-box button {
  margin-top: 15px;
  padding: 10px 20px;
  border: none;
  border-radius: 8px;
  background: #1a7fa0;
  color: white;
  cursor: pointer;
}


/* ANIMATION */
@keyframes slideUp {

  from {
    opacity: 0;
    transform: translateY(40px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }

}















/* =========================================================================
   BLOG PAGE — IPAD PRO TOP NAV
   IDENTICAL TO ASSET SCORE NAVIGATION
   ========================================================================= */

@media only screen 
and (min-width: 820px) 
and (max-width: 1180px) {

  /* ─── NAVBAR ────────────────────────────────────────── */
  nav {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    padding: 0 14px !important;
    overflow: visible !important;
  }

  /* LOGO — uses max-height, no fixed width (like Asset Score) */
  .nav-logo img,
  .brand-logo img,
  .logo img {
    max-height: 30px !important;
    width: auto !important;
  }

  /* NAV LINKS CONTAINER */
  .nav-links {
    display: flex !important;
    align-items: center;
    flex-wrap: nowrap;
    gap: 0px;
    flex: 0 1 auto !important;    /* prevents pushing login too far */
    min-width: 0;
    overflow-x: auto;
    overflow-y: visible !important;
    scrollbar-width: none;
  }

  .nav-links::-webkit-scrollbar {
    display: none;
  }

  /* INDIVIDUAL NAV LINKS */
  .nav-links a {
    white-space: nowrap;
    font-size: 10px !important;
    padding: 5px 6px !important;
    flex-shrink: 0;
  }

  /* RIGHT BUTTON AREA (Login / Demo) */
  .nav-actions {
    display: flex;
    align-items: center;
    gap: 6px;
    flex-shrink: 0;
    margin-left: 12px !important;  /* controls gap between last link and login */
  }

  /* LOGIN BUTTON */
  .btn-ghost-sm,
  .login-btn {
    font-size: 10px !important;
    padding: 7px 10px !important;
    white-space: nowrap;
    min-width: fit-content;
    flex-shrink: 0;
  }

  /* DROPDOWN FIX */
  .dropdown,
  .dropdown-menu,
  .submenu {
    z-index: 99999 !important;
  }

  .dropdown-menu,
  .submenu {
    position: absolute;
  }

  /* ─── BLOG HERO (PRESERVES YOUR FIXES) ───────────────── */
 .blog-hero {
    margin-top: 0 !important;
    padding-top: 60px !important;      /* was 20px – now enough space below navbar */
    padding-bottom: 40px !important;
    clear: both !important;
    position: relative !important;
    z-index: 1 !important;
    background: #ffffff !important;
    min-height: auto !important;
    height: auto !important;
    max-height: none !important;
    overflow: visible !important;
    margin-bottom: 20px !important;
  }
  .bh-container {
    width: 100% !important;
    max-width: 100% !important;
    padding-left: 20px !important;
    padding-right: 20px !important;
    box-sizing: border-box !important;
    overflow-x: visible !important;
    overflow: visible !important;
    height: auto !important;
  }

  .bh-title {
    font-size: 36px !important;
    line-height: 1.2 !important;
    margin-bottom: 16px !important;
    word-wrap: break-word !important;
  }

  .bh-sub {
    max-width: 90% !important;
    font-size: 16px !important;
    line-height: 1.4 !important;
    margin-bottom: 24px !important;
  }

  /* FIXED: FEATURED SECTION – NO NEGATIVE MARGIN */
  .featured-section {
    margin-top: 0 !important;
    clear: both !important;
  }

  .feat-slide {
    grid-template-columns: 1fr 1fr !important;
  }

  .feat-content {
    padding: 34px 28px !important;
  }

  .feat-content h2 {
    font-size: 26px !important;
    line-height: 1.3 !important;
  }

  .feat-content p {
    font-size: 14px !important;
  }

  /* GRID */
  .grid-container {
    grid-template-columns: repeat(2, 1fr) !important;
    gap: 22px !important;
  }

  /* NEWSLETTER */
  .nl-box {
    padding: 70px 32px !important;
  }

  .nl-box::before {
    font-size: 120px !important;
    right: -20px !important;
  }
}
