html,
body {
    margin: 0;
    padding: 0;
    width: 100%;
    max-width: 100%;
    overflow-x: hidden !important;
    overflow-x: clip !important;
    background: #f8fafc;
}

/* First section top gap is controlled globally in headerv1.5.css. */
body:has(.im-topbar):has(.im-header) .blog-page > .blog-section:first-child,
body:has(.im-topbar):has(.im-header) .elementor-widget-html:has(.blog-section) .blog-section:first-of-type {
    padding-top: var(--im-first-section-top-gap, clamp(1rem, 1.8vw, 1.5rem)) !important;
}

body {
    font-family: "Inter", Arial, sans-serif;
}

.elementor-widget-html:has(.blog-page),
.elementor-widget-container:has(.blog-page),
.elementor-element:has(.blog-page),
.elementor-section:has(.blog-page),
.elementor-column:has(.blog-page) {
    margin: 0 !important;
    padding: 0 !important;
    border: 0 !important;
    outline: 0 !important;
    box-shadow: none !important;
    background: #f8fafc !important;
    overflow: visible !important;
}

.blog-page,
.blog-page * {
    box-sizing: border-box;
}

.blog-page {
    width: 100%;
    max-width: 100%;
    overflow: visible !important;
    background: #f8fafc;
    color: #0f172a;
}

.blog-page,
.blog-section,
.blog-container {
    height: auto !important;
    max-height: none !important;
    overflow-y: visible !important;
}

.blog-page a {
    color: inherit;
    text-decoration: none;
}

.blog-section {
    position: relative;
    overflow: hidden;
    padding: 6rem 0 9rem;
    background: #f8fafc;
}

.blog-watermark {
    position: absolute;
    inset: 0;
    z-index: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    pointer-events: none;
    opacity: 0.04;
    filter: grayscale(1);
    animation: blogSlowFloat 12s ease-in-out infinite;
}

.blog-watermark img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.blog-container {
    position: relative;
    z-index: 1;
    width: min(100% - 2rem, 80rem);
    margin: 0 auto;
}

.blog-header {
    margin-bottom: 5rem;
    text-align: center;
}

.blog-kicker {
    display: inline-flex;
    align-items: center;
    gap: 0.75rem;
    margin-bottom: 2rem;
    padding: 0.5rem 1.25rem;
    border: 1px solid #dbeafe;
    border-radius: 999px;
    background: #ffffff;
    box-shadow: 0 1px 3px rgba(15, 23, 42, 0.08);
    color: #1d4ed8;
    font-size: 0.6875rem;
    font-weight: 900;
    letter-spacing: 0.3em;
    line-height: 1;
    text-transform: uppercase;
}

.blog-kicker span {
    width: 0.5rem;
    height: 0.5rem;
    border-radius: 999px;
    background: #2563eb;
    animation: blogPulse 1.6s ease-in-out infinite;
}

.blog-header h1 {
    margin: 0;
    color: #0f172a;
    font-size: clamp(2.5rem, 6vw, 4.5rem);
    font-weight: 900;
    letter-spacing: 0;
    line-height: 1;
    text-transform: uppercase;
}

.blog-header h1 span {
    display: inline-block;
    background: linear-gradient(135deg, #1d4ed8 0%, #3b82f6 100%);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
    font-style: italic;
}

.blog-featured-root {
    margin-bottom: 5rem;
}

.blog-featured-card {
    display: grid;
    overflow: hidden;
    border: 1px solid #f1f5f9;
    border-radius: 3rem;
    background: #ffffff;
    box-shadow: 0 25px 50px -12px rgba(15, 23, 42, 0.18);
    transition: border-color 0.5s ease, transform 0.5s ease, box-shadow 0.5s ease;
}

.blog-featured-card:hover {
    border-color: #93c5fd;
    transform: translateY(-0.35rem);
    box-shadow: 0 35px 70px -20px rgba(15, 23, 42, 0.22);
}

.blog-featured-media {
    min-height: 18.75rem;
    overflow: hidden;
}

.blog-featured-media img,
.blog-card-media img {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 1s ease;
}

.blog-featured-card:hover .blog-featured-media img {
    transform: scale(1.1);
}

.blog-featured-content {
    display: flex;
    flex-direction: column;
    justify-content: center;
    padding: 2.5rem;
}

.blog-featured-meta {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 1rem;
    margin-bottom: 1.5rem;
}

.blog-featured-meta span {
    padding: 0.5rem 1rem;
    border-radius: 999px;
    background: #2563eb;
    color: #ffffff;
    font-size: 0.625rem;
    font-weight: 800;
    letter-spacing: 0.14em;
    text-transform: uppercase;
}

.blog-featured-meta time,
.blog-card-content time {
    color: #94a3b8;
    font-size: 0.75rem;
    font-weight: 800;
    letter-spacing: 0.12em;
    text-transform: uppercase;
}

.blog-featured-content h2 {
    margin: 0 0 1.5rem;
    color: #0f172a;
    font-size: clamp(2rem, 4vw, 2.5rem);
    font-weight: 900;
    letter-spacing: 0;
    line-height: 1.08;
    text-transform: uppercase;
    transition: color 0.3s ease;
}

.blog-featured-card:hover .blog-featured-content h2,
.blog-card:hover .blog-card-content h3 {
    color: #2563eb;
}

.blog-featured-content p,
.blog-card-content p {
    display: -webkit-box;
    overflow: hidden;
    margin: 0;
    color: #64748b;
    font-weight: 300;
    line-height: 1.7;
    -webkit-box-orient: vertical;
}

.blog-featured-content p {
    margin-bottom: 2.5rem;
    font-size: 1.125rem;
    -webkit-line-clamp: 3;
}

.blog-read-link {
    display: inline-flex;
    align-items: center;
    gap: 0.85rem;
    color: #2563eb;
    font-size: 0.75rem;
    font-weight: 800;
    letter-spacing: 0.2em;
    line-height: 1;
    text-transform: uppercase;
}

.blog-read-link svg {
    width: 1.25rem;
    height: 1.25rem;
    transition: transform 0.3s ease;
}

.blog-featured-card:hover .blog-read-link svg,
.blog-card:hover .blog-read-link svg {
    transform: translateX(0.45rem);
}

.blog-latest {
    margin-bottom: 3rem;
}

.blog-latest h2 {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin: 0 0 3rem;
    color: #0f172a;
    font-size: clamp(1.5rem, 3vw, 1.875rem);
    font-weight: 900;
    letter-spacing: 0;
    line-height: 1.1;
    text-transform: uppercase;
}

.blog-latest h2 span {
    height: 1px;
    flex: 1;
    background: #e2e8f0;
}

.blog-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 2rem;
}

.blog-load-more-wrap {
    display: flex;
    justify-content: center;
    margin-top: 3rem;
}

.blog-load-more-btn {
    border: 1px solid #2563eb;
    border-radius: 1rem;
    background: #ffffff;
    color: #2563eb;
    cursor: pointer;
    font: inherit;
    font-size: 0.75rem;
    font-weight: 900;
    letter-spacing: 0.15em;
    padding: 1rem 2.5rem;
    text-transform: uppercase;
    transition: background 0.3s ease, color 0.3s ease, transform 0.3s ease;
}

.blog-load-more-btn[hidden] {
    display: none !important;
}

.blog-load-more-btn:hover:not(:disabled) {
    background: #2563eb;
    color: #ffffff;
    transform: translateY(-0.15rem);
}

.blog-load-more-btn:disabled {
    cursor: default;
    opacity: 0.6;
    transform: none;
}

.blog-card {
    display: flex;
    min-width: 0;
    overflow: hidden;
    flex-direction: column;
    border: 1px solid #f1f5f9;
    border-radius: 2.5rem;
    background: #ffffff;
    transition: transform 0.5s cubic-bezier(0.4, 0, 0.2, 1), border-color 0.5s ease, box-shadow 0.5s ease;
}

.blog-card:hover {
    border-color: #2563eb;
    transform: translateY(-0.75rem);
    box-shadow: 0 40px 80px -20px rgba(15, 23, 42, 0.12);
}

.blog-card-media {
    height: 16rem;
    overflow: hidden;
}

.blog-card:hover .blog-card-media img {
    transform: scale(1.08);
}

.blog-card-content {
    display: flex;
    flex: 1;
    flex-direction: column;
    padding: 2rem;
}

.blog-card-content time {
    display: block;
    margin-bottom: 1rem;
}

.blog-card-content h3 {
    margin: 0 0 1rem;
    color: #0f172a;
    font-size: 1.25rem;
    font-weight: 800;
    letter-spacing: 0;
    line-height: 1.18;
    text-transform: uppercase;
    transition: color 0.3s ease;
}

.blog-card-content p {
    flex: 1;
    margin-bottom: 2rem;
    font-size: 0.875rem;
    -webkit-line-clamp: 3;
}

.blog-newsletter {
    margin-top: 8rem;
}

.blog-newsletter-panel {
    position: relative;
    overflow: hidden;
    border-radius: 3.5rem;
    background: #0f172a;
    padding: 2.5rem;
    text-align: center;
    box-shadow: 0 25px 50px -12px rgba(15, 23, 42, 0.35);
}

.blog-newsletter-glow {
    position: absolute;
    top: 0;
    right: 0;
    width: 24rem;
    height: 24rem;
    border-radius: 999px;
    background: rgba(37, 99, 235, 0.2);
    filter: blur(100px);
    transform: translate(50%, -50%);
}

.blog-newsletter-content {
    position: relative;
    z-index: 1;
    width: min(100%, 42rem);
    margin: 0 auto;
}

.blog-newsletter h2 {
    margin: 0 0 1.5rem;
    color: #ffffff;
    font-size: clamp(2rem, 4vw, 2.5rem);
    font-weight: 900;
    letter-spacing: 0;
    line-height: 1.1;
    text-transform: uppercase;
}

.blog-newsletter p {
    margin: 0 0 3rem;
    color: rgba(219, 234, 254, 0.7);
    font-size: 1.125rem;
    font-weight: 300;
    line-height: 1.7;
}

.blog-newsletter-form {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.blog-newsletter-form input {
    min-width: 0;
    width: 100%;
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 1rem;
    background: rgba(255, 255, 255, 0.1);
    color: #ffffff;
    font: inherit;
    padding: 1.25rem 2rem;
    outline: none;
    transition: border-color 0.3s ease, box-shadow 0.3s ease;
}

.blog-newsletter-form input::placeholder {
    color: rgba(191, 219, 254, 0.55);
}

.blog-newsletter-form input:focus {
    border-color: rgba(37, 99, 235, 0.75);
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.28);
}

.blog-newsletter-form button {
    border: 0;
    border-radius: 1rem;
    background: #2563eb;
    color: #ffffff;
    cursor: pointer;
    font: inherit;
    font-size: 0.75rem;
    font-weight: 900;
    letter-spacing: 0.15em;
    padding: 1.25rem 2.5rem;
    text-transform: uppercase;
    transition: background 0.3s ease, color 0.3s ease, transform 0.3s ease;
}

.blog-newsletter-form button:hover {
    background: #ffffff;
    color: #2563eb;
    transform: translateY(-0.15rem);
}

.blog-skeleton {
    overflow: hidden;
    border-radius: 2.5rem;
    background: linear-gradient(90deg, #f1f5f9 25%, #e2e8f0 50%, #f1f5f9 75%);
    background-size: 200% 100%;
    animation: blogSkeletonLoading 1.5s infinite;
}

.blog-featured-skeleton {
    height: 31.25rem;
    border-radius: 3rem;
}

.blog-card-skeleton {
    height: 24rem;
}

.blog-empty,
.blog-fallback {
    border: 1px solid #f1f5f9;
    border-radius: 3rem;
    background: #ffffff;
    box-shadow: 0 1px 3px rgba(15, 23, 42, 0.08);
    color: #94a3b8;
    font-weight: 500;
    text-align: center;
}

.blog-empty {
    padding: 5rem 1.5rem;
}

.blog-fallback {
    padding: 5rem 2rem;
    font-style: italic;
}

.blog-fallback p {
    margin: 0;
}

.blog-fade-in-up {
    animation: blogFadeInUp 0.6s ease forwards;
}

.blog-delay-0 { animation-delay: 0ms; }
.blog-delay-1 { animation-delay: 100ms; }
.blog-delay-2 { animation-delay: 200ms; }
.blog-delay-3 { animation-delay: 300ms; }
.blog-delay-4 { animation-delay: 400ms; }
.blog-delay-5 { animation-delay: 500ms; }

@keyframes blogSlowFloat {
    0%,
    100% {
        transform: translateY(0);
    }
    50% {
        transform: translateY(-15px);
    }
}

@keyframes blogPulse {
    0%,
    100% {
        opacity: 1;
    }
    50% {
        opacity: 0.4;
    }
}

@keyframes blogFadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes blogSkeletonLoading {
    0% {
        background-position: 200% 0;
    }
    100% {
        background-position: -200% 0;
    }
}

@media (min-width: 640px) {
    .blog-newsletter-form {
        flex-direction: row;
    }

    .blog-newsletter-form input {
        flex: 1;
    }
}

@media (min-width: 768px) {
    .blog-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (min-width: 1024px) {
    .blog-section {
        padding: 9rem 0;
    }

    .blog-featured-root {
        margin-bottom: 7rem;
    }

    .blog-featured-card {
        grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
    }

    .blog-featured-media {
        min-height: 31.25rem;
    }

    .blog-featured-content {
        padding: 4rem;
    }

    .blog-grid {
        grid-template-columns: repeat(3, minmax(0, 1fr));
        gap: 2.5rem;
    }

    .blog-newsletter-panel {
        padding: 5rem;
    }
}

@media (max-width: 767px) {
    .blog-section {
        padding: 4.5rem 0 6rem;
    }

    .blog-header {
        margin-bottom: 3.5rem;
    }

    .blog-kicker {
        max-width: 100%;
        letter-spacing: 0.18em;
    }

    .blog-featured-root {
        margin-bottom: 4rem;
    }

    .blog-featured-card {
        border-radius: 2rem;
    }

    .blog-featured-media {
        min-height: 16rem;
    }

    .blog-featured-content,
    .blog-card-content {
        padding: 1.5rem;
    }

    .blog-latest h2 {
        align-items: flex-start;
        flex-direction: column;
    }

    .blog-latest h2 span {
        width: 100%;
        flex: none;
    }

    .blog-newsletter {
        margin-top: 5rem;
    }

    .blog-newsletter-panel {
        border-radius: 2rem;
        padding: 2rem 1.25rem;
    }
}

/* Services hero title treatment - exact Our Services copy */
.blog-header h1 {
  margin: 0;
  color: #0f172a !important;
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Arial, sans-serif !important;
  font-size: clamp(3rem, 7vw, 5.75rem) !important;
  font-weight: 900 !important;
  line-height: 0.95 !important;
  text-align: left !important;
  text-shadow: none !important;
  text-transform: uppercase !important;
  letter-spacing: 0 !important;
}

.blog-header h1 span,
.blog-header h1 em {
  color: transparent !important;
  font-size: 1em !important;
  font-style: italic !important;
  text-shadow: none !important;
  -webkit-text-stroke: 0 !important;
  -webkit-text-fill-color: transparent !important;
  background: linear-gradient(90deg, #1d4ed8 0%, #3b82f6 55%, #60a5fa 100%) !important;
  -webkit-background-clip: text !important;
  background-clip: text !important;
}

@media (max-width: 680px) {
  .blog-header h1 {
    font-size: clamp(2rem, 11vw, 2.85rem) !important;
  }
}

@media (max-width: 1024px) {
  .blog-header h1 { text-align: center !important; }
}
