/* ==========================================================================
   Components CSS - Shared styles across all pages
   ========================================================================== */

/* ---------- Reset & Base ---------- */
.pms-page {
    font-family: var(--pms-font-primary);
    color: var(--pms-gray-800);
    overflow-x: hidden;
}

.pms-page *,
.pms-page *::before,
.pms-page *::after {
    box-sizing: border-box;
}

/* ---------- Container ---------- */
.pms-container {
    max-width: var(--pms-container-max);
    margin: 0 auto;
    padding: 0 24px;
}

@media (min-width: 768px) {
    .pms-container {
        padding: 0 32px;
    }
}

/* ---------- Section Header ---------- */
.pms-section-header {
    text-align: center;
    max-width: 720px;
    margin: 0 auto 48px;
}

.pms-section-header__badge {
    display: inline-block;
    padding: 6px 16px;
    background: var(--pms-accent);
    color: var(--pms-white);
    border-radius: 100px;
    font-size: 14px;
    font-weight: 600;
    margin-bottom: 16px;
    letter-spacing: 0.02em;
}

.pms-section-header__title {
    font-family: var(--pms-font-heading);
    font-size: 36px;
    font-weight: 800;
    line-height: 1.2;
    color: var(--pms-dark);
    margin: 0 0 16px;
}

@media (min-width: 768px) {
    .pms-section-header__title {
        font-size: 44px;
    }
}

.pms-section-header__subtitle {
    font-size: 18px;
    color: var(--pms-gray-600);
    line-height: 1.6;
    margin: 0;
}

.pms-text-gradient {
    background: linear-gradient(135deg, var(--pms-primary), var(--pms-secondary));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

/* ---------- Buttons ---------- */
.pms-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 12px 24px;
    border-radius: var(--pms-radius);
    font-family: var(--pms-font-primary);
    font-weight: 600;
    font-size: 15px;
    text-decoration: none;
    border: 2px solid transparent;
    cursor: pointer;
    transition: var(--pms-transition);
    line-height: 1.4;
    white-space: nowrap;
}

.pms-btn--primary {
    background: var(--pms-primary);
    color: var(--pms-white);
    border-color: var(--pms-primary);
}

.pms-btn--primary:hover {
    background: var(--pms-primary-dark);
    border-color: var(--pms-primary-dark);
    transform: translateY(-1px);
    box-shadow: var(--pms-shadow-md);
}

.pms-btn--outline {
    background: transparent;
    color: var(--pms-primary);
    border-color: var(--pms-primary);
}

.pms-btn--outline:hover {
    background: var(--pms-primary-50);
}

.pms-btn--ghost {
    background: transparent;
    color: var(--pms-gray-700);
    border-color: var(--pms-gray-300);
}

.pms-btn--ghost:hover {
    background: var(--pms-gray-100);
    border-color: var(--pms-gray-400);
}

.pms-btn--secondary-outline {
    background: transparent;
    color: var(--pms-secondary);
    border-color: var(--pms-secondary);
}

.pms-btn--secondary-outline:hover {
    background: var(--pms-secondary);
    color: var(--pms-white);
    transform: translateY(-1px);
    box-shadow: var(--pms-shadow-md);
}

.pms-btn--small {
    padding: 8px 16px;
    font-size: 14px;
}

.pms-btn--large {
    padding: 14px 32px;
    font-size: 16px;
}

.pms-btn--full {
    width: 100%;
}

/* ---------- Header ---------- */
.pms-header {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1000;
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    border-bottom: 1px solid var(--pms-gray-200);
    transition: var(--pms-transition);
}

.pms-header--scrolled {
    box-shadow: var(--pms-shadow-md);
}

.pms-header__inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: 72px;
    gap: 24px;
}

.pms-header__logo {
    text-decoration: none;
    flex-shrink: 0;
}

.pms-header__logo-img {
    height: 40px;
    width: auto;
    display: block;
}

.pms-header__logo-text {
    display: flex;
    align-items: center;
    gap: 10px;
    font-family: var(--pms-font-heading);
    font-size: 20px;
    font-weight: 700;
    color: var(--pms-dark);
}

.pms-header__nav {
    display: none;
}

@media (min-width: 1024px) {
    .pms-header__nav {
        display: flex;
    }
}

.pms-header__menu {
    display: flex;
    align-items: center;
    list-style: none;
    margin: 0;
    padding: 0;
    gap: 4px;
}

.pms-header__menu > li {
    display: flex;
    align-items: center;
}

.pms-header__menu > li > a {
    display: flex;
    align-items: center;
    padding: 8px 14px;
    color: var(--pms-gray-700);
    text-decoration: none;
    font-size: 15px;
    font-weight: 500;
    line-height: 1.4;
    border-radius: var(--pms-radius-sm);
    transition: var(--pms-transition);
}

.pms-header__menu > li > a:hover {
    color: var(--pms-secondary);
    background: rgba(0, 160, 253, 0.08);
}

/* ---------- Menu Dropdown ---------- */
.pms-menu-has-children {
    position: relative;
}

.pms-menu-trigger {
    display: flex;
    align-items: center;
    gap: 4px;
    padding: 8px 14px;
    color: var(--pms-gray-700);
    font-size: 15px;
    font-weight: 500;
    border: none;
    background: none;
    cursor: pointer;
    border-radius: var(--pms-radius-sm);
    transition: var(--pms-transition);
    font-family: var(--pms-font-primary);
}

.pms-menu-trigger:hover {
    color: var(--pms-secondary);
    background: rgba(0, 160, 253, 0.08);
}

.pms-menu-chevron {
    transition: transform 0.2s ease;
    flex-shrink: 0;
}

.pms-menu-has-children--open .pms-menu-chevron {
    transform: rotate(180deg);
}

.pms-menu-dropdown {
    position: absolute;
    top: calc(100% + 8px);
    left: 50%;
    transform: translateX(-50%);
    min-width: 300px;
    background: var(--pms-white);
    border: 1px solid var(--pms-gray-200);
    border-radius: var(--pms-radius-md);
    box-shadow: var(--pms-shadow-xl);
    padding: 8px;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.2s ease, visibility 0.2s ease, transform 0.2s ease;
    transform: translateX(-50%) translateY(4px);
    z-index: 100;
}

.pms-menu-has-children--open .pms-menu-dropdown {
    opacity: 1;
    visibility: visible;
    transform: translateX(-50%) translateY(0);
}

.pms-menu-dropdown__item {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    padding: 12px 14px;
    border-radius: var(--pms-radius);
    text-decoration: none;
    color: var(--pms-gray-700);
    transition: var(--pms-transition);
}

.pms-menu-dropdown__item:hover {
    background: rgba(0, 160, 253, 0.06);
    color: var(--pms-secondary);
}

.pms-menu-dropdown__icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    border-radius: var(--pms-radius-sm);
    background: var(--pms-gray-100);
    color: var(--pms-secondary);
    flex-shrink: 0;
    transition: var(--pms-transition);
}

.pms-menu-dropdown__item:hover .pms-menu-dropdown__icon {
    background: rgba(0, 160, 253, 0.12);
    color: var(--pms-secondary-dark);
}

.pms-menu-dropdown__text {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.pms-menu-dropdown__title {
    font-size: 14px;
    font-weight: 600;
    color: var(--pms-dark);
    line-height: 1.3;
}

.pms-menu-dropdown__item:hover .pms-menu-dropdown__title {
    color: var(--pms-secondary);
}

.pms-menu-dropdown__desc {
    font-size: 13px;
    color: var(--pms-gray-500);
    line-height: 1.4;
}

.pms-header__actions {
    display: flex;
    align-items: center;
    gap: 12px;
    flex-shrink: 0;
}

@media (max-width: 1023px) {
    .pms-header__actions {
        gap: 8px;
    }

    .pms-header__actions .pms-btn--secondary-outline {
        display: none;
    }

    .pms-header__actions .pms-btn--primary.pms-btn--small {
        padding: 6px 12px;
        font-size: 13px;
    }

    .pms-lang-switcher__toggle {
        padding: 4px 8px;
        font-size: 12px;
    }
}

@media (max-width: 767px) {
    .pms-header__actions .pms-btn--primary.pms-btn--small {
        display: none;
    }

    .pms-header__inner {
        height: 56px;
    }

    .pms-header__logo-img {
        height: 32px;
    }

    .pms-currency-switcher__toggle {
        padding: 4px 8px;
        font-size: 12px;
    }
}

.pms-header__toggle {
    display: flex;
    flex-direction: column;
    gap: 5px;
    background: none;
    border: none;
    cursor: pointer;
    padding: 8px;
}

@media (min-width: 1024px) {
    .pms-header__toggle {
        display: none;
    }
}

.pms-header__toggle span {
    width: 24px;
    height: 2px;
    background: var(--pms-gray-800);
    transition: var(--pms-transition);
    border-radius: 2px;
}

/* ---------- Mobile Navigation ---------- */
/* Mobile menu is handled by JS overlay (#pms-mobile-overlay) attached to <body>.
   The original #pms-nav is hidden on mobile/tablet via JS-injected CSS.
   All mobile menu styling is self-contained in main.js to avoid
   backdrop-filter stacking-context issues with the fixed header. */

/* ---------- Language Switcher ---------- */
.pms-lang-switcher {
    position: relative;
}

.pms-lang-switcher__toggle {
    display: flex;
    align-items: center;
    gap: 4px;
    padding: 6px 12px;
    background: var(--pms-gray-100);
    border: 1px solid var(--pms-gray-300);
    border-radius: var(--pms-radius-sm);
    cursor: pointer;
    font-size: 13px;
    font-weight: 600;
    color: var(--pms-gray-700);
}

.pms-lang-switcher__dropdown {
    position: absolute;
    top: 100%;
    right: 0;
    background: var(--pms-white);
    border: 1px solid var(--pms-gray-200);
    border-radius: var(--pms-radius);
    box-shadow: var(--pms-shadow-lg);
    min-width: 80px;
    display: none;
    z-index: 1001;
    margin-top: 4px;
    max-height: 360px;
    overflow-y: auto;
}

.pms-lang-switcher--open .pms-lang-switcher__dropdown {
    display: block;
}

.pms-lang-switcher__item {
    display: block;
    padding: 8px 16px;
    text-decoration: none;
    color: var(--pms-gray-700);
    font-size: 13px;
    font-weight: 600;
}

.pms-lang-switcher__item:hover,
.pms-lang-switcher__item.active {
    background: var(--pms-primary-50);
    color: var(--pms-primary);
}

/* ---------- Currency Switcher ---------- */
.pms-currency-switcher {
    position: relative;
}

.pms-currency-switcher__toggle {
    display: flex;
    align-items: center;
    gap: 4px;
    padding: 6px 12px;
    background: var(--pms-gray-100);
    border: 1px solid var(--pms-gray-300);
    border-radius: var(--pms-radius-sm);
    cursor: pointer;
    font-size: 13px;
    font-weight: 600;
    color: var(--pms-gray-700);
}

.pms-currency-switcher__dropdown {
    position: absolute;
    top: 100%;
    right: 0;
    background: var(--pms-white);
    border: 1px solid var(--pms-gray-200);
    border-radius: var(--pms-radius);
    box-shadow: var(--pms-shadow-lg);
    min-width: 100px;
    max-height: 280px;
    overflow-y: auto;
    display: none;
    z-index: 100;
    margin-top: 4px;
}

.pms-currency-switcher--open .pms-currency-switcher__dropdown {
    display: block;
}

.pms-currency-switcher__item {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 8px 16px;
    text-decoration: none;
    color: var(--pms-gray-700);
    font-size: 13px;
    font-weight: 600;
    white-space: nowrap;
}

.pms-currency-switcher__item:hover,
.pms-currency-switcher__item.active {
    background: var(--pms-primary-50);
    color: var(--pms-primary);
}

.pms-currency-switcher__symbol {
    display: inline-block;
    width: 20px;
    text-align: center;
    color: var(--pms-gray-500);
}

.pms-currency-switcher__item.active .pms-currency-switcher__symbol,
.pms-currency-switcher__item:hover .pms-currency-switcher__symbol {
    color: var(--pms-primary);
}

/* ---------- Forms ---------- */
.pms-form-group {
    margin-bottom: 16px;
}

.pms-form-group label {
    display: block;
    font-size: 14px;
    font-weight: 600;
    color: var(--pms-gray-700);
    margin-bottom: 6px;
}

.pms-form-group input,
.pms-form-group select,
.pms-form-group textarea {
    width: 100%;
    padding: 10px 14px;
    font-size: 15px;
    font-family: var(--pms-font-primary);
    border: 1px solid var(--pms-gray-300);
    border-radius: var(--pms-radius-sm);
    background: var(--pms-white);
    color: var(--pms-gray-800);
    transition: var(--pms-transition);
}

.pms-form-group input:focus,
.pms-form-group select:focus,
.pms-form-group textarea:focus {
    outline: none;
    border-color: var(--pms-primary);
    box-shadow: 0 0 0 3px var(--pms-primary-100);
}

.pms-form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px;
}

.pms-form-group--full {
    grid-column: 1 / -1;
}

/* ---------- Demo Form ---------- */
.pms-demo-form--card {
    background: var(--pms-white);
    border: 1px solid var(--pms-gray-200);
    border-radius: var(--pms-radius-lg);
    padding: 32px;
    box-shadow: var(--pms-shadow-lg);
}

.pms-demo-form__note {
    text-align: center;
    font-size: 13px;
    color: var(--pms-gray-500);
    margin-top: 12px;
}

.pms-demo-form__message {
    margin-top: 16px;
    padding: 12px 16px;
    border-radius: var(--pms-radius-sm);
    font-size: 14px;
    text-align: center;
}

.pms-demo-form__message--success {
    background: #D1FAE5;
    color: #065F46;
    border: 1px solid #6EE7B7;
}

.pms-demo-form__message--error {
    background: #FEE2E2;
    color: #991B1B;
    border: 1px solid #FCA5A5;
}

/* ---------- Footer ---------- */
.pms-footer {
    background: var(--pms-gray-900);
    color: var(--pms-gray-400);
    padding: 64px 0 24px;
}

.pms-footer__grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 40px;
    margin-bottom: 48px;
}

@media (min-width: 768px) {
    .pms-footer__grid {
        grid-template-columns: 2fr 1fr 1fr 1fr;
    }
}

.pms-footer__brand .pms-header__logo-text {
    color: var(--pms-white);
    margin-bottom: 16px;
}

.pms-footer__logo-img {
    height: 36px;
    width: auto;
    display: block;
    margin-bottom: 16px;
}

.pms-footer__description {
    font-size: 14px;
    line-height: 1.6;
    margin-bottom: 20px;
}

.pms-footer__social {
    display: flex;
    gap: 12px;
}

.pms-footer__social a {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    border-radius: var(--pms-radius-sm);
    background: var(--pms-gray-800);
    color: var(--pms-gray-400);
    transition: var(--pms-transition);
}

.pms-footer__social a:hover {
    background: var(--pms-primary);
    color: var(--pms-white);
}

.pms-footer__title {
    font-size: 15px;
    font-weight: 700;
    color: var(--pms-white);
    margin-bottom: 16px;
}

.pms-footer__links {
    list-style: none;
    padding: 0;
    margin: 0;
}

.pms-footer__links li {
    margin-bottom: 10px;
}

.pms-footer__links a {
    color: var(--pms-gray-400);
    text-decoration: none;
    font-size: 14px;
    transition: var(--pms-transition);
}

.pms-footer__links a:hover {
    color: var(--pms-white);
}

.pms-footer__bottom {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 12px;
    padding-top: 24px;
    border-top: 1px solid var(--pms-gray-800);
    font-size: 13px;
}

@media (min-width: 768px) {
    .pms-footer__bottom {
        flex-direction: row;
        justify-content: space-between;
    }
}

.pms-footer__bottom-links {
    display: flex;
    gap: 24px;
}

.pms-footer__bottom-links a {
    color: var(--pms-gray-500);
    text-decoration: none;
    font-size: 13px;
}

.pms-footer__bottom-links a:hover {
    color: var(--pms-white);
}

/* ---------- Sections ---------- */
.pms-section {
    padding: var(--pms-section-padding);
}

.pms-section--light {
    background: var(--pms-gray-100);
}

.pms-section--white {
    background: var(--pms-white);
}

.pms-section-header__description {
    font-size: 18px;
    color: var(--pms-gray-600);
    line-height: 1.6;
    margin: 0;
}

/* ---------- Page Hero (Inner pages) ---------- */
.pms-page-hero {
    padding: 120px 0 60px;
    background: linear-gradient(180deg, var(--pms-gray-100) 0%, var(--pms-white) 100%);
}
