/* Modern Dark Mode & Awwwards Style Override */

/* Fonts loaded via preload in head-additions.html — DO NOT use @import here */

/* --- THEME SYSTEM: CAMALEON --- */

/* DEFAULT (IA / Home) - Cyberpunk Blue */
:root {
    --primary: #8be9fd;
    --bg-color: #0f0f0f;
    --text-color: #e0e0e0;
    --card-bg: rgba(255, 255, 255, 0.03);
    --border-color: rgba(255, 255, 255, 0.05);
    --font-heading: 'Clash Display', sans-serif;
    --font-body: 'Inter', sans-serif;
}

/* THEME: YOUTUBE (Red/Black) */
.theme-youtube {
    --primary: #FF0000;
    --bg-color: #000000;
    --text-color: #ffffff;
    --card-bg: rgba(20, 20, 20, 0.9);
    --border-color: #333;
}

.theme-youtube article.glass-card {
    border-radius: 50px !important;
    /* Pill shape */
    box-shadow: 5px 5px 0px #FF0000 !important;
}

.theme-youtube a:hover {
    text-shadow: 0 0 10px red;
}

/* THEME: CRYPTO (Matrix Green) */
.theme-crypto {
    --primary: #00FF41;
    --bg-color: #0B0C10;
    --text-color: #C5C6C7;
    --font-heading: 'Courier New', monospace;
    /* Terminal vibe */
    --card-bg: rgba(0, 20, 0, 0.8);
    --border-color: #00FF41;
}

.theme-crypto article.glass-card {
    border: 1px solid #00FF41 !important;
    box-shadow: 0 0 10px rgba(0, 255, 65, 0.2);
}

/* THEME: FITNESS (Neon Orange) */
.theme-fitness {
    --primary: #FF5F1F;
    --bg-color: #1a1a1a;
    --text-color: #f0f0f0;
    --font-heading: 'Inter', sans-serif;
}

/* Solo aplicar skew en desktop/tablet para evitar overflow en móviles */
@media (min-width: 769px) {
    .theme-fitness article.glass-card {
        transform: skew(-2deg);
        transition: transform 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    }
}

.theme-fitness article.glass-card {
    border-left: 4px solid #FF5F1F !important;
}

/* THEME: VIRAL (Gen-Z Violet) */
.theme-viral {
    --primary: #8A2BE2;
    --bg-color: #ffffff;
    /* Brutalist often uses white/black contrast */
    --text-color: #000000;
    --card-bg: #fff;
    --border-color: #000;
}

.theme-viral body {
    background-color: #ffffff !important;
    color: #000 !important;
}

/* Fix for invisible text in Single View */
.theme-viral article.glass-card,
.theme-viral .author-bio {
    background: #fff !important;
    border: 3px solid black !important;
    box-shadow: 8px 8px 0px black !important;
    border-radius: 0 !important;
    color: #000 !important;
    height: auto !important;
}

.theme-viral h1, 
.theme-viral h2, 
.theme-viral h3, 
.theme-viral h4,
.theme-viral h5,
.theme-viral h6,
.theme-viral .white,
.theme-viral .white-90,
.theme-viral .white-80,
.theme-viral .white-70,
.theme-viral .white-60,
.theme-viral .white-40,
.theme-viral p,
.theme-viral li,
.theme-viral strong,
.theme-viral em,
.theme-viral .nested-links.white,
.theme-viral .nested-links.white *,
.theme-viral .nested-copy-line-height p,
.theme-viral .nested-copy-line-height li,
.theme-viral .nested-copy-line-height strong,
.theme-viral .nested-copy-line-height em,
.theme-viral .nested-copy-line-height blockquote,
.theme-viral .nested-copy-line-height h2,
.theme-viral .nested-copy-line-height h3,
.theme-viral .nested-copy-line-height h4,
.theme-viral .nested-copy-line-height h5,
.theme-viral .nested-copy-line-height h6 {
    color: #000 !important;
}

.theme-viral a {
    color: #8A2BE2 !important;
    font-weight: 900;
    text-decoration: underline !important;
}

.theme-viral .author-bio {
    backdrop-filter: none !important;
    -webkit-backdrop-filter: none !important;
}

body,
html {
    background-color: var(--bg-color) !important;
    color: var(--text-color) !important;
    font-family: var(--font-body) !important;
    scroll-behavior: smooth;
    -webkit-overflow-scrolling: touch; /* Fluent scroll for iOS */
    max-width: 100vw;
    overflow-x: hidden;
    width: 100%;
    word-wrap: break-word;
    overflow-wrap: break-word;
}

/* Headings */
h1,
h2,
h3,
h4,
h5,
h6 {
    font-family: var(--font-heading) !important;
    color: var(--text-color) !important;
    letter-spacing: -0.02em;
    max-width: 100%;
    word-wrap: break-word;
}

/* Images */
img {
    max-width: 100%;
    height: auto;
    object-fit: cover;
}

/* Links */
a {
    color: var(--primary) !important;
    transition: transform 0.3s cubic-bezier(0.25, 0.46, 0.45, 0.94), color 0.3s ease;
    text-decoration: none !important;
}

a:hover {
    color: var(--primary) !important;
    filter: brightness(1.2);
    /* No geometry anims, just color/filter */
}

/* Navigation Overrides */
.ananke-social-link,
.nav-link,
.link {
    margin-left: 1rem;
    color: var(--primary) !important;
}

.nav-a {
    font-family: var(--font-heading);
    color: var(--text-color) !important;
}

.nav-a:hover {
    color: var(--primary) !important;
}

header {
    border-bottom: 1px solid var(--border-color);
}

/* Glassmorphism Cards (Optimized & Compact) */
article.glass-card {
    background: var(--card-bg) !important;
    backdrop-filter: blur(16px) !important;
    -webkit-backdrop-filter: blur(16px);
    border: 1px solid var(--border-color) !important;
    border-radius: 16px;
    padding: 1.5rem !important;
    /* Reduced padding for compact look */
    margin-bottom: 2rem !important;
    transition: transform 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    box-shadow: 0 4px 30px rgba(0, 0, 0, 0.1);
    position: relative;
    z-index: 1;
    will-change: transform;
    display: flex;
    flex-direction: column;
    height: 100%;
    /* Uniform height in grid */
}

/* Fix for full article pages: don't stretch the card vertically */
body.is-page article.glass-card {
    height: auto !important;
}

/* Line Clamp for Summaries (Compact UI) */
article.glass-card .f6 {
    display: -webkit-box;
    -webkit-line-clamp: 3;
    line-clamp: 3;
    /* Max 3 lines */
    -webkit-box-orient: vertical;
    overflow: hidden;
    text-overflow: ellipsis;
    font-size: 0.9rem !important;
    /* Smaller font */
    line-height: 1.5 !important;
    /* Better readability */
    opacity: 0.8;
}

/* HIDE IMAGES IN SUMMARIES (DUPLICATE FIX) */
article.glass-card .f6 img {
    display: none !important;
}

/* Neon Glow Optimization (Pseudo-element Opacity) */
article.glass-card::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    border-radius: 16px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.15), inset 0 0 20px rgba(255, 255, 255, 0.05);
    opacity: 0;
    z-index: -1;
    transition: opacity 0.3s ease;
    pointer-events: none;
    border: 1px solid var(--primary);
}

article.glass-card:hover {
    transform: translateY(-5px) scale(1.01);
}

article.glass-card:hover::after {
    opacity: 1;
}

/* Override Tachyons Borders */
.bb,
.bt,
.bl,
.br,
.ba {
    border-color: var(--border-color) !important;
}

.bg-near-white,
.bg-light-gray {
    background-color: transparent !important;
}

/* Hero Section */
header.hero-modern {
    min-height: 50vh;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    background: radial-gradient(circle at 50% 50%, rgba(30, 30, 30, 1) 0%, rgba(15, 15, 15, 1) 100%);
    position: relative;
    overflow-x: hidden;
    max-width: 100vw;
    width: 100%;
}

header.hero-modern::before {
    content: '';
    position: absolute;
    width: 200%;
    height: 200%;
    background: radial-gradient(circle, var(--primary) 0%, transparent 50%);
    opacity: 0.1;
    animation: rotate 20s linear infinite;
    will-change: transform;
    /* GPU Optimization */
}

@keyframes rotate {
    from {
        transform: rotate(0deg);
    }

    to {
        transform: rotate(360deg);
    }
}

.hero-title {
    font-size: clamp(2.5rem, 8vw, 5rem) !important;
    font-weight: 700;
    background: linear-gradient(to right, #ffffff, var(--primary));
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    text-align: center;
    z-index: 10;
    margin-bottom: 1rem;
    opacity: 0;
    max-width: 90vw;
}

.hero-subtitle {
    font-size: clamp(1rem, 3vw, 1.5rem) !important;
    color: var(--text-color) !important;
    opacity: 0.7;
    text-align: center;
    max-width: min(600px, 90vw);
    z-index: 10;
}

/* Custom Scrollbar */
::-webkit-scrollbar {
    width: 8px;
}

::-webkit-scrollbar-track {
    background: var(--bg-color);
}

::-webkit-scrollbar-thumb {
    background: #333;
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: var(--primary);
}

/* Utility for Spacing */
.spacer {
    height: 100px;
}

/* --- READING PROGRESS BAR --- */
#reading-progress-container {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 4px;
    background: transparent;
    z-index: 9999;
    will-change: width;
    /* Optimize bar animation */
}

#reading-progress-bar {
    height: 100%;
    background: linear-gradient(90deg, var(--bg-color), var(--primary));
    transform: scaleX(0);
    transform-origin: left;
    box-shadow: none !important; /* Kill shadow */
    transition: transform 0.1s ease-out;
    will-change: transform;
}

/* --- TECH LOGO --- */
.logo-tech {
    height: clamp(40px, 10vw, 60px);
    width: auto;
    mix-blend-mode: screen;
    vertical-align: middle;
    transition: transform 0.3s ease;
    will-change: transform;
    max-width: 100%;
    display: inline-block;
}

.logo-tech:hover {
    transform: scale(1.1) rotate(5deg);
    filter: drop-shadow(0 0 8px var(--primary));
}

/* --- SOCIAL PROOF FOOTER --- */
.social-proof-text {
    font-family: var(--font-body);
    font-size: 0.8rem;
    color: var(--text-color);
    letter-spacing: 1px;
    text-transform: uppercase;
    margin-top: 2rem;
    opacity: 0.7;
}

.social-proof-text span {
    color: var(--primary);
    font-weight: 600;
}

/* ===================================================
   NAVIGATION SYSTEM: Hamburger + Logo + Legal
   =================================================== */

/* --- TOP NAV BAR --- */
.site-nav {
    width: 100%;
    padding: 1rem 1.5rem;
    background-color: var(--bg-color);
    border-bottom: 1px solid var(--border-color);
    box-sizing: border-box;
    position: relative;
    z-index: 100;
}

.site-nav__inner {
    display: flex;
    justify-content: space-between;
    align-items: center;
    max-width: 1200px;
    margin: 0 auto;
}

/* --- LOGO (Center) --- */
.site-nav__logo {
    font-family: var(--font-heading);
    font-size: 1.4rem;
    font-weight: 700;
    color: var(--text-color) !important;
    text-decoration: none !important;
    display: flex;
    align-items: center;
    gap: 0.4rem;
}

.site-nav__divider {
    color: var(--primary);
    margin: 0 0.3rem;
    font-weight: 300;
}

.site-nav__section-name {
    font-size: 0.75em;
    letter-spacing: 2px;
    color: var(--primary);
    opacity: 0.8;
}

.header-icon {
    display: inline-block;
    font-size: 1.2em;
}

/* --- LANGUAGE SWITCHER --- */
.lang-switcher {
    display: flex;
    list-style: none;
    margin: 0;
    padding: 0;
    gap: 0.8rem;
    align-items: center;
}

/* --- HAMBURGER BUTTON (Left) --- */
.hamburger-btn {
    background: none;
    border: none;
    cursor: pointer;
    display: flex;
    flex-direction: column;
    justify-content: center;
    gap: 5px;
    padding: 8px;
    z-index: 200;
    border-radius: 8px;
    transition: background 0.3s;
    /* Background color is cheap */
}

.hamburger-btn:hover {
    background: rgba(255, 255, 255, 0.05);
}

.hamburger-btn__line {
    display: block;
    width: 24px;
    height: 2px;
    background: var(--text-color);
    border-radius: 2px;
    transition: transform 0.35s cubic-bezier(0.77, 0, 0.175, 1), opacity 0.35s ease;
    transform-origin: center;
    will-change: transform, opacity;
}

/* Hamburger → X animation */
.hamburger-btn--active .hamburger-btn__line:nth-child(1) {
    transform: translateY(7px) rotate(45deg);
}

.hamburger-btn--active .hamburger-btn__line:nth-child(2) {
    opacity: 0;
    transform: scaleX(0);
    /* Prefer scale over width */
}

.hamburger-btn--active .hamburger-btn__line:nth-child(3) {
    transform: translateY(-7px) rotate(-45deg);
}

/* --- LEGAL NAV (Right, Always Visible) --- */
.legal-nav {
    display: flex;
    list-style: none;
    margin: 0;
    padding: 0;
    gap: 1.5rem;
    align-items: center;
}

.legal-nav__item {
    display: inline-block;
}

.legal-nav__link {
    font-family: var(--font-body);
    font-size: 0.85rem;
    color: var(--text-color) !important;
    opacity: 0.7;
    text-decoration: none !important;
    transition: opacity 0.3s, color 0.3s;
    letter-spacing: 0.5px;
}

.legal-nav__link:hover {
    color: var(--primary) !important;
    opacity: 1;
}

/* --- SIDEBAR OVERLAY --- */
.sidebar-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.6);
    backdrop-filter: blur(4px);
    -webkit-backdrop-filter: blur(4px);
    z-index: 998;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.4s ease, visibility 0.4s;
    will-change: opacity;
}

.sidebar-overlay--visible {
    opacity: 1;
    visibility: visible;
}

/* --- SIDEBAR (Sections Menu) --- */
.sidebar {
    position: fixed;
    top: 0;
    left: 0;
    width: 300px;
    height: 100vh;
    background: linear-gradient(180deg, #0a0a0a 0%, #111 100%);
    z-index: 999;
    transform: translateX(-100%);
    transition: transform 0.4s cubic-bezier(0.77, 0, 0.175, 1);
    display: flex;
    flex-direction: column;
    border-right: 1px solid var(--border-color);
    box-shadow: 4px 0 30px rgba(0, 0, 0, 0.5);
    will-change: transform;
}

.sidebar--open {
    transform: translateX(0);
}

.sidebar__header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1.5rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.sidebar__title {
    font-family: var(--font-heading);
    font-size: 0.85rem;
    color: var(--text-color);
    opacity: 0.5;
    text-transform: uppercase;
    letter-spacing: 3px;
}

.sidebar__close {
    background: none;
    border: none;
    color: var(--text-color);
    font-size: 1.2rem;
    cursor: pointer;
    padding: 4px 8px;
    border-radius: 4px;
    transition: background 0.2s;
}

.sidebar__close:hover {
    background: rgba(255, 255, 255, 0.1);
}

.sidebar__menu {
    list-style: none;
    margin: 0;
    padding: 1rem 0;
    flex: 1;
}

.sidebar__item {
    margin: 0;
}

.sidebar__link {
    display: block;
    padding: 1rem 1.5rem;
    font-family: var(--font-heading);
    font-size: 1.1rem;
    font-weight: 600;
    color: var(--text-color) !important;
    text-decoration: none !important;
    transition: background 0.3s, padding-left 0.3s cubic-bezier(0.25, 0.46, 0.45, 0.94);
    border-left: 3px solid transparent;
}

.sidebar__link:hover {
    background: rgba(255, 255, 255, 0.04);
    padding-left: 2rem;
    /* Careful, padding animates geometry but usually OK for menu items if isolated */
}

/* --- NEON COLORS PER SECTION --- */
.sidebar__link--ia:hover,
.sidebar__item--active .sidebar__link--ia {
    color: #8be9fd !important;
    border-left-color: #8be9fd;
    text-shadow: 0 0 10px rgba(139, 233, 253, 0.3);
}

.sidebar__link--crypto:hover,
.sidebar__item--active .sidebar__link--crypto {
    color: #00FF41 !important;
    border-left-color: #00FF41;
    text-shadow: 0 0 10px rgba(0, 255, 65, 0.3);
}

.sidebar__link--fitness:hover,
.sidebar__item--active .sidebar__link--fitness {
    color: #FF5F1F !important;
    border-left-color: #FF5F1F;
    text-shadow: 0 0 10px rgba(255, 95, 31, 0.3);
}

.sidebar__link--viral:hover,
.sidebar__item--active .sidebar__link--viral {
    color: #8A2BE2 !important;
    border-left-color: #8A2BE2;
    text-shadow: 0 0 10px rgba(138, 43, 226, 0.3);
}

.sidebar__link--youtube:hover,
.sidebar__item--active .sidebar__link--youtube {
    color: #FF0000 !important;
    border-left-color: #FF0000;
    text-shadow: 0 0 10px rgba(255, 0, 0, 0.3);
}

.sidebar__item--active .sidebar__link {
    background: rgba(255, 255, 255, 0.03);
    padding-left: 2rem;
}

.sidebar__footer {
    padding: 1rem 1.5rem;
    border-top: 1px solid rgba(255, 255, 255, 0.05);
    font-size: 0.75rem;
    color: var(--text-color);
    opacity: 0.3;
}

/* ===================================================
   CRITICAL Z-INDEX FIX (v3)
   =================================================== */

/* Header must create a stacking context above hero */
header {
    display: block;
    position: relative;
    z-index: 50 !important;
}

/* The nav container (first child of header) must be ABOVE the hero */
header>div:first-child {
    position: relative;
    z-index: 10002 !important;
}

/* Hero content area: stay BELOW the nav */
.hero-modern,
.hero-modern-overlay {
    z-index: 1 !important;
}

/* The tc-l content inside the hero */
.tc-l.pv4,
.tc-l.pv3 {
    position: relative;
    z-index: 1 !important;
}

/* Sidebar overlay: above EVERYTHING */
.sidebar-overlay {
    z-index: 10000 !important;
}

/* Sidebar panel: above the overlay */
.sidebar {
    z-index: 10001 !important;
}

/* Nav bar always clickable */
.site-nav {
    position: relative;
    z-index: 10002 !important;
}

/* ===================================================
   RESPONSIVE & MOBILE-FIRST OPTIMIZATION (FLUID-UI v2)
   =================================================== */

/* --- GLOBAL: Prevent horizontal scroll on ALL devices --- */
html {
    overflow-x: hidden;
    -webkit-text-size-adjust: 100%;
}

/* --- GLOBAL: Images, videos, embeds never overflow --- */
img,
video,
iframe,
embed,
object,
svg {
    max-width: 100%;
    height: auto;
}

/* --- GLOBAL: Code blocks & pre never overflow --- */
pre,
code {
    max-width: 100%;
    overflow-x: auto;
    word-wrap: break-word;
    overflow-wrap: break-word;
}

/* --- GLOBAL: Responsive Tables --- */
table {
    display: block;
    width: 100%;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    font-size: 0.9rem;
}

/* --- GLOBAL: Long URLs / words don't break layout --- */
.nested-copy-line-height,
.nested-copy-line-height p,
.nested-copy-line-height li,
.nested-copy-line-height td {
    word-wrap: break-word;
    overflow-wrap: break-word;
    hyphens: auto;
}

/* --- PAGINATION --- */
.pagination {
    display: flex;
    list-style: none;
    padding: 0;
    gap: 10px;
    justify-content: center;
    flex-wrap: wrap;
}

.pagination li a {
    padding: 10px 15px;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid var(--border-color);
    color: var(--text-color) !important;
    border-radius: 5px;
}

.pagination li.active a {
    background: var(--primary);
    color: black !important;
    font-weight: bold;
}

/* ===================================================
   ARTICLE GRID SYSTEM (CSS Grid)
   =================================================== */
.article-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 2rem;
    padding: 0 1rem;
}

.article-grid__item {
    display: flex;
}

.article-grid__item article.glass-card {
    width: 100%;
}

/* Home page grid - same treatment */
.home-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 2rem;
    padding: 0 1rem;
}

.home-grid__item {
    display: flex;
}

.home-grid__item article.glass-card {
    width: 100%;
}

/* ===================================================
   HERO TEXT FIXES
   =================================================== */
/* Center hero texts properly */
.tc-l.pv4.pv6-l.ph3.ph4-ns,
.tc-l.pv3.ph3.ph4-ns {
    text-align: center !important;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
}

.hero-subtitle {
    text-align: center !important;
    margin-left: auto;
    margin-right: auto;
}

/* ===================================================
   TABLET (max-width: 1024px)
   =================================================== */
@media (max-width: 1024px) {

    /* Article grid: 2 columns instead of 3 */
    .w-100.w-40-l,
    .w-100.w-33-l {
        width: 48% !important;
        margin-left: 1% !important;
        margin-right: 1% !important;
    }
}

/* ===================================================
   MOBILE (max-width: 768px)
   =================================================== */
@media (max-width: 768px) {

    /* --- GLOBAL OVERFLOW PROTECTION --- */
    body, html, main, header, article, section, div {
        max-width: 100vw !important;
        overflow-x: hidden !important;
        box-sizing: border-box !important;
        transform: none !important; /* Kill ALL skews/rotates on mobile */
        transition: none !important; /* Disable animations for performance & stability */
        animation: none !important; 
    }

    /* --- HUD / NAVIGATION FIX --- */
    .site-nav {
        padding: 0.5rem !important;
        position: sticky;
        top: 0;
        z-index: 10002 !important;
        background-color: var(--bg-color);
        width: 100% !important;
    }

    .site-nav__inner {
        width: 100% !important;
        padding: 0 0.5rem !important;
    }

    .site-nav__logo {
        font-size: 0.9rem !important;
        flex-grow: 1;
        justify-content: center;
    }

    /* language switcher mobile fix */
    .lang-switcher {
        display: flex !important;
        gap: 0.4rem !important;
    }

    /* --- ARTICLE GRID & CARDS (FORCED OVERRIDE) --- */
    .article-grid, .home-grid {
        display: block !important; /* Stack vertically */
        width: 100% !important;
        padding: 0 10px !important;
        margin: 0 !important;
    }

    .article-grid__item, .home-grid__item {
        width: 100% !important;
        margin-bottom: 2rem !important;
        display: block !important;
    }

    /* Glass Cards: Center them and remove offsets */
    article.glass-card {
        width: 100% !important;
        max-width: 100% !important;
        margin: 0 0 1.5rem 0 !important;
        padding: 1.2rem !important;
        border-radius: 12px !important;
        display: flex !important;
        flex-direction: column !important; /* Always column on mobile */
        transform: none !important;
        left: 0 !important;
        right: 0 !important;
        box-shadow: 0 4px 15px rgba(0,0,0,0.3) !important;
    }

    /* Inner card flex wrapper fix (Viral images etc) */
    article.glass-card .flex {
        flex-direction: column !important;
        display: flex !important;
    }

    /* Viral Theme Brutalist Adjustment */
    .theme-viral article.glass-card {
        border: 2px solid black !important;
        box-shadow: 4px 4px 0px black !important;
        background: #fff !important;
    }

    /* Fitness Theme: neutralize desktop skew and orange border-left on mobile */
    .theme-fitness article.glass-card {
        transform: none !important;
        transition: none !important; /* Kill lagging transitions */
        border-left: 3px solid #FF5F1F !important; /* Flat pure line */
        border-right: none !important;
        border-top: none !important;
        border-bottom: none !important;
        width: 100% !important;
        max-width: 100% !important;
        box-sizing: border-box !important;
        margin-left: 0 !important;
        margin-right: 0 !important;
        padding-left: 1.2rem !important;
        border-radius: 0 !important; /* Industrial look on mobile fitness */
    }

    .theme-fitness article.glass-card:hover {
        transform: none !important; /* No jumps on touch */
        box-shadow: none !important;
    }

    /* Viral Theme stability & Hard Contrast Fixes */
    .theme-viral .white, .theme-viral .white-80, .theme-viral .white-60, .theme-viral h1, .theme-viral h2, .theme-viral h3, .theme-viral p, .theme-viral a, .theme-viral span, .theme-viral .lh-copy {
        color: #111111 !important;
        text-shadow: none !important;
    }
    
    .theme-viral h1, .theme-viral h2, .theme-viral .f1 {
        hyphens: none !important;
        word-break: break-word !important;
        overflow-wrap: break-word !important;
    }

    /* TYPOGRAPHY: Avoid text cut-off and weird hyphenation */
    h1, .f1, .f2, h2, h3 {
        font-size: clamp(1.4rem, 6vw, 1.8rem) !important;
        line-height: 1.2 !important;
        word-break: normal !important; /* No break in middle of words */
        overflow-wrap: break-word !important;
        hyphens: none !important; /* NO MORE "LUND-GREN" */
        max-width: 100% !important;
        text-align: left !important;
        display: block !important;
    }

    .hero-title {
        font-size: 1.8rem !important;
        text-align: center !important;
    }

    .nested-copy-line-height.f4 {
        font-size: 1.05rem !important;
        padding: 0 5px !important;
        word-break: break-word !important;
    }

    /* NUCLEAR GUARD: Ensure titles NEVER overflow even if they are long strings */
    .f1, .f2, h1, h2 {
        font-size: clamp(1.3rem, 7vw, 1.8rem) !important;
        line-height: 1.2 !important;
        word-break: break-word !important;
        overflow-wrap: break-word !important;
        max-width: 100% !important;
        display: block !important;
    }

    /* --- HERO FIX --- */
    header.hero-modern, .hero-modern-overlay {
        min-height: 30vh !important;
        padding: 2rem 0 !important;
    }

    .logo-tech {
        width: 50px !important;
        height: 50px !important;
    }

    /* --- AOS & BLUR KILLER (PERF) --- */
    [data-aos] {
        transform: none !important;
        opacity: 1 !important;
        visibility: visible !important;
        transition: none !important;
    }

    .glass-card, .hero-modern-overlay div {
        backdrop-filter: none !important;
        -webkit-backdrop-filter: none !important;
    }
}

/* ===================================================
   SMALL MOBILE (max-width: 480px)
   =================================================== */
@media (max-width: 480px) {
    .site-nav__logo {
        font-size: 0.95rem;
    }

    .hero-title {
        font-size: 1.8rem !important;
    }

    .hero-subtitle {
        font-size: 0.9rem !important;
    }

    article .f1 {
        font-size: 1.4rem !important;
    }

    .nested-copy-line-height.f4 {
        font-size: 1rem !important;
    }

    .sidebar {
        width: 92vw;
    }

    /* Pagination wraps gracefully */
    .pagination {
        gap: 6px;
    }

    .pagination li a {
        padding: 8px 10px;
        font-size: 0.85rem;
    }
}

/* ===================================================
   PRINT STYLES
   =================================================== */
@media print {

    .site-nav,
    .sidebar,
    .sidebar-overlay,
    #reading-progress-container,
    footer {
        display: none !important;
    }

    body {
        background: white !important;
        color: black !important;
    }
}