/* ── blog2 layout ─────────────────────────────────────────────────── */

:root {
  --blue-start: #355ca7;
  --blue-end:   #0183d0;
}

/* Hide WP page header on all blog pages */
.page-header { display: none; }

/* blog/index.html: zero out elementor container top margin */
#blog .elementor-container,
#blog .elementor-section { margin-top: 0; }

/* blog/index.html: Read More buttons slightly smaller on desktop */
@media (min-width: 901px) {
  .elementor-repeater-item-be6d926 .wpr-button-effect { font-size: 0.85em !important; }
}

body { margin: 0; }

.blog2-page {
  display: flex;
  flex-direction: column;
  min-height: 100vh;
  font-family: "Montserrat", sans-serif;
  background: #f4f6f9;
}

.blog2-page *, .blog2-page *::before, .blog2-page *::after { box-sizing: border-box; }

/* ── Hero ── */
.blog2-hero {
  width: 100%;
  min-height: 280px;
  margin-top: 0;
  background-size: cover;
  background-position: center center;
  background-repeat: no-repeat;
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
}

.blog2-hero-overlay {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.52);
}

.blog2-hero-title {
  position: relative;
  z-index: 1;
  color: #fff;
  font-family: "Racing Sans One", sans-serif;
  font-size: clamp(1.6rem, 3.5vw, 3rem);
  font-weight: 400;
  text-align: center;
  padding: 0 10%;
  margin: 0;
  line-height: 1.25;
  text-shadow: 0 2px 8px rgba(0,0,0,0.4);
}

/* ── Two-column body ── */
.blog2-body {
  display: flex;
  flex-direction: row;
  align-items: flex-start;
  padding-left: calc(8% + 30px);
  padding-right: 5%;
  gap: 4%;
  padding-top: 90px;
  padding-bottom: 100px;
}

/* Left: article content */
.blog2-content {
  flex: 1 1 0;
  min-width: 0;
  width: 100%;
  background: #fff;
  border-radius: 10px;
  box-shadow: 0 8px 24px rgba(0,0,0,0.12);
  overflow: hidden;
  padding: 20px 25px 20px 27px;
}

/* Zero out ALL inner Elementor padding/margin — post-specific CSS sets huge values (165px etc.) */
.blog2-content .e-con,
.blog2-content .e-con-full,
.blog2-content .elementor-element-populated,
.blog2-content .elementor-column,
.blog2-content .elementor-container,
.blog2-content .elementor-section,
.blog2-content .elementor-widget-wrap {
  padding-left:  0 !important;
  padding-right: 0 !important;
  margin-left:   0 !important;
  margin-right:  0 !important;
}

/* Zero margin/padding on every widget container so post CSS can't shift things */
.blog2-content .elementor-widget-container {
  margin:  0 !important;
  padding: 0 !important;
}

/* All images — equal top and bottom spacing, full width */
.blog2-content .elementor-widget-image {
  display: block !important;
  width: 100% !important;
  margin-top: 22px !important;
  margin-bottom: 22px !important;
  padding: 0 !important;
}
.blog2-content .elementor-widget-image img,
.blog2-content figure img {
  display: block !important;
  width: 100% !important;
  max-width: 100% !important;
  max-height: 450px !important;
  height: auto !important;
  object-fit: cover !important;
}

/* First image — no top gap */
.blog2-content > .e-con:first-child > .elementor-widget-image,
.blog2-content > .elementor-section:first-child > .elementor-container > .elementor-column > .elementor-widget-wrap > .elementor-widget-image,
.blog2-content > .elementor-section:nth-child(2) > .elementor-container > .elementor-column > .elementor-widget-wrap > .elementor-widget-image {
  margin-top: 0 !important;
}

/* Text widgets — desktop indent */
.blog2-content .elementor-widget-text-editor .elementor-widget-container,
.blog2-content .elementor-widget-heading .elementor-widget-container {
  padding-left: 2% !important;
  padding-right: 3% !important;
}

/* H2 sizing and spacing — consistent across all blog articles */
.blog2-content h2 {
  font-size: 28px !important;
  margin-bottom: 3% !important;
}

/* H3 inside text-editor widgets (e.g. website-security inline headings) */
.blog2-content .elementor-widget-text-editor h3 {
  font-size: 22px !important;
  font-family: "Poppins", sans-serif !important;
  font-weight: 600 !important;
  color: #333333 !important;
  margin-top: 1.5em !important;
  margin-bottom: 0.5em !important;
  padding-left: 0 !important;
}

/* Picture captions — italic, smaller, weight 600, flush under image */
.blog2-content .widget-image-caption,
.blog2-content .elementor-image-caption,
.blog2-content figcaption,
.blog2-content .wp-caption-text {
  display: block;
  font-style: italic;
  font-size: calc(0.82em + 2px);
  font-weight: 700;
  color: #7A7A7A;
  margin-top: 6px;
  margin-bottom: 0;
  line-height: 1.4;
}

/* Match original blog font principles */
.blog2-content .elementor-heading-title {
  font-family: "Poppins", sans-serif;
  font-weight: 600;
  color: #333333;
}

/* Override Elementor/WP global blue on in-article headings — must beat post-specific CSS */
.blog2-content .elementor-heading-title,
.blog2-content h2,
.blog2-content h3,
.blog2-content h4 {
  color: #333333 !important;
}

.blog2-content .elementor-widget-text-editor,
.blog2-content .elementor-widget-text-editor p,
.blog2-content .elementor-widget-text-editor li {
  font-family: "PT Serif", serif;
  font-weight: 500;
  font-size: 19px;
  color: #7A7A7A;
  line-height: 1.8em;
}

/* Breathing room between paragraphs and headings inside content */
.blog2-content .elementor-widget-text-editor p { margin-bottom: 1.1em; }
.blog2-content .elementor-widget-heading      { margin-top: 1.8em !important; margin-bottom: 0.6em !important; }
.blog2-content .elementor-widget             { margin-bottom: 2em; }
.blog2-content .elementor-column             { gap: 2em; }
.blog2-content .elementor-widget:last-child  { margin-bottom: 0; }

/* Right: other articles */
.blog2-sidebar {
  flex: 0 0 280px;
  width: 280px;
  display: flex;
  flex-direction: column;
  gap: 18px;
}

.blog2-sidebar-heading {
  font-family: "Racing Sans One", sans-serif;
  font-size: calc(1.3rem + 2px);
  color: #19A7C8;
  margin: 0 0 4px 0;
  padding-bottom: 10px;
  border-bottom: 2px solid #19A7C8;
  text-align: center;
}

/* Sidebar article card */
.blog2-card {
  display: flex;
  flex-direction: column;
  border-radius: 10px;
  overflow: hidden;
  background: #fff;
  box-shadow: 0 4px 16px rgba(0,0,0,0.10);
  text-decoration: none;
  color: inherit;
  transition: transform 0.2s, box-shadow 0.2s;
}

.blog2-card:hover {
  transform: translateY(-3px);
  box-shadow: 0 8px 24px rgba(0,0,0,0.16);
}

.blog2-card img {
  width: 100%;
  height: 160px;
  object-fit: cover;
  display: block;
  margin: 0;
  padding: 0;
  border-radius: 10px 10px 0 0;
}

.blog2-card-title {
  font-family: "Racing Sans One", sans-serif;
  font-size: clamp(calc(0.9rem + 2px), 1.1vw, calc(1.1rem + 2px));
  font-weight: 400;
  color: #19A7C8;
  padding: 18px 12px 22px;
  line-height: 1.25;
  letter-spacing: 0.01em;
}

/* ── Footer ── */
.blog2-footer {
  background: linear-gradient(to right, #355ca7 0%, #0183d0 100%);
  color: #fff;
  padding: 48px 8% 32px;
  display: flex;
  flex-direction: column;
  gap: 32px;
  margin-top: auto;
}

.blog2-footer-top {
  display: flex;
  flex-wrap: wrap;
  gap: 40px;
  justify-content: space-between;
  align-items: flex-start;
}

.blog2-footer-brand img {
  height: 56px;
  width: auto;
}

.blog2-footer-brand p {
  margin: 12px 0 0;
  font-size: 0.9rem;
  color: rgba(255,255,255,0.8);
  max-width: 260px;
  line-height: 1.6;
}

.blog2-footer-nav h4,
.blog2-footer-contact h4 {
  font-family: "Racing Sans One", sans-serif;
  font-size: 1.1rem;
  font-weight: 400;
  margin: 0 0 14px;
  color: #fff;
  letter-spacing: 0.5px;
}

.blog2-footer-nav ul {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.blog2-footer-nav ul li a {
  color: rgba(255,255,255,0.85);
  text-decoration: none;
  font-size: 0.9rem;
  transition: color 0.2s;
}

.blog2-footer-nav ul li a:hover { color: #fff; }

.blog2-footer-contact p {
  margin: 0 0 8px;
  font-size: 0.9rem;
  color: rgba(255,255,255,0.85);
}

.blog2-footer-contact a {
  color: rgba(255,255,255,0.85);
  text-decoration: none;
}

.blog2-footer-contact a:hover { color: #fff; }

.blog2-footer-bottom {
  border-top: 1px solid rgba(255,255,255,0.2);
  padding-top: 20px;
  text-align: center;
  font-size: 0.82rem;
  color: rgba(255,255,255,0.6);
}

/* ── Mobile ── */
@media (max-width: 700px) {
  .blog2-body {
    flex-direction: column;
    padding-left: 5%;
    padding-right: 5%;
    gap: 24px;
  }

  /* Content: no inner padding so hero image sits flush to content box edge */
  .blog2-content {
    flex: none;
    width: 100%;
    box-sizing: border-box;
    padding: 0 !important;
  }

  /* Text/heading widget containers — mobile indent */
  .blog2-content .elementor-widget-text-editor .elementor-widget-container,
  .blog2-content .elementor-widget-heading .elementor-widget-container {
    padding-left: 4% !important;
    padding-right: 4.5% !important;
  }

  .blog2-sidebar {
    flex: none;
    width: 100%;
    display: grid;
    grid-template-columns: repeat(2, 1fr);
  }

  .blog2-sidebar-heading {
    grid-column: 1 / -1;
  }

  .blog2-footer-top {
    flex-direction: column;
    gap: 28px;
  }
}

@media (max-width: 560px) {
  .blog2-sidebar {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 600px) {
  .blog2-page {
    padding-top: 105px;
  }
}

/* ── Hero mobile ── */
@media (max-width: 767px) {
  .blog2-hero {
    margin-top: 45px;
    height: 220px;
    min-height: unset;
  }
}

/* ── First image flush to top of card on mobile ── */
@media (max-width: 700px) {
  /* Zero top padding/margin on first Elementor section (elementor-section pages) */
  .blog2-content > .elementor-section:first-child,
  .blog2-content > .elementor-section:nth-child(2) {
    padding-top: 0 !important;
    margin-top: 0 !important;
  }
  .blog2-content > .elementor-section:first-child .elementor-widget-wrap,
  .blog2-content > .elementor-section:nth-child(2) .elementor-widget-wrap {
    padding-top: 0 !important;
    margin-top: 0 !important;
  }
  /* Zero top on first e-con (e-con pages like basics-of-ecommerce) */
  .blog2-content > .e-con:first-child {
    padding-top: 0 !important;
    margin-top: 0 !important;
  }
  /* First image in card — rounded top corners matching card radius */
  .blog2-content > .elementor-section:first-child .elementor-widget-image img,
  .blog2-content > .elementor-section:nth-child(2) .elementor-widget-image img,
  .blog2-content > .e-con:first-child .elementor-widget-image img {
    border-radius: 10px 10px 0 0 !important;
  }
}

/* ── Unified article typography — catches all pages (Elementor + plain HTML) ── */
.blog2-content h2,
.blog2-content h3,
.blog2-content h4 {
  margin-top: 1.6em !important;
  margin-bottom: 0.5em !important;
  line-height: 1.3 !important;
}
/* Don't over-gap the very first heading */
.blog2-content > *:first-child h2:first-child,
.blog2-content > *:first-child h3:first-child {
  margin-top: 0.6em !important;
}
.blog2-content p {
  line-height: 1.8;
  margin-bottom: 1em;
}
.blog2-content ul,
.blog2-content ol {
  padding-left: 1.4em;
  margin-bottom: 1em;
}
.blog2-content li {
  line-height: 1.7;
  margin-bottom: 0.3em;
}
