/**
 * Top5Mindset Template Styles
 * Shared styles across all page templates
 * Version: 1.0.0
 */

/* ==========================================================================
   PREMIUM HERO TRADING BACKGROUND
   ========================================================================== */

.t5-hero-bg {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100vh;
    z-index: 0;
    overflow: hidden;
    pointer-events: none;
}

/* Gradient overlay - dark left fading to transparent right */
.t5-hero-bg::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(
        90deg,
        #0a0f1e 0%,
        #0a0f1e 25%,
        rgba(10, 15, 30, 0.85) 45%,
        rgba(10, 15, 30, 0.4) 65%,
        transparent 100%
    );
    z-index: 1;
    pointer-events: none;
}

/* Mobile: lighter overlay to show chart */
@media (max-width: 767px) {
    .t5-hero-bg::before {
        background: linear-gradient(
            180deg,
            rgba(10, 15, 30, 0.7) 0%,
            rgba(10, 15, 30, 0.6) 50%,
            rgba(10, 15, 30, 0.8) 100%
        );
    }
}

.t5-fixed-bg {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100vh;
    z-index: 0;
    overflow: hidden;
    pointer-events: none;
}

.t5-hero-bg svg,
.t5-fixed-bg svg {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
}

/* Desktop: Position chart to right side */
@media (min-width: 768px) {
    .t5-hero-bg svg {
        left: auto;
        right: 0;
        width: 65%;
        height: auto;
        min-height: 100%;
    }
}

.t5-fixed-bg__glow {
    position: absolute;
    top: 30%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 600px;
    height: 600px;
    background: radial-gradient(ellipse at center, rgba(212, 175, 55, 0.06) 0%, transparent 70%);
    pointer-events: none;
}

/* Animated Moving Averages - Smooth flow */
.t5-hero-bg .t5-ma-200 {
    animation: maFlow 90s ease-in-out infinite;
}

.t5-hero-bg .t5-ma-50 {
    animation: maFlow 70s ease-in-out infinite;
    animation-delay: -15s;
}

.t5-hero-bg .t5-ma-20 {
    animation: maFlow 50s ease-in-out infinite;
    animation-delay: -8s;
}

@keyframes maFlow {
    0%, 100% {
        transform: translateX(0) translateY(0);
    }
    25% {
        transform: translateX(-15px) translateY(-5px);
    }
    50% {
        transform: translateX(-25px) translateY(0);
    }
    75% {
        transform: translateX(-10px) translateY(5px);
    }
}

/* Candle bars subtle animation */
.t5-hero-bg .t5-price-bars rect {
    animation: candlePulse 4s ease-in-out infinite;
}

.t5-hero-bg .t5-price-bars rect:nth-child(odd) {
    animation-delay: -1s;
}

.t5-hero-bg .t5-price-bars rect:nth-child(3n) {
    animation-delay: -2s;
}

@keyframes candlePulse {
    0%, 100% {
        opacity: var(--base-opacity, 0.4);
    }
    50% {
        opacity: calc(var(--base-opacity, 0.4) * 1.2);
    }
}

/* Premium glow accents */
.t5-hero-bg__glow {
    position: absolute;
    border-radius: 50%;
    filter: blur(120px);
    animation: glowFloat 12s ease-in-out infinite;
}

.t5-hero-bg__glow--gold {
    top: 20%;
    left: 50%;
    width: 500px;
    height: 500px;
    background: radial-gradient(ellipse at center, rgba(212, 175, 55, 0.08) 0%, transparent 70%);
}

.t5-hero-bg__glow--blue {
    top: 40%;
    right: 10%;
    width: 400px;
    height: 400px;
    background: radial-gradient(ellipse at center, rgba(59, 130, 246, 0.06) 0%, transparent 70%);
    animation-delay: -4s;
}

@keyframes glowFloat {
    0%, 100% {
        transform: translate(0, 0) scale(1);
        opacity: 1;
    }
    50% {
        transform: translate(20px, -20px) scale(1.1);
        opacity: 0.8;
    }
}

/* Fade out hero background at bottom - disabled to show grid under ticker */
.t5-hero-bg::after {
    display: none;
}

/* ==========================================================================
   PAGE GRID BACKGROUND (Below Hero)
   ========================================================================== */

.t5-section {
    position: relative;
    background-image:
        /* Subtle grid */
        linear-gradient(rgba(59, 130, 246, 0.03) 1px, transparent 1px),
        linear-gradient(90deg, rgba(59, 130, 246, 0.03) 1px, transparent 1px),
        /* Larger grid */
        linear-gradient(rgba(59, 130, 246, 0.02) 1px, transparent 1px),
        linear-gradient(90deg, rgba(59, 130, 246, 0.02) 1px, transparent 1px);
    background-size:
        20px 20px,
        20px 20px,
        100px 100px,
        100px 100px;
    background-position: center center;
}

/* Spot accents for sections */
.t5-section::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 60%;
    height: 60%;
    background: radial-gradient(ellipse at center, rgba(59, 130, 246, 0.03) 0%, transparent 70%);
    pointer-events: none;
    z-index: -1;
}

/* Alternate section accents */
.t5-section:nth-child(even)::before {
    background: radial-gradient(ellipse at center, rgba(212, 175, 55, 0.02) 0%, transparent 70%);
}

.t5-section:nth-child(3n)::before {
    background: radial-gradient(ellipse at center, rgba(31, 218, 154, 0.02) 0%, transparent 70%);
}

/* Mobile optimization */
@media (max-width: 767px) {
    .t5-hero-bg svg {
        opacity: 0.85;
    }

    .t5-hero-bg .t5-ma-200,
    .t5-hero-bg .t5-ma-50,
    .t5-hero-bg .t5-ma-20,
    .t5-hero-bg .t5-price-bars rect {
        animation: none;
    }

    .t5-hero-bg__glow {
        opacity: 0.5;
        animation: none;
    }

    .t5-section {
        background-size:
            30px 30px,
            30px 30px,
            120px 120px,
            120px 120px;
    }
}

/* ==========================================================================
   GENERIC PAGE LAYOUT
   ========================================================================== */

.t5-page {
    position: relative;
    padding: 140px 0 80px;
    min-height: calc(100vh - 80px);
}

@media (min-width: 768px) {
    .t5-page { padding: 160px 0 100px; }
}

/* ==========================================================================
   LEGAL PAGES (Privacy, Terms, Disclaimer)
   ========================================================================== */

.t5-legal {
    position: relative;
    padding: 140px 0 80px;
    min-height: calc(100vh - 80px);
    background: var(--t5-bg-dark, #0a0f1e);
}

@media (min-width: 768px) {
    .t5-legal {
        padding: 160px 0 100px;
    }
}

.t5-legal__header {
    text-align: center;
    margin-bottom: 48px;
}

.t5-legal__header h1 {
    font-size: clamp(2rem, 5vw, 3rem);
    font-weight: 700;
    color: #ffffff;
    margin: 0 0 16px;
}

.t5-legal__updated {
    color: rgba(255, 255, 255, 0.5);
    font-size: 0.9rem;
}

.t5-legal__content {
    background: rgba(255, 255, 255, 0.02);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 16px;
    padding: 48px;
}

@media (max-width: 767px) {
    .t5-legal__content {
        padding: 24px 20px;
    }
}

.t5-legal__content h2 {
    font-size: 1.5rem;
    font-weight: 700;
    color: #ffffff;
    margin: 48px 0 16px;
}

.t5-legal__content h2:first-child {
    margin-top: 0;
}

.t5-legal__content h3 {
    font-size: 1.125rem;
    font-weight: 600;
    color: #ffffff;
    margin: 24px 0 12px;
}

.t5-legal__content p {
    color: rgba(255, 255, 255, 0.7);
    line-height: 1.7;
    margin: 0 0 16px;
}

.t5-legal__content ul {
    color: rgba(255, 255, 255, 0.7);
    line-height: 1.7;
    padding-left: 24px;
    margin: 0 0 16px;
}

.t5-legal__content li {
    margin-bottom: 8px;
}

.t5-legal__content a {
    color: #3b82f6;
    text-decoration: none;
    transition: color 0.2s ease;
}

.t5-legal__content a:hover {
    color: #60a5fa;
}

.t5-legal__content strong {
    color: #ffffff;
}

.t5-legal__acceptance {
    text-align: center;
    margin-top: 32px;
    padding-top: 24px;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
}

/* Legal pages mobile improvements */
@media (max-width: 767px) {
    .t5-legal {
        padding: 120px 16px 60px;
    }

    .t5-legal__header {
        margin-bottom: 32px;
    }

    .t5-legal__header h1 {
        font-size: 1.75rem;
    }

    .t5-legal__content h2 {
        font-size: 1.25rem;
        margin: 32px 0 12px;
    }

    .t5-legal__content h3 {
        font-size: 1rem;
    }

    .t5-legal__content p,
    .t5-legal__content li {
        font-size: 0.9rem;
    }

    .t5-legal__content ul {
        padding-left: 20px;
    }

    .t5-legal__content a {
        word-break: break-word;
    }
}

/* Disclaimer boxes */
.t5-disclaimer-box {
    background: rgba(59, 130, 246, 0.1);
    border: 1px solid rgba(59, 130, 246, 0.3);
    border-radius: 12px;
    padding: 24px;
    margin: 24px 0;
}

.t5-disclaimer-box h3 {
    color: #3b82f6;
    margin: 0 0 12px;
}

.t5-disclaimer-box p {
    margin: 0;
}

.t5-disclaimer-box--danger {
    background: rgba(239, 68, 68, 0.1);
    border-color: rgba(239, 68, 68, 0.3);
}

.t5-disclaimer-box--danger h3 {
    color: #ef4444;
}

/* ==========================================================================
   ERROR PAGE (404)
   ========================================================================== */

.t5-error-page {
    position: relative;
    min-height: calc(100vh - 80px);
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    padding: 60px 20px;
}

.t5-error-page__code {
    font-size: clamp(100px, 20vw, 180px);
    font-weight: 800;
    line-height: 1;
    background: linear-gradient(135deg, var(--t5-gold) 0%, rgba(212, 175, 55, 0.5) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    margin-bottom: 20px;
}

.t5-error-page h1 {
    font-size: clamp(1.5rem, 4vw, 2.5rem);
    margin-bottom: 16px;
}

.t5-error-page p {
    font-size: 1.125rem;
    color: var(--t5-text-secondary);
    margin-bottom: 32px;
}

/* ==========================================================================
   PROP FIRMS PAGE WRAPPER
   ========================================================================== */

.t5-propfirms-page,
.t5-firm-page {
    position: relative;
    min-height: 100vh;
}

/* ==========================================================================
   SECTION HEADERS - CENTERED
   ========================================================================== */

.t5-section-header {
    text-align: center;
    margin-bottom: 40px;
}

.t5-section-header h2 {
    margin-bottom: 12px;
}

.t5-section-header p {
    color: var(--t5-text-secondary);
    max-width: 600px;
    margin: 0 auto;
}

/* ==========================================================================
   HERO SECTIONS
   ========================================================================== */

.t5-propfirms-hero,
.t5-firm-hero {
    position: relative;
    z-index: 1;
    padding: 140px 0 60px;
}

@media (min-width: 768px) {
    .t5-propfirms-hero,
    .t5-firm-hero {
        padding: 160px 0 80px;
    }
}

.t5-propfirms-hero .t5-section-header {
    text-align: center;
    margin-bottom: 40px;
}

.t5-propfirms-hero h1 {
    font-size: clamp(1.75rem, 5vw, 3rem);
    margin-bottom: 16px;
}

.t5-propfirms-hero__subtitle {
    font-size: clamp(1rem, 2vw, 1.125rem);
    color: var(--t5-text-secondary);
    max-width: 600px;
    margin: 0 auto;
}

/* ==========================================================================
   CONTENT SECTIONS
   ========================================================================== */

.t5-propfirms-section {
    position: relative;
    z-index: 1;
    padding: 60px 0;
}

@media (min-width: 768px) {
    .t5-propfirms-section {
        padding: 80px 0;
    }
}

/* Section Dividers */
.t5-propfirms-section::before {
    content: '';
    position: absolute;
    top: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 80%;
    max-width: 1000px;
    height: 1px;
    background: linear-gradient(90deg, transparent, var(--t5-border), transparent);
}

.t5-propfirms-section:first-of-type::before {
    display: none;
}

/* ==========================================================================
   NO FIRMS MESSAGE
   ========================================================================== */

.t5-no-firms {
    text-align: center;
    padding: 60px 20px;
    background: rgba(255, 255, 255, 0.02);
    border-radius: 16px;
    border: 1px solid var(--t5-border);
    backdrop-filter: blur(10px);
}

.t5-no-firms p {
    color: var(--t5-text-secondary);
    font-size: 16px;
}

.t5-no-firms a {
    color: var(--t5-primary-light);
}

/* ==========================================================================
   HOMEPAGE HERO
   ========================================================================== */

.t5-hero {
    position: relative;
    padding: 140px 0 0;
    min-height: 85vh;
    display: flex;
    flex-direction: column;
    justify-content: center;
    overflow: hidden;
    /* No grid background in hero - uses trading chart bg */
    background: none !important;
}

.t5-hero::before {
    display: none !important;
}

.t5-hero .t5-container {
    position: relative;
    z-index: 2;
}

@media (min-width: 768px) {
    .t5-hero { padding: 160px 0 0; }
}

/* ==========================================================================
   SECTIONS - WITH GRID BACKGROUND
   ========================================================================== */

.t5-section {
    position: relative;
    padding: 80px 0;
    z-index: 1;
}

@media (min-width: 768px) {
    .t5-section { padding: 100px 0; }
}

/* ==========================================================================
   REDUCED MOTION
   ========================================================================== */

@media (prefers-reduced-motion: reduce) {
    .t5-fixed-bg,
    .t5-fixed-bg svg,
    .t5-fixed-bg__glow {
        animation: none;
        transition: none;
    }
}

/* ==========================================================================
   FOOTER STYLES - Clean Minimal Design
   ========================================================================== */

.t5-footer {
    position: relative;
    background: #0a0e1a;
    overflow: hidden;
}

/* Trading chart background */
.t5-footer__trading-bg {
    position: absolute;
    top: 0;
    right: 0;
    width: 100%;
    height: 100%;
    z-index: 0;
    pointer-events: none;
    opacity: 0.5;
}

.t5-footer__trading-bg svg {
    position: absolute;
    top: 0;
    right: 0;
    width: 70%;
    height: 100%;
}

.t5-footer__trading-bg::before {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(90deg, rgba(10, 14, 26, 1) 0%, rgba(10, 14, 26, 0.8) 40%, rgba(10, 14, 26, 0.4) 70%, transparent 100%);
    z-index: 1;
}

/* Footer content above background */
.t5-footer-cta,
.t5-footer__main,
.t5-footer__disclaimer,
.t5-footer__bottom {
    position: relative;
    z-index: 2;
}

/* CTA Banner */
.t5-footer-cta {
    background: linear-gradient(135deg, rgba(59, 130, 246, 0.12) 0%, rgba(139, 92, 246, 0.08) 100%);
    border-top: 1px solid rgba(59, 130, 246, 0.15);
    border-bottom: 1px solid rgba(255, 255, 255, 0.04);
    padding: 48px 24px;
}

.t5-footer-cta__inner {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    gap: 16px;
}

.t5-footer-cta__inner h3 {
    font-size: 1.5rem;
    font-weight: 700;
    color: #ffffff;
    margin: 0;
}

.t5-footer-cta__inner p {
    color: rgba(255, 255, 255, 0.6);
    margin: 0;
    font-size: 0.95rem;
}

/* Main Footer - Centered Layout */
.t5-footer__main {
    padding: 48px 24px;
}

.t5-footer__main .t5-container {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 32px;
}

/* Logo Centered */
.t5-footer__brand {
    text-align: center;
}

.t5-footer__logo {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    text-decoration: none;
    margin-bottom: 8px;
}

.t5-footer__logo img {
    height: 32px;
    width: auto;
}

.t5-footer__logo span {
    font-size: 1rem;
    font-weight: 700;
    color: #ffffff;
    letter-spacing: 0.03em;
}

.t5-footer__tagline {
    color: rgba(255, 255, 255, 0.5);
    font-size: 0.875rem;
    margin: 0;
}

/* Nav Links as Buttons */
.t5-footer__nav {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 8px;
}

.t5-footer__link {
    display: inline-flex;
    align-items: center;
    padding: 10px 20px;
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 8px;
    color: rgba(255, 255, 255, 0.8);
    font-size: 0.875rem;
    font-weight: 500;
    text-decoration: none;
    transition: all 0.2s ease;
}

.t5-footer__link:hover {
    background: rgba(59, 130, 246, 0.15);
    border-color: rgba(59, 130, 246, 0.3);
    color: #ffffff;
    transform: translateY(-1px);
}

/* Social Links */
.t5-footer__social {
    display: flex;
    gap: 10px;
}

.t5-footer__social-link {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 42px;
    height: 42px;
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 10px;
    color: rgba(255, 255, 255, 0.7);
    transition: all 0.2s ease;
}

.t5-footer__social-link:hover {
    background: rgba(59, 130, 246, 0.15);
    border-color: rgba(59, 130, 246, 0.3);
    color: #3b82f6;
    transform: translateY(-2px);
}

.t5-footer__social-link svg {
    width: 20px;
    height: 20px;
}

/* Legal Links */
.t5-footer__legal {
    display: flex;
    align-items: center;
    gap: 16px;
}

.t5-footer__legal a {
    color: rgba(255, 255, 255, 0.4);
    font-size: 0.8rem;
    text-decoration: none;
    transition: color 0.2s ease;
}

.t5-footer__legal a:hover {
    color: rgba(255, 255, 255, 0.7);
}

.t5-footer__dot {
    width: 3px;
    height: 3px;
    background: rgba(255, 255, 255, 0.2);
    border-radius: 50%;
}

/* Disclaimer */
.t5-footer__disclaimer {
    padding: 20px 24px;
    background: rgba(0, 0, 0, 0.25);
    border-top: 1px solid rgba(255, 255, 255, 0.04);
}

.t5-footer__disclaimer p {
    font-size: 0.75rem;
    color: rgba(255, 255, 255, 0.4);
    line-height: 1.6;
    margin: 0;
    text-align: center;
    max-width: 800px;
    margin: 0 auto;
}

.t5-footer__disclaimer strong {
    color: rgba(255, 255, 255, 0.6);
}

/* Bottom Bar */
.t5-footer__bottom {
    padding: 16px 24px;
    border-top: 1px solid rgba(255, 255, 255, 0.04);
}

.t5-footer__bottom p {
    font-size: 0.8rem;
    color: rgba(255, 255, 255, 0.35);
    margin: 0;
    text-align: center;
}

/* Mobile Styles */
@media (max-width: 767px) {
    .t5-footer__trading-bg {
        opacity: 0.3;
    }

    .t5-footer__trading-bg svg {
        width: 100%;
    }

    .t5-footer__trading-bg::before {
        background: linear-gradient(180deg, rgba(10, 14, 26, 0.8) 0%, rgba(10, 14, 26, 0.6) 50%, rgba(10, 14, 26, 0.9) 100%);
    }

    .t5-footer-cta {
        padding: 36px 16px;
    }

    .t5-footer-cta__inner h3 {
        font-size: 1.25rem;
    }

    .t5-footer-cta__inner p {
        font-size: 0.875rem;
    }

    .t5-footer__main {
        padding: 36px 16px;
    }

    .t5-footer__main .t5-container {
        gap: 24px;
    }

    .t5-footer__nav {
        gap: 6px;
    }

    .t5-footer__link {
        padding: 10px 14px;
        font-size: 0.8rem;
    }

    .t5-footer__social-link {
        width: 44px;
        height: 44px;
    }

    .t5-footer__legal {
        flex-wrap: wrap;
        justify-content: center;
        gap: 12px;
    }

    .t5-footer__disclaimer {
        padding: 16px;
    }

    .t5-footer__disclaimer p {
        font-size: 0.7rem;
    }

    .t5-footer__bottom {
        padding: 14px 16px;
    }

    .t5-footer__bottom p {
        font-size: 0.75rem;
    }
}
