/* ============================================
   INDEX PAGE - Уникальные стили главной страницы
   ============================================ */

/* Hero Section */
.hero {
    padding: 120px 0 80px;
    position: relative;
    z-index: 1;
}

.hero-content {
    position: relative;
}

.hero-title {
    font-family: 'Merriweather', serif;
    font-size: 64px;
    line-height: 1.2;
    color: #4d4d4d;
    margin-bottom: 48px;
    font-weight: 400;
}

.hero-banner-bg {
    position: absolute;
    bottom: 0;
    right: 0;
    width: min(708px, 52vw);
    max-width: 100%;
    aspect-ratio: 708 / 686;
    height: auto;
    border-radius: 40px;
    overflow: hidden;
    pointer-events: none;
    z-index: 3;
}

.hero-banner {
    position: relative;
    background: #4d4d4d;
    border-radius: 40px;
    height: 408px;
    overflow: hidden;
    margin-bottom: 0;
}

.hero-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: right center;
    border-radius: 40px;
}

/* Hide mobile hero image on desktop */
.hero-mobile-image {
    display: none;
}

.decorative-circles {
    position: absolute;
    bottom: -63px;
    left: 0;
    width: 670px;
    height: 280px;
    pointer-events: none;
    z-index: 2;
}

.decorative-circles img {
    width: 100%;
    height: 100%;
    object-fit: contain;
}

.hero-text {
    position: absolute;
    left: 41px;
    top: 61px;
    max-width: 694px;
    z-index: 4;
}

.hero-subtitle {
    font-size: 24px;
    line-height: 1.3;
    color: white;
    margin-bottom: 27px;
}

/* Hero button hover (Figma: Bezh2 -> White, no movement) */
.hero .btn.btn-primary:hover {
    background: #ffffff;
    border-color: #ffffff;
}

.hero .btn.btn-primary:hover span {
    color: #4d4d4d;
}

/* Benefits Section */
.benefits {
    padding: 80px 0;
    position: relative;
    z-index: 1;
}

.benefits-grid {
    display: grid;
    /* Figma: 5 cards ~270px, keep 1 row but allow gentle shrink on 1366/1280 */
    grid-template-columns: repeat(5, minmax(0, 270px));
    justify-content: space-between;
    gap: 8px;
}

.benefit-card {
    background: white;
    border-radius: 30px;
    padding: 20px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    gap: 18px;
    height: 260px;
}

.benefits-title-break {
    display: inline;
}

.benefit-icon {
    position: relative;
    width: 48px;
    height: 48px;
    flex: 0 0 48px;
}

.benefit-icon-shadow {
    position: absolute;
    width: 39px;
    height: 36px;
    left: 4.5px;
    top: 17px;
    background: #f7d59e;
    filter: blur(15px);
}

.benefit-icon-box {
    position: absolute;
    inset: 0;
    background: #f7d59e;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.benefit-icon-box img {
    width: 36px;
    height: 36px;
    object-fit: contain;
}

.benefit-content {
    display: flex;
    flex-direction: column;
    gap: 14px;
    width: 100%;
}

.benefit-title {
    font-size: 20px;
    font-weight: 700;
    line-height: 1.3;
    color: #4d4d4d;
    margin: 0;
}

.benefit-text {
    font-size: 16px;
    line-height: 1.3;
    color: #4d4d4d;
    margin: 0;
}

.benefit-text strong {
    font-weight: 600;
}

.benefit-stats {
    display: flex;
    gap: 24px;
    margin: 0;
}

.stat-item {
    display: flex;
    flex-direction: column;
    gap: 0px;
}

.stat-number {
    font-size: 20px;
    font-weight: 700;
    line-height: 1.3;
    color: #4d4d4d;
    margin: 0;
}

.stat-label {
    font-size: 16px;
    line-height: 1.3;
    color: #4d4d4d;
    margin: 0;
}

/* Services Section */
.services {
    padding: 80px 0;
    position: relative;
    z-index: 1;
}

.services-header {
    margin-bottom: 50px;
}

.services-grid {
    display: grid;
    grid-template-columns: 447px 447px 476px;
    grid-template-rows: 360px 380px;
    gap: 15px;
    grid-auto-flow: dense;
}

.service-card {
    background: white;
    border-radius: 30px;
    padding: 40px;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    position: relative;
    overflow: hidden;
    transition: background-color 0.2s ease;
}

/* Делает карточки услуг кликабельными и доступными с клавиатуры */
.service-card[data-bp-href] {
    cursor: pointer;
}

.service-card[data-bp-href]:focus-visible {
    outline: 2px solid #f7d59e;
    outline-offset: 4px;
}

/* Hover state for service cards (Figma: white -> dark, no lift) */
.service-card:hover {
    background: #4d4d4d;
}

.service-card:hover .service-title {
    color: #f7d59e;
}

.service-card:hover .service-subtitle,
.service-card:hover .service-description,
.service-card:hover .service-list,
.service-card:hover .service-list p {
    color: #ffffff;
}

.service-card:hover .service-icon {
    background: #f7d59e;
}

.service-card:hover .service-icon img {
    filter: none;
}

.service-large {
    grid-column: 1 / 3;
    grid-row: 1;
}

.service-tall {
    grid-column: 3;
    grid-row: 1 / 3;
}

.service-card:nth-child(2) {
    grid-column: 1;
    grid-row: 2;
}

.service-card:nth-child(3) {
    grid-column: 2;
    grid-row: 2;
}

.service-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 16px;
}

.service-title {
    font-size: 36px;
    line-height: 1.3;
    color: #4d4d4d;
    font-weight: 400;
    margin: 0;
}

.service-subtitle {
    font-size: 16px;
    color: #4d4d4d;
    margin-top: 8px;
    margin-bottom: 0;
}

.service-icon {
    width: 50px;
    height: 50px;
    background: #4d4d4d;
    border-radius: 15px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.service-icon img {
    width: 19px;
    height: 19px;
    filter: brightness(0) invert(1);
}

.service-description {
    font-size: 18px;
    line-height: 1.3;
    color: #4d4d4d;
}

.service-tall .service-description {
    margin-top: 0px;
    position: absolute;
    top: 250px;
}

.service-list {
    display: flex;
    flex-direction: column;
    gap: 8px;
    font-size: 18px;
    line-height: 1.3;
    color: #4d4d4d;
}

.service-list p {
    margin: 0;
}

.service-image {
    position: absolute;
    overflow: hidden;
}

.service-image-1 {
    right: -20px;
    bottom: 0;
    width: 461px;
    height: 347px;
    border-bottom-right-radius: 30px;
    display: flex;
    align-items: flex-end;
    justify-content: flex-end;
}

.service-image-1 img {
    width: 85%;
    height: 85%;
    object-fit: cover;
}

.service-image-2 {
    right: 0;
    bottom: 0;
    width: 398px;
    height: 371px;
    border-bottom-right-radius: 30px;
}

.service-image-2 img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

/* Hide mobile-only service buttons on desktop */
.mobile-service-btn {
    display: none;
}

/* Experience Section */
.experience {
    padding: 80px 0;
    background: transparent;
    margin: 0 20px;
    position: relative;
    z-index: 1;
}

.experience .container {
    padding: 40px;
    background: white;
    border-radius: 40px;
}

.experience .section-title {
    margin-bottom: 40px;
}

.experience-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 8px;
}

.experience-card {
    background: white;
    border: 1px solid #eeeeee;
    border-radius: 30px;
    padding: 30px;
    display: flex;
    flex-direction: column;
    gap: 18px;
    align-items: flex-start;
}

.experience-card.experience-wide {
    grid-column: span 3;
    height: auto;
    padding: 0;
    overflow: visible;
    background: transparent;
    border: none;
    margin-top: 32px;
    align-items: stretch;
}

.experience-icon {
    width: 48px;
    height: 48px;
    background: #f7d59e;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    flex-shrink: 0;
    box-shadow: 0 8px 20px rgba(247, 213, 158, 0.6), 0 0 30px rgba(255, 140, 66, 0.3);
}

.experience-icon::before {
    content: '';
    position: absolute;
    width: 48px;
    height: 48px;
    background: radial-gradient(circle, rgba(247, 213, 158, 0.8) 0%, rgba(255, 140, 66, 0.4) 50%, transparent 70%);
    filter: blur(15px);
    z-index: -1;
}

.experience-icon img {
    width: 36px;
    height: 36px;
}

.experience-title {
    font-size: 24px;
    font-weight: 600;
    line-height: 1.3;
    color: #4d4d4d;
    margin: 0;
}

.experience-text {
    font-size: 18px;
    line-height: 1.3;
    color: #4d4d4d;
    margin: 0;
}

.experience-wide-content {
    display: flex;
    gap: 20px;
    width: 100%;
}

.experience-wide-image {
    width: 550px;
    height: 339px;
    border-radius: 15px;
    overflow: hidden;
    flex-shrink: 0;
}

.experience-wide-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.experience-wide-text {
    background: white;
    border: 1px solid #eeeeee;
    border-radius: 30px;
    padding: 30px;
    flex: 1;
    min-width: 0;
    height: 339px;
    display: flex;
    flex-direction: column;
    gap: 18px;
    box-sizing: border-box;
}

.experience-wide-text > div:first-child {
    display: flex;
    flex-direction: column;
    gap: 9px;
}

.industry-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 9px;
}

.industry-tag {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    padding: 10px;
    background: #f9f9f9;
    border: 1px solid #eeeeee;
    border-radius: 10000px;
    font-size: 18px;
    line-height: 1.3;
    color: #4d4d4d;
    width: calc(50% - 5px);
    box-sizing: border-box;
}

.tag-icon {
    width: 40px;
    height: 40px;
    background: #4d4d4d;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.tag-icon img {
    width: 24px;
    height: 24px;
}

/* Team Section */
.team {
    padding: 80px 0;
    position: relative;
    z-index: 1;
}

.team-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 40px;
}

.team-header .section-title {
    max-width: 817px;
}

.team-subtitle {
    font-size: 24px;
    line-height: 1.3;
    color: #4d4d4d;
    max-width: 465px;
    padding-top: 14px;
}

.team-image {
    width: 100%;
    height: 465px;
    border-radius: 40px;
    overflow: hidden;
    margin-bottom: 14px;
}

.team-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center 25%;
}

.team-roles {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 8px;
}

.role-card {
    background: white;
    border: 1px solid #eeeeee;
    border-radius: 30px;
    padding: 30px;
    display: flex;
    flex-direction: column;
    gap: 18px;
    justify-content: flex-start;
    align-items: flex-start;
}

.role-content {
    width: 100%;
    display: flex;
    flex-direction: column;
    gap: 14px;
}

.role-card-cta {
    display: flex;
    flex-direction: column;
    justify-content: flex-start;
    cursor: pointer;
    transition: background-color 0.2s ease, border-color 0.2s ease;
    text-decoration: none;
    color: inherit;
}

.role-card-cta .role-cta-content {
    margin-top: auto;
}

/* Role CTA card hover (Figma: white -> dark, CTA text + icon become bezh) */
.role-card-cta:hover {
    background: #4d4d4d;
    border-color: #4d4d4d;
}

.role-card-cta:hover .role-cta-title {
    color: #ffffff;
}

.role-card-cta:hover .role-cta-text {
    color: #f7d59e;
}

.role-card-cta:hover .btn-icon {
    background: #f7d59e;
}

.role-card-cta:hover .btn-icon img {
    filter: none;
}

.role-icon {
    width: 48px;
    height: 48px;
    background: #f7d59e;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    box-shadow: 0 8px 20px rgba(247, 213, 158, 0.6), 0 0 30px rgba(255, 140, 66, 0.3);
    flex-shrink: 0;
}

.role-icon::before {
    content: '';
    position: absolute;
    width: 48px;
    height: 48px;
    background: radial-gradient(circle, rgba(247, 213, 158, 0.8) 0%, rgba(255, 140, 66, 0.4) 50%, transparent 70%);
    filter: blur(15px);
    z-index: -1;
}

.role-icon img {
    width: 29px;
    height: 29px;
}

.role-title {
    font-size: 24px;
    font-weight: 600;
    line-height: 1.3;
    color: #4d4d4d;
    margin: 0;
}

.role-text {
    font-size: 18px;
    line-height: 1.3;
    color: #4d4d4d;
    font-weight: 500;
    margin: 0;
}

.role-cta-title {
    font-size: 24px;
    font-weight: 600;
    line-height: 1.3;
    color: #4d4d4d;
}

.role-cta-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    width: 100%;
}

.role-cta-text {
    font-size: 20px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.6px;
    color: #4d4d4d;
}

/* ============================================
   RESPONSIVE DESIGN - Index Page Specific
   ============================================ */
@media (max-width: 1440px) {
    .hero-title {
        font-size: 56px;
    }

    .services-grid {
        grid-template-columns: 1fr 1fr;
        grid-template-rows: auto;
    }

    .service-large,
    .service-tall {
        grid-column: auto;
        grid-row: auto;
    }
}

@media (max-width: 1200px) {
    /* Services grid becomes single-column: reset explicit grid placement to avoid implicit columns */
    .service-card:nth-child(2),
    .service-card:nth-child(3) {
        grid-column: auto;
        grid-row: auto;
    }

    .benefits-grid {
        grid-template-columns: repeat(3, 1fr);
        height: auto;
    }

    .services-grid {
        grid-template-columns: 1fr;
    }

    .service-tall {
        grid-row: span 1;
        height: auto;
    }

    .experience-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .experience-card.experience-wide {
        grid-column: span 2;
    }

    .industry-tag {
        width: calc(50% - 5px);
    }

    .team-roles {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 768px) {
    .hero-title {
        font-size: 40px;
    }

    .hero-banner {
        height: auto;
        min-height: 400px;
    }

    .benefits-grid {
        grid-template-columns: 1fr;
    }

    .experience-grid {
        grid-template-columns: 1fr;
    }

    .experience-card.experience-wide {
        grid-column: span 1;
    }

    .experience-wide-content {
        flex-direction: column;
    }

    .experience-wide-image {
        width: 100%;
        height: auto;
        min-height: 250px;
    }

    .experience-wide-text {
        height: auto;
    }

    .industry-tag {
        width: 100%;
    }

    .team-roles {
        grid-template-columns: 1fr;
    }
}

/* ============================================
   MOBILE STYLES - До 480px (Index Page)
   ============================================ */
@media (max-width: 480px) {
    /* Hero Section Mobile */
    .hero {
        padding: 20px 0 40px;
    }

    .hero-title {
        font-size: 28px;
        text-align: center;
        margin-bottom: 12px;
    }

    .hero-banner-bg {
        display: none;
    }

    .hero-banner {
        position: relative;
        height: 582px;
        border-radius: 40px;
        overflow: hidden;
        display: flex;
        flex-direction: column;
    }

    .decorative-circles {
        display: none;
    }

    .hero-text {
        position: relative;
        left: auto;
        top: auto;
        padding: 20px;
        max-width: 100%;
        z-index: 4;
    }

    .hero-subtitle {
        font-size: 18px;
        margin-bottom: 14px;
    }

    .hero-mobile-image {
        display: block;
        position: absolute;
        bottom: 0;
        left: 0;
        right: 0;
        width: 100%;
        height: 340px;
        object-fit: cover;
        object-position: center top;
        z-index: 1;
    }

    /* Benefits Section Mobile */
    .benefits {
        padding: 40px 0;
    }

    .benefits .section-title-center {
        font-size: 20px;
        margin-bottom: 14px;
    }

    .benefits-title-break {
        display: block;
    }

    .benefits-grid {
        display: flex;
        overflow-x: auto;
        gap: 8px;
        padding-bottom: 10px;
        scrollbar-width: none;
        -ms-overflow-style: none;
        height: auto;
        width: 100%;
        margin-right: -16px;
        padding-right: 16px;
    }

    .benefits-grid::-webkit-scrollbar {
        display: none;
    }

    .benefit-card {
        min-width: 280px;
        width: 280px;
        height: 260px;
        flex-shrink: 0;
        padding: 20px;
    }

    .benefit-title {
        font-size: 20px;
    }

    .benefit-text {
        font-size: 16px;
    }

    .stat-number {
        font-size: 24px;
    }

    .stat-label {
        font-size: 16px;
    }

    .benefit-stats {
        flex-direction: row;
        gap: 24px;
    }

    /* Services Section Mobile */
    .services {
        padding: 40px 0;
    }

    .services-header {
        margin-bottom: 30px;
        text-align: center;
    }

    .services-header .section-title {
        font-size: 28px;
        text-align: center;
    }

    .services-header .section-subtitle {
        font-size: 18px;
        text-align: center;
    }

    .services-grid {
        display: flex;
        flex-direction: column;
        gap: 21px;
    }

    .service-card {
        width: 100%;
        height: auto;
        min-height: auto;
        padding: 30px 20px;
        border-radius: 30px;
        justify-content: flex-start;
        gap: 20px;
    }

    .service-large,
    .service-tall {
        height: 530px;
        min-height: 530px;
    }

    .service-large,
    .service-tall {
        grid-column: auto;
        grid-row: auto;
    }

    .service-header {
        flex-direction: column;
        gap: 20px;
        align-items: flex-start;
        margin-bottom: 0;
    }

    .service-title {
        font-size: 20px;
        font-weight: 700;
        text-align: center;
        width: 100%;
    }

    .service-title-break-desktop {
        display: none;
    }

    .service-subtitle {
        display: none;
    }

    .service-icon {
        display: none;
    }

    .service-description {
        font-size: 16px;
        text-align: left;
        position: static;
    }

    .service-tall .service-description {
        position: static;
    }

    .service-list {
        font-size: 16px;
    }

    .service-image {
        position: absolute;
        bottom: 0;
        left: 0;
        right: 0;
        width: auto;
        height: 270px;
        display: flex;
        align-items: flex-end;
        justify-content: flex-end;
        pointer-events: none;
    }

    .service-image-1,
    .service-image-2 {
        position: absolute;
        bottom: 0;
        overflow: hidden;
    }

    .service-image-1 {
        left: 0;
        right: 0;
        width: auto;
        height: 270px;
    }

    .service-image-2 {
        left: auto;
        right: 0;
        bottom: -12px;
        width: 338px;
        height: 271px;
    }

    .service-image-1 img,
    .service-image-2 img {
        width: 100%;
        height: 100%;
        object-fit: cover;
        object-position: right bottom;
    }

    /* In Figma the 2nd service image is fully visible (no top crop) */
    .service-image-2 img {
        object-fit: contain;
    }

    .service-card .btn-primary {
        width: 100%;
        justify-content: space-between;
        margin-top: 0;
    }

    .mobile-service-btn {
        display: flex;
    }

    /* Reorder service cards for mobile */
    .service-large {
        order: 1;
    }

    .service-tall {
        order: 2;
    }

    .service-card:nth-child(2) {
        order: 3;
    }

    .service-card:nth-child(3) {
        order: 4;
    }

    /* Hide service images on mobile for cards without images */
    .service-card:nth-child(2) .service-image,
    .service-card:nth-child(3) .service-image {
        display: none;
    }

    /* Experience Section Mobile */
    .experience {
        padding: 40px 0;
        margin: 0;
    }

    .experience .container {
        background: white;
        border-radius: 40px;
        padding: 40px 16px;
    }

    .experience .section-title {
        font-size: 28px;
        text-align: center;
        margin-bottom: 30px;
    }

    .experience-grid {
        display: flex;
        flex-direction: column;
        gap: 8px;
    }

    .experience-card {
        padding: 30px 20px;
        gap: 18px;
    }

    .experience-title {
        font-size: 20px;
    }

    .experience-text {
        font-size: 16px;
    }

    .experience-card.experience-wide {
        margin-top: 0;
        padding: 40px 0 0;
    }

    .experience-wide-content {
        flex-direction: column;
        gap: 20px;
    }

    .experience-wide-image {
        width: 100%;
        height: 221px;
        min-height: 0;
        border-radius: 15px;
        margin-bottom: 0;
        /* On narrow phones the illustration was cropped too much with object-fit: cover */
        background: #f9f4ec;
    }

    .experience-wide-image img {
        object-fit: contain;
        object-position: center;
    }

    .experience-wide-text {
        height: auto;
        padding: 30px 20px;
        border-radius: 30px;
    }

    .industry-tags {
        display: flex;
        flex-direction: column;
        gap: 9px;
    }

    .industry-tag {
        width: 100%;
        font-size: 16px;
    }

    /* Team Section Mobile */
    .team {
        padding: 40px 0;
    }

    .team-header {
        flex-direction: column;
        gap: 14px;
        margin-bottom: 30px;
    }

    .team-header .section-title {
        font-size: 28px;
        text-align: center;
        max-width: 100%;
    }

    .team-subtitle {
        font-size: 18px;
        text-align: center;
        max-width: 100%;
        padding-top: 0;
    }

    .team-image {
        height: 250px;
        border-radius: 10px;
        margin-bottom: 8px;
        position: relative;
        overflow: hidden;
    }

    .team-image img {
        position: absolute;
        width: 142.46%;
        height: 136%;
        left: -21.23%;
        top: -16%;
        object-fit: cover;
    }

    .team-roles {
        display: flex;
        overflow-x: auto;
        gap: 8px;
        padding-bottom: 10px;
        scrollbar-width: none;
        -ms-overflow-style: none;
        width: 100%;
        margin-right: -16px;
        padding-right: 16px;
    }

    .team-roles::-webkit-scrollbar {
        display: none;
    }

    .role-card {
        min-width: 280px;
        width: 280px;
        height: 290px;
        flex-shrink: 0;
        padding: 30px 20px;
    }

    .role-title {
        font-size: 20px;
    }

    .role-text {
        font-size: 16px;
    }

    .role-card-cta {
        background: #4d4d4d;
    }

    .role-cta-title {
        font-size: 20px;
        color: white;
    }

    .role-cta-text {
        font-size: 14px;
        color: #f7d59e;
    }

    .role-card-cta .btn-icon {
        background: #f7d59e;
    }

    .role-card-cta .btn-icon img {
        filter: none;
    }

    /* Reviews Section Mobile (override cascade vs common.css) */
    .reviews {
        padding: 40px 0;
    }

    .reviews-header {
        flex-direction: column;
        align-items: center;
        margin-bottom: 30px;
    }

    .reviews-header .section-title {
        font-size: 28px;
        text-align: center;
        width: 100%;
    }

    /* Controls should be AFTER reviews on mobile (like in Figma) */
    .slider-controls-desktop {
        display: none;
    }

    .slider-controls-mobile {
        display: flex;
        justify-content: space-between;
        width: 100%;
        gap: 20px;
        margin-top: 20px;
        margin-bottom: 20px;
    }
}

/* Desktop: reduce excessive gap between hero and benefits */
@media (min-width: 769px) {
    .hero {
        padding-bottom: 20px;
    }

    .hero + .benefits {
        padding-top: 20px;
    }
}
