/* ==========================================================================
   ProMinners — Responsive system
   ========================================================================== */

:root {
    --pm-container: 1200px;
    --pm-gutter: clamp(1rem, 4vw, 1.5rem);
    --pm-fs-h1: clamp(1.75rem, 4vw + 1rem, 3.25rem);
    --pm-fs-h2: clamp(1.35rem, 2.5vw + 0.75rem, 2.5rem);
    --pm-fs-lead: clamp(0.95rem, 1vw + 0.8rem, 1.125rem);
}

.container {
    max-width: var(--pm-container);
    padding-left: var(--pm-gutter);
    padding-right: var(--pm-gutter);
}

.site-main {
    width: 100%;
    overflow-x: clip;
}

h1 { font-size: var(--pm-fs-h1); }
h2 { font-size: var(--pm-fs-h2); }
.lead { font-size: var(--pm-fs-lead); }

/* ——— Header & navigation ——— */
.site-header {
    z-index: 1100;
}

.site-header .container {
    position: relative;
}

.site-header .header-menu {
    display: flex;
    align-items: center;
    justify-content: space-between;
    width: 100%;
    gap: 0.5rem 1rem;
    min-height: 48px;
}

.header-menu-logo {
    text-decoration: none;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    min-width: 0;
    flex-shrink: 0;
}

.header-menu-logo .site-name {
    font-size: clamp(1rem, 2.5vw, 1.75rem);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: min(40vw, 200px);
}

.header-menu-nav {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 0.5rem 0.75rem;
    margin-left: auto;
    flex-shrink: 0;
}

/* Desktop navigation */
nav.ul-pc-menu {
    display: none;
    align-items: center;
    flex-wrap: nowrap;
    gap: 0.25rem clamp(0.5rem, 1.5vw, 1.25rem);
    margin: 0;
}

nav.ul-pc-menu a,
.ul-pc-menu a {
    font-size: clamp(0.75rem, 1.2vw, 1rem);
    padding: 0.35rem 0;
    white-space: nowrap;
    text-decoration: none;
}

.auth-box {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    flex-shrink: 0;
    margin-left: 0;
    border-left: none;
    padding-left: 0;
}

/* Menu toggle — same icon button style as register / login */
.auth-box_icon--menu {
    display: none;
    position: relative;
    margin: 0;
    cursor: pointer;
}

.auth-box_icon--menu input {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    margin: 0;
    opacity: 0;
    cursor: pointer;
    z-index: 1;
}

.auth-box_icon--menu .menu-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 38px;
    height: 38px;
    border-radius: 6px;
    font-size: 16px;
    transition: all 0.3s ease;
    pointer-events: none;
}

.auth-box_icon--menu .menu-icon--bars {
    background: linear-gradient(to right, #f2994a, #f2c94c, #ffde78, #f2c94c);
    color: #20193c;
}

.auth-box_icon--menu .menu-icon--close {
    display: none;
    background: #6a33f4;
    color: #fff;
}

.auth-box_icon--menu input:checked ~ .menu-icon--bars {
    display: none;
}

.auth-box_icon--menu input:checked ~ .menu-icon--close {
    display: flex;
}

.auth-box_icon--menu:hover .menu-icon {
    background: #252831;
    color: #fff;
}

.auth-box_icon--menu:hover .menu-icon::before {
    transform: scale(1.1) rotate(360deg);
}

/* Mobile drawer — must live outside header (fixed to viewport) */
.right-mob-menu {
    position: fixed;
    top: 0;
    left: 0;
    width: min(100vw, 320px);
    max-width: 88vw;
    height: 100vh;
    height: 100dvh;
    margin: 0;
    padding: 0;
    display: flex;
    flex-direction: column;
    align-items: stretch;
    box-sizing: border-box;
    z-index: 1200;
    background: rgba(17, 21, 28, 0.98);
    border-right: 1px solid var(--pm-border);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    overflow: hidden;
    transform: translateX(-100%);
    transition: transform 0.35s cubic-bezier(0.4, 0, 0.2, 1);
    visibility: hidden;
}

.right-mob-menu.show {
    transform: translateX(0);
    visibility: visible;
}

.right-mob-menu__head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    padding: 1rem 1.25rem;
    border-bottom: 1px solid var(--pm-border);
    flex-shrink: 0;
}

.right-mob-menu__brand {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    text-decoration: none;
    color: var(--pm-heading);
    font-size: 1.1rem;
    font-weight: 500;
}

.right-mob-menu__links {
    flex: 1;
    overflow-y: auto;
    padding: 0.5rem 1.25rem;
    -webkit-overflow-scrolling: touch;
}

.right-mob-menu__links a {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 0.95rem 0;
    border-bottom: 1px solid var(--pm-border);
    font-size: 0.95rem;
    font-weight: 500;
    text-transform: uppercase;
    color: var(--pm-text-secondary);
    text-decoration: none;
    transition: color 0.2s ease;
}

.right-mob-menu__links a:hover,
.right-mob-menu__links a.active {
    color: var(--pm-accent);
}

.right-mob-menu__links a i {
    width: 1.25rem;
    text-align: center;
    flex-shrink: 0;
}

.right-mob-menu__auth {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
    padding: 1.25rem;
    border-top: 1px solid var(--pm-border);
    flex-shrink: 0;
}

.right-mob-menu__auth .btn-main,
.right-mob-menu__auth .btn-hero {
    width: 100%;
    justify-content: center;
}

.right-mob-menu .close-mob-menu {
    position: static;
    flex-shrink: 0;
    margin: 0;
    padding: 0;
    border: none;
    background: transparent;
}

.right-mob-menu .close-mob-menu i {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 38px;
    height: 38px;
    border-radius: 6px;
    background: #df2839;
    color: #fff;
    font-size: 16px;
    transition: all 0.3s ease;
}

.right-mob-menu .close-mob-menu:hover i {
    background: #252831;
}

.mob-backdrop {
    position: fixed;
    inset: 0;
    z-index: 1150;
    background: rgba(0, 0, 0, 0.65);
    backdrop-filter: blur(4px);
    -webkit-backdrop-filter: blur(4px);
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
    transition: opacity 0.35s ease, visibility 0.35s ease;
}

.mob-backdrop.is-visible {
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
}

body.menu-open {
    overflow: hidden;
}

body.menu-open .site-header {
    backdrop-filter: none;
    -webkit-backdrop-filter: none;
}

/* Tablet & desktop: show horizontal nav, hide menu button */
@media (min-width: 1200px) {
    nav.ul-pc-menu {
        display: flex;
    }

    .auth-box_icon--menu {
        display: none !important;
    }

    .header-menu-logo .site-name {
        max-width: none;
    }

    .auth-box {
        margin-left: 0.75rem;
        padding-left: 0.75rem;
        border-left: 1px solid var(--pm-border);
    }
}

/* Mobile & tablet: hide desktop nav, show menu button */
@media (max-width: 1199.98px) {
    nav.ul-pc-menu,
    .ul-pc-menu {
        display: none !important;
    }

    .auth-box_icon--menu {
        display: inline-flex !important;
    }

    .site-header {
        padding: 10px 0;
    }
}

/* Small phones */
@media (max-width: 575.98px) {
    .header-menu-logo .site-name {
        max-width: 120px;
    }

    .auth-box_icon i,
    .auth-box_icon--menu .menu-icon {
        width: 34px;
        height: 34px;
        font-size: 14px;
    }
}

@media (max-width: 380px) {
    .header-menu-logo .site-name {
        display: none;
    }
}

/* ——— Hero ——— */
.page-hero--home h1 {
    font-size: clamp(2.25rem, 6vw, 3.25rem);
    line-height: 1.1;
}

.page-hero--home .lead {
    font-size: clamp(1rem, 2.5vw, 1.2rem);
}

.hero-buttons {
    flex-wrap: wrap;
    gap: 0.75rem;
    margin-top: 1.5rem;
}

.hero-buttons .btn-hero,
.hero-buttons .btn-main {
    flex: 1 1 auto;
    min-width: min(100%, 200px);
    justify-content: center;
}

@media (max-width: 991.98px) {
    .hero-visual {
        max-width: 400px;
    }

    .hero-visual__float--hash {
        left: 2%;
    }

    .hero-visual__float--users {
        right: 2%;
    }
}

@media (max-width: 575.98px) {
    .hero-visual {
        min-height: 260px;
        max-width: 320px;
    }

    .hero-visual__float {
        padding: 0.5rem 0.65rem;
        min-width: 4.75rem;
    }

    .hero-visual__float strong {
        font-size: 0.9rem;
    }

    .hero-visual__float--yield {
        top: 4%;
        right: 2%;
    }

    .hero-visual__float--hash {
        bottom: 12%;
        left: 0;
    }

    .hero-perks {
        flex-direction: column;
        gap: 0.4rem;
    }
}

@media (prefers-reduced-motion: reduce) {
    .hero-visual__grid,
    .hero-visual__glow,
    .hero-visual__ring,
    .hero-visual__core-inner,
    .hero-visual__float,
    .hero-visual__orbit {
        animation: none;
    }
}

/* ——— Feature cards ——— */
.section-head {
    margin-bottom: 2rem;
}

.section-head p {
    color: var(--pm-text-muted);
    max-width: 36rem;
    margin: 0.5rem auto 0;
}

.feature-card {
    height: 100%;
    padding: 1.5rem;
    background: var(--pm-bg-card);
    border: 1px solid var(--pm-border);
    border-radius: var(--pm-radius);
    text-align: left;
}

.feature-card__step {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 2.25rem;
    height: 2.25rem;
    border-radius: 8px;
    background: var(--pm-accent);
    color: #fff;
    font-weight: 700;
    margin-bottom: 1rem;
}

.feature-card h3 {
    font-size: 1.15rem;
    margin-bottom: 0.5rem;
}

/* ——— Investment plans ——— */
.btn-main--sm {
    padding: 0.65rem 1rem;
    font-size: 0.875rem;
}

#plans .plans-grid {
    margin-top: 0.25rem;
}

/* Plan grid breakpoints live in theme-invest.css (loads after this file) */

@media (prefers-reduced-motion: reduce) {
    .invest-carousel-plans__new,
    .inv-plan-card {
        transition: none;
    }

    .invest-carousel-plans__inner:hover .invest-carousel-plans__new,
    .inv-plan-card:hover {
        transform: none;
    }
}

/* ——— Stats cards ——— */
.stats-card {
    height: 100%;
}

.stats-card_texts {
    min-width: 0;
}

.stats-card_value {
    word-break: break-word;
}

/* ——— Referral network ——— */
@media (max-width: 991.98px) {
    .referrals-system {
        grid-template-columns: 1fr;
    }

    .referral-network {
        min-height: 0;
    }

    .referral-plan-boost__list {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (max-width: 575.98px) {
    .referral-network__layout {
        grid-template-columns: 1fr;
        gap: 1.25rem;
    }

    .referral-network__hub {
        width: 100%;
        min-height: 120px;
    }

    .referral-network__levels {
        gap: 0.5rem;
    }

    .referral-node__card {
        padding: 0.65rem 0.85rem;
    }

    .referral-node__pct {
        font-size: 1.15rem;
    }

    .referral-plan-boost__list {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (prefers-reduced-motion: reduce) {
    .referral-ring {
        animation: none;
    }

    .referral-node:hover .referral-node__card {
        transform: none;
    }
}

/* ——— Tables ——— */
.table-scroll {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
}

.table-scroll table {
    min-width: 480px;
    width: 100%;
}

@media (max-width: 767.98px) {
    .table-responsive--cards .custom-table__table thead {
        display: none;
    }

    .table-responsive--cards .custom-table__table tbody tr {
        display: block;
        margin-bottom: 1rem;
        border-radius: var(--pm-radius);
        overflow: hidden;
        border: 1px solid var(--pm-border);
    }

    .table-responsive--cards .custom-table__td {
        display: flex;
        justify-content: space-between;
        align-items: center;
        gap: 1rem;
        padding: 0.75rem 1rem !important;
        border-radius: 0 !important;
        text-align: right !important;
    }

    .table-responsive--cards .custom-table__td::before {
        content: attr(data-label);
        font-weight: 500;
        color: var(--pm-text-muted);
        text-transform: uppercase;
        font-size: 0.7rem;
        letter-spacing: 0.05em;
    }

    .table-responsive--cards .custom-table__td:first-child {
        font-weight: 600;
    }
}

/* ——— Footer ——— */
.site-footer {
    margin-top: auto;
    border-top: 1px solid var(--pm-border);
    background: var(--pm-bg-elevated);
}

.site-footer__inner {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1.25rem;
    padding: 1.75rem 0 2rem;
    text-align: center;
}

.site-footer__brand {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    text-decoration: none;
    color: var(--pm-heading);
    font-size: 1.1rem;
    font-weight: 500;
    transition: color 0.2s ease;
}

.site-footer__brand:hover {
    color: var(--pm-accent);
}

.site-footer__nav {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: center;
    gap: 0.35rem 0.75rem;
    margin: 0;
    max-width: 100%;
}

.site-footer__nav a {
    color: var(--pm-text-secondary);
    text-decoration: none;
    font-size: 0.875rem;
    font-weight: 500;
    padding: 0.25rem 0.5rem;
    border-radius: 6px;
    transition: color 0.2s ease, background 0.2s ease;
}

.site-footer__nav a:hover {
    color: var(--pm-accent);
    background: rgba(124, 53, 255, 0.08);
}

.site-footer__copy {
    margin: 0;
    font-size: 0.8rem;
    color: var(--pm-text-muted);
    letter-spacing: 0.02em;
}

@media (min-width: 768px) {
    .site-footer__inner {
        gap: 1rem;
    }

    .site-footer__nav {
        gap: 0.25rem 1.25rem;
    }
}

/* ——— Auth ——— */
.page-hero--compact {
    padding: 2rem 0 3rem;
}

.auth-card {
    background: var(--pm-bg-card);
    border: 1px solid var(--pm-border);
    border-radius: var(--pm-radius);
    padding: clamp(1.5rem, 4vw, 2.5rem);
    box-shadow: var(--pm-shadow);
    text-align: left;
}

.auth-card__title {
    margin-bottom: 0.25rem;
}

.auth-card__sub {
    color: var(--pm-text-muted);
    margin-bottom: 1.5rem;
}

.auth-form .form-group {
    margin-bottom: 1rem;
}

.auth-form label {
    display: block;
    font-size: 0.85rem;
    margin-bottom: 0.35rem;
    color: var(--pm-text-secondary);
}

.auth-form .form-control {
    width: 100%;
    padding: 0.65rem 0.85rem;
    border-radius: 8px;
    border: 1px solid var(--pm-border-strong);
    background: var(--pm-bg-muted);
    color: var(--pm-text);
}

.auth-form .form-control:focus {
    outline: none;
    border-color: var(--pm-accent);
    box-shadow: 0 0 0 3px var(--pm-accent-glow);
}

.auth-card__footer {
    margin-top: 1.25rem;
    text-align: center;
    font-size: 0.9rem;
}

.auth-card__footer a {
    color: var(--pm-accent);
}

.auth-card__footer--demo {
    margin-top: 0.75rem;
    padding-top: 0.75rem;
    border-top: 1px solid var(--pm-border);
}

.auth-card__footer--demo a {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    font-weight: 500;
}

/* ——— Notes panels mobile ——— */
@media (max-width: 991.98px) {
    .notes-panel__inner {
        margin-bottom: 1rem;
    }
}

/* ——— Section spacing ——— */
@media (max-width: 767.98px) {
    .section,
    .section-two,
    .section-three {
        padding: 3rem 0;
    }

    .page-hero {
        padding: 2rem 0 1.5rem;
    }

    .section-texts {
        text-align: center;
        align-items: center;
    }

    .section-three .section-texts {
        text-align: left;
        align-items: flex-start;
    }
}
