/* Базовий CSS reset */
*,
*::before,
*::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html, body {
  scroll-behavior: smooth;
  height: 100%;
  width: 100%;
  font-family: sans-serif;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

body {
  text-rendering: optimizeSpeed;
}

img, picture, video, canvas, svg {
  display: block;
  max-width: 100%;
}

input, button, textarea, select {
  font: inherit;
  border: none;
  outline: none;
  background: none;
}

ul, ol {
  list-style: none;
}

a {
  text-decoration: none;
  color: inherit;
}

table {
  border-collapse: collapse;
  border-spacing: 0;
}
/* ----------- */


/* ==================== GLOBAL STYLES & VARIABLES ==================== */
:root {
    --primary-color: #0A2540;      /* Deep Blue */
    --secondary-color: #F8F9FA;    /* Off-white */
    --accent-color: #00A99D;       /* Teal/Mint */
    --accent-hover-color: #00877E;
    --text-color: #343A40;         /* Dark Gray */
    --light-gray: #E9ECEF;
    --text-color-light: #F8F9FA;
    --header-height: 70px;
    --font-family-headings: 'Montserrat', sans-serif;
    --font-family-body: 'Lato', sans-serif;
     --category-image-bg: #FF7B25;
    --category-productivity-bg: #3B82F6;
    --category-presentation-bg: #8B5CF6;
}

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

html {
    scroll-behavior: smooth;
}

body {
    font-family: var(--font-family-body);
    font-size: 16px;
    line-height: 1.6;
    color: var(--text-color);
    background-color: var(--secondary-color);
}

h1, h2, h3, h4, h5, h6 {
    font-family: var(--font-family-headings);
    font-weight: 600;
}

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

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

ul {
    list-style: none;
}

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

/* ==================== HEADER ==================== */
.site-header {
    position: sticky;
    top: 0;
    left: 0;
    width: 100%;
    height: var(--header-height);
    background-color: rgba(255, 255, 255, 0.85);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    z-index: 1000;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
}

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

.site-header__logo {
    font-family: var(--font-family-headings);
    font-size: 24px;
    font-weight: 700;
    color: var(--primary-color);
}

.site-header__nav {
    display: flex;
    align-items: center;
}

.site-header__menu {
    display: flex;
    align-items: center;
    gap: 30px;
}

.site-header__menu-link {
    position: relative;
    padding: 5px 0;
    font-weight: 600;
    color: var(--text-color);
    font-size: 15px;
}

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

.site-header__menu-link:hover::after,
.site-header__menu-link.active::after {
    width: 100%;
}

.site-header__mobile-toggle {
    display: none;
    background: none;
    border: none;
    cursor: pointer;
    color: var(--primary-color);
}

/* ==================== FOOTER ==================== */
.site-footer {
    background-color: var(--primary-color);
    color: var(--text-color-light);
    padding: 60px 0 20px 0;
}

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

.site-footer__logo {
    font-family: var(--font-family-headings);
    font-size: 28px;
    font-weight: 700;
    color: var(--text-color-light);
    display: inline-block;
    margin-bottom: 15px;
}

.site-footer__tagline {
    font-size: 14px;
    color: var(--light-gray);
    opacity: 0.8;
}

.site-footer__heading {
    font-size: 18px;
    margin-bottom: 20px;
    color: var(--text-color-light);
    font-weight: 700;
}

.site-footer__list {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.site-footer__link {
    color: var(--light-gray);
    opacity: 0.8;
    transition: opacity 0.3s ease;
}

.site-footer__link:hover {
    opacity: 1;
    color: var(--text-color-light);
}

.site-footer__list--contacts li {
    display: flex;
    align-items: center;
    gap: 10px;
}
.site-footer__icon {
    width: 18px;
    height: 18px;
    color: var(--accent-color);
    flex-shrink: 0;
}

.site-footer__text {
     color: var(--light-gray);
     opacity: 0.8;
}

.site-footer__bottom {
    text-align: center;
    padding-top: 20px;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    font-size: 14px;
    color: var(--light-gray);
    opacity: 0.6;
}


/* ==================== RESPONSIVENESS ==================== */
@media (max-width: 768px) {
    .site-header__menu {
        position: fixed;
        top: var(--header-height);
        left: -100%;
        width: 100%;
        height: calc(100vh - var(--header-height));
        flex-direction: column;
        justify-content: center;
        gap: 40px;
        background-color: var(--secondary-color);
        transition: left 0.4s ease-in-out;
    }

    .site-header__menu.is-active {
        left: 0;
    }

    .site-header__menu-link {
        font-size: 20px;
    }

    .site-header__mobile-toggle {
        display: block;
    }
}

/* ==================== BUTTONS ==================== */
.btn {
    display: inline-block;
    padding: 12px 28px;
    font-family: var(--font-family-headings);
    font-weight: 600;
    font-size: 16px;
    border-radius: 50px;
    text-align: center;
    cursor: pointer;
    border: none;
    transition: all 0.3s ease;
}

.btn--primary {
    background-color: var(--accent-color);
    color: #fff;
}

.btn--primary:hover {
    background-color: var(--accent-hover-color);
    color: #fff;
    transform: translateY(-3px);
    box-shadow: 0 10px 20px rgba(0, 169, 157, 0.2);
}


/* ==================== HERO SECTION ==================== */
.hero-section {
    position: relative;
    height: 100vh;
    min-height: 600px;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    color: var(--text-color-light);
    overflow: hidden;
}

#particles-js {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: var(--primary-color);
    z-index: 1;
}

.hero-section__content {
    position: relative;
    z-index: 2;
    padding: 20px;
    animation: fadeIn 1s ease-in-out forwards;
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

.hero-section__title {
    font-size: clamp(2.5rem, 5vw, 4.5rem); /* Responsive font size */
    line-height: 1.1;
    margin-bottom: 20px;
    animation: fadeInUp 0.8s ease-out 0.3s forwards;
    opacity: 0;
}

.hero-section__subtitle {
    font-size: clamp(1rem, 2vw, 1.25rem);
    max-width: 650px;
    margin: 0 auto 30px auto;
    opacity: 0.9;
    animation: fadeInUp 0.8s ease-out 0.6s forwards;
    opacity: 0;
}

.hero-section__content .btn {
    animation: fadeInUp 0.8s ease-out 0.9s forwards;
    opacity: 0;
}

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

.hero-section__scroll-down {
    position: absolute;
    bottom: 30px;
    left: 50%;
    transform: translateX(-50%);
    z-index: 3;
    color: var(--text-color-light);
    animation: fadeIn 1s ease-in-out 1.5s forwards;
    opacity: 0;
}

.hero-section__scroll-down i {
    width: 24px;
    height: 24px;
    animation: bounce 2s infinite ease-in-out;
}

@keyframes bounce {
    0%, 20%, 50%, 80%, 100% {
        transform: translateY(0);
    }
    40% {
        transform: translateY(-10px);
    }
    60% {
        transform: translateY(-5px);
    }
}
/* ==================== GENERAL SECTION STYLES ==================== */
.section-title {
    font-size: clamp(2rem, 4vw, 2.5rem);
    text-align: center;
    color: var(--primary-color);
    margin-bottom: 15px;
}

.section-subtitle {
    font-size: 1.1rem;
    text-align: center;
    color: #6c757d;
    max-width: 700px;
    margin-left: auto;
    margin-right: auto;
    margin-bottom: 60px;
}


/* ==================== PRACTICES SECTION ==================== */
.practices-section {
    padding: 100px 0;
    background-color: var(--secondary-color);
}

.practices-section__grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 30px;
}

.practice-card {
    background-color: #ffffff;
    border-radius: 12px;
    padding: 35px 30px;
    text-align: center;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.05);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    border: 1px solid var(--light-gray);
}

.practice-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 12px 25px rgba(10, 37, 64, 0.1);
}

.practice-card__icon-wrapper {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 64px;
    height: 64px;
    border-radius: 50%;
    background-color: #e6f7f6; /* Light teal, derived from accent */
    margin-bottom: 25px;
}

.practice-card__icon-wrapper i {
    width: 32px;
    height: 32px;
    color: var(--accent-color);
}

.practice-card__title {
    font-size: 1.3rem;
    color: var(--primary-color);
    margin-bottom: 15px;
}

.practice-card__description {
    font-size: 15px;
    color: #5a646c;
    line-height: 1.6;
}

/* ==================== HOW IT WORKS SECTION ==================== */
.how-it-works-section {
    padding: 100px 0;
    background-color: #ffffff; /* White background for this section */
}

.how-it-works-section__steps-container {
    display: flex;
    flex-direction: column;
    gap: 80px; /* Space between steps */
    margin-top: 80px;
}

.step-item {
    display: grid;
    grid-template-columns: 1fr 1fr;
    align-items: center;
    gap: 60px;
}

.step-item__image-wrapper {
    width: 100%;
}

.step-item__image {
    width: 100%;
    height: auto;
    border-radius: 12px;
    box-shadow: 0 10px 30px rgba(10, 37, 64, 0.1);
    object-fit: cover;
}

.step-item__content {
    position: relative;
}

/* Reverse layout for odd items */
.step-item--reverse {
    direction: rtl; /* Reverses the flow of grid items */
}

.step-item--reverse > * {
    direction: ltr; /* Resets text direction for content */
}

.step-item__number {
    position: absolute;
    top: -60px;
    left: -40px;
    font-size: 120px;
    font-weight: 700;
    font-family: var(--font-family-headings);
    color: var(--light-gray);
    z-index: -1;
    line-height: 1;
    user-select: none;
}

.step-item--reverse .step-item__number {
    left: auto;
    right: -40px;
}

.step-item__title {
    font-size: 1.8rem;
    color: var(--primary-color);
    margin-bottom: 20px;
}

.step-item__description {
    font-size: 1rem;
    color: #5a646c;
    line-height: 1.7;
}

.step-item__description i {
    color: #7c858d;
    display: block;
    margin-top: 10px;
    font-size: 0.95rem;
}


/* Responsive styles for How It Works section */
@media (max-width: 992px) {
    .step-item {
        gap: 30px;
    }
    .step-item__number {
        font-size: 90px;
        top: -40px;
        left: -20px;
    }
    .step-item--reverse .step-item__number {
        right: -20px;
    }
}

@media (max-width: 768px) {
    .step-item,
    .step-item--reverse {
        grid-template-columns: 1fr;
        direction: ltr; /* Reset direction for stacking */
    }
    .step-item__content {
        order: 1; /* Text comes first */
    }
    .step-item__image-wrapper {
        order: 2; /* Image comes second */
    }
    .step-item__number {
        top: -20px;
        left: -10px;
    }
    .step-item--reverse .step-item__number {
        left: -10px;
        right: auto;
    }
}

/* ==================== FOR ESTONIA SECTION ==================== */
.for-estonia-section {
    padding: 100px 0;
    background-color: var(--secondary-color);
}

.for-estonia-section__layout {
    display: grid;
    grid-template-columns: 0.8fr 1fr;
    align-items: center;
    gap: 60px;
    margin-top: 60px;
}

.for-estonia-section__map-wrapper {
    display: flex;
    justify-content: center;
    align-items: center;
}

.for-estonia-section__map-placeholder {
    width: 100%;
    max-width: 400px;
    aspect-ratio: 1 / 1;
    background-color: #ffffff;
    border: 1px solid var(--light-gray);
    border-radius: 20px;
    display: flex;
    justify-content: center;
    align-items: center;
    position: relative;
    overflow: hidden;
    box-shadow: 0 10px 30px rgba(10, 37, 64, 0.07);
}

.for-estonia-section__map-icon {
    width: 40%;
    height: 40%;
    color: #e0e0e0;
}

.for-estonia-section__map-flag {
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 15px;
    background: linear-gradient(to top, #4891D9 33.33%, #000 33.33%, #000 66.66%, #fff 66.66%);
}

.features-list {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    flex-direction: column;
    gap: 35px;
}

.features-list__item {
    display: flex;
    align-items: flex-start;
    gap: 20px;
}

.features-list__icon-wrapper {
    flex-shrink: 0;
    width: 48px;
    height: 48px;
    border-radius: 12px;
    background-color: #e6f7f6; /* Light teal */
    display: flex;
    align-items: center;
    justify-content: center;
}

.features-list__icon {
    width: 24px;
    height: 24px;
    color: var(--accent-color);
}

.features-list__title {
    font-size: 1.2rem;
    color: var(--primary-color);
    margin: 0 0 5px 0;
}

.features-list__description {
    font-size: 1rem;
    color: #5a646c;
    line-height: 1.6;
}

/* Responsive styles for For Estonia section */
@media (max-width: 992px) {
    .for-estonia-section__layout {
        grid-template-columns: 1fr;
        gap: 50px;
    }
    .for-estonia-section__map-wrapper {
        order: 2;
    }
    .for-estonia-section__features {
        order: 1;
    }
}

/* ==================== TOOLS SECTION ==================== */
.tools-section {
    padding: 100px 0;
    background-color: #ffffff;
}

.tools-section__grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
    gap: 30px;
}

.tool-card {
    background-color: var(--secondary-color);
    border: 1px solid var(--light-gray);
    border-radius: 16px;
    padding: 25px;
    display: flex;
    flex-direction: column;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.tool-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 12px 25px rgba(10, 37, 64, 0.08);
}

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

.tool-card__icon-wrapper {
    width: 50px;
    height: 50px;
    border-radius: 10px;
    background-color: var(--primary-color);
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.tool-card__icon-wrapper i {
    width: 28px;
    height: 28px;
}

.tool-card__title {
    font-size: 1.3rem;
    color: var(--primary-color);
    margin: 0 0 5px 0;
}

.tool-card__category {
    font-size: 0.75rem;
    font-weight: 700;
    color: #fff;
    padding: 4px 10px;
    border-radius: 6px;
    display: inline-block;
}

.tool-card__category--text { background-color: var(--accent-color); }
.tool-card__category--image { background-color: var(--category-image-bg); }
.tool-card__category--productivity { background-color: var(--category-productivity-bg); }
.tool-card__category--presentation { background-color: var(--category-presentation-bg); }

.tool-card__description {
    color: #5a646c;
    line-height: 1.6;
    flex-grow: 1; /* Pushes footer to the bottom */
    margin-bottom: 25px;
}

.btn--secondary {
    background-color: #fff;
    color: var(--primary-color);
    border: 1px solid var(--light-gray);
    width: 100%;
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 8px;
}

.btn--secondary:hover {
    background-color: var(--light-gray);
    color: var(--primary-color);
    border-color: #d3d9df;
    transform: none; /* Override primary button transform */
    box-shadow: none;
}

.btn--secondary i {
    width: 16px;
    transition: transform 0.3s ease;
}

.btn--secondary:hover i {
    transform: translateX(3px);
}

/* ==================== CONTACT SECTION ==================== */
.contact-section {
    padding: 100px 0;
    background-color: var(--secondary-color);
}

.contact-section__layout {
    display: grid;
    grid-template-columns: 1fr 1.5fr;
    gap: 60px;
    margin-top: 60px;
    background-color: #fff;
    padding: 50px;
    border-radius: 20px;
    border: 1px solid var(--light-gray);
    box-shadow: 0 15px 40px rgba(10, 37, 64, 0.06);
}

.contact-section__info-title {
    font-size: 1.8rem;
    color: var(--primary-color);
    margin-bottom: 15px;
}

.contact-section__info-text {
    margin-bottom: 30px;
    line-height: 1.7;
    color: #5a646c;
}

.contact-section__info .site-footer__list {
    gap: 20px;
}
.contact-section__info .site-footer__link,
.contact-section__info .site-footer__text {
    color: var(--text-color);
    opacity: 1;
}
.contact-section__info .site-footer__link:hover {
    color: var(--accent-color);
}


/* Form Styles */
.contact-form {
    display: flex;
    flex-direction: column;
    gap: 20px;
}
.form-group label {
    display: block;
    margin-bottom: 8px;
    font-weight: 600;
    font-size: 0.9rem;
    color: var(--text-color);
}

.contact-form input[type="text"],
.contact-form input[type="email"],
.contact-form input[type="number"],
.contact-form textarea {
    width: 100%;
    padding: 14px;
    border: 1px solid var(--light-gray);
    border-radius: 8px;
    background-color: var(--secondary-color);
    font-size: 1rem;
    font-family: var(--font-family-body);
    transition: all 0.3s ease;
}

.contact-form input:focus, .contact-form textarea:focus {
    outline: none;
    border-color: var(--accent-color);
    background-color: #fff;
    box-shadow: 0 0 0 3px rgba(0, 169, 157, 0.15);
}

.form-group--captcha {
    max-width: 200px;
}

.form-success-message {
    background-color: #e6f7f6;
    border: 1px solid var(--accent-color);
    border-radius: 12px;
    padding: 40px;
    text-align: center;
}
.form-success-message i {
    width: 48px;
    height: 48px;
    color: var(--accent-color);
    margin-bottom: 15px;
}
.form-success-message h4 {
    font-size: 1.5rem;
    color: var(--primary-color);
    margin-bottom: 10px;
}
.form-success-message p {
    color: #5a646c;
}


/* ==================== COOKIE POPUP ==================== */
.cookie-popup {
    position: fixed;
    bottom: 20px;
    left: 20px;
    right: 20px;
    max-width: 500px;
    background-color: rgba(10, 37, 64, 0.9); /* primary-color with opacity */
    backdrop-filter: blur(5px);
    color: var(--text-color-light);
    padding: 20px;
    border-radius: 12px;
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.2);
    z-index: 2000;
    transform: translateY(200%);
    transition: transform 0.6s cubic-bezier(0.16, 1, 0.3, 1);
}
.cookie-popup.is-visible {
    transform: translateY(0);
}

.cookie-popup__content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 20px;
}
.cookie-popup__text {
    margin: 0;
    font-size: 14px;
    line-height: 1.5;
}
.cookie-popup__text a {
    color: var(--accent-color);
    text-decoration: underline;
}
.btn--small {
    padding: 8px 18px;
    font-size: 14px;
    flex-shrink: 0;
}


/* --- Responsive adjustments for contact section --- */
@media (max-width: 992px) {
    .contact-section__layout {
        grid-template-columns: 1fr;
        padding: 30px;
    }
}
@media (max-width: 576px) {
    .cookie-popup {
        left: 10px;
        right: 10px;
        bottom: 10px;
    }
    .cookie-popup__content {
        flex-direction: column;
        text-align: center;
    }
}

/* ==================== POLICY/STATIC PAGES ==================== */
.pages {
    padding: 80px 0;
    background-color: #ffffff;
}

.pages .container {
    max-width: 800px; /* Narrower container for better text readability */
}

.pages h1 {
    font-family: var(--font-family-headings);
    font-size: clamp(2.2rem, 5vw, 2.8rem);
    color: var(--primary-color);
    text-align: center;
    margin-bottom: 40px;
}

.pages h2 {
    font-family: var(--font-family-headings);
    font-size: 1.8rem;
    color: var(--primary-color);
    margin-top: 50px;
    margin-bottom: 20px;
    border-bottom: 2px solid var(--light-gray);
    padding-bottom: 10px;
}

.pages p,
.pages li {
    font-family: var(--font-family-body);
    font-size: 1.05rem; /* Slightly larger font for comfort */
    line-height: 1.8;   /* Increased line height for long text */
    color: var(--text-color);
}

.pages p {
    margin-bottom: 20px;
}

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

.pages li {
    margin-bottom: 15px;
}

.pages li strong {
    font-weight: 700;
    color: var(--primary-color);
}

.pages a {
    color: var(--accent-color);
    text-decoration: underline;
    font-weight: 600;
    transition: color 0.3s ease;
}

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