/**
 * TP Hero — homepage hero section styles
 *
 * @package Technoproekt
 * @author  Kkalganov <https://kkalganov.com>
 */

/* ==========================================================================
   Hero Section
   ========================================================================== */

.tp-hero {
    min-height: 100vh !important;
    position: relative;
    display: flex !important;
    flex-direction: column !important;
    justify-content: center !important;
    align-items: stretch !important;
    padding-top: 130px !important;
    overflow: hidden;
}

.tp-hero__bg {
    position: absolute;
    inset: 0;
    z-index: -2;
}

.tp-hero__bg img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.tp-hero__overlay {
    position: absolute;
    inset: 0;
    z-index: -1;
    background: linear-gradient(135deg, rgba(46, 49, 46, 0.95) 0%, rgba(46, 48, 46, 0.90) 50%, rgba(1, 1, 1, 0.72) 100%);
}

/* Override Elementor overlay — force full opacity + 3-stop gradient (matches /2/) */
.tp-hero {
    --overlay-opacity: 1 !important;
}

.tp-hero > .elementor-background-overlay,
.tp-hero::before {
    opacity: 1 !important;
    background: linear-gradient(135deg, rgba(46, 49, 46, 0.95) 0%, rgba(46, 48, 46, 0.90) 50%, rgba(1, 1, 1, 0.72) 100%) !important;
}

.tp-hero__geo {
    position: absolute;
    right: -100px;
    top: 50%;
    transform: translateY(-50%);
    width: 800px;
    height: 800px;
    border: 1px solid rgba(232, 213, 47, 0.1);
    border-radius: 50%;
    z-index: -1;
    pointer-events: none;
}

.tp-hero__geo::before {
    content: '';
    position: absolute;
    top: 50px;
    left: 50px;
    right: 50px;
    bottom: 50px;
    border: 1px solid rgba(232, 213, 47, 0.08);
    border-radius: 50%;
}

/* ==========================================================================
   Hero Content — two-column grid
   Target both e-con-full (direct) and e-con-boxed (> .e-con-inner)
   ========================================================================== */

.tp-hero__content.e-con-full,
.tp-hero__content > .e-con-inner {
    display: grid !important;
    grid-template-columns: 1fr !important;
    gap: 40px !important;
    align-items: center !important;
}

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

/* Force hero text column layout */
.tp-hero__text.e-con-full,
.tp-hero__text > .e-con-inner {
    display: flex !important;
    flex-direction: column !important;
    padding: 40px 0;
    color: var(--tp-white);
}

/* ==========================================================================
   Hero Label & Title
   ========================================================================== */

.tp-hero__label {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    color: var(--tp-yellow) !important;
    font-family: 'IBM Plex Sans', system-ui, sans-serif !important;
    font-size: 13px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 2px;
    margin-bottom: 24px;
}

.tp-hero__label::before {
    content: '';
    width: 40px;
    height: 2px;
    background: var(--tp-yellow);
}

.tp-hero__title {
    font-family: 'Unbounded', system-ui, sans-serif !important;
    font-size: 28px !important;
    font-weight: 800;
    line-height: 1.1;
    margin-bottom: 24px;
    text-transform: uppercase;
    letter-spacing: -1px;
    color: var(--tp-white) !important;
}

.tp-hero__title .tp-hero__highlight {
    color: var(--tp-yellow);
    display: block;
}

/* ==========================================================================
   Hero Types (bullet list)
   ========================================================================== */

.tp-hero__types {
    display: flex;
    flex-direction: column;
    gap: 12px;
    margin-bottom: 40px;
}

.tp-hero__type {
    display: flex;
    align-items: center;
    gap: 16px;
    color: var(--tp-white-90);
    font-size: 18px;
}

.tp-hero__type-marker {
    width: 8px;
    height: 8px;
    background: var(--tp-green-accent);
    transform: rotate(45deg);
    flex-shrink: 0;
}

/* ==========================================================================
   Hero CTA buttons
   ========================================================================== */

.tp-hero__cta {
    display: flex;
    gap: 16px;
    margin-bottom: 60px;
}

/* ==========================================================================
   Hero Stats — border-top separator
   ========================================================================== */

.tp-hero__stats {
    display: flex;
    gap: 24px;
    flex-wrap: wrap;
    padding-top: 40px;
    border-top: 1px solid var(--tp-white-10);
}

/* Stats widget inside hero text column */
.tp-hero__text .tp-stats {
    padding-top: 40px;
    border-top: 1px solid var(--tp-white-10);
    margin-top: auto;
}

/* Fallback: stats on dark backgrounds always have separator */
.tp-stats:not(.tp-stats--light) {
    padding-top: 40px;
    border-top: 1px solid var(--tp-white-10);
}

/* ==========================================================================
   Hero Form
   ========================================================================== */

.tp-hero__form {
    background: var(--tp-white) !important;
    padding: 0 40px !important;
    clip-path: polygon(0 0, 100% 0, 100% 92%, 92% 100%, 0 100%);
    box-shadow: 0 30px 80px rgba(0, 0, 0, 0.4);
}

/* Vertical padding via --padding-* (applies to .e-con-inner, avoids double padding with outer) */
.tp-hero__form.e-con {
    --padding-top: 40px !important;
    --padding-bottom: 20px !important;
}

.tp-hero__form.e-con-full,
.tp-hero__form > .e-con-inner {
    display: flex !important;
    flex-direction: column !important;
    gap: 0 !important;
}

/* Override Elementor container gap on hero form */
.tp-hero__form.e-con {
    --gap: 0px 0px !important;
    --widgets-spacing: 0px 0px !important;
}

.tp-hero__form h3,
.tp-hero__form .elementor-heading-title {
    font-family: 'Unbounded', system-ui, sans-serif !important;
    font-size: 20px !important;
    font-weight: 700 !important;
    color: var(--tp-text) !important;
    text-transform: uppercase;
    margin-bottom: 8px;
}

.tp-hero__form .elementor-text-editor p {
    font-size: 14px;
    color: var(--tp-text-light);
    margin-bottom: 16px;
}

/* Reduce Elementor widget spacing inside hero form */
.tp-hero__form .elementor-widget {
    margin-bottom: 0 !important;
}

/* Hero form — spacing handled by .tp-hero-form .tp-form-group in common.css */

/* ==========================================================================
   Hero buttons — always in a row, even on mobile
   ========================================================================== */

.tp-hero__text .e-con,
.tp-hero__text .e-con > .e-con-inner {
    flex-direction: row !important;
    flex-wrap: nowrap !important;
}

/* Ensure outline button centers its text */
.tp-hero__text .tp-btn--outline {
    text-align: center;
    justify-content: center;
}

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

@media (max-width: 768px) {
    .tp-hero {
        padding-left: 16px !important;
        padding-right: 16px !important;
    }

    /* Remove default Elementor boxed container padding (10px each side × 3 levels = 60px wasted) */
    .tp-hero__content.e-con-boxed,
    .tp-hero__text.e-con-boxed,
    .tp-hero__text .e-con-boxed {
        padding-left: 0 !important;
        padding-right: 0 !important;
    }

    /* Smaller CTA buttons on mobile to fit side-by-side */
    .tp-hero__text .tp-btn {
        padding: 14px 20px !important;
        font-size: 12px !important;
        letter-spacing: 0.5px !important;
    }

    .tp-hero__form {
        padding-left: 20px !important;
        padding-right: 20px !important;
    }
}

@media (min-width: 769px) {
    .tp-hero {
        padding-left: 40px !important;
        padding-right: 40px !important;
    }

    .tp-hero__title {
        font-size: 40px !important;
    }

    .tp-hero__stats {
        gap: 48px;
        flex-wrap: nowrap;
    }
}

@media (min-width: 1025px) {
    .tp-hero__content.e-con-full,
    .tp-hero__content > .e-con-inner {
        grid-template-columns: 1fr 1fr !important;
        gap: 80px !important;
    }

    .tp-hero__title {
        font-size: 52px !important;
    }

    .tp-hero__form {
        max-width: none;
        margin: 0;
    }
}

@media (min-width: 769px) and (max-width: 1024px) {
    .tp-hero__form {
        max-width: 500px;
        margin: 40px auto 0;
    }

    .tp-hero {
        padding-bottom: 80px;
    }
}
