/**
 * Astra Base Framework CSS
 * Version: 1.1.0 Emergency Release
 *
 * Base Astra theme styles adapted for static HTML website
 * Maintains Astra design principles with AMMOcoin customizations
 */

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

html {
    font-size: 16px;
    line-height: 1.6;
    scroll-behavior: smooth;
    -webkit-text-size-adjust: 100%;
}

body {
    font-family: 'Didact Gothic', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
    font-size: 1rem;
    line-height: 1.6;
    color: #ffffff;
    background-color: #000000;
    overflow-x: hidden;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

/* Container and Layout */
.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
    width: 100%;
}

@media (max-width: 768px) {
    .container {
        padding: 0 15px;
    }
}

/* Typography */
h1, h2, h3, h4, h5, h6 {
    font-family: 'Play', sans-serif;
    font-weight: 700;
    line-height: 1.2;
    margin-bottom: 1rem;
    color: #ffffff;
}

h1 { font-size: 2.5rem; }
h2 { font-size: 2rem; }
h3 { font-size: 1.5rem; }
h4 { font-size: 1.25rem; }
h5 { font-size: 1.125rem; }
h6 { font-size: 1rem; }

@media (max-width: 768px) {
    h1 { font-size: 2rem; }
    h2 { font-size: 1.75rem; }
    h3 { font-size: 1.25rem; }
}

p {
    margin-bottom: 1rem;
    color: #cccccc;
}

a {
    color: #32cd32;
    text-decoration: none;
    transition: color 0.3s ease;
}

a:hover, a:focus {
    color: #28a428;
    text-decoration: underline;
}

/* Buttons */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 12px 24px;
    font-family: 'Play', sans-serif;
    font-size: 1rem;
    font-weight: 600;
    text-decoration: none;
    border: 2px solid transparent;
    border-radius: 40px;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    overflow: hidden;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    min-width: 140px;
    gap: 8px;
}

.btn-primary {
    background: linear-gradient(135deg, #32cd32 0%, #28a428 100%);
    color: #000000;
    border-color: #32cd32;
}

.btn-primary:hover {
    background: linear-gradient(135deg, #28a428 0%, #1e7a1e 100%);
    color: #000000;
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(50, 205, 50, 0.3);
    text-decoration: none;
}

.btn-secondary {
    background: transparent;
    color: #32cd32;
    border-color: #32cd32;
}

.btn-secondary:hover {
    background: #32cd32;
    color: #000000;
    transform: translateY(-2px);
    text-decoration: none;
}

.btn-outline {
    background: transparent;
    color: #ffffff;
    border-color: #444444;
}

.btn-outline:hover {
    background: #444444;
    color: #32cd32;
    border-color: #32cd32;
    text-decoration: none;
}

.btn-emergency {
    background: linear-gradient(135deg, #ff4444 0%, #cc3333 100%);
    color: #ffffff;
    border-color: #ff4444;
    animation: pulse-emergency 2s infinite;
}

.btn-emergency:hover {
    background: linear-gradient(135deg, #cc3333 0%, #aa2222 100%);
    color: #ffffff;
    transform: translateY(-2px);
    text-decoration: none;
}

@keyframes pulse-emergency {
    0%, 100% { box-shadow: 0 0 0 0 rgba(255, 68, 68, 0.7); }
    50% { box-shadow: 0 0 0 10px rgba(255, 68, 68, 0); }
}

.btn-icon {
    font-size: 1.1em;
}

/* Navigation Header */
.site-header {
    background: rgba(0, 0, 0, 0.95);
    backdrop-filter: blur(10px);
    border-bottom: 1px solid #1a1a1a;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1000;
    transition: all 0.3s ease;
}

.site-header.scrolled {
    background: rgba(0, 0, 0, 0.98);
    box-shadow: 0 2px 20px rgba(0, 0, 0, 0.3);
}

.main-navigation {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 1rem 0;
    position: relative;
}

.nav-brand .brand-name {
    font-family: 'Jura', sans-serif;
    font-size: 1.8rem;
    font-weight: 700;
    margin: 0;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.brand-accent {
    color: #32cd32;
}

.version-badge {
    background: linear-gradient(135deg, #32cd32 0%, #28a428 100%);
    color: #000000;
    font-size: 0.7rem;
    padding: 2px 8px;
    border-radius: 12px;
    font-weight: 600;
}

.nav-menu {
    display: flex;
    align-items: center;
}

.nav-list {
    display: flex;
    list-style: none;
    margin: 0;
    padding: 0;
    gap: 2rem;
}

.nav-item {
    position: relative;
}

.nav-link {
    color: #ffffff;
    font-family: 'Play', sans-serif;
    font-weight: 500;
    padding: 0.5rem 0;
    transition: color 0.3s ease;
    position: relative;
}

.nav-link:hover,
.nav-link.active {
    color: #32cd32;
    text-decoration: none;
}

.nav-link.emergency {
    color: #ff6b6b;
    animation: pulse-nav 2s infinite;
}

@keyframes pulse-nav {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.7; }
}

/* Dropdown Menus */
.dropdown {
    position: relative;
}

.dropdown-toggle {
    display: flex;
    align-items: center;
    gap: 0.3rem;
}

.dropdown-arrow {
    font-size: 0.8rem;
    transition: transform 0.3s ease;
}

.dropdown:hover .dropdown-arrow {
    transform: rotate(180deg);
}

.dropdown-menu {
    position: absolute;
    top: 100%;
    left: 0;
    background: rgba(26, 26, 26, 0.98);
    backdrop-filter: blur(10px);
    border: 1px solid #333333;
    border-radius: 8px;
    min-width: 200px;
    opacity: 0;
    visibility: hidden;
    transform: translateY(-10px);
    transition: all 0.3s ease;
    list-style: none;
    padding: 0.5rem 0;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5);
}

.dropdown:hover .dropdown-menu {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.dropdown-menu li {
    margin: 0;
}

.dropdown-menu a {
    display: block;
    color: #cccccc;
    padding: 0.75rem 1.5rem;
    transition: all 0.3s ease;
    border-left: 3px solid transparent;
}

.dropdown-menu a:hover {
    color: #32cd32;
    background: rgba(50, 205, 50, 0.1);
    border-left-color: #32cd32;
    text-decoration: none;
}

/* Mobile Menu */
.mobile-menu-toggle {
    display: none;
    flex-direction: column;
    background: none;
    border: none;
    cursor: pointer;
    padding: 0.5rem;
    gap: 4px;
}

.hamburger-line {
    width: 25px;
    height: 3px;
    background: #32cd32;
    transition: all 0.3s ease;
    transform-origin: center;
}

.mobile-menu-toggle.active .hamburger-line:nth-child(1) {
    transform: rotate(45deg) translate(6px, 6px);
}

.mobile-menu-toggle.active .hamburger-line:nth-child(2) {
    opacity: 0;
}

.mobile-menu-toggle.active .hamburger-line:nth-child(3) {
    transform: rotate(-45deg) translate(6px, -6px);
}

@media (max-width: 1024px) {
    .nav-menu {
        position: fixed;
        top: 100%;
        left: 0;
        right: 0;
        background: rgba(0, 0, 0, 0.98);
        backdrop-filter: blur(20px);
        transform: translateX(-100%);
        transition: transform 0.3s ease;
        border-top: 1px solid #333333;
        max-height: calc(100vh - 80px);
        overflow-y: auto;
    }

    .nav-menu.active {
        transform: translateX(0);
    }

    .nav-list {
        flex-direction: column;
        padding: 2rem 0;
        gap: 0;
    }

    .nav-item {
        width: 100%;
        border-bottom: 1px solid #1a1a1a;
    }

    .nav-link {
        display: block;
        padding: 1rem 2rem;
        width: 100%;
    }

    .dropdown-menu {
        position: static;
        opacity: 1;
        visibility: visible;
        transform: none;
        background: rgba(26, 26, 26, 0.5);
        border: none;
        border-radius: 0;
        box-shadow: none;
        margin-left: 1rem;
    }

    .mobile-menu-toggle {
        display: flex;
    }
}

/* Main Content */
.main-content {
    margin-top: 80px; /* Account for fixed header */
}

/* Sections */
section {
    padding: 4rem 0;
}

@media (max-width: 768px) {
    section {
        padding: 2rem 0;
    }
}

.section-header {
    text-align: center;
    margin-bottom: 3rem;
}

.section-header h2 {
    font-size: 2.5rem;
    margin-bottom: 1rem;
    background: linear-gradient(135deg, #32cd32 0%, #28a428 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.section-header p {
    font-size: 1.1rem;
    color: #aaaaaa;
    max-width: 600px;
    margin: 0 auto;
}

/* Grid Layouts */
.grid {
    display: grid;
    gap: 2rem;
}

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

@media (max-width: 1024px) {
    .grid-4 { grid-template-columns: repeat(2, 1fr); }
    .grid-3 { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 768px) {
    .grid-4,
    .grid-3,
    .grid-2 {
        grid-template-columns: 1fr;
    }
}

/* Cards */
.card {
    background: linear-gradient(135deg, #1a1a1a 0%, #0f0f0f 100%);
    border: 1px solid #333333;
    border-radius: 12px;
    padding: 2rem;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(135deg, rgba(50, 205, 50, 0.1) 0%, transparent 50%);
    opacity: 0;
    transition: opacity 0.3s ease;
}

.card:hover {
    transform: translateY(-5px);
    border-color: #32cd32;
    box-shadow: 0 10px 30px rgba(50, 205, 50, 0.2);
}

.card:hover::before {
    opacity: 1;
}

/* Lists */
ul, ol {
    margin-bottom: 1rem;
    padding-left: 1.5rem;
}

li {
    margin-bottom: 0.5rem;
    color: #cccccc;
}

/* Forms */
input, textarea, select {
    width: 100%;
    padding: 0.75rem 1rem;
    background: #1a1a1a;
    border: 1px solid #333333;
    border-radius: 8px;
    color: #ffffff;
    font-family: inherit;
    font-size: 1rem;
    transition: all 0.3s ease;
}

input:focus, textarea:focus, select:focus {
    outline: none;
    border-color: #32cd32;
    box-shadow: 0 0 0 3px rgba(50, 205, 50, 0.2);
}

input::placeholder, textarea::placeholder {
    color: #666666;
}

/* Utilities */
.text-center { text-align: center; }
.text-left { text-align: left; }
.text-right { text-align: right; }

.mb-1 { margin-bottom: 1rem; }
.mb-2 { margin-bottom: 2rem; }
.mb-3 { margin-bottom: 3rem; }

.mt-1 { margin-top: 1rem; }
.mt-2 { margin-top: 2rem; }
.mt-3 { margin-top: 3rem; }

.hidden { display: none; }
.visible { display: block; }

/* Accessibility */
.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

/* Focus styles for accessibility */
*:focus {
    outline: 2px solid #32cd32;
    outline-offset: 2px;
}

button:focus,
a:focus {
    outline: 2px solid #32cd32;
    outline-offset: 2px;
}

/* ========================================
   CONTENT LAYOUTS & RESPONSIVE IMAGES
   ======================================== */

/* Page Title Styles */
.page-title {
    text-align: center;
    padding: 2rem 0;
    margin-bottom: 2rem;
}

.title-main {
    font-family: 'Play', sans-serif;
    font-size: 3rem;
    font-weight: 700;
    color: #32cd32;
    margin-bottom: 1rem;
}

/* Content Row Layout */
.content-row {
    display: flex;
    align-items: center;
    gap: 3rem;
    margin: 3rem 0;
    padding: 2rem 0;
}

.content-row.reverse {
    flex-direction: row-reverse;
}

.content-text {
    flex: 1;
    min-width: 0; /* Prevents flex item from overflowing */
}

.content-image {
    flex: 1;
    display: flex;
    justify-content: center;
    align-items: center;
    min-width: 0;
}

/* Responsive Image Styles */
.feature-image {
    max-width: 100%;
    height: auto;
    width: auto;
    max-height: 60vh; /* Limit height to 60% of viewport height */
    object-fit: contain;
    display: block;
}

/* Text Styling */
.text-large {
    font-family: 'Inconsolata', monospace;
    font-size: 1.125rem;
    line-height: 1.7;
    color: #ffffff;
    margin-bottom: 1.5rem;
}

.text-accent {
    color: #32cd32;
    text-decoration: none;
    transition: color 0.3s ease;
}

.text-accent:hover {
    color: #5bd75b;
}

/* Mobile Responsive Layout */
@media (max-width: 768px) {
    .content-row,
    .content-row.reverse {
        flex-direction: column;
        gap: 2rem;
        text-align: center;
    }

    .title-main {
        font-size: 2.5rem;
    }

    .feature-image {
        max-height: 50vh; /* Smaller on mobile */
        width: 100%;
        max-width: 400px; /* Limit max width on mobile */
    }

    .text-large {
        font-size: 1rem;
        text-align: left;
    }

    .page-title {
        padding: 1.5rem 0;
        margin-bottom: 1.5rem;
    }
}

@media (max-width: 480px) {
    .feature-image {
        max-height: 40vh;
        max-width: 300px;
    }

    .title-main {
        font-size: 2rem;
    }

    .content-row {
        margin: 2rem 0;
        padding: 1rem 0;
    }
}

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

/* Print styles */
@media print {
    * {
        background: transparent !important;
        color: black !important;
        box-shadow: none !important;
        text-shadow: none !important;
    }

    a,
    a:visited {
        text-decoration: underline;
    }

    .site-header,
    .site-footer,
    .emergency-banner {
        display: none !important;
    }
}

/* High contrast mode support */
@media (prefers-contrast: high) {
    .card {
        border: 2px solid #ffffff;
    }

    .btn {
        border-width: 3px;
    }
}