/* ==================== GLOBAL STYLES ==================== */
:root {
    --bg-color: #111827;
    --text-color: #E5E7EB;
    --primary-color: #3B82F6;
    --secondary-color: #4B5563;
    --border-color: #374151;
    --header-height: 5rem;

    --font-body: 'Inter', sans-serif;
    --font-heading: 'Manrope', sans-serif;
}

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

html {
    scroll-behavior: smooth;
}

body {
    background-color: var(--bg-color);
    color: var(--text-color);
    font-family: var(--font-body);
    font-size: 16px;
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
    text-rendering: optimizeLegibility;
}

h1, h2, h3, h4, h5, h6 {
    font-family: var(--font-heading);
    color: var(--text-color);
    line-height: 1.2;
}

a {
    color: var(--primary-color);
    text-decoration: none;
    transition: color 0.3s ease;
}

a:hover {
    color: #60A5FA; /* Lighter blue on hover */
}

ul {
    list-style: none;
}

img {
    max-width: 100%;
    height: auto;
    display: block;
}

.container {
    max-width: 1200px;
    margin-left: auto;
    margin-right: auto;
    padding-left: 1.5rem;
    padding-right: 1.5rem;
}

/* ==================== HEADER ==================== */
.header {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    background-color: rgba(17, 24, 39, 0.8);
    backdrop-filter: blur(10px);
    border-bottom: 1px solid var(--border-color);
    z-index: 100;
    height: var(--header-height);
}

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

.header__logo {
    font-family: var(--font-heading);
    font-weight: 700;
    font-size: 1.5rem;
    color: var(--text-color);
}

.header__logo:hover {
    color: var(--text-color);
}

.header__nav-list {
    display: flex;
    align-items: center;
    gap: 2rem;
}

.header__nav-link {
    font-family: var(--font-body);
    font-weight: 500;
    color: var(--text-color);
    position: relative;
    padding: 0.5rem 0;
}

.header__nav-link::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 0;
    height: 2px;
    background-color: var(--primary-color);
    transition: width 0.3s ease;
}

.header__nav-link:hover::after {
    width: 100%;
}

.header__nav-link--button {
    background-color: var(--primary-color);
    padding: 0.6rem 1.2rem;
    border-radius: 8px;
    transition: background-color 0.3s ease;
}

.header__nav-link--button:hover {
    background-color: #2563EB; /* Darker blue */
    color: var(--text-color);
}
.header__nav-link--button::after {
    display: none;
}

.header__burger-menu {
    display: none; /* Hidden on desktop */
    background: none;
    border: none;
    color: var(--text-color);
    cursor: pointer;
}

/* ==================== FOOTER ==================== */
.footer {
    background-color: #0c121e; /* Slightly darker than main bg */
    padding: 4rem 0 2rem;
    border-top: 1px solid var(--border-color);
}

.footer__container {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 3rem;
    margin-bottom: 3rem;
}

.footer__logo {
    font-family: var(--font-heading);
    font-weight: 700;
    font-size: 1.5rem;
    color: var(--text-color);
    margin-bottom: 0.5rem;
    display: inline-block;
}

.footer__logo:hover {
    color: var(--text-color);
}

.footer__tagline {
    color: var(--secondary-color);
    font-size: 0.9rem;
}

.footer__title {
    font-size: 1.1rem;
    margin-bottom: 1rem;
    font-weight: 600;
}

.footer__list {
    display: flex;
    flex-direction: column;
    gap: 0.8rem;
}

.footer__link {
    color: var(--secondary-color);
    font-weight: 500;
}

.footer__link:hover {
    color: var(--primary-color);
}

.footer__list--contacts li {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.footer__icon {
    width: 18px;
    height: 18px;
    color: var(--secondary-color);
    flex-shrink: 0;
}

.footer__text {
    color: var(--secondary-color);
}

.footer__bottom {
    text-align: center;
    padding-top: 2rem;
    border-top: 1px solid var(--border-color);
    color: var(--secondary-color);
    font-size: 0.9rem;
}

/* ==================== RESPONSIVENESS ==================== */
@media (max-width: 768px) {
    .header__nav {
        display: none; /* Hide nav on mobile for now */
        /* We will add logic for a mobile menu later */
    }

    .header__burger-menu {
        display: block;
    }
    
    .footer__container {
        grid-template-columns: 1fr;
        text-align: center;
    }
    
    .footer__list--contacts li {
        justify-content: center;
    }
}

/* ==================== BUTTON ==================== */
.button {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    background-color: var(--primary-color);
    color: var(--text-color);
    padding: 0.8rem 1.8rem;
    border-radius: 8px;
    font-family: var(--font-heading);
    font-weight: 600;
    transition: background-color 0.3s ease, transform 0.3s ease;
}

.button:hover {
    background-color: #2563EB;
    transform: translateY(-2px);
    color: var(--text-color);
}

.button__icon {
    width: 20px;
    height: 20px;
}

/* ==================== HERO SECTION ==================== */
.hero {
    min-height: 100vh;
    display: flex;
    align-items: center;
    padding-top: var(--header-height);
    overflow: hidden;
}

.hero__container {
    display: grid;
    grid-template-columns: 1fr 1fr;
    align-items: center;
    gap: 3rem;
}

.hero__content {
    max-width: 500px;
}

.hero__title {
    font-size: 3.5rem;
    font-weight: 700;
    margin-bottom: 1.5rem;
}

.hero__description {
    font-size: 1.1rem;
    color: var(--secondary-color);
    margin-bottom: 2.5rem;
    max-width: 90%;
}

.hero__animation-wrapper {
    perspective: 1000px;
}

.hero__animation {
    position: relative;
    width: 100%;
    height: 400px; /* Высота контейнера анимации */
}

.hero__particle {
    position: absolute;
    border-radius: 50%;
    background-color: var(--primary-color);
}


/* ==================== RESPONSIVENESS (HERO) ==================== */
@media (max-width: 992px) {
    .hero__title {
        font-size: 2.8rem;
    }
}

@media (max-width: 768px) {
    .hero {
        min-height: auto;
        padding-top: calc(var(--header-height) + 2rem);
        padding-bottom: 4rem;
        text-align: center;
    }

    .hero__container {
        grid-template-columns: 1fr;
        gap: 2rem;
    }

    .hero__content {
        max-width: 100%;
        order: 2; /* Текст под анимацией на мобильных */
    }

    .hero__description {
        margin-left: auto;
        margin-right: auto;
    }

    .hero__animation-wrapper {
        order: 1;
    }
    
    .hero__animation {
        height: 300px; /* Уменьшаем высоту на мобильных */
    }
}

/* ==================== GENERIC SECTION STYLES ==================== */
.section {
    padding: 6rem 0;
    overflow: hidden;
}

.section__header {
    text-align: center;
    max-width: 700px;
    margin: 0 auto 4rem;
}

.section__title {
    font-size: 2.5rem;
    margin-bottom: 1rem;
}

.section__subtitle {
    font-size: 1.1rem;
    color: var(--secondary-color);
    line-height: 1.7;
}

/* ==================== QUANTUM SECTION ==================== */
.quantum {
    background-color: #0c121e; /* Slightly darker bg to separate from hero */
}

.quantum__main-feature {
    display: grid;
    grid-template-columns: 1fr 1fr;
    align-items: center;
    gap: 4rem;
    margin-bottom: 5rem;
}

.quantum__main-image img {
    border-radius: 12px;
    box-shadow: 0 20px 40px rgba(0,0,0,0.3);
}

.quantum__main-title {
    font-size: 2rem;
    margin-bottom: 1rem;
    color: var(--primary-color);
}

.quantum__main-content p {
    font-size: 1.1rem;
    line-height: 1.7;
}

.quantum__cards-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 2rem;
}

.quantum__card {
    background-color: var(--bg-color);
    padding: 2rem;
    border-radius: 12px;
    border: 1px solid var(--border-color);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.quantum__card:hover {
    transform: translateY(-8px);
    box-shadow: 0 10px 20px rgba(59, 130, 246, 0.1);
}

.quantum__card-icon {
    width: 48px;
    height: 48px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    background-color: rgba(59, 130, 246, 0.1);
    color: var(--primary-color);
    margin-bottom: 1.5rem;
}

.quantum__card-icon i {
    width: 24px;
    height: 24px;
}

.quantum__card-title {
    font-size: 1.25rem;
    margin-bottom: 0.75rem;
}

.quantum__card-description {
    color: var(--secondary-color);
}

/* ==================== RESPONSIVENESS (QUANTUM) ==================== */
@media (max-width: 992px) {
    .quantum__main-feature {
        grid-template-columns: 1fr;
        gap: 2rem;
    }

    .quantum__main-image {
        order: -1; /* Image goes on top on medium screens */
    }

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

@media (max-width: 768px) {
    .section {
        padding: 4rem 0;
    }
    .section__title {
        font-size: 2rem;
    }
}

/* ==================== NEURO SECTION ==================== */
.neuro__flow {
    position: relative;
    display: flex;
    flex-direction: column;
    gap: 4rem;
}

/* The vertical timeline */
.neuro__flow::before {
    content: '';
    position: absolute;
    top: 2rem;
    bottom: 2rem;
    left: 50%;
    width: 2px;
    background-color: var(--border-color);
    transform: translateX(-50%);
}

.neuro__flow-item {
    display: grid;
    grid-template-columns: 1fr 100px 1fr;
    align-items: center;
    gap: 2rem;
    position: relative;
}

.neuro__item-content {
    grid-column: 1 / 2;
    text-align: right;
}

.neuro__item-image {
    grid-column: 3 / 4;
}

.neuro__item-connector {
    grid-column: 2 / 3;
    position: relative;
    display: flex;
    justify-content: center;
}

/* Reversed layout for even items */
.neuro__flow-item--reversed .neuro__item-content {
    grid-column: 3 / 4;
    text-align: left;
}

.neuro__flow-item--reversed .neuro__item-image {
    grid-column: 1 / 2;
}

.neuro__item-icon {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    background-color: var(--bg-color);
    border: 2px solid var(--border-color);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--primary-color);
    z-index: 1;
}

.neuro__item-icon i {
    width: 28px;
    height: 28px;
}

.neuro__item-title {
    font-size: 1.75rem;
    margin-bottom: 0.75rem;
}

.neuro__item-image img {
    border-radius: 12px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.25);
}


/* ==================== RESPONSIVENESS (NEURO) ==================== */
@media (max-width: 768px) {
    .neuro__flow::before {
        left: 30px;
        transform: translateX(0);
    }

    .neuro__flow-item,
    .neuro__flow-item--reversed {
        grid-template-columns: 60px 1fr;
        gap: 1.5rem;
    }

    .neuro__item-connector {
        grid-column: 1 / 2;
        grid-row: 1 / 2; /* Ensure it's in the first row */
    }

    .neuro__item-content {
        grid-column: 2 / 3;
        grid-row: 1 / 2;
        text-align: left !important; /* Force left align on mobile */
        padding-bottom: 1rem;
    }

    .neuro__item-image {
        grid-column: 2 / 3;
        grid-row: 2 / 3;
    }
    
    .neuro__flow-item--reversed .neuro__item-content,
    .neuro__flow-item--reversed .neuro__item-image {
        grid-column: 2 / 3;
    }
}

/* ==================== BIOENGINEERING SECTION ==================== */
.bio {
    background-color: #0c121e; /* Using the darker bg again for contrast */
}

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

.bio__card {
    background-color: var(--bg-color);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    overflow: hidden;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.bio__card:hover {
    transform: translateY(-8px);
    box-shadow: 0 15px 30px rgba(0, 0, 0, 0.2);
}

.bio__card-image {
    height: 200px;
    overflow: hidden;
}

.bio__card-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.4s ease;
}

.bio__card:hover .bio__card-image img {
    transform: scale(1.05);
}

.bio__card-content {
    padding: 1.5rem;
}

.bio__card-title {
    font-size: 1.5rem;
    margin-bottom: 0.75rem;
    color: var(--primary-color);
}

.bio__card-description {
    color: var(--secondary-color);
}

/* ==================== SPACE SECTION ==================== */
.space {
    position: relative;
    background-image: url('../img/vecteezy_galaxy-background-with-falling-star-vector-space-galaxy_7120314.jpg');
    background-size: cover;
    background-position: center center;
    background-attachment: fixed; /* The Parallax Effect */
    color: var(--text-color);
}

/* Overlay to darken the background image for better text readability */
.space::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(17, 24, 39, 0.6);
    z-index: 1;
}

/* Ensure the container is above the overlay */
.space .container {
    position: relative;
    z-index: 2;
}

.space__content-box {
    max-width: 750px;
    margin: 0 auto;
    background-color: rgba(12, 18, 30, 0.8);
    backdrop-filter: blur(8px);
    border: 1px solid var(--border-color);
    padding: 3rem;
    border-radius: 12px;
}

.space__title {
    font-size: 2.5rem;
    text-align: center;
    margin-bottom: 1rem;
}

.space__description {
    text-align: center;
    color: var(--secondary-color);
    font-size: 1.1rem;
    margin-bottom: 3rem;
}

.space__feature-list {
    display: flex;
    flex-direction: column;
    gap: 2rem;
}

.space__feature-item {
    display: flex;
    align-items: flex-start;
    gap: 1.5rem;
}

.space__feature-icon {
    flex-shrink: 0;
    color: var(--primary-color);
}

.space__feature-icon i {
    width: 24px;
    height: 24px;
}

.space__feature-text h4 {
    font-size: 1.25rem;
    margin-bottom: 0.5rem;
}

.space__feature-text p {
    color: var(--secondary-color);
}

@media (max-width: 768px) {
    .space {
        background-attachment: scroll; /* Disable parallax on mobile for performance */
    }

    .space__content-box {
        padding: 2rem;
    }
    
    .space__title {
        font-size: 2rem;
    }
}
/* ==================== CONTACT SECTION ==================== */
.contact__container {
    display: grid;
    grid-template-columns: 1fr 1.2fr;
    gap: 4rem;
    background-color: #0c121e;
    padding: 3rem;
    border-radius: 12px;
}

.contact__info-title {
    font-size: 1.75rem;
    color: var(--primary-color);
    margin-bottom: 1rem;
}

.contact__info-text {
    color: var(--secondary-color);
    margin-bottom: 2rem;
}

.contact__info-list {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.contact__form-group {
    margin-bottom: 1.5rem;
}

.contact__form-label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 500;
    color: var(--secondary-color);
}

.contact__form-input {
    width: 100%;
    padding: 0.8rem 1rem;
    background-color: var(--bg-color);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    color: var(--text-color);
    font-size: 1rem;
    transition: border-color 0.3s ease, box-shadow 0.3s ease;
}

.contact__form-input:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.2);
}

.contact__form-group--checkbox {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    margin-bottom: 2rem;
}

.contact__form-group--checkbox label {
    color: var(--secondary-color);
    font-size: 0.9rem;
}

.contact__form-group--checkbox a {
    color: var(--primary-color);
    text-decoration: underline;
}

.contact__form-button {
    width: 100%;
    justify-content: center;
    padding-top: 1rem;
    padding-bottom: 1rem;
    font-size: 1.1rem;
}

.contact__success-message {
    display: none; /* Hidden by default */
    text-align: center;
    padding: 2rem;
    background-color: rgba(74, 222, 128, 0.1);
    border: 1px solid #22c55e;
    border-radius: 12px;
}

.contact__success-message i {
    color: #22c55e;
    width: 48px;
    height: 48px;
    margin-bottom: 1rem;
}

.contact__success-message h4 {
    font-size: 1.5rem;
    margin-bottom: 0.5rem;
}

/* ==================== RESPONSIVENESS (CONTACT) ==================== */
@media (max-width: 992px) {
    .contact__container {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 768px) {
    .contact__container {
        padding: 1.5rem;
    }
}

/* ==================== GENERIC PAGES (TERMS, PRIVACY etc.) ==================== */
.pages {
    padding: calc(var(--header-height) + 4rem) 0 4rem;
}

.pages .container {
    max-width: 800px; /* Optimal width for reading text */
}

.pages h1 {
    font-size: 3rem;
    margin-bottom: 2rem;
    color: var(--primary-color);
}

.pages h2 {
    font-size: 2rem;
    margin-top: 3rem;
    margin-bottom: 1.5rem;
    border-bottom: 1px solid var(--border-color);
    padding-bottom: 0.5rem;
}

.pages p {
    font-size: 1.1rem;
    line-height: 1.8;
    margin-bottom: 1.5rem;
    color: var(--secondary-color);
}

.pages ul {
    list-style: disc;
    padding-left: 2rem;
    margin-bottom: 1.5rem;
}

.pages li {
    margin-bottom: 1rem;
    font-size: 1.1rem;
    line-height: 1.8;
    color: var(--secondary-color);
}

.pages a {
    text-decoration: underline;
}

.pages strong {
    color: var(--text-color);
    font-weight: 600;
}
/* ==================== COOKIE POPUP ==================== */
.cookie-popup {
    display: none; /* Hidden by default, shown by JS */
    position: fixed;
    bottom: 1.5rem;
    left: 1.5rem;
    right: 1.5rem;
    max-width: 500px;
    background-color: #0c121e;
    padding: 1.5rem;
    border: 1px solid var(--border-color);
    border-radius: 12px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
    z-index: 200;
    
    align-items: center;
    justify-content: space-between;
    gap: 1.5rem;
}

.cookie-popup--visible {
    display: flex;
}

.cookie-popup__text {
    color: var(--secondary-color);
    font-size: 0.9rem;
}

.cookie-popup__text a {
    color: var(--primary-color);
    text-decoration: underline;
}

.cookie-popup__button {
    background-color: var(--primary-color);
    color: var(--text-color);
    border: none;
    padding: 0.7rem 1.2rem;
    border-radius: 8px;
    cursor: pointer;
    font-weight: 500;
    flex-shrink: 0;
    transition: background-color 0.3s ease;
}

.cookie-popup__button:hover {
    background-color: #2563EB;
}

@media (max-width: 768px) {
    .cookie-popup {
        flex-direction: column;
        bottom: 1rem;
        left: 1rem;
        right: 1rem;
    }

    .cookie-popup__text {
        text-align: center;
    }
}