/* ================================================
   Pelora — Global Stylesheet
   Consolidated from: variables.css, base.css, main.css,
   layout.css, components.css, responsive.css
   ================================================ */

/* ===== 1. CSS Variables ===== */
:root {
    /* Primary Colors */
    --bg-primary: #fcf9ff;
    --bg-secondary: #f4edff;
    --accent-primary: #8b5cf6;
    --accent-secondary: #c084fc;
    --accent-success: #9AE6B4;
    --accent-warning: #FFD166;
    --accent-error: #FF6B6B;

    /* Text Colors */
    --text-primary: #2b2145;
    --text-secondary: #71658f;
    --text-muted: #9c90b9;

    /* Glass Effect */
    --glass-bg: rgba(255, 255, 255, 0.8);
    --glass-bg-hover: rgba(255, 255, 255, 0.94);
    --glass-border: rgba(143, 113, 228, 0.18);
    --glass-border-hover: rgba(143, 113, 228, 0.32);

    /* Shadows */
    --shadow-glow: 0 24px 60px rgba(139, 92, 246, 0.16);
    --shadow-card: 0 18px 48px rgba(111, 92, 170, 0.12);
    --shadow-button: 0 12px 28px rgba(139, 92, 246, 0.2);

    /* Border Radius */
    --radius-sm: 8px;
    --radius-md: 12px;
    --radius-lg: 20px;
    --radius-xl: 24px;
    --radius-full: 9999px;

    /* Spacing */
    --spacing-xs: 0.25rem;
    --spacing-sm: 0.5rem;
    --spacing-md: 1rem;
    --spacing-lg: 1.5rem;
    --spacing-xl: 2rem;
    --spacing-2xl: 3rem;
    --spacing-3xl: 4rem;

    /* Transitions */
    --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    --transition-fast: all 0.15s ease;
    --transition-slow: all 0.5s ease;

    /* Typography */
    --font-primary: 'Inter', system-ui, -apple-system, sans-serif;
    --font-display: 'Playfair Display', serif;

    /* Font Sizes */
    --text-xs: 0.75rem;
    --text-sm: 0.875rem;
    --text-base: 1rem;
    --text-lg: 1.125rem;
    --text-xl: 1.25rem;
    --text-2xl: 1.5rem;
    --text-3xl: 2rem;
    --text-4xl: 2.5rem;

    /* Font Weights */
    --font-normal: 400;
    --font-medium: 500;
    --font-semibold: 600;
    --font-bold: 700;

    /* Z-Index Scale */
    --z-dropdown: 100;
    --z-sticky: 200;
    --z-fixed: 300;
    --z-modal-backdrop: 400;
    --z-modal: 500;
    --z-popover: 600;
    --z-tooltip: 700;

    /* Container */
    --container-max: 1200px;
    --container-padding: 1rem;

    /* Card Dimensions */
    --card-width: 280px;
    --card-gap: 1.5rem;

    /* Off-canvas — responsive width */
    --off-canvas-width: min(280px, 85vw);

    /* Safe-area (iOS Dynamic Island / notch / home bar) */
    --safe-top:    env(safe-area-inset-top, 0px);
    --safe-right:  env(safe-area-inset-right, 0px);
    --safe-bottom: env(safe-area-inset-bottom, 0px);
    --safe-left:   env(safe-area-inset-left, 0px);
}

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

/* Flexible media — prevent overflow on small screens */
img, video, svg, canvas, iframe {
    max-width: 100%;
}
img {
    height: auto;
    display: block;
}

html {
    scroll-behavior: smooth;
    overflow-x: hidden;
    -webkit-text-size-adjust: 100%; /* prevent iOS font inflation */
    text-size-adjust: 100%;
}

body {
    font-family: var(--font-primary);
    background:
        radial-gradient(78% 54% at 50% 0%, rgba(217, 194, 255, 0.62) 0%, rgba(217, 194, 255, 0) 58%),
        linear-gradient(180deg, #fdfbff 0%, #f6efff 43%, #ffffff 100%);
    color: var(--text-primary);
    min-height: 100vh;
    min-height: 100svh; /* iOS Safari dynamic viewport */
    margin: 0;
    padding: 0;
    padding-bottom: env(safe-area-inset-bottom, 0px); /* home bar clearance */
    overflow-x: hidden;
    overflow-y: auto;
    position: relative;
    line-height: 1.6;
    -webkit-tap-highlight-color: transparent; /* remove tap flash on iOS */
}

/* ===== 3. Typography ===== */
h1, h2, h3, h4, h5, h6 {
    font-family: var(--font-display);
    font-weight: var(--font-bold);
    line-height: 1.2;
}

h1 { font-size: clamp(2rem, 5vw, 3.5rem); }
h2 { font-size: clamp(1.5rem, 4vw, 2.5rem); margin-bottom: var(--spacing-lg); }
h3 { font-size: clamp(1.2rem, 3vw, 1.8rem); }
h4 { font-size: 1.5rem; }
h5 { font-size: 1.25rem; }
h6 { font-size: 1rem; }

p {
    line-height: 1.6;
    color: var(--text-secondary);
}

/* ===== 4. Container ===== */
.container {
    max-width: var(--container-max);
    margin: 0 auto;
    padding: 0 var(--container-padding);
}

/* ===== 5. Glass Effect ===== */
.glass {
    background: var(--glass-bg);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 1px solid var(--glass-border);
    border-radius: var(--radius-lg);
}

/* ===== 6. Links ===== */
a {
    color: var(--accent-primary);
    text-decoration: none;
    transition: var(--transition-fast);
}

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

/* ===== 7. Buttons ===== */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: var(--spacing-sm);
    padding: 0.75rem 1.5rem;
    min-height: 44px; /* WCAG touch target */
    border-radius: var(--radius-md);
    font-weight: var(--font-semibold);
    font-size: var(--text-base);
    text-decoration: none;
    transition: var(--transition);
    cursor: pointer;
    border: none;
    white-space: nowrap;
    position: relative;
    overflow: hidden;
    font-family: inherit;
    touch-action: manipulation; /* remove 300ms tap delay */
    -webkit-tap-highlight-color: transparent;
}

.btn::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 0;
    height: 0;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.2);
    transform: translate(-50%, -50%);
    transition: width 0.6s, height 0.6s;
}

.btn:hover::before {
    width: 300px;
    height: 300px;
}

.btn-primary {
    background: linear-gradient(135deg, var(--accent-primary) 0%, #a855f7 100%);
    color: white;
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 16px 32px rgba(139, 92, 246, 0.28);
}

.btn-secondary {
    background: rgba(255, 255, 255, 0.86);
    border: 1px solid var(--glass-border);
    color: var(--text-primary);
}

.btn-secondary:hover {
    background: rgba(139, 92, 246, 0.08);
    border-color: var(--accent-primary);
}

.btn-busy {
    background: #EF4444;
    color: var(--text-primary);
    border-color: #DC2626;
}

.btn-busy:hover {
    background: #DC2626;
    border-color: #B91C1C;
}

.btn-sm {
    padding: 0.5rem 1rem;
    font-size: 0.875rem;
}

.btn-lg {
    padding: 1rem 2rem;
    font-size: 1.125rem;
}

/* Icon Buttons */
.icon-btn {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.82);
    border: 1px solid var(--glass-border);
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: var(--transition);
    color: var(--text-primary);
    touch-action: manipulation;
    -webkit-tap-highlight-color: transparent;
}

.icon-btn:hover {
    background: var(--accent-primary);
    transform: scale(1.1);
    color: #fff;
}

.icon-btn svg {
    width: 20px;
    height: 20px;
    fill: currentColor;
}

/* ===== 8. Focus Styles ===== */
*:focus-visible {
    outline: 2px solid var(--accent-primary);
    outline-offset: 2px;
    border-radius: 4px;
}

/* ===== 9. Selection & Scrollbar ===== */
::selection {
    background: var(--accent-primary);
    color: white;
}

::-webkit-scrollbar {
    width: 8px;
    height: 8px;
}

::-webkit-scrollbar-track {
    background: rgba(255, 255, 255, 0.1);
    border-radius: 4px;
}

::-webkit-scrollbar-thumb {
    background: rgba(124, 76, 255, 0.5);
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: rgba(124, 76, 255, 0.7);
}

/* ===== 10. Header & Navigation ===== */
header:not(#header) {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1000;
    background: var(--glass-bg);
    backdrop-filter: blur(20px);
    border-bottom: 1px solid var(--glass-border);
    padding: 1rem 0;
}

.header-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

header:not(#header) .logo {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--text-primary);
    text-decoration: none;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

header:not(#header) .logo svg {
    width: 32px;
    height: 32px;
    fill: var(--accent-primary);
}

header:not(#header) nav {
    display: flex;
    align-items: center;
    gap: 2rem;
}

.menu-items {
    display: flex;
    align-items: center;
    gap: 2rem;
}

.menu-item {
    color: var(--text-primary);
    text-decoration: none;
    font-weight: 500;
    transition: var(--transition);
    padding: 0.5rem 0;
    border-bottom: 2px solid transparent;
}

.menu-item:hover {
    color: var(--accent-primary);
    border-bottom-color: var(--accent-primary);
}

/* Burger Menu */
.burger {
    display: none;
    flex-direction: column;
    justify-content: space-around;
    width: 24px;
    height: 24px;
    background: transparent;
    border: none;
    cursor: pointer;
    padding: 0;
}

.burger span {
    width: 24px;
    height: 3px;
    background: var(--text-primary);
    border-radius: 3px;
    transition: var(--transition);
}

/* Language Selector */
.language-selector {
    background: var(--glass-bg);
    border: 1px solid var(--glass-border);
    border-radius: var(--radius-md);
    color: var(--text-primary);
    padding: 0.5rem;
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
}

.language-selector option {
    background: var(--bg-primary);
    color: var(--text-primary);
}

/* ===== 11. Hero Section ===== */
.hero {
    min-height: 80vh;
    display: flex;
    align-items: center;
    position: relative;
    overflow: hidden;
    margin-top: 0;
    padding-top: 0;
}

.hero-bg {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-image: url("../assets/img/homepage-hero-desktop.png");
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    overflow: hidden;
    z-index: -1;
}

.hero-bg::after {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(135deg, rgba(10, 8, 36, 0.55) 0%, rgba(24, 16, 64, 0.5) 55%, rgba(12, 10, 36, 0.6) 100%);
    z-index: 1;
}

.hero-bg-video {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center;
    display: block;
    z-index: 0;
}

.hero-content {
    text-align: center;
    padding: 2rem 0;
    animation: fadeInUp 1s ease;
}

.hero h1 {
    margin-bottom: 1rem;
    text-shadow: 0 2px 10px rgba(0, 0, 0, 0.3);
}

.hero-subtitle {
    font-size: 1.2rem;
    color: var(--text-secondary);
    margin-bottom: 2rem;
}

/* ===== 12. Search ===== */
.search-container {
    max-width: 600px;
    margin: 2rem auto;
}

.search-bar {
    display: flex;
    background: var(--glass-bg);
    border: 1px solid var(--glass-border);
    border-radius: var(--radius-lg);
    overflow: hidden;
    backdrop-filter: blur(10px);
}

.search-input {
    flex: 1;
    padding: 1rem 1.5rem;
    background: transparent;
    border: none;
    color: var(--text-primary);
    font-size: 1rem;
}

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

.search-btn {
    padding: 1rem 2rem;
    background: var(--accent-primary);
    border: none;
    color: white;
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition);
}

.search-btn:hover {
    background: var(--accent-secondary);
}

/* ===== 13. Categories ===== */
.categories {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: 1rem;
    margin: 2rem 0;
}

.category-btn {
    background: var(--glass-bg);
    border: 1px solid var(--glass-border);
    color: var(--text-primary);
    padding: 1rem;
    border-radius: var(--radius-md);
    text-decoration: none;
    transition: var(--transition);
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    backdrop-filter: blur(10px);
}

.category-btn:hover {
    background: var(--accent-primary);
    transform: translateY(-2px);
    box-shadow: 0 8px 24px rgba(124, 76, 255, 0.4);
}

/* ===== 14. Trust & Testimonials ===== */
.trust-section {
    padding: 4rem 0;
    background: var(--glass-bg);
    backdrop-filter: blur(10px);
    border-top: 1px solid var(--glass-border);
    border-bottom: 1px solid var(--glass-border);
}

.trust-content {
    text-align: center;
}

.trust-stats {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 2rem;
    margin-bottom: 3rem;
}

.stat-item {
    text-align: center;
}

.stat-number {
    font-size: 2.5rem;
    font-weight: 700;
    color: var(--accent-primary);
    margin-bottom: 0.5rem;
}

.stat-label {
    color: var(--text-secondary);
    font-size: 0.9rem;
}

.testimonials-section {
    padding: 4rem 0;
}

.testimonials-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
    margin-top: 3rem;
}

.testimonial-card {
    background: var(--glass-bg);
    border: 1px solid var(--glass-border);
    border-radius: var(--radius-lg);
    padding: 2rem;
    backdrop-filter: blur(10px);
}

.testimonial-rating {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin-bottom: 1rem;
}

.stars {
    color: #fbbf24;
}

.testimonial-text {
    font-style: italic;
    margin-bottom: 1.5rem;
    line-height: 1.6;
}

.testimonial-author {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.author-avatar {
    width: 50px;
    height: 50px;
    border-radius: 50%;
    overflow: hidden;
}

.author-avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

/* ===== 15. Carousel ===== */
.advisors-carousel {
    position: relative;
    overflow: hidden;
    padding-inline-end: 24px;
}

.carousel-nav {
    display: flex;
    justify-content: center;
    gap: 1rem;
    margin-top: 1.5rem;
    padding: 0;
}

.carousel-btn {
    width: 48px;
    height: 48px;
    border-radius: var(--radius-md);
    background: var(--glass-bg);
    border: 2px solid var(--accent-primary);
    color: var(--accent-primary);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.4rem;
    font-weight: 600;
    transition: var(--transition);
    box-shadow: 0 4px 12px rgba(124, 76, 255, 0.2);
}

.carousel-btn:hover {
    background: var(--accent-primary);
    color: white;
    transform: translateY(-2px);
    box-shadow: 0 8px 24px rgba(124, 76, 255, 0.4);
}

.carousel-btn:disabled {
    opacity: 0.4;
    cursor: not-allowed;
    transform: none;
    background: var(--glass-bg);
    color: var(--text-secondary);
    border-color: var(--glass-border);
    box-shadow: none;
}

/* ===== 16. Status Badges ===== */
.status-badge {
    display: inline-block;
    padding: 0.25rem 0.75rem;
    border-radius: 20px;
    font-size: 0.85rem;
    font-weight: 600;
    margin-bottom: 0.5rem;
}

.status-online {
    background: rgba(74, 222, 128, 0.2);
    color: var(--accent-success);
    border: 1px solid var(--accent-success);
}

.status-busy {
    background: rgba(255, 59, 48, 0.15);
    color: #ff3b30;
    border: 1px solid #ff3b30;
}

.status-offline {
    background: rgba(142, 142, 147, 0.15);
    color: #8e8e93;
    border: 1px solid #8e8e93;
}

/* ===== 17. Modals ===== */
.modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background: rgba(244, 238, 255, 0.72);
    padding: 1rem;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 12000;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s ease;
}

.modal.active {
    opacity: 1;
    pointer-events: all;
}

.modal-content {
    background: rgba(255, 255, 255, 0.96);
    border: 1px solid var(--glass-border);
    border-radius: var(--radius-lg);
    padding: 2rem;
    max-width: 400px;
    width: 90%;
    max-height: 90vh;
    overflow-y: auto;
    transform: scale(0.9);
    transition: transform 0.3s ease;
    box-shadow: 0 28px 64px rgba(111, 92, 170, 0.16);
    backdrop-filter: blur(18px);
    -webkit-backdrop-filter: blur(18px);
}

.social-login {
    margin: 1.35rem 0;
    text-align: center;
}

.social-divider {
    color: var(--text-secondary);
    margin: 1rem 0;
    font-size: 0.9rem;
    text-transform: uppercase;
    letter-spacing: 0.8px;
}

.social-buttons {
    display: flex;
    gap: 0.75rem;
    margin-bottom: 0.85rem;
}

.social-btn {
    flex: 1;
    min-height: 44px;
    padding: 0.65rem 0.75rem;
    border: 1px solid var(--glass-border);
    border-radius: var(--radius-md);
    background: var(--glass-bg);
    color: var(--text-primary);
    font: inherit;
    font-size: 0.95rem;
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition-fast);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    appearance: none;
    -webkit-appearance: none;
}

.social-btn svg {
    width: 20px;
    height: 20px;
    fill: currentColor;
    flex-shrink: 0;
}

.social-btn:hover {
    background: rgba(139, 92, 246, 0.1);
    border-color: rgba(139, 92, 246, 0.45);
}

.social-btn.disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

#join-modal .modal-content {
    width: min(360px, 100%);
    max-width: 360px;
    max-height: min(86vh, 760px);
    padding: 1.25rem;
}

#join-modal .modal-header {
    margin-bottom: 1rem;
}

#join-modal .modal-title {
    font-size: 1.95rem;
}

#join-modal .social-divider {
    margin: 0.85rem 0;
    font-size: 0.78rem;
}

#join-modal .social-buttons {
    gap: 0.7rem;
}

#join-modal .social-btn {
    padding: 0.62rem 0.75rem;
}

#join-modal .form-group {
    margin-bottom: 0.9rem;
}

#join-modal .form-label {
    margin-bottom: 0.38rem;
}

#join-modal .form-input {
    padding: 0.62rem 0.85rem;
}

#join-modal .form-checkbox {
    margin-bottom: 1rem;
}

#join-modal .form-actions {
    margin-top: 1rem;
    gap: 0.65rem;
}

#join-modal .btn {
    min-height: 40px;
    padding: 0.62rem 1rem;
}

.modal.active .modal-content {
    transform: scale(1);
}

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1.5rem;
}

.modal-title {
    font-size: 1.5rem;
    font-weight: 700;
}

.modal-close {
    background: transparent;
    border: none;
    color: var(--text-secondary);
    font-size: 1.5rem;
    cursor: pointer;
    transition: color 0.3s;
}

.modal-close:hover {
    color: var(--text-primary);
}

/* ===== 18. Forms ===== */
.form-group {
    margin-bottom: 1.5rem;
}

.form-row {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 0.75rem;
}

.form-label {
    display: block;
    margin-bottom: 0.5rem;
    color: var(--text-secondary);
    font-size: 0.9rem;
}

.form-input {
    width: 100%;
    padding: 0.75rem 1rem;
    background: var(--glass-bg);
    border: 1px solid var(--glass-border);
    border-radius: var(--radius-md);
    color: var(--text-primary);
    font-size: 1rem;
    transition: var(--transition);
}

.form-input:focus {
    border-color: var(--accent-primary);
    background: rgba(139, 92, 246, 0.06);
    outline: none;
    box-shadow: 0 0 0 4px rgba(139, 92, 246, 0.12);
}

.form-checkbox {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin-bottom: 1.5rem;
}

.form-checkbox input[type="checkbox"] {
    width: 18px;
    height: 18px;
    accent-color: var(--accent-primary);
}

.form-error {
    color: var(--accent-warning);
    font-size: 0.8rem;
    margin-top: 0.25rem;
    display: none;
}

.form-error.show {
    display: block;
}

.form-actions {
    display: flex;
    gap: 1rem;
    margin-top: 2rem;
}

/* ===== 19. Toast Notifications ===== */
.toast {
    position: fixed;
    bottom: calc(2rem + env(safe-area-inset-bottom, 0px));
    right: 2rem;
    background: var(--bg-primary);
    border: 1px solid var(--glass-border);
    border-radius: var(--radius-md);
    padding: 1rem 1.5rem;
    color: var(--text-primary);
    z-index: 4000;
    transform: translateX(400px);
    transition: transform 0.3s ease;
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    max-width: calc(100vw - 4rem);
    box-shadow: 0 18px 36px rgba(111, 92, 170, 0.12);
}

.toast.show {
    transform: translateX(0);
}

.toast.error {
    border-color: var(--accent-warning);
    color: var(--accent-warning);
}

.toast.success {
    border-color: var(--accent-success);
    color: var(--accent-success);
}

/* ===== 20. Footer ===== */
footer {
    background: rgba(255, 255, 255, 0.64);
    border-top: 1px solid var(--glass-border);
    padding: 3rem 0 1.5rem;
    margin-top: 4rem;
}

.footer-content {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    gap: 3rem;
    margin-bottom: 3rem;
}

.footer-brand {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 2rem;
}

.footer-brand .logo {
    font-size: 2rem;
}

.app-buttons {
    display: flex;
    gap: 1.5rem;
    justify-content: center;
    flex-wrap: wrap;
}

.app-store-btn {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 20px;
    background: var(--glass-bg);
    border: 1px solid var(--glass-border);
    border-radius: var(--radius-lg);
    color: var(--text-primary);
    text-decoration: none;
    transition: var(--transition);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
}

.app-store-btn:hover {
    transform: translateY(-2px);
    background: rgba(255, 255, 255, 0.92);
    border-color: var(--accent-primary);
    box-shadow: 0 14px 28px rgba(139, 92, 246, 0.14);
}

.app-icon {
    width: 28px;
    height: 28px;
    fill: currentColor;
}

.app-text {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    line-height: 1.2;
}

.app-subtitle {
    font-size: 0.75rem;
    opacity: 0.8;
}

.app-title {
    font-size: 1rem;
    font-weight: 600;
}

.footer-nav {
    display: flex;
    gap: 4rem;
    justify-content: center;
    flex-wrap: wrap;
}

.footer-links {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1rem;
}

.footer-links h4 {
    margin-bottom: 0.5rem;
    color: var(--text-primary);
    font-size: 1.1rem;
    font-weight: 600;
}

.footer-links a {
    display: block;
    color: var(--text-secondary);
    text-decoration: none;
    font-size: 0.95rem;
    transition: var(--transition);
    border-radius: var(--radius-sm);
    padding: 0.5rem 1rem;
}

.footer-links a:hover {
    color: var(--accent-primary);
    background: rgba(139, 92, 246, 0.08);
    transform: translateY(-1px);
}

.footer-entertainment-bar {
    display: flex;
    align-items: flex-start;
    gap: 0.75rem;
    background: rgba(255, 255, 255, 0.74);
    border: 1px solid rgba(143, 113, 228, 0.16);
    border-radius: var(--radius-md);
    padding: 0.85rem 1.25rem;
    margin-bottom: 1.5rem;
    font-size: 0.78rem;
    color: var(--text-muted);
    line-height: 1.6;
}

.footer-entertainment-bar strong {
    color: var(--text-primary);
}

.footer-ent-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: rgba(139, 92, 246, 0.16);
    color: #6d40e6;
    font-size: 0.7rem;
    font-weight: 700;
    letter-spacing: 0.05em;
    padding: 2px 7px;
    border-radius: var(--radius-sm);
    flex-shrink: 0;
    margin-top: 2px;
}

.footer-entertainment-bar a {
    color: var(--accent-primary);
    text-decoration: underline;
    text-underline-offset: 3px;
    white-space: nowrap;
    flex-shrink: 0;
    font-size: 0.78rem;
    margin-left: auto;
    padding-left: 0.5rem;
}

.footer-bottom {
    text-align: center;
    padding-top: 1.5rem;
    border-top: 1px solid var(--glass-border);
    color: var(--text-secondary);
    font-size: 0.9rem;
    line-height: 1.6;
}

.footer-bottom a {
    color: var(--text-secondary);
    text-decoration: none;
    transition: color 0.3s;
}

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

/* ===== 21. Animations ===== */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

@keyframes countUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes sparkle {
    0%, 100% { opacity: 0; transform: scale(0); }
    50% { opacity: 1; transform: scale(1); }
}

.sparkle {
    position: fixed;
    width: 2px;
    height: 2px;
    background: white;
    border-radius: 50%;
    pointer-events: none;
    animation: sparkle 3s ease-in-out infinite;
}

/* ===== 22. Utility Classes ===== */
.flex-wrap { flex-wrap: wrap; }
.text-center { text-align: center; }
.text-left { text-align: left; }
.text-right { text-align: right; }

/* ===== 23. Responsive ===== */

/* Large Tablets */
@media (max-width: 1024px) {
    .container {
        padding: 0 1.5rem;
    }

    .hero h1 {
        font-size: 2.5rem;
    }

    .categories {
        grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
    }

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

/* Tablets */
@media (max-width: 768px) {
    .header-content {
        padding: 0 1rem;
    }

    .hero-bg {
        background-image: url("../assets/img/homepage-hero-mobile.png");
        background-position: 70% center;
    }

    .hero-bg::after {
        background: linear-gradient(135deg, rgba(10, 8, 36, 0.48) 0%, rgba(24, 16, 64, 0.42) 55%, rgba(12, 10, 36, 0.55) 100%);
    }

    .hero-bg-video {
        object-position: 70% center;
    }

    .container {
        padding: 0 1rem;
    }

    .hero {
        min-height: 70vh;
        padding: 6rem 0 2rem;
    }

    .hero h1 {
        font-size: 2rem;
        margin-bottom: 0.75rem;
    }

    .hero-subtitle {
        font-size: 1rem;
        margin-bottom: 1.5rem;
    }

    .search-bar {
        flex-direction: column;
        gap: 1rem;
    }

    .search-input {
        padding: 1rem;
    }

    .categories {
        grid-template-columns: repeat(2, 1fr);
        gap: 1rem;
    }

    .category-btn {
        padding: 0.75rem;
        font-size: 0.9rem;
    }

    .trust-stats {
        grid-template-columns: 1fr;
        gap: 1.5rem;
    }

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

    header:not(#header) .burger {
        display: flex;
    }

    .menu-items {
        display: none;
    }

    /* Mobile Menu */
    .mobile-menu {
        position: fixed;
        top: 0;
        right: -100%;
        width: 80%;
        max-width: 400px;
        height: 100vh;
        background: var(--bg-primary);
        border-left: 1px solid var(--glass-border);
        transition: right 0.3s ease;
        z-index: 999;
        padding: 2rem;
        overflow-y: auto;
    }

    .mobile-menu.active {
        right: 0;
    }

    .mobile-menu .menu-items {
        display: flex;
        flex-direction: column;
        gap: 1rem;
    }

    .menu-overlay {
        position: fixed;
        top: 0;
        left: 0;
        width: 100vw;
        height: 100vh;
        background: rgba(0, 0, 0, 0.5);
        z-index: 998;
        opacity: 0;
        pointer-events: none;
        transition: opacity 0.3s ease;
    }

    .menu-overlay.active {
        opacity: 1;
        pointer-events: all;
    }
}

/* Mobile Phones */
@media (max-width: 520px) {
    .container {
        padding: 0 0.75rem;
    }

    .hero {
        padding: 5rem 0 1rem;
        margin-top: 0;
    }

    .hero h1 {
        font-size: 1.5rem;
        line-height: 1.3;
    }

    .hero-subtitle {
        font-size: 0.9rem;
        margin-bottom: 1.5rem;
    }

    .categories {
        grid-template-columns: repeat(2, 1fr);
        gap: 0.75rem;
    }

    .category-btn {
        padding: 0.5rem;
        font-size: 0.8rem;
        min-width: auto;
    }

    .icon-btn {
        width: 32px;
        height: 32px;
    }

    .modal-content {
        padding: 1.5rem;
        margin: 1rem;
        z-index: 1000;
    }

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

    #join-modal .modal-content {
        width: min(340px, 100%);
        max-width: 340px;
        padding: 1rem;
    }

    .social-buttons {
        flex-direction: column;
        gap: 0.6rem;
    }

    .social-btn {
        width: 100%;
    }

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

    .toast {
        right: 1rem;
        left: 1rem;
        bottom: calc(1rem + env(safe-area-inset-bottom, 0px));
        max-width: none;
        transform: translateY(100px);
    }

    .toast.show {
        transform: translateY(0);
    }

    .footer-content {
        gap: 2rem;
    }

    .footer-nav {
        gap: 2rem;
    }

    .app-buttons {
        gap: 1rem;
    }

    .app-store-btn {
        padding: 0.75rem 1rem;
        font-size: 0.875rem;
    }
}

/* Extra Small Phones */
@media (max-width: 375px) {
    .hero h1 {
        font-size: 1.3rem;
    }

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

    .btn {
        padding: 0.5rem 1rem;
        font-size: 0.875rem;
    }

    .carousel-btn {
        width: 40px;
        height: 40px;
        font-size: 1.2rem;
    }
}

/* Ultra-small phones (320px) */
@media (max-width: 320px) {
    .container {
        padding: 0 0.5rem;
    }

    .btn {
        padding: 0.5rem 0.75rem;
        font-size: 0.8rem;
    }

    h1 { font-size: 1.2rem; }
    h2 { font-size: 1.1rem; }

    .hero h1 {
        font-size: 1.1rem;
    }
}

/* Landscape orientations */
@media (max-height: 600px) and (orientation: landscape) {
    .hero {
        min-height: 60vh;
        padding: 4rem 0 1rem;
    }

    .hero h1 {
        font-size: 2rem;
        margin-bottom: 0.5rem;
    }

    .hero-subtitle {
        font-size: 0.9rem;
        margin-bottom: 1rem;
    }

    .categories {
        margin: 1rem 0;
    }

    .search-container {
        margin: 1rem auto;
    }
}

/* High DPI displays */
@media (-webkit-min-device-pixel-ratio: 2), (min-resolution: 192dpi) {
    .card-image img {
        image-rendering: -webkit-optimize-contrast;
        image-rendering: crisp-edges;
    }
}

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

/* Print styles */
/* ============================================
   Off-canvas Menu
   ============================================ */
.off-canvas {
    position: fixed;
    top: 0;
    left: calc(-1 * var(--off-canvas-width));
    width: var(--off-canvas-width);
    height: 100vh;
    height: 100svh; /* iOS Safari dynamic viewport */
    background: var(--bg-primary);
    z-index: 2000;
    transition: transform 0.3s ease;
    overflow-y: auto;
    /* iOS safe-area: pad content away from notch/home-bar */
    padding-top: env(safe-area-inset-top, 0px);
    padding-bottom: env(safe-area-inset-bottom, 0px);
}

.off-canvas.active {
    transform: translateX(var(--off-canvas-width));
}

.off-canvas-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background: rgba(0, 0, 0, 0.7);
    z-index: 1999;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s ease;
}

.off-canvas-overlay.active {
    opacity: 1;
    pointer-events: all;
}

.off-canvas-header {
    padding: 1.5rem;
    border-bottom: 1px solid var(--glass-border);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.close-menu {
    background: transparent;
    border: none;
    color: var(--text-primary);
    cursor: pointer;
    font-size: 1.5rem;
    min-width: 44px;
    min-height: 44px;
    display: flex;
    align-items: center;
    justify-content: center;
    touch-action: manipulation;
}

.menu-items {
    padding: 1rem;
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.menu-item {
    display: block;
    padding: 0.75rem 1rem;
    color: var(--text-secondary);
    text-decoration: none;
    border-radius: var(--radius-md);
    transition: var(--transition);
}

.menu-item:hover {
    background: rgba(124, 76, 255, 0.1);
    color: var(--accent-primary);
}

@media print {
    body {
        background: white !important;
        color: black !important;
    }

    .hero-bg {
        display: none !important;
    }

    .advisors-carousel,
    .carousel-nav,
    .modal,
    .toast {
        display: none !important;
    }

    .advisor-card {
        break-inside: avoid;
        border: 1px solid #ccc;
        background: white;
        color: black;
    }
}
