:root {
    --ink: #0c1728;
    --ink-soft: #48566a;
    --paper: #f4f6f8;
    --surface: #ffffff;
    --line: #dce3ea;
    --accent: #0f766e;
    --accent-hover: #0d9488;
    --hero: #0b1220;
    --hero-muted: #c5d0db;
    --display: "Segoe UI", system-ui, -apple-system, sans-serif;
    --body: "Segoe UI", system-ui, -apple-system, sans-serif;
}

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

.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

html {
    scroll-behavior: smooth;
    -webkit-text-size-adjust: 100%;
}

body {
    margin: 0;
    overflow-x: hidden;
    background: var(--paper);
    color: var(--ink);
    font-family: var(--body);
    font-size: 1rem;
    line-height: 1.65;
    -webkit-font-smoothing: antialiased;
}

h1, h2, h3, h4, h5, h6 {
    color: var(--ink);
    font-family: var(--display);
    font-weight: 650;
    letter-spacing: -0.025em;
    line-height: 1.2;
}

a {
    color: var(--accent);
    transition: color 0.2s ease, background-color 0.2s ease, border-color 0.2s ease;
}

a:hover {
    color: var(--accent-hover);
}

img {
    max-width: 100%;
}

.container {
    width: 100% !important;
    max-width: 1200px !important;
    margin-right: auto;
    margin-left: auto;
    padding-right: 1.25rem !important;
    padding-left: 1.25rem !important;
}

@media (min-width: 768px) {
    .container {
        padding-right: 1.75rem !important;
        padding-left: 1.75rem !important;
    }
}

.content-max-width {
    max-width: 1200px;
    margin-right: auto;
    margin-left: auto;
}

/* Shared navigation */
.emex-navbar {
    min-height: 76px;
    padding: 0.65rem 0;
    border-bottom: 1px solid rgba(12, 23, 40, 0.08);
    background: rgba(255, 255, 255, 0.97) !important;
    box-shadow: 0 4px 20px rgba(12, 23, 40, 0.05) !important;
    backdrop-filter: blur(14px);
}

.emex-brand {
    display: inline-flex;
    align-items: center;
    text-decoration: none;
    padding: 0;
}

.emex-brand img {
    height: 40px;
    width: auto;
    display: block;
}

.emex-navbar .navbar-nav {
    align-items: center;
}

.emex-navbar .nav-link {
    padding: 0.55rem 0.7rem !important;
    border-radius: 7px;
    color: var(--ink-soft) !important;
    font-size: 0.92rem;
    font-weight: 550;
}

.emex-navbar .nav-link:hover,
.emex-navbar .nav-link:focus {
    background: #eef7f6;
    color: var(--accent) !important;
}

.emex-navbar .navbar-toggler:focus {
    box-shadow: 0 0 0 3px rgba(15, 118, 110, 0.16);
}

.language-selector-nav {
    display: flex;
    align-items: center;
    gap: 0.35rem;
}

.btn-language {
    display: inline-flex;
    min-width: 42px;
    min-height: 36px;
    align-items: center;
    justify-content: center;
    padding: 0.35rem 0.55rem;
    border: 1px solid transparent;
    border-radius: 7px;
    background: transparent;
    color: var(--ink-soft);
    font-size: 0.8rem;
    font-weight: 700;
    text-decoration: none;
}

.btn-language:hover,
.btn-language.active {
    border-color: var(--line);
    background: var(--paper);
    color: var(--accent);
}

.btn-primary,
.btn.btn-primary {
    border-color: var(--accent) !important;
    border-radius: 8px;
    background: var(--accent) !important;
    color: #fff !important;
    font-weight: 650;
}

.btn-primary:hover,
.btn.btn-primary:hover {
    border-color: var(--accent-hover) !important;
    background: var(--accent-hover) !important;
    color: #fff !important;
    transform: translateY(-1px);
}

/* Shared public-page elements */
main > section {
    position: relative;
}

main h1 {
    font-size: clamp(2rem, 4vw, 3rem);
}

main h2 {
    font-size: clamp(1.55rem, 3vw, 2.25rem);
}

main p {
    color: var(--ink-soft);
}

main section[style*="linear-gradient(135deg, #1e40af"] {
    background: var(--hero) !important;
    color: #fff;
}

main section[style*="linear-gradient(135deg, #1e40af"] h1,
main section[style*="linear-gradient(135deg, #1e40af"] h2,
main section[style*="linear-gradient(135deg, #1e40af"] p {
    color: #fff;
}

main section[style*="linear-gradient(135deg, #1e40af"] p {
    color: var(--hero-muted);
}

main [style*="color: #1e40af"] {
    color: var(--accent) !important;
}

main [style*="color: #666"],
main [style*="color: #555"] {
    color: var(--ink-soft) !important;
}

main [style*="background: #1e40af"],
main [style*="background: #ea580c"] {
    background: var(--accent) !important;
}

main a[style*="color: #ea580c"] {
    color: #5eead4 !important;
}

main [style*="box-shadow"] {
    border-radius: 14px !important;
    box-shadow: 0 12px 32px rgba(12, 23, 40, 0.07) !important;
}

main [style*="grid-template-columns: repeat(auto-fit"] {
    grid-template-columns: repeat(auto-fit, minmax(min(100%, 280px), 1fr)) !important;
}

main [style*="grid-template-columns: 1fr 1fr"] {
    grid-template-columns: repeat(auto-fit, minmax(min(100%, 320px), 1fr)) !important;
}

input,
select,
textarea {
    max-width: 100%;
}

input:focus,
select:focus,
textarea:focus {
    border-color: var(--accent) !important;
    outline: 3px solid rgba(15, 118, 110, 0.14);
    outline-offset: 1px;
}

/* Homepage */
.home-hero {
    position: relative;
    overflow: hidden;
    padding: clamp(4rem, 9vw, 7.5rem) 0;
    background:
        radial-gradient(ellipse at 84% 18%, rgba(15, 118, 110, 0.38), transparent 34%),
        radial-gradient(ellipse at 100% 100%, rgba(45, 212, 191, 0.12), transparent 40%),
        var(--hero);
    color: #fff;
}

.home-hero::after {
    position: absolute;
    top: 0;
    right: -8rem;
    width: min(48vw, 620px);
    height: 100%;
    background-image: linear-gradient(rgba(255, 255, 255, 0.045) 1px, transparent 1px), linear-gradient(90deg, rgba(255, 255, 255, 0.045) 1px, transparent 1px);
    background-size: 42px 42px;
    content: "";
    mask-image: linear-gradient(90deg, transparent, #000 55%, transparent);
    pointer-events: none;
}

.home-hero-copy {
    position: relative;
    z-index: 1;
    max-width: 780px;
}

.home-hero-eyebrow,
.section-label {
    display: inline-block;
    margin-bottom: 1rem;
    color: #5eead4;
    font-size: 0.77rem;
    font-weight: 700;
    letter-spacing: 0.14em;
    text-transform: uppercase;
}

.home-hero h1 {
    max-width: 17ch;
    margin: 0 0 1.25rem;
    color: #f3f6fa;
    font-size: clamp(2.5rem, 6vw, 4.7rem);
    font-weight: 700;
    letter-spacing: -0.055em;
    line-height: 1.06;
}

.home-hero h1 span {
    color: #5eead4;
}

.home-hero-lead {
    max-width: 60ch;
    margin: 0 0 2rem;
    color: var(--hero-muted);
    font-size: clamp(1.05rem, 2vw, 1.2rem);
    line-height: 1.8;
}

.home-hero-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 0.8rem;
}

.home-hero-actions .btn {
    display: inline-flex;
    min-height: 48px;
    align-items: center;
    justify-content: center;
    padding: 0.75rem 1.3rem;
    text-decoration: none;
}

.home-hero-actions .btn-outline-light {
    border-color: rgba(255, 255, 255, 0.35);
    color: #fff;
}

.home-hero-actions .btn-outline-light:hover {
    border-color: #fff;
    background: rgba(255, 255, 255, 0.08);
}

.trust-line {
    border-bottom: 1px solid var(--line);
    background: var(--surface);
}

.trust-line-inner {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: center;
    gap: 0.75rem 1.4rem;
    padding-top: 1.1rem;
    padding-bottom: 1.1rem;
    color: var(--ink-soft);
    font-size: 0.9rem;
    text-align: center;
}

.trust-item {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
}

.trust-item strong {
    color: var(--ink);
    font-weight: 700;
}

.trust-sep {
    color: #b7c2ce;
}

.home-services {
    padding: clamp(3.5rem, 7vw, 5.5rem) 0;
    background: var(--paper);
}

.home-services h2 {
    margin: 0 0 0.75rem;
    font-size: clamp(1.8rem, 3vw, 2.5rem);
}

.home-section-intro {
    max-width: 700px;
    margin: 0 auto 2.5rem;
    text-align: center;
}

.home-services .section-label {
    margin-bottom: 0.6rem;
    color: var(--accent);
}

.services-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(min(100%, 290px), 1fr));
    gap: 1.15rem;
    margin: 2rem 0;
}

.service-card {
    display: flex;
    min-height: 100%;
    flex-direction: column;
    padding: 1.7rem;
    border: 1px solid var(--line);
    border-radius: 14px;
    background: var(--surface);
    box-shadow: 0 4px 16px rgba(12, 23, 40, 0.035);
    transition: transform 0.2s ease, border-color 0.2s ease, box-shadow 0.2s ease;
}

.service-card:hover {
    transform: translateY(-4px);
    border-color: rgba(15, 118, 110, 0.35);
    box-shadow: 0 14px 32px rgba(12, 23, 40, 0.08);
}

.service-card-icon {
    display: grid;
    width: 48px;
    height: 48px;
    margin-bottom: 1.2rem;
    place-items: center;
    border-radius: 12px;
    background: #e8f5f3;
    color: var(--accent);
    font-size: 1.35rem;
}

.service-card h3 {
    margin: 0 0 0.65rem;
    color: var(--ink);
    font-size: 1.12rem;
}

.service-card p {
    margin: 0 0 1.1rem;
    color: var(--ink-soft);
    font-size: 0.94rem;
    line-height: 1.65;
}

.service-card a,
.text-link {
    margin-top: auto;
    color: var(--accent);
    font-size: 0.9rem;
    font-weight: 700;
    text-decoration: none;
}

.service-card a:hover,
.text-link:hover {
    color: var(--accent-hover);
}

.home-services-actions {
    margin-top: 2rem;
    text-align: center;
}

.home-about {
    padding: clamp(3.5rem, 7vw, 5.5rem) 0;
    background: var(--surface);
}

.home-about-inner {
    max-width: 900px;
    margin: 0 auto;
}

.home-about .section-label {
    margin-bottom: 0.6rem;
    color: var(--accent);
}

.home-about h2 {
    margin: 0 0 1rem;
}

.home-about p {
    margin: 0 0 1rem;
    color: var(--ink-soft);
    line-height: 1.8;
}

.home-values {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(min(100%, 240px), 1fr));
    gap: 0.6rem 1.5rem;
    padding: 0;
    list-style: none;
}

.home-values li {
    padding: 0.7rem 0;
    border-bottom: 1px solid var(--line);
    color: var(--ink-soft);
}

.home-values li::before {
    margin-right: 0.55rem;
    color: var(--accent);
    content: "✓";
    font-weight: 700;
}

.home-cta {
    padding: clamp(3.5rem, 7vw, 5rem) 0;
    background:
        radial-gradient(ellipse at 85% 15%, rgba(15, 118, 110, 0.35), transparent 40%),
        var(--hero);
    color: #fff;
    text-align: center;
}

.home-cta h2 {
    margin: 0 0 1rem;
    color: #fff;
}

.home-cta p {
    max-width: 650px;
    margin: 0 auto 1.75rem;
    color: var(--hero-muted);
}

/* Shared footer */
.site-footer {
    margin-top: 0 !important;
    padding: 4rem 0 1.5rem !important;
    background: var(--hero) !important;
    color: #e2e8f0 !important;
}

.footer-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(min(100%, 210px), 1fr));
    gap: 2rem;
    margin-bottom: 2.5rem;
}

.footer-grid h3 {
    margin: 0 0 1rem;
    color: #fff;
    font-size: 1rem;
    font-weight: 650;
    letter-spacing: 0;
}

.footer-grid p,
.footer-grid li {
    color: #b8c4d2 !important;
    font-size: 0.9rem;
}

.footer-links {
    margin: 0;
    padding: 0;
    list-style: none;
}

.footer-links li {
    margin: 0.45rem 0;
}

.footer-links a,
.footer-contact a,
.footer-bottom a {
    color: #c5d0db !important;
    text-decoration: none;
}

.footer-links a:hover,
.footer-contact a:hover,
.footer-bottom a:hover {
    color: #5eead4 !important;
}

.footer-newsletter {
    margin-bottom: 2rem;
    padding: 1.8rem;
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 14px;
    background: rgba(255, 255, 255, 0.055);
    text-align: center;
}

.footer-newsletter h2 {
    margin: 0 0 0.65rem;
    color: #fff;
    font-size: 1.25rem;
}

.footer-newsletter p {
    margin: 0 0 1.2rem;
    color: var(--hero-muted);
}

.footer-newsletter-form {
    display: flex;
    max-width: 520px;
    gap: 0.55rem;
    margin: 0 auto;
}

.footer-newsletter-form input {
    min-width: 0;
    flex: 1;
    padding: 0.75rem 0.9rem !important;
    border: 1px solid rgba(255, 255, 255, 0.18) !important;
    border-radius: 8px !important;
    background: rgba(255, 255, 255, 0.96);
}

.footer-newsletter-form button {
    padding: 0.75rem 1.1rem !important;
    border: 0;
    border-radius: 8px !important;
    background: var(--accent) !important;
    color: #fff !important;
    font-weight: 650;
}

.footer-bottom {
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    gap: 0.8rem 1.5rem;
    padding-top: 1.3rem;
    border-top: 1px solid rgba(255, 255, 255, 0.12);
}

.footer-bottom p {
    margin: 0;
    color: #9aa8b8 !important;
}

.footer-legal {
    display: flex;
    flex-wrap: wrap;
    gap: 1rem;
}

.service-card-features {
    margin: 0 0 1.25rem;
    padding: 0;
    list-style: none;
}

.service-card-features li {
    position: relative;
    padding: 0.4rem 0 0.4rem 1.35rem;
    border-bottom: 1px solid var(--line-soft);
    color: var(--ink-soft);
    font-size: 0.88rem;
}

.service-card-features li::before {
    position: absolute;
    left: 0;
    color: var(--accent);
    content: "✓";
    font-weight: 700;
}

.blog-ai-panel {
    max-width: 900px;
    margin: 0 auto 2rem;
    padding: clamp(1.25rem, 3vw, 2rem);
    border: 1px solid rgba(15, 118, 110, 0.2);
    border-radius: 14px;
    background: linear-gradient(135deg, #fff, #f0f8f7);
    box-shadow: 0 10px 30px rgba(12, 23, 40, 0.05);
}

.blog-ai-panel .section-label {
    margin-bottom: 0.4rem;
    color: var(--accent);
}

.blog-ai-panel h2 {
    margin: 0 0 0.55rem;
}

.blog-ai-panel p {
    margin: 0 0 1.25rem;
}

.blog-ai-fields {
    display: grid;
    grid-template-columns: minmax(0, 2fr) minmax(0, 1fr) minmax(0, 0.65fr);
    gap: 1rem;
    margin-bottom: 1.15rem;
}

.blog-ai-fields label {
    display: block;
    margin-bottom: 0.4rem;
    color: var(--ink);
    font-size: 0.9rem;
    font-weight: 650;
}

.blog-ai-fields input,
.blog-ai-fields select {
    width: 100%;
    min-height: 46px;
    padding: 0.65rem 0.75rem;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: #fff;
}

.blog-status {
    display: inline-block;
    padding: 0.3rem 0.65rem;
    border-radius: 999px;
    font-size: 0.8rem;
    font-weight: 700;
}

.blog-status-published {
    background: #e8f5f3;
    color: #0f766e;
}

.blog-status-draft {
    background: #fff6df;
    color: #8a5a00;
}

.blog-publish-button {
    margin: 0 0.5rem;
    padding: 0;
    border: 0;
    background: transparent;
    color: var(--accent);
    font: inherit;
    font-size: 0.9rem;
    font-weight: 700;
    cursor: pointer;
}

.blog-publish-button:hover {
    color: var(--accent-hover);
}

@media (max-width: 991px) {
    .emex-navbar .navbar-nav {
        align-items: stretch;
        padding-top: 0.75rem;
    }

    .emex-navbar .nav-link {
        padding: 0.7rem 0.75rem !important;
    }

    .emex-nav-actions {
        display: flex;
        flex-wrap: wrap;
        align-items: center;
        gap: 0.75rem;
        padding: 0.75rem 0;
        border-top: 1px solid var(--line);
    }

    .emex-nav-actions > .btn {
        width: auto;
    }
}

@media (max-width: 575px) {
    .home-hero-actions {
        align-items: stretch;
        flex-direction: column;
    }

    .home-hero-actions .btn {
        width: 100%;
    }

    .trust-sep {
        display: none;
    }

    .footer-newsletter-form {
        flex-direction: column;
    }

    .footer-bottom {
        flex-direction: column;
    }

    .blog-ai-fields {
        grid-template-columns: 1fr;
    }

    main div[style*="overflow: hidden"][style*="border-radius: 12px"] {
        overflow-x: auto !important;
    }

    main table {
        min-width: 680px;
    }
}

@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        scroll-behavior: auto !important;
        transition-duration: 0.01ms !important;
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
    }
}

/* Inner pages */
.page-hero {
    position: relative;
    overflow: hidden;
    padding: clamp(3rem, 6vw, 4.5rem) 0;
    background:
        radial-gradient(ellipse at 84% 18%, rgba(15, 118, 110, 0.38), transparent 34%),
        var(--hero);
    color: #fff;
    text-align: center;
}

.page-hero::after {
    position: absolute;
    inset: 0 0 0 auto;
    width: min(42vw, 520px);
    background-image: linear-gradient(rgba(255, 255, 255, 0.04) 1px, transparent 1px), linear-gradient(90deg, rgba(255, 255, 255, 0.04) 1px, transparent 1px);
    background-size: 36px 36px;
    content: "";
    mask-image: linear-gradient(90deg, transparent, #000);
    pointer-events: none;
}

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

.page-hero h1 {
    max-width: 24ch;
    margin: 0 auto 0.75rem;
    color: #f3f6fa;
    font-size: clamp(2rem, 4.5vw, 3.25rem);
    letter-spacing: -0.04em;
}

.page-hero-eyebrow {
    margin: 0 0 0.7rem;
    color: #5eead4 !important;
    font-size: 0.78rem;
    font-weight: 700;
    letter-spacing: 0.13em;
    text-transform: uppercase;
}

.page-hero-subtitle {
    max-width: 64ch;
    margin: 0 auto;
    color: var(--hero-muted) !important;
    line-height: 1.75;
}

main > section[style*="padding: 60px 0"][style*="linear-gradient(135deg, #1e40af"] {
    padding-top: clamp(3rem, 6vw, 4.5rem) !important;
    padding-bottom: clamp(3rem, 6vw, 4.5rem) !important;
    text-align: center;
}

main > section[style*="padding: 60px 0"][style*="linear-gradient(135deg, #1e40af"] h1 {
    max-width: 24ch;
    margin: 0 auto 0.75rem;
    font-size: clamp(2rem, 4.5vw, 3.25rem);
}

main > section[style*="padding: 60px 0"][style*="linear-gradient(135deg, #1e40af"] p {
    max-width: 64ch;
    margin: 0 auto;
    line-height: 1.75;
}

main > section[style*="padding: 80px 0"],
main > section[style*="padding: 60px 0"]:not([style*="linear-gradient"]) {
    padding-top: clamp(3rem, 6vw, 5rem) !important;
    padding-bottom: clamp(3rem, 6vw, 5rem) !important;
}

main > section[style*="background: white"],
main > section[style*="background: #f9fafb"] {
    background: var(--paper) !important;
}

main div[style*="box-shadow"] {
    border: 1px solid var(--line);
    background-color: var(--surface);
}

main div[style*="linear-gradient(135deg, #1e40af"],
main div[style*="linear-gradient(135deg, #0f766e"] {
    background: var(--hero) !important;
}

main div[style*="linear-gradient(135deg, #1e40af"] h2,
main div[style*="linear-gradient(135deg, #1e40af"] h3,
main div[style*="linear-gradient(135deg, #1e40af"] p,
main div[style*="linear-gradient(135deg, #1e40af"] li,
main div[style*="linear-gradient(135deg, #0f766e"] h2,
main div[style*="linear-gradient(135deg, #0f766e"] h3,
main div[style*="linear-gradient(135deg, #0f766e"] p,
main div[style*="linear-gradient(135deg, #0f766e"] li {
    color: #fff !important;
}

main form[style*="background: white"] {
    border: 1px solid var(--line);
    border-radius: 14px !important;
    background: var(--surface) !important;
    box-shadow: 0 12px 32px rgba(12, 23, 40, 0.07) !important;
}

main form input:not([type="hidden"]),
main form select,
main form textarea {
    min-height: 46px;
    border-radius: 8px !important;
    background-color: #fff;
    color: var(--ink);
}

main form textarea {
    min-height: 140px;
}

main form label {
    color: var(--ink) !important;
    font-size: 0.92rem;
}

main form button[type="submit"] {
    min-height: 46px;
    border-radius: 8px !important;
    font-weight: 650;
}

main div[style*="grid-template-columns: repeat(auto-fill"] {
    grid-template-columns: repeat(auto-fit, minmax(min(100%, 290px), 1fr)) !important;
}

main div[style*="grid-template-columns: repeat(auto-fill"] > div[style*="box-shadow"],
main div[style*="grid-template-columns: repeat(auto-fit"] > div[style*="box-shadow"] {
    overflow: hidden;
    transition: transform 0.2s ease, border-color 0.2s ease, box-shadow 0.2s ease;
}

main div[style*="grid-template-columns: repeat(auto-fill"] > div[style*="box-shadow"]:hover,
main div[style*="grid-template-columns: repeat(auto-fit"] > div[style*="box-shadow"]:hover {
    transform: translateY(-3px);
    border-color: rgba(15, 118, 110, 0.35);
}

main div[style*="height: 180px"][style*="linear-gradient"],
main div[style*="height: 200px"][style*="linear-gradient"] {
    background:
        radial-gradient(circle at 70% 25%, rgba(45, 212, 191, 0.2), transparent 45%),
        var(--hero) !important;
}

main div[style*="height: 180px"] i {
    color: #5eead4;
}

main div[style*="height: 200px"] img {
    object-fit: cover;
    object-position: center 35%;
}

main section[style*="background: white"] h3,
main section[style*="background: #f9fafb"] h3 {
    color: var(--ink);
}

main section[style*="background: white"] li,
main section[style*="background: #f9fafb"] li {
    color: var(--ink-soft) !important;
}

main [style*="border-left: 4px solid"] {
    border-radius: 10px !important;
}

main [style*="background: #f9fafb"],
main [style*="background: #f0f4ff"] {
    background: #f5f8fa !important;
}

@media (max-width: 575px) {
    main form[id="newsletter-form"] {
        align-items: stretch;
        flex-direction: column;
    }

    main form[id="newsletter-form"] button {
        width: 100%;
    }

}
