/* 
 * forge-ui by Forge Interactive — Premium Design System 
 * Brand Identity: Forge Logo Palette (#00addc → #424080)
 * © tareqdesign — All rights reserved
 */

@import url('https://fonts.googleapis.com/css2?family=Outfit:wght@300;400;500;600;700;800;900&family=IBM+Plex+Sans+Arabic:wght@300;400;500;600;700&display=swap');

:root {
    /* ═══ Forge Brand Palette ═══ */
    /* Primary Dark Indigo from logo */
    --h: 241;
    --s: 32%;
    --l: 37%;

    --color-primary: #424080;
    /* Deep Indigo – logo secondary stop */
    --color-secondary: #00addc;
    /* Cyan – logo main stop             */
    --color-accent: #0095c0;
    /* Darker cyan for hover states       */

    /* Gradient – extracted directly from logo linearGradient */
    --brand-gradient: linear-gradient(135deg, #00addc 0%, #424080 100%);
    --brand-gradient-subtle: linear-gradient(135deg, rgba(0, 173, 220, 0.12) 0%, rgba(66, 64, 128, 0.12) 100%);

    /* Semantic Colors */
    --color-success: hsl(142, 69%, 38%);
    --color-warning: hsl(38, 92%, 50%);
    --color-danger: hsl(0, 72%, 51%);
    --color-info: hsl(199, 89%, 44%);

    /* Neutral System — cooler slate to complement the Forge palette */
    --color-bg: hsl(220, 20%, 97%);
    /* Near-white with cool blue tint    */
    --color-surface: hsl(0, 0%, 100%);
    --color-border: hsl(220, 15%, 90%);
    --color-text: #4c4c4c;
    /* Charcoal – taken from logo text   */
    --color-text-dim: #898989;
    /* Muted gray – taken from logo sub  */

    /* Glassmorphism — cooler tones */
    --glass-bg: rgba(255, 255, 255, 0.72);
    --glass-border: rgba(255, 255, 255, 0.55);
    --glass-blur: 14px;

    /* Shadow System */
    --shadow-sm: 0 1px 3px 0 rgba(66, 64, 128, 0.06);
    --shadow-md: 0 4px 6px -1px rgba(66, 64, 128, 0.1), 0 2px 4px -2px rgba(66, 64, 128, 0.06);
    --shadow-lg: 0 10px 15px -3px rgba(66, 64, 128, 0.1), 0 4px 6px -4px rgba(66, 64, 128, 0.06);
    --shadow-xl: 0 20px 40px -8px rgba(66, 64, 128, 0.15), 0 8px 16px -6px rgba(0, 173, 220, 0.08);

    /* Animation Tokens */
    --transition-fast: 150ms cubic-bezier(0.4, 0, 0.2, 1);
    --transition-base: 300ms cubic-bezier(0.4, 0, 0.2, 1);
    --transition-slow: 500ms cubic-bezier(0.4, 0, 0.2, 1);
}

/* 🌙 Dark Mode Tokens */
[data-theme="dark"] {
    --color-bg: #0c0c0e;
    --color-surface: #141416;
    --color-border: #252529;
    --color-text: #e1e1e6;
    --color-text-dim: #94949e;

    --glass-bg: rgba(20, 20, 22, 0.8);
    --glass-border: rgba(255, 255, 255, 0.1);

    --shadow-sm: 0 1px 3px 0 rgba(0, 0, 0, 0.3);
    --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.4);
    --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.5);
    --shadow-xl: 0 20px 40px -8px rgba(0, 0, 0, 0.6);
}

/* Base Reset & Typography */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

html {
    font-size: 16px;
    scroll-behavior: smooth;
    overflow-x: hidden;
    /* Prevent horizontal scroll */
}

body {
    font-family: 'Outfit', sans-serif;
    background-color: var(--color-bg);
    color: var(--color-text);
    line-height: 1.625;
    display: flex;
    flex-direction: column;
    min-height: 100vh;
    overflow-x: hidden;
    /* Belt-and-suspenders horizontal scroll fix */
    width: 100%;
    max-width: 100vw;
}

main {
    flex: 1;
}

[lang="ar"] body {
    font-family: 'IBM Plex Sans Arabic', sans-serif;
}

/* Typography Scale */
h1,
h2,
h3,
h4,
h5,
h6 {
    color: var(--color-primary);
    font-weight: 800;
    line-height: 1.1;
    letter-spacing: -0.025em;
    margin-bottom: 1.5rem;
}

h1 {
    font-size: clamp(2.5rem, 5vw, 4rem);
    font-weight: 900;
}

h2 {
    font-size: clamp(1.75rem, 3.5vw, 2.5rem);
}

h3 {
    font-size: 1.5rem;
    letter-spacing: -0.01em;
}

p {
    margin-bottom: 1.25rem;
}

a {
    color: var(--color-secondary);
    text-decoration: none;
    transition: var(--transition-base);
}

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

/* Glassmorphism Utilities */
.glass-panel {
    background: var(--glass-bg);
    backdrop-filter: blur(var(--glass-blur));
    -webkit-backdrop-filter: blur(var(--glass-blur));
    border: 1px solid var(--glass-border);
    transition: background-color var(--transition-base), border-color var(--transition-base);
}

.glass-nav {
    position: fixed;
    top: 1rem;
    left: 50%;
    transform: translateX(-50%);
    width: calc(100% - 2rem);
    max-width: 1200px;
    z-index: 2000;
    background: rgba(255, 255, 255, 0.7);
    backdrop-filter: blur(28px) saturate(180%);
    -webkit-backdrop-filter: blur(28px) saturate(180%);
    border: 1px solid rgba(255, 255, 255, 0.5);
    box-shadow: 0 10px 40px -10px rgba(0, 0, 0, 0.08), inset 0 1px 0 rgba(255, 255, 255, 0.8);
    border-radius: 100px;
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

[data-theme="dark"] .glass-nav {
    background: rgba(18, 18, 20, 0.75);
    border-color: rgba(255, 255, 255, 0.08);
    box-shadow: 0 10px 40px -10px rgba(0, 0, 0, 0.3), inset 0 1px 0 rgba(255, 255, 255, 0.05);
}

/* Scrolled state for even tighter design */
.glass-nav.scrolled {
    top: 0.5rem;
    background: rgba(255, 255, 255, 0.9);
    box-shadow: 0 15px 50px -10px rgba(0, 0, 0, 0.1), inset 0 1px 0 rgba(255, 255, 255, 1);
    transform: translateX(-50%) scale(0.99);
}

[data-theme="dark"] .glass-nav.scrolled {
    background: rgba(15, 15, 18, 0.9);
}

.navbar-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.6rem 1.25rem;
    gap: 1.5rem;
}

.nav-links {
    display: flex;
    gap: 0.25rem;
    list-style: none;
    align-items: center;
    background: rgba(0, 0, 0, 0.03);
    padding: 0.35rem;
    border-radius: 100px;
    border: 1px solid rgba(0, 0, 0, 0.02);
}

[data-theme="dark"] .nav-links {
    background: rgba(255, 255, 255, 0.04);
    border-color: rgba(255, 255, 255, 0.05);
}

.nav-links a {
    color: var(--color-text-dim);
    text-decoration: none;
    font-weight: 600;
    font-size: 0.9375rem;
    padding: 0.5rem 1.25rem;
    border-radius: 100px;
    transition: all 0.3s cubic-bezier(0.175, 0.885, 0.32, 1);
    position: relative;
}

.nav-links a:hover {
    color: var(--color-text);
    background: rgba(0, 0, 0, 0.05);
    transform: translateY(-1px);
}

[data-theme="dark"] .nav-links a:hover {
    background: rgba(255, 255, 255, 0.08);
}

.nav-links a.active {
    color: var(--color-primary);
    background: var(--color-surface);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
}

[data-theme="dark"] .nav-links a.active {
    background: rgba(255, 255, 255, 0.12);
    color: white;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
}

@media (max-width: 768px) {
    .nav-links {
        display: none;
    }

    .navbar-container {
        padding: 0.75rem 1rem;
    }
}

/* Buttons System */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.625rem;
    padding: 0.875rem 1.75rem;
    border-radius: 12px;
    font-weight: 600;
    font-size: 0.9375rem;
    transition: var(--transition-base);
    cursor: pointer;
    border: 1px solid transparent;
    white-space: nowrap;
}

.btn-primary {
    background: var(--brand-gradient);
    color: white;
    box-shadow: 0 4px 14px -2px rgba(0, 173, 220, 0.35);
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 24px -4px rgba(0, 173, 220, 0.45);
    filter: brightness(1.08);
}

.btn-secondary {
    background: white;
    color: var(--color-primary);
    border: 1px solid var(--color-border);
    box-shadow: var(--shadow-sm);
}

[data-theme="dark"] .btn-secondary {
    background: var(--color-surface);
    color: var(--color-text);
}

.btn-secondary:hover {
    background: var(--color-bg);
    border-color: var(--color-secondary);
    color: var(--color-secondary);
}

[data-theme="dark"] .btn-secondary:hover {
    background: rgba(255, 255, 255, 0.05);
}

.btn-secondary.active {
    background: var(--color-primary);
    color: white;
    border-color: var(--color-primary);
}

/* Mesh Gradient background helper — Forge brand colors */
.mesh-bg {
    position: relative;
    overflow-x: hidden;
}

.mesh-bg::before {
    content: '';
    position: fixed;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: radial-gradient(circle at 25% 25%, rgba(0, 173, 220, 0.08) 0%, transparent 45%),
        radial-gradient(circle at 75% 65%, rgba(66, 64, 128, 0.07) 0%, transparent 45%),
        radial-gradient(circle at 50% 90%, rgba(0, 149, 192, 0.05) 0%, transparent 40%);
    z-index: -1;
    filter: blur(60px);
    transition: opacity 1s ease;
    pointer-events: none;
}

@media (prefers-reduced-motion: reduce) {
    .reveal {
        opacity: 1 !important;
        transform: none !important;
        animation: none !important;
    }
}

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

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

/* Card System */
.magic-card {
    background: white;
    border-radius: 24px;
    padding: 2rem;
    border: 1px solid var(--color-border);
    transition: var(--transition-base);
    position: relative;
    overflow: hidden;
    z-index: 5;
    pointer-events: auto;
    /* Ensure it captures clicks correctly */
}

.magic-card:hover {
    transform: translateY(-8px);
    box-shadow: var(--shadow-xl);
    border-color: var(--color-secondary);
}

.magic-card::before {
    content: '';
    position: absolute;
    top: -100%;
    left: -100%;
    width: 300%;
    height: 300%;
    background: linear-gradient(135deg,
            rgba(255, 255, 255, 0) 45%,
            rgba(255, 255, 255, 0.1) 50%,
            rgba(255, 255, 255, 0) 55%);
    transition: 1s;
    pointer-events: none;
    z-index: 5;
}

.magic-card:hover::before {
    top: 100%;
    left: 100%;
}

.magic-card::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, transparent 0%, rgba(201, 100, 66, 0.03) 100%);
    opacity: 0;
    transition: var(--transition-base);
    pointer-events: none;
    /* Allows clicks to pass through to the form fields */
}

.magic-card:hover::after {
    opacity: 1;
}

/* Form Styling */
.input-group {
    margin-bottom: 1.5rem;
}

.input-group label {
    display: block;
    font-size: 0.875rem;
    font-weight: 600;
    margin-bottom: 0.5rem;
    color: var(--color-primary);
}

input,
textarea,
select {
    width: 100%;
    padding: 1rem 1.25rem;
    border-radius: 12px;
    border: 1px solid var(--color-border);
    background: white;
    font-family: inherit;
    font-size: 1rem;
    transition: var(--transition-base);
}

input:focus,
textarea:focus {
    outline: none;
    border-color: var(--color-secondary);
    box-shadow: 0 0 0 4px hsla(15, 65%, 52%, 0.1);
}

/* Animations */
.reveal {
    opacity: 0;
    transform: translateY(20px);
    animation: revealIn 0.8s cubic-bezier(0.2, 0.8, 0.2, 1) forwards;
}

/* Fallback for cases where animation might fail */
.reveal:not([style*="animation"]) {
    opacity: 1;
    transform: none;
}

@keyframes revealIn {
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Language Switcher Small Bubble */
.lang-switcher-bubble {
    display: flex;
    background: rgba(255, 255, 255, 0.8);
    backdrop-filter: blur(8px);
    padding: 0.25rem;
    border-radius: 100px;
    border: 1px solid var(--color-border);
}

.lang-bubble-btn {
    padding: 0.5rem 1.25rem;
    border-radius: 100px;
    font-size: 0.8125rem;
    font-weight: 700;
    text-transform: uppercase;
    cursor: pointer;
    transition: var(--transition-fast);
}

.lang-bubble-btn.active {
    background: var(--color-primary);
    color: white;
}

/* Premium Header Controls */
.header-controls {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.lang-selector-btns {
    display: flex;
    gap: 0.5rem;
    background: rgba(0, 0, 0, 0.03);
    padding: 4px;
    border-radius: 12px;
    border: 1px solid var(--color-border);
}

[data-theme="dark"] .lang-selector-btns {
    background: rgba(255, 255, 255, 0.03);
}

.lang-btn {
    padding: 0.5rem 1rem;
    border-radius: 8px;
    font-size: 0.85rem;
    font-weight: 700;
    cursor: pointer;
    border: none;
    background: transparent;
    color: var(--color-text-dim);
    transition: all 0.2s;
}

.lang-btn:hover {
    color: var(--color-primary);
}

.lang-btn.active {
    background: white;
    color: var(--color-primary);
    box-shadow: var(--shadow-sm);
}

[data-theme="dark"] .lang-btn.active {
    background: var(--color-surface);
    color: white;
}

.theme-toggle-btn {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.6rem 1.25rem;
    border-radius: 100px;
    background: var(--brand-gradient);
    color: white;
    border: none;
    font-family: inherit;
    font-weight: 700;
    font-size: 0.85rem;
    cursor: pointer;
    box-shadow: 0 4px 12px rgba(0, 173, 220, 0.2);
    transition: all 0.2s;
}

.theme-toggle-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 16px rgba(0, 173, 220, 0.4);
}

@media (max-width: 768px) {
    .header-controls {
        display: none;
        /* Handled in mobile menu */
    }
}

/* Statistics Widgets */
.stat-pill {
    padding: 0.5rem 1rem;
    background: var(--color-bg);
    border-radius: 100px;
    font-size: 0.8125rem;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    color: var(--color-text-dim);
}

/* Badge System */
.holographic-badge {
    padding: 0.25rem 0.75rem;
    border-radius: 100px;
    font-size: 0.75rem;
    font-weight: 800;
    letter-spacing: 0.05em;
    text-transform: uppercase;
    background: linear-gradient(135deg, hsla(15, 65%, 52%, 0.1), hsla(208, 100%, 58%, 0.1));
    color: var(--color-secondary);
    border: 1px solid hsla(15, 65%, 52%, 0.2);
}

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

::-webkit-scrollbar-track {
    background: transparent;
}

::-webkit-scrollbar-thumb {
    background: var(--color-border);
    border-radius: 10px;
}

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

/* Typography showcase side-by-side */
.typography-pair {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 4rem;
    padding: 3rem;
    background: white;
    border-radius: 24px;
    border: 1px solid var(--color-border);
}

@media (max-width: 1024px) {
    .typography-pair {
        grid-template-columns: 1fr;
        gap: 2rem;
    }
}

/* --- Dashboard Specialized Layout --- */
.dashboard-layout {
    display: grid;
    grid-template-columns: 280px 1fr;
    min-height: 100vh;
}

.dashboard-layout main {
    padding: 2.5rem 3rem;
    max-width: 100%;
    overflow-x: hidden;
}

@media (max-width: 768px) {
    .dashboard-layout main {
        padding: 1.5rem;
    }
}

/* Removed faulty RTL grid override because CSS grid handles direction natively */

.glass-sidebar {
    background: white;
    border-right: 1px solid var(--color-border);
    padding: 2.5rem 1.5rem;
    position: sticky;
    top: 0;
    height: 100vh;
    display: flex;
    flex-direction: column;
    z-index: 100;
}

[dir="rtl"] .glass-sidebar {
    border-right: none;
    border-left: 1px solid var(--color-border);
}

.sidebar-brand {
    font-size: 1.5rem;
    font-weight: 900;
    color: var(--color-primary);
    margin-bottom: 3rem;
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.sidebar-menu {
    list-style: none;
    flex-grow: 1;
}

.sidebar-menu li {
    margin-bottom: 0.5rem;
}

.sidebar-menu a {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 0.875rem 1.25rem;
    color: var(--color-text-dim);
    border-radius: 12px;
    font-weight: 600;
    transition: var(--transition-base);
}

.sidebar-menu a:hover,
.sidebar-menu a.active {
    background: rgba(0, 173, 220, 0.1);
    color: var(--color-secondary);
}

.sidebar-footer {
    padding-top: 2rem;
    border-top: 1px solid var(--color-border);
}

.user-pill {
    background: var(--color-bg);
    padding: 1rem;
    border-radius: 16px;
    margin-bottom: 1.5rem;
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.user-pill .username {
    font-weight: 800;
    color: var(--color-primary);
    display: block;
}

.user-pill .label {
    font-size: 0.7rem;
    font-weight: 800;
    text-transform: uppercase;
    color: var(--color-text-dim);
    display: block;
    margin-bottom: 0.2rem;
}

.breadcrumb {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin-bottom: 1rem;
    font-size: 0.8125rem;
    font-weight: 700;
}

.breadcrumb a {
    color: var(--color-secondary);
}

.breadcrumb .separator {
    font-size: 0.6rem;
    opacity: 0.3;
}

@media (max-width: 1024px) {
    .dashboard-layout {
        grid-template-columns: 1fr;
    }

    .glass-sidebar {
        display: none;
    }
}

/* --- Dashboard UI Components --- */

/* Page Header */
.page-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-end;
    margin-bottom: 2.5rem;
    padding-bottom: 1.5rem;
    border-bottom: 1px solid var(--color-border);
}

@media (max-width: 768px) {
    .page-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 1.5rem;
    }
}

.page-header h1 {
    margin-bottom: 0;
}

/* Data Table */
.data-table {
    width: 100%;
    border-collapse: separate;
    border-spacing: 0;
    text-align: left;
}

[dir="rtl"] .data-table {
    text-align: right;
}

.data-table th,
.data-table td {
    padding: 1.25rem 1.5rem;
    border-bottom: 1px solid var(--color-border);
}

.data-table th {
    font-weight: 800;
    font-size: 0.8125rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--color-text-dim);
    background: rgba(0, 0, 0, 0.02);
}

.data-table tr:last-child td {
    border-bottom: none;
}

.data-table tbody tr {
    transition: var(--transition-base);
}

.data-table tbody tr:hover {
    background: rgba(0, 0, 0, 0.015);
}

/* Alerts System */
.alert {
    padding: 1.25rem 1.5rem;
    border-radius: 16px;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 1rem;
    margin-bottom: 2rem;
    border: 1px solid transparent;
}

.alert i {
    font-size: 1.5rem;
}

.alert-success {
    background: hsla(142, 69%, 45%, 0.1);
    color: var(--color-success);
    border-color: hsla(142, 69%, 45%, 0.2);
}

.alert-error {
    background: hsla(0, 72%, 51%, 0.1);
    color: var(--color-danger);
    border-color: hsla(0, 72%, 51%, 0.2);
}

/* ═══════════════════════════════════════════════════
 *  COMPREHENSIVE MOBILE RESPONSIVE SYSTEM
 *  Breakpoints: 1024px (tablet) · 768px (mobile) · 480px (small)
 * ═══════════════════════════════════════════════════ */

/* ── Tablet (≤1024px) ── */
@media (max-width: 1024px) {
    .dashboard-layout {
        grid-template-columns: 1fr;
    }

    .glass-sidebar {
        display: none;
    }

    .typography-pair {
        grid-template-columns: 1fr;
        gap: 2rem;
    }
}

/* ── Mobile (≤768px) ── */
@media (max-width: 768px) {

    /* Navbar */
    .glass-nav {
        margin: 0.5rem;
        top: 0.5rem;
        border-radius: 20px;
    }

    .navbar-container {
        padding: 0.6rem 1rem;
        gap: 0.75rem;
    }

    .nav-links {
        display: none;
    }

    .navbar-brand img {
        height: 45px !important;
    }

    /* Hero */
    .hero-section {
        padding: 7rem 1.25rem 2.5rem !important;
        /* Increased padding-top for fixed header */
        text-align: center;
    }

    .hero-section h1 {
        font-size: clamp(1.75rem, 8vw, 2.5rem) !important;
        line-height: 1.2 !important;
    }

    .hero-section p {
        font-size: 1rem !important;
        margin: 1rem auto !important;
    }

    .floating-search {
        margin-top: 1.5rem !important;
        padding: 0 0.25rem;
    }

    /* Filter bar */
    .framework-filter-scroll {
        gap: 0.5rem !important;
        padding: 0.5rem 0 !important;
        margin-bottom: 1.5rem !important;
    }

    .framework-filter-scroll .btn {
        padding: 0.5rem 1rem !important;
        font-size: 0.85rem !important;
        flex-shrink: 0;
    }

    /* Framework grid */
    .frameworks-grid {
        grid-template-columns: 1fr !important;
        gap: 1.25rem !important;
    }

    .fw-premium-card {
        min-height: unset !important;
        padding: 1.5rem !important;
    }

    .fw-card-actions {
        gap: 0.5rem !important;
    }

    .fw-btn {
        height: 44px !important;
        font-size: 0.875rem !important;
    }

    .fw-title {
        font-size: 1.375rem !important;
    }

    /* Container */
    .container {
        padding-left: 1rem !important;
        padding-right: 1rem !important;
    }

    main.container,
    main[style*="max-width"] {
        padding: 1.5rem 1rem 4rem !important;
        width: 100%;
    }

    /* Table scroll */
    .data-table-wrapper {
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
        border-radius: 16px;
    }

    .data-table th,
    .data-table td {
        padding: 1rem;
        font-size: 0.875rem;
        white-space: nowrap;
    }

    /* Cards & buttons */
    .magic-card {
        padding: 1.5rem;
        border-radius: 18px;
    }

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

    /* Page header */
    .page-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 1.5rem;
    }

    /* Footer */
    footer {
        padding: 2rem 1.25rem !important;
    }

    footer img {
        height: 32px !important;
    }

    /* Typography */
    h1 {
        font-size: clamp(1.75rem, 7vw, 3rem);
    }

    h2 {
        font-size: clamp(1.375rem, 5vw, 2rem);
    }

    h3 {
        font-size: 1.25rem;
    }
}

/* ── Small Mobile (≤480px) ── */
@media (max-width: 480px) {
    .navbar-brand img {
        height: 45px !important;
    }

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

    /* Card actions: stack vertically */
    .fw-card-actions {
        grid-template-columns: 1fr auto !important;
        grid-template-rows: auto auto;
        gap: 0.5rem !important;
    }

    .fw-card-actions a:first-child {
        grid-column: 1;
        grid-row: 1;
    }

    .fw-card-actions a:nth-child(2) {
        grid-column: 1;
        grid-row: 2;
    }

    .fw-card-actions button {
        grid-column: 2;
        grid-row: 1 / 3;
        align-self: center;
    }

    /* Login/Auth pages */
    .login-card {
        padding: 2.5rem 1.5rem !important;
        border-radius: 24px !important;
    }

    h1 {
        font-size: clamp(1.5rem, 8vw, 2.25rem);
    }
}

/* ── Touch Devices ── */
@media (hover: none) {

    /* Prevent hover-stuck states on mobile */
    .fw-premium-card:hover,
    .magic-card:hover,
    .btn-primary:hover,
    .fw-btn-primary:hover,
    .fw-btn-ghost:hover {
        transform: none !important;
    }

    /* Larger touch targets */
    .fw-btn {
        height: 50px !important;
    }

    .sidebar-menu a {
        padding: 1rem 1.25rem;
    }
}