/* --- VARIABLES --- */
:root {
    --primary-color: #0F172A; /* Глибокий синій */
    --secondary-color: #D4AF37; /* Золотий акцент */
    --bg-light: #F8FAFC;
    --text-main: #334155;
    --text-light: #94A3B8;
    --white: #FFFFFF;
    
    --font-heading: 'Montserrat', sans-serif;
    --font-body: 'Open Sans', sans-serif;

    --container-width: 1200px;
    --header-height: 70px;
    --transition: all 0.3s ease;
}

/* --- RESET & GLOBAL --- */
*, *::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;
    color: var(--text-main);
    background-color: var(--bg-light);
    display: flex;
    flex-direction: column;
    min-height: 100vh;
}

ul {
    list-style: none;
}

a {
    text-decoration: none;
    color: inherit;
    transition: var(--transition);
}

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

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

/* --- HEADER --- */
.header {
    background-color: var(--white);
    height: var(--header-height);
    box-shadow: 0 2px 10px rgba(0,0,0,0.05);
    position: sticky;
    top: 0;
    z-index: 1000;
    display: flex;
    align-items: center;
}

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

/* Logo */
.logo {
    display: flex;
    align-items: center;
    gap: 10px;
    color: var(--primary-color);
    font-family: var(--font-heading);
    font-weight: 700;
    font-size: 1.2rem;
}

.logo__icon {
    width: 32px;
    height: 32px;
    color: var(--primary-color);
}

.logo--footer {
    color: var(--white);
    margin-bottom: 20px;
}
.logo--footer .logo__icon {
    color: var(--white);
}

/* Nav Desktop */
.nav__list {
    display: none; /* Mobile first hidden */
}

/* Burger Button */
.header__burger {
    background: none;
    border: none;
    cursor: pointer;
    color: var(--primary-color);
}

/* Mobile Nav Overlay */
.nav {
    position: fixed;
    top: 0;
    right: -100%;
    width: 80%;
    height: 100vh;
    background-color: var(--white);
    padding: 80px 40px;
    box-shadow: -5px 0 15px rgba(0,0,0,0.1);
    transition: right 0.4s ease;
    z-index: 1001;
}

.nav.is-active {
    right: 0;
}

.nav__list {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.nav__link {
    font-family: var(--font-heading);
    font-weight: 600;
    font-size: 1.1rem;
    color: var(--primary-color);
}

.nav__link:hover {
    color: var(--secondary-color);
}

.nav__link--cta {
    color: var(--secondary-color);
    text-transform: uppercase;
    font-size: 0.9rem;
    letter-spacing: 1px;
}

.nav__close {
    position: absolute;
    top: 20px;
    right: 20px;
    background: none;
    border: none;
    cursor: pointer;
    color: var(--primary-color);
}

/* Desktop styles */
@media (min-width: 992px) {
    .header__burger {
        display: none;
    }

    .nav {
        position: static;
        width: auto;
        height: auto;
        padding: 0;
        background: none;
        box-shadow: none;
    }

    .nav__close {
        display: none;
    }

    .nav__list {
        flex-direction: row;
        gap: 30px;
        align-items: center;
    }
    
    .nav__link {
        font-size: 1rem;
    }

    .nav__link--cta {
        background-color: var(--primary-color);
        color: var(--white);
        padding: 10px 20px;
        border-radius: 4px;
        transition: background 0.3s;
    }

    .nav__link--cta:hover {
        background-color: var(--secondary-color);
        color: var(--white);
    }
}

/* --- MAIN --- */
.main {
    flex: 1;
}

/* --- FOOTER --- */
.footer {
    background-color: var(--primary-color);
    color: var(--white);
    padding: 60px 0 0;
    margin-top: auto;
}

.footer__container {
    display: grid;
    grid-template-columns: 1fr;
    gap: 40px;
    padding-bottom: 40px;
}

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

.footer__desc {
    color: #cbd5e1;
    font-size: 0.9rem;
    max-width: 300px;
}

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

.footer__link {
    color: #cbd5e1;
    font-size: 0.95rem;
}

.footer__link:hover {
    color: var(--secondary-color);
    padding-left: 5px;
}

.footer__contacts {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.footer__contact-item {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    color: #cbd5e1;
    font-size: 0.95rem;
}

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

.footer__bottom {
    border-top: 1px solid rgba(255,255,255,0.1);
    padding: 20px 0;
    text-align: center;
    font-size: 0.85rem;
    color: #64748b;
}

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

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

/* --- UI COMPONENTS --- */
.text-accent {
    color: var(--secondary-color);
}

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    padding: 16px 32px;
    border-radius: 50px;
    font-weight: 600;
    font-family: var(--font-heading);
    transition: var(--transition);
    cursor: pointer;
}

.btn--primary {
    background-color: var(--secondary-color);
    color: var(--white);
    box-shadow: 0 10px 20px rgba(212, 175, 55, 0.3);
}

.btn--primary:hover {
    background-color: #b5952f;
    transform: translateY(-2px);
    box-shadow: 0 15px 25px rgba(212, 175, 55, 0.4);
}

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

/* --- HERO SECTION --- */
.hero {
    position: relative;
    padding: 60px 0 100px;
    overflow: hidden;
    min-height: calc(100vh - var(--header-height));
    display: flex;
    align-items: center;
}

/* Background blob */
.hero__bg-element {
    position: absolute;
    top: -20%;
    right: -10%;
    width: 600px;
    height: 600px;
    background: radial-gradient(circle, rgba(212,175,55,0.1) 0%, rgba(255,255,255,0) 70%);
    border-radius: 50%;
    z-index: -1;
}

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

/* Content */
.hero__content {
    max-width: 600px;
}

.hero__badge {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background-color: rgba(15, 23, 42, 0.05);
    padding: 8px 16px;
    border-radius: 20px;
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--primary-color);
    margin-bottom: 24px;
}

.hero__badge-icon {
    width: 16px;
    height: 16px;
    color: var(--secondary-color);
}

.hero__title {
    font-size: 2.5rem;
    line-height: 1.2;
    color: var(--primary-color);
    margin-bottom: 24px;
}

.hero__desc {
    font-size: 1.1rem;
    color: #475569;
    margin-bottom: 40px;
    max-width: 480px;
}

.hero__actions {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.hero__info {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 0.9rem;
    color: #64748b;
    font-weight: 500;
}

/* Visual & Parallax */
.hero__visual {
    position: relative;
    width: 100%;
    height: 400px;
    display: flex;
    justify-content: center;
    align-items: center;
}

.hero__image-wrapper {
    width: 100%;
    height: 100%;
    border-radius: 20px;
    overflow: hidden;
    box-shadow: 20px 20px 60px rgba(0,0,0,0.1);
    position: relative;
    z-index: 1;
}

.hero__img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

/* Floating Cards */
.hero__card {
    position: absolute;
    background: var(--white);
    padding: 15px 20px;
    border-radius: 12px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.08);
    display: flex;
    align-items: center;
    gap: 15px;
    z-index: 2;
    min-width: 180px;
}

.hero__card-icon {
    width: 40px;
    height: 40px;
    background-color: rgba(212, 175, 55, 0.1);
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--secondary-color);
}

.hero__card-title {
    display: block;
    font-weight: 700;
    color: var(--primary-color);
    font-size: 1.1rem;
}

.hero__card-sub {
    font-size: 0.8rem;
    color: #94a3b8;
}

.hero__card--1 {
    top: 40px;
    left: -20px;
    animation: float 6s ease-in-out infinite;
}

.hero__card--2 {
    bottom: 40px;
    right: -20px;
    animation: float 7s ease-in-out infinite reverse;
}

@keyframes float {
    0% { transform: translateY(0px); }
    50% { transform: translateY(-15px); }
    100% { transform: translateY(0px); }
}

/* Desktop Media Query */
@media (min-width: 992px) {
    .hero__container {
        grid-template-columns: 1fr 1fr;
    }

    .hero__title {
        font-size: 3.5rem;
    }

    .hero__visual {
        height: 500px;
    }

    .hero__actions {
        flex-direction: row;
        align-items: center;
    }
}
/* --- GLOBAL SECTION STYLES --- */
.section-header {
    text-align: center;
    max-width: 700px;
    margin: 0 auto 60px;
}

.section-badge {
    display: inline-block;
    font-size: 0.9rem;
    text-transform: uppercase;
    letter-spacing: 2px;
    color: var(--secondary-color);
    margin-bottom: 10px;
    font-weight: 700;
}

.section-title {
    font-size: 2rem;
    color: var(--primary-color);
    margin-bottom: 20px;
    line-height: 1.3;
}

.section-desc {
    color: #64748b;
    font-size: 1.1rem;
}

/* --- SERVICES SECTION --- */
.services {
    padding: 100px 0;
    background-color: var(--white);
}

.services__grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 30px;
}

.service-card {
    background: var(--bg-light);
    padding: 40px 30px;
    border-radius: 16px;
    transition: var(--transition);
    border: 1px solid transparent;
    display: flex;
    flex-direction: column;
    align-items: flex-start;
}

.service-card:hover {
    background: var(--white);
    transform: translateY(-10px);
    box-shadow: 0 20px 40px rgba(0,0,0,0.08);
    border-color: rgba(212, 175, 55, 0.2);
}

.service-card__icon-box {
    width: 60px;
    height: 60px;
    background-color: var(--white);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 25px;
    box-shadow: 0 5px 15px rgba(0,0,0,0.05);
    transition: var(--transition);
}

.service-card:hover .service-card__icon-box {
    background-color: var(--secondary-color);
    transform: rotateY(180deg);
}

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

.service-card:hover .service-card__icon {
    color: var(--white);
}

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

.service-card__text {
    font-size: 0.95rem;
    color: #64748b;
    line-height: 1.6;
}

/* Tablet & Desktop */
@media (min-width: 768px) {
    .services__grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (min-width: 1024px) {
    .services__grid {
        grid-template-columns: repeat(4, 1fr);
    }
    
    .section-title {
        font-size: 2.5rem;
    }
}

/* --- EXPERTISE SECTION --- */
.expertise {
    padding: 100px 0;
    /* Фон залишається --bg-light (стандартний для body), 
       щоб створити контраст з білою секцією Services */
    overflow: hidden; 
}

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

/* Visual Side */
.expertise__visual {
    position: relative;
    order: 2; /* На мобільних картинка знизу */
}

.expertise__img-box {
    position: relative;
    border-radius: 20px;
    overflow: visible; /* Щоб плаваючий елемент міг виступати */
}

.expertise__img {
    width: 100%;
    border-radius: 20px;
    box-shadow: 0 20px 40px rgba(0,0,0,0.1);
    position: relative;
    z-index: 1;
}

/* Floating Card Decoration */
.expertise__float-card {
    position: absolute;
    bottom: -30px;
    left: -30px; /* Виступає вліво */
    background: var(--white);
    padding: 20px;
    border-radius: 12px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.15);
    display: flex;
    align-items: center;
    gap: 15px;
    z-index: 2;
    max-width: 220px;
    animation: float-static 4s ease-in-out infinite;
}

@keyframes float-static {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-10px); }
}

.expertise__float-icon {
    width: 40px;
    height: 40px;
    background-color: var(--primary-color);
    color: var(--secondary-color);
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.expertise__float-num {
    display: block;
    font-weight: 700;
    font-size: 1.2rem;
    color: var(--primary-color);
    line-height: 1;
}

.expertise__float-desc {
    font-size: 0.8rem;
    color: #64748b;
}

/* Content Side */
.expertise__content {
    order: 1;
}

.expertise__desc {
    margin-bottom: 30px;
}

.expertise__list {
    display: flex;
    flex-direction: column;
    gap: 15px;
    margin-bottom: 40px;
}

.expertise__item {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    color: var(--text-main);
}

.expertise__check {
    width: 20px;
    height: 20px;
    color: var(--secondary-color);
    flex-shrink: 0;
    margin-top: 3px;
}

/* Desktop styles */
@media (min-width: 992px) {
    .expertise__container {
        grid-template-columns: 1fr 1fr;
    }

    .expertise__visual {
        order: 1; /* На десктопі картинка зліва */
        padding-right: 30px;
    }
    
    .expertise__content {
        order: 2;
    }

    .expertise__float-card {
        right: -30px; /* На десктопі картка справа знизу */
        left: auto;
        bottom: 40px;
    }
}

/* --- BLOG SECTION --- */
.blog {
    padding: 100px 0;
    background-color: var(--white);
}

.blog__grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 30px;
}

.blog-card {
    background-color: var(--white);
    border-radius: 16px;
    overflow: hidden;
    box-shadow: 0 10px 30px rgba(0,0,0,0.05);
    transition: var(--transition);
    border: 1px solid #f1f5f9;
    display: flex;
    flex-direction: column;
}

.blog-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 20px 40px rgba(0,0,0,0.1);
}

/* Image Area */
.blog-card__img-wrapper {
    position: relative;
    height: 240px;
    overflow: hidden;
}

.blog-card__img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.6s ease;
}

.blog-card:hover .blog-card__img {
    transform: scale(1.08);
}

.blog-card__tag {
    position: absolute;
    top: 20px;
    left: 20px;
    background-color: var(--white);
    color: var(--primary-color);
    padding: 6px 12px;
    border-radius: 6px;
    font-size: 0.75rem;
    font-weight: 700;
    text-transform: uppercase;
    box-shadow: 0 4px 10px rgba(0,0,0,0.1);
}

/* Content Area */
.blog-card__content {
    padding: 25px;
    display: flex;
    flex-direction: column;
    flex: 1;
}

.blog-card__meta {
    display: flex;
    gap: 15px;
    font-size: 0.85rem;
    color: #94a3b8;
    margin-bottom: 15px;
}

.blog-card__meta span {
    display: flex;
    align-items: center;
    gap: 5px;
}

.blog-card__icon {
    width: 14px;
    height: 14px;
}

.blog-card__title {
    font-family: var(--font-heading);
    font-size: 1.25rem;
    line-height: 1.4;
    margin-bottom: 15px;
    font-weight: 700;
}

.blog-card__title a {
    color: var(--primary-color);
    transition: color 0.3s;
}

.blog-card__title a:hover {
    color: var(--secondary-color);
}

.blog-card__excerpt {
    font-size: 0.95rem;
    color: #64748b;
    margin-bottom: 20px;
    flex: 1; /* Pushes link to bottom */
}

.blog-card__link {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    color: var(--secondary-color);
    font-weight: 600;
    font-size: 0.95rem;
    transition: gap 0.3s;
}

.blog-card__link i {
    width: 16px;
    height: 16px;
}

.blog-card__link:hover {
    gap: 12px; /* Arrow moves right */
}

/* Responsive Grid */
@media (min-width: 768px) {
    .blog__grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (min-width: 1024px) {
    .blog__grid {
        grid-template-columns: repeat(3, 1fr);
    }
}

/* --- CONTACT SECTION --- */
.contact {
    padding: 100px 0;
    background-color: var(--primary-color); /* Темний фон для контрасту */
    background-image: linear-gradient(135deg, var(--primary-color) 0%, #1e293b 100%);
}

.contact__container {
    display: flex;
    justify-content: center;
}

.contact__wrapper {
    background-color: var(--white);
    padding: 50px 40px;
    border-radius: 24px;
    width: 100%;
    max-width: 600px;
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.25);
}

.contact__header {
    margin-bottom: 40px;
}

/* Form Styles */
.contact__form {
    display: flex; /* Flex, щоб легко приховати при успіху */
    flex-direction: column;
    gap: 20px;
}

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

.form-label {
    font-size: 0.9rem;
    font-weight: 600;
    color: var(--primary-color);
}

.input-wrapper {
    position: relative;
}

.input-icon {
    position: absolute;
    left: 15px;
    top: 50%;
    transform: translateY(-50%);
    width: 20px;
    height: 20px;
    color: #94a3b8;
    transition: color 0.3s;
}

.form-input {
    width: 100%;
    padding: 14px 14px 14px 45px; /* місце під іконку */
    border: 2px solid #e2e8f0;
    border-radius: 12px;
    font-family: var(--font-body);
    font-size: 1rem;
    color: var(--text-main);
    transition: all 0.3s;
    outline: none;
}

.form-input:focus {
    border-color: var(--secondary-color);
    box-shadow: 0 0 0 4px rgba(212, 175, 55, 0.1);
}

.form-input:focus + .input-icon,
.input-wrapper:focus-within .input-icon {
    color: var(--secondary-color);
}

/* Checkbox */
.form-checkbox {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    font-size: 0.85rem;
    color: #64748b;
    margin-top: 10px;
}

.form-checkbox input {
    margin-top: 3px;
    cursor: pointer;
    accent-color: var(--secondary-color);
}

.form-checkbox label {
    cursor: pointer;
}

/* Captcha */
.captcha-question {
    font-weight: 700;
    color: var(--secondary-color);
    font-size: 1.1rem;
}

/* Button Full Width */
.btn--full {
    width: 100%;
    margin-top: 10px;
}

/* Messages */
.form-message {
    font-size: 0.9rem;
    padding: 10px;
    border-radius: 8px;
    display: none; /* Приховано за замовчуванням */
}

.form-message.error {
    background-color: #fee2e2;
    color: #991b1b;
    border: 1px solid #fca5a5;
    display: none; /* JS покаже це */
}

/* Success State */
.contact__success {
    display: none; /* Приховано за замовчуванням */
    flex-direction: column;
    align-items: center;
    text-align: center;
    padding: 40px 0;
    animation: fadeIn 0.5s ease;
}

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

.success-icon {
    width: 80px;
    height: 80px;
    color: #22c55e;
    margin-bottom: 20px;
}

.success-icon svg {
    width: 100%;
    height: 100%;
}

.success-title {
    font-size: 1.8rem;
    color: var(--primary-color);
    margin-bottom: 10px;
}

.success-text {
    color: #64748b;
}

/* Responsive */
@media (max-width: 480px) {
    .contact__wrapper {
        padding: 30px 20px;
    }
}

/* --- COOKIE POPUP --- */
.cookie-popup {
    position: fixed;
    bottom: 30px;
    right: 30px;
    background-color: var(--white);
    padding: 20px 25px;
    border-radius: 12px;
    box-shadow: 0 10px 40px rgba(0,0,0,0.15);
    z-index: 9999;
    max-width: 400px;
    border-left: 5px solid var(--secondary-color);
    
    /* Animation state controlled by JS class */
    opacity: 0; 
    transform: translateY(20px);
    pointer-events: none;
    transition: all 0.5s ease;
}

.cookie-popup.is-visible {
    opacity: 1;
    transform: translateY(0);
    pointer-events: all;
}

.cookie-popup__content {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

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

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

.cookie-popup__btn {
    padding: 10px 20px;
    font-size: 0.9rem;
    align-self: flex-start;
}

/* --- POLICY PAGES STYLING (.pages) --- */
/* Стилі для privacy.html, terms.html тощо */
.pages {
    padding: 60px 0 100px;
    background-color: var(--white);
}

.pages .container {
    max-width: 800px; /* Вужчий контейнер для зручного читання тексту */
}

.pages h1 {
    font-family: var(--font-heading);
    color: var(--primary-color);
    font-size: 2.5rem;
    margin-bottom: 40px;
    border-bottom: 2px solid #f1f5f9;
    padding-bottom: 20px;
}

.pages h2 {
    font-family: var(--font-heading);
    color: var(--primary-color);
    font-size: 1.5rem;
    margin: 40px 0 20px;
}

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

.pages ul {
    margin-bottom: 30px;
    padding-left: 20px;
}

.pages li {
    position: relative;
    padding-left: 25px;
    margin-bottom: 12px;
    color: #475569;
    line-height: 1.6;
}

/* Custom bullet point */
.pages li::before {
    content: '';
    position: absolute;
    left: 0;
    top: 10px;
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background-color: var(--secondary-color);
}

.pages a {
    color: var(--secondary-color);
    text-decoration: underline;
    transition: color 0.2s;
}

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