/* Home Page Styles */
:root {
    --accordion-option-height: 400px;
    --accordion-option-width: 80px;
    --accordion-radius: 1.875rem;
    --accordion-gutter: 10px;
}

/* 80px side padding for all content sections on home page */
body.home-page .container {
    padding-left: 80px !important;
    padding-right: 80px !important;
}

@media (max-width: 1100px) {
    body.home-page .container {
        padding-left: 40px !important;
        padding-right: 40px !important;
    }
}

@media (max-width: 768px) {
    body.home-page .container {
        padding-left: 5px !important;
        padding-right: 5px !important;
    }
}

/* =====================================================
   NEW: Apple-style full-screen hero (home page only)
   ===================================================== */

.hero {
    position: relative;
    width: 100%;
    left: 0;
    margin-left: 0;
    margin-right: 0;
    height: 100vh;
    overflow: hidden;
    background: #000;
    border-radius: 0;
}

/* Hero slider (3 banners) */
.hero-slider {
    position: relative;
    width: 100%;
    height: 100%;
    overflow: hidden;
    background: #000;
    border-radius: 0;
}

.hero-slider-track {
    display: flex;
    width: 300%;
    height: 100%;
    transition: transform 1s cubic-bezier(0.33, 1, 0.68, 1);
    will-change: transform;
}

.hero-slide {
    flex: 0 0 33.333%;
    width: 33.333%;
    height: 100%;
    position: relative;
    overflow: hidden;
}

.hero-slide .hero-banner-img {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.hero-slider-dots {
    position: absolute;
    bottom: 2rem;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    z-index: 20;
}

.hero-slider-dot {
    width: 2rem;
    height: 4px;
    border-radius: 2px;
    border: none;
    background: rgba(255, 255, 255, 0.5);
    cursor: pointer;
    padding: 0;
    transition: background 0.3s ease, width 0.3s ease, opacity 0.3s ease;
}

.hero-slider-dot:hover {
    background: rgba(255, 255, 255, 0.8);
}

.hero-slider-dot.active {
    background: #fff;
    width: 2.5rem;
    opacity: 1;
}

.hero-video {
    width: 100%;
    height: 600px;
    min-height: 300px;
    position: relative;
    overflow: hidden;
    border-radius: 20px;
    background: #ffffff;
    transition: height 0.3s ease;
}

.hero-video video,
.hero-banner-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    pointer-events: none;
    user-select: none;
    -webkit-user-select: none;
    -moz-user-select: none;
    -ms-user-select: none;
    -webkit-touch-callout: none;
    -webkit-tap-highlight-color: transparent;
}

.hero-banner .hero-banner-img {
    position: absolute;
    top: 0;
    left: 0;
}

.hero-banner-video {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    pointer-events: none;
}

.hero-video video::-webkit-media-controls {
    display: none !important;
    opacity: 0 !important;
    visibility: hidden !important;
}

.hero-video video::-webkit-media-controls-enclosure {
    display: none !important;
    opacity: 0 !important;
    visibility: hidden !important;
}

.hero-video video::-webkit-media-controls-panel {
    display: none !important;
    opacity: 0 !important;
    visibility: hidden !important;
}

.hero-video video::-webkit-media-controls-play-button {
    display: none !important;
}

.hero-video video::-webkit-media-controls-start-playback-button {
    display: none !important;
}

.hero-video video:hover::-webkit-media-controls {
    display: none !important;
    opacity: 0 !important;
    visibility: hidden !important;
}

.hero-video video:hover::-webkit-media-controls-enclosure {
    display: none !important;
    opacity: 0 !important;
    visibility: hidden !important;
}

.hero-video-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: flex-start;
    padding: 3rem 3rem 3rem 7rem;
    /* mobile overrides below */
    z-index: 10;
    pointer-events: none;
    background: linear-gradient(to right, rgba(0, 0, 0, 0.35) 0%, rgba(0, 0, 0, 0.1) 50%, transparent 100%);
}

.hero-video-overlay * {
    pointer-events: auto;
}

.hero-video-content {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
    align-items: flex-start;
}

.hero-video-title {
    font-size: 3rem;
    font-weight: 700;
    color: white;
    text-shadow: 0 2px 10px rgba(0, 0, 0, 0.5);
    margin: 0;
    line-height: 1.2;
}

.hero-video-sub {
    font-size: 1.25rem;
    font-weight: 400;
    color: rgba(255, 255, 255, 0.88);
    text-shadow: 0 1px 6px rgba(0, 0, 0, 0.45);
    margin: -0.5rem 0 0;
    line-height: 1.55;
    max-width: 520px;
}

.hero-video-button {
    padding: 1rem 2.5rem;
    background: rgba(255, 255, 255, 0.3);
    backdrop-filter: blur(10px);
    color: white;
    text-decoration: none;
    border-radius: 50px;
    font-size: 1.125rem;
    font-weight: 600;
    transition: all 0.3s ease;
    border: 2px solid rgba(255, 255, 255, 0.5);
}

.hero-video-button:hover {
    background: rgba(255, 255, 255, 0.4);
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
}

/* Responsive: banner height & overlay padding & title size */
@media (max-width: 768px) {
    .hero {
        height: calc(100vh - 110px);
        width: 100%;
        left: 0;
        margin-left: 0;
    }
}

@media (max-width: 1100px) {
    .hero-video-overlay {
        padding: 3rem 3rem 3rem 4rem;
    }
}

@media (max-width: 768px) {
    .hero-video-overlay {
        padding: 2rem 1.5rem 5rem 1.5rem;
    }
    .hero-video-title {
        font-size: 2rem;
    }
    .hero-video-sub {
        font-size: 1rem;
        max-width: 400px;
    }
    .hero-video-button {
        padding: 0.75rem 1.75rem;
        font-size: 1rem;
    }
    .hero-slider-dots {
        bottom: 3rem;
    }
}

@media (max-width: 480px) {
    .hero-video-overlay {
        padding: 1.5rem 1rem 4.5rem 1rem;
    }
    .hero-video-title {
        font-size: 1.6rem;
    }
    .hero-video-sub {
        font-size: 0.9rem;
        max-width: 300px;
    }
    .hero-slider-dots {
        bottom: 2.5rem;
    }
}

/* OLD responsive hero overrides — commented (hero is now 100vh full-screen)
@media (max-width: 768px) {
    .hero-slider { height: 400px; }
    .hero-video-overlay { padding: 2rem; }
    .hero-video-title { font-size: 2rem; }
    .hero-video-button { padding: 0.875rem 2rem; font-size: 1rem; }
}
@media (max-width: 380px) {
    .hero { margin-left: 10px; margin-right: 10px; }
    .hero-slider { height: 300px; min-height: 300px; }
    .hero-video { height: 300px; min-height: 300px; }
    .hero-video-overlay { padding: 1.5rem; }
    .hero-video-title { font-size: 1.5rem; }
    .hero-video-button { padding: 0.75rem 1.5rem; font-size: 0.9rem; }
}
@media (min-width: 1101px) and (max-width: 1600px) {
    .hero { margin-left: 20px; margin-right: 20px; }
    .hero-slider { height: 600px; }
    .hero-video { height: 600px;
    }
}

@media (max-width: 1100px) {
    .hero {
        margin-left: 20px;
        margin-right: 20px;
    }
    
    .hero-slider {
        height: 500px;
    }
    
    .hero-video {
        height: 500px;
    }
}

@media (max-width: 768px) {
    .hero {
        margin-left: 15px;
        margin-right: 15px;
        margin-top: 2rem;
    }
    
    .hero-slider {
        height: 400px;
        border-radius: 15px;
    }
    
    .hero-video {
        height: 400px;
        border-radius: 15px;
    }
}

@media (max-width: 480px) {
    .hero {
        margin-left: 10px;
        margin-right: 10px;
    }
    
    .hero-slider {
        height: 400px;
        min-height: 400px;
    }
    
    .hero-video {
        height: 400px;
        min-height: 400px;
    }
}

.hero-video-fallback {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #f3f4f6;
}

.hero-video-fallback img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

/* OLD .features margin — overridden below for home page
.features {
    padding: 3.4rem 0;
    background: white;
    margin: 0 30px;
    margin-top: 1.5rem;
}
*/

/* ── Benefits "Чек" Cards — Liquid Glass ────────────────────────────────── */
.benefits-section {
    padding: 4rem 0 4.5rem;
    background: #ffffff;
}

.benefits-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 285px));
    gap: 3rem;
    align-items: start;
    justify-content: center;
}

/* Wrapper */
.bc {
    display: flex;
    flex-direction: column;
    gap: 0.2rem;
    transition: transform 0.38s cubic-bezier(0.34, 1.04, 0.64, 1);
}
.bc:hover { transform: translateY(-5px); }

/* Shared block base */
.bc-top,
.bc-bottom {
    border-radius: 22px;
    background: #ffffff;
}

/* ── Top block ────────────────────────────────────────────────────────── */
.bc-top {
    padding: 1.1rem 1.25rem 1.25rem;
    position: relative;
}

/* ── Bottom block ─────────────────────────────────────────────────────── */
.bc-bottom {
    padding: 1.25rem;
    display: flex;
    flex-direction: column;
    gap: 1rem;
    position: relative;
}

.bc-watermark {
    width: 110px;
    height: 110px;
    object-fit: contain;
    opacity: 0.1;
    filter: brightness(0);
    pointer-events: none;
    display: block;
}

/* Блик по логотипу */
@keyframes bc-watermark-shine {
    0%        { left: -50px; }
    25%, 100% { left: 150px; }
}

.bc-watermark-wrap {
    position: absolute;
    bottom: 0.6rem;
    right: 0.6rem;
    width: 110px;
    height: 110px;
    overflow: hidden;
    pointer-events: none;
    z-index: 1;
}

.bc-watermark-wrap::after {
    content: '';
    position: absolute;
    top: -20px;
    left: -50px;
    width: 30px;
    height: 160px;
    background: linear-gradient(
        to right,
        transparent,
        rgba(255, 255, 255, 0.75),
        transparent
    );
    transform: rotate(25deg);
    animation: bc-watermark-shine 7s ease-in-out infinite;
}

.bc-list,
.bc-btn {
    position: relative;
    z-index: 1;
}

/* ── Light variant ────────────────────────────────────────────────────── */
.bc--light .bc-top,
.bc--light .bc-bottom {
    border: 1px solid #09237C;
    box-shadow: 0 2px 16px rgba(9, 35, 124, 0.10);
    color: #0f0f0f;
}

/* ── Primary (#09237C) ────────────────────────────────────────────────── */
.bc--primary .bc-top,
.bc--primary .bc-bottom {
    border: 1px solid #204788;
    box-shadow: 0 4px 22px rgba(32, 71, 136, 0.14);
    color: #0f0f0f;
}

/* ── Medium (#204788) ─────────────────────────────────────────────────── */
.bc--medium .bc-top,
.bc--medium .bc-bottom {
    border: 1px solid #3b5cc4;
    box-shadow: 0 4px 22px rgba(59, 92, 196, 0.14);
    color: #0f0f0f;
}

/* ── Dark (#17265F) ───────────────────────────────────────────────────── */
.bc--dark .bc-top,
.bc--dark .bc-bottom {
    border: 1px solid #17265F;
    box-shadow: 0 4px 22px rgba(23, 38, 95, 0.14);
    color: #0f0f0f;
}

/* ── Badge ────────────────────────────────────────────────────────────── */
.bc-badge {
    display: inline-block;
    font-size: 0.62rem;
    font-weight: 700;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    padding: 0.22rem 0.65rem;
    border-radius: 100px;
    margin-bottom: 0.8rem;
}
.bc--light .bc-badge,
.bc--primary .bc-badge,
.bc--medium .bc-badge,
.bc--dark .bc-badge {
    background: rgba(9, 35, 124, 0.07);
    color: #09237C;
    border: 1px solid rgba(9, 35, 124, 0.15);
}

/* ── Title ────────────────────────────────────────────────────────────── */
.bc-title {
    font-size: 1.15rem;
    font-weight: 800;
    line-height: 1.15;
    letter-spacing: -0.01em;
    text-transform: uppercase;
    margin: 0 0 0.4rem;
    color: #09237C;
}

/* ── Subtitle ─────────────────────────────────────────────────────────── */
.bc-sub {
    font-size: 0.8rem;
    font-weight: 500;
    margin: 0;
    line-height: 1.3;
    color: rgba(0, 0, 0, 0.52);
}

/* ── Feature list ─────────────────────────────────────────────────────── */
.bc-list {
    list-style: none;
    padding: 0;
    margin: 0;
    display: flex;
    flex-direction: column;
    gap: 0.55rem;
    flex: 1;
}
.bc-list li {
    font-size: 0.82rem;
    line-height: 1.45;
    padding-left: 0.9rem;
    position: relative;
}
.bc-list li::before {
    content: '';
    position: absolute;
    left: 0;
    top: 0.58em;
    width: 4px;
    height: 4px;
    border-radius: 50%;
}
.bc--light .bc-list li::before,
.bc--primary .bc-list li::before,
.bc--medium .bc-list li::before,
.bc--dark .bc-list li::before { background: rgba(9, 35, 124, 0.32); }

/* ── Button — left-aligned, consultation style ────────────────────────── */
.bc-btn {
    align-self: flex-start;
    display: inline-block;
    text-align: center;
    font-size: 0.82rem;
    font-weight: 600;
    letter-spacing: 0.02em;
    text-decoration: none;
    padding: 0.55rem 2rem;
    border-radius: 50px;
    transition: background 0.3s ease, transform 0.3s ease, box-shadow 0.3s ease;
}
.bc-btn:hover { transform: translateY(-2px); }

.bc--light .bc-btn,
.bc--primary .bc-btn,
.bc--medium .bc-btn,
.bc--dark .bc-btn {
    background: rgba(9, 35, 124, 0.08);
    color: #09237C;
    border: 1px solid rgba(9, 35, 124, 0.28);
}
.bc--light .bc-btn:hover,
.bc--primary .bc-btn:hover,
.bc--medium .bc-btn:hover,
.bc--dark .bc-btn:hover {
    background: rgba(9, 35, 124, 0.16);
    box-shadow: 0 4px 14px rgba(9, 35, 124, 0.18);
}

/* ── Responsive ───────────────────────────────────────────────────────── */
@media (max-width: 1100px) {
    .benefits-grid {
        grid-template-columns: repeat(2, minmax(0, 290px));
        gap: 1.8rem;
    }
}
@media (max-width: 600px) {
    .benefits-grid {
        grid-template-columns: minmax(0, 350px);
        gap: 1.8rem;
    }
    .benefits-section { padding: 2.5rem 0 3rem; }
}

/* ── Stats block ────────────────────────────────────────────────────────── */
.home-page .about-stats {
    padding: 4.5rem 0;
    background: #f5f5f7;
}

.home-page .about-stats-inner {
    max-width: 1440px;
    margin: 0 auto;
    padding: 0 80px;
}

.home-page .about-stats-eyebrow {
    font-size: 1.8rem;
    font-weight: 600;
    letter-spacing: 0.18em;
    text-transform: uppercase;
    color: #6b6b6b;
    margin: 0 0 3.5rem 0;
    text-align: center;
}

.home-page .about-stats-row {
    display: flex;
    align-items: stretch;
    justify-content: space-between;
    width: 100%;
}

.home-page .about-stat-item {
    flex: 1;
    padding: 0.75rem 1rem;
    text-align: center;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.35rem;
}

.home-page .about-stat-number {
    font-size: clamp(2.2rem, 3.5vw, 3.2rem);
    font-weight: 700;
    color: #1a1a1a;
    line-height: 1.1;
    letter-spacing: -0.04em;
}

.home-page .about-stat-label {
    font-size: 0.9rem;
    color: #6b6b6b;
    line-height: 1.35;
    max-width: 9em;
}

.home-page .about-stat-divider {
    width: 1px;
    align-self: center;
    min-height: 2.5rem;
    background: rgba(0, 0, 0, 0.1);
    flex-shrink: 0;
}

@media (max-width: 900px) {
    .home-page .about-stats-inner { padding: 0 24px; }
    .home-page .about-stats-eyebrow { font-size: 1.3rem; }
    .home-page .about-stats-row { flex-wrap: wrap; }
    .home-page .about-stat-divider { display: none; }
    .home-page .about-stat-item { flex: 1 1 33%; min-width: 120px; }
}

@media (max-width: 480px) {
    .home-page .about-stats { padding: 3rem 0; }
    .home-page .about-stat-item { flex: 1 1 50%; }
}

/* NEW: features section is the first white block after full-screen banner */
.features {
    padding: 3.4rem 0 0 0;
    background: white;
    margin: 0;
    margin-top: -60px;
    border-radius: 70px 70px 0 0;
    position: relative;
    z-index: 2;
}

@media (max-width: 1100px) {
    .features {
        border-radius: 60px 60px 0 0;
        margin-top: -50px;
    }
}

@media (max-width: 768px) {
    .features {
        border-radius: 40px 40px 0 0;
        margin-top: -40px;
    }
}

@media (max-width: 480px) {
    .features {
        border-radius: 28px 28px 0 0;
        margin-top: -28px;
    }
}

/* ── Universal section title style ─────────────────────────────────────── */
.home-page .section-title {
    font-size: 1.8rem;
    font-weight: 600;
    letter-spacing: 0.18em;
    text-transform: uppercase;
    color: #6b6b6b;
    margin: 0 0 3.5rem 0;
    text-align: center;
}

@media (max-width: 768px) {
    .home-page .section-title {
        font-size: 1.3rem;
    }
}

/* Планшеты */
@media (min-width: 769px) and (max-width: 1024px) {
    .home-page .section-title {
        font-size: 1.5rem;
    }
}

/* Accordion Cards Styles */
.accordion-wrapper {
    display: flex;
    justify-content: center;
    align-items: center;
    width: 100%;
    padding: 2rem 10px;
}

.accordion-options {
    display: flex;
    flex-direction: row;
    max-width: 100%;
    height: 400px;
    width: 100%;
    position: relative;
}

@media (min-width: 768px) {
    .accordion-options {
        min-width: 480px;
    }
}

.accordion-option {
    background-color: rgba(255, 255, 255, 0.1);
    margin: var(--accordion-gutter);
    flex-grow: 1;
    border-radius: var(--accordion-radius);
    flex: 0 0 var(--accordion-option-width);
    transition: flex-grow 1.25s cubic-bezier(.17, .84, .44, 1),
                min-height 1.25s cubic-bezier(.17, .84, .44, 1),
                height 1.25s cubic-bezier(.17, .84, .44, 1);
    background-position: center center;
    background-size: cover;
    background-repeat: no-repeat;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    cursor: pointer;
    -webkit-tap-highlight-color: transparent;
    touch-action: manipulation;
    backface-visibility: hidden;
    -webkit-backface-visibility: hidden;
    transform: translateZ(0);
    position: relative;
    overflow: hidden;
}

/* Mobile: accordion items wrap в 2 колонки */
@media (max-width: 767px) {
    .accordion-wrapper {
        overflow: hidden;
        padding: 2rem 16px 0;
    }
    .accordion-options {
        flex-wrap: wrap;
        height: auto;
    }
    .accordion-option {
        flex: 1 1 calc(50% - 2 * var(--accordion-gutter));
        min-height: 160px;
    }
}

.accordion-option-content {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    background: rgba(243, 244, 246, 0.7);
    padding: 1.5rem;
    opacity: 0;
    visibility: hidden;
    transform: translateY(20px);
    transition: opacity 0.1s ease,
                visibility 0.1s ease,
                transform 0.1s ease;
    pointer-events: none;
}

.accordion-option.active .accordion-option-content {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
    transition: opacity 0.4s ease 0.6s,
                visibility 0.4s ease 0.6s,
                transform 0.4s ease 0.6s;
}

.accordion-option-title {
    font-size: 1.5rem;
    font-weight: 700;
    color: #1e293b;
    margin: 0 0 0.75rem 0;
    line-height: 1.2;
}

.accordion-option-text {
    font-size: 1rem;
    color: #1e293b;
    line-height: 1.6;
    margin: 0 0 1rem 0;
}

@media (min-width: 1440px) {
    .accordion-option-title {
        font-size: 1.75rem;
        margin-bottom: 1rem;
    }

    .accordion-option-text {
        font-size: 1.125rem;
        line-height: 1.7;
    }
}

.accordion-chat-link {
    display: inline-flex;
    align-items: center;
    color: #17255F;
    font-weight: 600;
    font-size: 1rem;
    text-decoration: none;
    padding: 0.75rem 1.25rem;
    background: rgba(255, 255, 255, 0.9);
    border-radius: 16px;
    transition: all 0.3s ease;
    margin-top: 0.5rem;
    pointer-events: auto;
}

.accordion-chat-link:hover {
    background: #ffffff;
    transform: translateX(4px);
    box-shadow: 0 2px 8px rgba(23, 37, 95, 0.15);
}

.accordion-chat-link svg {
    transition: transform 0.3s ease;
}

.accordion-chat-link:hover svg {
    transform: translateX(2px);
}

.accordion-option:not(.active) {
    cursor: pointer;
}

.accordion-option.active {
    flex-grow: 6;
}

/* Подсказка на десктопе: приоткрытие ровно на 15% (flex-basis, т.к. у остальных flex-grow: 0) */
.accordion-option.accordion-option-hint {
    flex: 0 0 143px; /* 80px + 15% от типичного прироста ≈ 143px */
    transition: flex-basis 2.8s cubic-bezier(0.33, 1, 0.68, 1);
}
.accordion-option.accordion-option-hint-closing {
    transition: flex-basis 2.8s cubic-bezier(0.33, 1, 0.68, 1);
}

/* Планшеты и телефоны: вертикальный аккордеон (одинаковая адаптивка) */
@media (max-width: 1024px) {
    .accordion-options {
        flex-direction: column;
        min-height: 600px;
        height: auto;
        min-width: 100%;
    }

    .accordion-option {
        flex: 0 0 80px;
        min-height: 80px;
        height: 80px;
        width: 100%;
        margin: var(--accordion-gutter) 0;
        transition: flex-grow 1.25s cubic-bezier(.17, .84, .44, 1),
                    min-height 1.25s cubic-bezier(.17, .84, .44, 1),
                    height 1.25s cubic-bezier(.17, .84, .44, 1);
    }

    .accordion-option.active {
        flex-grow: 3;
        min-height: 360px;
        height: auto;
    }

    /* На планшетах и телефонах приоткрытие отключено — карточки без анимации подсказки */
    .accordion-option.accordion-option-hint,
    .accordion-option.accordion-option-hint-closing {
        flex-grow: 0;
        min-height: 80px;
        height: 80px;
        animation: none;
    }

    .accordion-option-content {
        padding: 1rem;
    }

    .accordion-option-title {
        font-size: 1.125rem;
        margin-bottom: 0.5rem;
    }

    .accordion-option-text {
        font-size: 0.875rem;
        line-height: 1.5;
        margin-bottom: 0.75rem;
    }

    .accordion-chat-link {
        font-size: 0.875rem;
        padding: 0.625rem 1rem;
    }
}

/* Consultation CTA Section */
.consultation-cta {
    width: 100%;
    margin: 5rem 0 0 0;
    transform: translateZ(0);
    will-change: transform;
    backface-visibility: hidden;
    -webkit-backface-visibility: hidden;
    contain: layout style paint;
    isolation: isolate;
    position: relative;
    left: 0;
    right: 0;
}

@media (max-width: 1100px) {
    .consultation-cta {
        margin-top: 4rem;
    }
}

@media (max-width: 768px) {
    .consultation-cta {
        margin-top: 4rem;
    }
}

@media (max-width: 380px) {
    .consultation-cta {
        margin-top: 3rem;
    }
}

.consultation-cta-image {
    position: relative;
    width: 100%;
    height: 600px;
    overflow: hidden;
    transform: translateZ(0);
    will-change: transform;
    backface-visibility: hidden;
    -webkit-backface-visibility: hidden;
}

.consultation-cta-image img,
.consultation-cta-video {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    transform: translateZ(0);
    will-change: transform;
    backface-visibility: hidden;
    -webkit-backface-visibility: hidden;
    image-rendering: -webkit-optimize-contrast;
    image-rendering: crisp-edges;
    image-rendering: optimize-quality;
}

.consultation-cta-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(0, 0, 0, 0.4);
    padding: 2rem;
    z-index: 4; /* текст и кнопка поверх сугроба и снега */
    transform: translateZ(0);
    backface-visibility: hidden;
    -webkit-backface-visibility: hidden;
}

.consultation-cta-content {
    text-align: center;
    max-width: 800px;
}

.consultation-cta-title {
    font-size: 2.5rem;
    font-weight: 700;
    color: white;
    margin-bottom: 1rem;
    text-shadow: 0 2px 10px rgba(0, 0, 0, 0.5);
    line-height: 1.2;
}

.consultation-cta-text {
    font-size: 1.125rem;
    color: rgba(255, 255, 255, 0.95);
    margin-bottom: 2rem;
    line-height: 1.6;
    text-shadow: 0 1px 5px rgba(0, 0, 0, 0.3);
}

.consultation-cta-button {
    padding: 1rem 2.5rem;
    background: rgba(255, 255, 255, 0.3);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    color: white;
    text-decoration: none;
    border-radius: 50px;
    font-size: 1.125rem;
    font-weight: 600;
    transition: transform 0.3s ease, background 0.3s ease, box-shadow 0.3s ease;
    border: 2px solid rgba(255, 255, 255, 0.5);
    display: inline-block;
    transform: translateZ(0);
    will-change: transform;
    backface-visibility: hidden;
    -webkit-backface-visibility: hidden;
}

.consultation-cta-button:hover {
    background: rgba(255, 255, 255, 0.4);
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
}

@media (max-width: 768px) {
    .consultation-cta-title {
        font-size: 2rem;
    }
    
    .consultation-cta-text {
        font-size: 1rem;
        margin-bottom: 1.5rem;
    }
    
    .consultation-cta-button {
        padding: 0.875rem 2rem;
        font-size: 1rem;
    }
}

@media (max-width: 380px) {
    .consultation-cta-title {
        font-size: 1.5rem;
    }
    
    .consultation-cta-text {
        font-size: 0.9375rem;
        margin-bottom: 1.25rem;
    }
    
    .consultation-cta-button {
        padding: 0.75rem 1.5rem;
        font-size: 0.9rem;
    }
}

/* Evaluation Carousel Section */
.evaluation-section {
    padding: 110px 0;
    background: #ffffff;
    margin: 0 30px;
    overflow-x: hidden;
}

@media (max-width: 1100px) {
    .evaluation-section {
        margin: 0 10px;
    }
}

@media (max-width: 768px) {
    .evaluation-section {
        margin: 0 15px;
        padding: 4rem 0;
    }
}

@media (max-width: 380px) {
    .evaluation-section {
        margin: 0 10px;
        padding: 3rem 0;
    }
}


.evaluation-carousel-wrapper {
    position: relative;
    overflow: visible;
    width: calc(100% + 60px);
    padding: 0;
    cursor: grab;
    margin: 0 -30px;
}

.evaluation-carousel-wrapper:active {
    cursor: grabbing;
}

@media (max-width: 1100px) {
    .evaluation-carousel-wrapper {
        width: calc(100% + 40px);
        margin: 0 -20px;
    }
}

@media (max-width: 768px) {
    .evaluation-carousel-wrapper {
        width: 100%;
        margin: 0;
    }
}

@media (max-width: 480px) {
    .evaluation-carousel-wrapper {
        width: calc(100% + 20px);
        margin: 0 -10px;
    }
}

.evaluation-carousel-btn {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    z-index: 10;
    width: 48px;
    height: 48px;
    border-radius: 50%;
    background: transparent;
    border: none;
    color: #17255F;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
    opacity: 0.7;
}

.evaluation-carousel-btn:hover {
    opacity: 1;
    transform: translateY(-50%) scale(1.1);
}

.evaluation-carousel-btn:active {
    transform: translateY(-50%) scale(0.95);
}

.evaluation-carousel-btn svg {
    width: 32px;
    height: 32px;
    filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.2));
}

.evaluation-carousel-btn-prev {
    left: 10px;
}

.evaluation-carousel-btn-next {
    right: 10px;
}

.evaluation-carousel-btn:hover {
    opacity: 1;
    transform: translateY(-50%) scale(1.1);
}

.evaluation-carousel-btn:active {
    transform: translateY(-50%) scale(0.95);
}

.evaluation-carousel-btn svg {
    width: 32px;
    height: 32px;
    filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.2));
}

.evaluation-carousel-btn-prev {
    left: 10px;
}

.evaluation-carousel-btn-next {
    right: 10px;
}

.evaluation-carousel {
    display: flex;
    gap: 2rem;
    animation: slideEvaluation 10s linear infinite;
    will-change: transform;
    transition: transform 0.6s cubic-bezier(0.4, 0, 0.2, 1);
    transform: translateZ(0);
    backface-visibility: hidden;
    -webkit-backface-visibility: hidden;
}

.evaluation-carousel-wrapper:hover .evaluation-carousel {
    animation-play-state: paused;
}

.evaluation-carousel.manual {
    animation: none;
}

@keyframes slideEvaluation {
    0% {
        transform: translateX(0);
    }
    100% {
        transform: translateX(-50%);
    }
}


.evaluation-card {
    flex: 0 0 calc(25% - 1.5rem);
    min-width: calc(25% - 1.5rem);
    background: #ffffff;
    border: 1px solid #e5e7eb;
    border-radius: 16px;
    overflow: hidden;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.06);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    text-decoration: none;
    color: inherit;
    display: flex;
    flex-direction: column;
}

.evaluation-card:hover {
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.12);
    transform: translateY(-4px);
    border-color: #d1d5db;
}

.evaluation-card-image {
    width: 100%;
    height: 250px;
    overflow: hidden;
    position: relative;
}

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

.evaluation-card:hover .evaluation-card-image img {
    transform: scale(1.05);
}

.evaluation-card-content {
    padding: 1.5rem;
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 100px;
    text-align: center;
}

.evaluation-card-title {
    font-size: 1rem;
    font-weight: 600;
    color: #1e293b;
    line-height: 1.4;
    margin: 0;
}

@media (min-width: 1024px) {
    .evaluation-card {
        flex: 0 0 calc(20% - 1.6rem);
        min-width: calc(20% - 1.6rem);
    }
}

@media (max-width: 1024px) {
    .evaluation-card {
        flex: 0 0 calc(33.333% - 1.33rem);
        min-width: calc(33.333% - 1.33rem);
    }
    
    @keyframes slide {
        100% {
            transform: translateX(calc(-100% / 3 * 10));
        }
    }
}

@media (max-width: 768px) {
    .evaluation-card {
        flex: 0 0 calc(50% - 1rem);
        min-width: calc(50% - 1rem);
    }
    
    .evaluation-card-image {
        height: 200px;
    }
    
    @keyframes slide {
        100% {
            transform: translateX(calc(-100% / 2 * 10));
        }
    }
}

@media (max-width: 480px) {
    .evaluation-card {
        flex: 0 0 calc(80% - 1rem);
        min-width: calc(80% - 1rem);
    }
    
    @keyframes slide {
        100% {
            transform: translateX(calc(-100% / 1.25 * 10));
        }
    }
}

/* About Company Section */
.about-section {
    padding: 5rem 0;
    background: #ffffff;
    margin: 0 30px;
}

@media (max-width: 1100px) {
    .about-section {
        margin: 0 20px;
    }
}

@media (max-width: 768px) {
    .about-section {
        margin: 0 15px;
        padding: 4rem 0;
    }
}

@media (max-width: 380px) {
    .about-section {
        margin: 0 10px;
        padding: 3rem 0;
    }
}

.about-content {
    display: grid;
    grid-template-columns: 1fr 2fr;
    gap: 60px;
    align-items: start;
}

@media (max-width: 1024px) {
    .about-content {
        grid-template-columns: 1fr;
        gap: 2rem;
    }
}

.about-image-wrapper {
    position: relative;
    width: 100%;
    height: 700px;
    overflow: hidden;
    border-radius: 16px;
}

@media (max-width: 768px) {
    .about-image-wrapper {
        height: 600px;
    }
}

.about-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 16px;
}

.about-text-wrapper {
    display: flex;
    flex-direction: column;
    gap: 2rem;
    max-width: 800px;
}

.about-label {
    font-size: 1.475rem;
    font-weight: 500;
    color: #64748b;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.about-title {
    font-size: 2.25rem;
    font-weight: 600;
    color: #1e293b;
    line-height: 1.3;
    margin: 0;
}

@media (max-width: 768px) {
    .about-title {
        font-size: 1.875rem;
    }
}

.about-block {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.about-subtitle {
    font-size: 1.625rem;
    font-weight: 600;
    color: #1e293b;
    line-height: 1.3;
    margin: 0;
}

@media (max-width: 768px) {
    .about-subtitle {
        font-size: 1.375rem;
    }
}

.about-paragraph {
    font-size: 1rem;
    line-height: 1.7;
    color: #475569;
    margin: 0;
}

.about-link {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    color: #17255F;
    font-weight: 500;
    font-size: 1rem;
    text-decoration: none;
    margin-top: 1rem;
    transition: color 0.2s;
}

.about-link::after {
    content: '→';
    transition: transform 0.2s;
}

.about-link:hover {
    color: #1e3a8a;
}

.about-link:hover::after {
    transform: translateX(4px);
}

/* Masonry Gallery Section */
.masonry-section {
    padding: 3rem 0;
    background: #ffffff;
    margin: 0 30px;
}

@media (max-width: 1100px) {
    .masonry-section {
        margin: 0 20px;
    }
}

@media (max-width: 768px) {
    .masonry-section {
        margin: 0 15px;
        padding: 1rem 0;
    }
}

@media (max-width: 380px) {
    .masonry-section {
        margin: 0 10px;
        padding: 3rem 0;
    }
}

.masonry-list {
    column-width: 280px;
    columns: 280px;
    column-gap: 1rem;
    padding: 0.8rem 0;
}

@media (min-width: 768px) {
    .masonry-list {
        column-gap: 1.5rem;
    }
}

@media (min-width: 1024px) {
    .masonry-list {
        column-gap: 2rem;
    }
}

.masonry-item {
    margin-bottom: 1rem;
    break-inside: avoid;
    page-break-inside: avoid;
    opacity: 1;
    transform: translateY(0);
    transition: opacity 0.6s ease, transform 0.6s ease;
}

/* На мобильных скрываем фото кроме первых 5 */
@media (max-width: 767px) {
    .masonry-item-hidden {
        display: none;
        opacity: 0;
        transform: translateY(20px);
    }

    .masonry-item-hidden.masonry-item-visible {
        display: block;
    }
}

/* На планшетах и ПК показываем все фото */
@media (min-width: 768px) {
    .masonry-item-hidden {
        display: block !important;
        opacity: 1 !important;
        transform: translateY(0) !important;
    }
}

.masonry-item img {
    width: 100%;
    height: auto;
    display: block;
    border-radius: 18px;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.masonry-item:hover img {
    transform: scale(1.02);
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.15);
}

.masonry-buttons {
    display: flex;
    justify-content: center;
    margin-top: 2rem;
    gap: 1rem;
}

@media (min-width: 768px) {
    .masonry-buttons {
        display: none;
    }
}

/* ПК: в галерее первые 8 картинок, остальные по кнопке «Показать еще» (как в Типы экспертиз) */
.masonry-desktop-actions {
    display: none;
    justify-content: center;
    margin-top: 1.5rem;
}

@media (min-width: 768px) {
    .masonry-desktop-actions {
        display: flex;
    }
    .masonry-item-desktop-hidden {
        display: none !important;
    }
    /* Плавное появление: сначала невидимы, потом transition */
    .masonry-item-desktop-fade-in {
        opacity: 0 !important;
        transform: translateY(20px) !important;
    }
    /* Плавное скрытие перед display: none */
    .masonry-item-desktop-fade-out {
        opacity: 0 !important;
        transform: translateY(-15px) !important;
        pointer-events: none;
    }
}

@media (max-width: 767px) {
    .masonry-desktop-actions {
        display: none !important;
    }
}

/* Кнопка галереи на ПК — как в блоке «Типы экспертиз» */
.masonry-desktop-show-more-btn.btn.btn-primary,
#showMoreBtn,
#evaluationShowMoreBtn {
    background: transparent;
    color: #09237C;
    border: 2px solid #09237C;
    padding: 1rem 2.5rem;
    border-radius: 50px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.3s ease, transform 0.3s ease, box-shadow 0.3s ease;
    box-shadow: none;
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
}
.masonry-desktop-show-more-btn.btn.btn-primary:hover,
#showMoreBtn:hover,
#evaluationShowMoreBtn:hover {
    background: rgba(9, 35, 124, 0.07);
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(9, 35, 124, 0.18);
}
.masonry-desktop-show-more-btn.btn.btn-primary:active,
#showMoreBtn:active,
#evaluationShowMoreBtn:active {
    transform: translateY(0);
}

/* На мобильных: кнопка «Показать еще» / «Скрыть» под галереей */
.masonry-mobile-actions {
    display: none;
    justify-content: center;
    margin-top: 1.5rem;
}

@media (max-width: 767px) {
    .masonry-mobile-actions {
        display: flex;
    }
}

@media (min-width: 768px) {
    .masonry-mobile-actions {
        display: none !important;
    }
}

.masonry-show-more-btn {
    background-color: #17255F;
    color: white;
    border: none;
    padding: 1rem 2.5rem;
    border-radius: 21px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    font-family: inherit;
    box-shadow: 0 4px 12px rgba(23, 37, 95, 0.2);
}

.masonry-show-more-btn:hover {
    background-color: #1e3a8a;
    transform: translateY(-2px);
    box-shadow: 0 6px 16px rgba(23, 37, 95, 0.3);
}

.masonry-show-more-btn:active {
    transform: translateY(0);
}

/* Clients Section */
.clients-section {
    padding: 5rem 0;
    background: #ffffff;
    margin: 0 30px;
    overflow: hidden;
}

@media (max-width: 1100px) {
    .clients-section {
        margin: 0 20px;
    }
}

@media (max-width: 768px) {
    .clients-section {
        margin: 0 15px;
        padding: 4rem 0;
    }
}

@media (max-width: 380px) {
    .clients-section {
        margin: 0 10px;
        padding: 3rem 0;
    }
}

@media (max-width: 768px) {
    .clients-section {
        overflow-x: hidden;
    }
}

.clients-carousel-wrapper {
    position: relative;
    overflow: visible;
    width: calc(100% + 160px);
    padding: 0;
    cursor: grab;
    margin-left: -80px;
    margin-right: -80px;
}

@media (max-width: 1100px) {
    .clients-carousel-wrapper {
        width: calc(100% + 80px);
        margin-left: -40px;
        margin-right: -40px;
    }
}

@media (max-width: 768px) {
    .clients-carousel-wrapper {
        width: calc(100% + 40px);
        margin-left: -20px;
        margin-right: -20px;
    }
}

.clients-carousel-wrapper:active {
    cursor: grabbing;
}

.clients-carousel {
    display: flex;
    gap: 3rem;
    animation: slideClients 120s linear infinite;
    will-change: transform;
    transition: transform 0.6s cubic-bezier(0.4, 0, 0.2, 1);
    transform: translateZ(0);
    backface-visibility: hidden;
    -webkit-backface-visibility: hidden;
    width: fit-content;
    align-items: center;
}

.clients-carousel-wrapper:hover .clients-carousel {
    animation-play-state: paused;
}

.clients-carousel.manual {
    animation: none;
}

@keyframes slideClients {
    0% {
        transform: translateX(0);
    }
    100% {
        transform: translateX(-50%);
    }
}


.client-logo-item {
    flex: 0 0 auto;
    width: 180px;
    min-width: 180px;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0.6;
    transition: opacity 0.3s ease;
    padding: 1rem;
}

.client-logo-item:hover {
    opacity: 1;
}

.client-logo-item img {
    max-width: 100%;
    max-height: 80px;
    width: auto;
    height: auto;
    object-fit: contain;
    filter: grayscale(100%);
    transition: filter 0.3s ease;
}

.client-logo-item:hover img {
    filter: grayscale(0%);
}

/* Clients Navigation Buttons */
.clients-nav-btn {
    display: none !important;
}

@media (max-width: 768px) {
    .client-logo-item {
        width: 140px;
        min-width: 140px;
    }
    
    .client-logo-item img {
        max-height: 60px;
    }
    
    .clients-nav-btn {
        width: 35px;
        height: 35px;
    }
    
    .clients-nav-btn svg {
        width: 18px;
        height: 18px;
    }
}

@media (max-width: 480px) {
    .client-logo-item {
        width: 120px;
        min-width: 120px;
    }
    
    .client-logo-item img {
        max-height: 50px;
    }
    
    .clients-nav-btn {
        display: none;
    }
}

/* Certificates Section */
.certificates-section {
    padding: 5rem 0;
    background: #ffffff;
    margin: 0 30px;
    overflow: hidden;
}

@media (max-width: 1100px) {
    .certificates-section {
        margin: 0 20px;
    }
}

@media (max-width: 768px) {
    .certificates-section {
        margin: 0 15px;
        padding: 4rem 0;
    }
}

@media (max-width: 380px) {
    .certificates-section {
        margin: 0 10px;
        padding: 3rem 0;
    }
}

@media (max-width: 768px) {
    .certificates-section {
        overflow-x: hidden;
    }
}

.certificates-carousel-wrapper {
    position: relative;
    overflow: visible;
    width: calc(100% + 160px);
    padding: 0;
    cursor: grab;
    margin-left: -80px;
    margin-right: -80px;
}

.certificates-carousel-wrapper:active {
    cursor: grabbing;
}

@media (max-width: 1100px) {
    .certificates-carousel-wrapper {
        width: calc(100% + 80px);
        margin-left: -40px;
        margin-right: -40px;
    }
}

@media (max-width: 768px) {
    .certificates-carousel-wrapper {
        width: calc(100% + 40px);
        margin-left: -20px;
        margin-right: -20px;
    }
}

.certificates-carousel {
    display: flex;
    gap: 2rem;
    animation: slideCertificates 150s linear infinite;
    will-change: transform;
    transition: transform 0.6s cubic-bezier(0.4, 0, 0.2, 1);
    transform: translateZ(0);
    backface-visibility: hidden;
    -webkit-backface-visibility: hidden;
    width: fit-content;
}

.certificates-carousel-wrapper:hover .certificates-carousel {
    animation-play-state: paused;
}

.certificates-carousel.manual {
    animation: none;
}

@keyframes slideCertificates {
    0% {
        transform: translateX(0);
    }
    100% {
        transform: translateX(-50%);
    }
}


.certificate-item {
    flex: 0 0 auto;
    width: 150px;
    min-width: 150px;
    cursor: pointer;
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

@media (max-width: 1024px) {
    .certificate-item {
        width: 150px;
        min-width: 150px;
    }
}

@media (max-width: 768px) {
    .certificate-item {
        width: 150px;
        min-width: 150px;
    }
}

@media (max-width: 480px) {
    .certificate-item {
        width: 140px;
        min-width: 140px;
    }
}

.certificate-item-wrapper {
    position: relative;
    overflow: hidden;
    border-radius: 12px;
    will-change: transform;
    backface-visibility: hidden;
    transform: translateZ(0);
    display: flex;
    align-items: center;
    justify-content: center;
    background: #f8f9fa;
    height: 200px;
    width: 100%;
}

.certificate-item img {
    max-width: 100%;
    max-height: 100%;
    width: auto;
    height: auto;
    object-fit: contain;
    display: block;
    border-radius: 12px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
    transition: box-shadow 0.3s ease;
}

.certificate-item:hover img {
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.15);
}

.certificate-item-label {
    text-align: center;
    font-size: 0.875rem;
    font-weight: 500;
    color: #64748b;
    margin: 0;
}

/* Certificate Navigation Buttons */
.certificates-nav-btn {
    display: none !important;
}

.certificates-nav-btn:hover {
    opacity: 1;
    transform: translateY(-50%) scale(1.1);
}

.certificates-nav-btn:active {
    transform: translateY(-50%) scale(0.95);
}

.certificates-nav-btn svg {
    width: 32px;
    height: 32px;
    stroke: #1e293b;
    transition: stroke 0.3s ease;
    filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.2));
}

.certificates-nav-btn:hover svg {
    stroke: #17255F;
}

.certificates-prev {
    left: 10px;
}

.certificates-next {
    right: 10px;
}

@media (max-width: 768px) {
    .certificate-item-wrapper {
        height: 180px;
    }
    
    .certificates-nav-btn {
        width: 40px;
        height: 40px;
    }
    
    .certificates-nav-btn svg {
        width: 28px;
        height: 28px;
    }
}

@media (max-width: 480px) {
    .certificate-item-wrapper {
        height: 160px;
    }
    
    .certificates-nav-btn svg {
        width: 24px;
        height: 24px;
    }
}

/* Certificate Modal */
.certificate-modal {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.95);
    display: none;
    align-items: center;
    justify-content: center;
    z-index: 9999;
    padding: 2rem;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.certificate-modal.active {
    display: flex;
    opacity: 1;
}

.certificate-modal-close {
    position: absolute;
    top: 2rem;
    right: 2rem;
    background: rgba(255, 255, 255, 0.1);
    border: 2px solid rgba(255, 255, 255, 0.3);
    border-radius: 50%;
    width: 50px;
    height: 50px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.3s ease;
    z-index: 10000;
}

.certificate-modal-close:hover {
    background: rgba(255, 255, 255, 0.2);
    border-color: rgba(255, 255, 255, 0.5);
}

.certificate-modal-close svg {
    width: 24px;
    height: 24px;
    stroke: white;
}

.certificate-modal-image {
    max-width: 90%;
    max-height: 90%;
    object-fit: contain;
    border-radius: 8px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.5);
    animation: modalImageAppear 0.3s ease;
}

@keyframes modalImageAppear {
    from {
        opacity: 0;
        transform: scale(0.9);
    }
    to {
        opacity: 1;
        transform: scale(1);
    }
}

@media (max-width: 768px) {
    .certificate-modal-close {
        top: 1rem;
        right: 1rem;
        width: 40px;
        height: 40px;
    }
    
    .certificate-modal-close svg {
        width: 20px;
        height: 20px;
    }
    
    .certificate-modal-image {
        max-width: 95%;
        max-height: 95%;
    }
}

.services-preview {
    padding: 4rem 0 3rem 0;
    background: #ffffff;
    margin: 0 30px;
}

@media (max-width: 1100px) {
    .services-preview {
        margin: 0 20px;
    }
}

@media (max-width: 768px) {
    .services-preview {
        margin: 0 15px;
        padding: 2.2rem 0;
    }
}

@media (max-width: 380px) {
    .services-preview {
        margin: 0 10px;
    }
}

/* ── Services / Evaluation grid ─────────────────────────────────────────── */
.services-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 1rem;
    align-items: start;
}

@media (min-width: 600px) {
    .services-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (min-width: 1024px) {
    .services-grid {
        grid-template-columns: repeat(4, 1fr);
    }
}

/* ── Card shell ─────────────────────────────────────────────────────────── */
.service-card {
    position: relative;
    display: block;
    border-radius: 40px;
    overflow: hidden;
    height: 420px;
    background: #1a1a1e;
    text-decoration: none;
    color: inherit;
    opacity: 0;
    cursor: pointer;
    box-shadow: 0 4px 24px rgba(0, 0, 0, 0.18), 0 1px 6px rgba(0, 0, 0, 0.1);
    transition: transform 0.42s cubic-bezier(0.34, 1.04, 0.64, 1),
                box-shadow 0.42s cubic-bezier(0.4, 0, 0.2, 1);
    -webkit-tap-highlight-color: transparent;
}

@media (max-width: 599px) {
    .service-card { height: 380px; }
}

.service-card.visible {
    opacity: 1;
    animation: scCardIn 0.5s ease-out both;
}

@keyframes scCardIn {
    from { opacity: 0; transform: translateY(18px); }
    to   { opacity: 1; transform: translateY(0); }
}

.service-card.hidden { display: none; }

.service-card:hover {
    transform: translateY(-6px);
    box-shadow: 0 16px 48px rgba(0, 0, 0, 0.26), 0 4px 12px rgba(0, 0, 0, 0.12);
}

/* ── Slide images ───────────────────────────────────────────────────────── */
.sc-slides {
    position: absolute;
    inset: 0;
    z-index: 0;
}

.sc-slide {
    position: absolute;
    inset: 0;
    background-size: cover;
    background-position: center;
    opacity: 0;
    transition: opacity 0.5s ease,
                transform 0.55s cubic-bezier(0.4, 0, 0.2, 1);
}

.sc-slide.active { opacity: 1; }

.service-card:hover .sc-slide.active {
    transform: scale(1.06);
}

/* ── Dark gradient overlay ──────────────────────────────────────────────── */
.sc-overlay {
    position: absolute;
    inset: 0;
    z-index: 1;
    background: linear-gradient(
        to bottom,
        transparent 20%,
        rgba(0, 0, 0, 0.08) 40%,
        rgba(0, 0, 0, 0.62) 62%,
        rgba(0, 0, 0, 0.93) 100%
    );
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
    padding: 1.125rem;
}

/* ── Slide dots ─────────────────────────────────────────────────────────── */
.sc-dots {
    display: flex;
    justify-content: center;
    gap: 5px;
    margin-bottom: 0.875rem;
}

.sc-dot {
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.35);
    cursor: pointer;
    transition: background 0.22s, transform 0.22s;
    -webkit-tap-highlight-color: transparent;
}

.sc-dot.active {
    background: #ffffff;
    transform: scale(1.3);
}

/* ── Text content ───────────────────────────────────────────────────────── */
.sc-content {
    display: flex;
    flex-direction: column;
    gap: 0.4rem;
    margin-bottom: 0.75rem;
}

.sc-title {
    font-size: 1.1rem;
    font-weight: 700;
    color: #ffffff;
    line-height: 1.25;
    letter-spacing: -0.022em;
    margin: 0;
}

.sc-text {
    font-size: 0.8rem;
    color: rgba(255, 255, 255, 0.72);
    line-height: 1.55;
    margin: 0;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

/* ── Tag pills ──────────────────────────────────────────────────────────── */
.sc-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 0.375rem;
    margin-top: 0.25rem;
}

.sc-tag {
    background: rgba(255, 255, 255, 0.13);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border: 1px solid rgba(255, 255, 255, 0.18);
    color: rgba(255, 255, 255, 0.9);
    font-size: 0.72rem;
    font-weight: 500;
    padding: 0.3rem 0.8rem;
    border-radius: 100px;
    white-space: nowrap;
    letter-spacing: 0.01em;
}

/* ── CTA button ─────────────────────────────────────────────────────────── */
.sc-footer { margin-top: 0.75rem; }

.sc-btn {
    display: block;
    width: 100%;
    background: rgba(255, 255, 255, 0.95);
    color: #1d1d1f;
    font-size: 0.9rem;
    font-weight: 600;
    text-align: center;
    padding: 0.75rem 1rem;
    border-radius: 100px;
    letter-spacing: -0.01em;
    transition: background 0.2s;
}

.service-card:hover .sc-btn { background: #ffffff; }

/* ── Legacy classes (kept for any edge cases) ───────────────────────────── */
.service-card img { display: none; }
.service-card-content { display: none; }
.service-card-title  { display: none; }
.service-card-text   { display: none; }
.service-card-footer { display: none; }
.service-card-link   { display: none; }

#showMoreContainer {
    margin-top: 3rem;
}

.cta {
    padding: 4rem 0;
    background: var(--primary-600);
    color: white;
    margin: 0 30px;
    border-radius: 20px;
}

.cta-content {
    text-align: center;
    max-width: 48rem;
    margin: 0 auto;
}

.cta-title {
    font-size: 2rem;
    font-weight: 700;
    margin-bottom: 1rem;
}

@media (min-width: 768px) {
    .cta-title {
        font-size: 2.5rem;
    }
}

.cta-text {
    font-size: 1.25rem;
    margin-bottom: 2rem;
    color: var(--primary-100);
}

/* Consultation Modal */
.consultation-modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 2000;
    align-items: center;
    justify-content: center;
    padding: 1rem;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.consultation-modal.active {
    display: flex;
    opacity: 1;
}

.consultation-modal-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.5);
    backdrop-filter: blur(4px);
}

.consultation-modal-content {
    position: relative;
    background: white;
    border-radius: 2.5rem;;
    padding: 2.5rem;
    max-width: 600px;
    width: 100%;
    max-height: 90vh;
    overflow-y: auto;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
    transform: scale(0.95) translateY(20px);
    transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    z-index: 1;
}

.consultation-modal.active .consultation-modal-content {
    transform: scale(1) translateY(0);
}

.consultation-modal-content .chat-close-button {
    position: absolute;
    top: 1.5rem;
    right: 1.5rem;
    z-index: 100;
}

.consultation-modal-title {
    font-size: 1.75rem;
    font-weight: 700;
    color: #1e293b;
    margin: 0 0 2rem 0;
    text-align: center;
}

.consultation-form {
    display: flex;
    flex-direction: column;
    gap: 1.25rem;
}

.consultation-form-group {
    display: flex;
    flex-direction: column;
}

.consultation-form-label {
    font-size: 0.9375rem;
    font-weight: 500;
    color: #334155;
    margin-bottom: 0.5rem;
}

.consultation-input-wrapper {
    position: relative;
    margin: 0;
}

/* Border layer like in login modal */
.consultation-input-wrapper::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    border: 1px solid #354584;
    border-radius: 1rem;
    z-index: 1;
    pointer-events: none;
    transition: all 0.3s ease;
}

.consultation-form-input,
.consultation-form-textarea {
    display: block;
    padding: 14px;
    width: 100%;
    margin: 0;
    color: #1e293b;
    outline: none;
    background-color: transparent;
    border: none;
    border-radius: 1.2rem;
    font-weight: 500;
    letter-spacing: 0.8px;
    font-size: 15px;
    font-family: inherit;
    transition: all 0.3s ease;
    position: relative;
    z-index: 3;
    pointer-events: auto;
    resize: vertical;
}

.consultation-form-input::placeholder,
.consultation-form-textarea::placeholder {
    color: #64748b;
}

.consultation-form-input:focus,
.consultation-form-textarea:focus {
    background-color: transparent;
    transform: scale(1);
}

.consultation-input-wrapper:focus-within::before {
    border-color: #17255F;
    box-shadow: 0 0 16px 1px rgba(23, 37, 95, 0.2);
}

.consultation-form-textarea {
    min-height: 100px;
}

.consultation-form-checkbox-label {
    display: flex;
    align-items: flex-start;
    gap: 0.75rem;
    cursor: pointer;
    font-size: 0.9375rem;
    color: #475569;
    line-height: 1.5;
}

.consultation-form-checkbox {
    width: 18px;
    height: 18px;
    margin-top: 2px;
    cursor: pointer;
    accent-color: #17255F;
    flex-shrink: 0;
}

.consultation-form-checkbox-text {
    user-select: none;
}

.consultation-form-submit {
    background: #17255F;
    color: white;
    border: none;
    border-radius: 1.2rem;
    padding: 1rem 2rem;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
    margin-top: 0.5rem;
}

.consultation-form-submit:hover {
    background: #1e3a8a;
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(23, 37, 95, 0.3);
}

.consultation-form-submit:active {
    transform: translateY(0);
}

@media (max-width: 768px) {
    .consultation-modal-content {
        padding: 2rem 1.5rem;
        border-radius: 20px;
    }
    
    .consultation-modal-title {
        font-size: 1.5rem;
        margin-bottom: 1.5rem;
    }
    
    .consultation-modal-content .chat-close-button {
        top: 1rem;
        right: 1rem;
    }
}

/* reCAPTCHA styling */
.consultation-form-group .g-recaptcha {
    display: flex;
    justify-content: flex-start;
    margin: 0.5rem 0;
}

@media (max-width: 768px) {
    .consultation-form-group .g-recaptcha {
        transform: scale(0.85);
        transform-origin: 0 0;
    }
}
