/* --- HARDWARE PAGE: NEW PURPLE THEME & STYLES --- */

/* Define new color variables based on the reference image */
:root {
    --hw-bg: #1a0a2e;
    --hw-accent: #c864ff;
    --hw-text-light: #f0e8ff;
    --hw-text-dark: #a899c2;
    --hw-glass-bg: rgba(200, 100, 255, 0.1);
    --hw-glass-border: rgba(200, 100, 255, 0.25);
    --hw-glow: 0 0 20px rgba(200, 100, 255, 0.4);
}

/* Override base CSS variables for hardware page */
.hardware-page-body {
    --text-light: #ffffff;
    --accent-cyan: #c864ff;
}

/* Mobile-first optimizations */
* {
    -webkit-tap-highlight-color: rgba(200, 100, 255, 0.3);
}

/* Improve scrolling performance on mobile */
.hardware-page-body {
    -webkit-overflow-scrolling: touch;
    scroll-behavior: smooth;
}



.hardware-page-body {
    display: block; /* Ensures normal page flow */
    background-color: var(--hw-bg);
    color: var(--hw-text-light);
    padding-top: 70px; /* Account for fixed navbar */
    /* Add a grid overlay */
    background-image: 
        linear-gradient(rgba(200, 100, 255, 0.05) 1px, transparent 1px),
        linear-gradient(90deg, rgba(200, 100, 255, 0.05) 1px, transparent 1px);
    background-size: 50px 50px;
    width: 100%;
    overflow-x: hidden;
    box-sizing: border-box;
}

/* Override base styles with new colors */
.hardware-page-body .section-title,
.hardware-page-body .kit-card h3,
.hardware-page-body .workspace-details h3,
.hardware-page-body .faq-question.active,
.hardware-page-body .about-content h3,
.hardware-page-body .theme-content h3,
.hardware-page-body .category-question.active {
    color: var(--hw-accent);
    text-shadow: 0 0 15px var(--hw-accent);
}

.hardware-page-body .tagline,
.hardware-page-body .section-subtitle,
.hardware-page-body .kit-card p,
.hardware-page-body .workspace-details p,
.hardware-page-body .faq-answer p,
.hardware-page-body .about-content p,
.hardware-page-body .theme-content p,
.hardware-page-body .category-answer p {
    color: var(--hw-text-dark);
}

/* Section subtitle styling */
.hardware-page-body .section-subtitle {
    font-size: 1.2rem;
    text-align: center;
    margin-bottom: 3rem;
    color: var(--hw-text-dark);
    max-width: 600px;
    margin-left: auto;
    margin-right: auto;
    line-height: 1.6;
}

/* Content section improvements */
.hardware-page-body .content-section {
    padding: clamp(2rem, 8vh, 6rem) 0;
    width: 100%;
    max-width: 100%;
    box-sizing: border-box;
}

.hardware-page-body .content-section .container {
    padding: 0 2rem;
    width: 100%;
    max-width: 1200px;
}

/* Section title improvements */
.hardware-page-body .section-title {
    font-size: clamp(2rem, 5vw, 3rem);
    margin-bottom: 2rem;
    line-height: 1.2;
}

/* Main content sections alignment */
.hardware-page-body main {
    position: relative;
    z-index: 1;
    margin: 2rem;
}

.hardware-page-body #about-hackrobo,
.hardware-page-body #theme {
    text-align: center;
}

.hardware-page-body #problem-categories {
    text-align: center;
}

.hardware-page-body #problem-categories .section-subtitle {
    text-align: center;
}

.hardware-page-body #problem-categories .categories-container {
    text-align: left;
}

.hardware-page-body #faq {
    text-align: center;
}

/* --- ABOUT SECTION STYLES --- */
.hardware-page-body .about-card {
    background: var(--hw-glass-bg);
    border: 1px solid var(--hw-glass-border);
    border-radius: 16px;
    padding: 3rem;
    margin-top: 2rem;
    transition: all 0.3s ease;
    width: 100%;
    box-sizing: border-box;
    overflow: hidden;
}

.hardware-page-body .about-card:hover {
    border-color: var(--hw-accent);
    box-shadow: var(--hw-glow);
}

.hardware-page-body .about-content {
    text-align: center;
    max-width: 1000px;
    margin: 0 auto;
    width: 100%;
    box-sizing: border-box;
    overflow-wrap: break-word;
    word-wrap: break-word;
    hyphens: auto;
}

.hardware-page-body .about-content p {
    font-size: 1.1rem;
    line-height: 1.6;
    margin-bottom: 1.5rem;
    word-wrap: break-word;
    hyphens: auto;
}

.hardware-page-body .event-details {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 1.5rem;
    margin-top: 2rem;
    justify-content: center;
    justify-items: center;
}

.hardware-page-body .detail-item {
    display: flex;
    align-items: center;
    gap: 0.8rem;
    padding: 1rem;
    background: rgba(200, 100, 255, 0.05);
    border-radius: 8px;
    border: 1px solid rgba(200, 100, 255, 0.15);
}

.hardware-page-body .detail-icon {
    font-size: 1.5rem;
    flex-shrink: 0;
}

/* --- THEME SECTION STYLES --- */
.hardware-page-body .theme-card {
    background: var(--hw-glass-bg);
    border: 1px solid var(--hw-glass-border);
    border-radius: 16px;
    padding: 3rem;
    margin-top: 2rem;
    transition: all 0.3s ease;
    width: 100%;
    box-sizing: border-box;
    overflow: hidden;
}

.hardware-page-body .theme-card:hover {
    border-color: var(--hw-accent);
    box-shadow: var(--hw-glow);
}

.hardware-page-body .theme-layout {
    display: flex;
    align-items: center;
    gap: 3rem;
    text-align: center;
    justify-content: center;
    width: 100%;
    box-sizing: border-box;
    overflow: hidden;
}

.hardware-page-body .theme-content {
    max-width: 800px;
    text-align: left;
    width: 100%;
    overflow-wrap: break-word;
    word-wrap: break-word;
    hyphens: auto;
    box-sizing: border-box;
}

.hardware-page-body .theme-content h3 {
    font-size: 2rem;
    margin-bottom: 1.5rem;
    color: var(--hw-accent);
    text-align: center;
    word-wrap: break-word;
    overflow-wrap: break-word;
    word-break: normal;
    hyphens: none;
    white-space: normal;
}

/* Hide mobile break on desktop */
.mobile-break {
    display: none;
}

.hardware-page-body .theme-content p {
    font-size: 1.1rem;
    line-height: 1.6;
    margin-bottom: 1.5rem;
    word-wrap: break-word;
    hyphens: auto;
}

.hardware-page-body .theme-content ul {
    list-style: none;
    padding: 0;
    margin: 1.5rem 0;
}

.hardware-page-body .theme-content li {
    display: flex;
    align-items: center;
    gap: 0.8rem;
    margin-bottom: 0.8rem;
    font-size: 1rem;
}

.hardware-page-body .theme-icon {
    font-size: 1.2rem;
    color: var(--hw-accent);
}

/* --- WHY HACKROBO SECTION STYLES --- */
.hardware-page-body .why-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 2rem;
    margin-top: 2rem;
    align-items: stretch;
    justify-content: center;
    width: 100%;
}

.hardware-page-body .why-card {
    background: var(--hw-glass-bg);
    border: 1px solid var(--hw-glass-border);
    border-radius: 16px;
    padding: 2rem;
    text-align: center;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
    transform-style: preserve-3d;
    height: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
}

.hardware-page-body .why-card:hover {
    border-color: var(--hw-accent);
    box-shadow: var(--hw-glow);
    transform: translateY(-5px);
}

.hardware-page-body .why-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: radial-gradient(circle at center, rgba(200, 100, 255, 0.2) 0%, transparent 70%);
    transform: scale(0);
    transition: transform 0.4s ease;
    opacity: 0;
}

.hardware-page-body .why-card:hover::before {
    transform: scale(2);
    opacity: 1;
}

.hardware-page-body .why-icon {
    font-size: 3rem;
    margin-bottom: 1rem;
    display: block;
    transform: translateZ(20px);
}

.hardware-page-body .why-card h3 {
    font-size: 1.3rem;
    color: var(--hw-accent);
    text-shadow: 0 0 15px var(--hw-accent);
    margin: 0;
    transform: translateZ(20px);
    line-height: 1.3;
}

/* --- THEME SECTION CRAWLER VISUAL STYLES --- */
.hardware-page-body .theme-visual .crawler-container {
    position: relative;
    width: 300px;
    height: 200px;
    margin: 0 auto;
    opacity: 0.8;
}

.hardware-page-body .theme-visual .crawler-body {
    position: relative;
    width: 100px;
    height: 160px;
    background: var(--hw-accent);
    margin: 20px auto;
    border-radius: 20px 20px 10px 10px;
    box-shadow: inset 0 0 15px rgba(0,0,0,0.5), var(--hw-glow);
}

.hardware-page-body .theme-visual .crawler-eye {
    position: absolute;
    top: 15px;
    left: 50%;
    transform: translateX(-50%);
    width: 20px;
    height: 10px;
    background: #fff;
    border-radius: 5px;
    box-shadow: 0 0 20px #fff, 0 0 30px var(--hw-accent);
    animation: eye-scan 4s linear infinite;
}

.hardware-page-body .theme-visual .crawler-leg {
    position: absolute;
    width: 120px;
    height: 10px;
    background: var(--hw-accent);
    border-radius: 5px;
}

.hardware-page-body .theme-visual .crawler-leg::after {
    content: '';
    position: absolute;
    width: 20px;
    height: 20px;
    background: var(--hw-text-dark);
    border-radius: 50%;
    top: 50%;
    transform: translateY(-50%);
}

.hardware-page-body .theme-visual .crawler-leg.front-left, 
.hardware-page-body .theme-visual .crawler-leg.mid-left, 
.hardware-page-body .theme-visual .crawler-leg.back-left {
    left: 90%;
    transform-origin: 0% 50%;
    animation: crawl-left 1.5s ease-in-out infinite;
}

.hardware-page-body .theme-visual .crawler-leg.front-left::after, 
.hardware-page-body .theme-visual .crawler-leg.mid-left::after, 
.hardware-page-body .theme-visual .crawler-leg.back-left::after {
    left: -10px;
}

.hardware-page-body .theme-visual .crawler-leg.front-right, 
.hardware-page-body .theme-visual .crawler-leg.mid-right, 
.hardware-page-body .theme-visual .crawler-leg.back-right {
    right: 90%;
    transform-origin: 100% 50%;
    animation: crawl-right 1.5s ease-in-out infinite;
}

.hardware-page-body .theme-visual .crawler-leg.front-right::after, 
.hardware-page-body .theme-visual .crawler-leg.mid-right::after, 
.hardware-page-body .theme-visual .crawler-leg.back-right::after {
    right: -10px;
}

.hardware-page-body .theme-visual .front-left, 
.hardware-page-body .theme-visual .front-right { 
    top: 30px; 
}

.hardware-page-body .theme-visual .mid-left, 
.hardware-page-body .theme-visual .mid-right { 
    top: 75px; 
    animation-delay: -0.75s; 
}

.hardware-page-body .theme-visual .back-left, 
.hardware-page-body .theme-visual .back-right { 
    top: 120px; 
}



/* Use base problem categories styles from styles.css like software page */
/* Override colors to match hardware theme */
.hardware-page-body .category-question {
    color: var(--hw-text-light);
}

.hardware-page-body .category-question:hover {
    color: var(--hw-accent);
}

.hardware-page-body .category-question::after {
    color: var(--hw-accent);
}

.hardware-page-body .category-icon {
    color: var(--hw-accent);
}

.hardware-page-body .category-item {
    background: var(--hw-glass-bg);
    border-color: var(--hw-glass-border);
}

.hardware-page-body .category-item:hover {
    border-color: var(--hw-accent);
    box-shadow: var(--hw-glow);
}

.hardware-page-body .category-answer p {
    color: var(--hw-text-dark);
}

.hardware-page-body .sample-problems h4 {
    color: var(--hw-accent);
}

.hardware-page-body .sample-problems li::before {
    color: var(--hw-accent);
}

/* --- PRIZE POOL STYLES --- */
.hardware-page-body #prizes {
    text-align: center;
}

.hardware-page-body .prize-grid {
    display: flex;
    justify-content: center;
    align-items: center;
    margin-top: 2rem;
}

.hardware-page-body .prize-card {
    background: var(--hw-glass-bg);
    border: 1px solid var(--hw-glass-border);
    border-radius: 20px;
    padding: 3rem;
    text-align: center;
    max-width: 400px;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
    transform-style: preserve-3d;
}

.hardware-page-body .prize-card:hover {
    border-color: var(--hw-accent);
    box-shadow: var(--hw-glow);
    transform: translateY(-5px);
}

.hardware-page-body .prize-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: radial-gradient(circle at center, rgba(200, 100, 255, 0.2) 0%, transparent 70%);
    transform: scale(0);
    transition: transform 0.4s ease;
    opacity: 0;
}

.hardware-page-body .prize-card:hover::before {
    transform: scale(2);
    opacity: 1;
}

.hardware-page-body .prize-icon {
    font-size: 4rem;
    margin-bottom: 1rem;
    display: block;
    transform: translateZ(20px);
}

.hardware-page-body .prize-card h3 {
    font-size: 1.8rem;
    margin-bottom: 1rem;
    color: var(--hw-accent);
    text-shadow: 0 0 15px var(--hw-accent);
    transform: translateZ(20px);
}

.hardware-page-body .prize-amount {
    font-size: 2.5rem;
    font-weight: 700;
    color: var(--hw-accent);
    margin-bottom: 1rem;
    text-shadow: 0 0 20px var(--hw-accent);
    transform: translateZ(20px);
}

.hardware-page-body .prize-desc {
    color: var(--hw-text-dark);
    font-size: 1.1rem;
    line-height: 1.6;
    margin: 0;
    transform: translateZ(20px);
}

/* --- HERO SECTION --- */
#hardware-hero {
    min-height: calc(100vh - 70px);
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    overflow: hidden;
    text-align: center;
    border-bottom: 2px solid var(--hw-glass-border);
    padding: 2rem;
}

/* HackRobo Logo Styling */
.hackrobo-logo {
    width: clamp(80px, 12vw, 120px);
    height: auto;
    margin-bottom: 1rem;
    filter: drop-shadow(0 0 20px rgba(200, 100, 255, 0.6));
    transition: all 0.3s ease;
    z-index: 2;
    position: relative;
}

.hackrobo-logo:hover {
    transform: scale(1.05);
    filter: drop-shadow(0 0 30px rgba(200, 100, 255, 0.8));
}

/* Use new Orbitron font for the title */
#hardware-hero .section-title {
    font-family: 'Orbitron', sans-serif;
    font-size: clamp(2.5rem, 8vw, 4.5rem);
    letter-spacing: 2px;
    margin-bottom: 1rem;
}

#hardware-hero .tagline {
    font-size: clamp(1rem, 3vw, 1.3rem);
    margin-bottom: 2rem;
    color: var(--hw-text-dark);
}

#hardware-hero .hero-content { 
    z-index: 1; 
    max-width: 800px;
    margin: 0 auto;
}

#hardware-hero .btn-secondary {
    color: var(--hw-accent);
    border-color: var(--hw-accent);
    position: relative;
    overflow: hidden;
    margin: 0.5rem;
}
#hardware-hero .btn-secondary:hover {
    background-color: rgba(200, 100, 255, 0.1);
    box-shadow: var(--hw-glow);
}
/* Scan line hover effect */
#hardware-hero .btn-secondary::after {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: linear-gradient(to right, transparent, rgba(255,255,255,0.3), transparent);
    transform: rotate(45deg);
    transition: all 0.5s ease;
    opacity: 0;
}
#hardware-hero .btn-secondary:hover::after {
    left: 100%;
    opacity: 1;
    transition: all 0.5s ease;
}


/* --- ENHANCED CRAWLER ANIMATION --- */
.crawler-container {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 300px;
    height: 200px;
    z-index: 0;
    opacity: 0.2;
}
.crawler-body {
    position: relative;
    width: 100px;
    height: 160px;
    background: var(--hw-accent);
    margin: 20px auto;
    border-radius: 20px 20px 10px 10px;
    box-shadow: inset 0 0 15px rgba(0,0,0,0.5), var(--hw-glow);
}
.crawler-eye {
    position: absolute;
    top: 15px;
    left: 50%;
    transform: translateX(-50%);
    width: 20px;
    height: 10px;
    background: #fff;
    border-radius: 5px;
    box-shadow: 0 0 20px #fff, 0 0 30px var(--hw-accent);
    animation: eye-scan 4s linear infinite;
}
@keyframes eye-scan {
    50% { background: var(--hw-bg); box-shadow: none; }
}
.crawler-leg {
    position: absolute;
    width: 120px;
    height: 10px;
    background: var(--hw-accent);
    border-radius: 5px;
}
.crawler-leg::after { /* Joint */
    content: '';
    position: absolute;
    width: 20px;
    height: 20px;
    background: var(--hw-text-dark);
    border-radius: 50%;
    top: 50%;
    transform: translateY(-50%);
}
.crawler-leg.front-left, .crawler-leg.mid-left, .crawler-leg.back-left {
    left: 90%;
    transform-origin: 0% 50%;
    animation: crawl-left 1.5s ease-in-out infinite;
}
.crawler-leg.front-left::after, .crawler-leg.mid-left::after, .crawler-leg.back-left::after {
    left: -10px;
}
.crawler-leg.front-right, .crawler-leg.mid-right, .crawler-leg.back-right {
    right: 90%;
    transform-origin: 100% 50%;
    animation: crawl-right 1.5s ease-in-out infinite;
}
.crawler-leg.front-right::after, .crawler-leg.mid-right::after, .crawler-leg.back-right::after {
    right: -10px;
}
.front-left, .front-right { top: 30px; }
.mid-left, .mid-right { top: 75px; animation-delay: -0.75s; }
.back-left, .back-right { top: 120px; }

@keyframes crawl-left {
    0%, 100% { transform: rotate(40deg); }
    50% { transform: rotate(-40deg); }
}
@keyframes crawl-right {
    0%, 100% { transform: rotate(-40deg); }
    50% { transform: rotate(40deg); }
}

/* --- COMPONENT KIT & OTHER CARDS --- */
.kit-card, .workspace-layout, .faq-item {
    background: var(--hw-glass-bg);
    border: 1px solid var(--hw-glass-border);
    border-radius: 16px;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}
.kit-card:hover, .workspace-layout:hover, .faq-item:hover {
    border-color: var(--hw-accent);
    box-shadow: var(--hw-glow);
}
.kit-card { 
    padding: 2rem; 
    text-align: center; 
    height: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    /* Required for 3D tilt */
    transform-style: preserve-3d;
}
.kit-card-content {
    /* Elevates the content for a better 3D effect */
    transform: translateZ(20px);
    width: 100%;
}
.kit-icon { 
    font-size: 3rem; 
    line-height: 1; 
    margin-bottom: 1rem; 
    display: block;
}
.kit-card h3 {
    margin-bottom: 0.5rem;
    font-size: 1.3rem;
}
.kit-card p {
    font-size: 1rem;
    line-height: 1.4;
}
.kit-grid { 
    display: grid; 
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); 
    gap: 2rem; 
    margin-top: 2rem;
    align-items: stretch;
    justify-content: center;
    width: 100%;
}

/* Power-up hover effect for cards */
.kit-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: radial-gradient(circle at center, rgba(200, 100, 255, 0.3) 0%, transparent 70%);
    transform: scale(0);
    transition: transform 0.4s ease;
    opacity: 0;
}
.kit-card:hover::before {
    transform: scale(2);
    opacity: 1;
}

/* --- WORKSPACE & FAQ --- */
.workspace-layout {
    display: flex;
    align-items: center;
    gap: 3rem;
    padding: 3rem;
    min-height: 300px;
}
.workspace-details { 
    flex: 2; 
    min-width: 0; /* Prevents flex item from overflowing */
}
.workspace-details h3 {
    margin-bottom: 1rem;
    font-size: 1.8rem;
}
.workspace-details p {
    margin-bottom: 1.5rem;
    font-size: 1.1rem;
    line-height: 1.6;
}
.workspace-details ul { 
    list-style: none; 
    padding-left: 0; 
    margin-top: 1.5rem; 
}
.workspace-details li { 
    padding-left: 1.5rem; 
    position: relative; 
    margin-bottom: 0.8rem;
    font-size: 1rem;
    line-height: 1.5;
}
.workspace-details li::before { 
    content: '⚡'; 
    position: absolute; 
    left: 0; 
    color: var(--hw-accent); 
    font-size: 1.2rem;
}
.workspace-visual { 
    flex: 1; 
    display: flex; 
    flex-direction: column; 
    align-items: center; 
    justify-content: center; 
    font-size: 1.5rem; 
    font-weight: 700; 
    color: var(--hw-accent);
    text-align: center;
    min-width: 200px;
}
.workspace-visual .tool-icon { 
    font-size: 4rem; 
    margin-bottom: 1rem;
    display: block;
}
.workspace-visual p {
    margin: 0;
    letter-spacing: 1px;
}

.faq-container { 
    max-width: 800px; 
    margin: 0 auto; 
}
.faq-item { 
    margin-bottom: 1rem; 
}
.faq-question { 
    width: 100%; 
    padding: 1.5rem; 
    font-size: 1.2rem; 
    font-weight: 700; 
    background: transparent; 
    border: none; 
    color: var(--hw-text-light); 
    text-align: left; 
    cursor: pointer; 
    display: flex; 
    justify-content: space-between; 
    align-items: center;
    transition: color 0.3s ease;
}
.faq-question:hover {
    color: var(--hw-accent);
}
.faq-question::after { 
    content: '+'; 
    font-size: 1.8rem; 
    color: var(--hw-accent); 
    transition: transform 0.3s; 
    flex-shrink: 0;
    margin-left: 1rem;
}
.faq-question.active::after { 
    transform: rotate(45deg); 
}
.faq-answer { 
    max-height: 0; 
    overflow: hidden; 
    transition: max-height 0.4s ease-out; 
}
.faq-answer p { 
    padding: 0 1.5rem 1.5rem; 
    margin: 0;
    line-height: 1.6;
    font-size: 1rem;
}

/* --- RESPONSIVE ADJUSTMENTS --- */

/* Extra small devices and better mobile optimization */
@media (max-width: 320px) {
    .hardware-page-body {
        padding-top: 50px;
        background-size: 30px 30px;
    }
    
    .hardware-page-body .content-section .container {
        padding-left: 0.25rem;
        padding-right: 0.25rem;
    }
    
    /* Use normal container spacing like software page */
    
    #hardware-hero {
        min-height: calc(100vh - 50px);
        padding: 0.5rem;
    }
    
    #hardware-hero .section-title {
        font-size: 1.8rem;
    }
    
    #hardware-hero .tagline {
        font-size: 0.85rem;
    }
    
    .about-card,
    .theme-card,
    .prize-card {
        padding: 1rem !important;
        margin-left: 0.25rem !important;
        margin-right: 0.25rem !important;
        width: calc(100% - 0.5rem) !important;
        max-width: none !important;
        box-sizing: border-box !important;
    }
    
    .faq-question {
        font-size: 0.9rem;
        padding: 0.8rem;
    }
    
    .category-question {
        font-size: 0.9rem !important;
        padding: 0.7rem !important;
        min-height: 65px !important;
        align-items: center !important;
        line-height: 1.2 !important;
    }
    
    .hardware-page-body .prize-amount {
        font-size: 1.5rem;
    }
    
    /* Let problem categories use base responsive behavior */
    
    .hardware-page-body .theme-content h3 {
        font-size: 1.2rem;
        line-height: 1.1;
        margin-bottom: 0.8rem;
        word-wrap: break-word !important;
        overflow-wrap: break-word !important;
        word-break: normal !important;
        hyphens: none !important;
        white-space: normal !important;
    }
    
    /* Ensure mobile break shows on extra small screens */
    .mobile-break {
        display: inline !important;
    }
    
    .hardware-page-body .theme-content p,
    .hardware-page-body .about-content p {
        font-size: 0.9rem;
        line-height: 1.4;
        margin-bottom: 0.8rem;
    }
    
    .detail-item {
        padding: 0.6rem !important;
        gap: 0.2rem !important;
        width: 100% !important;
        max-width: 260px !important;
        margin: 0 auto !important;
        justify-content: center !important;
        text-align: center !important;
        align-items: center !important;
    }
    
    .detail-item .detail-icon {
        font-size: 1rem;
    }
    
    .detail-item strong {
        font-size: 0.85rem;
    }
    
    .sample-problems h4 {
        font-size: 0.9rem;
        margin-bottom: 0.6rem;
    }
    
    /* Why HackRobo responsive styles for extra small screens */
    .hardware-page-body .why-card {
        padding: 0.8rem !important;
        margin: 0 0.25rem !important;
    }
    
    .hardware-page-body .why-icon {
        font-size: 1.8rem;
        margin-bottom: 0.8rem;
    }
    
    .hardware-page-body .why-card h3 {
        font-size: 0.9rem !important;
        line-height: 1.1 !important;
    }
    
    /* Theme crawler visual responsive styles for extra small screens */
    .hardware-page-body .theme-visual .crawler-container {
        width: 120px;
        height: 100px;
        opacity: 0.6;
    }
    
    .hardware-page-body .theme-visual .crawler-body {
        width: 50px;
        height: 80px;
    }
    
    .hardware-page-body .theme-visual .crawler-eye {
        width: 15px;
        height: 8px;
    }
    
    .hardware-page-body .theme-visual .crawler-leg {
        width: 50px;
        height: 6px;
    }
    
    .hardware-page-body .theme-visual .crawler-leg::after {
        width: 12px;
        height: 12px;
    }
}

/* Improved landscape mobile support */
@media (max-width: 768px) and (orientation: landscape) {
    #hardware-hero {
        min-height: 80vh;
        padding: 1rem;
    }
    
    .crawler-container {
        opacity: 0.1;
        width: 150px;
    }
}

/* Standard tablet and mobile styles */
@media (max-width: 768px) {
    .hardware-page-body {
        padding-top: 60px; /* Smaller navbar on mobile */
    }
    
    .hardware-page-body main {
        margin: 1rem !important;
    }
    
    .hardware-page-body .content-section .container {
        padding-left: 1rem !important;
        padding-right: 1rem !important;
        max-width: 100% !important;
        width: 100% !important;
    }
    
    /* Let problem categories use normal container spacing like software page */
    
    .hardware-page-body .container {
        max-width: 100% !important;
        width: 100% !important;
        margin-left: auto !important;
        margin-right: auto !important;
    }
    
    #hardware-hero {
        min-height: calc(100vh - 60px);
        padding: 1rem;
    }
    
    #hardware-hero .section-title {
        font-size: clamp(2rem, 6vw, 3rem);
        margin-bottom: 0.5rem;
    }
    
    #hardware-hero .tagline {
        font-size: clamp(0.9rem, 2.5vw, 1.1rem);
        margin-bottom: 1.5rem;
    }
    
    /* Mobile logo adjustments */
    .hackrobo-logo {
        width: clamp(60px, 15vw, 100px);
        margin-bottom: 0.8rem;
    }
    
    /* Section titles responsive */
    .hardware-page-body .section-title {
        font-size: clamp(1.8rem, 4vw, 2.5rem) !important;
        padding: 0 1rem !important;
        word-wrap: break-word !important;
        hyphens: auto !important;
        text-align: center !important;
    }
    
    .hardware-page-body .section-subtitle {
        font-size: clamp(1rem, 2.5vw, 1.2rem) !important;
        padding: 0 1rem !important;
        margin-bottom: 2rem !important;
        text-align: center !important;
    }
    
    .kit-grid {
        grid-template-columns: 1fr;
        gap: 1.5rem;
    }
    
    .kit-card {
        padding: 1.5rem;
    }
    
    .workspace-layout { 
        flex-direction: column; 
        text-align: center; 
        padding: 2rem;
        gap: 2rem;
    }
    
    .workspace-details {
        order: 2;
    }
    
    .workspace-details ul { 
        display: inline-block; 
        text-align: left; 
        max-width: 300px;
    }
    
    .workspace-visual { 
        margin-top: 0;
        order: 1;
    }
    
    .crawler-container { 
        width: 200px; 
        opacity: 0.15; 
    }
    
    .crawler-leg { 
        width: 80px; 
    }
    
    .faq-question {
        font-size: 1.1rem;
        padding: 1.2rem;
    }
    
    .faq-question::after {
        font-size: 1.5rem;
    }
    
    .category-question {
        font-size: 1.05rem !important;
        padding: 1rem !important;
        min-height: 75px !important;
        align-items: center !important;
        line-height: 1.3 !important;
    }
    
    .category-question::after {
        font-size: 1.5rem;
    }
    
    .category-icon {
        font-size: 1.5rem !important;
        min-width: 35px !important;
    }
    
    .theme-layout {
        gap: 2rem;
    }
    
    .about-card,
    .theme-card {
        padding: 2rem !important;
        margin-left: 1rem !important;
        margin-right: 1rem !important;
        width: calc(100% - 2rem) !important;
        max-width: none !important;
        box-sizing: border-box !important;
    }
    
    .event-details {
        grid-template-columns: 1fr !important;
        gap: 1rem !important;
        justify-content: center !important;
        justify-items: center !important;
        width: 100% !important;
        max-width: 100% !important;
    }
    
    .detail-item {
        justify-content: center !important;
        text-align: center !important;
        flex-direction: column !important;
        align-items: center !important;
        gap: 0.5rem !important;
        width: 100% !important;
        max-width: 300px !important;
        margin: 0 auto !important;
    }
    
    .detail-item .detail-icon {
        font-size: 1.2rem;
    }
    
    /* Use base styles for problem categories like software page */
    
    /* Theme content mobile improvements */
    .hardware-page-body .theme-content {
        max-width: none !important;
        width: 100% !important;
        padding: 0 !important;
        margin: 0 !important;
        overflow-wrap: break-word !important;
        word-wrap: break-word !important;
        hyphens: auto !important;
        box-sizing: border-box !important;
    }
    
    .hardware-page-body .theme-content h3 {
        font-size: 1.6rem;
        line-height: 1.3;
        margin-bottom: 1rem;
        word-wrap: break-word !important;
        overflow-wrap: break-word !important;
        word-break: normal !important;
        hyphens: none !important;
        white-space: normal !important;
    }
    
    /* Why HackRobo responsive styles */
    .hardware-page-body .why-grid {
        grid-template-columns: 1fr;
        gap: 1.5rem;
    }
    
    .hardware-page-body .why-card {
        padding: 1.5rem;
    }
    
    .hardware-page-body .why-icon {
        font-size: 2.5rem;
    }
    
    .hardware-page-body .why-card h3 {
        font-size: 1.2rem;
    }
    
    /* Theme crawler visual responsive styles */
    .hardware-page-body .theme-visual .crawler-container {
        width: 200px;
        height: 150px;
    }
    
    .hardware-page-body .theme-visual .crawler-body {
        width: 80px;
        height: 120px;
    }
    
    .hardware-page-body .theme-visual .crawler-leg {
        width: 90px;
    }
    
    /* Show mobile break on tablet and smaller */
    .mobile-break {
        display: inline !important;
    }
    
    .hardware-page-body .theme-content p {
        font-size: 1rem;
        margin-bottom: 1rem;
    }
    
    /* About content mobile improvements */
    .hardware-page-body .about-content {
        max-width: none !important;
        width: 100% !important;
        padding: 0 !important;
        margin: 0 !important;
        text-align: center !important;
        box-sizing: border-box !important;
    }
    
    .hardware-page-body .about-content p {
        font-size: 1rem;
        margin-bottom: 1rem;
    }
    
    .prize-card {
        padding: 2rem;
        margin: 0 1rem;
        max-width: 350px;
    }
    
    .hardware-page-body .prize-amount {
        font-size: 2rem;
    }
    
    .hardware-page-body .prize-icon {
        font-size: 3rem;
    }
    
    .hardware-page-body .prize-card h3 {
        font-size: 1.5rem;
    }
    
    /* Better touch targets for mobile */
    .category-question,
    .faq-question,
    .btn,
    .sidebar-link {
        min-height: 44px;
        display: flex;
        align-items: center;
    }
    
    .category-question,
    .faq-question {
        justify-content: space-between;
        text-align: left;
    }
    
    .btn {
        justify-content: center;
        text-align: center;
    }
}

/* Fix for text wrapping at mid-range mobile devices (367px to 390px range) */
@media (max-width: 400px) and (min-width: 360px) {
    /* Reduce font size to prevent awkward wrapping */
    .hardware-page-body .theme-content h3.reveal-letters {
        font-size: 1.25rem !important;
        line-height: 1.3 !important;
        text-align: center !important;
        padding: 0 0.5rem !important;
        max-width: 100% !important;
        box-sizing: border-box !important;
        word-wrap: break-word !important;
        overflow-wrap: break-word !important;
        word-break: normal !important;
        hyphens: none !important;
        white-space: normal !important;
    }
}

/* Additional fix for slightly larger devices that still have the issue */
@media (max-width: 395px) and (min-width: 375px) {
    .hardware-page-body .theme-content h3.reveal-letters {
        font-size: 1.2rem !important;
        word-wrap: break-word !important;
        overflow-wrap: break-word !important;
        word-break: normal !important;
        hyphens: none !important;
        white-space: normal !important;
    }
}

@media (max-width: 480px) {
    .hardware-page-body {
        padding-top: 55px; /* Even smaller on very small screens */
    }
    
    .hardware-page-body main {
        margin: 0.5rem !important;
    }
    
    .hardware-page-body .content-section .container {
        padding-left: 0.5rem !important;
        padding-right: 0.5rem !important;
        max-width: 100% !important;
        width: 100% !important;
    }
    
    /* Use normal container for problem categories */
    
    .hardware-page-body .container {
        max-width: 100% !important;
        width: 100% !important;
        padding-left: 0.5rem !important;
        padding-right: 0.5rem !important;
    }
    
    #hardware-hero {
        min-height: calc(100vh - 55px);
    }
    
    .kit-card {
        padding: 1rem;
    }
    
    .workspace-layout {
        padding: 1.5rem;
    }
    
    .faq-question {
        font-size: 1rem;
        padding: 1rem;
    }
    
    .category-question {
        font-size: 0.95rem !important;
        padding: 0.75rem !important;
        min-height: 70px !important;
        align-items: center !important;
        line-height: 1.3 !important;
    }
    
    .about-card,
    .theme-card {
        padding: 1.5rem !important;
        margin-left: 0.5rem !important;
        margin-right: 0.5rem !important;
        width: calc(100% - 1rem) !important;
        max-width: none !important;
        box-sizing: border-box !important;
    }
    
    /* Let problem categories inherit base responsive styles */
    
    .hardware-page-body .theme-content h3 {
        font-size: 1.4rem;
        line-height: 1.2;
        word-wrap: break-word !important;
        overflow-wrap: break-word !important;
        word-break: normal !important;
        hyphens: none !important;
        white-space: normal !important;
    }
    
    /* Why HackRobo responsive styles for small screens */
    .hardware-page-body .why-card {
        padding: 1rem;
    }
    
    .hardware-page-body .why-icon {
        font-size: 2rem;
    }
    
    .hardware-page-body .why-card h3 {
        font-size: 1rem;
        line-height: 1.2;
    }
    
    /* Theme crawler visual responsive styles for small screens */
    .hardware-page-body .theme-visual .crawler-container {
        width: 150px;
        height: 120px;
    }
    
    .hardware-page-body .theme-visual .crawler-body {
        width: 60px;
        height: 100px;
    }
    
    .hardware-page-body .theme-visual .crawler-leg {
        width: 70px;
        height: 8px;
    }
    
    /* Ensure mobile break shows on small screens */
    .mobile-break {
        display: inline !important;
    }
    
    .hardware-page-body .theme-content p,
    .hardware-page-body .about-content p {
        font-size: 0.95rem;
        line-height: 1.5;
    }
    
    .detail-item {
        padding: 0.8rem !important;
        gap: 0.3rem !important;
        width: 100% !important;
        max-width: 280px !important;
        margin: 0 auto !important;
        justify-content: center !important;
        text-align: center !important;
        align-items: center !important;
    }
    
    .detail-item strong {
        font-size: 0.9rem;
    }
    
    .prize-card {
        padding: 1.5rem;
        margin: 0 0.5rem;
        max-width: 320px;
    }
    
    .hardware-page-body .prize-amount {
        font-size: 1.8rem;
    }
    
    .hardware-page-body .prize-icon {
        font-size: 2.5rem;
    }
    
    .hardware-page-body .prize-card h3 {
        font-size: 1.3rem;
    }
    
    .hardware-page-body .prize-desc {
        font-size: 1rem;
    }
    
    /* Small mobile logo adjustments */
    .hackrobo-logo {
        width: clamp(50px, 20vw, 80px);
        margin-bottom: 0.6rem;
    }
}

/* --- FOOTER OVERRIDES FOR HARDWARE PAGE --- */
.hardware-page-body footer {
    background: linear-gradient(135deg, rgba(26, 10, 46, 0.9) 0%, rgba(26, 10, 46, 0.95) 100%);
    border-top: 1px solid var(--hw-glass-border);
}

.hardware-page-body .footer-content {
    justify-content: center;
    align-items: center;
    flex-wrap: wrap;
    gap: 2rem;
    margin-bottom: 2rem;
}

.hardware-page-body .footer-content .btn {
    background: var(--hw-glass-bg);
    border-color: var(--hw-accent);
    color: var(--hw-accent);
}

.hardware-page-body .footer-content .btn:hover {
    background: rgba(200, 100, 255, 0.1);
    box-shadow: var(--hw-glow);
}

.hardware-page-body .copyright {
    color: var(--hw-text-dark);
    font-size: 0.9rem;
    padding: 1rem 0;
    text-align: center;
}

/* --- HARDWARE NAVBAR THEME OVERRIDES --- */
.hardware-page-body #main-header {
    background: rgba(26, 10, 46, 0.95);
    border-bottom: 1px solid var(--hw-glass-border);
    backdrop-filter: blur(10px);
    transition: all 0.3s ease;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 100;
}

.hardware-page-body #main-header.scrolled {
    background: rgba(26, 10, 46, 0.98);
    box-shadow: var(--hw-glow);
}

.hardware-page-body #main-header nav {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem 2rem;
}

.hardware-page-body #main-header .logo {
    display: flex;
    align-items: center;
    text-decoration: none;
    color: var(--hw-accent);
    font-weight: 700;
    font-size: 1.5rem;
    transition: all 0.3s ease;
}

.hardware-page-body #main-header .logo:hover {
    transform: scale(1.05);
    filter: drop-shadow(0 0 10px var(--hw-accent));
}

.hardware-page-body #main-header .nav-links {
    display: flex;
    list-style: none;
    gap: 2rem;
    margin: 0;
    padding: 0;
}

.hardware-page-body #main-header .nav-links a {
    color: var(--hw-text-light);
    text-decoration: none;
    font-weight: 500;
    font-size: 1rem;
    padding: 0.5rem 1rem;
    border-radius: 8px;
    transition: all 0.3s ease;
    position: relative;
}

.hardware-page-body #main-header .nav-links a:hover {
    color: var(--hw-accent);
    background: var(--hw-glass-bg);
    transform: translateY(-2px);
}

.hardware-page-body #main-header .nav-links a::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 50%;
    width: 0;
    height: 2px;
    background: var(--hw-accent);
    transition: all 0.3s ease;
    transform: translateX(-50%);
}

.hardware-page-body #main-header .nav-links a:hover::after {
    width: 80%;
}

/* Mobile menu button for hardware page */
.hardware-page-body .mobile-menu-btn {
    display: none;
    flex-direction: column;
    background: rgba(200, 100, 255, 0.2) !important; /* Add stronger background for visibility */
    border: 1px solid var(--hw-accent) !important;
    cursor: pointer;
    padding: 0.8rem !important;
    border-radius: 6px !important;
    transition: all 0.3s ease;
    position: relative !important;
    z-index: 1000 !important;
    gap: 3px !important; /* Ensure proper spacing between lines */
}

/* Additional fallback to ensure lines are always visible */
.hardware-page-body .mobile-menu-btn span,
.hardware-page-body .mobile-menu-btn span::before,
.hardware-page-body .mobile-menu-btn span::after {
    background: #ffffff !important;
    background-color: #ffffff !important;
    color: #ffffff !important;
}

/* Ultra-specific selectors to override base styles */
body.hardware-page-body .mobile-menu-btn span {
    background: #ffffff !important;
    background-color: #ffffff !important;
}

body.hardware-page-body #main-header .mobile-menu-btn span {
    background: #ffffff !important;
    background-color: #ffffff !important;
}

html body.hardware-page-body .mobile-menu-btn span {
    background: #ffffff !important;
    background-color: #ffffff !important;
}

/* Nuclear option - force white with all possible selectors */
.hardware-page-body .mobile-menu-btn span[style] {
    background: #ffffff !important;
    background-color: #ffffff !important;
}

.hardware-page-body nav .mobile-menu-btn span {
    background: #ffffff !important;
    background-color: #ffffff !important;
}

.hardware-page-body header .mobile-menu-btn span {
    background: #ffffff !important;
    background-color: #ffffff !important;
}

.hardware-page-body #main-header nav .mobile-menu-btn span {
    background: #ffffff !important;
    background-color: #ffffff !important;
}

/* Make sure spans are block and visible */
.hardware-page-body .mobile-menu-btn span {
    display: block !important;
    visibility: visible !important;
    opacity: 1 !important;
    content: "" !important;
    background-image: none !important;
    border: 1px solid #ffffff !important; /* Add border as backup */
}

.hardware-page-body .mobile-menu-btn:hover {
    background: rgba(200, 100, 255, 0.4) !important;
    border-color: var(--hw-accent) !important;
    box-shadow: var(--hw-glow) !important;
}

.hardware-page-body .mobile-menu-btn span {
    width: 25px !important;
    height: 3px !important;
    background: #ffffff !important; /* Force white color with !important */
    background-color: #ffffff !important; /* Double ensure with background-color */
    margin: 3px 0 !important;
    transition: all 0.3s ease !important;
    border-radius: 2px !important;
    opacity: 1 !important; /* Ensure visibility */
    display: block !important;
    box-shadow: 0 0 8px rgba(255, 255, 255, 0.8) !important; /* Add stronger glow for visibility */
    position: relative !important;
    z-index: 100 !important;
}

.hardware-page-body .mobile-menu-btn:hover span {
    background: #c864ff !important; /* Use direct hex value for accent color */
    background-color: #c864ff !important;
    box-shadow: 0 0 10px #c864ff !important; /* Add purple glow on hover */
}

/* Even more specific hover states */
body.hardware-page-body .mobile-menu-btn:hover span {
    background: #c864ff !important;
    background-color: #c864ff !important;
}

body.hardware-page-body #main-header .mobile-menu-btn:hover span {
    background: #c864ff !important;
    background-color: #c864ff !important;
}

.hardware-page-body .mobile-menu-btn.active span:nth-child(1) {
    transform: rotate(45deg) translate(6px, 6px);
}

.hardware-page-body .mobile-menu-btn.active span:nth-child(2) {
    opacity: 0;
}

.hardware-page-body .mobile-menu-btn.active span:nth-child(3) {
    transform: rotate(-45deg) translate(6px, -6px);
}

/* Mobile sidebar for hardware page */
.hardware-page-body .mobile-sidebar {
    position: fixed;
    top: 0;
    right: -100%;
    width: 300px;
    height: 100vh;
    background: linear-gradient(135deg, rgba(26, 10, 46, 0.95) 0%, rgba(26, 10, 46, 0.98) 100%);
    backdrop-filter: blur(20px);
    border-left: 1px solid var(--hw-glass-border);
    z-index: 1000;
    transition: right 0.3s ease;
    overflow-y: auto;
}

.hardware-page-body .mobile-sidebar.active {
    right: 0;
}

.hardware-page-body .sidebar-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1.5rem;
    border-bottom: 1px solid var(--hw-glass-border);
}

.hardware-page-body .sidebar-logo {
    height: 40px;
    /* filter: brightness(0) invert(1); Makes the logo white for hardware page */
}

.hardware-page-body .sidebar-close {
    background: none;
    border: none;
    color: var(--hw-accent);
    font-size: 2rem;
    cursor: pointer;
    padding: 0.5rem;
    border-radius: 50%;
    transition: all 0.3s ease;
    line-height: 1;
}

.hardware-page-body .sidebar-close:hover {
    background: var(--hw-glass-bg);
    transform: rotate(90deg);
}

.hardware-page-body .sidebar-nav {
    display: flex;
    flex-direction: column;
    padding: 1rem 0;
}

.hardware-page-body .sidebar-link {
    color: var(--hw-text-light);
    text-decoration: none;
    padding: 1rem 1.5rem;
    font-weight: 500;
    transition: all 0.3s ease;
    border-left: 3px solid transparent;
}

.hardware-page-body .sidebar-link:hover {
    color: var(--hw-accent);
    background: var(--hw-glass-bg);
    border-left-color: var(--hw-accent);
    transform: translateX(5px);
}

.hardware-page-body .sidebar-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100vh;
    background: rgba(0, 0, 0, 0.5);
    z-index: 999;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
}

.hardware-page-body .sidebar-overlay.active {
    opacity: 1;
    visibility: visible;
}

/* Responsive design for hardware navbar */
@media (max-width: 768px) {
    .hardware-page-body #main-header .nav-links {
        display: none !important;
    }
    
    .hardware-page-body .mobile-menu-btn {
        display: flex !important;
        justify-content: center !important;
        align-items: center !important;
        min-width: 44px !important;
        min-height: 44px !important;
    }
    
    .hardware-page-body #main-header nav {
        padding: 1rem;
    }
    
    .hardware-page-body #main-header .logo {
        font-size: 1.2rem;
    }
}

@media (max-width: 480px) {
    .hardware-page-body .mobile-sidebar {
        width: 280px;
    }
    
    .hardware-page-body #main-header nav {
        padding: 0.8rem;
    }
    
    .hardware-page-body .mobile-menu-btn {
        padding: 0.6rem !important;
    }
    
    .hardware-page-body .mobile-menu-btn span {
        width: 22px !important;
        height: 2.5px !important;
    }
}
