/* ==================== GLOBAL STYLES ==================== */
:root {
    --bg-main: #0A0A0A;
    --bg-secondary: #141414;
    --text-primary: #EAEAEA;
    --text-secondary: #8A8A8A;
    --accent-primary: #4B89FF;
    --accent-hover: #3A7AFB;
    
    --font-heading: 'Manrope', sans-serif;
    --font-body: 'Inter', sans-serif;

    --container-width: 1200px;
    --container-padding: 1rem;

    --transition-speed: 0.3s;
}

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

html {
    scroll-behavior: smooth;
}

body {
    font-family: var(--font-body);
    font-size: 16px;
    line-height: 1.6;
    background-color: var(--bg-main);
    color: var(--text-primary);
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

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

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

a:hover {
    color: var(--accent-hover);
}

ul {
    list-style: none;
}

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

.container {
    max-width: var(--container-width);
    margin-left: auto;
    margin-right: auto;
    padding-left: var(--container-padding);
    padding-right: var(--container-padding);
}

/* ==================== HEADER ==================== */
.header {
    padding: 1.5rem 0;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    z-index: 100;
    background-color: rgba(10, 10, 10, 0.8);
    backdrop-filter: blur(10px);
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

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

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

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

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

.header__nav-link {
    font-size: 1rem;
    font-weight: 500;
    color: var(--text-secondary);
    position: relative;
    padding-bottom: 0.25rem;
}

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

.header__nav-link:hover {
    color: var(--text-primary);
}

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

.header__burger-btn {
    display: none;
    background: none;
    border: none;
    color: var(--text-primary);
    cursor: pointer;
}

/* ==================== FOOTER ==================== */
.footer {
    background-color: var(--bg-secondary);
    padding: 4rem 0;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
}

.footer__container {
    display: grid;
    grid-template-columns: 2fr 1fr 1.5fr 1.5fr;
    gap: 3rem;
}

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

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

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

.footer__title {
    font-size: 1.1rem;
    font-weight: 600;
    margin-bottom: 1.5rem;
    color: var(--text-primary);
}

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

.footer__link {
    color: var(--text-secondary);
    font-size: 0.95rem;
}

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

.footer__list--contacts li {
    display: flex;
    align-items: flex-start;
}

.footer__contact-icon {
    width: 18px;
    height: 18px;
    margin-right: 0.75rem;
    color: var(--text-secondary);
    flex-shrink: 0;
    margin-top: 2px;
}

.footer__address {
    color: var(--text-secondary);
    font-size: 0.95rem;
    line-height: 1.5;
}


/* ==================== RESPONSIVE ==================== */
@media (max-width: 992px) {
    .footer__container {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 768px) {
    .header__nav {
        /* Mobile menu logic will be added later */
        display: none;
    }

    .header__burger-btn {
        display: block;
    }
    
    .footer__container {
        grid-template-columns: 1fr;
        text-align: center;
    }
    
    .footer__column {
        align-items: center;
    }

    .footer__list--contacts li {
        justify-content: center;
        text-align: left;
    }
}
/* ==================== HERO SECTION ==================== */
.hero {
    padding: 12rem 0 6rem 0;
    overflow: hidden;
}

.hero__container {
    display: grid;
    grid-template-columns: 1.1fr 0.9fr;
    align-items: center;
    gap: 4rem;
}

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

/* Стили для анимации текста */
.hero__title span {
    display: inline-block;
    opacity: 0;
    transform: translateY(20px);
    transition: opacity 0.5s ease-out, transform 0.5s ease-out;
}

.hero__description {
    font-size: 1.125rem;
    line-height: 1.7;
    color: var(--text-secondary);
    margin-bottom: 2.5rem;
    max-width: 550px;
}

.hero__cta-button {
    display: inline-flex;
    align-items: center;
    gap: 0.75rem;
    background-color: var(--accent-primary);
    color: #FFFFFF;
    font-family: var(--font-heading);
    font-weight: 600;
    font-size: 1rem;
    padding: 1rem 2rem;
    border-radius: 8px;
    transition: background-color var(--transition-speed) ease, transform var(--transition-speed) ease;
}

.hero__cta-button:hover {
    background-color: var(--accent-hover);
    color: #FFFFFF;
    transform: translateY(-3px);
}

.hero__cta-icon {
    width: 20px;
    height: 20px;
    transition: transform var(--transition-speed) ease;
}

.hero__cta-button:hover .hero__cta-icon {
    transform: translateX(4px);
}

.hero__visual {
    display: flex;
    justify-content: center;
    align-items: center;
}

.hero__image {
    width: 100%;
    max-width: 500px;
    border-radius: 16px;
    aspect-ratio: 1 / 1;
    object-fit: cover;
    background-color: var(--bg-secondary);
}


/* ==================== RESPONSIVE (HERO) ==================== */
@media (max-width: 992px) {
    .hero {
        padding: 10rem 0 5rem 0;
    }
    
    .hero__container {
        grid-template-columns: 1fr;
        text-align: center;
    }
    
    .hero__content {
        order: 2;
    }
    
    .hero__visual {
        order: 1;
        margin-bottom: 3rem;
    }

    .hero__title {
        font-size: 2.75rem;
    }

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

@media (max-width: 576px) {
    .hero {
        padding: 8rem 0 4rem 0;
    }
    
    .hero__title {
        font-size: 2.25rem;
    }

    .hero__description {
        font-size: 1rem;
    }
    
    .hero__cta-button {
        padding: 0.9rem 1.8rem;
    }
}

/* ==================== GENERAL SECTION STYLES ==================== */
.section {
    padding: 6rem 0;
}

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

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

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

/* ==================== AUTOMATION SECTION ==================== */
.automation {
    background-color: var(--bg-secondary);
}

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

.automation-card {
    background-color: var(--bg-main);
    padding: 2.5rem 2rem;
    border-radius: 12px;
    border: 1px solid rgba(255, 255, 255, 0.1);
    transition: transform var(--transition-speed) ease, border-color var(--transition-speed) ease;
    
    /* Styles for scroll animation */
    opacity: 0;
    transform: translateY(30px);
}

.automation-card.is-visible {
    opacity: 1;
    transform: translateY(0);
}

.automation-card:hover {
    transform: translateY(-5px);
    border-color: var(--accent-primary);
}

.automation-card__icon-wrapper {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    display: flex;
    justify-content: center;
    align-items: center;
    background-color: rgba(75, 137, 255, 0.1);
    margin-bottom: 1.5rem;
}

.automation-card__icon {
    width: 28px;
    height: 28px;
    color: var(--accent-primary);
}

.automation-card__title {
    font-size: 1.25rem;
    font-weight: 600;
    margin-bottom: 0.75rem;
}

.automation-card__description {
    color: var(--text-secondary);
    font-size: 0.95rem;
    line-height: 1.6;
}


/* ==================== RESPONSIVE (AUTOMATION) ==================== */
@media (max-width: 992px) {
    .section__title {
        font-size: 2.25rem;
    }

    .automation__grid {
        grid-template-columns: 1fr;
        gap: 1.5rem;
    }
}

@media (max-width: 576px) {
    .section {
        padding: 4rem 0;
    }
    .section__header {
        margin-bottom: 3rem;
    }
    .section__title {
        font-size: 2rem;
    }
    .section__subtitle {
        font-size: 1rem;
    }
}

/* ==================== CREATIVITY SECTION ==================== */
.creativity__content {
    display: grid;
    grid-template-columns: 0.8fr 2fr;
    gap: 4rem;
    align-items: flex-start;
}

.creativity__tabs-nav {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    position: sticky;
    top: 120px; /* Header height + some offset */
}

.creativity__tab-btn {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 1rem 1.5rem;
    border-radius: 8px;
    font-family: var(--font-heading);
    font-size: 1.05rem;
    font-weight: 600;
    cursor: pointer;
    background-color: transparent;
    border: none;
    color: var(--text-secondary);
    text-align: left;
    transition: background-color var(--transition-speed) ease, color var(--transition-speed) ease;
}

.creativity__tab-btn:hover {
    background-color: var(--bg-secondary);
    color: var(--text-primary);
}

.creativity__tab-btn.is-active {
    background-color: var(--accent-primary);
    color: #FFFFFF;
}

.creativity__tab-icon {
    width: 22px;
    height: 22px;
    flex-shrink: 0;
}

.creativity__tab-pane {
    display: none; /* Hidden by default */
    animation: fadeIn 0.6s ease;
}

.creativity__tab-pane.is-active {
    display: block; /* Shown when active */
}

.creativity__tab-image {
    width: 100%;
    aspect-ratio: 16 / 9;
    object-fit: cover;
    border-radius: 12px;
    margin-bottom: 2rem;
    background-color: var(--bg-secondary);
}

.creativity__tab-title {
    font-size: 1.75rem;
    margin-bottom: 1rem;
}

.creativity__tab-description p {
    font-size: 1.1rem;
    color: var(--text-secondary);
    line-height: 1.7;
    max-width: 650px;
}

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


/* ==================== RESPONSIVE (CREATIVITY) ==================== */
@media (max-width: 992px) {
    .creativity__content {
        grid-template-columns: 1fr;
        gap: 2.5rem;
    }
    .creativity__tabs-nav {
        flex-direction: row;
        position: static;
        overflow-x: auto;
        padding-bottom: 1rem; /* For scrollbar */
    }
    .creativity__tab-btn {
        flex-shrink: 0; /* Prevent buttons from shrinking */
    }
}

@media (max-width: 576px) {
    .creativity__tab-btn {
        padding: 0.8rem 1rem;
        font-size: 0.95rem;
    }
    .creativity__tab-btn span {
        display: none; /* Show only icons on very small screens */
    }
    .creativity__tab-title {
        font-size: 1.5rem;
    }
    .creativity__tab-description p {
        font-size: 1rem;
    }
}

/* ==================== LEARNING SECTION ==================== */
.learning {
    background-color: var(--bg-secondary);
}

.learning__accordion {
    max-width: 800px;
    margin: 0 auto;
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.accordion-item {
    background-color: var(--bg-main);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 8px;
    overflow: hidden;
}

.accordion-item__header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1.5rem;
    cursor: pointer;
}

.accordion-item__title {
    font-size: 1.2rem;
    font-weight: 600;
}

.accordion-item__icon {
    width: 24px;
    height: 24px;
    color: var(--text-secondary);
    transition: transform var(--transition-speed) ease;
    flex-shrink: 0;
}

.accordion-item__content {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.4s ease-out, padding 0.4s ease-out;
}

.accordion-item__text {
    padding: 0 1.5rem 1.5rem 1.5rem;
    color: var(--text-secondary);
    line-height: 1.7;
}

/* Active state for accordion item */
.accordion-item.is-open .accordion-item__icon {
    transform: rotate(180deg);
    color: var(--accent-primary);
}

.accordion-item.is-open .accordion-item__content {
    /* max-height will be set by JS */
}

.accordion-item.is-open .accordion-item__title {
    color: var(--accent-primary);
}

/* ==================== CONTACT SECTION ==================== */
.contact {
    background-color: var(--bg-secondary);
}

.contact__container {
    display: grid;
    grid-template-columns: 1fr 1.2fr;
    gap: 5rem;
    align-items: center;
}

.contact__info {
    text-align: left;
}
.contact__info .section__title,
.contact__info .section__subtitle {
    text-align: left;
    margin-left: 0;
    margin-right: 0;
}

.contact-form {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.form-group {
    display: flex;
    flex-direction: column;
}

.form-label {
    margin-bottom: 0.5rem;
    font-size: 0.9rem;
    color: var(--text-secondary);
}

.form-input {
    background-color: var(--bg-main);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 6px;
    padding: 0.9rem 1rem;
    font-family: var(--font-body);
    font-size: 1rem;
    color: var(--text-primary);
    transition: border-color var(--transition-speed) ease, box-shadow var(--transition-speed) ease;
}

.form-input:focus {
    outline: none;
    border-color: var(--accent-primary);
    box-shadow: 0 0 0 3px rgba(75, 137, 255, 0.2);
}

.form-input.is-invalid {
    border-color: #E53E3E; /* Red for error */
}

.form-group--checkbox {
    flex-direction: row;
    align-items: center;
    gap: 0.75rem;
}
.form-group--checkbox input[type="checkbox"] {
    width: 1.25em;
    height: 1.25em;
    accent-color: var(--accent-primary);
}
.form-group--checkbox label {
    font-size: 0.9rem;
    color: var(--text-secondary);
    margin-bottom: 0;
}
.form-group--checkbox a {
    text-decoration: underline;
}

.contact-form__submit-btn {
    background-color: var(--accent-primary);
    color: #FFFFFF;
    font-family: var(--font-heading);
    font-weight: 600;
    font-size: 1.1rem;
    padding: 1rem 2rem;
    border-radius: 8px;
    border: none;
    cursor: pointer;
    transition: background-color var(--transition-speed) ease, transform var(--transition-speed) ease;
}

.contact-form__submit-btn:hover {
    background-color: var(--accent-hover);
    transform: translateY(-3px);
}

.contact-form__submit-btn:disabled {
    background-color: var(--text-secondary);
    cursor: not-allowed;
}

.form-success-message {
    text-align: center;
    padding: 3rem;
    background-color: var(--bg-main);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 12px;
}
.form-success-message__icon-wrapper {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    display: flex;
    justify-content: center;
    align-items: center;
    background-color: rgba(45, 212, 191, 0.1); /* Teal success color */
    margin: 0 auto 1.5rem auto;
}
.form-success-message__icon {
    width: 32px;
    height: 32px;
    color: #2DD4BF;
}
.form-success-message__title {
    font-size: 1.75rem;
    margin-bottom: 0.5rem;
}
.form-success-message__text {
    color: var(--text-secondary);
}

/* ==================== RESPONSIVE (CONTACT) ==================== */
@media (max-width: 992px) {
    .contact__container {
        grid-template-columns: 1fr;
        gap: 3rem;
    }
    .contact__info {
        text-align: center;
    }
    .contact__info .section__title,
    .contact__info .section__subtitle {
        text-align: center;
    }
}

/* ==================== TOOLS SECTION ==================== */
.tools__list {
    max-width: 850px;
    margin: 0 auto;
    display: flex;
    flex-direction: column;
}

.tool-item {
    display: flex;
    align-items: center;
    gap: 1.5rem;
    padding: 1.5rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    color: var(--text-primary);
    transition: background-color var(--transition-speed) ease;

    /* Styles for scroll animation */
    opacity: 0;
    transform: translateY(30px);
}

.tool-item:first-child {
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    border-top-left-radius: 12px;
    border-top-right-radius: 12px;
}
.tool-item:last-child {
    border-bottom-left-radius: 12px;
    border-bottom-right-radius: 12px;
}

.tool-item.is-visible {
    opacity: 1;
    transform: translateY(0);
}

.tool-item:hover {
    background-color: var(--bg-secondary);
    color: var(--text-primary);
}

.tool-item__logo {
    width: 50px;
    height: 50px;
    border-radius: 8px;
    background-color: #fff; /* Placeholder bg */
    object-fit: contain;
    flex-shrink: 0;
}

.tool-item__content {
    flex-grow: 1;
}

.tool-item__title {
    font-size: 1.15rem;
    font-weight: 600;
    margin-bottom: 0.25rem;
}

.tool-item__description {
    color: var(--text-secondary);
    font-size: 0.95rem;
    line-height: 1.6;
}

.tool-item__external-icon {
    width: 22px;
    height: 22px;
    color: var(--text-secondary);
    transition: transform var(--transition-speed) ease, color var(--transition-speed) ease;
}

.tool-item:hover .tool-item__external-icon {
    color: var(--accent-primary);
    transform: translate(3px, -3px);
}

/* ==================== RESPONSIVE (TOOLS) ==================== */
@media (max-width: 576px) {
    .tool-item {
        padding: 1.25rem;
        gap: 1rem;
    }
    .tool-item__logo {
        width: 40px;
        height: 40px;
    }
    .tool-item__title {
        font-size: 1.05rem;
    }
}

/* ==================== COOKIE POPUP ==================== */
.cookie-popup {
    position: fixed;
    bottom: 1.5rem;
    left: 1.5rem;
    right: 1.5rem;
    max-width: 500px;
    background-color: var(--bg-secondary);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 8px;
    padding: 1.25rem;
    z-index: 200;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
    transform: translateY(200%);
    transition: transform 0.5s ease-in-out;
}

.cookie-popup.is-visible {
    transform: translateY(0);
}

.cookie-popup__content {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1.5rem;
}

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

.cookie-popup__text a {
    text-decoration: underline;
}

.cookie-popup__btn {
    background-color: var(--accent-primary);
    color: #FFFFFF;
    border: none;
    padding: 0.6rem 1.2rem;
    border-radius: 6px;
    cursor: pointer;
    font-weight: 500;
    flex-shrink: 0;
    transition: background-color var(--transition-speed) ease;
}

.cookie-popup__btn:hover {
    background-color: var(--accent-hover);
}

/* ==================== STYLES FOR POLICY PAGES ==================== */
/* These styles apply to pages like privacy.html, terms.html etc.
   using the structure: <section class="pages"> in <main> 
*/
.pages {
    padding: 10rem 0 6rem 0; /* Add top padding to avoid fixed header */
}

.pages h1 {
    font-size: 3rem;
    margin-bottom: 2rem;
}

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

.pages p,
.pages ul {
    font-size: 1.1rem;
    line-height: 1.8;
    color: var(--text-secondary);
    margin-bottom: 1.5rem;
    max-width: 800px; /* Improve readability */
}

.pages ul {
    list-style-type: disc;
    padding-left: 2rem;
}

.pages li {
    margin-bottom: 0.75rem;
}

.pages a {
    text-decoration: underline;
}

.pages strong {
    color: var(--text-primary);
    font-weight: 500;
}

/* ==================== RESPONSIVE (POPUPS, PAGES) ==================== */
@media (max-width: 576px) {
    .cookie-popup {
        bottom: 1rem;
        left: 1rem;
        right: 1rem;
    }
    .cookie-popup__content {
        flex-direction: column;
        align-items: stretch;
        gap: 1rem;
        text-align: center;
    }
    .pages h1 { font-size: 2.25rem; }
    .pages h2 { font-size: 1.75rem; }
    .pages p, .pages ul { font-size: 1rem; }
}