/* =========================================

   WEBLODGE AGENCY BLOG SECTION

========================================= */

/* BACKGROUND GLOW */

.weblodge-agency-blog-container {
  padding: 15px 40px 30px;
}

/* =========================================

   BLOG HEADER

========================================= */

.blog-header {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  margin-bottom: 30px;
}

/* (Removed: an exact duplicate of the .blog-content > h3 rule
   that also appears under CARD CONTENT below.) */

/* Layout only - header text style from global .wla-description-text */
.blog-header > p {
  max-width: 750px;
  margin: 0;
}

/* =========================================

   BLOG GRID

========================================= */

.blog-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 30px;
  width: 100%;
}

/* =========================================

   BLOG CARDS

========================================= */

.blog-card {
  display: flex;
  flex-direction: column;
  min-width: 0;
  overflow: hidden;
  box-sizing: border-box;
}

.blog-card > img {
  display: block;
  width: 100%;
  height: 280px;
  max-width: 100%;
  margin: 0;
  object-fit: cover;
  object-position: center;
}

/* CARD CONTENT */

.blog-content {
  display: flex;
  flex: 1;
  flex-direction: column;
  align-items: flex-start;
  padding: 20px;
  box-sizing: border-box;
}

/* Layout only - title style from global .wla-card-big-text,
   excerpt style from global .wla-card-description-text */
.blog-content > h3 {
  margin: 0 0 12px;
}

.blog-content > p {
  margin: 0 0 20px;
}

/* =========================================

   READ MORE BUTTON

========================================= */

.blog-readmore-link,
.blog-readmore-link:hover,
.blog-readmore-link:focus,
.blog-readmore-link:active,
.blog-readmore-link:visited {
  appearance: none;
  -webkit-appearance: none;
  display: inline-flex;
  align-items: center;
  justify-content: flex-start;
  width: auto;
  max-width: 100%;
  margin: auto 0 0;
  padding: 0;
  border: 0;
  outline: none;
  background: transparent;
  box-shadow: none;
  text-decoration: none;
  cursor: pointer;
}

.blog-readmore-link:focus-visible {
  outline: 2px solid #26c6f9;
  outline-offset: 4px;
  border-radius: 6px;
}

/* =========================================

   TABLET: 769px–1024px

========================================= */

@media (max-width: 1024px) {
  .weblodge-agency-blog-container {
    padding: 10px 30px 20px;
  }

  .blog-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 15px;
  }

  /* Header text size now comes from the global file */

  .blog-card > img {
    height: 200px;
  }

  .blog-content {
    padding: 12px;
  }

  /* Card text sizes now come from the global file */
}

/* =========================================

   MOBILE: 768px AND BELOW

========================================= */

@media (max-width: 767px) {
  .weblodge-agency-blog-container {
    padding: 10px 5px;
    border-radius: 24px;
  }

  .blog-header {
    margin-bottom: 25px;
  }

  /* Header text size now comes from the global file */

  .blog-grid {
    grid-template-columns: minmax(0, 1fr);
    gap: 20px;
  }

  .blog-card > img {
    height: 220px;
  }

  .blog-content {
    padding: 16px;
  }

  /* Card text sizes now come from the global file */
}

/* =========================================

   BLOG MODAL — FIXED ABOVE THE PAGE

========================================= */

.blog-modal-content::-webkit-scrollbar {
  width: 6px;
}

.blog-modal-content::-webkit-scrollbar-thumb {
  background: rgba(255, 255, 255, 0.35);
  border-radius: 10px;
}

/* MODAL HEADER */

/* MODAL BADGE */

/* MODAL BADGE DOT */

/* MODAL CLOSE BUTTON */

.blog-modal-header .blog-modal-badge-wrap {
  display: flex;
  align-items: center;
  margin: 0;
  justify-content: flex-start;
  max-width: calc(100% - 55px);
}

.blog-modal-header .blog-modal-badge-wrap .wla-badge {
  max-width: 100%;
  white-space: nowrap;
}

.blog-modal-header .blog-modal-close {
    transition: background 0.3s ease, border-color 0.3s ease;
}

/* MODAL IMAGE */

#blogmodalImg {
  display: block;
  width: 70%;
  max-width: 100%;
  height: auto;
  aspect-ratio: 4 / 2.5;
  object-fit: cover;
  object-position: center;
  margin: 0 auto 30px;
  border-radius: 12px;
}

/* MODAL MAIN TITLE */

/* Layout only - title style from global .wla-card-big-text */
#blogmodalTitle {
    margin: 0 0 18px;
  overflow-wrap: anywhere;
}

/* MODAL ARTICLE CONTENT */

/* Text style from global .wla-card-description-text on the
   container (paragraphs inherit it); headings inside use
   global .wla-card-medium-text */
#blogmodalText {
  overflow-wrap: anywhere;
}

#blogmodalText p {
  margin: 0 0 17px;
}

#blogmodalText h3 {
  margin: 28px 0 12px;
}

#blogmodalText ul,
#blogmodalText ol {
  margin: 0 0 20px;
  padding-left: 24px;
}

#blogmodalText li {
  margin-bottom: 9px;
}

#blogmodalText strong {
  color: #fff;
}

#blogmodalText a {
  color: #26c6f9;
  text-decoration: underline;
  overflow-wrap: anywhere;
}

/* MODAL MOBILE */

@media (max-width: 767px) {
.blog-modal-header .blog-modal-badge-wrap .wla-badge {
    min-height: 36px;
    padding: 7px 12px;
  }

.blog-modal {
    padding: 10px;
  }

.blog-modal-content {
    width: 100%;
    /* Height now comes from the global file (full height on mobile) */
    scrollbar-width: none;
    -ms-overflow-style: none;
}

/* No visible scrollbar on mobile, same as the Pricing modal -
   scrolling still works by touch */
.blog-modal {
    scrollbar-width: none;
    -ms-overflow-style: none;
}

.blog-modal::-webkit-scrollbar {
    display: none !important;
}

.blog-modal-content::-webkit-scrollbar {
    display: none !important;
    width: 0 !important;
    height: 0 !important;
}

#blogmodalImg {
    width: 100%;
    max-height: 250px;
    margin-bottom: 17px;
    border-radius: 12px;
  }

#blogmodalTitle {
    margin-bottom: 14px;
  }

  /* Modal text sizes now come from the global file */

  #blogmodalText h3 {
    margin-top: 23px;
  }

}


/* =========================================
   BLOG MODAL SCROLL CONTAINER
   Keeps the existing global modal width/design.
   The dialog scrolls; the overlay itself does not.
========================================= */

#blogModal {
  overflow: hidden !important;
  overscroll-behavior: none;
  touch-action: auto;
}

#blogModal > .blog-modal-content {
  /* Keep width/max-width from the shared .wla-modal-box rules. */
  flex: 0 0 auto !important;
  min-height: 0 !important;
  height: 100vh !important;
  height: 100dvh !important;
  max-height: 100vh !important;
  max-height: 100dvh !important;
  overflow-x: hidden !important;
  overflow-y: auto !important;
  overscroll-behavior-y: contain;
  -webkit-overflow-scrolling: touch;
  touch-action: pan-y;
}

@media (max-width: 767px) {
  #blogModal > .blog-modal-content {
    /* Mobile width remains controlled by the existing global rule. */
    flex: 0 0 100% !important;
    min-height: 0 !important;
    height: 100vh !important;
    height: 100dvh !important;
    max-height: 100vh !important;
    max-height: 100dvh !important;
    overflow-y: auto !important;
    -webkit-overflow-scrolling: touch;
    touch-action: pan-y;
  }
}
