﻿html {
  font-size: 13px;
}

@media (min-width: 768px) {
  html {
    font-size: 14px;
  }
}

.btn:focus, .btn:active:focus, .btn-link.nav-link:focus, .form-control:focus, .form-check-input:focus {
  box-shadow: 0 0 0 0.1rem white, 0 0 0 0.25rem #258cfb;
}

html {
  position: relative;
  min-height: 100%;
}

body {
  margin-bottom: 60px;
}

/* Minimal black & white theme using Consolas */
html, body {
  font-family: Consolas, Monaco, 'Courier New', monospace;
  color: #000;
  background: #fff;
  height: 100%;
}

/* Page layout to keep footer at the bottom on all pages */
body {
  display: flex;
  flex-direction: column;
  min-height: 100vh;
  padding-top: 60px; /* Account for fixed header */
}

.content {
  flex: 1 0 auto;
  max-width: 1024px; /* Wider content area */
  margin: 2rem auto;
  padding: 0 1rem;
}

/* Header / Nav */
.nav-minimal { 
    border-bottom: 1px solid #000;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    background: #fff;
    z-index: 1000;
}
.nav-container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1rem;
  max-width: 1200px; /* Match wider content */
  margin: 0 auto;
}
.brand { text-decoration: none; color: #000; font-weight: 700; }
.nav-links { list-style: none; display: flex; gap: 1rem; margin: 0; padding: 0; }
.nav-links a { color: #000; text-decoration: none; }
.nav-links a:hover { text-decoration: underline; }

/* Mobile Menu Toggle Button */
.mobile-menu-toggle {
  display: none;
  background: none;
  border: 1px solid #000;
  padding: 0.5rem 0.75rem;
  cursor: pointer;
  font-size: 1.25rem;
  color: #000;
  font-family: Consolas, Monaco, 'Courier New', monospace;
}

.mobile-menu-toggle:hover {
  background: #000;
  color: #fff;
}

/* Mobile Navigation Styles */
@media (max-width: 768px) {
  .mobile-menu-toggle {
    display: block;
  }

  .nav-links {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    flex-direction: column;
    background: #fff;
    border-bottom: 1px solid #000;
    padding: 0;
    margin: 0;
    gap: 0;
    z-index: 100;
  }

  .nav-links.active {
    display: flex;
  }

  .nav-links li {
    border-top: 1px solid #eee;
  }

  .nav-links a {
    display: block;
    padding: 1rem;
    text-align: center;
  }

  .nav-container {
    position: relative;
  }
}

/* Footer */
.footer-minimal { 
    border-top: 1px solid #000;
    position: relative;
    z-index: 100; /* Higher than sidebar to appear on top */
    background: #fff;
}
.footer-container { 
    max-width: 1200px; 
    margin: 0 auto; 
    padding: 1rem; 
}

/* Footer adjustment for pages with fixed sidebar - uses body class */
body.learn-page .footer-minimal {
    margin-left: 280px;
}

body.learn-page .footer-container {
    max-width: calc(1200px - 280px);
}

@media (max-width: 768px) {
    body.learn-page .footer-minimal {
        margin-left: 0;
    }
    
    body.learn-page .footer-container {
        max-width: 100%;
    }
}

/* Home - Hero */
.hero { text-align: center; padding: 3rem 1rem 2rem; }
.hero h1 { font-size: 2rem; margin-bottom: 0.5rem; letter-spacing: -0.02em; }
.hero .tagline { font-size: 1.1rem; margin-bottom: 0.25rem; }
.hero .subtitle { color: #555; margin-bottom: 1.5rem; }
.cta-group { display: flex; justify-content: center; gap: 0.75rem; flex-wrap: wrap; }

/* Add this: space the Learn/Tools Library button away from the cards (features section only) */
.features .cta-group {
  margin-top: 1.5rem;
}

/* Buttons */
.btn { 
    border: 1px solid #000; 
    color: #000; 
    background: #fff; 
    padding: 0.6rem 1.2rem; 
    text-decoration: none; 
    transition: all 0.2s;
    font-family: Consolas, Monaco, 'Courier New', monospace;
    font-size: 1rem;
    cursor: pointer;
}
.btn:hover { background: #000; color: #fff; }
.btn-primary { background: #000; color: #fff; }
.btn-primary:hover { background: #333; }
.btn-outline { background: #fff; }
.btn-link { border: none; padding: 0.5rem 0; }
.btn-lg { padding: 0.75rem 1.5rem; font-size: 1.1rem; }

.btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.btn:disabled:hover {
    background: #000;
    color: #fff;
}

/* Features Grid */
.features { padding: 2rem 0; }
.features h2 { text-align: center; margin-bottom: 1.5rem; }
.feature-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
    gap: 1.5rem;
}
.feature-card {
    border: 1px solid #ddd;
    padding: 1.25rem;
    border-radius: 4px;
    transition: border-color 0.2s;
}
.feature-card:hover { border-color: #000; }
.feature-card h3 { font-size: 1rem; margin-bottom: 0.5rem; }
.feature-card p { font-size: 0.9rem; color: #444; margin: 0; }

/* Feature Card Icons */
.feature-icon {
    display: inline-block;
    width: 24px;
    height: 24px;
    vertical-align: middle;
    margin-right: 0.4rem;
    background-size: contain;
    background-repeat: no-repeat;
    background-position: center;
}

.icon-purge { background-image: url('/images/home/icon-purge.png'); }
.icon-views { background-image: url('/images/home/icon-views.png'); }
.icon-visualize { background-image: url('/images/home/icon-visualize.png'); }
.icon-annotate { background-image: url('/images/home/icon-annotate.png'); }
.icon-manage { background-image: url('/images/home/icon-manage.png'); }
.icon-coordinate { background-image: url('/images/home/icon-coordinate.png'); }

/* Audience - Expandable Accordion Layout */
.audience { 
    text-align: center; 
    padding: 2rem 0; 
    border-top: 1px solid #eee; 
}
.audience h2 { 
    margin-bottom: 1.5rem; 
    font-size: 1.25rem;
}

.audience-grid {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    max-width: 700px;
    margin: 0 auto;
}

.audience-card {
    text-align: center;
    padding: 0;
}

.audience-toggle {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 0.5rem;
    font-size: 1rem;
    margin-bottom: 0;
    color: #000;
    font-weight: 700;
    cursor: pointer;
    transition: color 0.2s;
}

.audience-toggle:hover {
    color: #333;
}

.toggle-icon {
    font-size: 1.5rem;
    font-weight: 400;
    transition: transform 0.3s ease;
}

.audience-card.expanded .toggle-icon {
    transform: rotate(45deg);
}

.audience-description {
    display: block;
    margin-top: 0.5rem;
    opacity: 1;
    visibility: visible;
}

/* Bottom CTA */
.cta-bottom { text-align: center; padding: 2rem 0 3rem; }

/* Learn Page Layout - Fixed sidebar, scrollable content */
.learn-container {
    display: flex;
    gap: 2rem;
    position: relative;
}

.learn-sidebar {
    flex: 0 0 260px;
    position: fixed;
    top: 70px; /* Below fixed header */
    left: max(1rem, calc((100vw - 1200px) / 2)); /* Align with content container */
    width: 260px;
    height: calc(100vh - 130px); /* Reduced height to leave room for footer */
    overflow-y: auto;
    padding-right: 0.5rem;
    padding-bottom: 1rem; /* Add padding at bottom */
    background: #fff;
}

/* Custom scrollbar for sidebar */
.learn-sidebar::-webkit-scrollbar {
    width: 6px;
}

.learn-sidebar::-webkit-scrollbar-track {
    background: #f1f1f1;
    border-radius: 3px;
}

.learn-sidebar::-webkit-scrollbar-thumb {
    background: #ccc;
    border-radius: 3px;
}

.learn-sidebar::-webkit-scrollbar-thumb:hover {
    background: #999;
}

.learn-content {
    flex: 1 1 auto;
    margin-left: 280px; /* Make room for fixed sidebar */
    padding-left: 1.5rem;
    border-left: 1px solid #ddd;
    min-height: calc(100vh - 200px);
}

/* Sidebar Navigation - Button Theme */
.sidebar-nav ul {
    list-style: none;
    padding: 0;
    margin: 0;
}

.sidebar-nav ul.nested {
    display: none;
    padding-left: 1.2rem;
    border-left: 2px solid #eee;
    margin-left: 0.5rem;
}

.sidebar-nav ul.expanded {
    display: block;
}

.sidebar-nav li {
    margin-bottom: 0.5rem;
}

.sidebar-nav a {
    display: block;
    padding: 0.6rem 0.8rem;
    text-decoration: none;
    color: #222;
    background-color: #fff;
    border: 1px solid #ccc;
    border-radius: 8px;
    transition: background-color 0.2s, color 0.2s;
}

.sidebar-nav a:hover {
    background-color: #333;
    color: #fff;
    border-color: #333;
}

.sidebar-nav a.active {
    background-color: #007bff;
    color: white;
    border-color: #007bff;
}

/* Sidebar Toggle indicators (for expandable menus in sidebar only) */
.sidebar-nav a.nav-toggle::before {
    content: "\2795\00a0";
    font-size: 0.8em;
    font-weight: 100;
    margin-right: 0.35rem;
    display: inline-block;
    line-height: 1;
    font-family: "Segoe UI Symbol", "Segoe UI Emoji", "Noto Color Emoji", system-ui, -apple-system, "Segoe UI", Arial, sans-serif;
    transition: transform 0.15s ease;
}

.sidebar-nav a.nav-toggle.expanded::before {
    content: "\2796\00a0";
}

/* Responsive behavior for smaller screens */
@media (max-width: 768px) {
    .learn-container {
        flex-direction: column;
    }

    .learn-sidebar {
        position: static;
        width: 100%;
        height: auto;
        max-height: 300px;
        overflow-y: auto;
        border-bottom: 1px solid #ddd;
        padding-bottom: 1rem;
        margin-bottom: 1rem;
    }

    .learn-content {
        margin-left: 0;
        border-left: none;
        padding-left: 0;
    }
}

/* Image Lightbox Styles */
.clickable-image {
    cursor: pointer;
    transition: transform 0.2s ease;
}

.clickable-image:hover {
    transform: scale(1.02);
}

.image-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.9);
    justify-content: center;
    align-items: center;
    z-index: 1000;
}

.image-overlay.active {
    display: flex;
}

.image-overlay img {
    max-width: 85%;
    max-height: 85%;
    object-fit: contain;
    border-radius: 4px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.5);
}

/* Lightbox Navigation Buttons */
.lightbox-nav {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background: rgba(255, 255, 255, 0.1);
    color: #fff;
    border: 1px solid rgba(255, 255, 255, 0.3);
    font-size: 1.5rem;
    width: 50px;
    height: 50px;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.2s, border-color 0.2s;
    font-family: Consolas, Monaco, 'Courier New', monospace;
}

.lightbox-nav:hover {
    background: rgba(255, 255, 255, 0.25);
    border-color: rgba(255, 255, 255, 0.5);
}

.lightbox-prev {
    left: 20px;
}

.lightbox-next {
    right: 20px;
}

/* Lightbox Close Button */
.lightbox-close {
    position: absolute;
    top: 20px;
    right: 20px;
    background: rgba(255, 255, 255, 0.1);
    color: #fff;
    border: 1px solid rgba(255, 255, 255, 0.3);
    font-size: 1.5rem;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.2s, border-color 0.2s;
    font-family: Consolas, Monaco, 'Courier New', monospace;
    line-height: 1;
}

.lightbox-close:hover {
    background: rgba(255, 255, 255, 0.25);
    border-color: rgba(255, 255, 255, 0.5);
}

/* Lightbox Counter */
.lightbox-counter {
    position: absolute;
    bottom: 20px;
    left: 50%;
    transform: translateX(-50%);
    color: #fff;
    font-size: 0.9rem;
    background: rgba(0, 0, 0, 0.5);
    padding: 0.4rem 0.8rem;
    border-radius: 4px;
}

/* Responsive adjustments for lightbox */
@media (max-width: 768px) {
    .lightbox-nav {
        width: 40px;
        height: 40px;
        font-size: 1.2rem;
    }

    .lightbox-prev {
        left: 10px;
    }

    .lightbox-next {
        right: 10px;
    }

    .lightbox-close {
        top: 10px;
        right: 10px;
        width: 35px;
        height: 35px;
        font-size: 1.2rem;
    }

    .image-overlay img {
        max-width: 95%;
        max-height: 80%;
    }
}

/* About Page */
.about-hero { text-align: center; padding: 2rem 0; }
.about-hero h1 { font-size: 1.75rem; margin-bottom: 0.5rem; }
.about-hero .lead { font-size: 1rem; color: #444; max-width: 600px; margin: 0 auto; }

.about-story { padding: 1.5rem 0; }
.about-story h2 { font-size: 1.1rem; margin-bottom: 0.5rem; }
.about-story p { color: #333; margin-bottom: 1.5rem; }

.about-benefits { padding: 1.5rem 0; border-top: 1px solid #eee; }
.about-benefits h2 { text-align: center; margin-bottom: 1.5rem; }
.benefit-list { display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: 1.25rem; }
.benefit-item { border: 1px solid #ddd; padding: 1rem; border-radius: 4px; }
.benefit-item:hover { border-color: #000; }
.benefit-item h3 { font-size: 1rem; margin-bottom: 0.4rem; }
.benefit-item p { font-size: 0.9rem; color: #444; margin: 0; }

.about-compatibility { padding: 1.5rem 0; border-top: 1px solid #eee; text-align: center; }
.about-compatibility h2 { margin-bottom: 0.5rem; }
.about-compatibility p { color: #444; }

/* Contact Page */
.contact-hero { text-align: center; padding: 2rem 0 1.5rem; }
.contact-hero h1 { font-size: 2rem; margin-bottom: 0.5rem; }
.contact-hero .lead { color: #444; max-width: 500px; margin: 0 auto; }

.contact-info-centered {
    padding: 2rem 0;
    max-width: 800px;
    margin: 0 auto;
}

.contact-cards-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmin(220px, 1fr));
    gap: 1.5rem;
}

.contact-card {
    border: 1px solid #ddd;
    padding: 1.5rem;
    border-radius: 4px;
    text-align: center;
    transition: border-color 0.2s;
}

.contact-card:hover { border-color: #000; }

.contact-card h3 {
    font-size: 1rem;
    margin-bottom: 0.75rem;
    font-weight: 700;
}

.contact-card p {
    margin: 0;
    color: #444;
    font-size: 0.95rem;
}

.contact-card a { 
    color: #000; 
    text-decoration: none;
    font-weight: 600;
}

.contact-card a:hover { 
    text-decoration: underline;
}

/* Download Page - Registration Form */
.download-section {
    text-align: center;
    padding: 2rem 1rem;
}

.download-form {
    max-width: 500px;
    margin: 2rem auto;
    padding: 2rem;
    border: 1px solid #ddd;
    border-radius: 4px;
}

.form-group {
    margin-bottom: 1.25rem;
}

.form-group label {
    display: block;
    margin-bottom: 0.4rem;
    font-weight: 600;
    color: #000;
}

.form-group input,
.form-group select {
    width: 100%;
    padding: 0.6rem;
    border: 1px solid #ccc;
    border-radius: 4px;
    font-family: Consolas, Monaco, 'Courier New', monospace;
    font-size: 0.95rem;
    box-sizing: border-box;
}

.form-group input:focus,
.form-group select:focus {
    outline: none;
    border-color: #000;
    box-shadow: 0 0 0 2px rgba(0, 0, 0, 0.1);
}

.form-group small {
    display: block;
    margin-top: 0.25rem;
    color: #666;
    font-size: 0.85rem;
}

.error-message {
    color: #c00;
    font-size: 0.9rem;
    margin-top: 0.5rem;
    display: none;
}

.success-message {
    color: #0a0;
    font-size: 0.9rem;
    margin-top: 0.5rem;
    display: none;
}

/* Learn Page - Welcome Content */
.learn-welcome { margin-bottom: 2rem; }
.learn-welcome h1 { font-size: 1.5rem; margin-bottom: 0.5rem; }
.learn-lead { color: #444; font-size: 0.95rem; }

/* Learn Overview Grid */
.learn-overview { margin-bottom: 2rem; }
.learn-overview h2 { font-size: 1.1rem; margin-bottom: 1rem; }

.overview-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1rem;
}

.overview-card {
    border: 1px solid #ddd;
    padding: 1rem;
    border-radius: 4px;
    transition: border-color 0.2s;
}

.overview-card:hover { border-color: #000; }
.overview-card h3 { font-size: 1rem; margin-bottom: 0.4rem; }
.overview-card p { font-size: 0.85rem; color: #444; margin-bottom: 0.5rem; }
.overview-card .tool-count { font-size: 0.8rem; color: #666; font-style: italic; }

/* Learn Quick Start */
.learn-quickstart { margin-bottom: 2rem; }
.learn-quickstart h2 { font-size: 1.25rem; margin-bottom: 0.75rem; }
.learn-quickstart > p { color: #444; margin-bottom: 0.75rem; }

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

.quickstart-list li {
    padding: 0.5rem 0;
    border-bottom: 1px solid #eee;
    font-size: 0.9rem;
}

.quickstart-list li:last-child { border-bottom: none; }
.quickstart-list strong { color: #000; }

/* Learn Hero Image */
.learn-hero-image {
    max-width: 100%;
    height: auto;
    margin-top: 1rem;
    border: 1px solid #eee;
    border-radius: 4px;
}

/* Content Section (for Learn subpages) */
.content-section {
    padding: 1rem 0;
}

.content-section h3 {
    font-size: 1.5rem;
    margin-bottom: 1rem;
    color: #000;
}

.content-section p {
    margin-bottom: 1rem;
    line-height: 1.6;
}

.content-section ol,
.content-section ul {
    margin-bottom: 1rem;
    padding-left: 1.5rem;
}

.content-section li {
    margin-bottom: 0.5rem;
    line-height: 1.6;
}

.content-section img {
    display: block;
    margin: 1rem 0;
    border: 1px solid #eee;
    border-radius: 4px;
}

/* Error text */
.text-danger {
    color: #c00;
}

/* Native Experience Section */
.native-experience { 
    text-align: center; 
    padding: 2rem 0; 
    border-top: 1px solid #eee; 
}

.native-experience h2 { 
    font-size: 1.25rem;
    margin-bottom: 1rem;
}

.native-experience p {
    color: #444;
    font-size: 0.95rem;
    max-width: 700px;
    margin: 0 auto 1.5rem;
    line-height: 1.6;
}

.native-experience img {
    max-width: 100%;
    height: auto;
    border: 1px solid #eee;
    border-radius: 4px;
    margin: 0 auto;
}

/* Highlight text in pastel red */
.highlight-red {
    color: #f46e67;
}
