/* =============================================================
   Hexoria Forex — main.css
   Palette: Petrol + Terracotta (muted, finance-grade)
   ============================================================= */

@font-face {
    font-family: 'Poppins';
    font-style: normal;
    font-weight: 300;
    font-display: swap;
    src: url(/fonts/Poppins-Light.woff2) format("woff2"), url(/fonts/Poppins-Light.woff) format("woff");
}
@font-face {
    font-family: 'Poppins';
    font-style: normal;
    font-weight: 400;
    font-display: swap;
    src: url(/fonts/Poppins-Regular.woff2) format("woff2"), url(/fonts/Poppins-Regular.woff) format("woff");
}
@font-face {
    font-family: 'Poppins';
    font-style: normal;
    font-weight: 500;
    font-display: swap;
    src: url(/fonts/Poppins-SemiBold.woff2) format("woff2"), url(/fonts/Poppins-SemiBold.woff) format("woff");
}
@font-face {
    font-family: 'Poppins';
    font-style: normal;
    font-weight: 600;
    font-display: swap;
    src: url(/fonts/Poppins-SemiBold.woff2) format("woff2"), url(/fonts/Poppins-SemiBold.woff) format("woff");
}
@font-face {
    font-family: 'Poppins';
    font-style: normal;
    font-weight: 700;
    font-display: swap;
    src: url(/fonts/Poppins-Bold.woff2) format("woff2"), url(/fonts/Poppins-Bold.woff) format("woff");
}
@font-face {
    font-family: 'Poppins';
    font-style: normal;
    font-weight: 800;
    font-display: swap;
    src: url(/fonts/Poppins-ExtraBold.woff2) format("woff2"), url(/fonts/Poppins-ExtraBold.woff) format("woff");
}

:root {
    --color-primary: #2c5560;
    --color-primary-dark: #173139;
    --color-primary-darker: #0d2026;
    --color-accent: #9c5e35;          /* deeper terracotta, AA contrast on white text */
    --color-accent-hover: #7a4623;
    --color-accent-soft: #c08763;     /* lighter terracotta for borders / icon backgrounds */
    --color-accent-dark: #7a4623;
    --color-accent-light: #d6a98d;    /* for text on dark hero */
    --color-bg: #f7f4f0;
    --color-bg-alt: #ebe4db;
    --color-bg-card: #ffffff;
    --color-text: #1a2326;
    --color-text-light: #45575c;
    --color-text-muted: #6f7a7d;
    --color-text-on-dark: #f1ebe4;
    --color-text-on-dark-muted: #b7afa5;
    --color-border: #d8d1c7;
    --color-border-dark: #345764;
    --color-shadow: 0 6px 24px rgba(13, 32, 38, 0.08);
    --color-shadow-strong: 0 10px 30px rgba(13, 32, 38, 0.18);

    /* form vars used by intl-tel-input integration */
    --form-primary: var(--color-accent);
    --form-primary-dark: var(--color-accent-dark);
    --form-success: #2e8b57;
    --form-danger: #c0392b;
    --form-warning: #d4a435;
    --form-white: #ffffff;
    --form-black: #1a2326;
    --form-gray: #6f7a7d;
    --form-radius: 10px;
    --form-radius-small: 8px;
    --form-anim-fast: 200ms ease;
    --form-focus-ring: 0 0 0 3px rgba(192, 135, 99, 0.35);
    --form-focus-gray: 0 0 0 3px rgba(111, 122, 125, 0.25);
    --form-focus-success: 0 0 0 3px rgba(46, 139, 87, 0.25);
    --form-focus-danger: 0 0 0 3px rgba(192, 57, 43, 0.25);
    --form-focus-warning: 0 0 0 3px rgba(212, 164, 53, 0.25);
    --form-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
    --form-shadow-hover: 0 6px 18px rgba(0, 0, 0, 0.18);
}

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

ul, ol { list-style: none; }
a { text-decoration: none; color: inherit; }
button, input, textarea, select { font: inherit; border: none; background: none; outline: none; color: inherit; }
img { max-width: 100%; display: block; }
table { border-collapse: collapse; border-spacing: 0; }

html { scroll-behavior: smooth; }

body {
    font-family: Poppins, system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
    line-height: 1.5;
    background: var(--color-bg);
    color: var(--color-text);
    -webkit-font-smoothing: antialiased;
    text-rendering: optimizeLegibility;
}

body.no-transition * { transition: none !important; }
body.no-scroll { overflow: hidden; }

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

.flex-list { display: flex; flex-wrap: wrap; gap: 20px; }

.light-text { font-size: 16px; font-weight: 400; line-height: 1.55; }

.section-title {
    text-align: center;
    font-weight: 600;
    font-size: 28px;
    line-height: 1.25;
    color: var(--color-primary-dark);
    letter-spacing: -0.01em;
}

h1, h2, h3, h4 { color: var(--color-primary-dark); }

/* ----------- HEADER ----------- */
.header {
    background: #ffffff;
    border-bottom: 1px solid var(--color-border);
    width: 100%;
    z-index: 1000;
    top: 0;
    position: sticky;
    box-shadow: 0 2px 10px rgba(13, 32, 38, 0.04);
}

.header-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 14px 16px;
}

.header-logo {
    color: var(--color-primary-dark);
    font-size: 20px;
    font-weight: 700;
    line-height: 1.2;
    display: flex;
    align-items: center;
    gap: 10px;
}

.header-img { max-width: 34px; height: auto; }

.header-button {
    color: var(--color-accent-dark);
    text-align: center;
    font-size: 12px;
    font-weight: 600;
    line-height: 1.2;
    padding: 8px 14px;
    border-radius: 8px;
    border: 1px solid var(--color-accent);
    background: rgba(192, 135, 99, 0.08);
    margin: 0 12px 0 auto;
    transition: background 0.25s ease, color 0.25s ease;
    white-space: nowrap;
}

.header-button:hover { background: var(--color-accent); color: #fff; }

.header-nav { display: none; }

.nav-link {
    font-size: 15px;
    font-weight: 500;
    line-height: 1.4;
    color: var(--color-primary-dark);
    border-bottom: 2px solid transparent;
    padding: 4px 0;
    transition: color 0.25s ease, border-color 0.25s ease;
}

.active-link {
    color: var(--color-accent-dark);
    border-bottom-color: var(--color-accent);
}

.burger {
    width: 30px;
    height: 22px;
    cursor: pointer;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    background: transparent;
    border: none;
    padding: 0;
}
.burger span {
    display: block;
    height: 3px;
    width: 100%;
    background: var(--color-primary-dark);
    border-radius: 2px;
    transition: transform 0.3s ease, opacity 0.3s ease;
}
.burger.active span:nth-child(1) { transform: rotate(45deg) translate(6px, 6px); }
.burger.active span:nth-child(2) { opacity: 0; }
.burger.active span:nth-child(3) { transform: rotate(-45deg) translate(6px, -6px); }

.modal {
    position: fixed;
    top: 0; left: 0;
    width: 100%;
    height: 100vh;
    background: var(--color-primary-darker);
    transform: translateY(-100%);
    transition: transform 0.4s ease;
    z-index: 999;
    padding: 80px 20px 20px;
    display: flex;
    flex-direction: column;
    align-items: center;
}
.modal.active { transform: translateY(0); }
.modal .header-logo { color: var(--color-text-on-dark); margin-bottom: 30px; }
.modal-content {
    display: flex;
    flex-direction: column;
    gap: 24px;
    align-items: center;
    color: var(--color-text-on-dark);
}
.modal-content .nav-link { color: var(--color-text-on-dark); font-size: 18px; }
.modal-content .active-link { color: var(--color-accent-light); border-bottom-color: var(--color-accent); }
.modal-button {
    margin-top: 32px;
    font-weight: 600;
    text-align: center;
    border: 1px solid var(--color-accent);
    color: var(--color-accent-light);
    background: rgba(192, 135, 99, 0.1);
    padding: 12px 28px;
    border-radius: 8px;
}

/* ----------- TOP BAR ----------- */
.top-bar {
    background: var(--color-accent);
    color: #fff;
    padding: 8px 12px;
    text-align: center;
    font-size: 14px;
    font-weight: 600;
}

/* ----------- HERO ----------- */
.hero-block {
    background: linear-gradient(135deg, var(--color-primary-dark) 0%, var(--color-primary-darker) 100%);
    color: var(--color-text-on-dark);
    padding: 40px 0 30px;
}
.hero-container { padding: 0 16px; }
.hero-title {
    font-size: 32px;
    font-weight: 700;
    line-height: 1.18;
    margin: 0 0 18px 0;
    color: #ffffff;
    letter-spacing: -0.015em;
}
.hero-text { margin: 0 0 22px 0; color: var(--color-text-on-dark); }
.hero-text strong { color: var(--color-accent-light); font-weight: 600; }

.hero-cta-row { display: flex; flex-wrap: wrap; gap: 12px; margin: 0 0 24px 0; }
.hero-cta-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 13px 26px;
    border-radius: 8px;
    background: var(--color-accent);
    color: #ffffff;
    font-weight: 700;
    font-size: 16px;
    border: 1px solid var(--color-accent);
    transition: background 0.25s ease, transform 0.2s ease;
    cursor: pointer;
}
.hero-cta-btn:hover { background: var(--color-accent-dark); transform: translateY(-1px); }
.hero-cta-btn.secondary { background: transparent; color: var(--color-accent-light); border-color: var(--color-accent-light); }
.hero-cta-btn.secondary:hover { background: var(--color-accent-light); color: var(--color-primary-darker); }

.hero-reviews { display: flex; gap: 18px; align-items: center; margin: 0 0 22px 0; }
.reviews-left { flex: 0 0 auto; }
.review-avatars { width: 132px; height: auto; border-radius: 24px; }
.reviews-right { flex: 1; min-width: 0; }
.reviews-text { font-weight: 600; margin: 0 0 6px 0; font-size: 15px; }
.reviews-stars { display: flex; }
.review-stars { width: 130px; height: auto; }

.hero-flags { margin: 0 0 28px 0; }
.flags-text { font-size: 14px; margin: 0 0 10px 0; color: var(--color-text-on-dark-muted); }
.flags-imgs { display: flex; gap: 16px; }
.flags-img { width: 30px; height: 22px; object-fit: cover; border-radius: 2px; flex: 0 0 auto; }

.hero-form-wrap { background: #ffffff; border-radius: 14px; padding: 22px; box-shadow: var(--color-shadow-strong); }
.form-title {
    text-align: center;
    font-size: 19px;
    font-weight: 600;
    line-height: 1.3;
    margin: 0 0 16px 0;
    color: var(--color-primary-dark);
}
.form-body { padding: 0; }

.form-input {
    width: 100%;
    padding: 12px 14px;
    height: 48px;
    border-radius: 8px;
    background: #fafaf8;
    color: var(--color-text);
    margin: 0 0 12px 0;
    border: 1px solid var(--color-border);
    font-size: 15px;
    transition: border-color 0.25s ease, box-shadow 0.25s ease;
}
.form-input::placeholder { color: var(--color-text-muted); }
.form-input:focus { border-color: var(--color-accent); box-shadow: var(--form-focus-ring); background: #fff; }

.form-button {
    width: 100%;
    padding: 13px 16px;
    margin: 6px 0 12px 0;
    background: var(--color-accent);
    color: #ffffff;
    border: 1px solid var(--color-accent);
    border-radius: 8px;
    font-size: 16px;
    font-weight: 700;
    cursor: pointer;
    transition: background 0.25s ease, transform 0.2s ease;
    letter-spacing: 0.01em;
}
.form-button:hover { background: var(--color-accent-dark); transform: translateY(-1px); }

.form-text { color: var(--color-text-muted); text-align: center; font-size: 12px; line-height: 1.45; }
.form-text a { color: var(--color-accent-dark); text-decoration: underline; }

/* partners */
.partners-container { padding: 32px 16px 0; }
.partners-title { text-align: center; font-size: 18px; font-weight: 600; color: var(--color-text-on-dark-muted); margin: 0 0 18px 0; }
.partners-imgs { justify-content: center; align-items: center; gap: 24px; }
.partners-img { max-height: 30px; width: auto; transition: opacity 0.25s ease; }
.partners-img:hover { opacity: 0.85; }

/* ----------- SECTIONS GENERIC ----------- */
.services-block, .feedback-block, .techno-block, .advantages-block, .faq-block, .info-block {
    padding: 48px 0;
}

.services-block, .advantages-block, .info-block { background: var(--color-bg); }
.feedback-block { background: var(--color-bg-alt); }
.faq-block { background: var(--color-bg); }
.techno-block { background: linear-gradient(180deg, var(--color-primary-dark) 0%, var(--color-primary) 100%); color: var(--color-text-on-dark); }

.services-title, .feedback-title, .techno-title, .advantages-title, .faq-block-title {
    margin: 0 0 32px 0;
}

.techno-title { color: #ffffff; }
.techno-text { text-align: center; color: var(--color-text-on-dark); margin: 0 auto 32px; max-width: 880px; }

/* service cards */
.services-cards { gap: 18px; }
.service-card {
    background: var(--color-bg-card);
    border: 1px solid var(--color-border);
    border-radius: 12px;
    padding: 24px 20px;
    text-align: left;
    box-shadow: var(--color-shadow);
}
.service-card-img { width: 60px; height: 60px; margin: 0 0 16px 0; }
.service-card-title {
    font-size: 19px;
    font-weight: 600;
    line-height: 1.3;
    margin: 0 0 12px 0;
    color: var(--color-primary-dark);
}
.service-card-text { color: var(--color-text-light); }

/* feedback cards */
.feedback-cards { gap: 18px; }
.feedback-card {
    background: var(--color-bg-card);
    border: 1px solid var(--color-border);
    padding: 22px 18px;
    border-radius: 12px;
    box-shadow: var(--color-shadow);
}
.feedback-card-top {
    display: flex;
    justify-content: space-between;
    margin: 0 0 16px 0;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
}
.user-info { display: flex; gap: 12px; align-items: center; }
.feedback-card-img { width: 48px; height: 48px; border-radius: 50%; }
.client-name { font-size: 16px; font-weight: 700; color: var(--color-primary-dark); margin: 0 0 4px 0; }
.feedback-stars { width: 100px; }
.feedback-result {
    display: flex;
    background: var(--color-bg-alt);
    border-radius: 8px;
    padding: 8px 10px;
    gap: 12px;
}
.result-left { border-right: 1px solid var(--color-border); padding-right: 12px; }
.result-text { color: var(--color-accent-dark); font-weight: 600; font-size: 13px; margin: 0 0 2px 0; }
.result-num { color: var(--color-primary-dark); font-weight: 700; font-size: 16px; }
.feedback-card-text { color: var(--color-text-light); }

/* techno line */
.techno-line {
    --s: 36px;
    --d: 22s;
    --n: 3;
    display: flex;
    overflow: hidden;
    margin-top: 8px;
    padding: 12px 0;
    background: linear-gradient(90deg, rgba(192, 135, 99, 0) 0%, rgba(192, 135, 99, 0.6) 50%, rgba(192, 135, 99, 0) 100%);
}
.techno-line img {
    width: var(--s);
    height: var(--s);
    flex: 0 0 var(--s);
    margin: 0 18px;
    filter: brightness(0) invert(1) opacity(0.9);
}

/* advantages */
.advantages-cards { gap: 18px; }
.advantage-card {
    background: var(--color-bg-card);
    border: 1px solid var(--color-border);
    border-radius: 12px;
    padding: 24px 20px;
    box-shadow: var(--color-shadow);
}
.advantage-card-img { width: 60px; height: 60px; margin: 0 0 14px 0; }
.advantage-card-title {
    font-size: 19px;
    font-weight: 600;
    line-height: 1.3;
    margin: 0 0 12px 0;
    color: var(--color-primary-dark);
}
.advantage-card-text { color: var(--color-text-light); }
.advantages-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    margin: 30px auto 0;
    padding: 14px 32px;
    background: var(--color-accent);
    color: #ffffff;
    border-radius: 8px;
    font-weight: 600;
    text-align: center;
    border: 1px solid var(--color-accent);
    transition: background 0.25s ease, transform 0.2s ease;
}
.advantages-button:hover { background: var(--color-accent-dark); color: #fff; transform: translateY(-1px); }

/* faq */
.faq-container { max-width: 920px; margin: 0 auto; }
.faq-body { border-bottom: 1px solid var(--color-border); }
.faq-item { cursor: pointer; }
.faq-question {
    width: 100%;
    padding: 20px 0;
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 12px;
    text-align: left;
}
.faq-question-title { font-weight: 600; font-size: 17px; line-height: 1.4; color: var(--color-primary-dark); margin: 0; }
.faq-icon {
    width: 26px;
    height: 26px;
    flex: 0 0 26px;
    transition: transform 0.3s ease;
    border-radius: 50%;
    background: var(--color-bg-alt);
    display: inline-flex;
    align-items: center;
    justify-content: center;
}
.faq-icon img { width: 14px; height: 14px; }
.faq-item.active .faq-icon { transform: rotate(180deg); }
.question-answer { max-height: 0; overflow: hidden; transition: max-height 0.35s ease; color: var(--color-text-light); }
.faq-item.active .question-answer { max-height: 540px; padding: 0 0 18px 0; }

/* info pages */
.info-container { padding: 24px 16px; max-width: 920px; margin: 0 auto; }
.info-head-title { margin: 0 0 24px 0; }
.info-title { font-size: 19px; font-weight: 600; margin: 24px 0 10px; color: var(--color-primary-dark); }
.info-block p { margin: 0 0 14px 0; color: var(--color-text-light); }
.info-link { color: var(--color-accent-dark); text-decoration: underline; }
.info-list { list-style: disc; padding: 0 0 0 22px; margin: 12px 0; color: var(--color-text-light); }
.info-list li { padding: 4px 0; }

/* sign-up / sign-in / contact page form */
.page-form-block {
    padding: 60px 16px;
    background: linear-gradient(135deg, var(--color-primary-dark) 0%, var(--color-primary-darker) 100%);
    color: var(--color-text-on-dark);
}
.page-form-block .container { max-width: 540px; }
.page-form-block .form-title { color: var(--color-primary-dark); font-size: 22px; }
.page-form-block .hero-form-wrap { padding: 28px 22px; }
.page-form-intro { text-align: center; color: var(--color-text-on-dark); max-width: 640px; margin: 0 auto 28px; }

/* contact info box */
.contact-info {
    background: var(--color-bg-card);
    border: 1px solid var(--color-border);
    padding: 22px;
    border-radius: 12px;
    margin: 24px auto 0;
    box-shadow: var(--color-shadow);
    color: var(--color-text-light);
}
.contact-info a { color: var(--color-accent-dark); text-decoration: underline; }
.contact-info strong { color: var(--color-primary-dark); }

/* ----------- FOOTER ----------- */
.footer { background: var(--color-primary-darker); color: var(--color-text-on-dark); padding: 40px 0 24px; }
.footer-container { padding: 0 16px; }
.footer-logo { color: #ffffff; font-size: 20px; font-weight: 700; display: flex; align-items: center; gap: 10px; margin: 0 0 24px 0; }
.footer-img { max-width: 32px; }
.footer-links { display: flex; flex-direction: column; gap: 8px; margin: 0 0 20px 0; }
.footer-links a { font-size: 14px; color: var(--color-text-on-dark-muted); }
.footer-links a:hover { color: var(--color-accent-light); }
.footer-text { font-size: 12px; line-height: 1.55; margin: 0 0 14px 0; color: var(--color-text-on-dark-muted); }
.footer-copyright { color: var(--color-text-on-dark-muted); font-size: 12px; margin-top: 8px; }
.footer-copyright a { color: var(--color-accent-light); }
.disclaimer-block { padding: 28px 16px 0; background: var(--color-primary-darker); }
.disclaimer-block .container { color: var(--color-text-on-dark-muted); font-size: 12px; line-height: 1.5; max-width: 1200px; }

/* ----------- intl-tel-input integration ----------- */
.iti { width: 100% !important; display: block !important; }
.iti__country-name { color: #000; }
.registration-form input[type="tel"].phone,
.registration-form input[type="tel"][name="phone"] {
    padding-left: 90px !important;
    height: 48px !important;
}

.registration-form input.valid {
    background: #ecf6ef !important;
    border-color: var(--form-success) !important;
    box-shadow: var(--form-focus-success) !important;
}
.registration-form input.invalid {
    background: #fdeceb !important;
    border-color: var(--form-danger) !important;
    box-shadow: var(--form-focus-danger) !important;
}

/* small loader bg uses accent palette */
.pageloader {
    position: fixed;
    inset: 0;
    z-index: 9999;
    background: url("/images/loader.gif") center no-repeat var(--color-bg);
    display: none;
}

/* helper */
.visually-hidden {
    position: absolute; width: 1px; height: 1px;
    padding: 0; margin: -1px; overflow: hidden;
    clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}

/* ----------- RESPONSIVE ----------- */
@media (min-width: 600px) {
    .hero-title { font-size: 36px; }
    .hero-form-wrap { max-width: 460px; margin: 0 auto; }
}

@media (min-width: 800px) {
    .header-nav { display: flex; gap: 28px; align-items: center; margin-left: 48px; }
    .header-container { padding: 16px 28px; }
    .burger { display: none; }
    .modal { display: none !important; }
    .footer-container { display: flex; justify-content: space-between; gap: 40px; padding: 0 28px; }
    .footer-left { flex: 0 0 auto; min-width: 220px; }
    .footer-right { flex: 1; }
    .footer-links { margin: 0 0 16px 0; }
}

@media (min-width: 900px) {
    .container { max-width: 1240px; padding: 20px 28px; }
    .services-cards, .feedback-cards, .advantages-cards { gap: 22px; }
    .service-card, .advantage-card { flex: 1 1 calc(50% - 11px); }
    .feedback-card { flex: 1 1 calc(50% - 11px); }
    .hero-container { display: grid; grid-template-columns: 1.2fr 1fr; gap: 36px; align-items: center; }
    .hero-block-left { max-width: 720px; }
    .hero-form-wrap { margin: 0; max-width: 460px; }
    .hero-title { font-size: 42px; }
    .section-title { font-size: 32px; }
    .services-block, .feedback-block, .techno-block, .advantages-block, .faq-block, .info-block { padding: 64px 0; }
}

@media (min-width: 1100px) {
    .service-card, .advantage-card { flex: 1 1 calc(25% - 17px); }
    .advantage-card { flex: 1 1 calc(33.333% - 15px); }
    .feedback-card { flex: 1 1 calc(33.333% - 15px); }
    .hero-title { font-size: 46px; }
    .section-title { font-size: 34px; }
}

@media (max-width: 480px) {
    .hero-title { font-size: 28px; }
    .section-title { font-size: 24px; }
    .service-card-title, .advantage-card-title { font-size: 17px; }
    .faq-question-title { font-size: 16px; }
    .hero-block { padding: 32px 0 24px; }
    .container { padding: 14px; }
}

@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
}
