/* Определение шрифта */
@font-face {
    font-family: Nexa;
    src: url('../../font/Nexa-Heavy.ttf');
}

/* Базовые стили для body */
body {
    display: flex;
    flex-direction: column;
    min-height: 100vh;
    margin: 0;
    padding: 0;
    background: linear-gradient(135deg, #1a0033, #000033);
    position: relative;
    overflow-x: hidden !important;
    font-family: 'Nexa', sans-serif;
    transition: opacity 0.3s ease;
    width: 100%;
    box-sizing: border-box;
}

body.menu-open {
    overflow: hidden;
}

body.menu-open > *:not(header) {
    opacity: 0;
    pointer-events: none;
}

/* Стили для хедера */
header {
    position: relative;
    z-index: 100;
    display: flex;
    justify-content: flex-start;
    align-items: center;
    padding: 20px 40px;
    max-width: 1200px;
    margin: 0;
    transition: all 0.3s ease;
    width: 100%;
    max-width: 100%;
    overflow-x: hidden;
    box-sizing: border-box;
}

header.fixed {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    max-width: none;
    padding: 10px 20px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.5);
}

.logo-icon {
    width: 60px;
    height: 60px;
    flex-shrink: 0;
}

.navbar {
    display: flex;
    align-items: center;
    margin-left: 20px;
}

.nav-list {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    gap: 20px;
}

.nav-list li a {
    color: #FFF;
    font-size: 14px;
    font-weight: 900;
    text-transform: uppercase;
    text-decoration: none;
    transition: transform 0.3s ease, color 0.3s ease;
}

.nav-list li a:hover {
    transform: translateY(-2px);
    color: #9F7FF3;
}

.burger-menu {
    display: none;
    flex-direction: column;
    cursor: pointer;
}

.burger-menu span {
    width: 30px;
    height: 3px;
    background-color: #FFF;
    margin: 5px 0;
    transition: all 0.3s ease;
}

.burger-menu.toggle span:nth-child(1) {
    transform: rotate(45deg) translate(7px, 7px);
}

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

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

/* Стили для основного контента (Services) */
.services-section {
    position: relative;
    z-index: 2;
    padding: 40px;
    max-width: 1200px;
    margin: 0 auto;
    width: 100%;
    max-width: 100%;
    overflow-x: hidden;
    box-sizing: border-box;
}

.services-wrapper {
    display: flex;
    flex-direction: column;
    gap: 40px;
}

.services-intro {
    text-align: center;
}

.headline-main {
    color: #FFF;
    font-size: 68px;
    font-weight: 900;
    text-transform: uppercase;
    line-height: 1.2;
    margin: 0;
    text-shadow: 0 5px 30px rgba(255, 255, 255, 0.3);
    opacity: 0;
    transform: translateY(20px);
    transition: opacity 0.5s ease, transform 0.5s ease;
}

.headline-sub {
    color: #9F7FF3;
    font-size: 67px;
    font-weight: 500;
    text-transform: uppercase;
    line-height: 1.2;
    -webkit-text-stroke: 1px #9F7FF3;
    text-shadow: 0 5px 25px rgba(159, 127, 243, 0.8);
    margin: 0;
    opacity: 0;
    transform: translateY(20px);
    transition: opacity 0.5s ease, transform 0.5s ease;
    transition-delay: 0.2s;
}

.welcome-text {
    color: #FFF;
    font-size: 19px;
    font-weight: 900;
    line-height: 1.5;
    margin: 20px 0;
    max-width: 100%;
    opacity: 0;
    transform: translateY(20px);
    transition: opacity 0.5s ease, transform 0.5s ease;
}

.welcome-text:nth-child(1) {
    transition-delay: 0.3s;
}

.welcome-text:nth-child(2) {
    transition-delay: 0.4s;
}

.visible {
    opacity: 1;
    transform: translateY(0);
}

/* Карточки услуг */
.services-cards {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 30px;
}

.service-card {
    background: rgba(255, 255, 255, 0.12);
    border-radius: 20px;
    overflow: hidden;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.5);
    display: flex;
    flex-direction: column;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.service-card:hover {
    transform: perspective(1000px) rotateX(2deg) rotateY(2deg);
    box-shadow: 0 10px 40px rgba(159, 127, 243, 0.5);
}

.service-image {
    width: 100%;
    height: 200px;
    object-fit: cover;
    max-width: 100%;
}

.service-content {
    padding: 20px;
    color: #FFF;
    flex-grow: 1;
    display: flex;
    flex-direction: column;
}

.service-content h2 {
    font-size: 24px;
    font-weight: 900;
    margin: 0 0 15px;
    text-transform: uppercase;
    opacity: 0;
    transform: translateY(20px);
    transition: opacity 0.5s ease, transform 0.5s ease;
}

.service-details {
    list-style: none;
    padding: 0;
    margin: 0 0 15px;
    font-size: 16px;
    line-height: 1.5;
}

.service-details li {
    opacity: 0;
    transform: translateY(20px);
    transition: opacity 0.5s ease, transform 0.5s ease;
}

.service-price,
.service-location {
    font-size: 16px;
    font-weight: 700;
    margin: 5px 0;
    opacity: 0;
    transform: translateY(20px);
    transition: opacity 0.5s ease, transform 0.5s ease;
}

.service-card.visible .service-content h2 {
    opacity: 1;
    transform: translateY(0);
    transition-delay: 0.5s;
}

.service-card.visible .service-details li:nth-child(1) {
    opacity: 1;
    transform: translateY(0);
    transition-delay: 0.6s;
}

.service-card.visible .service-details li:nth-child(2) {
    opacity: 1;
    transform: translateY(0);
    transition-delay: 0.7s;
}

.service-card.visible .service-details li:nth-child(3) {
    opacity: 1;
    transform: translateY(0);
    transition-delay: 0.8s;
}

.service-card.visible .service-details li:nth-child(4) {
    opacity: 1;
    transform: translateY(0);
    transition-delay: 0.9s;
}

.service-card.visible .service-price {
    opacity: 1;
    transform: translateY(0);
    transition-delay: 1.0s;
}

.service-card.visible .service-location {
    opacity: 1;
    transform: translateY(0);
    transition-delay: 1.1s;
}

.service-btn {
    display: inline-block;
    background: #FFF;
    color: #000;
    padding: 12px 25px;
    text-decoration: none;
    font-size: 16px;
    font-weight: 900;
    text-transform: uppercase;
    border-radius: 5px;
    transition: transform 0.3s ease, box-shadow 0.3s ease, opacity 0.3s;
    margin-top: auto;
    text-align: center;
    position: relative;
    overflow: hidden;
}

.service-btn:hover {
    transform: scale(1.05);
    box-shadow: 0 0 15px rgba(159, 127, 243, 0.8);
    opacity: 1;
}

.service-btn::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 0;
    height: 0;
    background: rgba(159, 127, 243, 0.3);
    border-radius: 50%;
    transform: translate(-50%, -50%);
    transition: width 0.6s ease, height 0.6s ease;
    z-index: 0;
}

.service-btn:hover::after {
    width: 300px;
    height: 300px;
}

.service-btn span {
    position: relative;
    z-index: 1;
}

/* Discount Badge Styling */
.discount-badge {
    display: inline-block;
    background: linear-gradient(135deg, #9F7FF3, #FF4444);
    color: #FFF;
    font-size: 14px;
    font-weight: 900;
    text-transform: uppercase;
    padding: 5px 10px;
    border-radius: 20px;
    margin-left: 10px;
    box-shadow: 0 2px 10px rgba(159, 127, 243, 0.5);
    position: relative;
    overflow: hidden;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.discount-badge:hover {
    transform: scale(1.1);
    box-shadow: 0 4px 15px rgba(159, 127, 243, 0.8);
}

.discount-badge::before {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: rgba(255, 255, 255, 0.3);
    transform: rotate(30deg);
    transition: all 0.5s ease;
}

.discount-badge:hover::before {
    left: 150%;
}

/* Стили для футера */
footer {
    position: relative;
    z-index: 2;
    width: 100%;
    padding: 40px;
    background: rgba(0, 0, 33, 0.8);
    color: #FFF;
    text-align: center;
    margin-top: auto;
    max-width: 100%;
    overflow-x: hidden;
    box-sizing: border-box;
}

.footer-content {
    max-width: 1200px;
    margin: 0 auto;
}

.footer-content p {
    font-size: 16px;
    font-weight: 500;
    margin: 0 0 20px;
}

.footer-links {
    list-style: none;
    padding: 0;
    margin: 0;
    display: flex;
    justify-content: center;
    gap: 20px;
}

.footer-links a {
    color: #FFF;
    text-decoration: none;
    font-size: 14px;
    font-weight: 900;
    text-transform: uppercase;
    transition: transform 0.3s ease, color 0.3s ease;
}

.footer-links a:hover {
    transform: translateY(-2px);
    color: #9F7FF3;
}

/* Стили для логина */
.login-nav {
    background-color: rgb(67, 1, 121);
    border-radius: 15px;
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    gap: 20px;
    color: pink;
    padding: 10px 20px;
    margin-left: auto;
    white-space: nowrap;
}

.login-nav li a {
    color: #FFF;
    font-size: 14px;
    font-weight: 900;
    text-transform: uppercase;
    text-decoration: none;
    transition: transform 0.3s ease, color 0.3s ease;
}

.login-nav li a:hover {
    transform: translateY(-2px);
    color: #9F7FF3;
}

/* Стили для иконки корзины */
.cart-icon {
    position: relative;
    color: #FFF;
    font-size: 30px;
    cursor: pointer;
    margin-left: 25rem;
    padding: 10px 20px;
    background: rgba(159, 127, 243, 0.8);
    border-radius: 10px;
    transition: opacity 0.3s;
}

.cart-icon:hover {
    opacity: 0.8;
}

header.fixed .cart-icon {
    position: fixed;
    bottom: 20px;
    right: 20px;
    top: auto;
    left: auto;
    margin-left: 0;
    z-index: 1000;
}

.cart-count {
    position: absolute;
    top: -10px;
    right: -10px;
    background: #ff4444;
    color: #FFF;
    border-radius: 50%;
    width: 25px;
    height: 25px;
    font-size: 14px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 900;
}

/* Стили для модального окна корзины */
.cart-modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.8);
    z-index: 2000;
    justify-content: center;
    align-items: center;
    max-width: 100%;
    overflow-x: hidden;
    box-sizing: border-box;
}

.cart-modal.active {
    display: flex;
}

.cart-content {
    background: rgba(255, 255, 255, 0.12);
    border-radius: 20px;
    padding: 30px;
    width: 90%;
    max-width: 600px;
    color: #FFF;
    position: relative;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.5);
}

.cart-content h2 {
    margin: 0 0 20px;
    font-size: 28px;
    text-transform: uppercase;
    text-align: center;
}

.cart-items {
    max-height: 400px;
    overflow-y: auto;
    margin-bottom: 20px;
    padding: 10px;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 10px;
}

.cart-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 15px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.2);
    font-size: 16px;
}

.cart-item-title {
    flex: 1;
}

.cart-item-price {
    margin: 0 20px;
}

.remove-item {
    background: #ff4444;
    color: #FFF;
    border: none;
    padding: 5px 15px;
    border-radius: 5px;
    cursor: pointer;
    font-size: 14px;
}

.cart-total {
    display: flex;
    justify-content: space-between;
    padding: 15px 0;
    font-size: 20px;
    font-weight: 900;
    background: rgba(159, 127, 243, 0.2);
    border-radius: 10px;
    margin-bottom: 20px;
}

.checkout-btn,
.close-cart {
    display: block;
    width: 100%;
    padding: 15px;
    margin: 10px 0;
    border: none;
    border-radius: 10px;
    font-size: 18px;
    font-weight: 900;
    text-transform: uppercase;
    cursor: pointer;
    transition: opacity 0.3s;
}

.checkout-btn {
    background: #9F7FF3;
    color: #FFF;
}

.checkout-btn:hover,
.close-cart:hover {
    opacity: 0.8;
}

.close-cart {
    background: #FFF;
    color: #000;
}

/* Стили для всплывающего уведомления */
.crypto-popup {
    position: fixed;
    bottom: -100px;
    right: 20px;
    width: 300px;
    background: rgba(159, 127, 243, 0.95);
    border-radius: 15px;
    padding: 15px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
    z-index: 1000;
    transition: bottom 0.5s ease-in-out;
    max-width: 100%;
    overflow-x: hidden;
    box-sizing: border-box;
}

.crypto-popup.active {
    bottom: 20px;
}

.crypto-popup-content {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.crypto-popup-content p {
    margin: 0;
    color: #FFF;
    font-size: 16px;
    font-weight: 900;
    text-transform: uppercase;
}

.crypto-popup-actions {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.crypto-more-btn {
    background: #FFF;
    color: #000;
    padding: 8px 20px;
    border-radius: 5px;
    text-decoration: none;
    font-size: 14px;
    font-weight: 900;
    text-transform: uppercase;
    transition: opacity 0.3s;
}

.crypto-more-btn:hover {
    opacity: 0.8;
}

.crypto-close-btn {
    background: none;
    border: none;
    color: #FFF;
    font-size: 24px;
    cursor: pointer;
    padding: 0;
    width: 30px;
    height: 30px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: opacity 0.3s;
}

.crypto-close-btn:hover {
    opacity: 0.8;
}

/* Стили для модальных окон (Success и Already Owned) */
.modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.8);
    z-index: 2000;
    justify-content: center;
    align-items: center;
    max-width: 100%;
    overflow-x: hidden;
    box-sizing: border-box;
}

.modal-content {
    background: rgba(255, 255, 255, 0.12);
    border-radius: 20px;
    padding: 30px;
    width: 90%;
    max-width: 400px;
    color: #FFF;
    position: relative;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.5);
    text-align: center;
}

.modal-content.success {
    border: 2px solid #9F7FF3;
}

.modal-content.warning {
    border: 2px solid #FF4444;
}

.modal-content h3 {
    margin: 0 0 15px;
    font-size: 24px;
    text-transform: uppercase;
}

.modal-content p {
    margin: 0 0 20px;
    font-size: 16px;
}

.modal-content .close {
    position: absolute;
    top: 10px;
    right: 15px;
    color: #FFF;
    font-size: 24px;
    cursor: pointer;
    transition: opacity 0.3s;
}

.modal-content .close:hover {
    opacity: 0.8;
}

/* Адаптивность для мобильных устройств */
@media (max-width: 768px) {
    header {
        padding: 20px;
        background: rgba(32, 0, 83, 0.97) !important;
        width: 100%;
        max-width: 100%;
        overflow-x: hidden;
    }

    header.fixed {
        padding: 10px;
    }

    .nav-list {
        display: none;
        flex-direction: column;
        position: fixed;
        top: 0;
        left: 0;
        width: 100%;
        height: 100vh;
        background-color: rgba(0, 0, 0, 0.95);
        padding: 35px 0 !important;
        opacity: 0;
        transform: translateY(-100%);
        transition: transform 0.5s ease-in-out, opacity 0.3s ease-in-out;
        z-index: 2000;
        justify-content: flex-start;
        align-items: center;
        overflow-y: auto;
    }

    .nav-list.active {
        display: flex;
        opacity: 1;
        transform: translateY(0);
    }

    .nav-list li {
        margin: 10px 0; /* Уменьшено с 20px для компактности */
        text-align: center;
        opacity: 0;
        transform: translateY(20px);
        transition: opacity 0.5s ease-in-out, transform 0.5s ease-in-out;
    }

    .nav-list.active li {
        opacity: 1;
        transform: translateY(0);
    }

    .nav-list.active li:nth-child(1) { transition-delay: 0s; }
    .nav-list.active li:nth-child(2) { transition-delay: 0.1s; }
    .nav-list.active li:nth-child(3) { transition-delay: 0.2s; }
    .nav-list.active li:nth-child(4) { transition-delay: 0.3s; }
    .nav-list.active li:nth-child(5) { transition-delay: 0.4s; }
    .nav-list.active li:nth-child(6) { transition-delay: 0.5s; }
    .nav-list.active li:nth-child(7) { transition-delay: 0.6s; }
    .nav-list.active li:nth-child(8) { transition-delay: 0.7s; }

    .burger-menu {
        display: flex;
        z-index: 2100;
    }

    .services-section {
        padding: 20px;
        padding-top: 70px;
        width: 100%;
        max-width: 100%;
        overflow-x: hidden;
    }

    .services-intro {
        text-align: center;
    }

    .headline-main {
        font-size: 36px;
        line-height: 1.1;
    }

    .headline-sub {
        font-size: 32px;
        line-height: 1.1;
        -webkit-text-stroke: 0.5px #9F7FF3;
    }

    .welcome-text {
        font-size: 14px;
        margin: 15px 0;
    }

    .services-cards {
        grid-template-columns: 1fr;
    }

    .service-card {
        border-radius: 15px;
    }

    .service-image {
        height: 150px;
        max-width: 100%;
    }

    .service-content h2 {
        font-size: 20px;
    }

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

    .service-price,
    .service-location {
        font-size: 14px;
    }

    .service-btn {
        padding: 10px 20px;
        font-size: 14px;
    }

    .discount-badge {
        font-size: 12px;
        padding: 4px 8px;
        margin-left: 8px;
    }

    footer {
        padding: 20px;
        width: 100%;
        max-width: 100%;
        overflow-x: hidden;
    }

    .footer-links {
        flex-direction: column;
        gap: 12px;
    }

    .footer-links a {
        font-size: 12px;
    }

    .cart-icon {
        margin-right: 10px;
        padding: 10px;
        font-size: 24px;
        margin-left: 15rem;
    }

    header.fixed .cart-icon {
        font-size: 36px;
        padding: 15px;
        border-radius: 15px;
    }

    .cart-count {
        width: 20px;
        height: 20px;
        font-size: 12px;
    }

    .cart-modal.active {
        display: flex;
        align-items: flex-end;
    }

    .cart-content {
        width: 100%;
        max-width: none;
        padding: 15px;
        border-radius: 20px 20px 0 0;
        max-height: 80vh;
        overflow-y: auto;
    }

    .cart-content h2 {
        font-size: 20px;
    }

    .cart-items {
        max-height: 300px;
    }

    .cart-item {
        font-size: 14px;
        padding: 10px;
    }

    .remove-item {
        padding: 5px 10px;
        font-size: 12px;
    }

    .cart-total {
        font-size: 16px;
        padding: 10px 0;
    }

    .checkout-btn,
    .close-cart {
        padding: 12px;
        font-size: 16px;
    }

    .crypto-popup {
        width: 40%;
        max-width: 180px;
        right: 10px;
        padding: 5px;
        color: white;
    }

    .crypto-more-btn {
        padding: 10px !important;
        width: 50%;
        text-align: center;
    }

    .crypto-popup-content p {
        font-size: 14px;
    }

    .crypto-more-btn {
        padding: 6px 15px;
        font-size: 12px;
    }

    .crypto-close-btn {
        font-size: 20px;
        width: 25px;
        height: 25px;
    }

    .modal-content {
        width: 95%;
        padding: 20px;
    }

    .modal-content h3 {
        font-size: 20px;
    }

    .modal-content p {
        font-size: 14px;
    }
}

/* Дополнительная оптимизация для очень маленьких экранов */
@media (max-width: 480px) {
    .headline-main {
        font-size: 28px;
    }

    .headline-sub {
        font-size: 24px;
    }

    .welcome-text {
        font-size: 12px;
    }

    .service-content h2 {
        font-size: 18px;
    }

    .service-details {
        font-size: 13px;
    }

    .service-price,
    .service-location {
        font-size: 13px;
    }

    .discount-badge {
        font-size: 10px;
        padding: 3px 6px;
    }
}

/* Стили для спиннера загрузки */
.loading-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 33, 0.8);
    z-index: 9999;
    display: flex;
    justify-content: center;
    align-items: center;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s ease;
}

.loading-overlay.active {
    opacity: 1;
    pointer-events: all;
}

.spinner {
    width: 50px;
    height: 50px;
    border: 5px solid #9F7FF3;
    border-top: 5px solid transparent;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* Убираем text-shadow для iOS (Safari) */
@media screen and (-webkit-min-device-pixel-ratio: 0) {
    /* Уточняем, что это для iOS */
    @supports (-webkit-touch-callout: none) {
        .headline-main,
        .headline-sub,
        .headline-main-second,
        .headline-sub-second,
        .headline-main-third {
            text-shadow: none !important;
        }
    }
}