/**
 * MTech Simplified Theme - Consolidated & Optimized
 * Reduced from 5 files to 1 for better performance
 */

/* === CSS Variables === */
:root {
    /* Colors */
    --primary-color: #ff6b35;
    --primary-dark: #e55a2b;
    --primary-rgb: 255, 107, 53;
    --primary-dark-rgb: 229, 90, 43;
    
    /* Text */
    --text-primary: #e8e8e8;
    --text-secondary: #b0b0b0;
    
    /* Backgrounds */
    --bg-dark: #0a0a0a;
    --bg-glass: rgba(15, 15, 15, 0.8);
    --bg-modal: rgba(10, 10, 10, 0.95);
    
    /* Borders & Effects */
    --border-color: rgba(255, 107, 53, 0.15);
    --border-hover: rgba(255, 107, 53, 0.3);
    --glow-color: rgba(255, 107, 53, 0.4);
    
    /* Spacing */
    --spacing-sm: 0.5rem;
    --spacing-md: 1rem;
    --spacing-lg: 1.5rem;
    --spacing-xl: 2rem;
    
    /* Transitions */
    --transition: 0.3s ease;
    --transition-cubic: 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

/* Theme Variants */
:root.theme-orange {
    --primary-color: #ff6b35;
    --primary-dark: #e55a2b;
    --primary-rgb: 255, 107, 53;
    --primary-dark-rgb: 229, 90, 43;
}

:root.theme-green {
    --primary-color: #43a047;
    --primary-dark: #388e3c;
    --primary-rgb: 67, 160, 71;
    --primary-dark-rgb: 56, 142, 60;
}

:root.theme-blue {
    --primary-color: #2196f3;
    --primary-dark: #1976d2;
    --primary-rgb: 33, 150, 243;
    --primary-dark-rgb: 25, 118, 210;
}

:root.theme-purple {
    --primary-color: #9c27b0;
    --primary-dark: #7b1fa2;
    --primary-rgb: 156, 39, 176;
    --primary-dark-rgb: 123, 31, 162;
}

:root.theme-red {
    --primary-color: #f44336;
    --primary-dark: #d32f2f;
    --primary-rgb: 244, 67, 54;
    --primary-dark-rgb: 211, 47, 47;
}

:root.theme-teal {
    --primary-color: #009688;
    --primary-dark: #00796b;
    --primary-rgb: 0, 150, 136;
    --primary-dark-rgb: 0, 121, 107;
}

:root.theme-custom {
    /* Custom theme colors will be set dynamically via JavaScript */
}

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

html {
    scroll-behavior: smooth;
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    background: var(--bg-dark);
    color: var(--text-primary);
    line-height: 1.6;
    overflow-x: hidden;
}

/* === Background Effects === */
.mtech-bg-pattern {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: radial-gradient(circle at 25% 25%, rgba(var(--primary-rgb), 0.1) 0%, transparent 50%),
                radial-gradient(circle at 75% 75%, rgba(var(--primary-dark-rgb), 0.05) 0%, transparent 50%);
    z-index: -2;
}

.mtech-particles {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: -1;
    pointer-events: none;
}

.mtech-particle {
    position: absolute;
    width: 2px;
    height: 2px;
    background: rgba(var(--primary-rgb), 0.3);
    border-radius: 50%;
    animation: float 8s infinite linear;
}

@keyframes float {
    0% { transform: translateY(100vh) rotate(0deg); opacity: 0; }
    10% { opacity: 1; }
    90% { opacity: 1; }
    100% { transform: translateY(-100px) rotate(360deg); opacity: 0; }
}

/* === Layout === */
.mtech-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 var(--spacing-lg);
    width: 100%;
}

.mtech-section {
    padding: var(--spacing-xl) 0;
}

.mtech-grid {
    display: grid;
    gap: var(--spacing-lg);
    align-items: stretch;
}

.mtech-grid-2 {
    grid-template-columns: repeat(2, 1fr);
}

.mtech-grid-3 {
    grid-template-columns: repeat(3, 1fr);
}

/* Ensure cards in grids have equal height */
.mtech-grid .mtech-card {
    height: 100%;
    display: flex;
    flex-direction: column;
}

/* === Typography === */
.mtech-title-lg {
    font-size: clamp(2rem, 4vw, 2.5rem);
    font-weight: 700;
    margin-bottom: var(--spacing-md);
}

.mtech-text-center { text-align: center; }
.mtech-text-primary { color: var(--primary-color); }
.mtech-text-secondary { color: var(--text-secondary); }

.mtech-highlight {
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--primary-dark) 100%);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
}

/* === Spacing Utilities === */
.mtech-mb-md { margin-bottom: var(--spacing-md); }
.mtech-mb-lg { margin-bottom: var(--spacing-lg); }
.mtech-mb-xl { margin-bottom: var(--spacing-xl); }
.mtech-mt-xl { margin-top: var(--spacing-xl); }

/* === Buttons === */
.mtech-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: var(--spacing-sm);
    padding: 14px 28px;
    border: none;
    border-radius: 50px;
    font-size: 1rem;
    font-weight: 600;
    text-decoration: none;
    cursor: pointer;
    transition: all var(--transition-cubic);
    min-width: 120px;
}

.mtech-btn-primary {
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--primary-dark) 100%);
    color: #000;
    box-shadow: 0 8px 25px rgba(var(--primary-rgb), 0.3);
}

.mtech-btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 12px 35px rgba(var(--primary-rgb), 0.4);
}

.mtech-btn-secondary {
    background: rgba(var(--primary-rgb), 0.1);
    color: var(--text-primary);
    border: 1px solid var(--border-color);
}

.mtech-btn-secondary:hover {
    background: rgba(var(--primary-rgb), 0.2);
    border-color: var(--border-hover);
    transform: translateY(-1px);
}

.mtech-btn-container {
    display: flex;
    gap: var(--spacing-md);
    flex-wrap: wrap;
    margin-top: var(--spacing-md);
    justify-content: center;
}

/* Button variants for different contexts */
.view-details-btn {
    background: linear-gradient(135deg, var(--primary-color), var(--primary-dark));
    color: #000;
    border: none;
    cursor: pointer;
}

.view-details-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(var(--primary-rgb), 0.4);
}

/* === Cards === */
.mtech-card {
    display: flex;
    flex-direction: column;
    padding: var(--spacing-xl);
    border-radius: 16px;
    transition: all var(--transition-cubic);
    height: 100%;
}

.mtech-card-glass {
    background: var(--bg-glass);
    border: 1px solid var(--border-color);
    backdrop-filter: blur(12px);
}

.mtech-card-hover:hover {
    transform: translateY(-5px);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.3);
    border-color: var(--border-hover);
}

.mtech-card-title {
    font-size: 1.25rem;
    font-weight: 700;
    margin-bottom: var(--spacing-sm);
    color: var(--text-primary);
}

.mtech-card-content {
    color: var(--text-secondary);
    line-height: 1.7;
}

/* === Navigation === */
.mtech-navbar-theme {
    background: rgba(255, 255, 255, 0.05);
    backdrop-filter: blur(20px);
    border: 1px solid var(--border-color);
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
}

.mtech-gradient-primary {
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--primary-dark) 100%);
}

.mtech-gradient-primary-text {
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--primary-dark) 100%);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
}

.mtech-shadow-primary {
    box-shadow: 0 2px 10px rgba(var(--primary-rgb), 0.3);
}

.mtech-bg-primary-alpha08 { background: rgba(var(--primary-rgb), 0.08); }
.mtech-bg-primary-alpha01 { background: rgba(var(--primary-rgb), 0.1); }
.mtech-border-primary { border-color: var(--border-color); }
.mtech-border-primary-01 { border-color: rgba(var(--primary-rgb), 0.1); }

/* === Hero Section === */
.mtech-hero-header {
    position: relative;
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    padding: 120px 0 100px;
    margin-bottom: 60px;
    background: linear-gradient(135deg, rgba(var(--primary-rgb), 0.08) 0%, rgba(var(--primary-dark-rgb), 0.03) 50%, transparent 100%);
}

.mtech-hero-content {
    max-width: 800px;
    margin: 0 auto;
}

.mtech-hero-title {
    font-size: clamp(3rem, 8vw, 5rem);
    font-weight: 900;
    margin-bottom: var(--spacing-lg);
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--primary-dark) 100%);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
}

.mtech-hero-subtitle {
    font-size: 1.2rem;
    color: var(--primary-color);
    margin-bottom: var(--spacing-md);
    text-transform: uppercase;
    letter-spacing: 2px;
}

.mtech-hero-description {
    font-size: 1.2rem;
    color: var(--text-secondary);
    margin-bottom: var(--spacing-xl);
    line-height: 1.6;
}

.mtech-hero-stats {
    display: flex;
    justify-content: center;
    gap: var(--spacing-lg);
    margin-top: var(--spacing-xl);
    flex-wrap: wrap;
}

.mtech-hero-stat {
    text-align: center;
    background: rgba(var(--primary-rgb), 0.08);
    border: 1px solid var(--border-color);
    border-radius: 16px;
    padding: var(--spacing-lg);
    min-width: 140px;
    backdrop-filter: blur(12px);
    transition: all var(--transition-cubic);
}

.mtech-hero-stat:hover {
    transform: translateY(-3px);
    background: rgba(var(--primary-rgb), 0.12);
    border-color: var(--border-hover);
    box-shadow: 0 8px 25px rgba(var(--primary-rgb), 0.15);
}

.mtech-hero-stat-number {
    display: block;
    font-size: 2rem;
    font-weight: 700;
    color: var(--primary-color);
    margin-bottom: var(--spacing-sm);
    background: linear-gradient(135deg, var(--primary-color), var(--primary-dark));
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
}

.mtech-hero-stat-label {
    font-size: 0.85rem;
    color: var(--text-secondary);
    text-transform: uppercase;
    letter-spacing: 1px;
    font-weight: 600;
}

/* === Floating Elements === */
.mtech-hero-floating {
    position: absolute;
    width: 100px;
    height: 100px;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(var(--primary-rgb), 0.1) 0%, transparent 70%);
    animation: float-slow 6s ease-in-out infinite;
}

.mtech-hero-floating-1 {
    top: 20%;
    left: 10%;
    animation-delay: 0s;
}

.mtech-hero-floating-2 {
    top: 60%;
    right: 15%;
    animation-delay: 2s;
}

.mtech-hero-floating-3 {
    bottom: 20%;
    left: 20%;
    animation-delay: 4s;
}

@keyframes float-slow {
    0%, 100% { transform: translateY(0px); }
    50% { transform: translateY(-20px); }
}

/* === Mobile Navigation === */
.menu-toggle {
    display: none;
    background: none;
    border: 1px solid var(--border-color);
    color: var(--text-primary);
    cursor: pointer;
    padding: 8px;
    border-radius: 8px;
    transition: all var(--transition);
}

.mobile-nav {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    width: 100%;
    background: rgba(8, 8, 8, 0.95);
    backdrop-filter: blur(20px);
    flex-direction: column;
    padding: 20px 0;
    text-align: center;
    border-radius: 0 0 20px 20px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.4);
    list-style: none;
    margin: 0;
    z-index: 1000;
}

.mobile-nav li {
    width: 100%;
}

.mobile-nav a {
    display: block;
    padding: 16px 30px;
    color: var(--text-secondary);
    font-size: 1rem;
    font-weight: 600;
    text-decoration: none;
    transition: all var(--transition);
    border-bottom: 1px solid rgba(var(--primary-rgb), 0.1);
}

.mobile-nav a:hover {
    background: rgba(var(--primary-rgb), 0.1);
    color: var(--primary-color);
}

/* === Modal Styles === */
.mtech-modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.8);
    backdrop-filter: blur(8px);
    z-index: 2000;
    display: none;
    align-items: center;
    justify-content: center;
    padding: var(--spacing-lg);
}

.mtech-modal {
    background: var(--bg-modal);
    border: 1px solid var(--border-color);
    border-radius: 16px;
    box-shadow: 0 25px 50px rgba(0, 0, 0, 0.5);
    backdrop-filter: blur(20px);
    max-width: 90vw;
    max-height: 90vh;
    overflow: hidden;
}

/* === Responsive Design === */
@media (max-width: 768px) {
    .mtech-container {
        padding: 0 var(--spacing-md);
    }

    .mtech-grid-2,
    .mtech-grid-3 {
        grid-template-columns: 1fr;
    }

    .mtech-hero-header {
        min-height: 80vh;
        padding: 80px 0 60px;
    }

    .mtech-hero-stats {
        flex-direction: column;
        gap: var(--spacing-md);
    }

    .mtech-btn-container {
        flex-direction: column;
        align-items: center;
    }

    .mtech-btn {
        width: 100%;
        max-width: 280px;
    }

    .menu-toggle {
        display: block !important;
    }

    .mobile-nav.active {
        display: flex !important;
    }
}

@media (max-width: 480px) {
    .mtech-container {
        padding: 0 var(--spacing-sm);
    }

    .mtech-card {
        padding: var(--spacing-md);
    }

    .mtech-hero-floating {
        display: none;
    }
}

/* === Accessibility === */
@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
}

/* === Missing Card Components === */
.mtech-card-header {
    display: flex;
    align-items: center;
    gap: var(--spacing-md);
    margin-bottom: var(--spacing-md);
}

.mtech-card-header.center {
    justify-content: center;
    flex-direction: column;
    text-align: center;
}

.mtech-card-icon {
    width: 60px;
    height: 60px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, rgba(var(--primary-rgb), 0.15), rgba(var(--primary-dark-rgb), 0.1));
    border-radius: 50%;
    color: var(--primary-color);
    font-size: 1.5rem;
    flex-shrink: 0;
}

/* For centered card icons (like in contact section) */
.mtech-card-glass.mtech-text-center .mtech-card-icon {
    margin: 0 auto var(--spacing-md) auto;
    width: 80px;
    height: 80px;
    font-size: 2rem;
}

.mtech-card-body {
    flex: 1;
    display: flex;
    flex-direction: column;
}

.mtech-card-body .mtech-btn-container {
    margin-top: auto;
    padding-top: var(--spacing-md);
}

/* === Card Footer === */
.mtech-card-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: var(--spacing-lg);
    padding-top: var(--spacing-md);
    border-top: 1px solid rgba(var(--primary-rgb), 0.1);
    font-size: 0.9rem;
    color: var(--text-secondary);
}

/* === Verified Badge === */
.verified-badge {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    margin-left: var(--spacing-sm);
    color: #4caf50;
    font-weight: 600;
    font-size: 0.8rem;
}

.verified-badge i {
    font-size: 0.9rem;
}

/* === Small Button Variant === */
.mtech-btn-sm {
    padding: 8px 16px;
    font-size: 0.85rem;
    min-width: auto;
}

/* === Plugin Card Enhancements === */
.mtech-card-glass .mtech-card-icon {
    width: 72px;
    height: 72px;
    border-radius: 20px;
    margin-bottom: var(--spacing-lg);
    font-size: 2.1rem;
}

/* === Getting Started & Installation Sections === */
.mtech-section-container {
    background: rgba(20, 20, 20, 0.35);
    box-shadow: 0 4px 20px rgba(var(--primary-rgb), 0.06);
    border-radius: 14px;
    backdrop-filter: blur(12px);
    border: 1.5px solid rgba(var(--primary-rgb), 0.10);
    padding: 56px 48px 64px 48px;
}

.mtech-section-divider {
    height: 4px;
    width: 90px;
    border-radius: 2px;
    margin: 0 auto 50px;
    opacity: 0.7;
    background: linear-gradient(135deg, var(--primary-color), var(--primary-dark));
}

.mtech-section-number {
    color: #888;
    font-family: 'Roboto Mono', monospace;
    font-size: 1rem;
    display: block;
    margin-bottom: 10px;
    text-align: center;
}

/* === Installation Cards === */
.mtech-install-card {
    padding: 34px 28px;
    border-radius: 20px;
    align-items: flex-start;
    background: rgba(20, 20, 20, 0.92);
    border: 1.5px solid rgba(var(--primary-rgb), 0.13);
    box-shadow: 0 4px 32px rgba(var(--primary-rgb), 0.04);
    overflow: hidden;
    word-wrap: break-word;
}

.mtech-install-card.featured {
    border-color: rgba(var(--primary-rgb), 0.3);
    background: rgba(var(--primary-rgb), 0.05);
}

.mtech-code-block {
    background: rgba(10, 10, 10, 0.8);
    border: 1px solid rgba(var(--primary-rgb), 0.2);
    border-left: 4px solid var(--primary-color);
    border-radius: 12px;
    padding: 20px;
    overflow-x: auto;
    overflow-wrap: break-word;
    word-wrap: break-word;
    word-break: break-all;
    margin: 25px 0;
    backdrop-filter: blur(10px);
    color: #fff;
    font-family: 'Courier New', monospace;
    font-size: 0.85rem;
    line-height: 1.4;
    white-space: pre-wrap;
    max-width: 100%;
}

.mtech-step-list {
    list-style: none;
    padding-left: 0;
    counter-reset: step-counter;
}

.mtech-step-list li {
    counter-increment: step-counter;
    position: relative;
    padding-left: 40px;
    margin-bottom: 15px;
    color: #e0cfa6;
    line-height: 1.6;
}

.mtech-step-list li::before {
    content: counter(step-counter);
    position: absolute;
    left: 0;
    top: 0;
    background: linear-gradient(135deg, var(--primary-color), var(--primary-dark));
    color: #000;
    width: 24px;
    height: 24px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 600;
    font-size: 0.8rem;
}

.mtech-feature-list {
    list-style: none;
    padding-left: 0;
}

.mtech-feature-list li {
    padding-left: 30px;
    position: relative;
    margin-bottom: 12px;
    color: #e0cfa6;
    line-height: 1.6;
}

.mtech-feature-list li i {
    position: absolute;
    left: 10px;
    top: 2px;
    font-size: 0.8rem;
    color: var(--primary-color);
}

.mtech-card-subtitle {
    color: var(--text-secondary);
    font-size: 0.9rem;
    margin-bottom: var(--spacing-sm);
}

.mtech-card-featured {
    position: relative;
    background: linear-gradient(135deg, rgba(var(--primary-rgb), 0.15), rgba(var(--primary-dark-rgb), 0.05));
    border-color: var(--border-hover);
    transform: scale(1.02);
}

.mtech-card-featured::after {
    content: 'Featured';
    position: absolute;
    top: var(--spacing-md);
    right: var(--spacing-md);
    background: linear-gradient(135deg, var(--primary-color), var(--primary-dark));
    color: #000;
    padding: 4px 12px;
    border-radius: 50px;
    font-size: 0.75rem;
    font-weight: 600;
    box-shadow: 0 4px 12px rgba(var(--primary-rgb), 0.3);
}

.mtech-card-hover:hover {
    transform: translateY(-5px);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.3);
    border-color: var(--border-hover);
}

/* === Hero Button Styles === */
.mtech-hero-actions {
    display: flex;
    gap: var(--spacing-md);
    justify-content: center;
    margin: var(--spacing-xl) 0;
    flex-wrap: wrap;
}

.mtech-hero-btn {
    display: inline-flex;
    align-items: center;
    gap: var(--spacing-sm);
    padding: 16px 32px;
    border-radius: 50px;
    font-weight: 600;
    text-decoration: none;
    transition: all var(--transition-cubic);
    min-width: 160px;
    justify-content: center;
}

.mtech-hero-btn-primary {
    background: linear-gradient(135deg, var(--primary-color), var(--primary-dark));
    color: #000;
    box-shadow: 0 8px 25px rgba(var(--primary-rgb), 0.3);
}

.mtech-hero-btn-primary:hover {
    transform: translateY(-3px);
    box-shadow: 0 12px 35px rgba(var(--primary-rgb), 0.4);
}

.mtech-hero-btn-secondary {
    background: rgba(var(--primary-rgb), 0.1);
    color: var(--text-primary);
    border: 1px solid var(--border-color);
}

.mtech-hero-btn-secondary:hover {
    background: rgba(var(--primary-rgb), 0.2);
    border-color: var(--border-hover);
    transform: translateY(-2px);
}

/* === Modal Styles === */
.mtech-modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.8);
    backdrop-filter: blur(8px);
    z-index: 2000;
    display: none;
    align-items: center;
    justify-content: center;
    padding: var(--spacing-lg);
}

.mtech-modal-content {
    background: var(--bg-modal);
    border: 1px solid var(--border-color);
    border-radius: 16px;
    box-shadow: 0 25px 50px rgba(0, 0, 0, 0.5);
    backdrop-filter: blur(20px);
    max-width: 90vw;
    max-height: 90vh;
    overflow: hidden;
    position: relative;
}

/* === Animation Keyframes === */
@keyframes pulse {
    0%, 100% { opacity: 1; transform: scale(1); }
    50% { opacity: 0.7; transform: scale(1.2); }
}
