:root {
    --primary-color: #0066cc;
    /* Reference blue */
    --primary-dark: #004c99;
    --accent-color: #ff6600;
    /* Reference orange */
    --accent-hover: #e65c00;
    --text-color: #333333;
    --text-light: #666666;
    --bg-light: #f5f7fa;
    --white: #ffffff;
    --border-radius: 0px;
    /* Rectangular buttons */
    --shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Gilroy-Bold', sans-serif;
    color: var(--text-color);
    line-height: 1.6;
    background-color: #f8fbff;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

/* Header */
.header {
    padding: 15px 0;
    border-bottom: 1px solid #eee;
    background: var(--white);
    position: sticky;
    top: 0;
    z-index: 1000;
}

.header__container {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.header__logo {
    display: flex;
    flex-direction: row;
    /* Horizontal layout */
    align-items: center;
    gap: 15px;
    /* Space between logo and text */
    text-decoration: none;
}

.logo__img {
    width: 48px;
    height: auto;
    object-fit: contain;
}

.logo__text {
    display: flex;
    flex-direction: column;
}

.logo__title {
    font-size: 24px;
    /* Slightly larger */
    font-weight: 700;
    color: var(--accent-color);
    /* Orange */
    letter-spacing: -0.5px;
    /* Tighter tracking for title case */
}

.logo__subtitle {
    font-size: 13px;
    color: var(--text-light);
    font-weight: 500;
}

.header__info {
    display: flex;
    align-items: center;
    gap: 20px;
}

.header__phone {
    font-size: 18px;
    font-weight: 700;
    color: var(--text-color);
    text-decoration: none;
}

/* Buttons */
.btn {
    padding: 10px 24px;
    border-radius: var(--border-radius);
    font-weight: 700;
    font-size: 14px;
    cursor: pointer;
    border: none;
    transition: all 0.3s ease;
}

.btn--outline {
    background: transparent;
    border: 2px solid var(--primary-color);
    color: var(--primary-color);
}

.btn--outline:hover {
    background: var(--primary-color);
    color: var(--white);
}

.btn--primary {
    background: var(--accent-color);
    color: var(--white);
    box-shadow: 0 4px 15px rgba(255, 102, 0, 0.3);
}

.btn--primary:hover {
    background: var(--accent-hover);
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(255, 102, 0, 0.4);
}

.btn--white {
    background: var(--white);
    color: var(--accent-color);
    font-weight: 800;
}

.btn--white:hover {
    background: #f0f0f0;
}

.btn--full {
    width: 100%;
}

.btn--telegram {
    background: var(--white);
    color: #0088cc;
    margin-top: 15px;
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 10px;
    text-decoration: none;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.08);
    /* Match shadow style */
}

.btn--telegram:hover {
    background: #f4faff;
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(0, 136, 204, 0.2);
}

.telegram-icon {
    width: 24px;
    height: 24px;
    background-color: #0088cc;
    -webkit-mask: url('../images/telegram.png') no-repeat center / contain;
    mask: url('../images/telegram.png') no-repeat center / contain;
    display: inline-block;
}

/* Hero Section */
.hero {
    padding: 50px 0;
    background: transparent;
    overflow: hidden;
}

.hero__container {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 40px;
    flex-wrap: wrap;
}

.hero__content {
    flex: 1 1 100%;
    /* Force full width to sit at bottom */
    order: 10;
    /* Ensure it is visually last */
    text-align: center;
    margin-top: 30px;
}

.hero__image-block {
    flex: 1 1 400px;
    display: flex;
    justify-content: center;
    align-items: center;
    height: auto;
    min-height: 400px;
    max-width: 600px;
}

.hero__main-img {
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
    border-radius: 12px;
}

.hero__title {
    font-size: 46px;
    /* Larger title since it has more space */
    line-height: 1.2;
    margin-bottom: 20px;
    font-weight: 800;
    color: #1a1a1a;
}

.hero__subtitle {
    font-size: 20px;
    color: var(--text-light);
    margin-bottom: 30px;
}

.hero__features {
    display: flex;
    flex-direction: row;
    /* Horizontal layout for features */
    justify-content: center;
    flex-wrap: wrap;
    gap: 30px;
}

.feature-item {
    font-size: 18px;
    font-weight: 600;
    display: flex;
    align-items: center;
}

.check-icon {
    display: inline-flex;
    justify-content: center;
    align-items: center;
    width: 28px;
    height: 28px;
    background: #e6f4ea;
    color: #28a745;
    border-radius: 50%;
    font-size: 16px;
    margin-right: 12px;
    font-weight: bold;
}

/* Form */
.hero__form-wrapper {
    flex: 0 0 420px;
    /* Wider form */
    background: var(--white);
    padding: 40px;
    /* More breathing room */
    border-radius: 16px;
    box-shadow: 0 15px 50px rgba(0, 0, 0, 0.12);
    /* Stronger shadow */
    z-index: 2;
}

.form__title {
    font-size: 28px;
    /* Larger title */
    margin-bottom: 8px;
    text-align: center;
    font-weight: 800;
}

.form__subtitle {
    font-size: 16px;
    /* Larger subtitle */
    color: #28a745;
    margin-bottom: 25px;
    text-align: center;
    font-weight: 600;
}

.form__group {
    margin-bottom: 20px;
    /* More spacing */
}

.form__input {
    width: 100%;
    padding: 16px 20px;
    /* Larger inputs */
    border: 1px solid #ddd;
    border-radius: var(--border-radius);
    font-size: 18px;
    /* Larger text input */
    font-family: inherit;
    transition: all 0.2s;
    background: #f9f9f9;
}

.form__input:focus {
    outline: none;
    border-color: var(--primary-color);
    background: #fff;
    box-shadow: 0 0 0 3px rgba(0, 102, 204, 0.1);
}

.form__policy {
    margin-top: 15px;
    font-size: 10px;
    color: #999;
    text-align: center;
    line-height: 1.4;
}

/* Animations */
.fade-in-section {
    opacity: 0;
    transform: translateY(30px);
    transition: opacity 0.8s ease-out, transform 0.8s ease-out;
    will-change: opacity, visibility;
}

.fade-in-section.is-visible {
    opacity: 1;
    transform: none;
}

/* Services */
/* Services Grid */
.services {
    padding: 80px 0;
    min-height: 500px;
    background: linear-gradient(90deg, #f8fbff 30%, rgba(248, 251, 255, 0.85) 50%, rgba(248, 251, 255, 0.4) 100%),
        url('../images/celovek-pod-vysokim-uglom-rabotausii-santehnikom.jpg');
    background-size: cover;
    background-position: center right;
    background-repeat: no-repeat;
    position: relative;
}

.section-title {
    text-align: center;
    font-size: 36px;
    font-weight: 800;
    margin-bottom: 60px;
    position: relative;
    color: #222;
}

.services__grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    /* FORCE 4 columns */
    gap: 20px;
    position: relative;
    z-index: 1;
    max-width: 1200px;
    margin: 0 auto;
}

.service-card {
    background: var(--white);
    border-radius: 12px;
    padding: 20px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.05);
    text-decoration: none;
    color: var(--text-color);
    transition: all 0.3s ease;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    /* Center vertically */
    text-align: center;
    border: 1px solid transparent;
    height: 180px;
    /* Fixed height is CRITICAL for*/
}

.service-card:hover {
    box-shadow: 0 15px 30px rgba(0, 0, 0, 0.08);
    /* Keep hover effect */
    transform: translateY(-5px);
}

/* Response for smaller screens */
@media (max-width: 992px) {
    .services__grid {
        grid-template-columns: repeat(3, 1fr);
    }
}

@media (max-width: 768px) {
    .services__grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 480px) {
    .services__grid {
        grid-template-columns: 1fr;
    }
}

.service-card__icon {
    font-size: 56px;
    /* Larger icon size */
    color: var(--accent-color);
    /* Orange color */
    margin-bottom: 20px;
    display: inline-block;
    transition: transform 0.3s ease;
}

.service-card:hover .service-card__icon {
    transform: scale(1.1);
}

.service-card__title {
    font-size: 18px;
    font-weight: 700;
}

/* Steps (How we work) */
.steps {
    padding: 80px 0;
    background: transparent;
    /* Seamless blend with body background */
}

.steps__grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 30px;
    position: relative;
}

.step-item {
    position: relative;
    padding: 10px;
    /* Removed background/blur for cleaner look */
    text-align: left;
    /* Align text left as per modern standards */
}

.step__number {
    font-size: 36px;
    line-height: 1;
    font-weight: 800;
    color: var(--accent-color);
    margin-bottom: 15px;
    font-family: 'Gilroy-Bold', sans-serif;
    display: block;
}

/* Removed shadow copy for cleaner look */

.step__title {
    font-size: 24px;
    font-weight: 800;
    margin-bottom: 15px;
    color: #222;
    display: block;
}

.step__text {
    font-size: 16px;
    /* Increased legibility */
    color: #555;
    line-height: 1.6;
    max-width: 250px;
    /* Prevent lines from getting too long */
}

/* Arrow connector - simplifed to avoid breaking layout */
.step-item:not(:last-child)::after {
    content: '';
    position: absolute;
    top: 50px;
    /* Align near number */
    right: -20px;
    width: 40px;
    height: 2px;
    background: #e0e0e0;
    display: block;
}

/* Arrow head */
.step-item:not(:last-child)::before {
    content: '';
    position: absolute;
    top: 45px;
    right: -20px;
    width: 8px;
    height: 8px;
    border-right: 2px solid #e0e0e0;
    border-top: 2px solid #e0e0e0;
    transform: rotate(45deg);
    display: block;
}


/* Responsive */
@media (max-width: 992px) {
    .steps__grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 50px 30px;
        /* More vertical gap */
    }

    .step-item:not(:last-child)::after,
    .step-item:not(:last-child)::before {
        display: none;
        /* Hide arrows on tablet */
    }
}

@media (max-width: 576px) {
    .steps__grid {
        grid-template-columns: 1fr;
    }

    .step-item {
        text-align: center;
        display: flex;
        flex-direction: column;
        align-items: center;
    }

    .step__text {
        max-width: 100%;
        text-align: center;
    }
}

/* Benefits Section */
.benefits {
    padding: 80px 0;
    min-height: 500px;
    background: linear-gradient(90deg, #f8fbff 30%, rgba(248, 251, 255, 0.85) 50%, rgba(248, 251, 255, 0.4) 100%),
        url('../images/ManWhyOur.jpg');
    background-size: cover;
    background-position: center right;
    background-repeat: no-repeat;
    position: relative;
}

.benefits__grid {
    display: grid;
    /* Changed to grid for better 4-col control */
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap: 30px;
}

.benefit-card {
    background: var(--white);
    padding: 40px 30px;
    border-radius: 24px;
    /* Image shows quite rounded corners */
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.05);
    /* Soft shadow */
    transition: transform 0.3s ease;
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    height: 100%;
}

.benefit-card:hover {
    transform: translateY(-5px);
}

.benefit-icon {
    margin-bottom: 25px;
}

/* Icon specific size adjustment if SVG is native */
.benefit-icon svg {
    width: 48px;
    height: 48px;
}

.benefit-text {
    font-size: 16px;
    line-height: 1.4;
    font-weight: 700;
    color: #111;
}

/* Reviews */
.reviews {
    padding: 80px 0;
    background: transparent;
    /* Match body background */
}

.reviews__grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 30px;
}

.review-card {
    background: var(--white);
    border: 1px solid #eee;
    padding: 30px;
    border-radius: 16px;
}

.review__header {
    display: flex;
    justify-content: space-between;
    margin-bottom: 15px;
}

.review__author {
    font-weight: 700;
    font-size: 18px;
}

.review__stars {
    color: #ffc107;
}

.review__text {
    font-style: italic;
    color: var(--text-light);
}

/* Contacts Bottom */
.contacts-section {
    padding: 60px 0;
    background: var(--primary-color);
    color: var(--white);
}

.contacts__container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 30px;
}

.contacts__title {
    font-size: 32px;
    margin-bottom: 10px;
}

.contacts__desc {
    opacity: 0.9;
    margin-bottom: 10px;
}

.contacts__phone {
    color: var(--white);
    font-size: 32px;
    text-decoration: none;
    font-weight: 800;
}

.contacts__action {
    display: flex;
    flex-direction: column;
    gap: 15px;
    min-width: 250px;
}

/* Footer */
.footer {
    padding: 30px 0;
    background: #1a1a1a;
    color: #888;
    text-align: center;
    font-size: 14px;
}

/* Mobile Responsiveness Improvements */

@media (max-width: 992px) {
    .hero__title {
        font-size: 36px;
    }

    .hero__form-wrapper {
        flex: 0 0 100%;
        /* Form full width on tablet */
        max-width: 500px;
    }

    .hero__image-block {
        order: 1;
        /* Image first */
    }

    .hero__form-wrapper {
        order: 2;
        /* Form second */
    }

    .hero__content {
        order: 3;
        /* Text last */
    }
}

@media (max-width: 768px) {
    .header {
        position: relative;
    }

    .header__container {
        flex-direction: column;
        gap: 15px;
    }

    .header__info {
        flex-direction: column;
        gap: 10px;
    }

    .header__phone {
        display: inline-flex !important;
        font-size: 16px;
    }

    .btn {
        padding: 10px 16px;
        font-size: 13px;
    }

    .hero {
        padding: 30px 0;
    }

    .hero__title {
        font-size: 32px;
    }

    /* Hide button on very small screens or change layout */

    .hero__title {
        font-size: 28px;
    }

    .hero__subtitle {
        font-size: 16px;
    }

    /* Optimize Form for Mobile */
    .hero__form-wrapper {
        padding: 25px 20px;
        width: 100%;
        flex: auto;
    }

    .form__title {
        font-size: 22px;
    }

    .form__input {
        padding: 12px 15px;
        font-size: 16px;
    }

    .services__grid {
        grid-template-columns: repeat(2, 1fr);
        /* 2 cols on mobile for services */
        gap: 15px;
    }

    .service-card {
        height: 160px;
        /* Slightly smaller cards */
        padding: 15px;
    }

    .service-card__icon {
        font-size: 40px;
    }

    .service-card__title {
        font-size: 14px;
    }

    .section-title {
        font-size: 28px;
        margin-bottom: 40px;
    }

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

    .hero__container {
        flex-direction: column;
        text-align: center;
    }

    .hero__features {
        align-items: center;
    }

    .hero__image-block {
        order: -1;
        height: 250px;
        min-height: auto;
    }

    .contacts__container {
        flex-direction: column;
        text-align: center;
        gap: 20px;
    }

    .contacts__action {
        width: 100%;
    }
}

@media (max-width: 480px) {
    .services__grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .container {
        padding: 0 15px;
    }

    .logo__title {
        font-size: 20px;
    }

    .logo__subtitle {
        font-size: 11px;
    }

    .hero__features {
        gap: 10px;
    }

    .feature-item {
        font-size: 14px;
        width: 100%;
        justify-content: center;
    }
}

/* Taxi Widget Section */
.taxi-section {
    padding: 60px 0;
    background-color: #f8f9fa;
}

.taxi-section__description {
    text-align: center;
    font-size: 18px;
    color: #666;
    margin-bottom: 40px;
    max-width: 700px;
    margin-left: auto;
    margin-right: auto;
}

.taxi-widget-wrapper {
    max-width: 600px;
    margin: 0 auto;
    padding: 30px;
    background: white;
    border-radius: 12px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}

.taxi-disclaimer {
    margin-top: 20px;
    font-size: 13px;
    color: #888;
    line-height: 1.6;
    text-align: center;
}

.taxi-disclaimer a {
    color: #007bff;
    text-decoration: none;
}

.taxi-disclaimer a:hover {
    text-decoration: underline;
}

@media (max-width: 768px) {
    .taxi-section {
        padding: 40px 0;
    }

    .taxi-section__description {
        font-size: 16px;
        margin-bottom: 30px;
    }

    .taxi-widget-wrapper {
        padding: 20px;
    }
}

/* Phone Reveal Animations */
.phone-reveal-container {
    display: inline-flex;
    align-items: center;
    cursor: pointer;
    text-decoration: none !important;
    transition: transform 0.3s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

@media (min-width: 769px) {

    /* Легкий зум при наведении на десктопе (только когда номер закрыт) */
    .phone-reveal-container:not(.is-revealed):hover {
        transform: scale(1.05);
    }
}

/* Растворяющийся фон (эффект Blur + Opacity) */
.phone-hidden-part {
    display: inline-block;
    filter: blur(5px);
    opacity: 0.15;
    transition: filter 0.6s ease, opacity 0.6s ease;
    user-select: none;
    pointer-events: none;
    margin-left: -2px;
}

.phone-hint {
    font-size: 22px !important;
    text-decoration: none;
    opacity: 0.8;
    transition: opacity 0.5s ease, max-width 0.5s ease, padding 0.5s ease;
    max-width: 40px;
    overflow: hidden;
    white-space: nowrap;
    display: inline-flex;
    align-items: center;
    vertical-align: middle;
    padding-left: 6px;
    color: #888;
}

.phone-reveal-container:not(.is-revealed):hover .phone-hint {
    color: var(--accent-color);
}

/* Состояния после клика (номер раскрыт) */
.phone-reveal-container.is-revealed .phone-hidden-part {
    filter: blur(0);
    opacity: 1;
    user-select: auto;
    pointer-events: auto;
}

.phone-reveal-container.is-revealed .phone-hint {
    opacity: 0;
    max-width: 0;
    padding-left: 0;
}