@import url('https://fonts.googleapis.com/css2?family=Poppins:wght@300;400;600;700&display=swap');

:root {
    --dark-blue-bg: #0a192f;
    --light-navy-bg: #112240;
    --lightest-navy-bg: #233554;
    --primary-cyan: #64ffda;
    --primary-light-slate: #ccd6f6;
    --primary-slate: #8892b0;
    --container-width: 1100px;
    --border-radius: 4px;
}

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

html {
    scroll-behavior: smooth;
}

body {
    font-family: 'Poppins', sans-serif;
    line-height: 1.6;
    color: var(--primary-slate);
    background-color: var(--dark-blue-bg);
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    overflow-x: hidden;
}

.container {
    max-width: var(--container-width);
    margin: 0 auto;
    padding: 0 20px;
}

/* Header */
header {
    background-color: rgba(10, 25, 47, 0.85);
    backdrop-filter: blur(10px);
    padding: 1rem 0;
    border-bottom: 1px solid var(--lightest-navy-bg);
    position: sticky;
    top: 0;
    z-index: 1000;
    transition: top 0.3s;
}

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

.logo {
    font-size: 1.6rem;
    font-weight: 700;
    color: var(--primary-light-slate);
    text-decoration: none;
}

.logo span {
    color: var(--primary-cyan);
}

.main-nav {
    display: flex;
    align-items: center;
}

.nav-links {
    list-style: none;
    display: flex;
    align-items: center;
}

.nav-links li {
    margin-left: 25px;
    font-size: 0.9rem;
}

.nav-links li a {
    text-decoration: none;
    color: var(--primary-light-slate);
    font-weight: 400;
    transition: color 0.3s ease;
    padding: 10px;
}

.nav-links li a:hover {
    color: var(--primary-cyan);
}

.hamburger {
    display: none;
    cursor: pointer;
}

.hamburger .line {
    width: 30px;
    height: 3px;
    background: var(--primary-light-slate);
    margin: 5px;
    transition: all 0.3s ease;
}

/* Hero Section */
.hero {
    padding: 150px 0;
    text-align: left;
    position: relative;
    overflow: hidden;
    display: flex;
    align-items: center;
    min-height: 100vh;
}

#hero-bg {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: -1;
}

.hero h1 {
    font-size: clamp(2.5rem, 6vw, 4.5rem);
    font-weight: 700;
    color: var(--primary-light-slate);
    margin-bottom: 1rem;
    line-height: 1.1;
}

.hero .subtitle {
    font-size: 1.2rem;
    color: var(--primary-cyan);
    margin-bottom: 2rem;
    font-weight: 400;
}

.hero .description {
    font-size: 1.1rem;
    color: var(--primary-slate);
    max-width: 600px;
    margin-bottom: 2.5rem;
}

.price-buy-wrapper {
    display: block; /* Change from flex to block */
    margin-top: 30px;
}

.price-container {
    position: relative;
    display: inline-flex; /* Use inline-flex to wrap content */
    flex-direction: column;
    align-items: flex-start;
    padding: 10px; /* Add some padding for the badge */
}

.old-price {
    font-size: 1.5rem;
    color: #ff4d4d;
    text-decoration: line-through;
    opacity: 0.7;
}

.new-price {
    font-size: 3rem;
    font-weight: 700;
    color: var(--primary-light-slate);
    line-height: 1.1;
}

.discount-badge {
    position: absolute;
    top: 0px;
    right: 0px;
    background-color: #ff4d4d;
    color: white;
    padding: 5px 10px;
    font-size: 1rem;
    font-weight: 700;
    border-radius: var(--border-radius);
    transform: rotate(10deg) translate(10px, -10px); /* Nudge it to the top-right corner */
}

.buy-button {
    background-color: transparent;
    color: var(--primary-cyan);
    border: 1px solid var(--primary-cyan);
    padding: 1rem 2rem;
    font-size: 1rem;
    font-weight: 600;
    border-radius: var(--border-radius);
    cursor: pointer;
    transition: background-color 0.3s ease;
    display: inline-block; /* Ensure it's not full width */
    margin-top: 20px; /* Add space above the button */
}

.buy-button:hover {
    background-color: rgba(100, 255, 218, 0.1);
}

/* Sections */
section {
    padding: 100px 0;
}

/* Dropdown Menu */
.dropdown {
    position: relative;
    display: inline-block;
}

.dropdown-content {
    display: none;
    position: absolute;
    background-color: var(--light-navy-bg);
    min-width: 220px;
    box-shadow: 0px 8px 16px 0px rgba(0,0,0,0.2);
    z-index: 1;
    border-radius: var(--border-radius);
    padding: 10px 0;
}

.dropdown-content a {
    color: var(--primary-slate);
    padding: 12px 16px;
    text-decoration: none;
    display: block;
    font-size: 0.9rem;
}

.dropdown-content a:hover {
    background-color: var(--lightest-navy-bg);
    color: var(--primary-cyan);
}

.dropdown:hover .dropdown-content {
    display: block;
}

h2 {
    text-align: center;
    font-size: 2.5rem;
    margin-bottom: 20px;
    font-weight: 700;
    color: var(--primary-light-slate);
    position: relative;
}

/* About Section */
.about-content {
    display: grid;
    grid-template-columns: 3fr 2fr;
    gap: 50px;
    align-items: center;
}

.section-subtitle {
    text-align: center;
    font-size: 1.2rem;
    color: var(--primary-slate);
    max-width: 700px;
    margin: -30px auto 60px;
}

/* Foundation Section */
.foundation-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 30px;
}

.foundation-item {
    background: var(--light-navy-bg);
    padding: 30px;
    border-radius: var(--border-radius);
    transition: transform 0.3s ease, background-color 0.3s ease;
}

.foundation-item:hover {
    transform: translateY(-5px);
    background-color: var(--lightest-navy-bg);
}

.foundation-item h3 {
    color: var(--primary-cyan);
    font-size: 1.3rem;
    margin-bottom: 15px;
}

.foundation-item p {
    text-align: justify;
}

.chart-image {
    width: 100%;
    height: auto;
    border-radius: var(--border-radius);
    margin-bottom: 20px;
    opacity: 0.8;
    transition: opacity 0.3s ease;
}

.foundation-item:hover .chart-image {
    opacity: 1;
}

/* Numbers Section */
.numbers-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 40px;
    text-align: center;
}

.number-item .number-stat {
    font-size: 4rem;
    font-weight: 700;
    color: var(--primary-cyan);
    line-height: 1;
}

.number-item p {
    font-size: 1rem;
    color: var(--primary-slate);
    margin-top: 10px;
}

@keyframes scroll {
    0% {
        transform: translateX(0);
    }
    100% {
        transform: translateX(calc(-340px * 18)); /* 320px width + 20px gap, multiplied by number of reviews */
    }
}

/* Reviews Section */
.reviews .container {
    overflow: hidden; /* Hide the non-animated part */
    position: relative;
}

.reviews .container::before,
.reviews .container::after {
    content: '';
    position: absolute;
    top: 0;
    bottom: 0;
    width: 100px;
    z-index: 2;
}

.reviews .container::before {
    left: 0;
    background: linear-gradient(to right, var(--dark-blue-bg) 0%, rgba(10, 25, 47, 0) 100%);
}

.reviews .container::after {
    right: 0;
    background: linear-gradient(to left, var(--dark-blue-bg) 0%, rgba(10, 25, 47, 0) 100%);
}

.review-list {
    display: flex;
    gap: 20px;
    width: calc(340px * 36); /* Double the reviews for seamless loop */
    animation: scroll 120s linear infinite;
}

.review-list:hover {
    animation-play-state: paused;
}

.review {
    flex: 0 0 320px; /* Fixed width for each review */
    background: var(--light-navy-bg);
    padding: 25px;
    border-radius: var(--border-radius);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    box-shadow: 0 10px 30px -15px rgba(2,12,27,0.7);
}

.review:hover {
    transform: translateY(-7px);
}

.review p {
    margin-bottom: 15px;
}

.review cite {
    font-weight: 600;
    font-style: normal;
    color: var(--primary-cyan);
}

/* Footer */
footer {
    text-align: center;
    padding: 25px 0;
    color: var(--primary-slate);
    font-size: 0.9rem;
}

footer a {
    color: var(--primary-cyan);
    text-decoration: none;
}

/* Animations */
.reveal {
    opacity: 0;
    transform: translateY(20px);
    transition: opacity 0.6s ease-out, transform 0.6s ease-out;
}
.reveal.visible {
    opacity: 1;
    transform: translateY(0);
}

/* Responsive */
@media (max-width: 992px) {
    .foundation-grid {
        grid-template-columns: 1fr;
    }
    .numbers-grid {
        grid-template-columns: 1fr;
        gap: 50px;
    }
}

@media (max-width: 768px) {
    .nav-links {
        position: absolute;
        top: 75px; /* Position it right below the header */
        left: 5%;
        width: 90%;
        background-color: var(--lightest-navy-bg);
        border-radius: var(--border-radius);
        flex-direction: column;
        align-items: flex-start; /* Align items to the left */
        max-height: 0;
        overflow: hidden;
        transition: max-height 0.5s ease-in-out, padding 0.5s ease-in-out;
        padding: 0 20px;
    }

    .nav-links.nav-active {
        max-height: 500px; /* Animate height for slide-down effect */
        padding: 20px;
    }

    .nav-links li {
        margin: 0;
        width: 100%;
    }

    .nav-links li a {
        display: block;
        width: 100%;
        padding: 15px 0;
    }

    /* Mobile Dropdown Handling */
    .nav-links .dropdown .dropbtn {
        pointer-events: none; /* Disable click on "Ресурсы" */
    }
    
    .nav-links .dropdown-content {
        display: block;
        position: static;
        background-color: transparent;
        box-shadow: none;
        padding: 0 0 0 20px; /* Indent sub-items */
    }

    .nav-links .dropdown-content a {
        padding: 10px 0;
        font-size: 0.8rem;
        color: var(--primary-slate);
    }
    
    .dropdown:hover .dropdown-content {
        display: block; /* Ensure it's always block on mobile */
    }


    .hamburger {
        display: block;
        z-index: 101;
    }

    .hamburger.toggle .line:nth-child(1) {
        transform: rotate(-45deg) translate(-5px, 6px);
    }
    .hamburger.toggle .line:nth-child(2) {
        opacity: 0;
    }
    .hamburger.toggle .line:nth-child(3) {
        transform: rotate(45deg) translate(-5px, -6px);
    }

    .about-content {
        grid-template-columns: 1fr;
    }
    h2::after {
        width: 100px;
    }
}
