/**
 * My Network Tools - Consolidated Styles
 * Mobile-First Responsive Design
 */

/* ========================================
   CSS Variables
   ======================================== */
:root {
    --sidebar-bg: #1e2a3a;
    --sidebar-dark: #151f2b;
    --accent: #0ea5e9;
    --accent-hover: #0284c7;
    --text-dark: #1e293b;
    --text-muted: #64748b;
    --border: #e2e8f0;
    --bg-light: #f8fafc;
    --card-bg: #ffffff;
}

/* ========================================
   Reset & Base
   ======================================== */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

html, body {
    overflow-x: hidden;
    width: 100%;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, sans-serif;
    background: var(--bg-light);
    color: var(--text-dark);
    line-height: 1.6;
    min-height: 100vh;
}

a {
    color: #0066cc;
    text-decoration: none;
    transition: color 0.2s;
}

a:hover {
    color: #0052a3;
}

/* ========================================
   Layout
   ======================================== */
.page-wrapper {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
    width: 100%;
}

/* ========================================
   Header - Public Landing
   ======================================== */
.landing-header {
    background: var(--sidebar-bg);
    padding: 0 20px;
    position: sticky;
    top: 0;
    z-index: 100;
}

.landing-header-inner {
    max-width: 1100px;
    margin: 0 auto;
    display: flex;
    justify-content: space-between;
    align-items: center;
    height: 60px;
}

.landing-brand {
    display: flex;
    align-items: center;
    gap: 12px;
}

.landing-brand-logo {
    width: 40px;
    height: 40px;
    background: none;
    border-radius: 6px;
    display: block;
    object-fit: contain;
    flex-shrink: 0;
}

.landing-brand h1 {
    font-size: 1.25rem;
    color: #fff;
    margin: 0;
}

.landing-brand h1 a {
    color: inherit;
    text-decoration: none;
}

.landing-nav {
    display: flex;
    gap: 8px;
    align-items: center;
}

.landing-nav a {
    color: rgba(255,255,255,0.7);
    text-decoration: none;
    padding: 8px 16px;
    border-radius: 6px;
    font-size: 0.9rem;
    transition: all 0.2s;
}

.landing-nav a:hover,
.landing-nav a.active {
    color: #fff;
    background: rgba(255,255,255,0.1);
}

.nav-btn {
    background: var(--accent) !important;
    color: #fff !important;
    padding: 10px 20px !important;
    border-radius: 6px;
    font-weight: 500;
    margin-left: 8px;
    border: none;
    cursor: pointer;
    font-size: 0.9rem;
    transition: background 0.2s;
}

.nav-btn:hover {
    background: var(--accent-hover) !important;
}

/* Mobile Menu Toggle */
.mobile-menu-toggle {
    display: none;
    background: none;
    border: none;
    cursor: pointer;
    padding: 8px;
    z-index: 101;
}

.mobile-menu-toggle span {
    display: block;
    width: 24px;
    height: 2px;
    background: #fff;
    margin: 5px 0;
    transition: all 0.3s;
    border-radius: 2px;
}

.mobile-menu-toggle.active span:nth-child(1) {
    transform: rotate(45deg) translate(5px, 5px);
}

.mobile-menu-toggle.active span:nth-child(2) {
    opacity: 0;
}

.mobile-menu-toggle.active span:nth-child(3) {
    transform: rotate(-45deg) translate(5px, -5px);
}

/* ========================================
   Footer
   ======================================== */
.landing-footer {
    background: var(--sidebar-bg);
    color: rgba(255,255,255,0.5);
    padding: 30px 20px;
    text-align: center;
}

.landing-footer-inner {
    max-width: 1100px;
    margin: 0 auto;
}

.landing-footer .footer-links {
    display: flex;
    justify-content: center;
    gap: 24px;
    margin-bottom: 20px;
    flex-wrap: wrap;
}

.landing-footer a {
    color: rgba(255,255,255,0.7);
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    transition: color 0.2s;
}

.landing-footer a:hover {
    color: var(--accent);
}

.landing-footer p {
    margin: 0;
    font-size: 0.9rem;
}

/* ========================================
   Buttons
   ======================================== */
.btn {
    display: inline-block;
    padding: 10px 20px;
    border-radius: 6px;
    font-weight: 500;
    font-size: 0.9rem;
    text-decoration: none;
    border: none;
    cursor: pointer;
    transition: all 0.2s;
}

.btn-primary {
    background: var(--accent);
    color: #fff;
}

.btn-primary:hover {
    background: var(--accent-hover);
}

.btn-secondary {
    background: var(--sidebar-bg);
    color: #fff;
}

.btn-secondary:hover {
    background: var(--sidebar-dark);
}

.btn-outline {
    background: transparent;
    border: 2px solid var(--accent);
    color: var(--accent);
}

.btn-outline:hover {
    background: var(--accent);
    color: #fff;
}

/* ========================================
   Hero Section (Homepage)
   ======================================== */
.hero-section {
    background: var(--sidebar-bg);
    padding: 60px 40px;
}

.hero-inner {
    max-width: 1440px;
    margin: 0 auto;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 40px;
}

.hero-left {
    flex: 1;
    display: flex;
    align-items: center;
    gap: 28px;
}

.hero-logo {
    width: 100px;
    height: 100px;
    object-fit: contain;
    flex-shrink: 0;
}

.hero-text {
    flex: 1;
}

.hero-greeting {
    font-size: 1rem;
    color: rgba(255,255,255,0.5);
    margin-bottom: 10px;
    min-height: 1.4em;
    transition: opacity 0.4s;
}

.hero-greeting.visible {
    color: rgba(255,255,255,0.7);
}

.hero-section h1 {
    font-size: 2.5rem;
    font-weight: 800;
    color: #fff;
    margin-bottom: 8px;
}

.hero-section h2 {
    font-size: 1.1rem;
    font-weight: 400;
    color: rgba(255,255,255,0.7);
    margin-bottom: 24px;
}

.hero-buttons {
    display: flex;
    gap: 14px;
}

.hero-btn {
    padding: 12px 30px;
    border-radius: 8px;
    font-size: 0.95rem;
    font-weight: 600;
    cursor: pointer;
    text-decoration: none;
    transition: all 0.2s;
    border: none;
}

.hero-btn-primary {
    background: var(--accent);
    color: #fff;
}

.hero-btn-primary:hover {
    background: var(--accent-hover);
    color: #fff;
}

.hero-btn-secondary {
    background: rgba(255,255,255,0.1);
    color: #fff;
    border: 1px solid rgba(255,255,255,0.2);
}

.hero-btn-secondary:hover {
    background: rgba(255,255,255,0.15);
    color: #fff;
}

.hero-stats {
    display: flex;
    gap: 16px;
    flex-shrink: 0;
}

.hero-stat {
    background: rgba(255,255,255,0.08);
    border-radius: 10px;
    padding: 16px 22px;
    text-align: center;
    min-width: 100px;
}

.hero-stat-value {
    font-size: 1.4rem;
    font-weight: 700;
    color: #fff;
}

.hero-stat-label {
    font-size: 0.75rem;
    color: rgba(255,255,255,0.5);
    margin-top: 4px;
}

/* ========================================
   Landing Main Content
   ======================================== */
.landing-main {
    padding: 40px 60px;
    max-width: 1440px;
    margin: 0 auto;
}

/* Section Headers */
.section-header {
    text-align: center;
    margin-bottom: 36px;
}

.section-header h2 {
    font-size: 1.6rem;
    font-weight: 700;
    color: var(--text-dark);
    margin-bottom: 8px;
}

.section-header p {
    font-size: 0.95rem;
    color: var(--text-muted);
}

/* ========================================
   Products Section
   ======================================== */
.products-section {
    margin-bottom: 48px;
}

.products-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 24px;
}

.product-card {
    background: var(--card-bg);
    border: 1px solid var(--border);
    border-radius: 10px;
    overflow: hidden;
    transition: all 0.2s;
    display: flex;
    flex-direction: column;
}

.product-card:hover {
    border-color: var(--accent);
    box-shadow: 0 4px 16px rgba(14,165,233,0.12);
    transform: translateY(-2px);
}

.product-card-accent {
    height: 4px;
}

.product-card-body {
    padding: 24px;
    flex: 1;
    display: flex;
    flex-direction: column;
}

.product-card-icon {
    font-size: 2.2rem;
    margin-bottom: 12px;
}

.product-card h3 {
    font-size: 1.15rem;
    font-weight: 700;
    color: var(--text-dark);
    margin-bottom: 4px;
}

.product-card-tagline {
    font-size: 0.85rem;
    color: var(--accent);
    font-weight: 500;
    margin-bottom: 10px;
}

.product-card-desc {
    font-size: 0.85rem;
    color: var(--text-muted);
    line-height: 1.6;
    margin-bottom: 14px;
}

.product-card-features {
    list-style: none;
    padding: 0;
    margin: 0 0 14px;
    flex: 1;
}

.product-card-features li {
    font-size: 0.8rem;
    color: var(--text-dark);
    padding: 3px 0 3px 18px;
    position: relative;
}

.product-card-features li::before {
    content: '\2713';
    position: absolute;
    left: 0;
    color: var(--accent);
    font-weight: 700;
}

.product-card-platforms {
    display: flex;
    gap: 6px;
    flex-wrap: wrap;
    margin-bottom: 16px;
}

.platform-badge {
    font-size: 0.7rem;
    padding: 3px 10px;
    border-radius: 12px;
    background: var(--bg-light);
    color: var(--text-muted);
    border: 1px solid var(--border);
    font-weight: 500;
}

.product-card-cta {
    margin-top: auto;
}

.product-card-cta .btn {
    width: 100%;
}

/* ========================================
   Tools Section
   ======================================== */
.tools-section {
    margin-bottom: 48px;
}

.tools-category {
    margin-bottom: 32px;
}

.tools-category-title {
    font-size: 1rem;
    font-weight: 600;
    color: var(--text-dark);
    margin-bottom: 14px;
    padding-left: 4px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.tools-category-title span {
    font-size: 1.1rem;
}

.tools-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 14px;
}

.tool-card {
    background: var(--card-bg);
    border: 1px solid var(--border);
    border-radius: 10px;
    padding: 18px;
    cursor: pointer;
    transition: all 0.2s;
    text-align: center;
    text-decoration: none;
    display: block;
}

.tool-card:hover {
    border-color: var(--accent);
    box-shadow: 0 4px 12px rgba(14,165,233,0.1);
    transform: translateY(-1px);
}

.tool-card-icon {
    font-size: 1.6rem;
    margin-bottom: 8px;
}

.tool-card h3 {
    font-size: 0.9rem;
    font-weight: 600;
    color: var(--text-dark);
    margin-bottom: 4px;
}

.tool-card p {
    font-size: 0.78rem;
    color: var(--text-muted);
    margin: 0;
    line-height: 1.4;
}

/* ========================================
   Features Section
   ======================================== */
.features-section {
    margin-bottom: 48px;
}

.features-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap: 20px;
    max-width: 1100px;
    margin: 0 auto;
}

.feature-card {
    background: var(--card-bg);
    border: 1px solid var(--border);
    border-radius: 10px;
    padding: 24px;
    transition: all 0.2s;
}

.feature-card:hover {
    border-color: var(--accent);
    box-shadow: 0 4px 12px rgba(14,165,233,0.1);
}

.feature-card-icon {
    font-size: 1.8rem;
    margin-bottom: 10px;
}

.feature-card h3 {
    font-size: 1rem;
    font-weight: 600;
    color: var(--text-dark);
    margin-bottom: 6px;
}

.feature-card p {
    font-size: 0.82rem;
    color: var(--text-muted);
    margin: 0;
    line-height: 1.5;
}

/* ========================================
   Modal Styles
   ======================================== */
.mnt-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(15, 23, 42, 0.8);
    backdrop-filter: blur(4px);
    z-index: 1000;
    align-items: center;
    justify-content: center;
    padding: 20px;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.mnt-overlay.active {
    display: flex;
    opacity: 1;
}

.mnt-modal {
    background: var(--sidebar-bg);
    border-radius: 16px;
    width: 100%;
    max-width: 480px;
    box-shadow: 0 25px 80px rgba(0,0,0,0.5);
    transform: scale(0.95) translateY(-20px);
    transition: transform 0.3s ease;
    overflow: hidden;
}

.mnt-overlay.active .mnt-modal {
    transform: scale(1) translateY(0);
}

.mnt-modal-header {
    background: var(--sidebar-dark);
    padding: 24px 32px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 1px solid rgba(255,255,255,0.1);
}

.mnt-modal-header h3 {
    color: #fff;
    font-size: 1.25rem;
    font-weight: 600;
    margin: 0;
}

.mnt-modal-close {
    background: rgba(255,255,255,0.1);
    border: none;
    width: 36px;
    height: 36px;
    border-radius: 8px;
    font-size: 1.25rem;
    color: rgba(255,255,255,0.6);
    cursor: pointer;
    transition: all 0.2s;
    display: flex;
    align-items: center;
    justify-content: center;
}

.mnt-modal-close:hover {
    background: rgba(255,255,255,0.15);
    color: #fff;
}

.mnt-modal-body {
    padding: 32px;
    background: var(--card-bg);
}

/* Auth Tabs */
.auth-tabs {
    display: flex;
    background: var(--bg-light);
    border-radius: 10px;
    padding: 4px;
    margin-bottom: 28px;
    gap: 4px;
}

.auth-tab {
    flex: 1;
    padding: 12px 8px;
    background: transparent;
    border: none;
    font-size: 0.9rem;
    color: var(--text-muted);
    cursor: pointer;
    border-radius: 8px;
    transition: all 0.2s;
    font-weight: 500;
}

.auth-tab:hover {
    color: var(--text-dark);
}

.auth-tab.active {
    background: var(--card-bg);
    color: var(--accent);
    font-weight: 600;
    box-shadow: 0 2px 8px rgba(0,0,0,0.08);
}

.auth-panel {
    display: none;
}

.auth-panel.active {
    display: block;
}

/* Form Styles */
.form-group {
    margin-bottom: 20px;
}

.form-group label,
.form-label {
    display: block;
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--text-dark);
    margin-bottom: 8px;
}

.form-group input,
.form-control {
    width: 100%;
    padding: 14px 16px;
    border: 2px solid var(--border);
    border-radius: 10px;
    font-size: 1rem;
    background: var(--bg-light);
    color: var(--text-dark);
    transition: all 0.2s;
}

.form-group input::placeholder,
.form-control::placeholder {
    color: #94a3b8;
}

.form-group input:focus,
.form-control:focus {
    outline: none;
    border-color: var(--accent);
    background: #fff;
    box-shadow: 0 0 0 4px rgba(14,165,233,0.1);
}

.form-select {
    padding: 10px 14px;
    border: 1px solid var(--border);
    border-radius: 6px;
    font-size: 0.9rem;
    background: #fff;
}

.form-select:focus {
    outline: none;
    border-color: var(--accent);
    box-shadow: 0 0 0 3px rgba(14, 165, 233, 0.1);
}

.form-btn {
    width: 100%;
    padding: 16px;
    background: var(--accent);
    color: #fff;
    border: none;
    border-radius: 10px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
    margin-top: 8px;
}

.form-btn:hover {
    background: var(--accent-hover);
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(14,165,233,0.3);
}

.form-btn:active {
    transform: translateY(0);
}

.form-message {
    text-align: center;
    margin-top: 20px;
    padding: 14px;
    border-radius: 10px;
    font-size: 0.9rem;
    display: none;
}

.form-message.success {
    display: block;
    background: #d1fae5;
    color: #065f46;
    border: 1px solid #a7f3d0;
}

.form-message.error {
    display: block;
    background: #fee2e2;
    color: #991b1b;
    border: 1px solid #fecaca;
}

.form-footer {
    text-align: center;
    margin-top: 20px;
    padding-top: 20px;
    border-top: 1px solid var(--border);
    font-size: 0.9rem;
    color: var(--text-muted);
}

/* ========================================
   Tool Results
   ======================================== */
.result-section {
    margin-bottom: 14px;
}

.result-label {
    font-weight: 600;
    font-size: 0.85rem;
    color: var(--text-muted);
    margin-bottom: 4px;
}

.result-value {
    font-size: 0.9rem;
    color: var(--text-dark);
    word-break: break-all;
}

.result-success {
    color: #22c55e;
}

.result-warning {
    color: #f59e0b;
}

.result-error {
    color: #ef4444;
}

.result-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.82rem;
    margin-top: 6px;
}

.result-table th,
.result-table td {
    padding: 6px 10px;
    border: 1px solid var(--border);
    text-align: left;
}

.result-table th {
    background: var(--bg-light);
    font-weight: 600;
    color: var(--text-dark);
}

/* ========================================
   Templates Page
   ======================================== */
.templates-page {
    min-height: 100vh;
    background: var(--bg-light);
}

.templates-header {
    background: linear-gradient(135deg, var(--sidebar-bg) 0%, var(--sidebar-dark) 100%);
    color: #fff;
    padding: 50px 20px;
    text-align: center;
}

.templates-header-inner {
    max-width: 1100px;
    margin: 0 auto;
}

.templates-header h1 {
    font-size: 2rem;
    margin: 0 0 12px 0;
    font-weight: 700;
}

.templates-header p {
    color: rgba(255,255,255,0.7);
    max-width: 600px;
    margin: 0 auto;
    font-size: 1rem;
    line-height: 1.6;
}

.templates-container {
    max-width: 1100px;
    margin: 0 auto;
    padding: 30px 20px;
}

/* Filters */
.templates-filters {
    background: var(--card-bg);
    border-radius: 10px;
    padding: 20px 24px;
    margin-bottom: 24px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.06);
    border: 1px solid var(--border);
}

.filters-row {
    display: flex;
    flex-wrap: wrap;
    gap: 16px;
    align-items: center;
    justify-content: center;
}

.filter-group {
    display: flex;
    align-items: center;
    gap: 8px;
}

.filter-group label {
    font-weight: 500;
    color: var(--text-muted);
    white-space: nowrap;
    font-size: 0.9rem;
}

.search-box {
    display: flex;
    gap: 8px;
    min-width: 280px;
}

.search-box input {
    flex: 1;
}

/* Categories */
.categories-bar {
    display: flex;
    flex-wrap: nowrap;
    gap: 8px;
    margin-bottom: 24px;
    justify-content: center;
    overflow-x: auto;
    padding-bottom: 4px;
}

.category-chip {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    padding: 8px 14px;
    background: var(--card-bg);
    border: 1px solid var(--border);
    border-radius: 20px;
    text-decoration: none;
    color: var(--text-muted);
    font-size: 0.85rem;
    font-weight: 500;
    transition: all 0.2s;
    box-shadow: 0 1px 3px rgba(0,0,0,0.04);
    white-space: nowrap;
    flex-shrink: 0;
}

.category-chip:hover {
    border-color: var(--accent);
    color: var(--accent);
    box-shadow: 0 2px 8px rgba(14, 165, 233, 0.15);
}

.category-chip.active {
    background: var(--accent);
    color: white;
    border-color: var(--accent);
    box-shadow: 0 2px 8px rgba(14, 165, 233, 0.3);
}

.category-chip .icon {
    font-size: 1rem;
}

/* Templates Grid */
.templates-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
    gap: 24px;
}

.template-card {
    background: var(--card-bg);
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 2px 8px rgba(0,0,0,0.06);
    border: 1px solid var(--border);
    transition: all 0.3s;
}

.template-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 12px 30px rgba(0,0,0,0.12);
    border-color: var(--accent);
}

.template-thumbnail {
    position: relative;
    aspect-ratio: 16/10;
    background: #f0f0f0;
    overflow: hidden;
}

.template-thumbnail img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.template-thumbnail .overlay {
    position: absolute;
    inset: 0;
    background: rgba(30, 42, 58, 0.8);
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    opacity: 0;
    transition: opacity 0.3s;
}

.template-card:hover .overlay {
    opacity: 1;
}

.overlay .btn {
    padding: 8px 16px;
    font-size: 13px;
}

.template-info {
    padding: 20px;
}

.template-category {
    font-size: 12px;
    color: var(--accent);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 8px;
}

.template-name {
    font-size: 1.1rem;
    font-weight: 600;
    color: var(--text-dark);
    margin-bottom: 10px;
}

.template-name a {
    color: inherit;
    text-decoration: none;
}

.template-name a:hover {
    color: var(--accent);
}

.template-meta {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.template-price {
    font-weight: 600;
    color: var(--text-dark);
}

.template-price.free {
    color: #10b981;
}

.template-downloads {
    font-size: 13px;
    color: var(--text-muted);
}

.no-templates {
    text-align: center;
    padding: 60px 20px;
    color: var(--text-muted);
}

.no-templates h3 {
    margin-bottom: 10px;
}

/* Pagination */
.pagination {
    display: flex;
    justify-content: center;
    gap: 5px;
    margin-top: 40px;
}

.pagination a,
.pagination span {
    padding: 8px 14px;
    border: 1px solid var(--border);
    border-radius: 6px;
    text-decoration: none;
    color: var(--text-muted);
    background: var(--card-bg);
    transition: all 0.2s;
}

.pagination a:hover {
    border-color: var(--accent);
    color: var(--accent);
}

.pagination .current {
    background: var(--accent);
    color: white;
    border-color: var(--accent);
}

/* ========================================
   Downloads Page
   ======================================== */
.dl-hero {
    background: var(--sidebar-bg);
    padding: 48px 20px;
    text-align: center;
}

.dl-hero h1 {
    font-size: 2.2rem;
    font-weight: 800;
    color: #fff;
    margin-bottom: 8px;
}

.dl-hero p {
    font-size: 1.05rem;
    color: rgba(255,255,255,0.65);
    margin: 0;
}

.dl-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(380px, 1fr));
    gap: 28px;
}

.dl-card {
    background: var(--card-bg);
    border: 1px solid var(--border);
    border-radius: 12px;
    overflow: hidden;
    transition: all 0.25s ease;
    display: flex;
    flex-direction: column;
}

.dl-card:hover {
    border-color: var(--accent);
    box-shadow: 0 8px 28px rgba(14,165,233,0.13);
    transform: translateY(-3px);
}

.dl-card-accent {
    height: 4px;
}

.dl-card-header {
    padding: 28px 28px 0;
    display: flex;
    align-items: flex-start;
    gap: 16px;
}

.dl-card-icon {
    font-size: 2.8rem;
    line-height: 1;
    flex-shrink: 0;
}

.dl-card-info {
    flex: 1;
    min-width: 0;
}

.dl-card-info h2 {
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--text-dark);
    margin: 0 0 4px;
}

.dl-card-tagline {
    font-size: 0.88rem;
    color: var(--text-muted);
    margin: 0;
    line-height: 1.4;
}

.dl-card-body {
    padding: 20px 28px 28px;
    flex: 1;
    display: flex;
    flex-direction: column;
}

.dl-platform-list {
    list-style: none;
    padding: 0;
    margin: 0;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.dl-platform-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 16px;
    border-radius: 8px;
    background: var(--bg-light);
    border: 1px solid var(--border);
    transition: all 0.2s;
}

.dl-platform-item:hover {
    border-color: var(--accent);
    background: rgba(14,165,233,0.04);
}

.dl-platform-emoji {
    font-size: 1.4rem;
    flex-shrink: 0;
    width: 32px;
    text-align: center;
}

.dl-platform-details {
    flex: 1;
    min-width: 0;
}

.dl-platform-name {
    font-size: 0.92rem;
    font-weight: 600;
    color: var(--text-dark);
}

.dl-platform-meta {
    font-size: 0.78rem;
    color: var(--text-muted);
    margin-top: 1px;
}

.dl-btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 8px 20px;
    border-radius: 6px;
    font-size: 0.85rem;
    font-weight: 600;
    text-decoration: none;
    transition: all 0.2s;
    white-space: nowrap;
    flex-shrink: 0;
}

.dl-btn-primary {
    background: var(--accent);
    color: #fff;
    border: none;
}

.dl-btn-primary:hover {
    background: var(--accent-hover);
    color: #fff;
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(14,165,233,0.3);
}

.dl-btn svg {
    width: 16px;
    height: 16px;
    fill: currentColor;
}

.dl-empty {
    text-align: center;
    padding: 60px 20px;
}

.dl-empty-icon {
    font-size: 3.5rem;
    margin-bottom: 16px;
    opacity: 0.4;
}

.dl-empty h2 {
    font-size: 1.3rem;
    font-weight: 600;
    color: var(--text-dark);
    margin-bottom: 8px;
}

.dl-empty p {
    font-size: 0.95rem;
    color: var(--text-muted);
}

/* ========================================
   Coming Soon Page
   ======================================== */
.coming-soon {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, #1e2a3a 0%, #0f172a 100%);
    color: white;
    text-align: center;
    padding: 20px;
}

.coming-soon h1 {
    font-size: 3rem;
    margin-bottom: 10px;
}

.coming-soon p {
    font-size: 1.2rem;
    opacity: 0.9;
    margin-bottom: 30px;
}

.coming-soon a {
    color: white;
}

.coming-soon .btn-outline {
    border: 2px solid #0ea5e9;
    color: #0ea5e9;
    padding: 12px 24px;
    border-radius: 8px;
    text-decoration: none;
    font-weight: 500;
    transition: all 0.2s;
}

.coming-soon .btn-outline:hover {
    background: #0ea5e9;
    color: white;
}

/* ========================================
   Client/Tools Dashboard
   ======================================== */
.client-tools-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 24px;
    margin-bottom: 30px;
}

.tool-category {
    background: #ffffff;
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.06);
}

.tool-category-header {
    background: #f8f9fa;
    padding: 15px 20px;
    border-bottom: 1px solid #e0e0e0;
    display: flex;
    align-items: center;
    gap: 10px;
}

.tool-category-header h3 {
    margin: 0;
    font-size: 1rem;
    color: #333333;
}

.tool-category-icon {
    font-size: 1.25rem;
}

.tool-list {
    padding: 10px;
}

.tool-item {
    display: flex;
    align-items: center;
    padding: 10px 12px;
    border-radius: 6px;
    text-decoration: none;
    color: inherit;
    transition: all 0.2s;
}

.tool-item:hover {
    background: #f5f7fa;
}

.tool-item-info {
    flex: 1;
}

.tool-item-name {
    font-weight: 500;
    color: #333333;
    display: block;
}

.tool-item:hover .tool-item-name {
    color: #0066cc;
}

.tool-item-desc {
    font-size: 0.8rem;
    color: #666666;
}

.tool-item-arrow {
    color: #999999;
    font-size: 1.2rem;
}

.tool-item:hover .tool-item-arrow {
    color: #0066cc;
}

/* ========================================
   Animations
   ======================================== */
@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}

@keyframes fadeIn {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

/* ========================================
   Utility Classes
   ======================================== */
.w-100 {
    width: 100%;
}

.mb-3 {
    margin-bottom: 1rem;
}

.text-center {
    text-align: center;
}

/* Alert Styles */
.alert {
    padding: 12px 16px;
    border-radius: 8px;
    margin-bottom: 16px;
    font-size: 14px;
}

.alert-danger {
    background: #fee2e2;
    color: #991b1b;
    border: 1px solid #fecaca;
}

.alert-success {
    background: #d1fae5;
    color: #065f46;
    border: 1px solid #a7f3d0;
}

/* Badge */
.badge {
    display: inline-block;
    padding: 4px 10px;
    border-radius: 12px;
    font-size: 0.75rem;
    font-weight: 600;
    background: var(--accent);
    color: #fff;
}

/* ========================================
   RESPONSIVE - Mobile First
   ======================================== */

/* Tablet & Below (768px) */
@media (max-width: 768px) {
    /* Mobile Menu Toggle */
    .mobile-menu-toggle {
        display: block;
    }

    /* Header Mobile */
    .landing-header-inner {
        height: 56px;
    }

    .landing-brand h1 {
        font-size: 1.1rem;
    }

    .landing-brand-logo {
        width: 36px;
        height: 36px;
    }

    /* Mobile Nav */
    .landing-nav {
        position: fixed;
        top: 56px;
        left: 0;
        right: 0;
        background: var(--sidebar-bg);
        flex-direction: column;
        padding: 20px;
        gap: 0;
        transform: translateY(-100%);
        opacity: 0;
        visibility: hidden;
        transition: all 0.3s ease;
        box-shadow: 0 4px 20px rgba(0,0,0,0.3);
        border-top: 1px solid rgba(255,255,255,0.1);
    }

    .landing-nav.active {
        transform: translateY(0);
        opacity: 1;
        visibility: visible;
    }

    .landing-nav a {
        display: block;
        width: 100%;
        padding: 14px 16px;
        text-align: center;
        border-radius: 8px;
        font-size: 1rem;
    }

    .landing-nav a:hover,
    .landing-nav a.active {
        background: rgba(255,255,255,0.1);
    }

    .nav-btn {
        margin: 10px 0 0 0 !important;
        width: 100%;
        display: block !important;
        text-align: center;
        padding: 14px 20px !important;
    }

    /* Footer Mobile */
    .landing-footer {
        padding: 24px 16px;
    }

    .landing-footer .footer-links {
        flex-direction: row;
        flex-wrap: wrap;
        justify-content: center;
        gap: 16px 24px;
    }

    .landing-footer .footer-links a {
        padding: 8px 0;
    }

    .landing-footer p {
        font-size: 0.85rem;
        margin-top: 16px;
    }

    /* Landing Main */
    .landing-main {
        padding: 20px 16px;
    }

    /* Hero Section Mobile */
    .hero-section {
        padding: 40px 20px;
    }

    .hero-inner {
        flex-direction: column;
        text-align: center;
        gap: 28px;
    }

    .hero-left {
        flex-direction: column;
        gap: 16px;
    }

    .hero-logo {
        width: 70px;
        height: 70px;
    }

    .hero-section h1 {
        font-size: 1.8rem;
    }

    .hero-buttons {
        justify-content: center;
        flex-direction: column;
        align-items: center;
    }

    .hero-btn {
        width: 100%;
        max-width: 280px;
        text-align: center;
    }

    .hero-stats {
        flex-wrap: wrap;
        justify-content: center;
        gap: 10px;
    }

    .hero-stat {
        padding: 10px 16px;
        min-width: 80px;
    }

    /* Modal Mobile */
    .mnt-modal {
        width: 92%;
        max-width: 420px;
        max-height: 85vh;
        overflow-y: auto;
        margin: 16px;
    }

    .mnt-modal-header {
        padding: 14px 16px;
    }

    .mnt-modal-body {
        padding: 16px;
    }

    .auth-tabs {
        flex-wrap: wrap;
    }

    .auth-tab {
        flex: 1 1 auto;
        min-width: 70px;
        padding: 8px 10px;
        font-size: 0.8rem;
    }

    .mnt-modal-close {
        width: 44px;
        height: 44px;
        font-size: 1.5rem;
    }

    .form-group input,
    .form-control {
        font-size: 16px; /* Prevents zoom on iOS */
    }

    /* Templates Page Mobile */
    .templates-header {
        padding: 30px 16px;
    }

    .templates-header h1 {
        font-size: 1.4rem;
    }

    .templates-header p {
        font-size: 0.9rem;
    }

    .templates-container {
        padding: 20px 16px;
    }

    .templates-filters {
        margin-bottom: 20px;
    }

    .filters-row {
        flex-direction: column;
        align-items: stretch;
        gap: 12px;
    }

    .search-box {
        min-width: 100%;
        flex-direction: column;
    }

    .search-box input {
        width: 100%;
        border-radius: 8px;
    }

    .search-box .btn {
        width: 100%;
        border-radius: 8px;
        margin-top: 8px;
    }

    .filter-group {
        width: 100%;
    }

    .filter-group select {
        width: 100%;
    }

    .categories-bar {
        justify-content: flex-start;
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
        padding-bottom: 10px;
        flex-wrap: nowrap;
    }

    .category-chip {
        flex-shrink: 0;
        white-space: nowrap;
    }

    .templates-grid {
        grid-template-columns: 1fr;
        gap: 16px;
    }

    .template-card {
        border-radius: 10px;
    }

    .template-thumbnail {
        height: 180px;
    }

    .template-info {
        padding: 14px;
    }

    .template-info h3 {
        font-size: 1rem;
    }

    .template-meta {
        font-size: 0.8rem;
    }

    .template-actions {
        padding: 12px 14px;
    }

    .template-actions .btn {
        padding: 8px 14px;
        font-size: 0.8rem;
    }

    .pagination {
        flex-wrap: wrap;
        gap: 6px;
    }

    .pagination a,
    .pagination span {
        padding: 8px 12px;
        font-size: 0.85rem;
    }

    /* Downloads Page Mobile */
    .dl-hero {
        padding: 36px 20px;
    }

    .dl-hero h1 {
        font-size: 1.7rem;
    }

    .dl-grid {
        grid-template-columns: 1fr;
        gap: 20px;
    }

    .dl-card-header {
        padding: 20px 20px 0;
    }

    .dl-card-body {
        padding: 16px 20px 20px;
    }

    .dl-platform-item {
        flex-wrap: wrap;
    }

    .dl-btn {
        width: 100%;
        justify-content: center;
        margin-top: 6px;
    }

    /* Tools Grids Mobile */
    .tools-grid {
        grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
        gap: 12px;
    }

    .tool-card {
        padding: 14px;
    }

    .tool-card-icon {
        font-size: 1.4rem;
    }

    .tool-card h3 {
        font-size: 0.85rem;
    }

    .tool-card p {
        font-size: 0.75rem;
    }

    .client-tools-grid {
        grid-template-columns: 1fr;
        gap: 16px;
    }

    .result-table th,
    .result-table td {
        padding: 6px 4px;
        font-size: 0.7rem;
    }
}

/* Small Mobile (480px) */
@media (max-width: 480px) {
    .landing-header {
        padding: 0 12px;
    }

    .landing-brand h1 {
        font-size: 1rem;
    }

    .landing-brand-logo {
        width: 32px;
        height: 32px;
    }

    .landing-brand {
        gap: 8px;
    }

    .landing-main {
        padding: 10px;
    }

    .hero-section {
        padding: 20px 14px;
        border-radius: 8px;
    }

    .hero-section h1 {
        font-size: 1.35rem;
    }

    .auth-tabs {
        flex-wrap: wrap;
        gap: 4px;
    }

    .auth-tab {
        flex: 1 1 40%;
        min-width: 0;
        padding: 10px 6px;
        font-size: 0.7rem;
        min-height: 44px;
    }

    /* Templates Page Mobile */
    .templates-header {
        padding: 24px 12px;
    }

    .templates-header h1 {
        font-size: 1.25rem;
    }

    .templates-container {
        padding: 16px 12px;
    }

    .template-thumbnail {
        height: 160px;
    }

    .template-info {
        padding: 12px;
    }

    .template-actions {
        flex-direction: column;
        gap: 8px;
    }

    .template-actions .btn {
        width: 100%;
        text-align: center;
    }

    /* Downloads Page Small Mobile */
    .dl-card-icon {
        font-size: 2.2rem;
    }

    .dl-card-info h2 {
        font-size: 1.1rem;
    }

    /* Coming Soon Small Mobile */
    .coming-soon h1 {
        font-size: 2rem;
    }

    .coming-soon p {
        font-size: 1rem;
    }

    /* Tools Small Mobile */
    .tools-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

/* Large screens (900px+) for templates */
@media (min-width: 901px) {
    .templates-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

/* ========================================
   ADDITIONAL MOBILE FIXES
   ======================================== */

/* Fix downloads grid - too wide on mobile */
@media (max-width: 768px) {
    .dl-grid {
        grid-template-columns: 1fr;
        gap: 16px;
    }

    .dl-platform-item {
        flex-direction: column;
        align-items: flex-start;
        gap: 10px;
    }

    .dl-platform-details {
        width: 100%;
    }

    .dl-btn {
        width: 100%;
        justify-content: center;
    }
}

/* Fix products grid for small screens */
@media (max-width: 600px) {
    .products-grid {
        grid-template-columns: 1fr;
        gap: 16px;
    }

    .product-card-body {
        padding: 18px;
    }

    .product-card h3 {
        font-size: 1.05rem;
    }
}

/* Fix two-column layouts in index.php */
@media (max-width: 768px) {
    /* Mission/What We Offer section */
    [style*="grid-template-columns: repeat(2, 1fr)"] {
        display: block !important;
    }

    [style*="grid-template-columns: repeat(2, 1fr)"] > div {
        margin-bottom: 24px;
    }

    /* Stats bar responsive */
    [style*="display: flex"][style*="flex-wrap: wrap"][style*="justify-content: center"][style*="gap: 48px"] {
        gap: 20px !important;
        padding: 20px !important;
    }

    [style*="display: flex"][style*="flex-wrap: wrap"][style*="justify-content: center"][style*="gap: 48px"] > div {
        min-width: 80px;
        flex: 1 1 30%;
    }

    [style*="font-size: 2rem"][style*="font-weight: 700"] {
        font-size: 1.5rem !important;
    }
}

/* Software selector mobile fixes */
@media (max-width: 480px) {
    .software-selector {
        flex-wrap: wrap;
    }

    .software-btn {
        flex: 1 1 45%;
        min-width: 0;
        padding: 10px 6px;
    }

    .software-icon {
        font-size: 1.2rem;
    }

    .software-name {
        font-size: 0.75rem;
    }
}

/* Improved touch targets for mobile */
@media (max-width: 768px) {
    .btn {
        min-height: 44px;
        padding: 12px 20px;
    }

    .btn-sm {
        min-height: 36px;
        padding: 8px 14px;
    }

    .mnt-modal-close {
        min-width: 44px;
        min-height: 44px;
    }

    .form-group input,
    .form-control {
        min-height: 48px;
        font-size: 16px; /* Prevents iOS zoom on focus */
    }

    .form-select {
        min-height: 44px;
        font-size: 16px;
    }
}

/* Fix info cards on mobile */
@media (max-width: 768px) {
    .info-card {
        padding: 20px;
    }

    .info-card h2 {
        font-size: 1.2rem;
    }

    .info-card-tags {
        gap: 6px;
    }

    .info-card-tag {
        font-size: 0.75rem;
        padding: 4px 10px;
    }
}

/* Hero section better mobile handling */
@media (max-width: 480px) {
    .hero-section {
        padding: 24px 12px;
    }

    .hero-logo {
        width: 60px;
        height: 60px;
    }

    .hero-section h1 {
        font-size: 1.25rem;
    }

    .hero-section h2 {
        font-size: 0.9rem;
        margin-bottom: 16px;
    }

    .hero-stat {
        min-width: 70px;
        padding: 10px 12px;
    }

    .hero-stat-value {
        font-size: 1.1rem;
    }

    .hero-stat-label {
        font-size: 0.65rem;
    }

    .hero-btn {
        padding: 10px 20px;
        font-size: 0.85rem;
    }
}

/* Fix feature cards on mobile */
@media (max-width: 600px) {
    .features-grid {
        grid-template-columns: 1fr;
        gap: 14px;
    }

    .feature-card {
        padding: 18px;
    }

    .feature-card h3 {
        font-size: 0.95rem;
    }

    .feature-card p {
        font-size: 0.8rem;
    }
}

/* About section mobile text */
@media (max-width: 768px) {
    .about-section h2 {
        font-size: 1.4rem !important;
    }

    .about-section p {
        font-size: 0.95rem !important;
    }

    [style*="font-size: 1.3rem"] {
        font-size: 1.1rem !important;
    }

    [style*="font-size: 0.95rem"][style*="line-height: 1.8"] {
        font-size: 0.9rem !important;
    }
}

/* Tool results table mobile */
@media (max-width: 480px) {
    .result-table {
        font-size: 0.7rem;
    }

    .result-table th,
    .result-table td {
        padding: 4px 6px;
        word-break: break-word;
    }

    .result-section {
        margin-bottom: 10px;
    }

    .result-label {
        font-size: 0.75rem;
    }

    .result-value {
        font-size: 0.8rem;
    }
}

/* Cards grid responsive fix */
@media (max-width: 768px) {
    .cards-grid {
        grid-template-columns: 1fr;
        gap: 16px;
    }
}

/* Ensure no horizontal overflow */
@media (max-width: 768px) {
    * {
        max-width: 100%;
    }

    html, body {
        overflow-x: hidden;
        width: 100%;
    }

    img, video, iframe {
        max-width: 100%;
        height: auto;
    }

    pre, code {
        overflow-x: auto;
        max-width: 100%;
        word-wrap: break-word;
    }
}

/* Footer mobile improvements */
@media (max-width: 480px) {
    .landing-footer {
        padding: 20px 12px;
    }

    .landing-footer .footer-links {
        gap: 12px 20px;
    }

    .landing-footer a {
        font-size: 0.85rem;
    }

    .landing-footer p {
        font-size: 0.8rem;
    }
}

/* Category chips horizontal scroll on mobile */
@media (max-width: 768px) {
    .categories-bar {
        justify-content: flex-start;
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
        scrollbar-width: none;
        -ms-overflow-style: none;
        padding-bottom: 8px;
        margin: 0 -16px;
        padding-left: 16px;
        padding-right: 16px;
    }

    .categories-bar::-webkit-scrollbar {
        display: none;
    }
}

/* Coming soon page mobile */
@media (max-width: 480px) {
    .coming-soon h1 {
        font-size: 1.75rem;
    }

    .coming-soon p {
        font-size: 0.95rem;
    }

    .coming-soon .btn-outline {
        padding: 10px 20px;
        font-size: 0.9rem;
    }
}
