/**
 * About page — layout styles
 *
 * About section (text + facts sidebar), timeline container,
 * clients grid, reviews grid, advantages grid, and responsive overrides.
 *
 * Per elementor.md §7: target both .e-con-full and > .e-con-inner
 * for grid overrides on Elementor containers.
 *
 * @package Technoproekt
 * @author  Kkalganov <https://kkalganov.com>
 */

/* ==========================================================================
   About Section (two-column: text + facts sidebar)
   ========================================================================== */

.tp-about-section {
    background: var(--tp-white) !important;
}

/* Grid on the inner container — works for both boxed and full */
.tp-about-inner.e-con-full,
.tp-about-inner > .e-con-inner {
    display: grid !important;
    grid-template-columns: 1fr 420px !important;
    gap: 80px !important;
    align-items: start !important;
}

/* Force child containers to fill grid cells */
.tp-about-inner.e-con-full > .e-con,
.tp-about-inner > .e-con-inner > .e-con {
    width: 100% !important;
    max-width: 100% !important;
}

/* About text content */
.tp-about-text p {
    font-size: 16px;
    line-height: 1.8;
    color: var(--tp-text);
    margin-bottom: 16px;
}

.tp-about-text p strong {
    color: var(--tp-green-dark);
}

/* Facts sidebar */
.tp-about-facts {
    background: var(--tp-cream);
    padding: 40px;
    position: sticky;
    top: 130px;
}

.tp-about-facts__title {
    font-family: 'Unbounded', system-ui, sans-serif;
    font-size: 14px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: var(--tp-text);
    margin-bottom: 28px;
    display: flex;
    align-items: center;
    gap: 10px;
}

.tp-about-facts__title svg {
    width: 20px;
    height: 20px;
    color: var(--tp-green-main);
}

.tp-fact-item {
    display: flex;
    gap: 16px;
    padding: 18px 0;
    border-bottom: 1px solid var(--tp-cream-warm);
}

.tp-fact-item:last-child {
    border-bottom: none;
}

.tp-fact-item__icon {
    width: 40px;
    height: 40px;
    background: var(--tp-green-main);
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    clip-path: polygon(0 0, 100% 0, 100% 70%, 70% 100%, 0 100%);
}

.tp-fact-item__icon svg {
    width: 18px;
    height: 18px;
    color: var(--tp-white);
}

.tp-fact-item__info h4 {
    font-family: 'Unbounded', system-ui, sans-serif;
    font-size: 12px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.3px;
    color: var(--tp-text);
    margin-bottom: 4px;
}

.tp-fact-item__info p {
    font-size: 13px;
    color: var(--tp-text-light);
    line-height: 1.5;
    margin: 0;
}

/* ==========================================================================
   Timeline Container (vertical line via ::before on parent)
   ========================================================================== */

.tp-timeline.e-con-full,
.tp-timeline > .e-con-inner {
    position: relative;
    padding-left: 30px !important;
}

.tp-timeline.e-con-full::before,
.tp-timeline > .e-con-inner::before {
    content: '';
    position: absolute;
    left: 30px;
    top: 0;
    bottom: 0;
    width: 2px;
    background: var(--tp-cream-warm);
}

/* ==========================================================================
   Advantages Grid (4 cols on about page — light scheme)
   ========================================================================== */

.tp-advantages-grid.e-con-full,
.tp-advantages-grid > .e-con-inner {
    display: grid !important;
    grid-template-columns: repeat(4, 1fr) !important;
    gap: 20px !important;
}

/* Force advantage card widgets to fill grid cells */
.tp-advantages-grid.e-con-full > .elementor-widget,
.tp-advantages-grid > .e-con-inner > .elementor-widget {
    width: 100% !important;
    max-width: 100% !important;
}

/* ==========================================================================
   Clients Grid
   ========================================================================== */

.tp-clients-grid.e-con-full,
.tp-clients-grid > .e-con-inner {
    display: grid !important;
    grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)) !important;
    gap: 0 !important;
}

/* Overlapping borders */
.tp-clients-grid.e-con-full > .elementor-widget,
.tp-clients-grid > .e-con-inner > .elementor-widget {
    margin: -0.5px !important;
    width: auto !important;
    max-width: none !important;
}

.tp-clients-more {
    text-align: center;
    margin-top: 40px;
}

.tp-clients-more p {
    font-size: 14px;
    color: var(--tp-text-light);
}

/* ==========================================================================
   Reviews Grid
   ========================================================================== */

.tp-reviews-grid.e-con-full,
.tp-reviews-grid > .e-con-inner {
    display: grid !important;
    grid-template-columns: repeat(3, 1fr) !important;
    gap: 24px !important;
}

/* Force review card widgets to fill grid cells */
.tp-reviews-grid.e-con-full > .elementor-widget,
.tp-reviews-grid > .e-con-inner > .elementor-widget {
    width: 100% !important;
    max-width: 100% !important;
}

/* ==========================================================================
   Responsive
   ========================================================================== */

@media (max-width: 1024px) {
    .tp-about-inner.e-con-full,
    .tp-about-inner > .e-con-inner {
        grid-template-columns: 1fr !important;
        gap: 40px !important;
    }

    .tp-about-facts {
        position: static;
    }

    .tp-advantages-grid.e-con-full,
    .tp-advantages-grid > .e-con-inner {
        grid-template-columns: repeat(2, 1fr) !important;
    }

    .tp-reviews-grid.e-con-full,
    .tp-reviews-grid > .e-con-inner {
        grid-template-columns: 1fr !important;
    }
}

@media (max-width: 768px) {
    .tp-advantages-grid.e-con-full,
    .tp-advantages-grid > .e-con-inner {
        grid-template-columns: 1fr !important;
    }

    .tp-clients-grid.e-con-full,
    .tp-clients-grid > .e-con-inner {
        grid-template-columns: 1fr 1fr !important;
    }

    .tp-reviews-grid.e-con-full,
    .tp-reviews-grid > .e-con-inner {
        grid-template-columns: 1fr !important;
    }
}
