/* --- Google Fonts Import --- */
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500&family=Manrope:wght@600;700&display=swap');

/* --- CSS Variables --- */
:root {
    --font-primary: 'Inter', sans-serif;
    --font-secondary: 'Manrope', sans-serif;
    
    --color-bg: #f8f9fa;
    --color-text: #212529;
    --color-primary: #007BFF;
    --color-secondary: #6c757d;
    --color-white: #ffffff;
    --color-border: #dee2e6;
    
    --header-height: 70px;
}

/* --- Global Styles & Resets --- */
*,
*::before,
*::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

html {
    scroll-behavior: smooth;
}

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

.container {
    width: 100%;
    max-width: 1140px;
    margin: 0 auto;
    padding: 0 15px;
}

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

a:hover {
    color: #0056b3;
}

ul {
    list-style: none;
}

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

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


/* --- Header --- */
.header {
    background-color: var(--color-white);
    border-bottom: 1px solid var(--color-border);
    height: var(--header-height);
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    z-index: 1000;
}

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

.header__burger {
    display: none;
    background: none;
    border: none;
    cursor: pointer;
    padding: 5px;
    color: var(--color-text);
}

.nav__list {
    display: flex;
    gap: 25px;
}

.nav__link {
    font-size: 1rem;
    color: var(--color-secondary);
    font-weight: 500;
    position: relative;
    padding: 5px 0;
}

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

.nav__link:hover,
.nav__link.is-active {
    color: var(--color-text);
}

.nav__link:hover::after,
.nav__link.is-active::after {
    width: 100%;
}

/* --- Footer --- */
.footer {
    background-color: var(--color-white);
    border-top: 1px solid var(--color-border);
    padding: 60px 0 20px;
    color: var(--color-secondary);
}

.footer__container {
    display: grid;
    grid-template-columns: repeat(1, 1fr);
    gap: 40px;
    margin-bottom: 40px;
}

.footer__logo {
    margin-bottom: 15px;
    display: inline-block;
}

.footer__description {
    font-size: 0.9rem;
    max-width: 250px;
}

.footer__title {
    font-family: var(--font-secondary);
    font-size: 1.1rem;
    color: var(--color-text);
    margin-bottom: 20px;
}

.footer__list li {
    margin-bottom: 10px;
}

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

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

.footer__address {
    font-style: normal;
}

.footer__address p {
    font-size: 0.9rem;
    margin-bottom: 10px;
}

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

/* --- Mobile-first adaptivity --- */
@media (min-width: 768px) {
    .footer__container {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (min-width: 992px) {
    .footer__container {
        grid-template-columns: 1.5fr 1fr 1fr 1.5fr;
        gap: 30px;
    }
}

@media (max-width: 991.98px) {
    .header__burger {
        display: block;
        z-index: 1001; /* Above nav */
    }

    .nav {
        position: fixed;
        top: 0;
        left: 0;
        width: 100%;
        height: 100vh;
        background-color: var(--color-white);
        display: flex;
        justify-content: center;
        align-items: center;
        transform: translateX(100%);
        transition: transform 0.4s cubic-bezier(0.77, 0, 0.175, 1);
    }

    .nav.is-open {
        transform: translateX(0);
    }

    .nav__list {
        flex-direction: column;
        text-align: center;
        gap: 30px;
    }

    .nav__link {
        font-size: 1.8rem;
    }
}

/* --- Main Content Layout --- */
.main {
    padding-top: var(--header-height);
}

/* --- Button --- */
.button {
    display: inline-block;
    padding: 12px 28px;
    font-family: var(--font-secondary);
    font-weight: 600;
    font-size: 1rem;
    text-align: center;
    border-radius: 8px;
    cursor: pointer;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    border: none;
}

.button--primary {
    background-color: var(--color-primary);
    color: var(--color-white);
}

.button--primary:hover {
    color: var(--color-white);
    transform: translateY(-3px);
    box-shadow: 0 10px 20px rgba(0, 123, 255, 0.25);
}


/* --- Hero Section --- */
.hero {
    display: flex;
    align-items: center;
    padding: 60px 0;
    min-height: calc(100vh - var(--header-height));
    overflow: hidden; /* Важно для предотвращения выхода фигур за пределы */
}

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

.hero__title {
    font-family: var(--font-secondary);
    font-size: 2.5rem;
    font-weight: 700;
    line-height: 1.2;
    margin-bottom: 20px;
    max-width: 500px;
}

.hero__description {
    font-size: 1.1rem;
    color: var(--color-secondary);
    margin-bottom: 30px;
    max-width: 480px;
}

.hero__visual {
    position: relative;
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 300px; /* Чтобы фигуры не схлопывались на мобилке */
}

.hero__image {
    max-width: 80%;
    height: auto;
    border-radius: 16px;
    box-shadow: 0 20px 40px rgba(0,0,0,0.1);
    position: relative;
    z-index: 2;
}

/* --- Hero Animation Shapes --- */
@keyframes floatAnimation {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-20px); }
}

.hero__shape {
    position: absolute;
    border-radius: 16px;
    background-color: var(--color-primary);
    opacity: 0.1;
    z-index: 1;
    animation: floatAnimation 6s ease-in-out infinite;
}

.hero__shape--1 {
    width: 150px;
    height: 150px;
    top: -10%;
    left: 0;
    animation-delay: 0s;
}

.hero__shape--2 {
    width: 80px;
    height: 80px;
    top: 20%;
    right: -5%;
    border-radius: 50%;
    animation-duration: 8s;
    animation-delay: 1s;
    background-color: #FD7E14; /* Добавим второй акцентный цвет */
}

.hero__shape--3 {
    width: 100px;
    height: 100px;
    bottom: -10%;
    left: 20%;
    animation-duration: 7s;
    animation-delay: 2s;
}

.hero__shape--4 {
    width: 60px;
    height: 60px;
    bottom: 20%;
    right: 10%;
    border-radius: 20px;
    animation-duration: 5s;
    animation-delay: 0.5s;
    background-color: #20c997; /* И третий */
}


/* --- Hero Media Queries --- */
@media (min-width: 992px) {
    .hero {
        padding: 80px 0;
    }
    .hero__container {
        grid-template-columns: 1fr 1fr;
        text-align: left;
    }
    .hero__title {
        font-size: 3.2rem;
    }
}
/* --- Generic Section Styles --- */
.section {
    padding: 60px 0;
}

.section__header {
    text-align: center;
    margin-bottom: 50px;
    max-width: 700px;
    margin-left: auto;
    margin-right: auto;
}

.section__title {
    font-family: var(--font-secondary);
    font-size: 2.2rem;
    font-weight: 700;
    margin-bottom: 15px;
}

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

/* --- What Is It Section --- */
.what-is-it {
    background-color: var(--color-white);
}

.what-is-it__grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 30px;
}

/* --- Generic Card Style --- */
.card {
    background-color: var(--color-bg);
    border: 1px solid var(--color-border);
    border-radius: 12px;
    padding: 30px;
    text-align: center;
    transition: transform 0.3s ease, box-shadow 0.3s ease;

    /* Styles for scroll animation */
    opacity: 0;
    transform: translateY(20px);
    transition: opacity 0.5s ease-out, transform 0.5s ease-out;
}

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


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

.card__icon {
    display: inline-flex;
    justify-content: center;
    align-items: center;
    width: 60px;
    height: 60px;
    background-color: var(--color-primary);
    color: var(--color-white);
    border-radius: 50%;
    margin-bottom: 20px;
}

.card__icon i {
    width: 32px;
    height: 32px;
}

.card__title {
    font-family: var(--font-secondary);
    font-size: 1.4rem;
    margin-bottom: 10px;
    color: var(--color-text);
}

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

/* --- Media Queries for Section --- */
@media (min-width: 768px) {
    .section {
        padding: 80px 0;
    }
    
    .what-is-it__grid {
        grid-template-columns: repeat(3, 1fr);
    }

    .section__title {
        font-size: 2.5rem;
    }
}

/* --- Examples Section --- */
.examples {
    background-color: var(--color-bg);
}

.examples__tabs-nav {
    display: flex;
    justify-content: center;
    gap: 10px;
    margin-bottom: 40px;
    flex-wrap: wrap;
}

.examples__tab-button {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 10px 20px;
    font-family: var(--font-primary);
    font-weight: 500;
    font-size: 1rem;
    border: 1px solid var(--color-border);
    background-color: var(--color-white);
    color: var(--color-secondary);
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.3s ease;
}

.examples__tab-button:hover {
    background-color: #e9ecef;
    color: var(--color-text);
}

.examples__tab-button.is-active {
    background-color: var(--color-primary);
    color: var(--color-white);
    border-color: var(--color-primary);
}

.examples__tab-button i {
    width: 18px;
    height: 18px;
}

.examples__tab-panel {
    display: none;
    grid-template-columns: 1fr;
    gap: 30px;
    animation: fadeIn 0.5s ease-in-out;
}

.examples__tab-panel.is-active {
    display: grid;
}

.example-card {
    background-color: var(--color-white);
    border: 1px solid var(--color-border);
    border-radius: 12px;
    padding: 25px;
}

.example-card--result {
    background-color: #e3f2fd; /* Slight blue tint for result */
    border-color: #90caf9;
}

.example-card__title {
    font-family: var(--font-secondary);
    font-size: 1.1rem;
    margin-bottom: 15px;
    color: var(--color-text);
}

.example-card__prompt {
    font-style: italic;
    color: var(--color-secondary);
}

.example-card__image {
    width: 100%;
    max-width: 400px;
    display: block;
    margin: 0 auto;
    border-radius: 8px;
}

.example-card__list {
    list-style-position: inside;
    padding-left: 5px;
}

.example-card__list li {
    margin-bottom: 8px;
}

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

@media (min-width: 768px) {
    .examples__tab-panel {
        grid-template-columns: 1fr 1.5fr;
    }
}

/* --- Tools Section --- */
.tools {
    background-color: var(--color-white);
}

.tools__grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 25px;
}

.tool-card {
    display: flex;
    flex-direction: column;
    text-decoration: none;
    background-color: var(--color-bg);
    border: 1px solid var(--color-border);
    padding: 20px;
    border-radius: 12px;
    transition: transform 0.3s ease, box-shadow 0.3s ease, border-color 0.3s ease;
    
    /* Styles for scroll animation */
    opacity: 0;
    transform: translateY(20px);
    transition: opacity 0.5s ease-out, transform 0.5s ease-out;
}

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

.tool-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 25px rgba(0,0,0,0.07);
    border-color: var(--color-primary);
}

.tool-card__header {
    display: flex;
    align-items: center;
    gap: 15px;
    margin-bottom: 15px;
}

.tool-card__logo {
    width: 40px;
    height: 40px;
    border-radius: 8px;
    object-fit: cover;
}

.tool-card__name {
    font-family: var(--font-secondary);
    font-size: 1.25rem;
    color: var(--color-text);
}

.tool-card__description {
    color: var(--color-secondary);
    font-size: 0.9rem;
    line-height: 1.5;
    flex-grow: 1; /* Pushes footer to the bottom */
    margin-bottom: 20px;
}

.tool-card__tag {
    display: inline-block;
    padding: 4px 10px;
    font-size: 0.75rem;
    font-weight: 500;
    border-radius: 6px;
}

.tool-card__tag--text {
    background-color: #e3f2fd; /* Blue */
    color: #0d47a1;
}

.tool-card__tag--image {
    background-color: #e0f2f1; /* Teal */
    color: #004d40;
}

.tool-card__tag--plan {
    background-color: #fff3e0; /* Orange */
    color: #e65100;
}

/* --- Media Queries for Tools --- */
@media (min-width: 576px) {
    .tools__grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (min-width: 992px) {
    .tools__grid {
        grid-template-columns: repeat(4, 1fr);
    }
}

/* --- Security Section --- */
.security {
    background-color: var(--color-bg);
}

.security__grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 40px;
    align-items: center;
}

.security__visual {
    text-align: center;
}

.security__image {
    max-width: 80%;
    height: auto;
    border-radius: 16px;
}

/* Модификаторы для заголовков, выровненных по левому краю */
.section__title--left,
.section__subtitle--left {
    text-align: left;
    margin-left: 0;
    margin-right: 0;
}

.section__subtitle--left {
    margin-bottom: 40px;
}

.security__advice-list {
    list-style: none;
}

.advice-item {
    display: flex;
    align-items: flex-start;
    gap: 20px;
}

.advice-item:not(:last-child) {
    margin-bottom: 30px;
}

.advice-item__icon {
    flex-shrink: 0;
    width: 48px;
    height: 48px;
    display: flex;
    align-items: center;
    justify-content: center;
    background-color: #e3f2fd;
    color: var(--color-primary);
    border-radius: 50%;
}

.advice-item__icon i {
    width: 24px;
    height: 24px;
}

.advice-item__title {
    font-family: var(--font-secondary);
    font-size: 1.2rem;
    color: var(--color-text);
    margin-bottom: 5px;
}

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

/* --- Media Queries for Security --- */
@media (min-width: 992px) {
    .security__grid {
        grid-template-columns: 1fr 1.5fr;
        gap: 80px;
    }
    
    .security__visual {
        order: 1; /* Поменяем местами на десктопе, картинка справа */
    }
    
    .security__content {
        order: 0;
    }

    .security__image {
        max-width: 100%;
    }
}

/* --- Contact Section --- */
.contact {
    background-color: var(--color-white);
}

.contact__wrapper {
    max-width: 600px;
    margin: 0 auto;
    background-color: var(--color-bg);
    padding: 30px;
    border-radius: 16px;
    border: 1px solid var(--color-border);
}

.form-group {
    margin-bottom: 20px;
}

.form-label {
    display: block;
    font-weight: 500;
    margin-bottom: 8px;
    font-size: 0.9rem;
}

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

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

.form-group--captcha {
    font-weight: 500;
}

.form-group--checkbox {
    display: flex;
    align-items: center;
    gap: 10px;
}

.form-group--checkbox input[type="checkbox"] {
    width: 1.2em;
    height: 1.2em;
    flex-shrink: 0;
}

.form-group--checkbox label {
    margin-bottom: 0;
    font-size: 0.85rem;
    color: var(--color-secondary);
}

.form-group--checkbox a {
    text-decoration: underline;
}

.contact-form__button {
    width: 100%;
}

.form-message {
    display: none; /* Hidden by default */
    text-align: center;
    padding: 30px;
}

.form-message__icon {
    margin-bottom: 15px;
    color: var(--color-primary);
}

.form-message--error .form-message__icon {
    color: #dc3545;
}

.form-message__icon i {
    width: 48px;
    height: 48px;
}

.form-message__title {
    font-family: var(--font-secondary);
    font-size: 1.5rem;
    margin-bottom: 10px;
}

@media (min-width: 768px) {
    .contact__wrapper {
        padding: 50px;
    }
}

/* --- Cookie Popup --- */
.cookie-popup {
    position: fixed;
    bottom: -100%; /* Initially hidden */
    left: 0;
    width: 100%;
    background-color: var(--color-text);
    color: var(--color-bg);
    padding: 20px;
    box-shadow: 0 -5px 15px rgba(0,0,0,0.1);
    display: flex;
    justify-content: center;
    align-items: center;
    flex-wrap: wrap;
    gap: 20px;
    z-index: 2000;
    transition: bottom 0.5s ease-in-out;
}

.cookie-popup.is-active {
    bottom: 0;
}

.cookie-popup__text {
    margin: 0;
    font-size: 0.9rem;
    text-align: center;
}

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

.cookie-popup__button {
    padding: 8px 20px;
    font-size: 0.9rem;
    background-color: var(--color-primary);
    color: var(--color-white);
    border: none;
    border-radius: 6px;
    cursor: pointer;
    flex-shrink: 0;
}

/* --- Generic Styles for Legal Pages --- */
.pages {
    padding-top: calc(var(--header-height) + 40px); /* Отступ от фикс. хедера */
    padding-bottom: 60px;
    background-color: var(--color-white);
    min-height: 100vh;
}

.pages .container {
    max-width: 800px; /* Делаем контентную часть уже для читабельности */
}

.pages h1 {
    font-family: var(--font-secondary);
    font-size: 2.8rem;
    margin-bottom: 30px;
}

.pages h2 {
    font-family: var(--font-secondary);
    font-size: 1.8rem;
    margin-top: 40px;
    margin-bottom: 20px;
}

.pages p {
    font-size: 1.05rem;
    line-height: 1.7;
    margin-bottom: 20px;
    color: #495057;
}

.pages ul {
    list-style: disc;
    padding-left: 25px;
    margin-bottom: 20px;
}

.pages li {
    font-size: 1.05rem;
    line-height: 1.7;
    margin-bottom: 10px;
    color: #495057;
}

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

.pages a:hover {
    color: #0056b3;
}

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