/* ============================================================
   style.css – Optimized & Deduplicated
   ============================================================ */

/* ─── Variables ──────────────────────────────────────────── */
:root {
    --text-primary: #1d1d1f;
    --text-secondary: #6e6e73;
    --border: #d2d2d7;
    --bg-light: #ffffff;
    --bg-lighter: #fbfbfd;
    --accent: #0071e3;
    --accent-dark: #0077ed;
    --radius-sm: 12px;
    --radius-lg: 18px;
    --radius-pill: 980px;
    --shadow-sm: 0 2px 8px rgba(0, 0, 0, 0.04);
    --shadow-md: 0 4px 16px rgba(0, 0, 0, 0.08);
    --shadow-lg: 0 8px 32px rgba(0, 0, 0, 0.12);
    --shadow-hover: 0 12px 48px rgba(0, 0, 0, 0.15);
    --transition: all 0.4s cubic-bezier(0.28, 0.11, 0.32, 1);
    --transition-fast: all 0.25s cubic-bezier(0.28, 0.11, 0.32, 1);
}

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

html {
    scroll-behavior: smooth;
}

/* ─── Base ───────────────────────────────────────────────── */
body {
    font-family:
        -apple-system, BlinkMacSystemFont, "SF Pro Text", "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
    line-height: 1.47059;
    font-weight: 400;
    letter-spacing: -0.022em;
    color: var(--text-primary);
    overflow-x: hidden;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    text-rendering: optimizeLegibility;
    background: #fff;
}

a {
    text-decoration: none;
    color: inherit;
}

::selection {
    background: var(--text-primary);
    color: white;
}

/* ─── Global Navigation ──────────────────────────────────── */
.global-nav {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1000;
    height: 72px;
    background: rgba(255, 255, 255, 0.98);
    backdrop-filter: saturate(180%) blur(24px);
    -webkit-backdrop-filter: saturate(180%) blur(24px);
    border-bottom: 1px solid rgba(0, 0, 0, 0.08);
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.04);
    transition: all 0.3s cubic-bezier(0.22, 0.61, 0.36, 1);
}

.global-nav.scrolled {
    background: rgba(255, 255, 255, 0.96);
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.08);
}

.nav-wrapper {
    height: 100%;
}

.nav-content {
    max-width: 1280px;
    margin: 0 auto;
    height: 100%;
    padding: 0 20px;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

/* Logo */
.logo {
    display: flex;
    align-items: center;
    text-decoration: none;
    transition: transform 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.logo img {
    height: 56px;
    width: auto;
    display: block;
    transition: transform 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.logo:hover,
.logo:hover img {
    transform: scale(1.05);
}

/* Nav items list */
.nav-items {
    display: flex;
    align-items: center;
    gap: 8px;
    list-style: none;
    margin: 0;
    padding: 0;
}

.nav-items li {
    position: relative;
}

.nav-items li:not(.user-menu) a {
    color: #1d1d1f;
    font-size: 15px;
    font-weight: 500;
    letter-spacing: -0.01em;
    text-decoration: none;
    opacity: 0.85;
    position: relative;
    padding: 10px 16px;
    display: block;
    white-space: nowrap;
    border-radius: 12px;
    transition: all 0.3s cubic-bezier(0.22, 0.61, 0.36, 1);
}

.nav-items li:not(.user-menu) a:hover,
.nav-items li:not(.user-menu) a:focus {
    opacity: 1;
    color: #0071e3;
    background: rgba(0, 113, 227, 0.04);
    transform: translateY(-1px);
}

/* Override for submit buttons - keep original background */
.nav-items li .submit-btn:hover,
.nav-items li .submit-btn:focus {
    background: linear-gradient(135deg, #1d1d1f 0%, #000000 100%) !important;
    color: white !important;
    opacity: 1;
    transform: scale(1.05) translateY(0);
}

.nav-items li .submit-btn:active {
    background: linear-gradient(135deg, #1d1d1f 0%, #000000 100%) !important;
    color: white !important;
    transform: scale(1.02) translateY(0);
}

/* Active underline indicator (uses ::before) */
.nav-items li:not(.user-menu) a::before {
    content: "";
    position: absolute;
    bottom: 6px;
    left: 50%;
    width: 0;
    height: 2px;
    background: linear-gradient(90deg, transparent, #0071e3, transparent);
    transform: translateX(-50%);
    border-radius: 2px;
    transition: width 0.4s cubic-bezier(0.22, 0.61, 0.36, 1);
}

.nav-items li:not(.user-menu) a:hover::before {
    width: calc(100% - 32px);
}

.nav-items a.active {
    opacity: 1;
    font-weight: 520;
}

.nav-items a.active::before {
    width: 60%;
}

/* Contact link accent */
.contact {
    font-weight: 520;
    color: #0071e3 !important;
    opacity: 1 !important;
}

.contact::before {
    background: #0071e3 !important;
}

/* ─── Nav CTA Pill Buttons (Login / Register) ─────────────
   Note: .nav-items .submit-btn overrides the base .submit-btn
   (footer form button) via higher specificity.
   ──────────────────────────────────────────────────────── */
.nav-items .submit-btn {
    font-weight: 600;
    color: white !important;
    opacity: 1;
    background: linear-gradient(135deg, #1d1d1f 0%, #000000 100%);
    padding: 10px 24px;
    border-radius: var(--radius-pill);
    line-height: 1.4;
    box-shadow:
        0 2px 8px rgba(0, 0, 0, 0.15),
        inset 0 1px 0 rgba(255, 255, 255, 0.1);
    transition: all 0.3s cubic-bezier(0.22, 0.61, 0.36, 1);
}

/* Suppress the underline pseudo-element on pill buttons */
.nav-items .submit-btn::before {
    display: none;
}

/* ─── User Menu ──────────────────────────────────────────── */
.user-menu {
    position: relative;
}

.user-btn {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 8px 16px 8px 12px;
    border: 1px solid rgba(0, 0, 0, 0.12);
    border-radius: var(--radius-pill);
    background: linear-gradient(135deg, #ffffff 0%, #fafafa 100%);
    cursor: pointer;
    font-size: 14px;
    font-weight: 500;
    color: #1d1d1f;
    line-height: 1.4;
    white-space: nowrap;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.04);
    transition: all 0.3s cubic-bezier(0.22, 0.61, 0.36, 1);
}

.user-btn:hover {
    border-color: rgba(0, 0, 0, 0.2);
    background: #ffffff;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.08);
    transform: translateY(-1px);
}

.user-btn:active {
    transform: translateY(0);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.06);
}

.user-btn ion-icon {
    font-size: 22px;
    color: #0071e3;
    transition: transform 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.user-btn:hover ion-icon {
    transform: scale(1.1);
}

.user-btn span {
    max-width: 120px;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* User Popover Dropdown */
.user-popover {
    position: absolute;
    top: calc(100% + 12px);
    right: 0;
    min-width: 220px;
    background: rgba(255, 255, 255, 0.98);
    backdrop-filter: saturate(180%) blur(24px);
    -webkit-backdrop-filter: saturate(180%) blur(24px);
    border: 1px solid rgba(0, 0, 0, 0.08);
    border-radius: 16px;
    box-shadow:
        0 8px 32px rgba(0, 0, 0, 0.12),
        0 2px 8px rgba(0, 0, 0, 0.04);
    padding: 8px;
    display: none;
    opacity: 0;
    z-index: 1000;
    transform: translateY(-8px) scale(0.96);
    transition: all 0.3s cubic-bezier(0.22, 0.61, 0.36, 1);
}

.user-popover.show {
    display: block;
    opacity: 1;
    transform: translateY(0) scale(1);
}

/* Arrow pointer */
.user-popover::before {
    content: "";
    position: absolute;
    top: -6px;
    right: 20px;
    width: 12px;
    height: 12px;
    background: rgba(255, 255, 255, 0.98);
    border-left: 1px solid rgba(0, 0, 0, 0.08);
    border-top: 1px solid rgba(0, 0, 0, 0.08);
    transform: rotate(45deg);
}

.user-popover a {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 16px;
    color: #1d1d1f;
    font-size: 14px;
    font-weight: 450;
    line-height: 1;
    border-radius: 10px;
    transition: all 0.2s cubic-bezier(0.22, 0.61, 0.36, 1);
}

.user-popover a:not(:last-child) {
    margin-bottom: 4px;
}

.user-popover a:hover {
    background: rgba(0, 113, 227, 0.06);
    color: #0071e3;
    transform: translateX(2px);
}

.user-popover a ion-icon {
    font-size: 20px;
    color: #6e6e73;
    transition: color 0.2s ease;
}

.user-popover a:hover ion-icon {
    color: #0071e3;
}

/* ─── Hamburger Button ───────────────────────────────────── */
.hamburger {
    display: none;
    background: none;
    border: none;
    cursor: pointer;
    padding: 8px;
    z-index: 1001;
    transition: transform 0.3s ease;
}

.hamburger:hover {
    transform: scale(1.1);
}

.hamburger-icon {
    width: 24px;
    height: 18px;
    position: relative;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
}

.hamburger-line {
    width: 100%;
    height: 2px;
    background: #1d1d1f;
    border-radius: 2px;
    transform-origin: center;
    transition: all 0.3s cubic-bezier(0.22, 0.61, 0.36, 1);
}

.hamburger.active .hamburger-line:nth-child(1) {
    transform: translateY(8px) rotate(45deg);
}

.hamburger.active .hamburger-line:nth-child(2) {
    opacity: 0;
    transform: scaleX(0);
}

.hamburger.active .hamburger-line:nth-child(3) {
    transform: translateY(-8px) rotate(-45deg);
}

/* ─── Mobile Nav Overlay ─────────────────────────────────── */
.mobile-nav-overlay {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.4);
    z-index: 999;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.mobile-nav-overlay.active {
    display: block;
    opacity: 1;
}

/* ─── Nav Overlay (mega-menu backdrop) ───────────────────── */
.nav-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.25);
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
    z-index: 997;
    transition: var(--transition);
}

.nav-overlay.active {
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
}

/* ─── Mega Menu ──────────────────────────────────────────── */
.mega-menu {
    position: fixed;
    top: 72px;
    left: 0;
    right: 0;
    background: rgba(252, 252, 253, 0.97);
    backdrop-filter: saturate(200%) blur(28px);
    -webkit-backdrop-filter: saturate(200%) blur(28px);
    box-shadow:
        0 1px 0 rgba(0, 0, 0, 0.06),
        0 8px 24px rgba(0, 0, 0, 0.06),
        0 2px 6px rgba(0, 0, 0, 0.04);
    border-bottom: 1px solid rgba(0, 0, 0, 0.07);
    padding: 20px 0 24px;
    opacity: 0;
    visibility: hidden;
    transform: translateY(-8px);
    z-index: 998;
    transition:
        opacity 0.25s cubic-bezier(0.22, 0.61, 0.36, 1),
        transform 0.25s cubic-bezier(0.22, 0.61, 0.36, 1),
        visibility 0s linear 0.25s;
}

/* Invisible hover bridge between nav bar and mega menu */
.mega-menu::before {
    content: "";
    position: absolute;
    top: -16px;
    left: 0;
    right: 0;
    height: 16px;
    background: transparent;
}

.mega-menu.active {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
    transition-delay: 0s;
}

.mega-menu-content {
    max-width: 1100px;
    margin: 0 auto;
    padding: 0 40px;
}

/* Three-column grid with divider lines */
.menu-grid-three {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 0;
}

.mega-column+.mega-column {
    border-left: 1px solid rgba(0, 0, 0, 0.07);
    padding-left: 28px;
}

.mega-column:not(:last-child) {
    padding-right: 28px;
}

/* Column heading */
.mega-column h3 {
    font-size: 10px;
    font-weight: 600;
    color: #a1a1a6;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    margin-bottom: 10px;
    display: flex;
    align-items: center;
    gap: 6px;
}

.mega-column h3::after {
    content: "";
    flex: 1;
    height: 1px;
    background: rgba(0, 0, 0, 0.07);
    margin-left: 4px;
}

/* Primary column accent */
.mega-column.primary h3 {
    color: #0071e3;
}

.mega-column.primary h3::before {
    content: "";
    display: inline-block;
    width: 5px;
    height: 5px;
    border-radius: 50%;
    background: #0071e3;
    flex-shrink: 0;
}

.mega-column.primary h3::after {
    background: rgba(0, 113, 227, 0.18);
}

/* Menu item list */
.mega-column ul {
    list-style: none;
    padding: 0;
    margin: 0;
}

.mega-column li {
    margin-bottom: 1px;
}

.mega-column a {
    display: flex;
    align-items: center;
    gap: 9px;
    padding: 7px 9px 7px 8px;
    font-size: 15px;
    font-weight: 440;
    color: #1d1d1f;
    line-height: 1.4;
    border-radius: 7px;
    position: relative;
    transition:
        background 0.18s ease,
        color 0.18s ease,
        transform 0.18s cubic-bezier(0.22, 0.61, 0.36, 1);
}

.mega-column a:hover {
    background: rgba(0, 113, 227, 0.07);
    color: #0071e3;
    transform: translateX(2px);
}

.mega-column a:active {
    background: rgba(0, 113, 227, 0.1);
    transform: translateX(2px) scale(0.99);
}

/* Hover arrow */
.mega-column a::after {
    content: "›";
    position: absolute;
    right: 10px;
    font-size: 14px;
    color: #0071e3;
    line-height: 1;
    opacity: 0;
    transform: translateX(-4px);
    transition:
        opacity 0.18s ease,
        transform 0.18s cubic-bezier(0.22, 0.61, 0.36, 1);
}

.mega-column a:hover::after {
    opacity: 0.7;
    transform: translateX(0);
}

/* Menu icon */
.menu-icon {
    flex-shrink: 0;
    width: 15px;
    height: 15px;
    color: #a1a1a6;
    opacity: 0.85;
    transition: color 0.18s ease;
}

.mega-column a:hover .menu-icon {
    color: #0071e3;
    opacity: 1;
}

/* OS Info Box */
.os-info-box {
    background: rgba(0, 0, 0, 0.025);
    border: 1px solid rgba(0, 0, 0, 0.07);
    border-radius: 9px;
    padding: 12px 14px;
    margin-bottom: 12px;
}

.os-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 6px 0;
}

.os-item:first-child {
    padding-top: 0;
}

.os-item:last-child {
    padding-bottom: 0;
}

.os-item:not(:last-child) {
    border-bottom: 1px solid rgba(0, 0, 0, 0.055);
}

.os-icon {
    flex-shrink: 0;
    width: 22px;
    height: 22px;
    color: #6e6e73;
}

.os-item>div {
    flex: 1;
}

.os-item strong {
    display: block;
    font-size: 12.5px;
    font-weight: 580;
    color: #1d1d1f;
    letter-spacing: -0.01em;
    margin-bottom: 1px;
}

.os-item p {
    font-size: 11.5px;
    color: #a1a1a6;
    margin: 0;
    line-height: 1.3;
}

/* ─── Hero ───────────────────────────────────────────────── */
.hero {
    position: relative;
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    overflow: hidden;
    background: #000;
}

.hero-video-container {
    position: absolute;
    inset: 0;
    overflow: hidden;
}

/* Merged: base + will-change + transition */
.hero-video {
    position: absolute;
    top: 50%;
    left: 50%;
    min-width: 100%;
    min-height: 100%;
    width: auto;
    height: auto;
    transform: translate(-50%, -50%);
    object-fit: cover;
    z-index: 1;
    will-change: transform;
    transition: transform 0.1s ease-out;
}

.hero-overlay {
    position: absolute;
    inset: 0;
    background: rgba(0, 0, 0, 0.58);
    z-index: 2;
}

.hero-content {
    position: relative;
    z-index: 3;
    max-width: 980px;
    margin: 0 auto;
    padding: 0 24px;
    color: white;
}

.hero h1 {
    font-size: clamp(48px, 8vw, 84px);
    font-weight: 700;
    line-height: 1.05;
    letter-spacing: -0.025em;
    margin-bottom: 20px;
}

.hero p {
    font-size: clamp(20px, 4vw, 28px);
    font-weight: 400;
    line-height: 1.3;
    max-width: 720px;
    margin: 0 auto 40px;
    opacity: 0.92;
}

/* ─── CTA Buttons ────────────────────────────────────────── */
.cta-buttons {
    display: flex;
    gap: 16px;
    justify-content: center;
    align-items: center;
    flex-wrap: wrap;
}

.cta-btn {
    padding: 14px 28px;
    border-radius: var(--radius-pill);
    font-size: 17px;
    font-weight: 500;
    letter-spacing: -0.022em;
    border: none;
    cursor: pointer;
    display: inline-block;
    transition: var(--transition);
}

.cta-btn.primary {
    background: white;
    color: var(--text-primary);
}

.cta-btn.primary:hover {
    background: rgba(255, 255, 255, 0.92);
    transform: scale(1.05);
}

.cta-btn.secondary {
    background: transparent;
    color: white;
    border: 2px solid rgba(255, 255, 255, 0.8);
}

.cta-btn.secondary:hover {
    background: rgba(255, 255, 255, 0.1);
    border-color: white;
    transform: scale(1.05);
}

/* ─── Fade-in Animations ─────────────────────────────────── */
.fade-in-up {
    opacity: 0;
    animation: fadeInUp 0.8s ease-out forwards;
}

.fade-in-up:nth-child(1) {
    animation-delay: 0.2s;
}

.fade-in-up:nth-child(2) {
    animation-delay: 0.4s;
}

.fade-in-up:nth-child(3) {
    animation-delay: 0.6s;
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }

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

/* ─── Scroll Animations ──────────────────────────────────── */
.scroll-animate {
    opacity: 0;
    transform: translateY(40px);
    transition:
        opacity 0.6s ease-out,
        transform 0.6s ease-out;
}

.scroll-animate.visible {
    opacity: 1;
    transform: translateY(0);
}

/* Staggered delays for detail cards */
.detail-card.scroll-animate:nth-child(1) {
    transition-delay: 0.05s;
}

.detail-card.scroll-animate:nth-child(2) {
    transition-delay: 0.1s;
}

.detail-card.scroll-animate:nth-child(3) {
    transition-delay: 0.15s;
}

.detail-card.scroll-animate:nth-child(4) {
    transition-delay: 0.2s;
}

.detail-card.scroll-animate:nth-child(5) {
    transition-delay: 0.25s;
}

.detail-card.scroll-animate:nth-child(6) {
    transition-delay: 0.3s;
}

.detail-card.scroll-animate:nth-child(7) {
    transition-delay: 0.35s;
}

.detail-card.scroll-animate:nth-child(8) {
    transition-delay: 0.4s;
}

.service-card,
.detail-section {
    opacity: 0;
    transform: translateY(30px);
    animation: fadeInUpScroll 0.8s ease-out forwards;
}

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

/* ─── Static / CMS Pages ─────────────────────────────────── */
.static-page-section {
    background: var(--bg-lighter);
    padding: 50px 0;
}

.static-container {
    max-width: 980px;
    margin: 0 auto;
    padding: 0 22px;
}

.static-header {
    text-align: center;
    margin-bottom: 72px;
}

.static-header h2 {
    font-size: 56px;
    line-height: 1.08;
    font-weight: 700;
    letter-spacing: -0.02em;
    margin-bottom: 12px;
    color: var(--text-primary);
}

.static-content {
    background: var(--bg-light);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: 64px 72px;
    box-shadow: var(--shadow-md);
    font-size: 17px;
    line-height: 1.65;
    color: var(--text-secondary);
}

.static-content h1,
.static-content h2,
.static-content h3,
.static-content h4 {
    color: var(--text-primary);
    margin-top: 40px;
    margin-bottom: 12px;
    font-weight: 600;
    letter-spacing: -0.015em;
}

.static-content h3 {
    font-size: 24px;
}

.static-content p {
    margin-bottom: 16px;
}

.static-content ul,
.static-content ol {
    margin: 16px 0 24px 22px;
}

.static-content li {
    margin-bottom: 8px;
}

.static-content a {
    color: var(--accent);
    text-decoration: underline;
}

.static-content img,
.static-content table {
    max-width: 100%;
    height: auto;
}

/* ─── Services Section ───────────────────────────────────── */
.services-section {
    background:
        radial-gradient(1200px 400px at 50% -200px, rgba(0, 0, 0, 0.04), transparent 60%),
        linear-gradient(180deg, #f5f5f7 0%, #fafafa 45%, #ffffff 100%);
}

.section-header {
    text-align: center;
    margin-bottom: 60px;
}

.section-header h2 {
    font-size: 48px;
    font-weight: 600;
    color: #1d1d1f;
    letter-spacing: -0.5px;
    margin-bottom: 12px;
}

.section-header p {
    font-size: 21px;
    line-height: 1.38;
    font-weight: 400;
    letter-spacing: 0.007em;
    color: #86868b;
}

.service-card {
    background: #ffffff;
    overflow: hidden;
    display: grid;
    grid-template-columns: 1fr 1fr;
    margin-bottom: 28px;
    min-height: 500px;
    align-items: stretch;
    border-radius: 36px;
    box-shadow:
        0 1px 2px rgba(0, 0, 0, 0.04),
        0 12px 30px rgba(0, 0, 0, 0.06);
    transition:
        transform 0.6s cubic-bezier(0.16, 1, 0.3, 1),
        box-shadow 0.6s cubic-bezier(0.16, 1, 0.3, 1);
}

@media (hover: hover) {
    .service-card:hover {
        transform: translateY(-4px);
        box-shadow:
            0 4px 8px rgba(0, 0, 0, 0.05),
            0 20px 40px rgba(0, 0, 0, 0.08);
    }
}

.service-card.reverse {
    direction: rtl;
}

.service-card.reverse>* {
    direction: ltr;
}

.service-card.reverse .service-visual {
    border-radius: 0 36px 36px 0;
}

.service-card.reverse .service-content {
    border-radius: 36px 0 0 36px;
    box-shadow: 1px 0 0 rgba(0, 0, 0, 0.03);
}

.service-visual {
    position: relative;
    overflow: hidden;
    height: 100%;
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 36px 0 0 36px;
}

.service-visual svg {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    display: block;
}

.service-content {
    padding: 80px 70px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    background: #ffffff;
    border-radius: 0 36px 36px 0;
    box-shadow: -1px 0 0 rgba(0, 0, 0, 0.03);
}

.service-content h3 {
    font-size: 40px;
    font-weight: 600;
    color: #1d1d1f;
    letter-spacing: -0.5px;
    line-height: 1.08;
    margin-bottom: 20px;
}

.service-content p {
    font-size: 17px;
    line-height: 1.47;
    font-weight: 400;
    letter-spacing: -0.012em;
    color: #86868b;
    margin-bottom: 24px;
}

.service-cta {
    color: #0071e3;
    font-size: 17px;
    font-weight: 400;
    display: inline-block;
}

.service-cta:hover {
    text-decoration: underline;
}

.icon {
    stroke: white;
    fill: none;
    stroke-linecap: round;
    stroke-linejoin: round;
}

/* ─── Detail Sections ────────────────────────────────────── */
.detail-section.apple-style {
    padding: 60px 0;
    background: white;
}

.detail-section.apple-style.alt {
    background: var(--bg-lighter);
}

.detail-container-full {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 22px;
}

.detail-header {
    text-align: center;
    max-width: 800px;
    margin: 0 auto 72px;
}

.detail-eyebrow {
    font-size: 17px;
    line-height: 1.47;
    font-weight: 600;
    letter-spacing: 0.012em;
    color: var(--accent);
    margin-bottom: 8px;
    text-transform: uppercase;
}

.detail-header h2 {
    font-size: 56px;
    line-height: 1.08;
    font-weight: 700;
    letter-spacing: -0.02em;
    margin-bottom: 16px;
}

.detail-lead {
    font-size: 24px;
    line-height: 1.38;
    font-weight: 400;
    letter-spacing: 0.007em;
    color: var(--text-secondary);
    margin-bottom: 32px;
}

.os-info-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px;
    max-width: 600px;
    margin: 32px auto 0;
}

.os-badge {
    background: var(--bg-light);
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    padding: 20px 24px;
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.os-label {
    font-size: 15px;
    font-weight: 600;
    letter-spacing: -0.015em;
    color: var(--text-primary);
}

.os-version {
    font-size: 13px;
    font-weight: 400;
    letter-spacing: -0.012em;
    color: var(--text-secondary);
}

/* Detail Cards Grid */
.detail-cards-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
    gap: 24px;
    margin: 0 auto 56px;
}

.detail-cards-grid.cols-4 {
    grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
}

.detail-card {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    background: var(--bg-light);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: 32px;
    position: relative;
    overflow: hidden;
    box-shadow: var(--shadow-sm);
    transition: var(--transition);
}

.detail-section.apple-style.alt .detail-card {
    background: white;
}

.detail-card::before {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(135deg, rgba(0, 113, 227, 0.05) 0%, transparent 100%);
    opacity: 0;
    transition: opacity 0.4s ease;
}

.detail-card:hover {
    transform: translateY(-8px);
    box-shadow: var(--shadow-hover);
    border-color: rgba(0, 113, 227, 0.2);
}

.detail-card:hover::before {
    opacity: 1;
}

.detail-card-icon {
    width: 48px;
    height: 48px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 20px;
    line-height: 0;
}

.detail-card-icon svg {
    display: block;
    transform: translateY(-0.5px);
    transition: transform 0.3s ease;
}

.detail-card:hover .detail-card-icon svg {
    transform: scale(1.1) rotate(5deg);
}

.detail-card h3 {
    font-size: 24px;
    font-weight: 700;
    letter-spacing: -0.015em;
    margin-bottom: 12px;
    line-height: 1.2;
}

.detail-card p {
    font-size: 15px;
    line-height: 1.47;
    font-weight: 400;
    letter-spacing: -0.012em;
    color: var(--text-secondary);
}

.detail-cta-container {
    text-align: center;
    margin-top: 56px;
}

.detail-cta-large {
    display: inline-block;
    background: var(--text-primary);
    color: white;
    padding: 16px 36px;
    border-radius: var(--radius-pill);
    font-size: 19px;
    font-weight: 500;
    letter-spacing: -0.016em;
    transition: var(--transition);
}

.detail-cta-large:hover {
    background: #000;
    transform: scale(1.05);
    box-shadow: var(--shadow-lg);
}

/* Legacy two-column detail layout */
.detail-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 22px;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 96px;
    align-items: center;
}

.detail-container.reverse {
    direction: rtl;
}

.detail-container.reverse>* {
    direction: ltr;
}

.detail-content h2 {
    font-size: 56px;
    line-height: 1.08;
    font-weight: 700;
    letter-spacing: -0.02em;
    margin-bottom: 16px;
}

.detail-content .subheading {
    font-size: 24px;
    line-height: 1.38;
    font-weight: 400;
    letter-spacing: 0.007em;
    color: var(--text-secondary);
    margin-bottom: 24px;
}

.detail-content p {
    font-size: 17px;
    line-height: 1.47;
    font-weight: 400;
    letter-spacing: -0.012em;
    color: var(--text-secondary);
    margin-bottom: 16px;
}

.detail-list {
    list-style: none;
    margin: 32px 0;
}

.detail-list li {
    font-size: 17px;
    line-height: 1.47;
    padding: 16px 0 16px 28px;
    border-bottom: 1px solid var(--border);
    position: relative;
    letter-spacing: -0.015em;
}

.detail-list li:last-child {
    border-bottom: none;
}

.detail-list li::before {
    content: "✓";
    position: absolute;
    left: 0;
    color: var(--accent);
    font-weight: 600;
    font-size: 18px;
}

.detail-cta {
    display: inline-block;
    margin-top: 32px;
    font-size: 19px;
    font-weight: 500;
    letter-spacing: -0.016em;
    color: var(--accent);
    transition: color 0.3s ease;
}

.detail-cta:hover {
    color: var(--accent-dark);
}

.detail-visual {
    height: 500px;
    border-radius: var(--radius-lg);
    overflow: hidden;
    box-shadow: var(--shadow-lg);
}

.detail-visual img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

/* ─── Footer ─────────────────────────────────────────────── */
.footer {
    background: var(--bg-light);
    padding: 40px 0 20px;
    border-top: 1px solid var(--border);
}

.footer-main {
    max-width: 1400px;
    margin: 0 auto 32px;
    padding: 0 40px;
    display: grid;
    grid-template-columns: 7fr 3fr;
    gap: 60px;
}

.footer-links-section {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
    gap: 32px;
}

.footer-column h4 {
    font-size: 11px;
    font-weight: 600;
    color: var(--text-secondary);
    margin-bottom: 14px;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.footer-column ul {
    list-style: none;
}

.footer-column li {
    margin-bottom: 8px;
}

.footer-column a {
    font-size: 13px;
    color: var(--text-secondary);
    display: inline-block;
    transition: color 0.2s ease;
}

.footer-column a:hover {
    color: var(--text-primary);
}

/* Footer contact form */
.footer-contact {
    height: fit-content;
}

.footer-contact h3 {
    font-size: 11px;
    font-weight: 600;
    color: var(--text-secondary);
    margin-bottom: 14px;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.footer-contact p {
    display: none;
}

.contact-form .form-group {
    margin-bottom: 10px;
    position: relative;
}

.char-counter {
    position: absolute;
    bottom: 8px;
    right: 12px;
    font-size: 11px;
    color: var(--text-secondary);
    background: white;
    padding: 2px 6px;
    border-radius: 4px;
    pointer-events: none;
}

#charCount {
    font-weight: 500;
    color: var(--text-primary);
}

.contact-form input,
.contact-form select,
.contact-form textarea {
    width: 100%;
    padding: 10px 12px;
    font-size: 13px;
    font-family: inherit;
    color: var(--text-primary);
    background: white;
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    transition: var(--transition-fast);
}

.contact-form input:focus,
.contact-form select:focus,
.contact-form textarea:focus {
    outline: none;
    border-color: var(--accent);
    box-shadow: 0 0 0 3px rgba(0, 113, 227, 0.06);
}

.contact-form textarea {
    min-height: 70px;
    resize: vertical;
    padding-bottom: 28px;
}

.contact-form select {
    cursor: pointer;
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg width='12' height='8' viewBox='0 0 12 8' fill='none' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M1 1.5L6 6.5L11 1.5' stroke='%236e6e73' stroke-width='1.5' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 12px center;
    padding-right: 36px;
}

/* Footer form submit button
   Note: .nav-items .submit-btn overrides this for the nav pill buttons */
.submit-btn {
    width: 100%;
    background: var(--text-primary);
    color: white;
    padding: 10px 20px;
    border-radius: var(--radius-sm);
    font-size: 13px;
    font-weight: 500;
    border: none;
    cursor: pointer;
    transition: var(--transition-fast);
}

.submit-btn:hover {
    transform: translateY(-1px);
}

.submit-btn:active {
    transform: translateY(0);
}

/* Phone group — override global .contact-form input styles that break the
   compound prefix+input layout */
.contact-form .phone-group {
    padding: 0;
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    background: white;
    width: 100%;
}

.contact-form .phone-group:focus-within {
    border-color: var(--accent);
    box-shadow: 0 0 0 3px rgba(0, 113, 227, 0.06);
}

/* Tel input inside the group must NOT inherit the outer border/radius */
.contact-form .phone-group input[type="tel"] {
    border: none !important;
    border-radius: 0 !important;
    box-shadow: none !important;
    outline: none !important;
    width: auto;
    flex: 1;
    background: transparent;
    padding: 10px 12px;
}

.contact-form .phone-group input[type="tel"]:focus {
    border: none !important;
    box-shadow: none !important;
}

/* Footer bottom bar */
.footer-bottom {
    max-width: 1400px;
    margin: 0 auto;
    padding: 20px 40px 0;
    border-top: 1px solid var(--border);
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 16px;
}

.footer-bottom p {
    font-size: 12px;
    color: var(--text-secondary);
}

.footer-bottom-links {
    display: flex;
    gap: 24px;
    align-items: center;
}

.footer-bottom-links a {
    font-size: 12px;
    color: var(--text-secondary);
    transition: color 0.2s ease;
}

.footer-bottom-links a:hover {
    color: var(--text-primary);
}

.footer-bottom-links span {
    color: var(--border);
    font-size: 12px;
}

/* ============================================================
   MEDIA QUERIES (consolidated, mobile-last order)
   ============================================================ */

/* ── ≥ 1440px ───────────────────────────────────────────── */
@media (min-width: 1440px) {
    .services-section {
        padding: 20px 150px;
    }
}

/* ── ≥ 1024px ───────────────────────────────────────────── */
@media (min-width: 1024px) {
    .services-section {
        padding: 20px 120px;
    }
}

/* ── ≤ 1024px ───────────────────────────────────────────── */
@media (max-width: 1024px) {

    /* Nav – show hamburger, collapse items */
    .hamburger {
        display: block;
    }

    .nav-items {
        position: fixed;
        top: 72px;
        left: 0;
        right: 0;
        background: rgba(255, 255, 255, 0.98);
        backdrop-filter: saturate(180%) blur(32px);
        -webkit-backdrop-filter: saturate(180%) blur(32px);
        flex-direction: column;
        align-items: stretch;
        gap: 0;
        padding: 0;
        max-height: 0;
        overflow: hidden;
        opacity: 0;
        z-index: 1000;
        border-bottom: 1px solid rgba(0, 0, 0, 0.08);
        box-shadow: 0 12px 32px rgba(0, 0, 0, 0.1);
        transition: all 0.4s cubic-bezier(0.22, 0.61, 0.36, 1);
    }

    .nav-items.active {
        max-height: calc(100vh - 72px);
        opacity: 1;
        overflow-y: auto;
        padding-bottom: 20px;
    }

    .nav-items li {
        border-bottom: 1px solid rgba(0, 0, 0, 0.05);
        margin: 0 12px;
        border-radius: 12px;
        overflow: hidden;
    }

    .nav-items li:first-child {
        margin-top: 12px;
    }

    .nav-items li:last-child {
        border-bottom: none;
        margin-bottom: 12px;
    }

    .nav-items li:not(.user-menu) a {
        display: block;
        padding: 16px 20px;
        line-height: 1.5;
        font-size: 16px;
        width: 100%;
        opacity: 0.9;
        border-radius: 12px;
    }

    .nav-items li:not(.user-menu) a:hover {
        background: linear-gradient(135deg, rgba(0, 113, 227, 0.08), rgba(0, 113, 227, 0.03));
        opacity: 1;
    }

    .nav-items li:not(.user-menu) a::before {
        display: none;
    }

    .nav-items .submit-btn {
        margin: 16px 20px;
        width: calc(100% - 40px);
        text-align: center;
        padding: 14px 24px;
        border-radius: var(--radius-pill);
        font-size: 15px;
    }

    /* Override hover for submit buttons in mobile */
    .nav-items li .submit-btn:hover {
        background: linear-gradient(135deg, #1d1d1f 0%, #000000 100%) !important;
        color: white !important;
        opacity: 1;
        transform: scale(1.05) translateY(0);
    }

    .nav-items .user-menu {
        margin: 16px 20px;
        border: none;
    }

    .nav-items .user-btn {
        width: 100%;
        justify-content: center;
        padding: 14px 24px;
        font-size: 15px;
    }

    .logo img {
        height: 48px;
    }

    /* Mega menu – stack columns */
    .menu-grid-three {
        grid-template-columns: 1fr;
    }

    .mega-column+.mega-column {
        border-left: none;
        border-top: 1px solid rgba(0, 0, 0, 0.07);
        padding-left: 0;
        padding-top: 20px;
        margin-top: 20px;
    }

    .mega-column:not(:last-child) {
        padding-right: 0;
        padding-bottom: 20px;
    }

    .mega-menu {
        padding: 24px 0 32px;
        max-height: calc(100vh - 72px);
        overflow-y: auto;
    }

    .mega-menu-content {
        padding: 0 20px;
    }

    /* Section headers */
    .section-header h2,
    .detail-content h2,
    .detail-header h2 {
        font-size: 48px;
    }

    .section-header p {
        font-size: 19px;
    }

    /* Service cards – single column */
    .service-card {
        grid-template-columns: 1fr;
        min-height: auto;
        border-radius: 28px;
    }

    .service-card.reverse {
        direction: ltr;
    }

    .service-visual {
        width: 100%;
        aspect-ratio: 4 / 3;
        min-height: 260px;
        overflow: hidden;
        border-radius: 28px 28px 0 0;
    }

    .service-visual svg {
        position: absolute;
        top: 0;
        left: 0;
        width: 100%;
        height: 100%;
        display: block;
    }

    .service-card.reverse .service-visual {
        border-radius: 28px 28px 0 0;
    }

    .service-content {
        padding: 60px 40px;
        border-radius: 0 0 28px 28px;
        box-shadow: none;
    }

    .service-card.reverse .service-content {
        border-radius: 0 0 28px 28px;
    }

    .service-content h3 {
        font-size: 32px;
    }

    /* Detail layout */
    .detail-container {
        gap: 64px;
    }

    .detail-cards-grid {
        grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    }

    .detail-cards-grid.cols-4 {
        grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    }

    /* Footer */
    .footer-main {
        grid-template-columns: 1fr;
        gap: 48px;
    }

    .footer-contact {
        max-width: 500px;
    }
}

/* ── ≤ 768px ────────────────────────────────────────────── */
@media (max-width: 768px) {

    /* Suppress desktop mega menu */
    .mega-menu {
        display: none;
    }

    /* Hero */
    .hero {
        padding: 80px 0;
        min-height: 85vh;
    }

    .hero h1 {
        font-size: 48px;
    }

    .hero p {
        font-size: 21px;
    }

    .cta-buttons {
        flex-direction: column;
        gap: 16px;
    }

    /* Section headers */
    .section-header h2 {
        font-size: 40px;
    }

    .section-header p {
        font-size: 19px;
    }

    /* Sections */
    .services-section,
    .contact-section,
    .detail-section {
        padding: 80px 0;
    }

    .services-grid {
        grid-template-columns: 1fr;
    }

    /* Detail container */
    .detail-container {
        grid-template-columns: 1fr;
        gap: 48px;
    }

    .detail-container.reverse {
        direction: ltr;
    }

    .detail-visual {
        order: -1;
        height: 320px;
    }

    .detail-content h2,
    .detail-header h2 {
        font-size: 40px;
    }

    .detail-lead {
        font-size: 19px;
    }

    .os-info-grid {
        grid-template-columns: 1fr;
    }

    .detail-cards-grid,
    .detail-cards-grid.cols-4 {
        grid-template-columns: 1fr;
    }

    /* Static pages */
    .static-page-section {
        padding: 25px 0;
    }

    .static-header h2 {
        font-size: 40px;
    }

    .static-content {
        padding: 40px 32px;
    }

    /* Footer */
    .footer {
        padding: 56px 0 24px;
    }

    .footer-main {
        padding: 0 24px;
        gap: 40px;
        margin-bottom: 48px;
        display: flex;
        flex-direction: column;
    }

    .footer-contact {
        order: -1;
        max-width: 100%;
    }

    .footer-links-section {
        grid-template-columns: repeat(2, 1fr);
        gap: 32px;
    }

    .footer-bottom {
        padding: 24px 24px 0;
        flex-direction: column;
        align-items: flex-start;
    }

    .contact-form {
        padding: 32px;
    }

    .form-row {
        grid-template-columns: 1fr;
    }

    .footer-container {
        grid-template-columns: repeat(2, 1fr);
    }
}

/* ── ≤ 640px ────────────────────────────────────────────── */
@media (max-width: 640px) {
    body {
        /* padding: 30px 16px; */
    }

    .section-header {
        margin-bottom: 40px;
    }

    .section-header h2 {
        font-size: 32px;
    }

    .section-header p {
        font-size: 17px;
    }

    .service-card {
        border-radius: 24px;
        margin-bottom: 20px;
    }

    .service-visual {
        aspect-ratio: 1 / 1;
        min-height: 220px;
        border-radius: 24px 24px 0 0;
    }

    .service-card.reverse .service-visual {
        border-radius: 24px 24px 0 0;
    }

    .service-content {
        padding: 40px 28px;
        border-radius: 0 0 24px 24px;
    }

    .service-card.reverse .service-content {
        border-radius: 0 0 24px 24px;
    }

    .service-content h3 {
        font-size: 28px;
    }

    .service-content p {
        font-size: 16px;
    }
}

/* ── ≤ 480px ────────────────────────────────────────────── */
@media (max-width: 480px) {
    .hero h1 {
        font-size: 40px;
    }

    .hero p {
        font-size: 19px;
    }

    .cta-btn {
        padding: 12px 24px;
        font-size: 15px;
    }

    .section-header h2 {
        font-size: 32px;
    }

    .detail-content h2 {
        font-size: 32px;
    }

    .static-content {
        padding: 32px 24px;
        font-size: 16px;
    }

    .contact-form {
        padding: 24px;
    }
}

/* =========================
   Change Password Modal
========================= */

.password-modal {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.55);
    backdrop-filter: blur(6px);
    display: none;
    align-items: center;
    justify-content: center;
    z-index: 9999;
}

.password-modal.active {
    display: flex;
}

.password-modal-content {
    background: #ffffff;
    width: 100%;
    max-width: 420px;
    padding: 28px 28px 26px;
    border-radius: 16px;
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.25);
    position: relative;
    animation: modalFadeIn 0.35s ease;
}

/* Animation */
@keyframes modalFadeIn {
    from {
        opacity: 0;
        transform: translateY(12px) scale(0.97);
    }

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

/* Close Button */
.modal-close {
    position: absolute;
    top: 14px;
    right: 16px;
    background: none;
    border: none;
    font-size: 20px;
    cursor: pointer;
    color: #666;
}

.modal-close:hover {
    color: #000;
}

/* Title */
.password-modal-content h3 {
    margin-bottom: 18px;
    font-size: 20px;
    font-weight: 600;
    text-align: center;
    color: #1d1d1f;
}

/* Form */
.password-modal-content .form-group {
    margin-bottom: 14px;
}

.password-modal-content label {
    display: block;
    font-size: 13px;
    color: #6e6e73;
    margin-bottom: 6px;
}

.password-modal-content input {
    width: 100%;
    padding: 11px 12px;
    border-radius: 10px;
    border: 1px solid #d2d2d7;
    font-size: 14px;
    transition:
        border-color 0.2s,
        box-shadow 0.2s;
}

.password-modal-content input:focus {
    outline: none;
    border-color: #0071e3;
    box-shadow: 0 0 0 3px rgba(0, 113, 227, 0.15);
}

/* Submit Button */
.password-modal-content .submit-btn {
    width: 100%;
    margin-top: 14px;
    padding: 12px;
    border-radius: 12px;
    border: none;
    background: linear-gradient(180deg, #1d1d1f, #000);
    color: #fff;
    font-size: 15px;
    font-weight: 500;
    cursor: pointer;
}

.password-modal-content .submit-btn:hover {
    opacity: 0.9;
}

/* Status Message */
.form-status {
    margin-top: 8px;
    font-size: 13px;
    text-align: center;
}

.form-status.success {
    color: #1a7f37;
}

.form-status.error {
    color: #c0392b;
}

/* ============================================================
   MOBILE NAV — All fixes (appended; overrides rules above)

   FIX 1 — Desktop: hide mobile-only elements injected by JS
   FIX 2 — Mobile: correct accordion submenu styles  
   FIX 3 — Mobile: Login/Register button display
   FIX 4 — Mobile: User menu (logged-in) flat inline layout
   ============================================================ */


/* ── FIX 1: Desktop — suppress JS-injected mobile elements ──
 *
 * buildMobileSubmenu() injects .mobile-nav-row wrappers,
 * .mobile-chevron buttons, and .mobile-submenu lists into the
 * DOM at page load for every viewport.
 *
 * display:contents on .mobile-nav-row makes the <div> a phantom:
 * its <a> child renders as a direct child of <li>, so all
 * existing desktop nav rules (.nav-items li a, ::before, hover)
 * continue to work without any changes.
 */
@media (min-width: 1025px) {
    .mobile-nav-row {
        display: contents;
    }

    .mobile-chevron {
        display: none !important;
    }

    .mobile-submenu {
        display: none !important;
    }
}


/* ── FIX 2: Mobile accordion submenu styles ─────────────────── */
@media (max-width: 1024px) {

    /* Allow submenu to extend beyond the <li>'s border-radius clip */
    .has-dropdown {
        overflow: visible !important;
    }

    /* Flex row: parent link + chevron side-by-side */
    .mobile-nav-row {
        display: flex;
        align-items: stretch;
        width: 100%;
        border-radius: 12px;
        overflow: hidden;
    }

    .mobile-nav-row>a {
        flex: 1;
        min-width: 0;
    }

    /* Chevron button — min 44×44 px tap target (WCAG 2.5.5) */
    .mobile-chevron {
        flex-shrink: 0;
        display: flex;
        align-items: center;
        justify-content: center;
        width: 52px;
        min-height: 44px;
        background: none;
        border: none;
        border-left: 1px solid rgba(0, 0, 0, 0.08);
        cursor: pointer;
        color: #6e6e73;
        padding: 0;
        transition: background 0.2s ease, color 0.2s ease;
        -webkit-tap-highlight-color: transparent;
    }

    .mobile-chevron:hover,
    .mobile-chevron:focus-visible {
        background: rgba(0, 113, 227, 0.06);
        color: #0071e3;
        outline: 2px solid rgba(0, 113, 227, 0.25);
        outline-offset: -2px;
    }

    .mobile-chevron svg {
        display: block;
        pointer-events: none;
        transition: transform 0.32s cubic-bezier(0.22, 0.61, 0.36, 1);
    }

    /* Rotate chevron when open */
    .has-dropdown.mobile-submenu-open>.mobile-nav-row>.mobile-chevron svg {
        transform: rotate(180deg);
    }

    /* Submenu list — collapsed by default via max-height:0 */
    .mobile-submenu {
        list-style: none;
        padding: 0;
        margin: 0 8px 4px;
        max-height: 0;
        overflow: hidden;
        opacity: 0;
        background: rgba(0, 113, 227, 0.025);
        border-radius: 10px;
        transition:
            max-height 0.38s cubic-bezier(0.22, 0.61, 0.36, 1),
            opacity 0.28s ease;
    }

    /* JS sets max-height to scrollHeight on open; opacity fades in */
    .has-dropdown.mobile-submenu-open>.mobile-submenu {
        opacity: 1;
    }

    /* Section label from mega-column <h3> */
    .mobile-submenu-label {
        list-style: none;
        padding: 10px 16px 4px;
        font-size: 10px;
        font-weight: 600;
        letter-spacing: 0.1em;
        text-transform: uppercase;
        color: #a1a1a6;
    }

    .mobile-submenu-label:not(:first-child) {
        margin-top: 8px;
        padding-top: 12px;
        border-top: 1px solid rgba(0, 0, 0, 0.07);
    }

    /* Individual link rows — reset generic .nav-items li styles */
    .mobile-submenu-item {
        list-style: none;
        border: none !important;
        margin: 0 !important;
        border-radius: 0 !important;
        overflow: visible !important;
    }

    .mobile-submenu-item a {
        display: flex !important;
        align-items: center;
        gap: 10px;
        padding: 10px 16px !important;
        font-size: 14px !important;
        font-weight: 450;
        color: #1d1d1f;
        border-radius: 8px !important;
        width: 100%;
        opacity: 1 !important;
        transition: background 0.18s ease, color 0.18s ease;
        -webkit-tap-highlight-color: transparent;
    }

    .mobile-submenu-item a:hover,
    .mobile-submenu-item a:focus-visible {
        background: rgba(0, 113, 227, 0.08) !important;
        color: #0071e3 !important;
        transform: none !important;
        outline: none;
    }

    .mobile-submenu-item .menu-icon {
        width: 14px;
        height: 14px;
        flex-shrink: 0;
        color: #a1a1a6;
    }

    .mobile-submenu-item a:hover .menu-icon,
    .mobile-submenu-item a:focus-visible .menu-icon {
        color: #0071e3;
    }

    /* Suppress desktop pseudo-elements inside submenu */
    .mobile-submenu-item a::after,
    .mobile-submenu-item a::before {
        display: none !important;
    }
}


/* ── FIX 3: Mobile — Login / Register buttons ───────────────
 *
 * Generic .nav-items li { overflow:hidden; border-bottom } clips
 * the pill shape and adds unwanted dividers under the buttons.
 */
@media (max-width: 1024px) {

    /* <li> that wraps a .submit-btn — remove the clipping frame */
    .nav-items li:has(> a.submit-btn),
    .nav-items li:has(> .submit-btn),
    .nav-items li.li-has-submit-btn {
        /* :has() fallback class */
        overflow: visible !important;
        border-bottom: none !important;
        border-radius: 0 !important;
        background: transparent !important;
        padding: 0 !important;
        margin-top: 0 !important;
        margin-bottom: 0 !important;
    }

    /* The button itself: full-width true pill */
    .nav-items .submit-btn {
        display: block;
        margin: 8px 16px;
        width: calc(100% - 32px);
        padding: 15px 24px;
        text-align: center;
        border-radius: var(--radius-pill);
        font-size: 15px;
        font-weight: 600;
        letter-spacing: -0.01em;
        box-sizing: border-box;
    }

    .nav-items .submit-btn:hover,
    .nav-items .submit-btn:active,
    .nav-items .submit-btn:focus-visible {
        background: linear-gradient(135deg, #1d1d1f 0%, #000 100%) !important;
        color: #fff !important;
        opacity: 1;
        transform: scale(1.02);
        outline: none;
    }

    /* Small top gap before the first CTA button */
    .nav-items li:has(> a[href="/login.php"]),
    .nav-items li.li-has-submit-btn:first-of-type {
        margin-top: 8px !important;
    }
}


/* ── FIX 4: Mobile — User menu (logged-in) ──────────────────
 *
 * .user-popover is position:absolute (correct for desktop floating
 * card) but clips inside the mobile drawer's overflow-y:auto
 * container.  On mobile we flatten it to a static inline list.
 */
@media (max-width: 1024px) {

    /* Outer <li> container */
    .nav-items .user-menu {
        overflow: visible !important;
        border: 1px solid rgba(0, 0, 0, 0.07) !important;
        margin: 8px 16px 16px !important;
        padding: 0 !important;
        border-radius: 14px !important;
        background: rgba(0, 0, 0, 0.025) !important;
    }

    /* Hide the avatar/username trigger — links are shown directly */
    .nav-items .user-btn {
        display: none !important;
    }

    /* Flatten the popover to a static always-visible inline block */
    .nav-items .user-popover {
        position: static !important;
        display: block !important;
        opacity: 1 !important;
        transform: none !important;
        border: none !important;
        border-radius: 14px !important;
        box-shadow: none !important;
        background: transparent !important;
        backdrop-filter: none !important;
        -webkit-backdrop-filter: none !important;
        padding: 6px !important;
        min-width: 0 !important;
        width: 100% !important;
    }

    /* Remove floating-card arrow pointer */
    .nav-items .user-popover::before {
        display: none !important;
    }

    /* Individual links inside the inline user menu */
    .nav-items .user-popover a {
        display: flex !important;
        align-items: center;
        gap: 12px;
        padding: 13px 16px !important;
        font-size: 15px !important;
        font-weight: 500;
        color: #1d1d1f;
        border-radius: 10px !important;
        transition: background 0.18s ease, color 0.18s ease;
        -webkit-tap-highlight-color: transparent;
    }

    .nav-items .user-popover a:not(:last-child) {
        margin-bottom: 2px;
    }

    .nav-items .user-popover a:hover,
    .nav-items .user-popover a:focus-visible {
        background: rgba(0, 113, 227, 0.07) !important;
        color: #0071e3 !important;
        transform: none !important;
        outline: none;
    }

    .nav-items .user-popover a ion-icon {
        font-size: 20px;
        color: #6e6e73;
        flex-shrink: 0;
        transition: color 0.18s ease;
    }

    .nav-items .user-popover a:hover ion-icon,
    .nav-items .user-popover a:focus-visible ion-icon {
        color: #0071e3;
    }

    /* Logout — subtle red tint to signal destructive action */
    .nav-items .user-popover a[href="/logout.php"],
    .nav-items .user-popover a[href="/logout.php"] ion-icon {
        color: #c0392b;
    }

    .nav-items .user-popover a[href="/logout.php"]:hover,
    .nav-items .user-popover a[href="/logout.php"]:focus-visible {
        background: rgba(192, 57, 43, 0.07) !important;
        color: #c0392b !important;
    }
}