/* MASTAN2 Mobile-Optimized CSS */

/* Reset and Base Styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background-color: #000000;
    color: #ffffff;
    line-height: 1.6;
    overflow-x: hidden;
    font-size: 16px; /* Prevent zoom on iOS */
}

/* Color Variables */
:root {
    --primary-green: #8BC34A;
    --dark-bg: #2a2a2a;
    --darker-bg: #1a1a1a;
    --content-bg: rgba(60, 60, 60, 0.9);
    --text-light: #ffffff;
    --text-gray: #cccccc;
    --accent-red: #F44336;
    --header-height: 70px;
}

/* Mobile Header */
.header {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    height: var(--header-height);
    background: var(--dark-bg);
    z-index: 1000;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 15px;
    border-bottom: 2px solid var(--primary-green);
}

.logo {
    height: 40px;
    width: auto;
}

.header img:not(.logo) {
    display: none; /* Hide diagram on mobile */
}

.announcement {
    display: none; /* Hide announcement on mobile to save space */
}

/* Mobile Navigation Toggle */
.nav-toggle {
    display: block;
    background: none;
    border: none;
    color: white;
    font-size: 24px;
    cursor: pointer;
    padding: 5px;
}

.nav-toggle:focus {
    outline: 2px solid var(--primary-green);
}

/* Mobile Sidebar */
.sidebar {
    position: fixed;
    top: var(--header-height);
    left: -100%;
    width: 280px;
    height: calc(100vh - var(--header-height));
    background: var(--darker-bg);
    z-index: 999;
    transition: left 0.3s ease;
    overflow-y: auto;
    border-right: 3px solid var(--primary-green);
}

.sidebar.open {
    left: 0;
}

.sidebar-overlay {
    position: fixed;
    top: var(--header-height);
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.5);
    z-index: 998;
    display: none;
}

.sidebar-overlay.show {
    display: block;
}

.nav-menu {
    list-style: none;
    padding: 0;
    margin: 0;
}

.nav-item {
    border-bottom: 1px solid #333;
}

.nav-link {
    display: block;
    padding: 15px 20px;
    color: #ffffff;
    text-decoration: none;
    transition: all 0.3s ease;
    font-size: 16px;
    background-color: transparent;
}

.nav-link:hover,
.nav-link.active {
    background: var(--primary-green);
    color: white;
}

/* Main Content */
.main-content {
    margin-top: var(--header-height);
    padding: 20px 15px;
    min-height: calc(100vh - var(--header-height));
}

.content-section {
    background: var(--content-bg);
    border-radius: 8px;
    padding: 20px;
    margin-bottom: 20px;
    backdrop-filter: blur(10px);
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.3);
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.section-title {
    color: var(--primary-green);
    font-size: 22px;
    margin-bottom: 15px;
    position: relative;
    padding-bottom: 8px;
}

.section-title::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 40px;
    height: 2px;
    background: var(--primary-green);
    border-radius: 1px;
}

/* Overview Layout - Mobile Optimized */
.overview-container {
    margin-bottom: 30px;
}

.overview-container .process-card.overview {
    background: rgba(40, 40, 40, 0.8);
    border-radius: 8px;
    padding: 20px;
    border: 1px solid rgba(139, 195, 74, 0.3);
}

.overview-content {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.overview-content p {
    margin: 0;
    font-size: 16px;
    line-height: 1.6;
}

.overview-summary {
    background: var(--primary-green);
    padding: 15px;
    border-radius: 6px;
    margin-top: 15px;
}

.summary-item {
    color: white;
    font-size: 16px;
    font-weight: bold;
    margin-bottom: 8px;
}

.summary-item:last-child {
    margin-bottom: 0;
}

/* Process Flow - Mobile Stack */
.process-flow {
    display: flex;
    flex-direction: column;
    gap: 20px;
    margin-top: 30px;
}

.process-card {
    background: rgba(40, 40, 40, 0.8);
    border-radius: 8px;
    padding: 20px;
    border: 1px solid rgba(139, 195, 74, 0.3);
    transition: all 0.3s ease;
}

.process-card:hover {
    border-color: var(--primary-green);
    box-shadow: 0 4px 16px rgba(139, 195, 74, 0.2);
}

.process-title {
    color: #ffffff;
    font-size: 20px;
    margin-bottom: 12px;
    font-weight: bold;
    position: relative;
    padding-bottom: 8px;
}

/* Add underline to process titles to match section headings */
.process-card .process-title::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 40px;
    height: 2px;
    background: var(--primary-green);
    border-radius: 1px;
}

/* Mobile-specific components */
.three-columns {
    display: flex;
    flex-direction: column;
    gap: 15px;
    margin-top: 20px;
}

.column-card {
    background: rgba(40, 40, 40, 0.8);
    border-radius: 8px;
    padding: 20px;
    border: 1px solid rgba(139, 195, 74, 0.3);
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.column-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: var(--primary-green);
}

.column-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(139, 195, 74, 0.2);
    border-color: var(--primary-green);
}

.column-title {
    color: #ffffff;
    font-size: 18px;
    margin-bottom: 12px;
    font-weight: bold;
}

/* Screenshots Gallery - Mobile Grid */
.screenshots-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
    gap: 15px;
    margin-top: 15px;
}

.screenshot-item {
    background: rgba(40, 40, 40, 0.8);
    border-radius: 6px;
    overflow: hidden;
    transition: transform 0.3s ease;
    border: 2px solid transparent;
    cursor: pointer;
}

.screenshot-item:hover {
    transform: scale(1.02);
    border-color: var(--primary-green);
}

.screenshot-item img {
    width: 100%;
    height: auto;
    display: block;
}

/* FAQ Styles */
.faq-item {
    margin-bottom: 20px;
    background: rgba(40, 40, 40, 0.6);
    border-radius: 6px;
    padding: 15px;
    border-left: 3px solid var(--primary-green);
}

.faq-question {
    color: var(--primary-green);
    font-weight: bold;
    margin-bottom: 8px;
    font-size: 16px;
}

.faq-answer {
    color: var(--text-gray);
    line-height: 1.6;
    font-size: 15px;
}

/* Learning Modules */
.module-item {
    background: rgba(40, 40, 40, 0.8);
    border-radius: 8px;
    padding: 20px;
    margin-bottom: 20px;
    border: 1px solid rgba(139, 195, 74, 0.3);
    transition: all 0.3s ease;
}

.module-item:hover {
    border-color: var(--primary-green);
    box-shadow: 0 4px 16px rgba(139, 195, 74, 0.15);
}

.module-title {
    color: var(--primary-green);
    font-size: 18px;
    font-weight: bold;
    margin-bottom: 12px;
}

.module-links {
    margin-top: 12px;
}

.module-link {
    display: inline-block;
    background: linear-gradient(to bottom, #666666 0%, #444444 50%, #000000 100%);
    color: #fff;
    padding: 10px 16px;
    border-radius: 6px;
    text-decoration: none;
    margin-right: 8px;
    margin-bottom: 8px;
    font-size: 14px;
    transition: all 0.3s ease;
    min-height: 44px; /* Touch target */
    display: inline-flex;
    align-items: center;
}

.module-link:hover {
    background: linear-gradient(to bottom, #777777 0%, #555555 50%, #222222 100%);
    transform: translateY(-1px);
}

/* Download Section */
.download-versions {
    display: flex;
    flex-direction: column;
    gap: 20px;
    margin-top: 20px;
}

.version-card {
    background: rgba(40, 40, 40, 0.8);
    border-radius: 8px;
    padding: 20px;
    border: 2px solid rgba(139, 195, 74, 0.3);
    text-align: center;
}

.version-title {
    color: var(--primary-green);
    font-size: 20px;
    font-weight: bold;
    margin-bottom: 12px;
}

.download-btn {
    display: inline-block;
    background: linear-gradient(to bottom, #666666 0%, #444444 50%, #000000 100%);
    color: #fff;
    padding: 12px 20px;
    border-radius: 6px;
    text-decoration: none;
    margin: 8px;
    font-weight: bold;
    transition: all 0.3s ease;
    min-height: 44px; /* Touch target */
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.download-buttons {
    display: flex;
    flex-direction: column;
    gap: 10px;
    margin-top: 15px;
}

.download-buttons .download-btn {
    margin: 0;
    text-align: center;
}

.download-btn:hover {
    background: linear-gradient(to bottom, #777777 0%, #555555 50%, #222222 100%);
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(102, 102, 102, 0.3);
}

/* Contact Form */
.contact-form {
    max-width: 100%;
}

.form-group {
    margin-bottom: 20px;
}

.form-label {
    display: block;
    color: var(--primary-green);
    margin-bottom: 8px;
    font-weight: bold;
    font-size: 16px;
}

.form-input,
.form-textarea {
    width: 100%;
    padding: 12px;
    border: 2px solid #444;
    border-radius: 6px;
    background: rgba(40, 40, 40, 0.8);
    color: white;
    font-size: 16px; /* Prevent zoom on iOS */
    transition: border-color 0.3s ease;
}

.form-input:focus,
.form-textarea:focus {
    outline: none;
    border-color: var(--primary-green);
}

.form-textarea {
    height: 120px;
    resize: vertical;
}

.submit-btn {
    background: linear-gradient(to bottom, #666666 0%, #444444 50%, #000000 100%);
    color: #fff;
    padding: 12px 24px;
    border: none;
    border-radius: 6px;
    font-size: 16px;
    font-weight: bold;
    cursor: pointer;
    transition: all 0.3s ease;
    min-height: 44px; /* Touch target */
    width: 100%;
}

.submit-btn:hover {
    background: linear-gradient(to bottom, #777777 0%, #555555 50%, #222222 100%);
    transform: translateY(-1px);
}

/* Footer */
.footer {
    text-align: center;
    padding: 20px 15px;
    color: var(--text-gray);
    font-size: 14px;
    border-top: 1px solid #444;
    margin-top: 30px;
}

/* Device switch styling: used in footer for switching between views */
.device-switch {
    margin-top: 8px;
    font-size: 14px;
    color: var(--text-gray);
    text-align: center;
}

.device-switch span {
    margin-right: 5px;
    font-weight: 600;
    color: var(--text-gray);
}

.device-switch a {
    color: var(--primary-green);
    text-decoration: none;
    margin: 0 4px;
    font-weight: 500;
}

.device-switch a:hover {
    text-decoration: underline;
}

/* Smooth Animations */
.nav-link,
.module-link, 
.download-btn,
.submit-btn,
.column-card,
.screenshot-item,
.module-item,
.version-card {
    transition: all 0.3s ease;
}

/* Touch optimizations */
@media (pointer: coarse) {
    .nav-link,
    .module-link,
    .download-btn,
    .submit-btn {
        min-height: 44px;
        padding: 12px;
    }
}

/* MSASect2 page styling for mobile */
.msasect-intro {
    margin-top: 25px;
}

.section-text {
    margin-bottom: 18px;
    line-height: 1.6;
    color: var(--text-gray);
}

.feature-list {
    margin-left: 18px;
    margin-bottom: 18px;
    list-style-type: disc;
    color: var(--text-light);
}

.feature-list li {
    margin-bottom: 6px;
}

.cta-button {
    display: inline-block;
    padding: 12px 20px;
    background: linear-gradient(to bottom, #666666 0%, #444444 50%, #000000 100%);
    border: 2px solid #666;
    border-radius: 8px;
    text-decoration: none;
    color: #ffffff;
    font-weight: bold;
    font-size: 14px;
    transition: all 0.3s ease;
}

.cta-button:hover {
    background: linear-gradient(to bottom, #777777 0%, #555555 50%, #111111 100%);
}

/* Very small screens */
@media (max-width: 320px) {
    .main-content {
        padding: 15px 10px;
    }
    
    .content-section {
        padding: 15px;
    }
    
    .section-title {
        font-size: 20px;
    }
    
    .process-title {
        font-size: 18px;
    }
}

