:root {
    --ergar-primary: #263f78;
    --ergar-primary-dark: #16294f;
    --ergar-secondary: #ef7d00;
    --ergar-secondary-dark: #c95f00;
    --ergar-light: #f5f7fb;
    --ergar-border: #e4e8f0;
    --ergar-text: #1e293b;
    --ergar-muted: #64748b;
    --ergar-white: #ffffff;
    --ergar-radius: 22px;
    --ergar-shadow: 0 20px 50px rgba(26, 48, 91, .12);
}

* {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    margin: 0;
    color: var(--ergar-text);
    background: var(--ergar-white);
    font-family: Inter, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
    line-height: 1.65;
}

a {
    color: inherit;
}

img {
    max-width: 100%;
}

.topbar {
    color: #fff;
    background: var(--ergar-primary-dark);
    font-size: .92rem;
}

.topbar a {
    color: #fff;
    text-decoration: none;
}

.site-navbar {
    background: rgba(255, 255, 255, .97);
    border-bottom: 1px solid rgba(38, 63, 120, .08);
    box-shadow: 0 7px 25px rgba(22, 41, 79, .06);
}

.navbar-brand img {
    width: 190px;
    max-height: 72px;
    object-fit: contain;
}

.nav-link {
    color: var(--ergar-primary-dark);
    font-weight: 650;
}

.nav-link:hover,
.nav-link:focus {
    color: var(--ergar-secondary);
}

.btn-ergar {
    color: #fff;
    background: var(--ergar-secondary);
    border: 1px solid var(--ergar-secondary);
    font-weight: 700;
    border-radius: 12px;
    padding: .78rem 1.25rem;
}

.btn-ergar:hover {
    color: #fff;
    background: var(--ergar-secondary-dark);
    border-color: var(--ergar-secondary-dark);
    transform: translateY(-1px);
}

.btn-outline-ergar {
    color: var(--ergar-primary);
    background: #fff;
    border: 1px solid rgba(38, 63, 120, .35);
    font-weight: 700;
    border-radius: 12px;
    padding: .78rem 1.25rem;
}

.btn-outline-ergar:hover {
    color: #fff;
    background: var(--ergar-primary);
    border-color: var(--ergar-primary);
}

.hero {
    position: relative;
    overflow: hidden;
    color: #fff;
    background:
        linear-gradient(115deg, rgba(18, 36, 72, .98), rgba(38, 63, 120, .91)),
        radial-gradient(circle at 80% 20%, rgba(239, 125, 0, .45), transparent 36%);
    padding: 94px 0 88px;
}

.hero::before {
    content: "";
    position: absolute;
    top: -170px;
    right: -120px;
    width: 520px;
    height: 520px;
    border: 80px solid rgba(255, 255, 255, .04);
    border-radius: 50%;
}

.hero::after {
    content: "";
    position: absolute;
    left: 4%;
    bottom: -120px;
    width: 280px;
    height: 280px;
    border-radius: 60px;
    background: rgba(239, 125, 0, .11);
    transform: rotate(34deg);
}

.hero .container {
    position: relative;
    z-index: 2;
}

.hero-badge {
    display: inline-flex;
    align-items: center;
    gap: .55rem;
    padding: .55rem .85rem;
    border: 1px solid rgba(255, 255, 255, .22);
    border-radius: 999px;
    background: rgba(255, 255, 255, .08);
    font-weight: 700;
    font-size: .92rem;
}

.hero h1 {
    max-width: 760px;
    margin: 1.25rem 0;
    font-size: clamp(2.3rem, 5vw, 4.45rem);
    line-height: 1.04;
    font-weight: 850;
    letter-spacing: -.045em;
}

.hero p {
    max-width: 690px;
    color: rgba(255, 255, 255, .84);
    font-size: 1.14rem;
}

.hero-panel {
    padding: 30px;
    color: var(--ergar-text);
    background: #fff;
    border-radius: var(--ergar-radius);
    box-shadow: 0 30px 80px rgba(4, 13, 34, .28);
}

.hero-panel-label {
    color: var(--ergar-secondary);
    font-weight: 800;
    letter-spacing: .08em;
    text-transform: uppercase;
    font-size: .78rem;
}

.stat-strip {
    position: relative;
    z-index: 3;
    margin-top: -36px;
}

.stat-card {
    height: 100%;
    padding: 24px;
    background: #fff;
    border: 1px solid var(--ergar-border);
    border-radius: 18px;
    box-shadow: var(--ergar-shadow);
}

.stat-number {
    color: var(--ergar-primary);
    font-weight: 850;
    font-size: 1.6rem;
}

.section {
    padding: 88px 0;
}

.section-soft {
    background: var(--ergar-light);
}

.section-label {
    display: inline-block;
    margin-bottom: .7rem;
    color: var(--ergar-secondary);
    font-size: .82rem;
    font-weight: 850;
    text-transform: uppercase;
    letter-spacing: .1em;
}

.section-title {
    margin-bottom: 1rem;
    color: var(--ergar-primary-dark);
    font-size: clamp(2rem, 3vw, 3rem);
    font-weight: 850;
    letter-spacing: -.035em;
}

.section-text {
    color: var(--ergar-muted);
    font-size: 1.06rem;
}

.service-card {
    height: 100%;
    padding: 30px;
    background: #fff;
    border: 1px solid var(--ergar-border);
    border-radius: var(--ergar-radius);
    transition: transform .2s ease, box-shadow .2s ease, border-color .2s ease;
}

.service-card:hover {
    transform: translateY(-6px);
    border-color: rgba(239, 125, 0, .45);
    box-shadow: var(--ergar-shadow);
}

.service-icon {
    display: grid;
    width: 58px;
    height: 58px;
    margin-bottom: 20px;
    place-items: center;
    color: #fff;
    background: linear-gradient(135deg, var(--ergar-secondary), #ff9a35);
    border-radius: 17px;
    font-size: 1.45rem;
    font-weight: 850;
}

.service-card h3 {
    color: var(--ergar-primary-dark);
    font-size: 1.25rem;
    font-weight: 800;
}

.service-card p {
    color: var(--ergar-muted);
}

.feature-panel {
    padding: 42px;
    color: #fff;
    background: linear-gradient(135deg, var(--ergar-primary-dark), var(--ergar-primary));
    border-radius: 30px;
    box-shadow: var(--ergar-shadow);
}

.feature-item {
    display: flex;
    gap: 14px;
    margin-bottom: 20px;
}

.feature-check {
    flex: 0 0 34px;
    display: grid;
    width: 34px;
    height: 34px;
    place-items: center;
    color: #fff;
    background: var(--ergar-secondary);
    border-radius: 50%;
    font-weight: 900;
}

.process-card {
    position: relative;
    height: 100%;
    padding: 30px;
    background: #fff;
    border: 1px solid var(--ergar-border);
    border-radius: var(--ergar-radius);
}

.process-number {
    display: inline-grid;
    width: 44px;
    height: 44px;
    margin-bottom: 18px;
    place-items: center;
    color: #fff;
    background: var(--ergar-primary);
    border-radius: 13px;
    font-weight: 850;
}

.page-hero {
    color: #fff;
    background:
        linear-gradient(120deg, rgba(18, 36, 72, .98), rgba(38, 63, 120, .92)),
        radial-gradient(circle at 80% 10%, rgba(239, 125, 0, .44), transparent 35%);
    padding: 76px 0;
}

.page-hero h1 {
    margin: 0;
    font-weight: 850;
    letter-spacing: -.035em;
}

.content-card,
.contact-card,
.form-card {
    padding: 34px;
    background: #fff;
    border: 1px solid var(--ergar-border);
    border-radius: var(--ergar-radius);
    box-shadow: 0 16px 45px rgba(22, 41, 79, .08);
}

.form-control,
.form-select {
    min-height: 50px;
    border-color: #d9dfeb;
    border-radius: 12px;
}

.form-control:focus,
.form-select:focus {
    border-color: var(--ergar-secondary);
    box-shadow: 0 0 0 .25rem rgba(239, 125, 0, .12);
}

.cta-box {
    padding: 48px;
    color: #fff;
    background:
        linear-gradient(125deg, rgba(239, 125, 0, .97), rgba(203, 92, 0, .97));
    border-radius: 30px;
    box-shadow: 0 24px 60px rgba(239, 125, 0, .22);
}

.site-footer {
    color: rgba(255, 255, 255, .78);
    background: #111f3d;
    padding: 64px 0 24px;
}

.site-footer h5 {
    color: #fff;
    font-weight: 800;
}

.site-footer a {
    color: rgba(255, 255, 255, .78);
    text-decoration: none;
}

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

.footer-logo {
    width: 190px;
    padding: 10px;
    background: #fff;
    border-radius: 14px;
}

.preview-warning {
    padding: 10px 16px;
    color: #fff;
    background: #a93d00;
    text-align: center;
    font-size: .9rem;
    font-weight: 750;
}

.skip-link {
    position: absolute;
    top: -100px;
    left: 10px;
    z-index: 10000;
    padding: 10px 14px;
    color: #fff;
    background: #000;
}

.skip-link:focus {
    top: 10px;
}

@media (max-width: 991.98px) {
    .hero {
        padding: 70px 0;
    }

    .hero-panel {
        margin-top: 30px;
    }

    .stat-strip {
        margin-top: 24px;
    }

    .section {
        padding: 64px 0;
    }

    .feature-panel,
    .cta-box {
        padding: 30px;
    }
}

/* ==========================================================
   ERGAR FLOATING WHATSAPP
   ========================================================== */

.floating-whatsapp {
    position: fixed;
    right: 22px;
    bottom: 22px;
    z-index: 1080;
    display: inline-flex;
    align-items: center;
    gap: 10px;
    min-height: 58px;
    padding: 8px 18px 8px 12px;
    color: #fff;
    background: #25d366;
    border: 2px solid rgba(255, 255, 255, .78);
    border-radius: 999px;
    box-shadow:
        0 14px 35px rgba(10, 31, 68, .25),
        0 5px 15px rgba(37, 211, 102, .28);
    font-size: .95rem;
    font-weight: 800;
    line-height: 1;
    text-decoration: none;
    transition:
        transform .2s ease,
        box-shadow .2s ease,
        background-color .2s ease;
}

.floating-whatsapp:hover,
.floating-whatsapp:focus-visible {
    color: #fff;
    background: #1fbd59;
    box-shadow:
        0 18px 42px rgba(10, 31, 68, .28),
        0 7px 18px rgba(37, 211, 102, .34);
    transform: translateY(-3px);
}

.floating-whatsapp-icon {
    display: grid;
    width: 40px;
    height: 40px;
    place-items: center;
    flex: 0 0 40px;
    color: #25d366;
    background: #fff;
    border-radius: 50%;
}

.floating-whatsapp-icon svg {
    display: block;
}

.floating-whatsapp-label {
    white-space: nowrap;
}

@media (max-width: 575.98px) {
    .floating-whatsapp {
        right: 14px;
        bottom: 14px;
        width: 58px;
        height: 58px;
        min-height: 58px;
        padding: 7px;
        justify-content: center;
    }

    .floating-whatsapp-icon {
        width: 40px;
        height: 40px;
        flex-basis: 40px;
    }

    .floating-whatsapp-label {
        position: absolute;
        width: 1px;
        height: 1px;
        overflow: hidden;
        clip: rect(0 0 0 0);
        white-space: nowrap;
    }
}

/* ==========================================================
   ERGAR HOMEPAGE SLIDER
   ========================================================== */

.home-slider {
    position: relative;
    overflow: hidden;
    background: #122b5c;
}

.home-slider .carousel,
.home-slider .carousel-inner,
.home-slider .carousel-item {
    min-height: 620px;
}

.home-slider .carousel-item {
    position: relative;
    height: 620px;
    overflow: hidden;
}

.ergar-slider-image {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center;
}

.ergar-slider-placeholder {
    background:
        radial-gradient(
            circle at 78% 25%,
            rgba(48, 107, 196, .44),
            transparent 33%
        ),
        linear-gradient(
            135deg,
            #162b59 0%,
            #263f78 55%,
            #0d2249 100%
        );
}

.ergar-slider-overlay {
    position: absolute;
    inset: 0;
    z-index: 1;
    background:
        linear-gradient(
            90deg,
            rgba(6, 20, 48, var(--ergar-slide-overlay, .55)) 0%,
            rgba(6, 20, 48, calc(var(--ergar-slide-overlay, .55) * .78)) 55%,
            rgba(6, 20, 48, calc(var(--ergar-slide-overlay, .55) * .48)) 100%
        );
}

.ergar-slider-caption {
    inset: 0;
    z-index: 2;
    display: flex;
    align-items: center;
    padding: 0;
    text-align: left;
}

.ergar-slider-caption .container {
    width: 100%;
}

.ergar-slider-content {
    max-width: 780px;
    padding: 70px 70px 70px 0;
    color: #fff;
}

.ergar-slider-content h2 {
    max-width: 760px;
    margin: 18px 0;
    color: #fff;
    font-size: clamp(2.35rem, 5vw, 4.75rem);
    font-weight: 900;
    line-height: .98;
    letter-spacing: -.045em;
}

.ergar-slider-content p {
    max-width: 680px;
    margin-bottom: 0;
    color: rgba(255, 255, 255, .83);
    font-size: clamp(1rem, 1.5vw, 1.22rem);
    line-height: 1.75;
}

.ergar-slider-content-center {
    margin-right: auto;
    margin-left: auto;
    padding-right: 0;
    text-align: center;
}

.ergar-slider-content-center h2,
.ergar-slider-content-center p {
    margin-right: auto;
    margin-left: auto;
}

.ergar-slider-content-center .ergar-slider-actions {
    justify-content: center;
}

.ergar-slider-content-right {
    margin-left: auto;
    padding-right: 0;
    text-align: right;
}

.ergar-slider-content-right h2,
.ergar-slider-content-right p {
    margin-left: auto;
}

.ergar-slider-content-right .ergar-slider-actions {
    justify-content: flex-end;
}

.home-slider .carousel-indicators {
    z-index: 4;
    gap: 7px;
    margin-bottom: 25px;
}

.home-slider .carousel-indicators button {
    width: 32px;
    height: 4px;
    margin: 0;
    border: 0;
    border-radius: 999px;
}

.home-slider .carousel-control-prev,
.home-slider .carousel-control-next {
    z-index: 4;
    width: 70px;
}

.home-slider .carousel-control-prev-icon,
.home-slider .carousel-control-next-icon {
    width: 46px;
    height: 46px;
    padding: 11px;
    background-color: rgba(7, 24, 55, .58);
    background-size: 46%;
    border: 1px solid rgba(255, 255, 255, .38);
    border-radius: 50%;
    backdrop-filter: blur(8px);
}

@media (max-width: 991.98px) {
    .home-slider .carousel,
    .home-slider .carousel-inner,
    .home-slider .carousel-item {
        min-height: 590px;
    }

    .home-slider .carousel-item {
        height: 590px;
    }

    .ergar-slider-content {
        max-width: 690px;
        padding-right: 30px;
        padding-left: 30px;
    }

    .home-slider .carousel-control-prev,
    .home-slider .carousel-control-next {
        width: 52px;
    }
}

@media (max-width: 767.98px) {
    .home-slider .carousel,
    .home-slider .carousel-inner,
    .home-slider .carousel-item {
        min-height: 650px;
    }

    .home-slider .carousel-item {
        height: 650px;
    }

    .ergar-slider-overlay {
        background:
            linear-gradient(
                180deg,
                rgba(6, 20, 48, calc(var(--ergar-slide-overlay, .55) * .55)) 0%,
                rgba(6, 20, 48, calc(var(--ergar-slide-overlay, .55) * .82)) 48%,
                rgba(6, 20, 48, var(--ergar-slide-overlay, .55)) 100%
            );
    }

    .ergar-slider-caption {
        align-items: flex-end;
    }

    .ergar-slider-content,
    .ergar-slider-content-center,
    .ergar-slider-content-right {
        max-width: none;
        padding: 55px 22px 85px;
        text-align: left;
    }

    .ergar-slider-content h2,
    .ergar-slider-content p {
        margin-right: 0;
        margin-left: 0;
    }

    .ergar-slider-content-center .ergar-slider-actions,
    .ergar-slider-content-right .ergar-slider-actions {
        justify-content: flex-start;
    }

    .ergar-slider-content h2 {
        font-size: clamp(2.2rem, 11vw, 3.5rem);
    }

    .home-slider .carousel-control-prev,
    .home-slider .carousel-control-next {
        display: none;
    }
}

/* ==========================================================
   ERGAR BLOG FRONTEND
   ========================================================== */

.blog-list-section {
    background: #f5f7fb;
}

.blog-card {
    overflow: hidden;
    background: #fff;
    border: 1px solid rgba(20, 45, 88, .1);
    border-radius: 18px;
    box-shadow: 0 14px 38px rgba(18, 42, 84, .08);
}

.blog-card-image {
    display: block;
    aspect-ratio: 16 / 9;
    overflow: hidden;
    background: #eaf0f8;
}

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

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

.blog-card-body {
    padding: 24px;
}

.blog-category {
    display: inline-flex;
    padding: 6px 10px;
    color: #17458e;
    background: #eaf1ff;
    border-radius: 999px;
    font-size: .72rem;
    font-weight: 800;
    letter-spacing: .04em;
}

.blog-card-title {
    margin: 15px 0 11px;
    font-size: 1.25rem;
    font-weight: 900;
    line-height: 1.3;
}

.blog-card-title a {
    color: #122b57;
    text-decoration: none;
}

.blog-card-body p {
    color: #68758a;
    line-height: 1.7;
}

.blog-card-meta {
    display: flex;
    justify-content: space-between;
    gap: 12px;
    margin-top: 20px;
    font-size: .82rem;
}

.blog-card-meta span {
    color: #7b8799;
}

.blog-card-meta a {
    color: #17458e;
    font-weight: 800;
    text-decoration: none;
}

.blog-post-hero {
    padding: clamp(70px, 9vw, 125px) 0;
    color: #fff;
    background:
        radial-gradient(
            circle at 85% 20%,
            rgba(73, 119, 204, .38),
            transparent 31%
        ),
        linear-gradient(
            135deg,
            #112a58 0%,
            #263f78 58%,
            #10234a 100%
        );
}

.blog-post-hero h1 {
    max-width: 960px;
    margin: 18px 0;
    color: #fff;
    font-size: clamp(2.3rem, 5vw, 4.6rem);
    font-weight: 900;
    line-height: 1.03;
    letter-spacing: -.045em;
}

.blog-post-hero p {
    max-width: 780px;
    color: rgba(255, 255, 255, .82);
    font-size: 1.08rem;
    line-height: 1.75;
}

.blog-post-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 18px;
    margin-top: 26px;
    color: rgba(255, 255, 255, .72);
    font-size: .88rem;
}

.blog-post-cover {
    overflow: hidden;
    margin-top: -46px;
    margin-bottom: 0;
    border-radius: 22px;
    box-shadow: 0 20px 55px rgba(16, 39, 79, .18);
}

.blog-post-cover img {
    display: block;
    width: 100%;
    max-height: 620px;
    object-fit: cover;
}

.blog-post-section {
    background: #f5f7fb;
}

.blog-post-content {
    font-size: 1.06rem;
    line-height: 1.9;
}

.blog-post-content p:last-child {
    margin-bottom: 0;
}

.blog-author-card {
    border-left: 4px solid #17458e;
}

/* ERGAR SAFE RICH BLOG CONTENT */

.blog-post-content h2,
.blog-post-content h3,
.blog-post-content h4 {
    margin-top: 2rem;
    margin-bottom: .9rem;
    color: #122b57;
    font-weight: 900;
    line-height: 1.25;
}

.blog-post-content ul,
.blog-post-content ol {
    margin-bottom: 1.4rem;
    padding-left: 1.5rem;
}

.blog-post-content li {
    margin-bottom: .45rem;
}

.blog-post-content blockquote {
    margin: 1.8rem 0;
    padding: 1.2rem 1.4rem;
    color: #344760;
    background: #eef3fb;
    border-left: 4px solid #17458e;
    border-radius: 0 12px 12px 0;
}

.blog-post-content img {
    display: block;
    width: auto;
    max-width: 100%;
    height: auto;
    margin: 1.8rem auto;
    border-radius: 14px;
}

.blog-post-content pre {
    overflow-x: auto;
    padding: 1.2rem;
    color: #eef3ff;
    background: #10234a;
    border-radius: 12px;
}

.blog-post-content code {
    font-size: .9em;
}

.blog-post-content a {
    color: #17458e;
    font-weight: 700;
    text-decoration-thickness: 1px;
    text-underline-offset: 3px;
}

/* ==========================================================
   ERGAR BLOG TOC, FAQ AND RELATED CONTENT
   ========================================================== */

.blog-breadcrumb {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 22px;
    color: rgba(255, 255, 255, .64);
    font-size: .82rem;
}

.blog-breadcrumb a {
    color: rgba(255, 255, 255, .82);
    text-decoration: none;
}

.blog-toc-card {
    position: sticky;
    top: 105px;
    padding: 20px;
    background: #fff;
    border: 1px solid rgba(20, 45, 88, .1);
    border-radius: 16px;
    box-shadow: 0 14px 34px rgba(18, 42, 84, .07);
}

.blog-toc-card strong {
    display: block;
    margin-bottom: 13px;
    color: #122b57;
}

.blog-toc-card nav {
    display: grid;
    gap: 9px;
}

.blog-toc-card a {
    color: #536176;
    font-size: .84rem;
    line-height: 1.45;
    text-decoration: none;
}

.blog-toc-card a:hover {
    color: #17458e;
}

.blog-toc-card .toc-level-3 {
    padding-left: 14px;
    font-size: .79rem;
}

.blog-faq-section {
    padding: 28px;
    background: #fff;
    border: 1px solid rgba(20, 45, 88, .1);
    border-radius: 18px;
}

.blog-faq-item {
    margin-bottom: 10px;
    overflow: hidden;
    background: #f7f9fc;
    border: 1px solid rgba(20, 45, 88, .08);
    border-radius: 12px;
}

.blog-faq-item summary {
    padding: 17px 18px;
    color: #122b57;
    cursor: pointer;
    font-weight: 850;
}

.blog-faq-item div {
    padding: 0 18px 18px;
    color: #647187;
    line-height: 1.75;
}

.blog-related-section {
    background: #fff;
}

.blog-related-posts-section {
    background: #f5f7fb;
}

.blog-post-content h2,
.blog-post-content h3 {
    scroll-margin-top: 110px;
}

@media (max-width: 991.98px) {
    .blog-toc-card {
        position: static;
    }
}

/* ==========================================================
   ERGAR DYNAMIC HEADER, FOOTER AND SOCIAL
   ========================================================== */

.site-header {
    position: relative;
    z-index: 1040;
}

.site-header .site-navbar:not(.sticky-top) {
    position: relative;
}

.navbar-brand img {
    width: auto;
    max-width: min(190px, 48vw);
    height: auto;
    max-height: 72px;
    object-fit: contain;
}

.footer-link-list {
    display: grid;
    gap: 10px;
}

.footer-link-list a {
    color: rgba(255,255,255,.72);
    text-decoration: none;
    transition:
        color .2s ease,
        transform .2s ease;
}

.footer-link-list a:hover {
    color: #fff;
    transform: translateX(3px);
}

.footer-social-links {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 20px;
}

.footer-social-links a {
    display: inline-flex;
    align-items: center;
    min-height: 36px;
    padding: 7px 11px;
    color: #fff;
    background: rgba(255,255,255,.08);
    border: 1px solid rgba(255,255,255,.13);
    border-radius: 999px;
    font-size: .75rem;
    font-weight: 800;
    text-decoration: none;
}

.footer-social-links a:hover {
    color: #122b57;
    background: #ffc447;
    border-color: #ffc447;
}

@media (max-width: 991.98px) {
    .site-navbar .navbar-collapse {
        max-height: calc(100vh - 120px);
        overflow-y: auto;
    }

    .site-navbar .navbar-nav {
        align-items: stretch !important;
        padding: 16px 0;
    }

    .site-navbar .nav-link {
        padding: 10px 12px;
        border-radius: 8px;
    }
}
