/**
 * MTENM Website Stylesheet
 * Implements UIUX specification with ADA-compliant design
 */

/* ============================================
   CSS Reset & Base Styles
   ============================================ */

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

/* 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;
    }
}

body {
    font-family: 'Open Sans', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    font-size: 18px;
    line-height: 1.5;
    color: var(--color-charcoal);
    background-color: var(--color-warm-white);
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

/* ============================================
   CSS Custom Properties (Color Variables)
   ============================================ */

:root {
    --color-gold: #FFC940;
    --color-gold-hover: #E0AF33;
    --color-charcoal: #1E1E1F;
    --color-warm-white: #FAFAF7;
    --color-slate: #63666A;
    --color-footer-bg: #FFF5D6;
    --color-focus: #1E90FF;
    --max-width: 1240px;
    --spacing-unit: 1rem;
    
    /* Animation & Transition Variables */
    --transition-base: 0.3s ease;
    --transition-fast: 0.2s ease;
    --transition-slow: 0.5s ease;
    --shadow-sm: 0 2px 4px rgba(0, 0, 0, 0.08);
    --shadow-md: 0 4px 12px rgba(0, 0, 0, 0.1);
    --shadow-lg: 0 8px 24px rgba(0, 0, 0, 0.12);
    --shadow-gold: 0 4px 16px rgba(255, 201, 64, 0.2);
}

/* ============================================
   Typography
   ============================================ */

h1, h2, h3, h4, h5, h6 {
    font-family: 'Merriweather', Georgia, serif;
    font-weight: 700;
    line-height: 1.2;
    color: var(--color-charcoal);
    margin-bottom: 1rem;
    letter-spacing: -0.01em;
}

h1 {
    font-size: clamp(2rem, 5vw, 3rem);
    font-weight: 700;
}

h2 {
    font-size: clamp(1.75rem, 4vw, 2.5rem);
}

h3 {
    font-size: clamp(1.5rem, 3vw, 2rem);
}

p {
    margin-bottom: 1rem;
}

a {
    color: var(--color-charcoal);
    text-decoration: none;
    transition: color 0.2s ease;
}

a:hover {
    color: var(--color-gold-hover);
}

a:focus {
    outline: 3px solid var(--color-focus);
    outline-offset: 2px;
}

/* ============================================
   Layout & Container
   ============================================ */

main {
    min-height: calc(100vh - 200px);
}

.container {
    max-width: var(--max-width);
    margin: 0 auto;
    padding: 0 1.5rem;
}

section {
    padding: 4rem 0;
}

/* ============================================
   Navigation
   ============================================ */

header {
    position: sticky;
    top: 0;
    z-index: 1000;
    background-color: var(--color-warm-white);
    box-shadow: var(--shadow-sm);
}

.main-nav {
    padding: 1rem 0;
}

.nav-container {
    max-width: var(--max-width);
    margin: 0 auto;
    padding: 0 1.5rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 2rem;
}

.nav-logo a {
    font-family: 'Merriweather', serif;
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--color-charcoal);
}

.nav-logo a:hover {
    color: var(--color-gold-hover);
}

.nav-links {
    display: flex;
    list-style: none;
    gap: 2rem;
    flex: 1;
    justify-content: center;
}

.nav-links a {
    font-size: 1rem;
    font-weight: 400;
    padding: 0.5rem 0;
    position: relative;
    transition: color var(--transition-fast);
}

.nav-links a::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 50%;
    right: 50%;
    height: 2px;
    background-color: var(--color-gold-hover);
    transition: all var(--transition-base);
    transform: translateX(-50%);
}

.nav-links a:hover,
.nav-links a.active {
    color: var(--color-gold-hover);
}

.nav-links a:hover::after,
.nav-links a.active::after {
    left: 0;
    right: 0;
    transform: translateX(0);
}

.nav-cta {
    white-space: nowrap;
}

/* ============================================
   Buttons
   ============================================ */

.btn {
    display: inline-block;
    padding: 0.75rem 1.5rem;
    font-family: 'Open Sans', sans-serif;
    font-size: 16px;
    font-weight: 600;
    text-align: center;
    border-radius: 8px;
    border: none;
    cursor: pointer;
    transition: background-color var(--transition-base), border-color var(--transition-base);
    text-decoration: none;
    line-height: 1.5;
}

.btn:focus {
    outline: 3px solid var(--color-focus);
    outline-offset: 2px;
}

/* Primary Button */
.btn-primary {
    background-color: var(--color-gold);
    color: #000000;
    border: 2px solid var(--color-gold);
}

.btn-primary:hover {
    background-color: var(--color-gold-hover);
    border-color: var(--color-gold-hover);
    color: #000000;
}

/* Outline Button */
.btn-outline {
    background-color: transparent;
    color: var(--color-charcoal);
    border: 2px solid var(--color-gold);
}

.btn-outline:hover {
    background-color: var(--color-gold);
    color: #000000;
}

/* Ghost Button */
.btn-ghost {
    background-color: transparent;
    color: var(--color-charcoal);
    border: none;
    text-decoration: underline;
    text-decoration-color: transparent;
}

.btn-ghost:hover {
    color: var(--color-gold-hover);
    text-decoration-color: var(--color-gold-hover);
}

/* Button Sizes */
.btn-large {
    padding: 1rem 2rem;
    font-size: 18px;
}

/* ============================================
   Hero Section
   ============================================ */

.hero {
    background: linear-gradient(135deg, var(--color-warm-white) 0%, #FFF5D6 100%);
    padding: 6rem 0;
    text-align: center;
}

.hero-content {
    max-width: 800px;
    margin: 0 auto;
    padding: 0 1.5rem;
}

.hero h1 {
    margin-bottom: 1rem;
}

.hero p {
    font-size: 1.25rem;
    color: var(--color-slate);
    margin-bottom: 2rem;
}

.hero-cta {
    display: flex;
    gap: 1rem;
    justify-content: center;
    flex-wrap: wrap;
}

/* ============================================
   Mission Section
   ============================================ */

.mission {
    background-color: #ffffff;
    text-align: center;
    padding: 4rem 0;
}

.mission-content {
    max-width: 700px;
    margin: 0 auto;
    padding: 0 1.5rem;
}

.mission p {
    font-size: 1.125rem;
    color: var(--color-slate);
    margin-bottom: 2rem;
}

/* ============================================
   Benefits Strip
   ============================================ */

.benefits-strip {
    background-color: var(--color-warm-white);
    padding: 4rem 0;
}

.benefits-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 3rem;
    max-width: var(--max-width);
    margin: 0 auto;
    padding: 0 1.5rem;
}

.benefit-item {
    text-align: center;
    padding: 2rem 1rem;
    border-radius: 12px;
}

.benefit-icon {
    font-size: 3rem;
    margin-bottom: 1rem;
    display: block;
}

.benefit-item h3 {
    font-size: 1.5rem;
    margin-bottom: 0.5rem;
}

.benefit-item p {
    color: var(--color-slate);
}

/* Benefit item images (small supporting images) */
.benefit-image {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    object-fit: cover;
    margin: 0.75rem auto;
    display: block;
    border: 2px solid var(--color-gold);
    box-shadow: var(--shadow-sm);
}

/* Hero section with background image support */
.hero-image {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    opacity: 0.15;
    z-index: 0;
}

.hero {
    position: relative;
    overflow: hidden;
}

.hero-content {
    position: relative;
    z-index: 1;
}

/* Mission section image */
.mission figure {
    max-width: 250px;
    margin: 0 auto 1.5rem;
}

.mission figure img {
    border-radius: 8px;
    box-shadow: var(--shadow-md);
}

/* ============================================
   Content Sections
   ============================================ */

.content-section {
    padding: 4rem 0;
}

.content-section:nth-child(even) {
    background-color: #ffffff;
}

.content-section:nth-child(odd) {
    background-color: var(--color-warm-white);
}

.section-content {
    max-width: var(--max-width);
    margin: 0 auto;
    padding: 0 1.5rem;
}

.section-content h2 {
    margin-bottom: 1.5rem;
}

.section-content p {
    margin-bottom: 1rem;
    font-size: 1.125rem;
}

.highlight-box {
    background-color: var(--color-footer-bg);
    padding: 2rem;
    border-radius: 8px;
    margin: 2rem 0;
    border-left: 4px solid var(--color-gold);
    box-shadow: var(--shadow-sm);
}

.highlight-box p {
    font-size: 1.25rem;
    font-weight: 600;
    margin: 0;
    color: var(--color-charcoal);
}

/* Two Column Layout */
.two-column {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
    margin: 2rem 0;
}

.two-column ul {
    list-style: none;
    padding-left: 0;
}

.two-column li {
    padding: 0.5rem 0;
    padding-left: 1.5rem;
    position: relative;
}

.two-column li::before {
    content: '•';
    position: absolute;
    left: 0;
    color: var(--color-gold);
    font-weight: bold;
    font-size: 1.5rem;
}

/* ============================================
   Contact Form
   ============================================ */

.contact-form {
    max-width: 600px;
    margin: 0 auto;
    padding: 0 1.5rem;
}

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

.form-group label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 600;
    color: var(--color-charcoal);
}

.form-group input,
.form-group textarea {
    width: 100%;
    padding: 0.75rem;
    font-family: 'Open Sans', sans-serif;
    font-size: 16px;
    border: 2px solid #ddd;
    border-radius: 8px;
    background-color: #ffffff;
    transition: border-color var(--transition-base);
}

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

.form-group textarea {
    min-height: 150px;
    resize: vertical;
}

.form-group .required {
    color: #d32f2f;
}

.error-message {
    color: #d32f2f;
    font-size: 0.875rem;
    margin-top: 0.25rem;
    display: none;
}

.form-group.error .error-message {
    display: block;
}

.form-group.error input,
.form-group.error textarea {
    border-color: #d32f2f;
}

/* Form Messages */
.form-message {
    padding: 1rem 1.5rem;
    border-radius: 8px;
    margin-bottom: 2rem;
    border-left: 4px solid;
    display: none;
}

.form-message.form-success {
    background-color: #d4edda;
    border-color: #28a745;
    color: #155724;
    display: block;
}

.form-message.form-error {
    background-color: #f8d7da;
    border-color: #dc3545;
    color: #721c24;
    display: block;
}

.form-success {
    background-color: #e8f5e9;
    border-color: #4caf50;
    color: #2e7d32;
}

.form-error {
    background-color: #ffebee;
    border-color: #f44336;
    color: #c62828;
}

.form-message strong {
    display: block;
    margin-bottom: 0.5rem;
}

/* ============================================
   Footer
   ============================================ */

.site-footer {
    background-color: var(--color-footer-bg);
    padding: 3rem 0;
    margin-top: 4rem;
}

.footer-container {
    max-width: var(--max-width);
    margin: 0 auto;
    padding: 0 1.5rem;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 3rem;
}

.footer-logo {
    font-family: 'Merriweather', serif;
    font-size: 1.5rem;
    font-weight: 700;
    margin-bottom: 1rem;
}

.footer-info p {
    color: var(--color-slate);
    margin: 0;
}

.footer-nav {
    list-style: none;
    margin-bottom: 1.5rem;
}

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

.footer-nav a {
    color: var(--color-charcoal);
    transition: color 0.2s ease;
}

.footer-nav a:hover {
    color: var(--color-gold-hover);
    text-decoration: underline;
}

/* ============================================
   CTA Section
   ============================================ */

.cta-section {
    text-align: center;
    padding: 4rem 0;
    background-color: var(--color-warm-white);
}

.cta-buttons {
    display: flex;
    gap: 1rem;
    justify-content: center;
    flex-wrap: wrap;
    margin-top: 2rem;
}

/* ============================================
   Responsive Design
   ============================================ */

@media (max-width: 768px) {
    .nav-container {
        flex-direction: column;
        gap: 1rem;
        text-align: center;
    }
    
    .nav-links {
        flex-wrap: wrap;
        justify-content: center;
        gap: 0.75rem 1.5rem;
    }
    
    .nav-cta {
        margin-top: 0.5rem;
    }
    
    .hero {
        padding: 3rem 0;
    }
    
    .hero-cta {
        flex-direction: column;
        align-items: center;
    }
    
    .hero-cta .btn {
        width: 100%;
        max-width: 280px;
    }
    
    .benefits-grid {
        grid-template-columns: 1fr;
        gap: 1.5rem;
    }
    
    .two-column {
        grid-template-columns: 1fr;
    }
    
    .footer-container {
        grid-template-columns: 1fr;
        text-align: center;
    }
    
    .cta-buttons {
        flex-direction: column;
        align-items: center;
    }
    
    .cta-buttons .btn {
        width: 100%;
        max-width: 280px;
    }
    
    section {
        padding: 2.5rem 0;
    }
    
    .resources-grid {
        grid-template-columns: 1fr;
        gap: 1rem;
    }
    
    .mtna-resources-box {
        padding: 1.5rem;
    }
    
    .footer-resource-links {
        flex-direction: column;
        gap: 0.5rem;
    }
    
    .footer-resource-links span {
        display: none;
    }
    
    /* Disable hover transforms on touch devices */
    .btn:hover {
        transform: none;
    }
    
    .benefit-item:hover {
        transform: none;
    }
    
    .resource-link:hover {
        transform: none;
    }
}

@media (max-width: 480px) {
    body {
        font-size: 16px;
    }
    
    .container,
    .nav-container,
    .hero-content,
    .mission-content,
    .section-content {
        padding: 0 1rem;
    }
    
    .nav-links {
        gap: 0.5rem 1rem;
    }
    
    .nav-links a {
        font-size: 0.9375rem;
    }
}

/* ============================================
   MTNA Resources Box
   ============================================ */

.mtna-resources-box {
    background: linear-gradient(135deg, var(--color-footer-bg) 0%, rgba(255, 201, 64, 0.1) 100%);
    padding: 2.5rem;
    border-radius: 12px;
    margin: 2rem 0;
    border: 2px solid var(--color-gold);
    box-shadow: var(--shadow-md);
}

.mtna-resources-box h3 {
    margin-bottom: 1.5rem;
    color: var(--color-charcoal);
    text-align: center;
}

.resources-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 1.5rem;
    margin-top: 1.5rem;
}

.resource-link {
    display: block;
    padding: 1.5rem;
    background-color: #ffffff;
    border-radius: 8px;
    border: 2px solid transparent;
    transition: border-color var(--transition-base), background-color var(--transition-base);
    text-decoration: none;
}

.resource-link:hover {
    border-color: var(--color-gold);
    background-color: var(--color-warm-white);
}

.resource-link strong {
    display: block;
    font-size: 1.125rem;
    color: var(--color-charcoal);
    margin-bottom: 0.5rem;
    font-family: 'Merriweather', serif;
}

.resource-link span {
    display: block;
    font-size: 0.9375rem;
    color: var(--color-slate);
    line-height: 1.4;
}

.resource-link:hover strong {
    color: var(--color-gold-hover);
}

/* Footer Resource Links */
.footer-mtna-links {
    margin-top: 1rem;
}

.footer-resource-links {
    margin-top: 1rem;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.75rem;
    flex-wrap: wrap;
    font-size: 0.9375rem;
}

.footer-resource-links a {
    color: var(--color-charcoal);
    text-decoration: underline;
    text-decoration-color: transparent;
    transition: all var(--transition-fast);
}

.footer-resource-links a:hover {
    color: var(--color-gold-hover);
    text-decoration-color: var(--color-gold-hover);
}

.footer-resource-links span {
    color: var(--color-slate);
}


/* ============================================
   Figures & Captions (Wikipedia-style)
   ============================================ */

figure {
    margin: 1.5rem 0;
    padding: 0;
}

figure img {
    display: block;
    max-width: 100%;
    height: auto;
    border: 1px solid #c8ccd1;
    background: #fff;
}

figcaption {
    padding: 0.5rem 0.75rem;
    font-size: 0.875rem;
    color: var(--color-slate);
    background: #f8f9fa;
    border: 1px solid #c8ccd1;
    border-top: none;
    line-height: 1.4;
}

/* Float figure right (Wikipedia infobox style) */
.figure-right {
    float: right;
    clear: right;
    margin: 0 0 1rem 1.5rem;
    max-width: 300px;
}

/* Float figure left */
.figure-left {
    float: left;
    clear: left;
    margin: 0 1.5rem 1rem 0;
    max-width: 300px;
}

/* Centered figure */
.figure-center {
    margin: 2rem auto;
    max-width: 600px;
    text-align: center;
}

.figure-center img {
    margin: 0 auto;
}

/* Wide figure (full content width) */
.figure-wide {
    margin: 2rem 0;
    max-width: 100%;
}

/* Clear floats after figures */
.clearfix::after {
    content: "";
    display: table;
    clear: both;
}

/* Mobile: stack figures */
@media (max-width: 768px) {
    .figure-right,
    .figure-left {
        float: none;
        margin: 1.5rem auto;
        max-width: 100%;
    }
}

/* ============================================
   News & Events Section
   ============================================ */

.news-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
    margin-top: 2rem;
}

.news-item {
    background-color: var(--color-warm-white);
    border-radius: 12px;
    padding: 2rem;
    box-shadow: var(--shadow-sm);
    transition: box-shadow var(--transition-base);
    display: flex;
    flex-direction: column;
}

.news-item:hover {
    box-shadow: var(--shadow-md);
}

.news-figure {
    margin: 0 0 1.5rem 0;
    border-radius: 8px;
    overflow: hidden;
}

.news-image {
    width: 100%;
    height: auto;
    display: block;
    border-radius: 8px;
    box-shadow: var(--shadow-sm);
}

.news-content {
    flex: 1;
    display: flex;
    flex-direction: column;
}

.news-content h3 {
    margin-bottom: 0.75rem;
    font-size: 1.5rem;
    color: var(--color-charcoal);
}

.news-content p {
    color: var(--color-slate);
    margin-bottom: 1.5rem;
    flex: 1;
}

.news-content .btn {
    align-self: flex-start;
    margin-top: auto;
}

/* Responsive adjustments for news section */
@media (max-width: 768px) {
    .news-grid {
        grid-template-columns: 1fr;
        gap: 1.5rem;
    }
    
    .news-item {
        padding: 1.5rem;
    }
}

/* ============================================
   Print Styles
   ============================================ */

@media print {
    header,
    footer,
    .btn {
        display: none;
    }
    
    body {
        font-size: 12pt;
        line-height: 1.5;
    }
}

