/* Base Styles */
:root {
    --primary-color: #1a1a1a;
    --secondary-color: #ffffff;
    --accent-color: #F98F30;
    --text-color: #4a5568;
    --card-bg-color: #f8f9fa;
    --border-color: #e2e8f0;
    --shadow-light: rgba(0, 0, 0, 0.1);
    --shadow-medium: rgba(0, 0, 0, 0.15);
    --shadow-heavy: rgba(0, 0, 0, 0.2);
    --border-radius: 8px;
    --transition: all 0.3s ease;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Space Grotesk', sans-serif;
    background-color: var(--secondary-color);
    color: var(--text-color);
    line-height: 1.6;
}

.container {
    max-width: 1280px;
    margin: 0 auto;
    padding: 0 20px;
}

a {
    text-decoration: none;
    color: inherit;
}

ul {
    list-style: none;
}

img {
    max-width: 100%;
    height: auto;
}

/* Header */
header {
    width: 100%;
    max-width: 100%;
    padding: 12px 20px;
    box-shadow: none;
    display: flex;
    justify-content: space-between;
    align-items: center;
    background-color: var(--secondary-color);
    position: sticky;
    top: 0;
    z-index: 200;
    border-bottom: 1px solid var(--border-color);
}

@media (min-width: 1024px) {
    header {
        padding: 20px 40px;
    }
}

.logo img {
    height: 32px;
    width: auto;
    display: block;
}

.btn-primary {
    background-color: var(--accent-color);
    color: var(--secondary-color);
    padding: 12px 24px;
    border-radius: var(--border-radius);
    font-weight: 600;
    transition: var(--transition);
    box-shadow: 0 4px 10px rgba(249, 143, 48, 0.3);
    border: none;
    cursor: pointer;
    font-family: 'Space Grotesk', sans-serif;
    font-size: 1rem;
    text-decoration: none;
    display: inline-block;
}

.btn-primary:hover {
    opacity: 0.95;
    transform: translateY(-2px);
    box-shadow: 0 6px 12px rgba(249, 143, 48, 0.4);
}

/* Language Switcher Dropdown */
.dropdown {
    position: relative;
    display: inline-block;
}

.dropdown .btn-primary {
    background: transparent;
    color: var(--primary-color);
    border: 1.5px solid var(--border-color);
    border-radius: 25px;
    padding: 10px 20px;
    font-size: 0.9rem;
    font-weight: 500;
    display: flex;
    align-items: center;
    gap: 8px;
    backdrop-filter: blur(10px);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.04);
    transition: all 0.3s ease;
}

.dropdown .btn-primary:hover {
    background: rgba(249, 143, 48, 0.05);
    border-color: var(--accent-color);
    color: var(--accent-color);
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(249, 143, 48, 0.15);
}

.dropdown .btn-primary .chevron-icon {
    width: 16px;
    height: 16px;
    transition: transform 0.3s ease;
}

.dropdown.active .btn-primary .chevron-icon {
    transform: rotate(180deg);
}

.dropdown-content {
    display: none;
    position: absolute;
    right: 0;
    background-color: var(--secondary-color);
    min-width: 180px;
    border-radius: 12px;
    box-shadow: 0 8px 25px var(--shadow-medium);
    z-index: 1000;
    border: 1px solid var(--border-color);
    overflow: hidden;
    backdrop-filter: blur(10px);
    margin-top: 8px;
    opacity: 0;
    transform: translateY(-10px);
    transition: all 0.3s ease;
}

.dropdown.active .dropdown-content {
    display: block;
    opacity: 1;
    transform: translateY(0);
}

.dropdown-content a {
    color: var(--text-color);
    padding: 12px 16px;
    text-decoration: none;
    display: block;
    transition: all 0.2s ease;
    border-bottom: 1px solid var(--border-color);
    font-size: 0.9rem;
}

.dropdown-content a:last-child {
    border-bottom: none;
}

.dropdown-content a:hover {
    background-color: rgba(249, 143, 48, 0.1);
    color: var(--accent-color);
}

/* Hero Section */
.hero {
    background: linear-gradient(135deg, rgba(0, 0, 0, 0.7), rgba(26, 26, 26, 0.6)), url('images/tabox-bg.jpg');
    background-size: 100% auto;
    background-position: center top;
    background-attachment: fixed;
    background-repeat: no-repeat;
    height: 500px;
    border-radius: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    margin: 40px 0 80px 0;
    position: relative;
    overflow: hidden;
    border: none;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.15), 0 8px 16px rgba(0, 0, 0, 0.1);
}

.hero::before {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(135deg, rgba(249, 143, 48, 0.1), rgba(255, 149, 0, 0.05));
    opacity: 0;
    transition: opacity 0.3s ease;
}

.hero:hover::before {
    opacity: 1;
}

.hero-content {
    position: relative;
    z-index: 2;
    max-width: 900px;
    padding: 0 30px;
    animation: heroFadeIn 1s ease-out;
}

@keyframes heroFadeIn {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.hero h1 {
    font-size: 3.2rem;
    font-weight: 800;
    color: #ffffff;
    margin-bottom: 24px;
    line-height: 1.1;
    text-shadow: 0 4px 12px rgba(0, 0, 0, 0.5);
    letter-spacing: -0.02em;
}

.hero h2 {
    font-size: 2.8rem;
    font-weight: 800;
    color: #ffffff;
    margin-bottom: 24px;
    line-height: 1.1;
    text-shadow: 0 4px 12px rgba(0, 0, 0, 0.5);
    letter-spacing: -0.02em;
}

.hero p {
    font-size: 1.3rem;
    color: rgba(255, 255, 255, 0.95);
    margin-bottom: 40px;
    line-height: 1.6;
    text-shadow: 0 2px 8px rgba(0, 0, 0, 0.4);
    max-width: 700px;
    margin-left: auto;
    margin-right: auto;
    margin-bottom: 40px;
}

.hero .btn-primary {
    background: linear-gradient(135deg, var(--accent-color), #ff9500);
    color: #ffffff;
    padding: 16px 40px;
    font-size: 1.1rem;
    font-weight: 600;
    border-radius: 50px;
    border: none;
    box-shadow: 0 8px 25px rgba(249, 143, 48, 0.4), 0 4px 12px rgba(0, 0, 0, 0.2);
    transition: all 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    position: relative;
    overflow: hidden;
}

.hero .btn-primary::before {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(135deg, #ff9500, var(--accent-color));
    opacity: 0;
    transition: opacity 0.3s ease;
}

.hero .btn-primary:hover {
    transform: translateY(-4px) scale(1.05);
    box-shadow: 0 15px 35px rgba(249, 143, 48, 0.5), 0 8px 20px rgba(0, 0, 0, 0.3);
}

.hero .btn-primary:hover::before {
    opacity: 1;
}

.hero .btn-primary span {
    position: relative;
    z-index: 1;
}

/* Language Selection */
.language-selection {
    text-align: center;
    padding: 50px 0;
    background: #fafbfc;
}

.language-selection h2 {
    font-size: 2rem;
    color: var(--primary-color);
    margin-bottom: 16px;
    font-weight: 600;
}

.language-selection > p {
    max-width: 600px;
    margin: 0 auto 40px;
    color: var(--text-color);
    font-size: 1rem;
    line-height: 1.5;
}

.language-grid {
    display: grid;
    grid-template-columns: repeat(6, 1fr);
    gap: 16px;
    margin-top: 20px;
    max-width: 1000px;
    margin-left: auto;
    margin-right: auto;
    padding: 0 20px;
}

.language-card {
    background: #ffffff;
    border-radius: 12px;
    padding: 20px 16px;
    transition: all 0.2s ease;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
    border: 1px solid #e2e8f0;
    text-decoration: none;
    color: inherit;
    min-height: 120px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    cursor: pointer;
}

.language-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.12);
    border-color: var(--accent-color);
}

.language-flag {
    font-size: 2rem;
    margin-bottom: 8px;
    transition: transform 0.2s ease;
}

.language-card:hover .language-flag {
    transform: scale(1.1);
}

.language-card h3 {
    font-size: 0.9rem;
    color: var(--primary-color);
    margin-bottom: 8px;
    font-weight: 500;
    line-height: 1.2;
}

.language-card p {
    font-size: 0.7rem;
    color: var(--text-color);
    line-height: 1.4;
    opacity: 0.7;
    text-align: center;
}

.language-card:hover h3 {
    color: var(--accent-color);
}

.language-card:hover p {
    opacity: 0.9;
}

/* Responsive design */
@media (max-width: 1200px) {
    .language-grid {
        grid-template-columns: repeat(3, 1fr);
        gap: 14px;
        max-width: 600px;
    }
}

@media (max-width: 768px) {
    .language-selection {
        padding: 40px 0;
    }
    
    .language-selection h2 {
        font-size: 1.7rem;
        margin-bottom: 12px;
    }
    
    .language-selection > p {
        font-size: 0.95rem;
        margin-bottom: 30px;
    }
    
    .language-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 12px;
        padding: 0 15px;
    }
    
    .language-card {
        padding: 16px 12px;
        min-height: 100px;
    }
    
    .language-flag {
        font-size: 1.8rem;
        margin-bottom: 6px;
    }
    
    .language-card h3 {
        font-size: 0.85rem;
        margin-bottom: 6px;
    }
    
    .language-card p {
        font-size: 0.65rem;
    }
}

@media (max-width: 480px) {
    .language-selection {
        padding: 30px 0;
    }
    
    .language-selection h2 {
        font-size: 1.5rem;
    }
    
    .language-selection > p {
        font-size: 0.9rem;
        margin-bottom: 25px;
    }
    
    .language-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 10px;
        padding: 0 10px;
    }
    
    .language-card {
        padding: 14px 10px;
        min-height: 90px;
    }
    
    .language-flag {
        font-size: 1.6rem;
    }

    .breadcrumb {
        padding: 0px 12px;
    }

    header {
        padding: 16px 24px;
    }
}

/* Features */
.features-preview {
    padding: 80px 0;
    text-align: center;
    background: linear-gradient(135deg, #fafbfc 0%, #f1f3f4 100%);
}

.features-preview h2 {
    font-size: 2.2rem;
    color: var(--primary-color);
    margin-bottom: 20px;
    font-weight: 700;
}

.features-preview > p {
    font-size: 1.1rem;
    color: var(--text-color);
    max-width: 600px;
    margin: 0 auto 60px;
    line-height: 1.6;
}

.features {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 30px;
    margin-top: 40px;
    max-width: 1100px;
    margin-left: auto;
    margin-right: auto;
}

@media (max-width: 1200px) {
    .features {
        grid-template-columns: repeat(2, 1fr);
        gap: 25px;
    }
}

@media (max-width: 768px) {
    .features {
        grid-template-columns: 1fr;
        gap: 20px;
    }
}

@media (max-width: 480px) {
    .features {
        grid-template-columns: 1fr;
        gap: 20px;
    }
}

.feature-card {
    background-color: var(--secondary-color);
    border-radius: 20px;
    padding: 40px 30px;
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.08), 0 3px 10px rgba(0, 0, 0, 0.04);
    border: 1px solid rgba(226, 232, 240, 0.8);
    position: relative;
    overflow: hidden;
    cursor: pointer;
}

.feature-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: linear-gradient(90deg, var(--accent-color), #ff9500);
    opacity: 0;
    transition: opacity 0.3s ease;
}

.feature-card:hover {
    transform: translateY(-12px);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.12), 0 8px 16px rgba(0, 0, 0, 0.06);
    border-color: rgba(249, 143, 48, 0.3);
}

.feature-card:hover::before {
    opacity: 1;
}

.feature-icon {
    width: 80px;
    height: 80px;
    margin: 0 auto 25px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, rgba(249, 143, 48, 0.1), rgba(249, 143, 48, 0.05));
    border-radius: 20px;
    padding: 20px;
    box-shadow: 0 6px 20px rgba(249, 143, 48, 0.15);
    transition: all 0.4s ease;
    position: relative;
}

.feature-icon::before {
    content: '';
    position: absolute;
    inset: 0;
    border-radius: 20px;
    background: linear-gradient(135deg, var(--accent-color), #ff9500);
    opacity: 0;
    transition: opacity 0.3s ease;
}

.feature-card:hover .feature-icon {
    transform: scale(1.1) rotate(5deg);
    background: linear-gradient(135deg, rgba(249, 143, 48, 0.2), rgba(249, 143, 48, 0.1));
    box-shadow: 0 10px 30px rgba(249, 143, 48, 0.25);
}

.feature-card:hover .feature-icon::before {
    opacity: 0.1;
}

.feature-icon img {
    width: 32px;
    height: 32px;
    filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.1));
    transition: all 0.3s ease;
    position: relative;
    z-index: 2;
}

.feature-card:hover .feature-icon img {
    transform: scale(1.1);
    filter: drop-shadow(0 4px 8px rgba(0, 0, 0, 0.15));
}

.feature-card h3 {
    font-size: 1.3rem;
    color: var(--primary-color);
    margin-bottom: 15px;
    font-weight: 600;
    line-height: 1.3;
}

.feature-card p {
    font-size: 0.95rem;
    color: var(--text-color);
    line-height: 1.7;
    opacity: 0.9;
}

.feature-card:hover h3 {
    color: var(--accent-color);
}

.feature-card:hover p {
    opacity: 1;
}

/* Enhanced responsive design */
@media (max-width: 768px) {
    .features-preview {
        padding: 60px 0;
    }
    
    .features-preview h2 {
        font-size: 1.9rem;
    }
    
    .feature-card {
        padding: 35px 25px;
    }
    
    .feature-icon {
        width: 70px;
        height: 70px;
        margin-bottom: 20px;
    }
    
    .feature-icon img {
        width: 28px;
        height: 28px;
    }
}

@media (max-width: 480px) {
    .features-preview {
        padding: 50px 0;
    }
    
    .features-preview h2 {
        font-size: 1.7rem;
    }
    
    .features-preview > p {
        font-size: 1rem;
        margin-bottom: 40px;
    }
    
    .feature-card {
        padding: 30px 20px;
    }
}

/* Instruction Page Styles */
.instruction-page {
    max-width: 900px;
    margin: 0 auto;
    padding: 40px 20px;
}

.instruction-banner {
    background: linear-gradient(rgba(255, 255, 255, 0.9), rgba(248, 249, 250, 0.95)), url('images/tabox-bg.jpg');
    background-size: cover;
    background-position: center;
    height: 250px;
    border-radius: var(--border-radius);
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    margin: 0 0 40px 0;
    position: relative;
    overflow: hidden;
    border: 1px solid var(--border-color);
}

.instruction-banner .hero-content h1 {
    font-size: 2rem;
    margin-bottom: 10px;
}

.breadcrumb {
    margin-bottom: 30px;
    color: var(--text-color);
    font-size: 0.9rem;
    padding: 12px 0;
    border-bottom: 1px solid var(--border-color);
}

.breadcrumb a {
    color: var(--accent-color);
    text-decoration: none;
    transition: color 0.2s ease;
}

.breadcrumb a:hover {
    color: var(--primary-color);
    text-decoration: underline;
}

.breadcrumb-separator {
    margin: 0 8px;
    color: var(--text-color);
    opacity: 0.5;
}

.instruction-content {
    background-color: var(--secondary-color);
    border-radius: 16px;
    padding: 40px;
    margin-bottom: 30px;
    border: 1px solid var(--border-color);
    box-shadow: 0 4px 6px var(--shadow-light);
}

.instruction-content h2 {
    color: var(--primary-color);
    font-size: 1.5rem;
    margin-bottom: 20px;
    border-bottom: 2px solid var(--accent-color);
    padding-bottom: 10px;
}

.instruction-content h3 {
    color: var(--primary-color);
    font-size: 1.2rem;
    margin: 25px 0 15px 0;
}

.instruction-content p {
    margin-bottom: 15px;
    line-height: 1.7;
}

.instruction-content ul {
    margin: 15px 0;
    padding-left: 20px;
}

.instruction-content li {
    margin-bottom: 8px;
    position: relative;
    list-style: decimal;
}

.screenshot-placeholder {
    background-color: rgba(249, 143, 48, 0.05);
    border: 2px dashed var(--accent-color);
    border-radius: var(--border-radius);
    padding: 40px;
    text-align: center;
    margin: 25px 0;
    color: var(--text-color);
}

.screenshot {
    text-align: center;
    margin: 25px 0;
}

.screenshot img {
    max-width: 100%;
    height: auto;
    border-radius: var(--border-radius);
    box-shadow: 0 10px 20px var(--shadow-medium);
    border: 1px solid var(--border-color);
}

.main-menu-items {
    background-color: var(--card-bg-color);
    border-radius: var(--border-radius);
    padding: 20px;
    margin: 20px 0;
    border: 1px solid var(--border-color);
}

.main-menu-items ul {
    list-style: none;
    padding: 0;
}

.main-menu-items li {
    padding: 8px 0;
    border-bottom: 1px solid var(--border-color);
    list-style: none;
}

.main-menu-items li:last-child {
    border-bottom: none;
}

.main-menu-items strong {
    color: var(--accent-color);
}

/* Footer */
footer {
    padding: 40px 0;
    border-top: 1px solid var(--border-color);
    margin-top: 40px;
    background-color: var(--card-bg-color);
}

.footer-content {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 20px;
}

.footer-info {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 30px;
    margin-bottom: 20px;
}

.contact-info {
    display: flex;
    align-items: center;
    gap: 10px;
}

.contact-info a {
    display: flex;
    align-items: center;
    gap: 8px;
    color: var(--text-color);
    transition: var(--transition);
}

.contact-info a:hover {
    color: var(--primary-color);
}

.copyright {
    font-size: 0.9rem;
    color: #718096;
}

/* Responsive Styles */
@media (max-width: 1200px) {
    .hero {
        height: 450px;
        margin: 30px 0 60px 0;
    }
    
    .hero h1, .hero h2 {
        font-size: 2.8rem;
    }
    
    .hero p {
        font-size: 1.2rem;
    }
}

@media (max-width: 768px) {
    .hero {
        height: 400px;
        margin: 20px 0 50px 0;
        background-attachment: scroll;
        border-radius: 12px;
    }
    
    .hero-content {
        padding: 0 20px;
    }
    
    .hero h1, .hero h2 {
        font-size: 2.2rem;
        margin-bottom: 20px;
    }
    
    .hero p {
        font-size: 1.1rem;
        margin-bottom: 35px;
    }
    
    .hero .btn-primary {
        padding: 14px 32px;
        font-size: 1rem;
    }
    
    .language-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .instruction-content {
        padding: 25px;
    }
    
    .footer-content {
        flex-direction: column;
    }
    
    .footer-info {
        flex-direction: column;
        align-items: center;
        gap: 20px;
    }
}

@media (max-width: 480px) {
    header {
        flex-direction: column;
        gap: 20px;
    }
    
    .hero {
        height: 350px;
        margin: 15px 0 40px 0;
    }
    
    .instruction-banner {
        height: 300px;
    }
    
    .hero h1, .hero h2 {
        font-size: 1.5rem;
        margin-bottom: 16px;
    }
    
    .hero p {
        font-size: 1rem;
        margin-bottom: 30px;
    }
    
    .hero .btn-primary {
        padding: 12px 28px;
        font-size: 0.95rem;
    }
    
    .instruction-content {
        padding: 20px;
    }
    
    .language-grid {
        grid-template-columns: 1fr;
    }
}

/* RTL Support for Arabic */
.rtl {
    direction: rtl;
    text-align: right;
}

.rtl .breadcrumb {
    text-align: right;
}

.rtl .instruction-content ul {
    padding-right: 20px;
    padding-left: 0;
}

.rtl .dropdown-content {
    right: auto;
    left: 0;
}

/* Enhanced Mobile Experience */

/* Larger touch targets for mobile */
@media (max-width: 768px) {
    /* Header improvements */
    header {
        position: sticky;
        top: 0;
        background: rgba(255, 255, 255, 0.95);
        backdrop-filter: blur(10px);
        border-bottom: 1px solid var(--border-color);
        z-index: 100;
        padding: 15px 0;
    }
    
    .dropdown .btn-primary {
        padding: 12px 24px;
        font-size: 1rem;
        min-height: 44px; /* iOS recommended touch target */
    }
    
    /* Language card improvements */
    .language-selection {
        padding: 40px 0;
    }
    
    .language-grid {
        grid-template-columns: 1fr;
        gap: 16px;
        padding: 0 20px;
    }
    
    .language-card {
        padding: 24px 20px;
        min-height: 140px; /* Larger touch target */
        border-radius: 16px;
        box-shadow: 0 4px 16px rgba(0, 0, 0, 0.08);
    }
    
    .language-card:hover {
        transform: translateY(-4px);
        box-shadow: 0 8px 24px rgba(0, 0, 0, 0.12);
    }
    
    .language-flag {
        font-size: 2.5rem;
        margin-bottom: 12px;
    }
    
    .language-card h3 {
        font-size: 1.2rem;
        margin-bottom: 12px;
        font-weight: 600;
    }
    
    .language-card p {
        font-size: 0.9rem;
        line-height: 1.5;
        opacity: 0.8;
    }
    
    /* Hero improvements for mobile */
    .hero {
        height: 400px;
        margin: 0 0 40px 0;
        border-radius: 12px;
        background-attachment: scroll; /* Better performance on mobile */
    }
    
    .hero-content {
        padding: 0 20px;
    }
    
    .hero h1, .hero h2 {
        font-size: 2rem;
        margin-bottom: 16px;
        line-height: 1.2;
    }
    
    .hero p {
        font-size: 1.1rem;
        margin-bottom: 32px;
        line-height: 1.5;
    }
    
    .hero .btn-primary {
        padding: 16px 32px;
        font-size: 1rem;
        min-height: 48px;
    }
    
    /* Feature cards mobile optimization */
    .features {
        grid-template-columns: 1fr;
        gap: 20px;
    }
    
    .feature-card {
        padding: 32px 24px;
        min-height: auto;
    }
    
    .feature-card:hover {
        transform: translateY(-4px);
    }
    
    .feature-icon {
        width: 70px;
        height: 70px;
        margin-bottom: 20px;
    }
    
    .feature-icon img {
        width: 30px;
        height: 30px;
    }
    
    .feature-card h3 {
        font-size: 1.2rem;
        margin-bottom: 12px;
    }
    
    .feature-card p {
        font-size: 0.95rem;
        line-height: 1.6;
    }
}

/* Extra small mobile improvements */
@media (max-width: 480px) {
    .container {
        padding: 0 15px;
    }
    
    header {
        padding: 12px 0;
    }
    
    .language-grid {
        padding: 0 15px;
    }
    
    .language-card {
        padding: 20px 16px;
        min-height: 120px;
    }
    
    .hero {
        height: 350px;
        margin: 0 0 30px 0;
    }
    
    .hero h1, .hero h2 {
        font-size: 1.7rem;
    }
    
    .hero p {
        font-size: 1rem;
    }
    
    .hero .btn-primary {
        padding: 14px 28px;
        font-size: 0.95rem;
    }
}

/* Improved touch interactions */
@media (hover: none) and (pointer: coarse) {
    .language-card:hover {
        transform: none;
        box-shadow: 0 4px 16px rgba(0, 0, 0, 0.08);
    }
    
    .language-card:active {
        transform: scale(0.98);
        transition: transform 0.1s ease;
    }
    
    .feature-card:hover {
        transform: none;
    }
    
    .feature-card:active {
        transform: scale(0.98);
        transition: transform 0.1s ease;
    }
}

/* Enhanced Navigation & UX Flow */

/* Breadcrumb Navigation */
.breadcrumb {
    margin-bottom: 30px;
    color: var(--text-color);
    font-size: 0.9rem;
    padding: 12px 0;
    border-bottom: 1px solid var(--border-color);
}

.breadcrumb a {
    color: var(--accent-color);
    text-decoration: none;
    transition: color 0.2s ease;
}

.breadcrumb a:hover {
    color: var(--primary-color);
    text-decoration: underline;
}

.breadcrumb-separator {
    margin: 0 8px;
    color: var(--text-color);
    opacity: 0.5;
}

/* Progress Indicator */
.progress-indicator {
    position: sticky;
    top: 70px;
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    border-radius: 8px;
    padding: 16px;
    margin-bottom: 30px;
    border: 1px solid var(--border-color);
    z-index: 50;
}

.progress-bar {
    width: 100%;
    height: 6px;
    background-color: #e2e8f0;
    border-radius: 3px;
    overflow: hidden;
    margin-bottom: 8px;
}

.progress-fill {
    height: 100%;
    background: linear-gradient(90deg, var(--accent-color), #ff9500);
    border-radius: 3px;
    transition: width 0.3s ease;
    width: 0%;
}

.progress-text {
    font-size: 0.85rem;
    color: var(--text-color);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

/* Table of Contents */
.table-of-contents {
    background: var(--card-bg-color);
    border-radius: 12px;
    padding: 24px;
    margin-bottom: 40px;
    border: 1px solid var(--border-color);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.04);
}

.table-of-contents h3 {
    color: var(--primary-color);
    font-size: 1.1rem;
    margin-bottom: 16px;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 8px;
}

.table-of-contents ul {
    list-style: none;
    padding: 0;
    margin: 0;
}

.table-of-contents li {
    margin-bottom: 8px;
}

.table-of-contents a {
    color: var(--text-color);
    text-decoration: none;
    font-size: 0.9rem;
    padding: 8px 12px;
    border-radius: 6px;
    display: block;
    transition: all 0.2s ease;
    border-left: 3px solid transparent;
}

.table-of-contents a:hover {
    background: rgba(249, 143, 48, 0.1);
    color: var(--accent-color);
    border-left-color: var(--accent-color);
    transform: translateX(4px);
}

.table-of-contents a.active {
    background: rgba(249, 143, 48, 0.1);
    color: var(--accent-color);
    border-left-color: var(--accent-color);
    font-weight: 500;
}

/* Navigation Buttons */
.page-navigation {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin: 50px 0 30px;
    gap: 20px;
    padding: 20px 0;
    border-top: 1px solid var(--border-color);
}

.nav-button {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 12px 20px;
    border-radius: 8px;
    text-decoration: none;
    font-weight: 500;
    transition: all 0.2s ease;
    min-height: 44px;
    border: 1px solid var(--border-color);
    background: var(--secondary-color);
    color: var(--text-color);
}

.nav-button:hover {
    background: var(--accent-color);
    color: var(--secondary-color);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(249, 143, 48, 0.3);
}

.nav-button.prev {
    text-align: left;
}

.nav-button.next {
    text-align: right;
    margin-left: auto;
}

.nav-button.home {
    background: var(--accent-color);
    color: var(--secondary-color);
    border-color: var(--accent-color);
}

.nav-button.home:hover {
    background: #ff9500;
    border-color: #ff9500;
}

.nav-button-label {
    font-size: 0.8rem;
    opacity: 0.7;
    display: block;
}

.nav-button-title {
    font-size: 0.9rem;
    font-weight: 600;
}

/* Back to Top Button */
.back-to-top {
    position: fixed;
    bottom: 20px;
    right: 20px;
    width: 50px;
    height: 50px;
    background: var(--accent-color);
    color: var(--secondary-color);
    border: none;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    box-shadow: 0 4px 12px rgba(249, 143, 48, 0.4);
    transition: all 0.3s ease;
    opacity: 0;
    visibility: hidden;
    z-index: 1000;
}

.back-to-top.visible {
    opacity: 1;
    visibility: visible;
}

.back-to-top:hover {
    transform: translateY(-4px);
    box-shadow: 0 8px 20px rgba(249, 143, 48, 0.5);
    background: #ff9500;
}

.back-to-top svg {
    width: 20px;
    height: 20px;
}

/* Enhanced instruction page layout */
.instruction-page {
    max-width: 900px;
    margin: 0 auto;
    padding: 20px;
}

.instruction-banner {
    background: linear-gradient(135deg, rgba(0, 0, 0, 0.7), rgba(26, 26, 26, 0.6)), url('images/tabox-bg.jpg');
    background-size: cover;
    background-position: center;
    height: 200px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    margin: 0 0 30px 0;
    position: relative;
    overflow: hidden;
    border: none;
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.15);
}

.instruction-banner .hero-content h1 {
    font-size: 1.8rem;
    margin-bottom: 8px;
    color: #ffffff;
    text-shadow: 0 2px 8px rgba(0, 0, 0, 0.5);
}

.instruction-banner .hero-content p {
    color: rgba(255, 255, 255, 0.9);
    font-size: 1rem;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.4);
}

/* Mobile navigation improvements */
@media (max-width: 768px) {
    .progress-indicator {
        top: 60px;
        margin: 0 -10px 20px -10px;
        border-radius: 0;
        border-left: none;
        border-right: none;
    }
    
    .table-of-contents {
        margin: 0 -10px 30px -10px;
        border-radius: 0;
        border-left: none;
        border-right: none;
    }
    
    .page-navigation {
        flex-direction: column;
        gap: 12px;
        margin: 30px -10px 20px -10px;
    }
    
    .nav-button {
        width: 100%;
        justify-content: center;
        text-align: center;
    }
    
    .nav-button.next {
        margin-left: 0;
    }
    
    .back-to-top {
        bottom: 15px;
        right: 15px;
        width: 45px;
        height: 45px;
    }
    
    .instruction-page {
        padding: 0px;
    }
    
    .instruction-banner {
        height: 150px;
        margin: 0 -5px 20px -5px;
        border-radius: 8px;
    }
    
    .instruction-banner .hero-content h1 {
        font-size: 1.5rem;
    }
    
    .instruction-banner .hero-content p {
        font-size: 0.9rem;
    }
}

/* Header Progress Bar Override */
header .progress-indicator {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: transparent;
    padding: 0;
    margin: 0;
    border: none;
    border-radius: 0;
    backdrop-filter: none;
}

header .progress-bar {
    width: 100%;
    height: 100%;
    background-color: #e2e8f0;
    border-radius: 0;
    overflow: hidden;
}

header .progress-fill {
    height: 100%;
    background: var(--accent-color);
    transition: width 0.2s ease-out;
}

/* Hide legacy progress text when using header bar */
header .progress-text {
    display: none;
}

header .progress-indicator { display:none !important; } 