/* ============================================================
   Mzero314 Responsive Overrides
   Apply this file AFTER the main styles to fix layout issues
   ============================================================ */

/* --- Base fixes --- */
html {
    scroll-behavior: smooth;
    -webkit-text-size-adjust: 100%;
}

body {
    width: 100% !important;
    max-width: 100% !important;
    overflow-x: hidden !important;
    line-height: 1.5;
}

img {
    max-width: 100% !important;
    height: auto !important;
}

/* --- Container --- */
.container {
    width: 100% !important;
    max-width: 1440px !important;
    margin: 0 auto !important;
    padding: 0 40px !important;
}

/* --- Header --- */
.header-container {
    width: 100% !important;
    max-width: 1440px !important;
    padding: 8px 40px !important;
    gap: 20px;
}

.logo img {
    width: 160px !important;
    height: auto !important;
}

.nav-links {
    gap: 24px !important;
    flex-wrap: wrap;
    justify-content: flex-end;
}

.nav-links a {
    font-size: 15px;
    white-space: nowrap;
}

/* --- Hero --- */
.hero {
    width: 100% !important;
    height: auto !important;
    min-height: 100vh;
    padding: 120px 40px 60px 40px !important;
    display: flex !important;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 40px;
}

.hero-content {
    width: 50% !important;
    max-width: 720px;
    padding-left: 0 !important;
    flex: 1 1 500px;
}

.hero h1 {
    font-size: clamp(1.8rem, 4vw, 64px) !important;
    line-height: 1.15;
}

.hero p {
    font-size: clamp(1rem, 1.2vw, 20px) !important;
    max-width: 700px;
}

.hero-cta {
    flex-wrap: wrap;
    gap: 15px;
}

.hero-cta img {
    width: 200px;
    height: auto;
}

.hero-stats {
    flex-wrap: wrap;
    gap: 32px !important;
    margin-top: 40px !important;
}

.stat-value {
    font-size: clamp(1.25rem, 1.8vw, 36px) !important;
}

.hero > img[alt="mascot"] {
    width: 50% !important;
    max-width: 600px;
    height: auto !important;
    flex: 1 1 400px;
}

/* --- Features --- */
.features {
    padding: 100px 0 !important;
}

.features-grid {
    display: grid !important;
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr)) !important;
    gap: 30px;
}

.feature-card {
    display: flex;
    flex-direction: column;
}

.feature-card img {
    width: 100% !important;
    max-width: 400px;
    height: auto !important;
    margin: 0 auto 24px auto;
    display: block;
}

.feature-card .btn {
    align-self: flex-start;
    margin-top: auto;
}

.section-title h2 {
    font-size: clamp(1.75rem, 3vw, 48px) !important;
}

.section-title p {
    font-size: clamp(1rem, 1.2vw, 20px) !important;
}

/* --- Token Section --- */
.token-section {
    padding: 100px 0 !important;
}

.token-grid {
    display: grid !important;
    grid-template-columns: minmax(280px, 30%) 1fr !important;
    gap: 60px;
    align-items: center;
}

.token-image img {
    width: 100% !important;
    max-width: 500px !important;
    height: auto !important;
    border-radius: 20px;
    margin: 0 auto;
}

.token-content h2 {
    font-size: clamp(1.6rem, 2.8vw, 48px) !important;
}

.token-content p {
    font-size: clamp(1rem, 1.1vw, 18px) !important;
}

.benefit-item {
    margin-bottom: 24px;
}

.benefit-text h4 {
    font-size: clamp(1.05rem, 1.2vw, 20px) !important;
}

/* --- Competition Section --- */
.competition-section {
    padding: 100px 0 !important;
}

.competition-card {
    padding: clamp(30px, 5vw, 60px) !important;
}

.competition-header {
    display: flex !important;
    flex-wrap: wrap !important;
    justify-content: space-between;
    align-items: center;
    gap: 30px;
    margin-bottom: 40px;
}

.competition-header > div:first-child {
    flex: 1 1 500px;
}

.competition-header img {
    width: 100% !important;
    max-width: 305px !important;
    height: auto !important;
    margin-bottom: 20px;
}

.competition-header > div:last-child img {
    max-width: 200px !important;
}

.competition-features {
    display: grid !important;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)) !important;
    gap: 30px;
    margin-top: 60px;
}

.comp-feature img {
    width: 100% !important;
    height: auto !important;
    border-radius: 8px;
    margin-bottom: 16px;
}

.comp-feature h4 {
    font-size: clamp(1.05rem, 1.2vw, 20px) !important;
}

/* --- CTA Section --- */
.cta-section {
    padding: 100px 0 !important;
}

.cta-section > .container > img {
    width: 100% !important;
    max-width: 100% !important;
    height: auto !important;
    border-radius: 16px;
    margin-bottom: 40px;
}

.cta-section h2 {
    font-size: clamp(1.5rem, 2.6vw, 48px) !important;
}

.cta-section p {
    font-size: clamp(1rem, 1.2vw, 20px) !important;
}

.cta-buttons {
    flex-wrap: wrap;
    justify-content: center;
    gap: 20px;
}

/* --- Footer --- */
footer {
    padding: 60px 0 !important;
}

.footer-grid {
    display: grid !important;
    grid-template-columns: 2fr 1fr 1fr 1fr;
    gap: 40px;
}

.footer-logo img {
    width: 100% !important;
    max-width: 400px !important;
    height: auto !important;
    margin-bottom: 20px;
}

/* --- Menu Toggle --- */
.menu-toggle {
    display: none;
    background: none;
    border: none;
    color: #e0e0e0;
    font-size: 28px;
    cursor: pointer;
    padding: 8px;
}

/* ============================================================
   TABLET BREAKPOINT (max-width: 1024px)
   ============================================================ */
@media (max-width: 1024px) {
    .container { padding: 0 24px !important; }
    .header-container { padding: 8px 24px !important; }

    .hero {
        padding: 110px 24px 50px 24px !important;
        gap: 24px;
    }

    .hero-content {
        flex: 1 1 400px;
    }

    .hero > img[alt="mascot"] {
        flex: 1 1 300px;
    }

    .hero-stats {
        gap: 24px !important;
    }

    .token-grid {
        grid-template-columns: 1fr !important;
        gap: 40px;
    }

    .token-image {
        max-width: 400px;
        margin: 0 auto;
    }

    .footer-grid {
        grid-template-columns: 1fr 1fr !important;
        gap: 40px;
    }
}

/* ============================================================
   MOBILE BREAKPOINT (max-width: 768px)
   ============================================================ */
@media (max-width: 768px) {
    section {
        padding: 60px 0 !important;
    }

    .container {
        padding: 0 16px !important;
    }

    .header-container {
        padding: 8px 16px !important;
        flex-wrap: nowrap;
    }

    .logo img {
        width: 120px !important;
    }

    .menu-toggle {
        display: block;
    }

    .nav-links {
        display: none;
        position: absolute;
        top: 100%;
        left: 0;
        width: 100%;
        flex-direction: column;
        background: rgba(10, 14, 19, 0.98);
        backdrop-filter: blur(10px);
        -webkit-backdrop-filter: blur(10px);
        padding: 20px 16px;
        gap: 0;
        border-bottom: 1px solid rgba(255, 123, 44, 0.3);
        max-height: 0;
        overflow: hidden;
        transition: max-height 0.3s ease;
    }

    .nav-links.open {
        display: flex;
        max-height: 500px;
    }

    .nav-links a {
        padding: 14px 0;
        font-size: 16px;
        border-bottom: 1px solid rgba(255, 255, 255, 0.05);
        width: 100%;
    }

    .hero {
        padding: 100px 16px 40px 16px !important;
        flex-direction: column;
        text-align: center;
        gap: 30px;
    }

    .hero-content {
        width: 100% !important;
        max-width: 100%;
        text-align: center;
    }

    .hero-content > img:first-child {
        margin: 0 auto 20px auto;
        display: block;
    }

    .hero h1 {
        font-size: clamp(1.5rem, 6vw, 2.25rem) !important;
    }

    .hero-cta {
        justify-content: center;
    }

    .hero-stats {
        justify-content: center;
        gap: 20px !important;
    }

    .stat-item {
        min-width: 100px;
        align-items: center;
    }

    .hero > img[alt="mascot"] {
        width: 100% !important;
        max-width: 400px;
    }

    .features {
        padding: 60px 0 !important;
    }

    .features-grid {
        grid-template-columns: 1fr !important;
    }

    .feature-card {
        padding: 24px 20px !important;
    }

    .token-section {
        padding: 60px 0 !important;
    }

    .competition-section {
        padding: 60px 0 !important;
    }

    .competition-header {
        flex-direction: column;
        align-items: flex-start;
    }

    .competition-header > div:last-child {
        align-self: center;
    }

    .competition-features {
        grid-template-columns: 1fr !important;
    }

    .competition-content > div:last-child {
        flex-direction: column;
        align-items: stretch;
    }

    .competition-content > div:last-child .btn {
        width: 100%;
    }

    .cta-section {
        padding: 60px 0 !important;
    }

    .cta-buttons {
        flex-direction: column;
    }

    .footer-grid {
        grid-template-columns: 1fr !important;
        gap: 40px;
    }

    /* Token actions — the YouTube + Amazon buttons */
    .token-content > div:last-child {
        flex-direction: column !important;
        align-items: stretch !important;
    }

    .token-content > div:last-child .btn,
    .token-content > div:last-child img {
        width: 100% !important;
        max-width: 100% !important;
    }
}

/* ============================================================
   SMALL MOBILE (max-width: 480px)
   ============================================================ */
@media (max-width: 480px) {
    .hero h1 {
        font-size: 1.4rem !important;
    }

    .section-title h2 {
        font-size: 1.6rem !important;
    }

    .btn {
        font-size: 14px;
        padding: 10px 18px;
    }
}

/* ============================================================
   TIME TRAVEL PAGE — RESPONSIVE OVERRIDES
   ============================================================ */

/* Base container */
body > .container {
    width: 100% !important;
    max-width: 1440px !important;
    padding: 40px !important;
    box-sizing: border-box !important;
}

/* The main two-column grid (profile card + content) */
.grid {
    display: grid !important;
    grid-template-columns: minmax(320px, 600px) 1fr !important;
    gap: 40px !important;
    width: 100% !important;
    box-sizing: border-box;
}

/* Profile card image container — remove the fixed 600px height */
.profile-image-container {
    height: auto !important;
    max-height: 600px !important;
    aspect-ratio: 1 / 1;
}

.profile-image {
    width: 100% !important;
    height: 100% !important;
    object-fit: cover;
}

/* Profile header */
.profile-header {
    width: 100% !important;
    position: relative;
    z-index: 2;
}

.profile-header img {
    width: 100% !important;
    max-width: 421px !important;
    height: auto !important;
}

.profile-subtitle {
    font-size: clamp(1rem, 1.5vw, 24px) !important;
}

.profile-subtitle2 {
    font-size: 12px !important;
}

/* Kale badge — move to bottom on small screens */
.kale-badge {
    position: absolute !important;
    top: 10px !important;
    right: 10px !important;
}

/* Section titles */
.section-title {
    font-size: clamp(1.2rem, 2vw, 28px) !important;
}

.section-title i {
    font-size: clamp(1rem, 1.5vw, 24px) !important;
}

/* Specialties grid */
.specialties {
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)) !important;
}

/* Stats grid */
.stats-grid {
    grid-template-columns: repeat(auto-fit, minmax(140px, 1fr)) !important;
}

.stat-value {
    font-size: clamp(1.4rem, 2vw, 32px) !important;
}

/* Table container */
.table-container {
    overflow-x: auto !important;
    -webkit-overflow-scrolling: touch;
}

.performance-table {
    min-width: 500px;
}

/* Info grid */
.info-grid {
    grid-template-columns: auto 1fr !important;
}

/* ============================================================
   TIME TRAVEL — TABLET (max-width: 1024px)
   ============================================================ */
@media (max-width: 1024px) {
    body > .container {
        padding: 30px 24px !important;
    }

    .grid {
        grid-template-columns: 1fr !important;
        gap: 30px !important;
    }

    .profile-image-container {
        max-height: 400px;
    }

    .kale-badge {
        position: static !important;
        margin-top: 10px;
        display: inline-flex;
        top: auto !important;
        right: auto !important;
    }
}

/* ============================================================
   TIME TRAVEL — MOBILE (max-width: 768px)
   ============================================================ */
@media (max-width: 768px) {
    body > .container {
        padding: 20px 16px !important;
    }

    .grid {
        grid-template-columns: 1fr !important;
        gap: 20px !important;
        width: 100% !important;
    }

    .profile-header {
        padding-bottom: 15px;
        margin-bottom: 25px;
    }

    .profile-header img {
        max-width: 280px !important;
    }

    .profile-subtitle {
        font-size: 1rem !important;
    }

    .profile-image-container {
        max-height: 300px;
    }

    .profile-info {
        padding: 20px 16px !important;
    }

    .info-label,
    .info-value {
        font-size: 14px !important;
    }

    .section {
        margin-bottom: 25px;
    }

    .section-content {
        padding: 18px !important;
    }

    .specialties {
        grid-template-columns: 1fr !important;
    }

    .stats-grid {
        grid-template-columns: repeat(2, 1fr) !important;
        gap: 12px !important;
    }

    .stat-card {
        padding: 14px !important;
    }

    .stat-value {
        font-size: 1.3rem !important;
    }

    .stat-label {
        font-size: 12px !important;
    }

    .timeline {
        padding-left: 24px;
    }

    .timeline-item {
        margin-bottom: 20px;
    }

    .timeline-item::before {
        left: -28px;
    }

    .timeline-date {
        font-size: 14px !important;
    }

    .timeline-title {
        font-size: 17px !important;
    }

    .timeline-description {
        font-size: 14px !important;
    }

    .specialty-item {
        padding: 16px !important;
    }

    .specialty-title {
        font-size: 16px !important;
    }

    .specialty-description {
        font-size: 14px !important;
    }

    .performance-table th,
    .performance-table td {
        padding: 8px 10px !important;
        font-size: 12px !important;
    }

    .copyright {
        padding-top: 30px !important;
        margin-top: 30px !important;
    }
}

/* ============================================================
   TIME TRAVEL — SMALL MOBILE (max-width: 480px)
   ============================================================ */
@media (max-width: 480px) {
    .profile-header img {
        max-width: 220px !important;
    }

    .grid {
        grid-template-columns: 1fr !important;
        width: 100% !important;
    }

    .stats-grid {
        grid-template-columns: 1fr 1fr !important;
    }
}

/* ============================================================
   TIME TRAVEL — PORTRAIT OVERFLOW KILLER
   Applies only in portrait, below 768px width
   ============================================================ */

@media (max-width: 768px) and (orientation: portrait) {

    /* Force the page to never exceed the viewport */
    html,
    body {
        width: 100vw !important;
        max-width: 100vw !important;
        overflow-x: hidden !important;
        box-sizing: border-box !important;
    }

    /* Remove every possible source of overflow */
    .container,
    .grid,
    .left-column,
    .right-column,
    .profile-card,
    .section,
    .section-content,
    .profile-info,
    .stats-grid,
    .specialties,
    .table-container {
        width: 100% !important;
        max-width: 100% !important;
        min-width: 0 !important;
        box-sizing: border-box !important;
        overflow-x: hidden !important;
    }

    /* Force the grid to be single-column */
    .grid {
        display: block !important;
        grid-template-columns: none !important;
    }

    /* Shrink the profile header */
    .profile-header img {
        max-width: 100% !important;
        height: auto !important;
    }

    /* Prevent the table from forcing the page wider */
    .performance-table {
        min-width: 0 !important;
        width: 100% !important;
        table-layout: fixed !important;
    }

    .performance-table th,
    .performance-table td {
        word-break: break-word !important;
        font-size: 11px !important;
        padding: 6px 4px !important;
    }

    /* Prevent the info grid from forcing the page wider */
    .info-grid {
        grid-template-columns: auto minmax(0, 1fr) !important;
    }

    .info-value {
        word-break: break-word !important;
    }

    /* Stack the stats 2x2 */
    .stats-grid {
        grid-template-columns: repeat(2, 1fr) !important;
    }

    /* Stack the specialties */
    .specialties {
        grid-template-columns: 1fr !important;
    }

    /* Profile image — drop the aspect-ratio constraint */
    .profile-image-container {
        height: auto !important;
        max-height: none !important;
        aspect-ratio: 16 / 9 !important;
    }
}