/* 
  Aliglobal Design System Implementation 
  Based on design_code.json
*/

:root {
    /* Colors - Primary */
    --primary-color: #1241ba;
    --primary-dark: #0a339a;
    --primary-light: #1f4cbf;
    --primary-blind: #e9efff;

    /* Colors - Accent */
    --accent-color: #5641dc;
    --accent-dark: #3e2bb7;
    --accent-light: #6852ef;
    --accent-blind: #f6f2ff;

    /* Colors - Background */
    --bg-app: #f1f3f9;
    --bg-element: #fff;
    --bg-element-hover: #e7ebf5;
    --bg-element-hover-dark: #dbdfe6;
    --bg-card: #fff;
    --bg-contrast: #1241ba;
    --bg-contrast-gradient: linear-gradient(319deg, #6187e7, rgba(0, 43, 153, 0)), #0e3cb2;
    --bg-gradient: radial-gradient(105.32% 96.43% at 100% 100%, rgba(32, 84, 219, .4) 0%, rgba(32, 84, 219, 0) 100%), #2b303d;
    --bg-banner-accent: radial-gradient(158.21% 141.42% at 100% 100%, rgba(78, 118, 219, .5) 0.85%, rgba(48, 95, 214, 0) 100%), #0a339a;

    /* Colors - Text */
    --text-primary: #2b303d;
    --text-secondary: #757f92;
    --text-blind: #c4cad6;
    --text-blind-contrast: #ffffff33;
    --text-contrast: #fff;

    /* Colors - UI */
    --border-color: #dadde5;
    --divider-color: #d3d7e0;
    --disabled-color: #ebeef6;
    --icon-link: #f9560f;
    --icon-link-2: #7521b7;
    --icon-link-3: #3761e1;

    /* Spacing */
    --spacing-xxs: 4px;
    --spacing-xs: 0.8rem;
    --spacing-sm: 1.2rem;
    --spacing-md: 1.6rem;
    --spacing-lg: 2.4rem;
    --spacing-xl: 3.2rem;
    --spacing-xxl: 4rem;
    --spacing-xxxl: 5.6rem;
    --spacing-xxxxl: 6.4rem;
    --section-spacing: 12rem;

    /* Effects */
    --box-shadow: 0 0 50px 0 rgba(31, 39, 51, .078);
    --border-radius-xs: 0.5rem;
    --border-radius-sm: 1rem;
    --border-radius-md: 1.2rem;
    --border-radius-lg: 2rem;
    --border-radius-xl: 2.4rem;
    --transition: 0.3s ease;
}

/* Reset & Base */
html {
    font-size: 62.5%;
    /* 10px base for rem */
    box-sizing: border-box;
}

*,
*::before,
*::after {
    box-sizing: inherit;
}

body {
    font-family: "Inter", "Helvetica Neue", "Arial", sans-serif;
    font-size: 2rem;
    line-height: 2.8rem;
    color: var(--text-primary);
    background-color: var(--bg-app);
    margin: 0;
    padding: 0;
}

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

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

/* Typography */
h1,
.h1 {
    font-size: 6.4rem;
    line-height: 7.2rem;
    font-weight: 500;
    letter-spacing: -1.5px;
    margin: 0;
}

h2,
.h2 {
    font-size: 4.4rem;
    line-height: 4.8rem;
    font-weight: 500;
    letter-spacing: -1.5px;
    margin: 0;
}

h3,
.h3 {
    font-size: 3.2rem;
    line-height: 3.8rem;
    font-weight: 500;
    letter-spacing: -1px;
    margin: 0;
}

h4,
.h4 {
    font-size: 2.4rem;
    line-height: 3.2rem;
    font-weight: 500;
    letter-spacing: -1px;
    margin: 0;
}

.lead {
    font-size: 2.8rem;
    line-height: 3.4rem;
    font-weight: 400;
    letter-spacing: -0.75px;
}

.body {
    font-size: 2rem;
    line-height: 2.8rem;
    font-weight: 400;
    letter-spacing: -0.3px;
}

.small,
small {
    font-size: 1.6rem;
    line-height: 2.4rem;
    font-weight: 400;
    letter-spacing: -0.3px;
}

.caption {
    font-size: 1.4rem;
    line-height: 1.6rem;
    font-weight: 500;
}

.color-secondary {
    color: var(--text-secondary);
}

/* Layout */
.container {
    max-width: 136rem;
    padding: 0 8rem;
    margin: 0 auto;
}

.app-section {
    position: relative;
}

/* Grid */
.app-grid {
    display: grid;
    width: 100%;
}

.app-grid--columns-4-1 {
    grid-template-columns: repeat(4, 1fr);
    gap: var(--spacing-md);
}

.app-grid--limited>*:nth-child(n+9) {
    display: none;
}

.app-grid>* {
    animation: fadeIn 0.5s ease backwards;
}

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

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.app-grid--columns-3-1 {
    grid-template-columns: repeat(3, 1fr);
    gap: var(--spacing-md);
}

.app-grid--columns-2-1 {
    grid-template-columns: repeat(2, 1fr);
    gap: var(--spacing-md);
}

.gap-20 {
    gap: 2rem;
}

/* Header */
.header {
    background-color: var(--bg-element);
    border-bottom: 1px solid var(--border-color);
    padding: 2rem 0;
}

.header__inner,
.header__bar {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.header__mobile {
    display: none;
    flex-direction: column;
    gap: 6px;
    background: none;
    border: none;
    padding: 10px;
    cursor: pointer;
    z-index: 1001;
}

.header__mobile span {
    display: block;
    width: 28px;
    height: 3px;
    background-color: var(--primary-color);
    border-radius: 2px;
    transition: var(--transition);
}

.header__mobile.is-active span:nth-child(1) {
    transform: translateY(9px) rotate(45deg);
}

.header__mobile.is-active span:nth-child(2) {
    opacity: 0;
}

.header__mobile.is-active span:nth-child(3) {
    transform: translateY(-9px) rotate(-45deg);
}

.header__logo {
    display: flex;
    align-items: center;
}

.header__logo-img {
    height: 6.4rem;
    width: auto;
    object-fit: contain;
}

.header__menu-section {
    display: flex;
    gap: 4rem;
}

.header__menu-link {
    font-size: 1.8rem;
    font-weight: 600;
    color: var(--text-primary);
    transition: var(--transition);
}

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

/* Footer */
.footer {
    background-color: var(--bg-element);
    border-top: 1px solid var(--border-color);
    padding: 6rem 0;
    margin-top: var(--section-spacing);
}

.footer__content {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
}

.footer__logo {
    display: flex;
    align-items: center;
    margin-bottom: 1.6rem;
}

.footer__logo-img {
    height: 3.2rem;
    width: auto;
    object-fit: contain;
}

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

.footer__menu {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.footer__menu-link {
    font-size: 1.4rem;
    color: var(--text-secondary);
}

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

/* Components */

/* Hero Banner */
.hero-banner {
    position: relative;
    padding: 12rem 0;
    margin-bottom: 6rem;
    overflow: hidden;
    background: var(--primary-dark);
}

.hero-banner__bg {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    opacity: 0.4;
    filter: saturate(1.2);
}

.hero-banner__overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, rgba(18, 65, 186, 0.8) 0%, rgba(26, 26, 46, 0.9) 100%);
}

.hero-banner__content {
    position: relative;
    z-index: 2;
    max-width: 80rem;
    color: var(--text-contrast);
}

.hero-banner__title {
    font-size: 7.2rem;
    line-height: 1.1;
    margin-bottom: 2.4rem;
    text-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
}

.hero-banner__lead {
    font-size: 2.4rem;
    margin-bottom: 4rem;
    opacity: 0.9;
}

.hero-search {
    display: flex;
    align-items: center;
    background: var(--bg-element);
    border-radius: var(--border-radius-lg);
    padding: 0.8rem;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.15);
    max-width: 64rem;
    transition: var(--transition);
}

.hero-search:focus-within {
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.25);
    transform: translateY(-2px);
}

.hero-search__input {
    flex: 1;
    border: none;
    background: transparent;
    padding: 1.2rem 2rem;
    font-size: 1.8rem;
    color: var(--text-primary);
    outline: none;
    width: 100%;
}

.hero-search__input::placeholder {
    color: var(--text-blind);
}

.hero-search__button {
    display: flex;
    align-items: center;
    gap: 0.8rem;
    background-color: var(--primary-color);
    color: var(--text-contrast);
    border: none;
    padding: 1.2rem 2.4rem;
    border-radius: var(--border-radius-md);
    font-size: 1.8rem;
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition);
}

.hero-search__button:hover {
    background-color: var(--primary-light);
}

.color-contrast {
    color: var(--text-contrast);
}

.text-underline {
    text-decoration: underline;
}

.opacity-80 {
    opacity: 0.8;
}

/* Search Components */
.hero-search,
.content-search {
    display: flex;
    align-items: center;
    background: var(--bg-element);
    border-radius: var(--border-radius-lg);
    padding: 0.6rem;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.08);
    transition: var(--transition);
    border: 1px solid var(--border-color);
}

.content-search {
    max-width: 50rem;
    margin: 0 auto;
}

.hero-search:focus-within,
.content-search:focus-within {
    box-shadow: 0 15px 40px rgba(0, 0, 0, 0.12);
    transform: translateY(-2px);
    border-color: var(--primary-color);
}

.hero-search__input,
.content-search__input {
    flex: 1;
    border: none;
    background: transparent;
    padding: 1.2rem 1.6rem;
    font-size: 1.8rem;
    color: var(--text-primary);
    outline: none;
    width: 100%;
}

.hero-search__button,
.content-search__button {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 1.2rem;
    background-color: var(--primary-color);
    color: var(--text-contrast);
    border: none;
    min-width: 4.8rem;
    width: auto;
    height: 4.8rem;
    padding: 0 2.4rem;
    border-radius: var(--border-radius-md);
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition);
}

.hero-search__button:hover,
.content-search__button:hover {
    background-color: var(--primary-light);
}

.hero-search__button svg,
.content-search__button svg {
    width: 2.2rem;
    height: 2.2rem;
}

/* Visibility */
.is-hidden {
    display: none !important;
}

.brand-item {
    transition: opacity 0.3s ease;
}

.brand-item.is-hidden {
    opacity: 0;
}

/* App Button */
.app-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 1.4rem 3.2rem;
    border-radius: var(--border-radius-md);
    font-size: 1.8rem;
    font-weight: 600;
    line-height: 2.4rem;
    cursor: pointer;
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    border: none;
}

.app-button--color-primary {
    background-color: var(--primary-color);
    color: var(--text-contrast);
}

.app-button--color-primary:hover {
    background-color: var(--primary-light);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(18, 65, 186, 0.2);
}

.app-button--style-text {
    color: var(--primary-color);
    background: transparent;
    padding: 0.8rem 1.6rem;
}

.app-button--style-text:hover {
    background-color: var(--primary-blind);
}

.app-button--size-lg {
    padding: 1.6rem 3.2rem;
    font-size: 2rem;
}

.app-button--size-sm {
    padding: 0.8rem 1.6rem;
    font-size: 1.4rem;
}

/* Card */
.card {
    background-color: var(--bg-card);
    border-radius: var(--border-radius-lg);
    box-shadow: var(--box-shadow);
    overflow: hidden;
    transition: var(--transition);
    border: 1px solid transparent;
}

.card:hover {
    transform: translateY(-5px);
    border-color: var(--border-color);
    box-shadow: 0 10px 30px rgba(31, 39, 51, .1);
}

.p-20 {
    padding: 2rem;
}

.p-40 {
    padding: 4rem;
}

.p-64 {
    padding: 6.4rem;
}

.px-40 {
    padding-left: 4rem;
    padding-right: 4rem;
}

/* Product Card */
.product-card {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    background-color: var(--bg-card);
    border-radius: var(--border-radius-xl);
    padding: 3.2rem;
    transition: all 0.4s ease;
    border: 1px solid var(--border-color);
}

.product-card:hover {
    transform: translateY(-12px);
    box-shadow: 0 24px 48px rgba(31, 39, 51, 0.12);
    border-color: var(--primary-light);
}

.product-card__image {
    width: 100%;
    height: 12rem;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 1.6rem;
    padding: 1rem;
    border-radius: var(--border-radius-md);
}

.product-card__img {
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
}

/* Hero Brand Logo Container */
.hero-brand-logo {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 16rem;
    height: 16rem;
    padding: 2rem;
    border-radius: var(--border-radius-xl);
    background-color: var(--bg-card);
    box-shadow: var(--box-shadow);
    overflow: hidden;
    margin: 0 auto;
}

.hero-brand-logo img {
    max-width: 100%;
    max-height: 100%;
    width: auto;
    height: auto;
    object-fit: contain;
}

/* Service Logo Small */
.service-logo-small {
    height: 4.8rem;
    width: auto;
    max-width: 16rem;
    object-fit: contain;
}

.product-card__placeholder {
    font-size: 4rem;
    font-weight: 700;
    color: var(--primary-color);
    background-color: var(--primary-blind);
    width: 8rem;
    height: 8rem;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
}

.product-card__title {
    color: var(--text-primary);
    margin-bottom: 0.4rem;
}

/* Breadcrumbs */
.breadcrumbs {
    margin: 2rem 0;
}

.breadcrumbs__list {
    list-style: none;
    padding: 0;
    margin: 0;
    display: flex;
    flex-wrap: wrap;
    align-items: center;
}

.breadcrumbs__item {
    display: flex;
    align-items: center;
    font-size: 1.4rem;
    color: var(--text-secondary);
}

.breadcrumbs__link {
    color: var(--text-secondary);
}

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

.breadcrumbs__separator {
    margin: 0 0.8rem;
    color: var(--text-blind);
}

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

/* FAQ */
.faq-list {
    display: flex;
    flex-direction: column;
    gap: 1.6rem;
}

.faq__item {
    background-color: var(--bg-card);
    border-radius: var(--border-radius-md);
    border: 1px solid var(--border-color);
    overflow: hidden;
}

.faq__question {
    padding: 2rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-weight: 500;
    font-size: 2rem;
    cursor: pointer;
    list-style: none;
}

.faq__question::-webkit-details-marker {
    display: none;
}

.faq__icon {
    font-size: 2.4rem;
    color: var(--primary-color);
    transition: transform 0.3s;
}

details[open] .faq__icon {
    transform: rotate(45deg);
}

.faq__answer {
    padding: 0 2rem 2rem 2rem;
    color: var(--text-secondary);
    line-height: 1.6;
    border-top: 1px solid transparent;
}

details[open] .faq__answer {
    border-top-color: var(--divider-color);
    padding-top: 2rem;
}

/* Mobile Menu Overlay */
.mobile-menu {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: var(--bg-element);
    z-index: 1000;
    padding: 8rem 2rem 4rem;
    overflow-y: auto;
    flex-direction: column;
    align-items: center;
    text-align: center;
}

.mobile-menu.is-active {
    display: flex;
}

.mobile-menu__block {
    width: 100%;
    max-width: 400px;
}

.mobile-menu__close {
    position: absolute;
    top: 2rem;
    right: 2rem;
    font-size: 4rem;
    background: none;
    border: none;
    color: var(--text-primary);
    cursor: pointer;
}

.mobile-menu__submenu {
    display: flex;
    flex-direction: column;
    gap: 3rem;
    margin-top: 4rem;
}

.mobile-menu__link {
    font-size: 2.4rem;
    font-weight: 500;
    color: var(--text-primary);
}

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

/* Utilities */
.text-center {
    text-align: center;
}

.text-left {
    text-align: left;
}

.text-right {
    text-align: right;
}

.flex {
    display: flex;
}

.flex-column {
    flex-direction: column;
}

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

.flex-between {
    justify-content: space-between;
}

.flex-wrap {
    flex-wrap: wrap;
}

.items-center {
    align-items: center;
}

.mb-10 {
    margin-bottom: 1rem;
}

.mb-20 {
    margin-bottom: 2rem;
}

.mb-40 {
    margin-bottom: 4rem;
}

.mb-64 {
    margin-bottom: 6.4rem;
}

.mt-20 {
    margin-top: 2rem;
}

.mt-32 {
    margin-top: 3.2rem;
}

.mt-40 {
    margin-top: 4rem;
}

.mt-48 {
    margin-top: 4.8rem;
}

.mt-64 {
    margin-top: 6.4rem;
}

.pt-60 {
    padding-top: 6rem;
}

.pb-40 {
    padding-bottom: 4rem;
}

.pb-60 {
    padding-bottom: 6rem;
}

.pb-80 {
    padding-bottom: 8rem;
}

.py-80 {
    padding-top: 8rem;
    padding-bottom: 8rem;
}

.gap-sm {
    gap: var(--spacing-sm);
}

.gap-xs {
    gap: var(--spacing-xs);
}

/* Responsive */
@media (max-width: 1023px) {
    html {
        font-size: 50%;
    }

    /* Smaller base font for tablet/mobile */

    .container {
        padding: 0 4rem;
    }

    .app-grid--columns-4-1,
    .app-grid--columns-3-1 {
        grid-template-columns: repeat(2, 1fr);
    }

    .header__menu,
    .header__menu-section {
        display: none;
    }

    .header__mobile {
        display: flex;
    }
}

@media (max-width: 767px) {
    html {
        font-size: 45%;
    }

    .container {
        padding: 0 2rem;
    }

    .app-grid--columns-2-1,
    .app-grid--columns-4-1,
    .app-grid--columns-3-1 {
        grid-template-columns: 1fr;
        /* Stack on mobile */
    }

    .h1 {
        font-size: 3rem;
        line-height: 3.6rem;
    }

    .h2 {
        font-size: 2.6rem;
        line-height: 3rem;
    }
}