main {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
}

.tariffs {
    padding: 60px 0;
    background-color: var(--background-color--);
    position: relative;
    display: flex;
    flex-direction: column;
    gap: 50px;
    justify-content: center;
    align-items: center;
}

.tariffs__regions {
    display: flex;
    gap: 30px;
    flex-wrap: wrap;
    padding: 0 30px;
    justify-content: center;
}

.region-link {
    cursor: pointer;
    font-size: 14px;
    color: var(--gray-color--);
    padding-bottom: 2px;
    position: relative;
    transition: color 0.3s ease;
}

.region-link--active {
    color: var(--black-color--);
    font-weight: bold;
}

.region-link--active::after {
    content: '';
    position: absolute;
    bottom: -2px;
    left: 0;
    width: 100%;
    height: 2px;
    background-color: var(--red-color--);
}

.tariffs__container {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 30px;
    max-width: 1320px;
    padding: 0 15px;
}


.tariffs__private-house-title {
    width: 100%;
    font-size: 28px;
    text-align: center;
    margin-top: 30px;
    margin-bottom: 20px;
    font-weight: bold;
    color: var(--black-color--);
}



.tariff-card {
    flex-basis: calc(33.333% - 20px);
    background-color: var(--white-color--);
    border: 1px solid var(--lines-color--);
    border-radius: 8px;
    padding: 25px;
    text-align: center;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.05);
    transition: all 0.3s ease;
    display: flex;
    flex-direction: column;
    position: relative;
    overflow: hidden;
    min-width: 250px;
    
  
    min-height: 500px; 
}

.tariff-card:hover {
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.1);
    transform: translateY(-2px);
}


.tariff-card::before,
.tariff-card--green-stripe::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background-color: var(--green-color--);
}


.tariff-card--blue-stripe::before {
    background-color: var(--blue-color--);
}

.tariff-card--orange-stripe::before {
    background-color: var(--red-color--); 
}

.tariff-card--red-stripe::before {
    background-color: #F00000; 
}

.tariff-card--violet-stripe::before {
    background-color: var(--violet-color--);
}

.tariff-card--yellow-stripe::before {
    background-color: var(--yellow-color--);
}


.tariff-card__title {
    font-size: 20px;
    color: var(--black-color--);
    margin-bottom: 15px;
    font-weight: bold;
}

.tariff-card__description {
    font-size: 14px;
    color: var(--gray-color--);
    margin-bottom: 25px;
    line-height: 1.5;
    
   
    flex-grow: 1; 
    min-height: 84px; 
}

.tariff-card__details {
    margin-bottom: 25px;
    padding: 15px 0;
    border-top: 1px solid var(--lines-color--);
    border-bottom: 1px solid var(--lines-color--);
    text-align: left;
    flex-shrink: 0;
}

.detail-item {
    display: flex;
    justify-content: space-between;
    font-size: 14px;
    padding: 5px 0;
}

.detail-item__label {
    color: var(--gray-color--);
}

.detail-item__value {
    font-weight: bold;
    color: var(--black-color--);
}

.tariff-card__price {
    margin-bottom: 25px;
    display: flex;
    justify-content: center;
    align-items: flex-end;
    gap: 5px;
    color: var(--red-color--);
    flex-shrink: 0;
}

.price__label {
    font-size: 14px;
    font-weight: normal;
    color: var(--gray-color--);
    line-height: 3.5;
}

.price__value {
    font-size: 48px;
    font-weight: bold;
    line-height: 1;
    color: var(--red-color--);
}

.price__currency {
    font-size: 16px;
    align-self: flex-end;
    font-weight: normal;
    color: var(--gray-color--);
    margin-bottom: 5px;
}


.application-form {
    padding: 60px 0;
    background-color: var(--white-color--);
    width: 100%;
}

.application-form__container {
    flex-direction: column;
    max-width: 900px;
    margin: 0 auto;
}

.application-form__title {
    text-align: center;
    font-size: 28px;
    margin-bottom: 30px;
    font-weight: bold;
}

.form {
    max-width: 900px;
    margin: 0 auto;
    padding: 0;
}

.form__row {
    display: flex;
    gap: 20px;
    margin-bottom: 20px;
}

.form__row input[type="text"],
.form__row input[type="email"] {
    flex-grow: 1;
    padding: 14px 20px;
    border: 1px solid var(--lines-color--);
    font-family: ABeeZee, sans-serif;
    font-size: 16px;
    color: var(--black-color--);
    height: 50px;
    border: none;
    border-bottom: 2px solid #7DBCE4;
}

.input-label {
    display: flex;
    flex-direction: column;
    flex-grow: 1;
}


.form__row--names-contacts div:first-child {
    flex-basis: 60%;
}

.form__row--names-contacts div:nth-child(2) {
    flex-basis: 40%;
}

.form__row--address div {
    flex-basis: 25%;
}


.form__tariffs-label {
    font-weight: bold;
    display: block;
    margin-bottom: 15px;
    font-size: 18px;
}

.form__radio-group {
    display: flex;
    gap: 20px;
    margin-bottom: 30px;
    flex-wrap: wrap;
    justify-content: center;
}

.radio-option {
    display: flex;
    align-items: center;
    cursor: pointer;
    font-size: 16px;
    white-space: nowrap;
}

.radio-option input[type="radio"] {
    appearance: none;
    width: 22px;
    height: 22px;
    border: 2px solid var(--lines-color--);
    border-radius: 50%;
    margin-right: 10px;
    position: relative;
    transition: all 0.2s ease;
    flex-shrink: 0;
    cursor: pointer;
}

.radio-option input[type="radio"]:checked {
    color: var(--radio-color--);
}

.radio-option input[type="radio"]:checked::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background-color: var(--radio-color--);
}

.radio-option__text {
    font-weight: bold;
}

.radio-option .price {
    color: var(--gray-color--);
    font-size: 14px;
    font-weight: normal;
    margin-left: 5px;
}

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

.checkbox-option {
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    font-size: 14px;
    color: var(--gray-color--);
    line-height: 1.4;
    max-width: 400px;
    text-align: center;
    margin: 0 auto;
}

.checkbox-option input[type="checkbox"] {
    appearance: none;
    width: 18px;
    height: 18px;
    border: 1px solid var(--lines-color--);
    border-radius: 4px;
    margin-right: 10px;
    flex-shrink: 0;
    position: relative;
    background-color: var(--light-gray--);
}

.checkbox-option input[type="checkbox"]:checked {
    background-color: var(--green-color--);
    border-color: var(--green-color--);
}

.checkbox-option input[type="checkbox"]:checked::after {
    content: '';
    position: absolute;
    top: 2px;
    left: 5px;
    width: 4px;
    height: 7px;
    border: solid var(--white-color--);
    border-width: 0 2px 2px 0;
    transform: rotate(45deg);
}


@media (max-width: 1024px) {
   
    .tariffs__container {
        flex-wrap: wrap;
        justify-content: center;
        gap: 20px;
    }
    .tariff-card {
        flex-basis: calc(50% - 10px);
        
        min-height: 480px;
    }
    .form{
        display: flex;
        flex-direction: column;
        margin: 0;
        width: 100%;
    }
    .form__row{
        flex-direction: column;
    }
}

@media (max-width: 768px) {
    .tariffs, .application-form {
        padding: 30px 0;
    }
    

    .tariffs__regions {
        flex-wrap: wrap;
        justify-content: center;
        gap: 15px;
        padding: 0 20px;
    }
    
    .tariff-card {
        flex-basis: 100%;
        max-width: 100%;
        padding: 20px;
        min-height: auto; 
    }
    
    .tariff-card__description {
        min-height: auto; 
    }
    
   
    .application-form__title {
        font-size: 24px;
        padding: 0 15px;
    }
    .form__row {
        flex-direction: column;
        gap: 10px;
        padding: 0 15px;
    }
    
    .form__row--names-contacts div:first-child,
    .form__row--names-contacts div:nth-child(2),
    .form__row--address div {
        flex-basis: 100% !important;
    }
    
    .form__tariffs-label {
        padding: 0 15px;
    }
    
    .form__radio-group {
        flex-direction: column;
        gap: 10px;
        padding: 0 15px;
        align-items: flex-start;
    }
    .form__submit {
        flex-direction: column;
        align-items: center;
        gap: 15px;
    }
    .button--orange {
        width: 100%;
    }
    .checkbox-option {
        font-size: 12px;
        text-align: center;
        padding: 0 15px;
    }
    
    .tariffs__private-house-title {
        font-size: 24px;
        padding: 0 15px;
    }
    
}