/**
 * QDEX Landing Page Styles
 *
 * @package QDEX
 * @since 1.0.0
 */

/* ==========================================================================
   LAYOUT
   ========================================================================== */

.qdex-site-wrapper {
    min-height: 100vh;
    background-color: var(--background);
    color: var(--foreground);
}

.qdex-container {
    width: 100%;
    max-width: 1280px;
    margin: 0 auto;
    padding: 0 2rem; /* More padding on mobile */
}

@media (min-width: 768px) {
    .qdex-container {
        padding: 0 3rem;
    }
}

/* Mid-range screens - more generous padding when container is near full width */
@media (min-width: 1024px) and (max-width: 1536px) {
    .qdex-container {
        padding: 0 4rem;
        max-width: 1200px;
    }
}

@media (min-width: 1536px) {
    .qdex-container {
        padding: 0 2rem;
        max-width: 1280px;
    }
}

.qdex-container--narrow {
    max-width: 768px;
}

/* ==========================================================================
   HEADER
   ========================================================================== */

.qdex-header {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 50;
    background-color: rgba(var(--background-rgb), 0.95);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    border-bottom: 1px solid var(--border);
}

.qdex-header-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 1rem 0;
}

/* Logo */
.qdex-logo-wrap {
    display: flex;
    align-items: center;
}

.qdex-logo {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    text-decoration: none;
    transition: opacity 0.2s ease;
}

.qdex-logo:hover {
    opacity: 0.8;
}

.qdex-logo-text {
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--foreground);
}

.qdex-logo-svg {
    display: block;
}

/* Navigation */
.qdex-nav {
    display: none;
    gap: 2rem;
}

@media (min-width: 768px) {
    .qdex-nav {
        display: flex;
    }
}

.qdex-nav-link {
    color: var(--muted-foreground);
    text-decoration: none;
    font-size: 1rem;
    transition: color 0.2s ease;
    background: none;
    border: none;
    cursor: pointer;
    padding: 0;
}

.qdex-nav-link:hover {
    color: var(--qdex-primary-6);
}

/* ==========================================================================
   MAIN CONTENT
   ========================================================================== */

.qdex-main {
    padding-top: 80px; /* Account for fixed header */
}

@media (max-width: 767px) {
    .qdex-main {
        padding-top: 65px; /* Smaller header on mobile */
    }
}

.qdex-landing {
    /* Container for all landing sections */
    background-color: var(--background);
}

/* ==========================================================================
   HERO SECTION
   ========================================================================== */

.qdex-hero {
    min-height: 100vh;
    display: flex;
    align-items: flex-start; /* Align to top instead of center */
    position: relative;
    overflow: hidden;
    padding: 4rem 0 2rem; /* Reduced padding on mobile */
    background-color: var(--background);
}

@media (min-width: 768px) {
    .qdex-hero {
        padding: 5rem 0 4rem;
    }
}

@media (min-width: 1024px) {
    .qdex-hero {
        padding: 6rem 0 5rem;
    }
}

/* Hero geometric pattern - matches original Tailwind .hero-geometric */
.qdex-hero::before {
    content: '';
    position: absolute;
    inset: 0;
    background-image:
        linear-gradient(45deg, rgba(121, 80, 242, 0.1) 0%, transparent 30%),
        radial-gradient(circle at 80% 20%, rgba(121, 80, 242, 0.05) 0%, transparent 40%);
    pointer-events: none;
}

/* Subtle parallax layer */
.qdex-hero::after {
    content: '';
    position: absolute;
    inset: 0;
    background-image:
        radial-gradient(circle at 20% 80%, rgba(121, 80, 242, 0.08) 0%, transparent 50%);
    pointer-events: none;
    transform: translateZ(0);
    will-change: transform;
}

.qdex-hero-grid {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    gap: 2rem;
}

@media (min-width: 768px) {
    .qdex-hero-grid {
        gap: 2.5rem;
    }
}

/* Desktop: Switch to horizontal layout with logo on the RIGHT */
@media (min-width: 1024px) {
    .qdex-hero-grid {
        display: grid;
        grid-template-columns: 1fr 1fr;
        align-items: center;
        text-align: left;
        gap: 4rem;
    }

    /* Put visual (logo) in second column (right side) */
    .qdex-hero-visual {
        order: 2;
    }

    /* Content stays in first column (left side) */
    .qdex-hero-content {
        order: 1;
    }
}

/* Hero Content */
.qdex-hero-content {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 2rem;
    max-width: 800px;
}

@media (min-width: 768px) {
    .qdex-hero-content {
        gap: 2.5rem;
    }
}

@media (min-width: 1024px) {
    .qdex-hero-content {
        align-items: flex-start;
        max-width: none;
    }
}

.qdex-hero-text {
    display: flex;
    flex-direction: column;
    gap: 1.25rem;
}

.qdex-hero-headline {
    font-size: 3rem;
    line-height: 1.1;
    font-weight: 700;
    color: var(--foreground);
    margin: 0;
}

@media (min-width: 1024px) {
    .qdex-hero-headline {
        font-size: 4.5rem;
    }
}

.qdex-hero-para {
    font-size: 1.25rem;
    line-height: 1.6;
    color: var(--muted-foreground);
    margin: 0;
    max-width: 42rem;
}

@media (min-width: 1024px) {
    .qdex-hero-para {
        font-size: 1.5rem;
    }
}

/* Expandable section - visible by default on desktop */
.qdex-hero-expandable {
    display: contents; /* Show all content inline on desktop */
}

.qdex-hero-expandable-inner {
    display: contents; /* Show all content inline on desktop */
}

/* Toggle button - hidden on desktop */
.qdex-hero-toggle {
    display: none;
}

/* Hero Visual */
.qdex-hero-visual {
    display: flex;
    justify-content: center;
    align-items: center;
}

.qdex-hero-logo-wrap {
    position: relative;
    width: 100%;
    max-width: 80px; /* Small on mobile */
}

/* Subtle halo glow effect */
.qdex-hero-logo-wrap::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 110%;
    height: 110%;
    transform: translate(-50%, -50%);
    background: radial-gradient(
        circle,
        rgba(121, 80, 242, 0.08) 0%,
        rgba(121, 80, 242, 0.03) 50%,
        transparent 70%
    );
    border-radius: 50%;
    animation: halo-pulse 6s ease-in-out infinite;
    pointer-events: none;
    z-index: -1;
}

/* Computational circuit lines container */
.qdex-hero-logo-wrap::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 140%;
    height: 140%;
    transform: translate(-50%, -50%);
    background-image:
        /* Radial dashed lines */
        repeating-conic-gradient(
            from 0deg,
            transparent 0deg,
            transparent 10deg,
            rgba(121, 80, 242, 0.04) 10deg,
            rgba(121, 80, 242, 0.04) 11deg,
            transparent 11deg,
            transparent 30deg
        ),
        /* Inner circuit ring */
        radial-gradient(
            circle,
            transparent 48%,
            rgba(121, 80, 242, 0.03) 48%,
            rgba(121, 80, 242, 0.03) 49%,
            transparent 49%
        ),
        /* Outer circuit ring */
        radial-gradient(
            circle,
            transparent 68%,
            rgba(121, 80, 242, 0.02) 68%,
            rgba(121, 80, 242, 0.02) 69%,
            transparent 69%
        );
    border-radius: 50%;
    animation: circuit-rotate 45s linear infinite;
    pointer-events: none;
    z-index: -2;
    opacity: 0.6;
}

@keyframes halo-pulse {
    0%, 100% {
        opacity: 0.5;
        transform: translate(-50%, -50%) scale(1);
    }
    50% {
        opacity: 0.8;
        transform: translate(-50%, -50%) scale(1.02);
    }
}

@keyframes circuit-rotate {
    from {
        transform: translate(-50%, -50%) rotate(0deg);
    }
    to {
        transform: translate(-50%, -50%) rotate(360deg);
    }
}

/* Responsive logo sizing - small mobile, grows on larger screens */
@media (min-width: 480px) {
    .qdex-hero-logo-wrap {
        max-width: 100px;
    }
}

@media (min-width: 640px) {
    .qdex-hero-logo-wrap {
        max-width: 120px;
    }
}

@media (min-width: 768px) {
    .qdex-hero-logo-wrap {
        max-width: 160px;
    }
}

@media (min-width: 1024px) {
    .qdex-hero-logo-wrap {
        max-width: 320px;
    }
}

@media (min-width: 1280px) {
    .qdex-hero-logo-wrap {
        max-width: 380px;
    }
}

@media (min-width: 1536px) {
    .qdex-hero-logo-wrap {
        max-width: 420px;
    }
}

.qdex-hero-logo-wrap svg {
    width: 100%;
    height: auto;
    filter:
        drop-shadow(0 0 6px rgba(121, 80, 242, 0.25))
        drop-shadow(0 0 20px rgba(121, 80, 242, 0.15));
    animation: logo-glow 4s ease-in-out infinite;
}

@keyframes logo-glow {
    0%, 100% {
        filter:
            drop-shadow(0 0 6px rgba(121, 80, 242, 0.2))
            drop-shadow(0 0 20px rgba(121, 80, 242, 0.1));
    }
    50% {
        filter:
            drop-shadow(0 0 10px rgba(121, 80, 242, 0.35))
            drop-shadow(0 0 30px rgba(121, 80, 242, 0.2));
    }
}

/* Decorative dots - hide on very small screens */
.qdex-hero-dot {
    position: absolute;
    background-color: #ffffff;
    border-radius: 50%;
    animation: pulse 2s ease-in-out infinite;
    display: none;
}

@media (min-width: 640px) {
    .qdex-hero-dot {
        display: block;
    }
}

.qdex-hero-dot--1 {
    top: 0.5rem;
    right: 1.5rem;
    width: 0.75rem;
    height: 0.75rem;
}

.qdex-hero-dot--2 {
    bottom: 0.5rem;
    left: 1.5rem;
    width: 1rem;
    height: 1rem;
    animation-delay: 1s;
}

.qdex-hero-dot--3 {
    top: 50%;
    right: -2rem;
    width: 1rem;
    height: 1rem;
    background-color: transparent;
    border: 2px solid #ffffff;
    animation-delay: 0.5s;
}

.qdex-hero-dot--4 {
    top: -1rem;
    left: 2.5rem;
    width: 0.5rem;
    height: 0.5rem;
    animation-delay: 0.7s;
}

.qdex-hero-dot--5 {
    bottom: 1rem;
    right: 3rem;
    width: 0.75rem;
    height: 0.75rem;
    animation-delay: 0.2s;
}

.qdex-hero-dot--6 {
    top: 1rem;
    left: -3rem;
    width: 0.625rem;
    height: 0.625rem;
    background-color: transparent;
    border: 2px solid #ffffff;
    animation-delay: 0.4s;
}

@keyframes pulse {
    0%, 100% {
        opacity: 1;
    }
    50% {
        opacity: 0.5;
    }
}

/* ==========================================================================
   BUTTONS
   ========================================================================== */

.qdex-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    white-space: nowrap;
    border-radius: var(--qdex-radius-sm);
    font-size: 1rem;
    font-weight: 500;
    text-decoration: none;
    cursor: pointer;
    transition: all 0.3s ease;
    border: none;
    outline: none;
}

.qdex-btn:focus-visible {
    outline: 2px solid var(--qdex-primary-6);
    outline-offset: 2px;
}

.qdex-btn--primary {
    background-color: var(--qdex-primary-6);
    color: #ffffff;
    padding: 1rem 2rem;
    font-size: 1.125rem;
    font-weight: 700;
    box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -4px rgba(0, 0, 0, 0.1);
}

.qdex-btn--primary:hover {
    background-color: var(--qdex-primary-8);
    transform: scale(1.05);
    box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 8px 10px -6px rgba(0, 0, 0, 0.1);
}

.qdex-hero-cta {
    align-self: center;
}

@media (min-width: 1024px) {
    .qdex-hero-cta {
        align-self: flex-start;
    }
}

/* ==========================================================================
   SECTIONS
   ========================================================================== */

.qdex-section {
    padding: 5rem 0;
    margin: 0;
    position: relative;
}

/* Card sections (For Brokers, Contact) - seamless with subtle distinction */
.qdex-section--card {
    background: var(--background);
    position: relative;
}

/* Subtle purple glow at top for visual interest */
.qdex-section--card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 1px;
    background: linear-gradient(
        90deg,
        transparent 0%,
        rgba(121, 80, 242, 0.2) 50%,
        transparent 100%
    );
    pointer-events: none;
}

/* Very subtle highlight overlay */
.qdex-section--card::after {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(
        180deg,
        rgba(255, 255, 255, 0.015) 0%,
        transparent 50%,
        transparent 100%
    );
    pointer-events: none;
}

/* Pattern sections (Benefits) - with geometric background */
.qdex-section--pattern {
    background-color: var(--background);
    position: relative;
    overflow: hidden;
}

/* Geometric pattern - matches original Tailwind .geometric-pattern */
.qdex-section--pattern::before {
    content: '';
    position: absolute;
    inset: 0;
    background-image:
        radial-gradient(circle at 25% 25%, rgba(121, 80, 242, 0.1) 0%, transparent 50%),
        radial-gradient(circle at 75% 75%, rgba(121, 80, 242, 0.05) 0%, transparent 50%);
    pointer-events: none;
}

/* Subtle top gradient divider for sections */
.qdex-section--pattern::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 1px;
    background: linear-gradient(
        90deg,
        transparent 0%,
        rgba(121, 80, 242, 0.3) 50%,
        transparent 100%
    );
    pointer-events: none;
}

.qdex-section-header {
    text-align: center;
    margin-bottom: 4rem;
}

.qdex-section-content {
    max-width: 56rem;
}

.qdex-section-content--centered {
    margin: 0 auto;
    text-align: center;
}

.qdex-section-headline {
    font-size: 2.5rem;
    font-weight: 700;
    color: var(--foreground);
    margin: 0 0 1.5rem 0;
    line-height: 1.2;
}

@media (min-width: 1024px) {
    .qdex-section-headline {
        font-size: 3rem;
    }
}

.qdex-section-description {
    font-size: 1.25rem;
    line-height: 1.6;
    color: var(--muted-foreground);
    margin: 0;
}

/* Text highlight */
.text-highlight {
    color: var(--qdex-primary-6);
}

/* ==========================================================================
   BENEFITS GRID
   ========================================================================== */

.qdex-benefits-grid {
    display: grid;
    gap: 3rem;
}

@media (min-width: 1024px) {
    .qdex-benefits-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

/* ==========================================================================
   CARDS
   ========================================================================== */

.qdex-card {
    background: rgba(255, 255, 255, 0.02);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.06);
    border-radius: 0.75rem;
    padding: 2rem;
    box-shadow:
        0 4px 24px rgba(0, 0, 0, 0.12),
        inset 0 1px 0 rgba(255, 255, 255, 0.04);
    /* Scroll reveal + hover transitions */
    transition:
        opacity 0.4s ease-out var(--reveal-delay, 0s),
        transform 0.4s ease-out var(--reveal-delay, 0s),
        border-color 0.5s ease,
        background 0.5s ease,
        box-shadow 0.5s ease;
    position: relative;
    overflow: hidden;
}

.qdex-card::before {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(
        135deg,
        rgba(121, 80, 242, 0.02) 0%,
        transparent 50%
    );
    opacity: 0;
    transition: opacity 0.3s ease;
    pointer-events: none;
}

.qdex-card:hover {
    border-color: rgba(121, 80, 242, 0.15);
    background: rgba(255, 255, 255, 0.03);
    box-shadow:
        0 6px 24px rgba(121, 80, 242, 0.06),
        0 12px 28px rgba(0, 0, 0, 0.1),
        inset 0 1px 0 rgba(255, 255, 255, 0.05);
    transform: translateY(-2px);
}

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

.qdex-card-header {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin-bottom: 1.5rem;
}

.qdex-card-icon {
    width: 2rem;
    height: 2rem;
    color: var(--qdex-primary-6);
    flex-shrink: 0;
}

.qdex-card-title {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--qdex-primary-6);
    margin: 0;
}

.qdex-card-body {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.qdex-card-item {
    /* Individual benefit item */
}

.qdex-card-item-title {
    font-size: 1.125rem;
    font-weight: 600;
    color: var(--foreground);
    margin: 0 0 0.5rem 0;
}

.qdex-card-item-text {
    font-size: 1rem;
    line-height: 1.6;
    color: var(--muted-foreground);
    margin: 0;
}

/* ==========================================================================
   CONTACT SECTION
   ========================================================================== */

.qdex-contact-content {
    display: flex;
    flex-direction: column;
    gap: 2rem;
}

.qdex-form-container {
    margin-top: 1rem;
}

.qdex-form-placeholder {
    color: var(--muted-foreground);
    font-style: italic;
    padding: 2rem;
    border: 1px dashed var(--border);
    border-radius: var(--qdex-radius-md);
    text-align: center;
    background: rgba(255, 255, 255, 0.02);
    max-width: 500px;
    margin: 0 auto;
}

/* HubSpot form styling overrides */
.qdex-form-container .hs-form {
    max-width: 500px;
    margin: 0 auto;
}

.qdex-form-container .hs-form-field {
    margin-bottom: 1rem;
}

.qdex-form-container .hs-input {
    width: 100%;
    padding: 0.75rem 1rem;
    border: 1px solid var(--border);
    border-radius: var(--qdex-radius-sm);
    background-color: var(--background);
    color: var(--foreground);
    font-size: 1rem;
}

.qdex-form-container .hs-input:focus {
    outline: none;
    border-color: var(--qdex-primary-6);
    box-shadow: 0 0 0 3px rgba(121, 80, 242, 0.2);
}

.qdex-form-container .hs-button {
    background-color: var(--qdex-primary-6);
    color: #ffffff;
    padding: 0.75rem 2rem;
    border: none;
    border-radius: var(--qdex-radius-sm);
    font-size: 1rem;
    font-weight: 500;
    cursor: pointer;
    transition: background-color 0.2s ease;
}

.qdex-form-container .hs-button:hover {
    background-color: var(--qdex-primary-8);
}

.qdex-form-container .hs-error-msgs {
    color: var(--qdex-error);
    font-size: 0.875rem;
    margin-top: 0.25rem;
}

/* HubSpot reCAPTCHA spacing - target direct child elements */
.hs-recaptcha > input,
.hs_recaptcha > input,
.hs-recaptcha > iframe,
.hs_recaptcha > iframe,
.hs-recaptcha > div,
.hs_recaptcha > div,
[class*="recaptcha"] > input,
[class*="recaptcha"] > div {
    margin-top: 1.5rem !important;
}

.qdex-form-container label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 500;
    color: var(--foreground);
}

/* ==========================================================================
   FOOTER
   ========================================================================== */

.qdex-footer {
    background-color: var(--background);
    border-top: 1px solid var(--border);
    padding: 3rem 0;
}

.qdex-footer-inner {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1.5rem;
}

@media (min-width: 768px) {
    .qdex-footer-inner {
        flex-direction: row;
        justify-content: space-between;
        gap: 0;
    }
}

.qdex-footer-brand {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.qdex-footer-copyright {
    color: var(--muted-foreground);
}

.qdex-footer-links {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    justify-content: center;
    gap: 2rem;
}

.qdex-footer-link {
    color: var(--muted-foreground);
    text-decoration: none;
    font-size: 1rem;
    background: none;
    border: none;
    cursor: pointer;
    padding: 0;
    transition: color 0.2s ease;
}

.qdex-footer-link:hover {
    color: var(--qdex-primary-6);
}

.qdex-footer-link--placeholder {
    /* Placeholder style for pages not yet created */
    opacity: 0.7;
}

.qdex-footer-social {
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--muted-foreground);
    transition: color 0.2s ease;
    position: relative;
    z-index: 1;
}

.qdex-footer-social:hover {
    color: var(--qdex-primary-6);
}

.qdex-footer-social svg {
    width: 1.5rem;
    height: 1.5rem;
    pointer-events: none;
}

/* ==========================================================================
   NOTIFICATIONS (for future use)
   ========================================================================== */

.qdex-notifications {
    pointer-events: none;
    position: fixed;
    top: 0;
    z-index: 100;
}

.qdex-notifications-list {
    display: flex;
    flex-direction: column-reverse;
    max-height: 100vh;
    width: 100%;
    padding: 1rem;
    margin: 0;
    list-style: none;
}

@media (min-width: 640px) {
    .qdex-notifications {
        bottom: 0;
        right: 0;
        top: auto;
    }

    .qdex-notifications-list {
        flex-direction: column;
        max-width: 420px;
    }
}

/* ==========================================================================
   PAGE TEMPLATE STYLES (Privacy Policy, Terms, etc.)
   ========================================================================== */

.qdex-page {
    padding: 7rem 0 6rem; /* Extra top padding for fixed header */
    min-height: calc(100vh - 200px);
    background-color: var(--background);
}

@media (max-width: 767px) {
    .qdex-page {
        padding: 5rem 0 4rem; /* Reduced padding on mobile */
    }
}

.qdex-article {
    background: rgba(255, 255, 255, 0.02);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.06);
    border-radius: 0.75rem;
    padding: 3rem;
    box-shadow:
        0 4px 24px rgba(0, 0, 0, 0.12),
        inset 0 1px 0 rgba(255, 255, 255, 0.04);
}

@media (max-width: 640px) {
    .qdex-article {
        padding: 1.5rem;
        border-radius: 0;
        border-left: none;
        border-right: none;
    }
}

.qdex-article-header {
    margin-bottom: 2.5rem;
    padding-bottom: 2rem;
    border-bottom: 1px solid var(--border);
}

.qdex-article-title {
    font-size: 2.5rem;
    font-weight: 700;
    color: var(--foreground);
    margin: 0 0 0.5rem;
    line-height: 1.2;
}

@media (max-width: 640px) {
    .qdex-article-title {
        font-size: 1.75rem;
    }
}

.qdex-article-meta {
    margin-top: 0.75rem;
    color: var(--muted-foreground);
    font-size: 0.875rem;
}

.qdex-article-meta time {
    font-weight: 500;
}

/* Content Typography */
.qdex-article-content {
    font-size: 1rem;
    line-height: 1.8;
    color: var(--foreground);
}

@media (min-width: 768px) {
    .qdex-article-content {
        font-size: 1.0625rem;
    }
}

/* Headings */
.qdex-article-content h2 {
    font-size: 1.5rem;
    font-weight: 700;
    margin: 2.5rem 0 1rem;
    padding-top: 1.5rem;
    border-top: 1px solid var(--border);
    color: var(--foreground);
}

.qdex-article-content h2:first-child {
    margin-top: 0;
    padding-top: 0;
    border-top: none;
}

.qdex-article-content h3 {
    font-size: 1.25rem;
    font-weight: 600;
    margin: 2rem 0 0.75rem;
    color: var(--foreground);
}

.qdex-article-content h4 {
    font-size: 1.125rem;
    font-weight: 600;
    margin: 1.5rem 0 0.5rem;
    color: var(--foreground);
}

/* Paragraphs */
.qdex-article-content p {
    margin: 0 0 1.25rem;
}

.qdex-article-content p:last-child {
    margin-bottom: 0;
}

/* Links */
.qdex-article-content a {
    color: var(--qdex-primary-6);
    text-decoration: underline;
    text-underline-offset: 2px;
    transition: color 0.2s ease;
}

.qdex-article-content a:hover {
    color: var(--qdex-primary-8);
}

/* Lists */
.qdex-article-content ul,
.qdex-article-content ol {
    margin: 0 0 1.5rem;
    padding-left: 1.75rem;
}

.qdex-article-content li {
    margin-bottom: 0.5rem;
    padding-left: 0.25rem;
}

.qdex-article-content li:last-child {
    margin-bottom: 0;
}

/* Nested lists */
.qdex-article-content ul ul,
.qdex-article-content ol ol,
.qdex-article-content ul ol,
.qdex-article-content ol ul {
    margin: 0.5rem 0 0.5rem;
}

/* Definition lists (common in legal docs) */
.qdex-article-content dl {
    margin: 0 0 1.5rem;
}

.qdex-article-content dt {
    font-weight: 600;
    margin-top: 1rem;
    color: var(--foreground);
}

.qdex-article-content dt:first-child {
    margin-top: 0;
}

.qdex-article-content dd {
    margin: 0.25rem 0 0 1.5rem;
    color: var(--muted-foreground);
}

/* Blockquotes */
.qdex-article-content blockquote {
    margin: 1.5rem 0;
    padding: 1rem 1.5rem;
    border-left: 4px solid var(--qdex-primary-6);
    background-color: rgba(121, 80, 242, 0.05);
    border-radius: 0 0.5rem 0.5rem 0;
    font-style: italic;
    color: var(--muted-foreground);
}

.qdex-article-content blockquote p:last-child {
    margin-bottom: 0;
}

/* Tables */
.qdex-article-content table {
    width: 100%;
    margin: 1.5rem 0;
    border-collapse: collapse;
    font-size: 0.9375rem;
}

.qdex-article-content th,
.qdex-article-content td {
    padding: 0.75rem 1rem;
    text-align: left;
    border: 1px solid var(--border);
}

.qdex-article-content th {
    background-color: var(--muted);
    font-weight: 600;
    color: var(--foreground);
}

.qdex-article-content tr:nth-child(even) {
    background-color: rgba(0, 0, 0, 0.02);
}

.dark .qdex-article-content tr:nth-child(even) {
    background-color: rgba(255, 255, 255, 0.02);
}

/* Horizontal rules */
.qdex-article-content hr {
    border: none;
    height: 1px;
    background: linear-gradient(
        90deg,
        transparent 0%,
        var(--border) 20%,
        var(--border) 80%,
        transparent 100%
    );
    margin: 2.5rem 0;
}

/* Code blocks (if needed for technical terms) */
.qdex-article-content code {
    font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
    font-size: 0.875em;
    padding: 0.2rem 0.4rem;
    background-color: var(--muted);
    border-radius: 0.25rem;
    color: var(--qdex-primary-6);
}

.qdex-article-content pre {
    margin: 1.5rem 0;
    padding: 1rem;
    background-color: var(--muted);
    border-radius: 0.5rem;
    overflow-x: auto;
}

.qdex-article-content pre code {
    padding: 0;
    background: none;
}

/* Strong/Bold text */
.qdex-article-content strong,
.qdex-article-content b {
    font-weight: 600;
    color: var(--foreground);
}

/* Emphasis */
.qdex-article-content em,
.qdex-article-content i {
    font-style: italic;
}

/* Small text (for footnotes, disclaimers) */
.qdex-article-content small {
    font-size: 0.875em;
    color: var(--muted-foreground);
}

/* No content fallback */
.qdex-no-content {
    text-align: center;
    padding: 4rem 0;
}

.qdex-no-content h1 {
    font-size: 2rem;
    color: var(--foreground);
    margin: 0 0 1rem;
}

.qdex-no-content p {
    color: var(--muted-foreground);
}

/* ==========================================================================
   ICON HELPERS
   ========================================================================== */

.qdex-icon {
    display: inline-block;
    vertical-align: middle;
}

/* ==========================================================================
   ANIMATIONS & TRANSITIONS
   ========================================================================== */

/* Scroll reveal hidden state - toggled by JS */
.qdex-scroll-hidden {
    opacity: 0 !important;
    transform: translateY(30px) !important;
}

/* Section content transitions */
.qdex-section-content,
.qdex-section-header {
    transition:
        opacity 0.4s ease-out var(--reveal-delay, 0s),
        transform 0.4s ease-out var(--reveal-delay, 0s);
}

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

    .qdex-hero::before,
    .qdex-hero::after,
    .qdex-section--pattern::before {
        background-attachment: scroll;
    }
}

/* ==========================================================================
   LENDING TYPES SECTION
   ========================================================================== */

.qdex-section--dark {
    background-color: var(--background);
    padding: 5rem 0;
}

.qdex-section-description--centered {
    text-align: center;
    max-width: 700px;
    margin: 0 auto 3rem;
}

/* Lending Types Grid - 3 columns on desktop */
.qdex-section--dark .qdex-lending-grid {
    display: grid !important;
    grid-template-columns: repeat(3, 1fr) !important;
    gap: 2rem !important;
    width: 100%;
}

@media (max-width: 767px) {
    .qdex-section--dark .qdex-lending-grid {
        grid-template-columns: 1fr !important;
        gap: 1.5rem !important;
    }
}

.qdex-section--dark .qdex-lending-card {
    background: rgba(255, 255, 255, 0.02);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.06);
    border-radius: var(--qdex-radius-lg);
    padding: 2rem;
    text-align: center;
    box-shadow:
        0 4px 24px rgba(0, 0, 0, 0.12),
        inset 0 1px 0 rgba(255, 255, 255, 0.04);
    /* Scroll reveal + hover transitions */
    transition:
        opacity 0.4s ease-out var(--reveal-delay, 0s),
        transform 0.4s ease-out var(--reveal-delay, 0s),
        border-color 0.5s ease,
        background 0.5s ease,
        box-shadow 0.5s ease;
}

.qdex-section--dark .qdex-lending-card:hover {
    transform: translateY(-2px);
    border-color: rgba(121, 80, 242, 0.15);
    background: rgba(255, 255, 255, 0.03);
    box-shadow:
        0 6px 24px rgba(121, 80, 242, 0.06),
        0 12px 28px rgba(0, 0, 0, 0.1),
        inset 0 1px 0 rgba(255, 255, 255, 0.05);
}

.qdex-lending-icon {
    display: flex;
    justify-content: center;
    align-items: center;
    margin-bottom: 1.5rem;
    color: var(--qdex-primary-6);
}

.qdex-lending-icon svg {
    width: 48px;
    height: 48px;
    stroke: var(--qdex-primary-6);
}

.qdex-lending-title {
    font-size: 1.25rem;
    font-weight: 600;
    color: var(--foreground);
    margin: 0 0 1.5rem 0;
}

/* Purple checkmark list */
.qdex-section--dark .qdex-lending-list {
    list-style: none !important;
    padding: 0 !important;
    margin: 0 !important;
    text-align: left;
}

.qdex-section--dark .qdex-lending-list li {
    position: relative;
    padding-left: 1.75rem;
    margin-bottom: 0.75rem;
    color: var(--muted-foreground);
    font-size: 0.9375rem;
    line-height: 1.5;
    list-style: none !important;
}

.qdex-section--dark .qdex-lending-list li::before {
    content: '✓' !important;
    position: absolute;
    left: 0;
    top: 0;
    color: #7950F2 !important;
    font-weight: bold;
    font-size: 1rem;
}

.qdex-section--dark .qdex-lending-list li.qdex-lending-more {
    color: var(--qdex-primary-5);
    font-style: italic;
    padding-left: 0;
}

.qdex-section--dark .qdex-lending-list li.qdex-lending-more::before {
    display: none !important;
    content: none !important;
}

/* ==========================================================================
   UTILITY CLASSES
   ========================================================================== */

.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

/* ==========================================================================
   WORDPRESS SPECIFIC
   ========================================================================== */

/* Pagination */
.nav-links {
    display: flex;
    justify-content: center;
    gap: 0.5rem;
    margin-top: 2rem;
}

.nav-links a,
.nav-links span {
    padding: 0.5rem 1rem;
    border: 1px solid var(--border);
    border-radius: var(--qdex-radius-sm);
    color: var(--foreground);
    text-decoration: none;
}

.nav-links a:hover {
    border-color: var(--qdex-primary-6);
    color: var(--qdex-primary-6);
}

.nav-links .current {
    background-color: var(--qdex-primary-6);
    border-color: var(--qdex-primary-6);
    color: #ffffff;
}

/* Custom logo in WordPress */
.custom-logo-link {
    display: flex;
    align-items: center;
}

.custom-logo {
    max-height: 40px;
    width: auto;
}

/* ==========================================================================
   MOBILE HERO - OUTSTANDING EXPERIENCE
   Only applies to mobile devices (max-width: 767px)
   ========================================================================== */

@media (max-width: 767px) {
    /* Hero container - fullscreen immersive experience */
    .qdex-hero {
        min-height: 100vh;
        min-height: 100dvh; /* Dynamic viewport height for mobile browsers */
        padding: 2rem 0 3rem;
        display: flex;
        align-items: center;
        justify-content: center;
    }

    /* Hero grid - vertical stack, centered */
    .qdex-hero-grid {
        display: flex;
        flex-direction: column;
        align-items: center;
        text-align: center;
        gap: 2.5rem;
    }

    /* Logo - compact on mobile with breathing room at top */
    .qdex-hero-logo-wrap {
        max-width: 100px;
        margin-top: 2rem;
        margin-bottom: 0.5rem;
    }

    /* Enhanced glow effect for mobile */
    .qdex-hero-logo-wrap::before {
        width: 150%;
        height: 150%;
        background: radial-gradient(
            circle,
            rgba(121, 80, 242, 0.15) 0%,
            rgba(121, 80, 242, 0.08) 40%,
            rgba(121, 80, 242, 0.03) 60%,
            transparent 80%
        );
    }

    /* Hide circuit decoration on mobile for cleaner look */
    .qdex-hero-logo-wrap::after {
        display: none;
    }

    /* Show decorative dots on mobile for visual interest */
    .qdex-hero-dot {
        display: block;
        opacity: 0.6;
    }

    /* Hero content - tighter spacing */
    .qdex-hero-content {
        gap: 1.5rem;
        max-width: 100%;
        padding: 0 0.5rem;
    }

    .qdex-hero-text {
        gap: 1rem;
    }

    /* Headline - dramatic, large, impactful */
    .qdex-hero-headline {
        font-size: 2.5rem;
        line-height: 1.05;
        letter-spacing: -0.02em;
        font-weight: 800;
    }

    /* Paragraphs styling - smaller on mobile */
    .qdex-hero-para {
        font-size: 0.9375rem;
        line-height: 1.5;
        max-width: 100%;
    }

    /* Expandable section - show all content on mobile (no toggle) */
    .qdex-hero-expandable {
        display: block;
    }

    .qdex-hero-expandable-inner {
        display: flex;
        flex-direction: column;
        gap: 0.75rem;
    }

    .qdex-hero-expandable .qdex-hero-para {
        margin: 0;
    }

    /* Hide toggle button on mobile - not needed */
    .qdex-hero-toggle {
        display: none;
    }

    /* First paragraph - brighter, medium weight */
    .qdex-hero-text > .qdex-hero-para:first-of-type {
        color: #cbd5e1; /* Brighter gray */
        font-weight: 500;
    }

    /* CTA button - slightly smaller */
    .qdex-hero-cta {
        width: 100%;
        max-width: 220px;
        padding: 0.875rem 1.5rem;
        font-size: 1rem;
        font-weight: 700;
        border-radius: var(--qdex-radius-md);
        margin-top: 0.5rem;
    }

    /* Enhanced geometric background for mobile */
    .qdex-hero::before {
        background-image:
            linear-gradient(135deg, rgba(121, 80, 242, 0.12) 0%, transparent 50%),
            radial-gradient(circle at 90% 10%, rgba(121, 80, 242, 0.1) 0%, transparent 40%),
            radial-gradient(circle at 10% 90%, rgba(121, 80, 242, 0.08) 0%, transparent 40%);
    }

    /* Subtle animated gradient overlay */
    .qdex-hero::after {
        background-image:
            radial-gradient(ellipse at 50% 0%, rgba(121, 80, 242, 0.06) 0%, transparent 60%);
    }
}

/* Very small phones - further optimizations */
@media (max-width: 374px) {
    .qdex-hero-logo-wrap {
        max-width: 80px;
    }

    .qdex-hero-headline {
        font-size: 2rem;
    }

    .qdex-hero-para {
        font-size: 1rem;
    }

    .qdex-hero-cta {
        max-width: 100%;
        padding: 1rem 1.5rem;
    }
}

/* ==========================================================================
   MOBILE FOOTER FIXES
   ========================================================================== */

@media (max-width: 767px) {
    .qdex-footer {
        padding: 2rem 0;
    }

    .qdex-footer-inner {
        flex-direction: column;
        align-items: center;
        gap: 1.5rem;
        text-align: center;
    }

    .qdex-footer-brand {
        flex-direction: column;
        gap: 0.5rem;
    }

    .qdex-footer-links {
        display: flex;
        flex-wrap: wrap;
        justify-content: center;
        gap: 1rem 1.5rem;
        width: 100%;
    }

    .qdex-footer-link {
        font-size: 0.875rem;
    }

    .qdex-footer-social {
        margin-top: 0.5rem;
    }
}

/* ==========================================================================
   TABLET STYLES - Better padding and reduced text for medium screens
   ========================================================================== */

@media (min-width: 768px) and (max-width: 1023px) {
    /* Container - more generous side padding on tablets */
    .qdex-container {
        padding: 0 2.5rem;
    }

    /* Hero section adjustments */
    .qdex-hero {
        padding: 4rem 0 3rem;
    }

    .qdex-hero-headline {
        font-size: 2.75rem;
    }

    .qdex-hero-para {
        font-size: 1.125rem;
    }

    /* Section headlines - slightly smaller */
    .qdex-section-headline {
        font-size: 2rem;
    }

    .qdex-section-description {
        font-size: 1.125rem;
    }

    /* Card content - tighter on tablets */
    .qdex-card {
        padding: 1.5rem;
    }

    .qdex-card-title {
        font-size: 1.25rem;
    }

    .qdex-card-item-title {
        font-size: 1rem;
    }

    .qdex-card-item-text {
        font-size: 0.9375rem;
    }

    /* Lending cards - 2 columns on tablet instead of 3 */
    .qdex-section--dark .qdex-lending-grid {
        grid-template-columns: repeat(2, 1fr) !important;
    }

    .qdex-section--dark .qdex-lending-card {
        padding: 1.5rem;
    }

    .qdex-lending-title {
        font-size: 1.125rem;
    }

    /* Benefits grid - single column on tablets for readability */
    .qdex-benefits-grid {
        gap: 2rem;
    }

    /* Footer - better spacing */
    .qdex-footer-links {
        gap: 1.5rem;
    }

    .qdex-footer-link {
        font-size: 0.9375rem;
    }
}
