/* ==========================================================================
   Altan Theme — Main Stylesheet
   Базовые стили (reset, типографика, layout, компоненты).
   Дизайн будет интегрирован отдельно.
   ========================================================================== */

/* --------------------------------------------------------------------------
   1. Reset & Base
   -------------------------------------------------------------------------- */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

html { font-size: 16px; scroll-behavior: smooth; }

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, sans-serif;
    font-size: 1rem;
    line-height: 1.6;
    color: #1a1a1a;
    background: #fff;
}

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

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

ul, ol { list-style: none; }

button { cursor: pointer; border: none; background: none; font: inherit; }

/* --------------------------------------------------------------------------
   2. Container
   -------------------------------------------------------------------------- */
.container {
    width: 100%;
    max-width: 1200px;
    margin-inline: auto;
    padding-inline: 20px;
}

@media (min-width: 768px)  { .container { padding-inline: 32px; } }
@media (min-width: 1280px) { .container { padding-inline: 40px; } }

/* --------------------------------------------------------------------------
   3. Site Layout
   -------------------------------------------------------------------------- */
.site { display: flex; flex-direction: column; min-height: 100vh; }
.site-content { flex: 1; }

/* --------------------------------------------------------------------------
   4. Header
   -------------------------------------------------------------------------- */

/* Elementor header (#23) — section background */

/* Force logo widget visibility */
.elementor-23 .elementor-element-76bc120,
.elementor-23 .elementor-element-76bc120 .elementor-widget-container,
.elementor-23 .elementor-element-76bc120 .elementor-jet-logo,
.elementor-23 .elementor-element-76bc120 .jet-logo,
.elementor-23 .elementor-element-76bc120 .jet-logo__link {
    display: block !important;
    visibility: visible !important;
    opacity: 1 !important;
}

/* Elementor header (#23): logo left, nav right in one row */
.elementor-23 .elementor-element-2e6902e > .elementor-widget-wrap {
    flex-direction: row !important;
    flex-wrap: nowrap !important;
    justify-content: space-between !important;
    align-items: center !important;
}

.elementor-23 .elementor-element-76bc120,
.elementor-23 .elementor-element-lang-globe {
    width: auto !important;
    flex-shrink: 0;
}

.elementor-23 .elementor-element-2ddabdf {
    flex: 1 1 auto !important;
    width: auto !important;
}

.elementor-23 .elementor-element-76bc120 .jet-logo {
    justify-content: flex-start !important;
}

.elementor-23 .elementor-element-76bc120 .jet-logo__img {
    display: block !important;
    width: auto !important;
    height: auto !important;
    max-height: 100px !important;
    max-width: 100%;
    visibility: visible !important;
    opacity: 1 !important;
}

.elementor-23 .elementor-element-lang-globe {
    margin-left: auto;
}

/* Desktop nav + lang globe: override Elementor's 767px breakpoint with our 900px */
@media (max-width: 900px) {
    .elementor-23 .elementor-element-2ddabdf { display: none !important; }
}

/* Language globe in the nav area */
.jet-mega-menu-list--lang {
    margin-left: 8px;
}
.jet-mega-menu--layout-horizontal {
    display: flex;
    align-items: center;
}
.nav-menu__item--globe {
    position: relative;
    list-style: none;
}
.lang-globe__btn {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 32px;
    background: none;
    border: none;
    cursor: pointer;
    color: #fff;
    opacity: .8;
    transition: opacity .15s;
    padding: 0;
}
.lang-globe__btn:hover { opacity: 1; }
.lang-globe__btn svg { width: 18px; height: 18px; }
.lang-globe__dropdown {
    display: none;
    position: absolute;
    top: 100%;
    right: 0;
    min-width: 140px;
    background: #fff;
    border-radius: 6px;
    box-shadow: 0 8px 24px rgb(0 0 0 / .15);
    padding: 6px 0;
    list-style: none;
    margin: 6px 0 0;
    z-index: 200;
}
.lang-globe__dropdown.is-open { display: block; }
.lang-globe__option {
    display: block;
    padding: 8px 16px;
    font-size: .85rem;
    color: #333;
    text-decoration: none;
    transition: background .12s;
}
.lang-globe__option:hover { background: #f0f4ff; color: #2351b1; }

/* Desktop JetMenu list — wp_nav_menu output */
.jet-mega-menu-list {
    display: flex;
    gap: 4px;
    flex-wrap: wrap;
    list-style: none;
    margin: 0;
    padding: 0;
}

.jet-mega-menu-list .menu-item > a {
    display: block;
    padding: 8px 14px;
    border-radius: 4px;
    font-family: "Montserrat", sans-serif;
    font-size: 12px;
    font-weight: 400;
    text-transform: uppercase;
    letter-spacing: .05em;
    color: #fff;
    transition: border-color .15s;
    border-bottom: 1px solid transparent;
    text-decoration: none;
}

.jet-mega-menu-list .menu-item > a:hover,
.jet-mega-menu-list .current-menu-item > a,
.jet-mega-menu-list .current_page_item > a {
    border-bottom-color: #fff;
    text-decoration: none;
}

@media (max-width: 900px) {
    .elementor-23 .elementor-element-2e6902e > .elementor-widget-wrap {
        align-items: center !important;
    }
    .elementor-23 .elementor-element-2ddabdf {
        margin-left: 0;
    }
}

.site-header {
    position: sticky;
    top: 0;
    z-index: 100;
    box-shadow: 0 2px 8px rgb(0 0 0 / .08);
}

.site-header__inner {
    display: grid;
    grid-template-columns: 1fr 1fr 1fr;
    align-items: center;
    padding-block: 16px;
}

.site-header__branding { justify-self: start; }

.site-header__logo-text {
    font-size: 1.5rem;
    font-weight: 700;
    color: #1a1a1a;
}

.site-header__right {
    display: flex;
    align-items: center;
    gap: 24px;
    justify-self: end;
}

.site-header__nav { flex-shrink: 0; }

.nav-menu {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
}

.nav-menu a {
    display: block;
    padding: 8px 12px;
    border-radius: 6px;
    font-size: .9rem;
    font-weight: 500;
    transition: background .15s, color .15s;
}

.nav-menu a:hover,
.nav-menu .current-menu-item > a,
.nav-menu .current_page_item > a {
    background: #f0f4ff;
    color: #2351b1;
    text-decoration: none;
}

.site-header__actions {
    display: flex;
    align-items: center;
    gap: 16px;
    flex-shrink: 0;
}

.site-header__phone {
    font-size: .9rem;
    font-weight: 600;
    white-space: nowrap;
}

/* Hamburger */
.site-header__burger {
    display: none;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    color: #fff;
    padding: 0;
}

.site-header__burger:hover {
    background-color: rgba(255, 255, 255, 0.3);
    color: #fff;
}

.site-header__burger .jet-mobile-menu__toggle-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    line-height: 1;
}

@media (max-width: 900px) {
    .site-header__inner {
        display: flex;
        justify-content: space-between;
        gap: 16px;
    }
    .site-header__right {
        gap: 12px;
    }
    .site-header__burger { display: flex; }

    .site-header__nav {
        display: block;
        position: fixed;
        inset: 0;
        background: #1b1d22;
        transform: translateX(100%);
        transition: transform 0.35s cubic-bezier(0.4, 0, 0.2, 1);
        z-index: 9998;
        overflow-y: auto;
        padding: 80px 32px 48px;
        visibility: hidden;
    }

    .site-header__nav.is-open {
        transform: translateX(0);
        visibility: visible;
    }

    .site-header__nav .jet-mega-menu-list,
    .site-header__nav .nav-menu {
        flex-direction: column;
        gap: 0;
    }

    .site-header__nav .jet-mega-menu-list .menu-item > a,
    .site-header__nav .nav-menu a {
        color: #fff;
        font-size: 1.05rem;
        font-weight: 400;
        padding: 16px 0;
        border-bottom: 1px solid rgba(255, 255, 255, 0.1);
        border-radius: 0;
        text-transform: uppercase;
        letter-spacing: 0.06em;
    }

    .site-header__nav .jet-mega-menu-list .menu-item > a:hover,
    .site-header__nav .current-menu-item > a,
    .site-header__nav .current_page_item > a,
    .site-header__nav .nav-menu a:hover {
        color: rgba(255, 255, 255, 0.55);
        background: none;
        text-decoration: none;
        border-bottom-color: rgba(255, 255, 255, 0.1);
    }
}

.site-header__nav-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.55);
    z-index: 9997;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.35s, visibility 0.35s;
}

.site-header__nav-overlay.is-open {
    opacity: 1;
    visibility: visible;
}

.mobile-nav__close {
    position: absolute;
    top: 20px;
    right: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 44px;
    height: 44px;
    color: #fff;
    opacity: 0.7;
    transition: opacity 0.15s;
    padding: 0;
}

.mobile-nav__close:hover { opacity: 1; }

@media (max-width: 768px) {
    .site-header__burger {
        color: #fff;
    }
}

/* --------------------------------------------------------------------------
   5. Language Switcher
   -------------------------------------------------------------------------- */
.lang-switcher {
    display: flex;
    gap: 4px;
}

.lang-switcher__link {
    display: inline-block;
    padding: 4px 8px;
    border-radius: 4px;
    font-size: .75rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: .05em;
    color: #666;
    transition: background .15s, color .15s;
}

.lang-switcher__link:hover { background: #f0f4ff; color: #2351b1; text-decoration: none; }
.lang-switcher__item--active .lang-switcher__link { background: #2351b1; color: #fff; }

/* Globe Language Dropdown */
.nav-menu__item--globe {
    position: relative;
    display: flex;
    align-items: stretch;
}

.lang-globe__btn {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0 10px;
    height: 100%;
    color: #fff;
    transition: border-color .15s;
    border-bottom: 1px solid transparent;
}

.lang-globe__btn svg {
    width: 18px;
    height: 18px;
    flex-shrink: 0;
}

.lang-globe__btn:hover,
.lang-globe__btn[aria-expanded="true"] {
    background: none;
    color: #fff;
    border-bottom-color: #fff;
}

/* Remove JetMenu border-frame on hover */
.jet-mega-menu-item:hover .jet-mega-menu-item__link--top-level,
.jet-mega-menu-item.jet-mega-current-menu-item .jet-mega-menu-item__link--top-level {
    border: none !important;
}

.lang-globe__dropdown {
    position: absolute;
    top: calc(100% + 6px);
    right: 0;
    min-width: 148px;
    background: #fff;
    border-radius: 8px;
    box-shadow: 0 4px 24px rgb(0 0 0 / .13);
    border: 1px solid #e8ecf8;
    padding: 6px;
    display: none;
    z-index: 200;
}

.lang-globe__dropdown.is-open { display: block; }

.lang-globe__option {
    display: block;
    padding: 9px 14px;
    border-radius: 5px;
    font-size: .875rem;
    font-weight: 500;
    color: #333;
    transition: background .15s, color .15s;
    white-space: nowrap;
}

.lang-globe__option:hover {
    background: #f0f4ff;
    color: #2351b1;
    text-decoration: none;
}

/* --------------------------------------------------------------------------
   6. Footer
   -------------------------------------------------------------------------- */
.site-footer {
    color: #ccc;
    padding-bottom: 0;
}

.site-footer__bar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 16px 32px;
    padding-block: 28px;
    border-bottom: 1px solid #2a2a3e;
}

.footer-contacts {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 6px 28px;
}

.footer-contacts__item {
    display: flex;
    align-items: baseline;
    gap: 5px;
    font-size: .875rem;
}

.footer-contacts__label {
    color: #fff;
    font-weight: 600;
    white-space: nowrap;
}

.footer-contacts__value { color: #aaa; }
.footer-contacts__item a { color: #aaa; transition: color .15s; text-decoration: none; }
.footer-contacts__item a:hover { color: #fff; }

.site-footer__bottom {
    padding-block: 18px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 12px;
}

.site-footer__copy { font-size: .8rem; color: #666; }

/* Social Links */
.social-links {
    display: flex;
    justify-content: center;
    gap: 12px;
    margin-top: 50px;
    margin-bottom: 40px;
}

.social-links__link {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 46px;
    height: 46px;
    border-radius: 50%;
    background: #c2b697;
    color: #fff;
    transition: background .2s;
    text-decoration: none;
    flex-shrink: 0;
}

.social-links__link:hover { background: #42474c; text-decoration: none; }
.social-links__link svg { width: 22px; height: 22px; fill: currentColor; display: block; }

/* --------------------------------------------------------------------------
   7. Buttons
   -------------------------------------------------------------------------- */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 12px 28px;
    border-radius: 6px;
    font-size: .95rem;
    font-weight: 600;
    line-height: 1;
    transition: background .15s, color .15s, border-color .15s, transform .1s;
    cursor: pointer;
    border: 2px solid transparent;
    text-decoration: none;
}

.btn:hover { text-decoration: none; transform: translateY(-1px); }
.btn:active { transform: translateY(0); }

.btn--primary { background: #2351b1; color: #fff; border-color: #2351b1; }
.btn--primary:hover { background: #1a3d8a; border-color: #1a3d8a; color: #fff; }

.btn--outline { background: transparent; color: #2351b1; border-color: #2351b1; }
.btn--outline:hover { background: #2351b1; color: #fff; }

.btn--lg { padding: 16px 40px; font-size: 1.05rem; }

/* --------------------------------------------------------------------------
   8. Section Titles
   -------------------------------------------------------------------------- */
.section-title {
    font-size: 2rem;
    font-weight: 700;
    line-height: 1.2;
    margin-bottom: 32px;
    color: #1a1a1a;
}

.section-title--center { text-align: center; }

.section-header {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    gap: 16px;
    margin-bottom: 32px;
}

.section-header__link {
    font-size: .9rem;
    font-weight: 600;
    color: #2351b1;
    white-space: nowrap;
}

/* --------------------------------------------------------------------------
   9. Page Header
   -------------------------------------------------------------------------- */
.page-header {
    background: #f5f7ff;
    padding-block: 48px 40px;
    margin-bottom: 48px;
}

.page-header__title {
    font-size: 2.5rem;
    font-weight: 700;
    color: #1a1a1a;
}

/* --------------------------------------------------------------------------
   10. Posts Grid
   -------------------------------------------------------------------------- */
.posts-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 32px;
}

@media (min-width: 640px)  { .posts-grid { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 1024px) { .posts-grid { grid-template-columns: repeat(3, 1fr); } }

.posts-grid--3 { grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); }

/* Post Card */
.post-card {
    border-radius: 10px;
    overflow: hidden;
    box-shadow: 0 2px 12px rgb(0 0 0 / .07);
    transition: box-shadow .2s, transform .2s;
    background: #fff;
}

.post-card:hover { box-shadow: 0 8px 32px rgb(0 0 0 / .12); transform: translateY(-3px); }

.post-card__image-wrap { overflow: hidden; aspect-ratio: 3 / 2; }
.post-card__image { width: 100%; height: 100%; object-fit: cover; transition: transform .3s; }
.post-card:hover .post-card__image { transform: scale(1.04); }

.post-card__body { padding: 20px; }

.post-card__meta {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 10px;
}

.post-card__date { font-size: .8rem; color: #888; }
.post-card__cat { font-size: .75rem; font-weight: 600; color: #2351b1; text-transform: uppercase; letter-spacing: .05em; }

.post-card__title { font-size: 1.1rem; font-weight: 700; margin-bottom: 10px; line-height: 1.3; }
.post-card__title a:hover { color: #2351b1; text-decoration: none; }

.post-card__excerpt { font-size: .9rem; color: #555; line-height: 1.6; margin-bottom: 16px; }

.post-card__more { font-size: .85rem; font-weight: 600; color: #2351b1; }
.post-card__more:hover { text-decoration: underline; }

/* --------------------------------------------------------------------------
   11. Hero
   -------------------------------------------------------------------------- */
.hero {
    position: relative;
    min-height: 560px;
    display: flex;
    align-items: center;
    overflow: hidden;
    background: #1a1a2e;
}

.hero__bg { position: absolute; inset: 0; }
.hero__bg-img { width: 100%; height: 100%; object-fit: cover; }
.hero__overlay { position: absolute; inset: 0; background: linear-gradient(135deg, rgb(26 26 46 / .8) 0%, rgb(35 81 177 / .4) 100%); }

.hero__content {
    position: relative;
    z-index: 1;
    max-width: 680px;
    padding-block: 80px;
    color: #fff;
}

.hero__subtitle { font-size: .95rem; font-weight: 600; letter-spacing: .1em; text-transform: uppercase; opacity: .8; margin-bottom: 16px; }
.hero__title { font-size: clamp(2rem, 5vw, 3.5rem); font-weight: 800; line-height: 1.15; margin-bottom: 32px; }
.hero__btn { margin-top: 8px; }

/* --------------------------------------------------------------------------
   11a. Elementor Slider Section (34053c4)
   -------------------------------------------------------------------------- */
.elementor-element-34053c4 {
    margin-top: 0 !important;
}

/* --------------------------------------------------------------------------
   11b. Elementor Features Section (563f1e6f)
   -------------------------------------------------------------------------- */
.elementor-element-563f1e6f .elementor-icon { color: #c2b697 !important; fill: #c2b697 !important; border-color: #c2b697 !important; }
.elementor-element-563f1e6f .elementor-icon svg { fill: #c2b697 !important; }
.elementor-element-563f1e6f .elementor-icon-box-title,
.elementor-element-563f1e6f .elementor-icon-box-title a { color: #fff !important; }
.elementor-element-563f1e6f .elementor-icon-box-description { color: #fff !important; }
.elementor-element-563f1e6f .elementor-widget-container { color: #fff !important; }
.elementor-element-563f1e6f .elementor-widget-container p { color: #fff !important; }

/* --------------------------------------------------------------------------
   11c. Why Section items (3a0e4937) — icon background #c2b697, icon white; title #c2b697
   -------------------------------------------------------------------------- */
.elementor-element-3a0e4937 .elementor-widget-icon-box { margin-top: 20px !important; }
.elementor-element-3a0e4937 .elementor-icon { background-color: #c2b697 !important; border-color: #c2b697 !important; color: #fff !important; width: 80px !important; height: 80px !important; padding: 22px !important; }
.elementor-element-3a0e4937 .elementor-icon svg { fill: #fff !important; width: 36px !important; height: 36px !important; }
.elementor-element-3a0e4937 .elementor-icon i { font-size: 36px !important; }
.elementor-element-3a0e4937 .elementor-icon-box-title,
.elementor-element-3a0e4937 .elementor-icon-box-title a { color: #c2b697 !important; line-height: 1 !important; }

/* --------------------------------------------------------------------------
   12. Features Section
   -------------------------------------------------------------------------- */
.features { padding-block: 60px; background: #f5f7ff; }

.features__grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
    gap: 32px;
}

.features__item { text-align: center; }
.features__icon { width: 56px; height: 56px; margin-inline: auto; margin-bottom: 16px; color: #c2b697; }
.features__icon svg, .features__icon img { fill: #c2b697; color: #c2b697; }
.features__title { font-size: 1.1rem; font-weight: 700; margin-bottom: 8px; color: #fff; }
.features__text { font-size: .9rem; color: #fff; line-height: 1.7; }

/* --------------------------------------------------------------------------
   13. About Section
   -------------------------------------------------------------------------- */
.about-section { padding-block: 80px; }

.about-section__inner {
    display: grid;
    grid-template-columns: 1fr;
    gap: 48px;
    align-items: center;
}

@media (min-width: 768px) { .about-section__inner { grid-template-columns: 1fr 1fr; } }

.about-section__text { font-size: 1rem; line-height: 1.8; color: #444; margin-bottom: 24px; }
.about-section__image img { border-radius: 10px; box-shadow: 0 8px 32px rgb(0 0 0 / .1); }

/* --------------------------------------------------------------------------
   14. Services
   -------------------------------------------------------------------------- */
.services-section { padding-block: 80px; }

.services-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 28px;
}

.service-card {
    padding: 28px;
    border-radius: 10px;
    border: 1px solid #e8ecf8;
    transition: box-shadow .2s, transform .2s;
}

.service-card:hover { box-shadow: 0 6px 24px rgb(0 0 0 / .09); transform: translateY(-2px); }

.service-card--page { padding: 0; border: none; box-shadow: 0 2px 12px rgb(0 0 0 / .07); overflow: hidden; }
.service-card--page:hover { box-shadow: 0 8px 32px rgb(0 0 0 / .12); }
.service-card--page .service-card__body { padding: 20px; }

.service-card__icon { margin-bottom: 16px; }
.service-card__icon img { width: 48px; height: 48px; object-fit: contain; }
.service-card__title { font-size: 1.05rem; font-weight: 700; margin-bottom: 10px; }
.service-card__title a:hover { color: #2351b1; text-decoration: none; }
.service-card__excerpt { font-size: .9rem; color: #555; line-height: 1.6; }

/* --------------------------------------------------------------------------
   15. Stats
   -------------------------------------------------------------------------- */
.stats-section { padding-block: 60px; background: #2351b1; color: #fff; }

.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
    gap: 32px;
    text-align: center;
}

.stats-item__number { display: block; font-size: 3rem; font-weight: 800; line-height: 1; margin-bottom: 8px; }
.stats-item__label { font-size: .85rem; opacity: .8; text-transform: uppercase; letter-spacing: .08em; }

/* --------------------------------------------------------------------------
   16. Portfolio
   -------------------------------------------------------------------------- */
.portfolio-section { padding-block: 80px; }

.portfolio-filter { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 32px; }

.portfolio-filter__btn {
    padding: 8px 20px;
    border-radius: 50px;
    border: 1px solid #ddd;
    font-size: .85rem;
    font-weight: 600;
    transition: background .15s, color .15s, border-color .15s;
}

.portfolio-filter__btn:hover,
.portfolio-filter__btn--active {
    background: #2351b1;
    color: #fff;
    border-color: #2351b1;
}

.portfolio-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 24px;
}

.portfolio-card { border-radius: 10px; overflow: hidden; box-shadow: 0 2px 8px rgb(0 0 0 / .07); }
.portfolio-card__image-wrap { position: relative; aspect-ratio: 4 / 3; overflow: hidden; }
.portfolio-card__image-wrap img { width: 100%; height: 100%; object-fit: cover; transition: transform .3s; }
.portfolio-card:hover .portfolio-card__image-wrap img { transform: scale(1.06); }

.portfolio-card__overlay {
    position: absolute;
    inset: 0;
    background: rgb(35 81 177 / .75);
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: opacity .25s;
}

.portfolio-card:hover .portfolio-card__overlay { opacity: 1; }

.portfolio-card__link {
    color: #fff;
    font-weight: 700;
    font-size: .95rem;
    border: 2px solid #fff;
    padding: 10px 24px;
    border-radius: 6px;
    transition: background .15s;
}

.portfolio-card__link:hover { background: #fff; color: #2351b1; text-decoration: none; }

.portfolio-card__body { padding: 16px; }
.portfolio-card__cats { font-size: .75rem; color: #2351b1; font-weight: 600; text-transform: uppercase; display: block; margin-bottom: 6px; }
.portfolio-card__title { font-size: 1rem; font-weight: 700; }

/* --------------------------------------------------------------------------
   17. Testimonials
   -------------------------------------------------------------------------- */
.testimonials-section { padding-block: 80px; background: #f5f7ff; }

.testimonials-slider {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 28px;
}

.testimonial-card {
    background: #fff;
    border-radius: 10px;
    padding: 28px;
    box-shadow: 0 2px 12px rgb(0 0 0 / .06);
}

.testimonial-card__text {
    font-size: .95rem;
    line-height: 1.8;
    color: #444;
    margin-bottom: 20px;
    font-style: italic;
    quotes: "\201C" "\201D";
}

.testimonial-card__text::before { content: open-quote; font-size: 2rem; color: #2351b1; line-height: 0; vertical-align: -.4em; margin-right: 4px; }

.testimonial-card__author { display: flex; align-items: center; gap: 14px; }
.testimonial-card__avatar { width: 52px; height: 52px; border-radius: 50%; overflow: hidden; flex-shrink: 0; }
.testimonial-card__avatar img { width: 100%; height: 100%; object-fit: cover; }
.testimonial-card__name { display: block; font-weight: 700; font-size: .95rem; font-style: normal; }
.testimonial-card__position { font-size: .8rem; color: #888; }

/* --------------------------------------------------------------------------
   18. Latest Posts Section
   -------------------------------------------------------------------------- */
.latest-posts-section { padding-block: 80px; }

/* --------------------------------------------------------------------------
   19. Single Post
   -------------------------------------------------------------------------- */
.single-post__header { margin-bottom: 48px; }

.single-post__thumbnail { max-height: 480px; overflow: hidden; }
.single-post__thumbnail img { width: 100%; height: 100%; object-fit: cover; }

.single-post__meta {
    display: flex;
    align-items: center;
    gap: 16px;
    margin-bottom: 16px;
    padding-top: 32px;
}

.single-post__date { font-size: .85rem; color: #888; }
.single-post__cats { display: flex; gap: 8px; }
.single-post__cats a { font-size: .75rem; font-weight: 600; color: #2351b1; text-transform: uppercase; }

.single-post__title { font-size: clamp(1.75rem, 4vw, 2.75rem); font-weight: 800; line-height: 1.2; }

.single-post__layout {
    display: grid;
    grid-template-columns: 1fr;
    gap: 48px;
    margin-top: 40px;
}

@media (min-width: 1024px) { .single-post__layout { grid-template-columns: 1fr 300px; } }

/* --------------------------------------------------------------------------
   20. Entry Content (Typography)
   -------------------------------------------------------------------------- */
.entry-content {
    font-size: 1rem;
    line-height: 1.8;
    color: #333;
    max-width: 72ch;
}

.entry-content h2 { font-size: 1.75rem; font-weight: 700; margin-top: 2em; margin-bottom: .5em; }
.entry-content h3 { font-size: 1.35rem; font-weight: 700; margin-top: 1.5em; margin-bottom: .4em; }
.entry-content p { margin-bottom: 1.2em; }
.entry-content a { color: #2351b1; text-decoration: underline; }
.entry-content ul, .entry-content ol { margin-bottom: 1.2em; padding-left: 1.5em; list-style: revert; }
.entry-content li { margin-bottom: .4em; }
.entry-content blockquote { border-left: 4px solid #2351b1; padding-left: 1.5em; margin: 1.5em 0; color: #555; font-style: italic; }
.entry-content img { border-radius: 8px; margin-block: 1.5em; }
.entry-content table { width: 100%; border-collapse: collapse; margin-bottom: 1.2em; }
.entry-content th, .entry-content td { padding: 10px 14px; border: 1px solid #e0e0e0; text-align: left; }
.entry-content th { background: #f5f7ff; font-weight: 700; }

/* --------------------------------------------------------------------------
   21. Post Navigation
   -------------------------------------------------------------------------- */
.post-navigation { margin-top: 48px; padding-top: 32px; border-top: 1px solid #eee; }
.post-navigation .nav-links { display: flex; justify-content: space-between; gap: 24px; }
.post-navigation .nav-label { display: block; font-size: .75rem; color: #888; text-transform: uppercase; letter-spacing: .08em; margin-bottom: 4px; }
.post-navigation .nav-title { font-weight: 700; color: #2351b1; }

/* --------------------------------------------------------------------------
   22. Pagination
   -------------------------------------------------------------------------- */
.pagination { margin-top: 48px; }
.pagination__list { display: flex; flex-wrap: wrap; gap: 6px; justify-content: center; }
.pagination__item a,
.pagination__item span {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    border-radius: 6px;
    font-size: .9rem;
    font-weight: 600;
    border: 1px solid #ddd;
    transition: background .15s, border-color .15s, color .15s;
}
.pagination__item a:hover { background: #f0f4ff; border-color: #2351b1; color: #2351b1; text-decoration: none; }
.pagination__item .current { background: #2351b1; color: #fff; border-color: #2351b1; }

/* --------------------------------------------------------------------------
   23. Contacts Page
   -------------------------------------------------------------------------- */
.contacts-page { padding-bottom: 80px; }

.contacts-page__grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 48px;
}

@media (min-width: 768px) { .contacts-page__grid { grid-template-columns: 1fr 1fr; } }

.contact-details { display: flex; flex-direction: column; gap: 16px; margin-bottom: 32px; }

.contact-details__item {
    display: grid;
    grid-template-columns: 140px 1fr;
    gap: 12px;
    font-size: .95rem;
}

.contact-details__label { font-weight: 700; color: #444; }
.contact-details__value a { color: #2351b1; }
.contact-details__value a:hover { text-decoration: underline; }

.contacts-page__map { border-radius: 10px; overflow: hidden; min-height: 400px; }
.contacts-page__map iframe { width: 100%; height: 100%; min-height: 400px; border: none; }

/* --------------------------------------------------------------------------
   24. Team Grid
   -------------------------------------------------------------------------- */
.team-section { margin-top: 60px; }

.team-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
    gap: 28px;
    margin-top: 32px;
}

.team-card { text-align: center; }
.team-card__photo { border-radius: 50%; overflow: hidden; width: 160px; height: 160px; margin-inline: auto; margin-bottom: 16px; }
.team-card__photo img { width: 100%; height: 100%; object-fit: cover; }
.team-card__name { font-size: 1.05rem; font-weight: 700; margin-bottom: 4px; }
.team-card__position { font-size: .85rem; color: #2351b1; font-weight: 600; margin-bottom: 8px; }
.team-card__bio { font-size: .85rem; color: #666; line-height: 1.6; }

/* --------------------------------------------------------------------------
   25. Blog Filter
   -------------------------------------------------------------------------- */
.blog-filter { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 32px; }
.blog-filter__link { padding: 6px 18px; border-radius: 50px; border: 1px solid #ddd; font-size: .85rem; font-weight: 600; transition: background .15s, color .15s, border-color .15s; }
.blog-filter__link:hover, .blog-filter__link--active { background: #2351b1; color: #fff; border-color: #2351b1; text-decoration: none; }

/* --------------------------------------------------------------------------
   26. Search Results
   -------------------------------------------------------------------------- */
.search-result { padding: 20px 0; border-bottom: 1px solid #eee; }
.search-result__type { font-size: .75rem; font-weight: 700; color: #2351b1; text-transform: uppercase; letter-spacing: .08em; display: block; margin-bottom: 6px; }
.search-result__title { font-size: 1.2rem; font-weight: 700; margin-bottom: 8px; }
.search-result__title a:hover { color: #2351b1; text-decoration: none; }
.search-result__excerpt { font-size: .9rem; color: #555; line-height: 1.6; margin-bottom: 8px; }
.search-result__link { font-size: .8rem; color: #888; }

/* --------------------------------------------------------------------------
   27. 404
   -------------------------------------------------------------------------- */
.error-404 { padding-block: 80px; text-align: center; }
.error-404__code { font-size: 8rem; font-weight: 900; color: #e8ecf8; line-height: 1; }
.error-404__title { font-size: 1.75rem; font-weight: 700; margin-bottom: 16px; }
.error-404__text { font-size: 1rem; color: #666; margin-bottom: 32px; max-width: 480px; margin-inline: auto; }
.error-404__actions { display: flex; justify-content: center; align-items: center; gap: 16px; flex-wrap: wrap; }

.error-404__actions .btn--primary {
    background: #c2b697;
    border-color: #c2b697;
    border-radius: 8px;
    padding: 13px 24px;
    font-size: 1rem;
    font-weight: 600;
    transition: opacity .15s, background-color .15s linear;
}
.error-404__actions .btn--primary:hover { background: rgb(232, 220, 189); border-color: rgb(232, 220, 189); color: #fff; transform: translateY(-1px); }

/* --------------------------------------------------------------------------
   28. No Results
   -------------------------------------------------------------------------- */
.no-results { text-align: center; padding-block: 60px; }
.no-results__title { font-size: 1.5rem; font-weight: 700; margin-bottom: 12px; }
.no-results__text { color: #666; margin-bottom: 24px; }

/* --------------------------------------------------------------------------
   29. Sidebar
   -------------------------------------------------------------------------- */
.sidebar { }
.widget { margin-bottom: 32px; }
.widget__title { font-size: .9rem; font-weight: 700; text-transform: uppercase; letter-spacing: .08em; margin-bottom: 16px; padding-bottom: 8px; border-bottom: 2px solid #2351b1; }

/* --------------------------------------------------------------------------
   30. Search Form
   -------------------------------------------------------------------------- */
.search-form { display: flex; gap: 8px; max-width: 480px; margin-inline: auto; }
.search-form .search-field { flex: 1; padding: 10px 16px; border: 1px solid #ddd; border-radius: 6px; font-size: .95rem; }
.search-form .search-submit { padding: 10px 20px; background: #2351b1; color: #fff; border-radius: 6px; font-size: .9rem; font-weight: 600; transition: background .15s; }
.search-form .search-submit:hover { background: #1a3d8a; }

/* --------------------------------------------------------------------------
   31. Utility
   -------------------------------------------------------------------------- */
.visually-hidden { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

/* --------------------------------------------------------------------------
   32. Contact Modal
   -------------------------------------------------------------------------- */
body.modal-open { overflow: hidden; }

.contact-modal {
    position: fixed;
    inset: 0;
    z-index: 99999;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 16px;
}

.contact-modal[hidden] { display: none; }

.contact-modal__overlay {
    position: absolute;
    inset: 0;
    background: rgba(0, 0, 0, .55);
    backdrop-filter: blur(4px);
    cursor: pointer;
}

.contact-modal__dialog {
    position: relative;
    width: 100%;
    max-width: 520px;
    max-height: calc(100dvh - 32px);
    overflow-y: auto;
    background: #fff;
    border-radius: 12px;
    padding: 40px 36px 36px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, .2);
    animation: modal-in .22s ease;
}

@keyframes modal-in {
    from { opacity: 0; transform: translateY(14px) scale(.97); }
    to   { opacity: 1; transform: translateY(0)   scale(1); }
}

.contact-modal__close {
    position: absolute;
    top: 14px;
    right: 14px;
    width: 36px;
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 6px;
    color: #888;
    transition: color .15s, background .15s;
}

.contact-modal__close:hover { color: #1a1a1a; background: #f0f0f0; }

.contact-modal__title {
    font-size: 1.5rem;
    font-weight: 700;
    color: #1a1a1a;
    margin-bottom: 6px;
}

.contact-modal__subtitle {
    font-size: .95rem;
    color: #666;
    margin-bottom: 28px;
}

.contact-modal__field { margin-bottom: 18px; position: relative; }

.contact-modal__field-error {
    display: block;
    font-size: .8rem;
    color: #d63638;
    margin-top: 5px;
    line-height: 1.3;
}

.contact-modal__field-error[hidden] { display: none; }

.contact-modal__input--invalid {
    border-color: #d63638 !important;
    box-shadow: 0 0 0 3px rgba(214, 54, 56, .12) !important;
}

.contact-modal__label {
    display: block;
    font-size: .875rem;
    font-weight: 600;
    color: #3c3c3c;
    margin-bottom: 6px;
}

.contact-modal__label span { color: #d63638; }

.contact-modal__input {
    width: 100%;
    padding: 11px 14px;
    border: 1.5px solid #ddd;
    border-radius: 8px;
    font-size: .95rem;
    font-family: inherit;
    color: #1a1a1a;
    transition: border-color .15s, box-shadow .15s;
    outline: none;
    background: #fff;
}

.contact-modal__input:focus {
    border-color: #2351b1;
    box-shadow: 0 0 0 3px rgba(35, 81, 177, .12);
}

.contact-modal__textarea { resize: vertical; min-height: 120px; }

.contact-modal__footer {
    margin-top: 24px;
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.contact-modal__submit {
    position: relative;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    width: 100%;
    padding: 13px 24px;
    font-size: 1rem;
    font-weight: 600;
    border-radius: 8px;
    transition: opacity .15s, background-color .15s linear;
}

.contact-modal__submit:disabled { opacity: .7; cursor: not-allowed; }

.contact-modal__submit-spinner {
    display: none;
    width: 16px;
    height: 16px;
    border: 2px solid rgba(255,255,255,.4);
    border-top-color: #fff;
    border-radius: 50%;
    animation: spin .6s linear infinite;
}

.contact-modal__submit.is-loading .contact-modal__submit-spinner { display: block; }

@keyframes spin { to { transform: rotate(360deg); } }

.contact-modal__result {
    font-size: .9rem;
    font-weight: 500;
    text-align: center;
    min-height: 1.2em;
}

.contact-modal__result--success { color: #0a7d42; }
.contact-modal__result--error   { color: #d63638; }

/* Loader */
.contact-modal__loader {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 20px;
    padding: 48px 0 40px;
    animation: modal-in .2s ease;
}

.contact-modal__loader-ring {
    width: 52px;
    height: 52px;
    border: 4px solid #e8edf8;
    border-top-color: #2351b1;
    border-radius: 50%;
    animation: spin .75s linear infinite;
}

.contact-modal__loader-text {
    font-size: .95rem;
    color: #666;
    font-weight: 500;
}

/* Success screen */
.contact-modal__success {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    padding: 40px 0 36px;
    animation: modal-in .25s ease;
}

.contact-modal__success-icon {
    color: #0a7d42;
    margin-bottom: 20px;
    animation: success-pop .35s cubic-bezier(.34,1.56,.64,1);
}

@keyframes success-pop {
    from { transform: scale(.5); opacity: 0; }
    to   { transform: scale(1);  opacity: 1; }
}

.contact-modal__success-title {
    font-size: 1.4rem;
    font-weight: 700;
    color: #1a1a1a;
    margin-bottom: 10px;
}

.contact-modal__success-text {
    font-size: .95rem;
    color: #444;
    margin-bottom: 16px;
    line-height: 1.5;
}

.contact-modal__success-hint {
    font-size: .8rem;
    color: #aaa;
}

@media (max-width: 540px) {
    .contact-modal__dialog { padding: 32px 20px 24px; }
    .contact-modal__title  { font-size: 1.25rem; }
}
