/*button {
    visibility:hidden;
}*/

html {
    scroll-behavior: smooth;
}

body {
    font-family: 'Roboto', sans-serif;
    margin: 0;
    background: #F8FAFC;
}

header {
    background: #ffffff;
    padding: 20px 0;
}

.header__inner {
    display: flex;
    justify-content: space-between;
    align-items: center;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

.header__logo h1 a {
    color: #04356C;
    font-size: 1.5rem;
    text-decoration: none;
}

.header__tagline {
    font-size: 14px;
    color: gray;
}

.header__nav a {
    color: #04356C;
    margin-left: 20px;
    text-decoration: none;
    font-weight: bold;
    position: relative;
    transition: color 0.3s ease;
}

.header__nav a::after {
    content: "";
    position: absolute;
    width: 100%;
    height: 2px;
    bottom: -7px;
    left: 0;
    background-color: #ff4d70;
    transform: scaleX(0);
    transform-origin: right;
    transition: transform 0.3s ease;
}

.header__nav a:hover::after {
    transform: scaleX(1);
    transform-origin: left;
}

.header__nav a:hover {
    color: #ff4d70;
}

.burger {
    display: none;
    flex-direction: column;
    gap: 4.3px;
    background: none;
    border: none;
    cursor: pointer;
}

.burger span {
    display: block;
    width: 25px;
    height: 3px;
    background: #04356C;
    border-radius: 2px;
    transition: 0.3s;
}

/* Анимация бургера */
.burger.active span:nth-child(1) {
    transform: rotate(45deg) translate(5px, 5px);
}

.burger.active span:nth-child(2) {
    opacity: 0;
}

.burger.active span:nth-child(3) {
    transform: rotate(-45deg) translate(5px, -5px);
}

.mobile-nav {
    display: none;
    flex-direction: column;
    gap: 20px;
    position: absolute;
    top: 8%;
    right: 20px;
    background: white;
    border: 1px solid #ccc;
    padding: 20px;
    z-index: 9999;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.1);
}

.mobile-nav a {
    color: #04356C;
    text-decoration: none;
    font-weight: bold;
}

.mobile-nav.show {
    display: flex;
}


/* Секция Герой */
.hero {
    color: white;
    padding: 80px 20px;
}

.hero__container {
    display: flex;
    flex-direction: row;
    align-items: stretch;
    max-width: 1200px;
    margin: 0 auto;
    border-radius: 50px;
    overflow: hidden;
    height: 350px;
    background: #04356C;
}

.hero__text {
    flex: 1;
    color: white;
    padding: 40px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: flex-start;
}

.hero__text h2 {
    margin-bottom: 25px;
    text-transform: uppercase;
}

.hero__text p {
    font-size: 18px;
    margin-bottom: 20px;
    text-align: left;
}

.hero__btn {
    background: #ff4d70;
    color: white;
    border: none;
    padding: 10px 20px;
    font-size: 16px;
    border-radius: 8px;
    cursor: pointer;
    display: none;
}

.hero__image {
    flex: 1;
    height: 350px;
}

.hero__image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.hero-swiper {
    width: 100%;
    position: relative;
}

.swiper-slide {
    width: 100%;
    height: auto;
}

/* Новости */
.news {
    padding: 40px 20px;
    background: #E9F0F6;
    text-align: center;
}


.news__swiper {
    width: 100%;
    overflow: hidden;
    padding: 20px 0;
}

.news__card--full {
    display: none;
}

#news__list {
    padding-bottom: 60px;
}

.news__swiper {
    width: 100%;
    overflow: hidden;
    padding: 20px 0;
}

.news__swiper .swiper-slide {
    height: auto; /* Чтобы карточки были одной высоты */
    display: flex;
    justify-content: center; /* Центрируем карточку внутри слайда */
    transition: transform 0.3s ease;
}

.news__swiper .swiper-wrapper {
    display: flex; 
}

.news__swiper .swiper-wrapper .swiper-slide:last-child {
    margin-right: 0;
}

#news__pagination {
    display: none;
}

.news__title {
    margin-bottom: 15px;
}

.news__content h3 {
    font-size: 28px;
    margin-bottom: 10px;
}

.news__card--btn {
    margin-top: 10px;
    background: #04356C;
    color: white;
    border: none;
    padding: 10px 20px;
    border-radius: 5px;
    cursor: pointer;
}

.news__card {
    width: 100%;
    max-width: 350px;
    background: #FFFFFF;
    border: 1px solid #E2E8F0;
    border-radius: 16px;
    padding: 32px;
    text-align: center;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
    transition: transform 0.3s ease, box-shadow 0.3s ease, background-color 0.3s ease;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
}

.news__card--title {
    font-size: 18px;
    font-weight: bold;
    margin-bottom: 10px;
}

.news__card--text {
    font-size: 14px;
    color: #333;
    margin-bottom: 15px;
    max-height: 120px;
    overflow: hidden;
    display: -webkit-box;
    -webkit-line-clamp: 6;
    -webkit-box-orient: vertical;
    text-overflow: ellipsis;
}

.news__card--date {
    font-size: 12px;
    color: #888;
    margin: auto;
    text-align: right;
    padding-top: 10px;
}

.news__card:hover {
    transform: scale(1.02);
    background-color: #f7f9fc;
    box-shadow: 0 14px 24px rgba(0, 0, 0, 0.18);
}

/* Тарифы */
.tariffs {
    padding: 60px 20px;
    background: #ffffff;
}

.tariffs__header {
    text-align: center;
}

.tariffs__title {
    font-size: 24px;
    margin-bottom: 10px;
}

.tariffs__swiper .swiper-slide {
    display: flex;
    justify-content: center;
    align-items: stretch;
}

#tariffs__swiper {
    padding-top: 10px;
    padding-bottom: 50px;
}

.tariffs__title--descr {
    font-size: 18px;
    margin-bottom: 25px;
}

.tariff__card {
    width: 100%;
    max-width: 350px;
    background: #FFFFFF;
    border: 1px solid #E2E8F0;
    border-radius: 16px;
    padding: 32px;
    text-align: center;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
    transition: transform 0.3s ease, box-shadow 0.3s ease, background-color 0.3s ease;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
}

.tariff__card:hover {
    transform: scale(1.02);
    background-color: #f7f9fc;
    box-shadow: 0 14px 24px rgba(0, 0, 0, 0.18);
}

.tariff__card--title {
    font-size: 24px;
    font-weight: 700;
    color: #1A202C;
    margin-bottom: 16px;
}

.tariff__card--features {
    list-style: none;
    padding: 20px 0 0 0;
    margin: 0 0 16px;
    font-size: 16px;
    color: #475569;
    text-align: left;
}

.tariff__card--features li+li {
    margin-top: 6px;
}

.tariff__card--price {
    font-size: 28px;
    font-weight: 700;
    color: #0f172a;
    margin: 16px 0;
}

.tariff__card--btn {
    display: none;
    background: #04356C;
    color: white;
    border: none;
    padding: 12px;
    font-size: 16px;
    border-radius: 8px;
    cursor: pointer;
    transition: background 0.3s;
}

.tariff__card--btn:hover {
    background: #0654a2;
}

.tariff-speed-img {
    height: auto;
    width: 230px;
    margin: 0 auto;
}

.tariff-speed-icon {
    height: auto;
    width: 55px;
    margin: 0 auto;
    padding-bottom: 30px;
}

/* Информационная секция */
.info {
    background-color: #E9F0F6;
}

.info__container {
    max-width: 1200px;
    margin: 0 auto;
    display: flex;
    flex-wrap: wrap;
    gap: 20px;
    padding: 20px;
}

.info__block {
    flex: 1 1 300px;
    background: #ffffff;
    padding: 15px;
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.05);
}

.info__block h5 {
    margin-bottom: 10px;
    font-size: 18px;
    text-align: center;
}

.weather-row {
    display: flex;
    align-items: center;
    gap: 8px;
}

.weather__time {
    margin: 5px 50px;
}

.currency-row {
    display: flex;
    align-items: center;
    gap: 8px;
}

.currency__time {
    margin: 5px 50px;
}

.weather-icon {
    width: 35px;
    height: auto;
}

.currency-icon {
    width: 35px;
    height: auto;
}

.newsmodal {
    position: fixed;
    inset: 0;
    display: none;
    align-items: center;
    justify-content: center;
    z-index: 1000;
}

.newsmodal.active { display: flex; }


.newsmodal .modal__overlay {
    position: absolute;
    inset: 0;
    background: rgba(0,0,0,.7);
    backdrop-filter: blur(2px);
}


.newsmodal .modal__window {
    position: relative;
    width: 90%;
    max-width: 640px;
    max-height: 90vh;
    overflow-y: auto;
    background: #fff;
    border-radius: 16px;
    padding: 40px 32px;
    box-shadow: 0 14px 24px rgba(0,0,0,.25);
    animation: fadeIn .3s ease-out;
}


.newsmodal .modal__title { margin-top: 0; font-size: 1.8rem; }
.newsmodal .modal__date  { font-size: .9rem; color: #666; margin: 4px 0 20px; }
.newsmodal .modal__text  { line-height: 1.6; font-size: 1rem; }

.modal__text img {
    display: block;
    height: auto;
    width: 500px;
}


.modal__close {
    position: absolute;
    top: 16px;
    right: 16px;
    font-size: 24px;
    background: none;
    border: none;
    cursor: pointer;
    opacity: .8;
    transition: opacity .2s;
}
.modal__close:hover { opacity: 1; }


@keyframes fadeIn {
    from { opacity: 0; transform: translateY(-10px); }
    to   { opacity: 1; transform: translateY(0); }
}


.modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.8);
    z-index: 1000;
    justify-content: center;
    align-items: center;
}

.modal__window {
    position: relative;
    width: 350px;
    max-width: 90%;
    background-color: #fff;
    border-radius: 10px;
    padding: 40px 20px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
    cursor: default;
    animation: fadeIn 0.3s ease-in-out;
}

.modal__title {
    margin-top: 0;
    font-size: 1.5em;
    margin-bottom: 10px;
}

.modal__description {
    font-size: 1em;
    line-height: 1.5;
}


.newsmodal {
    position: fixed;
    inset: 0;                       
    display: none;                  
    align-items: center;
    justify-content: center;
    z-index: 1000;                  
}

.modal.active {                     
    display: flex;
}

.modal__overlay {
    position: absolute;
    inset: 0;
    background: rgba(0, 0, 0, .6);
}

.modal__window {
    position: relative;
    width: 90%;
    max-width: 600px;
    max-height: 90vh;
    overflow-y: auto;
    background: #fff;
    border-radius: 16px;
    padding: 32px;
    box-shadow: 0 14px 24px rgba(0, 0, 0, .18);
}

.modal__close {
    position: absolute;
    top: 16px;
    right: 16px;
    font-size: 24px;
    background: none;
    border: none;
    cursor: pointer;
}


footer {
    background: #04356C;
    color: white;
    padding: 40px 20px;
    text-align: center;
}

/* Анимация появления */
@keyframes fadeIn {
    from {
        opacity: 0;
        transform: scale(0.95);
    }

    to {
        opacity: 1;
        transform: scale(1);
    }
}


@media (min-width: 1024px) {
    .tariffs__swiper {
        overflow: visible !important;
    }

    .tariffs__list {
        display: grid !important;
        grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
        gap: 24px;
        justify-content: center;
    }

    .tariffs__swiper .swiper-slide {
        width: auto !important;
        flex-shrink: 0;
    }

    .tariffs .swiper-pagination {
        display: none !important;
    } 

    .news__swiper .swiper-wrapper {
        display: flex;
        flex-wrap: nowrap;         
        /* justify-content: center; */ 
        gap: 30px;               
    }

    .news__swiper .swiper-slide {
        margin-right: 0 !important; 
        width: 350px;               
        flex: 0 0 auto;
    }

}

@media (max-width: 768px) {
    .header__nav {
        display: none;
    }

    .burger {
        display: flex;
    }

    .tariff__card {
        padding: 24px;
        border: 2px solid #04356C;
        border-radius: 20px;
    }

    .tariff__card--title {
        font-size: 22px;
        text-transform: uppercase;
        color: black;
    }

    .tariff__card--price {
        font-size: 24px;
        color: black;
        margin: 24px 0;
    }

    .tariff-speed-img {
        width: 180px;
    }

    .tariff__card--features {
        font-size: 16px;
        color: black;
        margin-bottom: 24px;
    }

    .tariff__card--btn {
        background: #0654a2;
        color: white;
        border: none;
        padding: 12px;
        font-size: 16px;
        border-radius: 8px;
        cursor: pointer;
        transition: background 0.3s;
    }

    .hero {
        padding: 40px 20px;
    }

    .hero__container {
        background: #04356C;
        flex-direction: column-reverse;
        height: 500px;
        width: 100%;
    }

    .hero__text {
        width: 100%;
        padding: 20px;
        text-align: center;
        margin: 0 auto;
        margin-bottom: 50px;
    }

    .hero__text h2 {
        font-size: 24px;
        text-align: center;
        margin: 0 auto;
    }

    .hero__text p {
        font-size: 16px;
        text-align: center;
    }

    .hero__image {
        width: 100%;
        height: auto;
    }

    .hero__image img {
        width: 100%;
        height: auto;
    }

    .hero__btn {
        font-size: 14px;
        padding: 8px 16px;
        margin: 0 auto;
    }

    #news__pagination {
        display: block;
        margin-top: 15px;
        position: relative;
    }

    .news__swiper .swiper-slide {
        width: 85%;
    }

    .modal__text img{
        display: block;
        height: auto;
        width: 300px;
    }

    .weather__time {
        margin: 5px 3rem;
    }

    #ip-data {
        text-align:center;
    }

}

