/* ===== RESET ===== */
*,
*:after,
*:before {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
    transition: all 0.25s ease;
}

body {
    font-family: "Inter", Arial, sans-serif;
    font-size: 16px;
    line-height: 1.6;
    color: #1a1a1a;
    background:
        radial-gradient(circle at top left, rgba(245, 130, 32, 0.08), transparent 28%),
        linear-gradient(180deg, #eef3f8 0%, #f5f7fa 26%, #f7f9fc 100%);
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

a {
    color: inherit;
    text-decoration: none;
}

a:hover {
    text-decoration: none;
}

img {
    display: block;
    max-width: 100%;
    height: auto;
}

ul {
    list-style: none;
}

/* ===== TYPOGRAPHY ===== */
h1,
h2,
h3,
h4 {
    font-family: "Inter", sans-serif;
    font-weight: 600;
    line-height: 1.3;
}

h1 {
    font-size: 42px;
}

h2 {
    font-size: 32px;
    margin-bottom: 20px;
}

h3 {
    font-size: 22px;
}

p {
    margin-bottom: 16px;
    color: #444;
}

.post-content > * + *,
.content-section > * + *,
.service-card-body > * + * {
    margin-top: 14px;
}

/* ===== CONTAINER ===== */
.container {
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

.wrap {
    flex: 1;
}

/* ===== HEADER ===== */
header {
    position: static;
    top: auto;
    z-index: 20;
    background: linear-gradient(135deg, #07162b 0%, #0b1f3a 55%, #123157 100%);
    padding: 12px 0 10px;
    box-shadow: 0 8px 22px rgba(7, 22, 43, 0.16);
    margin-bottom: 24px;
    backdrop-filter: blur(14px);
}

.header-top {
    position: relative;
}

.header-nav-shell {
    margin-top: 12px;
    padding-top: 12px;
    border-top: 1px solid rgba(255, 255, 255, 0.08);
}

.logo-row,
.footer-row {
    display: flex;
    gap: 20px;
}

.logo-row {
    align-items: center;
    position: relative;
    gap: 22px;
}

.logo-stack {
    display: flex;
    gap: 12px;
    flex: 0 0 auto;
    align-items: center;
    padding: 0;
    border-radius: 0;
    background: transparent;
    box-shadow: none;
    flex-shrink: 0;
    flex-wrap: nowrap;
}

.logo-img {
    width: 72px;
    height: 56px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex: 0 0 auto;
}

.logo-img.logo-main {
    width: 72px;
}

.logo-img.logo-long {
    width: 92px;
}

.logo-img img {
    max-height: 56px;
    width: auto;
    object-fit: contain;
}

#title {
    flex: 1;
    color: #fff;
    text-align: left;
    text-transform: uppercase;
    letter-spacing: 1px;
    padding-top: 2px;
}

#title a {
    color: #fff;
}

.site-eyebrow {
    display: inline-flex;
    margin-bottom: 8px;
    padding: 4px 10px;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.09);
    color: #ffcb98;
    font-size: 10px;
    font-weight: 700;
    letter-spacing: 0.16em;
    text-transform: uppercase;
}

#title h1 {
    margin-bottom: 6px;
    max-width: 760px;
    text-wrap: balance;
    font-size: clamp(1.5rem, 2.4vw, 2.2rem);
    line-height: 1.08;
}

#title h3 {
    font-size: 14px;
    font-weight: 500;
    line-height: 1.35;
    color: rgba(255, 255, 255, 0.8);
}

.nav-toggle {
    display: none;
    width: 40px;
    height: 40px;
    margin-left: auto;
    background: #f58220;
    border: 0;
    border-radius: 8px;
    cursor: pointer;
    position: relative;
}

.nav-toggle span,
.nav-toggle span:before,
.nav-toggle span:after {
    position: absolute;
    left: 8px;
    right: 8px;
    height: 2px;
    background: #fff;
    content: "";
}

.nav-toggle span {
    top: 19px;
}

.nav-toggle span:before {
    top: -8px;
    left: 0;
    right: 0;
}

.nav-toggle span:after {
    bottom: -8px;
    left: 0;
    right: 0;
}

/* ===== MENU ===== */
#menu {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-top: 0;
    margin-left: 0;
}

#menu a {
    color: #fff;
    font-weight: 500;
    display: inline-flex;
    align-items: center;
    min-height: 36px;
    padding: 0 12px;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.06);
    border: 1px solid rgba(255, 255, 255, 0.08);
    font-size: 14px;
}

#menu a:hover {
    color: #f58220;
    background: rgba(255, 255, 255, 0.12);
    border-color: rgba(245, 130, 32, 0.38);
}

/* ===== BUTTONS ===== */
.btn,
.contact-form button {
    display: inline-block;
    background: #f58220;
    color: #fff;
    padding: 14px 26px;
    border-radius: 8px;
    border: 0;
    font-weight: 600;
    text-align: center;
    cursor: pointer;
}

.btn:hover,
.contact-form button:hover {
    background: #d96d12;
}

.btn.btn-secondary {
    background: rgba(11, 31, 58, 0.08);
    color: #102a43;
}

.btn.btn-secondary:hover {
    background: rgba(11, 31, 58, 0.14);
    color: #102a43;
}

/* ===== LAYOUT ===== */
.posts-list {
    display: flex;
    gap: 24px;
    padding: 20px;
    align-items: flex-start;
}

.page-layout {
    align-items: stretch;
}

.post {
    flex: 1 1 auto;
    min-width: 0;
}

.post.post-contacts {
    flex: 0 1 58%;
}

/* ===== CARDS ===== */
.card,
.post-content,
aside {
    background: #fff;
    border-radius: 12px;
    padding: 25px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.05);
    border: none;
}

.post-content {
    position: relative;
}

.post-content:before {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    width: 72px;
    height: 4px;
    border-radius: 999px;
    background: linear-gradient(90deg, #f58220 0%, #ffb067 100%);
}

.hero-panel,
.content-section {
    margin-bottom: 26px;
}

.page-card {
    min-height: 100%;
}

.page-heading {
    display: flex;
    flex-direction: column;
    gap: 10px;
    margin-bottom: 22px;
    padding-bottom: 18px;
    border-bottom: 1px solid rgba(16, 42, 67, 0.08);
}

.page-kicker {
    display: inline-flex;
    width: fit-content;
    padding: 5px 10px;
    border-radius: 999px;
    background: #eef4fb;
    color: #235789;
    font-size: 12px;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.hero-panel {
    display: grid;
    grid-template-columns: minmax(0, 1.05fr) minmax(340px, 0.95fr);
    gap: 28px;
    align-items: stretch;
    padding: 8px 0 6px;
}

.hero-copy {
    padding: 32px;
    border-radius: 20px;
    background:
        radial-gradient(circle at top right, rgba(245, 130, 32, 0.2), transparent 32%),
        linear-gradient(135deg, #081a32 0%, #0d2648 58%, #123760 100%);
    color: #fff;
    box-shadow: 0 28px 50px rgba(11, 31, 58, 0.2);
}

.hero-copy p {
    color: rgba(255, 255, 255, 0.82);
    font-size: 17px;
    max-width: 60ch;
}

.hero-kicker {
    display: inline-flex;
    align-items: center;
    padding: 6px 12px;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.12);
    color: #ffcb98;
    font-size: 12px;
    font-weight: 700;
    letter-spacing: 0.14em;
    text-transform: uppercase;
}

.hero-copy h1 {
    max-width: 11ch;
    font-size: clamp(2.4rem, 4vw, 3.8rem);
    line-height: 1.06;
    text-wrap: balance;
}

.hero-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    margin-top: 26px;
}

.hero-media {
    display: flex;
    align-items: stretch;
}

.hero-media .video-box {
    width: 100%;
    padding: 20px;
    border-radius: 20px;
    background: linear-gradient(180deg, #ffffff 0%, #f8fbff 100%);
    box-shadow: 0 28px 50px rgba(11, 31, 58, 0.1);
}

.hero-media .video-box h2 {
    font-size: 20px;
    color: #102a43;
    margin-bottom: 16px;
}

.hero-banner img {
    width: 100%;
    border-radius: 18px;
    box-shadow: 0 16px 40px rgba(11, 31, 58, 0.12);
}

.service-intro {
    padding: 20px 22px;
    border-radius: 16px;
    background: linear-gradient(180deg, #fbfdff 0%, #f4f8fc 100%);
    border: 1px solid rgba(16, 42, 67, 0.08);
}

.facts-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 18px;
}

.fact-card {
    padding: 20px;
    border-radius: 16px;
    background: #fff;
    border: 1px solid rgba(16, 42, 67, 0.08);
    box-shadow: 0 10px 26px rgba(11, 31, 58, 0.06);
}

aside {
    width: 320px;
    flex: 0 0 320px;
    align-self: flex-start;
    border-left: 4px solid #f58220;
    position: static;
    top: auto;
}

.page-sidebar h3 {
    margin-bottom: 16px;
    color: #102a43;
}

.sidebar-content {
    display: grid;
    gap: 12px;
}

.page-sidebar ul {
    display: grid;
    gap: 10px;
}

.page-sidebar li {
    padding-bottom: 0;
}

.page-sidebar li::before {
    display: none;
}

.page-sidebar a {
    display: block;
    padding: 12px 14px;
    border-radius: 12px;
    background: #f7fafd;
    border: 1px solid rgba(16, 42, 67, 0.08);
    color: #102a43;
    font-weight: 500;
    line-height: 1.4;
    text-decoration: none;
}

.page-sidebar a:hover {
    transform: translateX(2px);
    background: #eef4fb;
    border-color: rgba(35, 87, 137, 0.16);
    color: #0f5ea8;
}

aside.opk {
    width: 340px;
    flex: 0 0 340px;
    max-height: none;
    overflow: visible;
}

aside.opk h3,
aside.opk a {
    overflow-wrap: anywhere;
    word-break: break-word;
}

aside.contacts-map {
    flex: 0 1 42%;
    width: auto;
    padding: 0;
    background: transparent;
    box-shadow: none;
    border-left: 0;
    position: static;
}

aside.contacts-map .dg-widget-link {
    display: block;
    margin-bottom: 12px;
}

aside.contacts-map .sidebar-content {
    display: block;
}

aside li {
    font-size: 16px;
    line-height: 1.5;
    padding-bottom: 1em;
}

/* ===== POSTS ===== */
.post-title {
    font-size: 28px;
    margin-bottom: 15px;
    color: #102a43;
}

.post-content p {
    font-size: 16px;
    text-indent: 0;
}

.post-content li {
    font-size: 16px;
    line-height: 1.5;
}

.post-content a {
    color: #0f5ea8;
    text-decoration: underline;
    text-decoration-color: rgba(15, 94, 168, 0.3);
    text-underline-offset: 3px;
}

.post-content a:hover {
    color: #f58220;
    text-decoration-color: rgba(245, 130, 32, 0.55);
}

.post-content ul > li::before {
    content: "- ";
}

.post-content-nested-list ol {
    counter-reset: item;
}

.post-content-nested-list ol li {
    display: block;
    padding-left: 20px;
}

.post-content-nested-list ol li:before {
    content: counters(item, ".") ". ";
    counter-increment: item;
}

/* ===== TABLE ===== */
.post-content table,
.contacts table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 20px;
}

.post-content th {
    background: #0b1f3a;
    color: #fff;
    padding: 12px;
}

.post-content td {
    padding: 12px;
    border-bottom: 1px solid #eee;
}

.post-content tr:hover td {
    background: #fafcff;
}

.contacts tr:nth-of-type(odd) {
    background: #f8f9fb;
}

.contacts td:first-child {
    width: 34%;
    font-weight: 600;
    color: #1a1a1a;
}

/* ===== SERVICES ===== */
.services,
.services-grid {
    display: flex;
    gap: 20px;
    flex-wrap: wrap;
}

.services-item,
.service-card {
    flex: 1 1 280px;
    min-width: 280px;
    background: #fff;
    border-radius: 16px;
    padding: 20px;
    box-shadow: 0 18px 40px rgba(11, 31, 58, 0.08);
    border: 1px solid rgba(16, 42, 67, 0.06);
}

.services-item img,
.service-card img {
    margin-bottom: 15px;
    border-radius: 12px;
    aspect-ratio: 16 / 10;
    object-fit: cover;
}

.services-item:hover,
.service-card:hover,
.news-item:hover {
    transform: translateY(-4px);
    box-shadow: 0 24px 50px rgba(11, 31, 58, 0.12);
}

.service-card h3 {
    margin-top: 10px;
    color: #102a43;
}

.service-card-body {
    display: flex;
    flex-direction: column;
    min-height: 148px;
}

.service-card-body p {
    margin-top: auto;
    color: #52606d;
    font-size: 15px;
}

.service-tag {
    display: inline-flex;
    width: fit-content;
    padding: 5px 10px;
    border-radius: 999px;
    background: #fff3e8;
    color: #c25d0a;
    font-size: 12px;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

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

.link-list-item {
    display: block;
    padding: 20px 22px;
    border-radius: 16px;
    background: #fff;
    border: 1px solid rgba(16, 42, 67, 0.08);
    box-shadow: 0 10px 24px rgba(11, 31, 58, 0.06);
}

.link-list-item strong {
    display: block;
    margin-top: 10px;
    color: #102a43;
    font-size: 19px;
    line-height: 1.35;
}

.link-list-item p {
    margin-top: 10px;
    color: #52606d;
    font-size: 15px;
}

.link-list-item:hover {
    transform: translateY(-3px);
    box-shadow: 0 18px 36px rgba(11, 31, 58, 0.1);
}

/* ===== DOCS ===== */
.docs {
    display: flex;
    flex-wrap: wrap;
    gap: 20px;
}

.docs a {
    display: block;
    width: 150px;
}

.docs img {
    border-radius: 8px;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
}

.docs a:hover img {
    transform: translateY(-3px);
    box-shadow: 0 15px 24px rgba(11, 31, 58, 0.16);
}

.docs-name {
    display: block;
    margin-top: 8px;
    font-size: 14px;
}

/* ===== NEWS ===== */
.news-list {
    display: grid;
    gap: 20px;
}

.news-item {
    display: block;
    background: #fff;
    border-radius: 16px;
    padding: 20px;
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.05);
}

.news-item time {
    display: block;
    color: #667085;
    margin-bottom: 10px;
    font-size: 14px;
}

.news-item h3 {
    margin-bottom: 10px;
}

.news-item p {
    padding: 0;
}

.news-item h3,
.service-card h3,
aside h3 {
    text-wrap: balance;
}

.news-feature {
    display: grid;
    grid-template-columns: minmax(0, 1.2fr) minmax(260px, 0.8fr);
    gap: 20px;
    align-items: stretch;
}

.news-feature-body {
    display: flex;
    flex-direction: column;
    justify-content: center;
    padding: 22px;
    border-radius: 16px;
    background: linear-gradient(180deg, #fbfdff 0%, #f4f8fc 100%);
    border: 1px solid rgba(16, 42, 67, 0.08);
}

.docs {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
}

.docs a {
    width: 100%;
}

/* ===== MEDIA ===== */
.video-box video {
    width: 100%;
    max-height: 450px;
    border-radius: 12px;
    box-shadow: 0 20px 40px rgba(11, 31, 58, 0.16);
}

.logo-contacts {
    max-width: 400px;
    margin-top: 20px;
}

/* ===== FORM ===== */
.contact-form {
    margin-top: 25px;
    display: grid;
    gap: 14px;
}

.contact-form label {
    font-size: 14px;
    font-weight: 600;
    color: #1a1a1a;
}

input,
textarea,
.contact-form input,
.contact-form textarea {
    width: 100%;
    padding: 12px;
    border-radius: 8px;
    border: 1px solid #ddd;
    margin-bottom: 0;
    font: inherit;
    background: #fff;
}

textarea,
.contact-form textarea {
    min-height: 140px;
    resize: vertical;
}

input:focus,
textarea:focus {
    border-color: #f58220;
    outline: none;
    box-shadow: 0 0 0 4px rgba(245, 130, 32, 0.12);
}

.form-message {
    margin-top: 18px;
    padding: 14px 16px;
    border-radius: 8px;
    font-weight: 600;
}

.form-message.success {
    background: #e7f6ea;
    color: #1b5e20;
}

.form-message.error {
    background: #ffe8e8;
    color: #8a1f1f;
}

/* ===== FOOTER ===== */
footer {
    background: #0b1f3a;
    color: #fff;
    padding: 40px 0;
    margin-top: 30px;
    position: relative;
    overflow: hidden;
}

footer:before {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(135deg, rgba(245, 130, 32, 0.12), transparent 38%);
    pointer-events: none;
}

.footer-row {
    align-items: flex-start;
    position: relative;
    z-index: 1;
}

.footer-col {
    width: 33.3333%;
}

.footer-col a {
    color: #ccc;
}

.footer-col a:hover {
    color: #f58220;
}

/* ===== POPUP ===== */
#popup-overlay {
    position: fixed;
    inset: 0;
    display: none;
    align-items: center;
    justify-content: center;
    background: rgba(11, 31, 58, 0.55);
    z-index: 1000;
}

#popup-overlay.is-visible {
    display: flex;
}

#popup {
    position: relative;
    width: min(900px, calc(100vw - 30px));
    background: #fff;
    padding: 20px;
    border-radius: 12px;
    box-shadow: 0 20px 45px rgba(0, 0, 0, 0.2);
}

#close-popup {
    position: absolute;
    top: 10px;
    right: 12px;
    font-size: 28px;
    cursor: pointer;
}

#popup iframe {
    width: 100%;
    height: 70vh;
    border: 0;
    margin-top: 15px;
}

/* ===== MOBILE ===== */
@media (max-width: 768px) {
    h1 {
        font-size: 24px;
    }

    h2 {
        font-size: 24px;
    }

    .posts-list,
    .services,
    .services-grid,
    .footer-row {
        flex-direction: column;
    }

    aside,
    .service-card,
    .services-item,
    .footer-col,
    .post.post-contacts,
    aside.contacts-map {
        width: 100%;
        flex: 1 1 auto;
    }

    .nav-toggle {
        display: block;
    }

    #menu {
        display: none;
        width: 100%;
        margin-top: 16px;
        background: #fff;
        padding: 12px 0;
        border-radius: 12px;
        margin-left: 0;
        box-shadow: 0 18px 40px rgba(7, 22, 43, 0.18);
    }

    #menu.is-open {
        display: block;
    }

    #menu li {
        padding: 10px 15px;
        border-bottom: 1px solid #ececec;
    }

    #menu a {
        color: #1a1a1a;
        display: block;
        background: transparent;
        border: 0;
        min-height: 0;
        padding: 0;
    }

    .logo-row {
        flex-wrap: wrap;
        align-items: flex-start;
    }

    .logo-stack {
        gap: 10px;
        flex-wrap: wrap;
    }

    .logo-img {
        width: 60px;
        height: 46px;
    }

    .logo-img.logo-main {
        width: 60px;
    }

    .logo-img.logo-long {
        width: 78px;
    }

    .logo-img img {
        max-height: 46px;
    }

    #title {
        text-align: left;
    }

    #title h1 {
        font-size: 1.4rem;
    }

    #title h3 {
        font-size: 13px;
    }

    aside {
        position: static;
    }

    .hero-panel {
        grid-template-columns: 1fr;
    }

    .hero-copy {
        padding: 24px;
    }

    .hero-copy h1 {
        max-width: none;
    }

    .facts-grid,
    .news-feature {
        grid-template-columns: 1fr;
    }

    .contacts table,
    .contacts tbody,
    .contacts tr,
    .contacts td {
        display: block;
        width: 100%;
    }

    .contacts tr {
        margin-bottom: 12px;
        background: #fff;
        border-radius: 8px;
        overflow: hidden;
        box-shadow: 0 4px 14px rgba(0, 0, 0, 0.05);
    }

    .contacts td {
        border: 0;
        border-bottom: 1px solid #eee;
    }

    .contacts td:first-child {
        width: 100%;
        background: #f2f4f7;
    }
}

@media (max-width: 1360px) {
    aside.opk {
        width: 100%;
        flex: 1 1 100%;
        max-height: none;
        overflow: visible;
    }
}
