/* ========================================
   WAYISM HISTORICAL WEBSITE - MAIN CSS
   ======================================== */

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

html {
    font-size: 16px;
    scroll-behavior: smooth;
}

body {
    font-family: 'Georgia', 'Times New Roman', serif;
    font-size: 1rem;
    line-height: 1.6;
    color: #2c1810;
    background-color: #faf8f5;
    overflow-x: hidden;
}

/* Typography */
h1, h2, h3, h4, h5, h6 {
    font-family: 'Arial', 'Helvetica', sans-serif;
    font-weight: 600;
    line-height: 1.3;
    margin-bottom: 0.5em;
    color: #1a0f0a;
}

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

p {
    margin-bottom: 1em;
    color: #2c1810;
}

a {
    color: #8b4513;
    text-decoration: none;
    transition: color 0.3s ease;
}

a:hover {
    color: #654321;
    text-decoration: underline;
}

img {
    max-width: 100%;
    height: auto;
}

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

.skip-to-content {
    position: absolute;
    top: -40px;
    left: 6px;
    background: #000;
    color: white;
    padding: 8px;
    z-index: 1000;
    text-decoration: none;
    border-radius: 4px;
}

.skip-to-content:focus {
    top: 6px;
}

/* Layout Containers */
.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 1rem;
}

.header-container,
.navigation-container,
.hero-container,
.intro-container,
.timeline-container,
.featured-container,
.resources-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 1rem;
}

/* ========================================
   HEADER STYLES
   ======================================== */

.site-header {
    background: linear-gradient(135deg, #8b4513 0%, #a0522d 100%);
    color: white;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.header-container {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 1rem;
    min-height: 80px;
}

.site-brand {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.site-logo {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    background: white;
    padding: 8px;
}

.site-title {
    font-size: 1.5rem;
    font-weight: 700;
    margin: 0;
}

.site-title-link {
    color: white;
    text-decoration: none;
}

.site-title-link:hover {
    color: #f5deb3;
}

.site-tagline {
    font-size: 0.9rem;
    color: #f5deb3;
    margin: 0;
    font-style: italic;
}

/* Language Switcher */
.language-switcher {
    margin-right: 1rem;
}

.language-select {
    background: rgba(255,255,255,0.1);
    border: 1px solid rgba(255,255,255,0.3);
    color: white;
    padding: 0.5rem;
    border-radius: 4px;
    font-size: 0.9rem;
}

.language-select option {
    background: #8b4513;
    color: white;
}

/* Mobile Menu Toggle */
.mobile-menu-toggle {
    display: none;
}

.mobile-menu-btn {
    background: none;
    border: none;
    color: white;
    cursor: pointer;
    padding: 0.5rem;
}

.hamburger-line {
    display: block;
    width: 25px;
    height: 3px;
    background: white;
    margin: 5px 0;
    transition: 0.3s;
    border-radius: 2px;
}

/* Community Banner */
.community-banner {
    background: #654321;
    color: white;
    text-align: center;
    padding: 0.75rem 0;
    border-bottom: 1px solid rgba(255,255,255,0.1);
}

.community-banner-content {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    flex-wrap: wrap;
}

.community-banner-link {
    color: #f5deb3;
    font-weight: 600;
    text-decoration: underline;
    display: inline-flex;
    align-items: center;
    gap: 0.25rem;
}

.community-banner-link:hover {
    color: white;
}

.external-link-icon {
    width: 16px;
    height: 16px;
}

/* ========================================
   NAVIGATION STYLES
   ======================================== */

.main-navigation {
    background: #654321;
    border-bottom: 1px solid rgba(255,255,255,0.1);
}

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

.nav-menu {
    display: flex;
    list-style: none;
    margin: 0;
    padding: 0;
}

.nav-item {
    position: relative;
}

.nav-link {
    display: flex;
    align-items: center;
    padding: 1rem 1.5rem;
    color: white;
    text-decoration: none;
    font-weight: 500;
    transition: background-color 0.3s ease;
    gap: 0.5rem;
}

.nav-link:hover {
    background: rgba(255,255,255,0.1);
    color: white;
}

.dropdown-arrow {
    transition: transform 0.3s ease;
}

.has-dropdown:hover .dropdown-arrow,
.has-dropdown[aria-expanded="true"] .dropdown-arrow {
    transform: rotate(180deg);
}

/* Dropdown Menus */
.dropdown-menu {
    position: absolute;
    top: 100%;
    left: 0;
    background: #4a321c;
    min-width: 250px;
    box-shadow: 0 4px 6px rgba(0,0,0,0.1);
    border-radius: 0 0 4px 4px;
    list-style: none;
    z-index: 100;
    opacity: 0;
    visibility: hidden;
    transform: translateY(-10px);
    transition: all 0.3s ease;
}

.has-dropdown:hover .dropdown-menu,
.has-dropdown[aria-expanded="true"] .dropdown-menu {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.dropdown-link {
    display: block;
    padding: 0.75rem 1rem;
    color: white;
    text-decoration: none;
    transition: background-color 0.3s ease;
}

.dropdown-link:hover {
    background: rgba(255,255,255,0.1);
    color: white;
}

.period-name {
    display: block;
    font-weight: 600;
}

.period-dates {
    display: block;
    font-size: 0.85rem;
    color: #d2b48c;
}

/* Desktop Search */
.desktop-search {
    margin-left: 1rem;
}

.search-form {
    position: relative;
}

.search-input-group {
    display: flex;
    align-items: center;
    background: rgba(255,255,255,0.1);
    border-radius: 24px;
    padding: 0.25rem;
    transition: background-color 0.3s ease;
}

.search-input-group:focus-within {
    background: rgba(255,255,255,0.2);
}

.search-input {
    background: none;
    border: none;
    color: white;
    padding: 0.5rem 1rem;
    font-size: 0.9rem;
    width: 200px;
    outline: none;
}

.search-input::placeholder {
    color: rgba(255,255,255,0.7);
}

.search-submit-btn {
    background: none;
    border: none;
    color: white;
    cursor: pointer;
    padding: 0.5rem;
    border-radius: 50%;
    transition: background-color 0.3s ease;
}

.search-submit-btn:hover {
    background: rgba(255,255,255,0.2);
}

.search-icon {
    width: 20px;
    height: 20px;
}

/* ========================================
   HOMEPAGE STYLES
   ======================================== */

/* Hero Section */
.hero-section {
    background: linear-gradient(135deg, #f5deb3 0%, #deb887 100%);
    padding: 4rem 0;
    border-bottom: 4px solid #8b4513;
}

.hero-container {
    display: grid;
    grid-template-columns: 2fr 1fr;
    gap: 3rem;
    align-items: center;
}

.hero-title {
    font-size: 3rem;
    color: #1a0f0a;
    margin-bottom: 1rem;
    line-height: 1.2;
}

.hero-subtitle {
    font-size: 1.25rem;
    color: #4a321c;
    margin-bottom: 2rem;
    line-height: 1.4;
}

.hero-stats {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 1rem;
    margin-top: 2rem;
}

.stat-item {
    text-align: center;
    padding: 1rem;
    background: rgba(139, 69, 19, 0.1);
    border-radius: 8px;
    border: 2px solid #8b4513;
}

.stat-number {
    display: block;
    font-size: 2rem;
    font-weight: 700;
    color: #8b4513;
    margin-bottom: 0.25rem;
}

.stat-label {
    font-size: 0.9rem;
    color: #4a321c;
    font-weight: 600;
}

.hero-image {
    text-align: center;
}

.hero-img {
    max-width: 100%;
    border-radius: 12px;
    box-shadow: 0 8px 24px rgba(0,0,0,0.1);
}

/* Introduction Section */
.intro-section {
    padding: 4rem 0;
    background: white;
}

.intro-content {
    font-size: 1.1rem;
    line-height: 1.8;
    max-width: 800px;
    margin: 0 auto 3rem;
    text-align: center;
}

.wayism-definition {
    background: linear-gradient(135deg, #faf8f5 0%, #f5deb3 100%);
    border: 2px solid #deb887;
    border-radius: 12px;
    padding: 2rem;
    max-width: 900px;
    margin: 0 auto;
    text-align: center;
}

.wayism-definition h2 {
    color: #8b4513;
    margin-bottom: 1rem;
}

.wayism-definition p {
    font-size: 1.1rem;
    line-height: 1.7;
    margin-bottom: 1.5rem;
}

.learn-more-link {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    background: #8b4513;
    color: white;
    padding: 0.75rem 1.5rem;
    border-radius: 6px;
    font-weight: 600;
    text-decoration: none;
    transition: background-color 0.3s ease;
}

.learn-more-link:hover {
    background: #654321;
    color: white;
}

/* Timeline Overview */
.timeline-overview {
    padding: 4rem 0;
    background: #faf8f5;
}

.timeline-title {
    text-align: center;
    font-size: 2.5rem;
    color: #8b4513;
    margin-bottom: 3rem;
}

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

.timeline-card {
    background: white;
    border: 2px solid #deb887;
    border-radius: 12px;
    padding: 2rem;
    text-align: center;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.timeline-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 8px 24px rgba(139, 69, 19, 0.1);
}

.timeline-period {
    font-size: 0.9rem;
    color: #8b4513;
    font-weight: 600;
    margin-bottom: 0.5rem;
}

.timeline-period-name {
    color: #1a0f0a;
    margin-bottom: 1rem;
}

.timeline-link {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    color: #8b4513;
    font-weight: 600;
    text-decoration: none;
    transition: color 0.3s ease;
}

.timeline-link:hover {
    color: #654321;
}

.arrow-icon {
    width: 16px;
    height: 16px;
    transition: transform 0.3s ease;
}

.timeline-link:hover .arrow-icon {
    transform: translate(2px, -2px);
}

/* Featured Content */
.featured-content {
    padding: 4rem 0;
    background: white;
}

.featured-title {
    text-align: center;
    font-size: 2.5rem;
    color: #8b4513;
    margin-bottom: 3rem;
}

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

.featured-card {
    border: 2px solid #deb887;
    border-radius: 12px;
    overflow: hidden;
    background: #faf8f5;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.featured-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 8px 24px rgba(139, 69, 19, 0.1);
}

.featured-image img {
    width: 100%;
    height: 200px;
    object-fit: cover;
}

.featured-content-text {
    padding: 1.5rem;
}

.featured-meta {
    display: flex;
    gap: 1rem;
    margin-bottom: 1rem;
    font-size: 0.85rem;
}

.featured-section {
    background: #8b4513;
    color: white;
    padding: 0.25rem 0.5rem;
    border-radius: 4px;
    font-weight: 600;
}

.featured-period {
    background: #deb887;
    color: #4a321c;
    padding: 0.25rem 0.5rem;
    border-radius: 4px;
    font-weight: 600;
}

.featured-article-title {
    margin-bottom: 1rem;
}

.featured-article-title a {
    color: #1a0f0a;
    text-decoration: none;
}

.featured-article-title a:hover {
    color: #8b4513;
}

.featured-excerpt {
    color: #4a321c;
    margin-bottom: 1rem;
    line-height: 1.6;
}

.featured-read-more {
    color: #8b4513;
    font-weight: 600;
    text-decoration: none;
}

.featured-read-more:hover {
    color: #654321;
    text-decoration: underline;
}

/* Resources Section */
.resources-section {
    padding: 4rem 0;
    background: #faf8f5;
}

.resources-title {
    text-align: center;
    font-size: 2.5rem;
    color: #8b4513;
    margin-bottom: 3rem;
}

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

.resource-card {
    background: white;
    border: 2px solid #deb887;
    border-radius: 12px;
    padding: 2rem;
    text-align: center;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.resource-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 8px 24px rgba(139, 69, 19, 0.1);
}

.resource-card h3 {
    color: #8b4513;
    margin-bottom: 1rem;
}

.resource-card p {
    color: #4a321c;
    margin-bottom: 1.5rem;
    line-height: 1.6;
}

.resource-link {
    display: inline-block;
    background: #8b4513;
    color: white;
    padding: 0.75rem 1.5rem;
    border-radius: 6px;
    font-weight: 600;
    text-decoration: none;
    transition: background-color 0.3s ease;
}

.resource-link:hover {
    background: #654321;
    color: white;
}

/* Community Funnel Banner */
.community-funnel-banner {
    background: linear-gradient(135deg, #654321 0%, #8b4513 100%);
    color: white;
    padding: 1rem 0;
    text-align: center;
    border-bottom: 2px solid rgba(255,255,255,0.1);
}

.community-funnel-content {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 1.5rem;
    flex-wrap: wrap;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 1rem;
}

.funnel-text {
    font-size: 1.1rem;
    font-weight: 500;
}

.funnel-cta-button {
    background: rgba(255,255,255,0.2);
    color: white;
    padding: 0.75rem 1.5rem;
    border-radius: 6px;
    text-decoration: none;
    font-weight: 600;
    transition: all 0.3s ease;
    border: 1px solid rgba(255,255,255,0.3);
}

.funnel-cta-button:hover {
    background: rgba(255,255,255,0.3);
    color: white;
    transform: translateY(-1px);
}

/* Community CTA Section */
.community-cta-section {
    padding: 4rem 0;
    background: linear-gradient(135deg, #8b4513 0%, #654321 100%);
    color: white;
    text-align: center;
}

.community-cta-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 1rem;
}

.cta-header {
    margin-bottom: 3rem;
}

.cta-title {
    font-size: 2.5rem;
    color: white;
    margin-bottom: 1rem;
}

.cta-subtitle {
    font-size: 1.25rem;
    color: #f5deb3;
    max-width: 800px;
    margin: 0 auto;
    line-height: 1.6;
}

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

.cta-feature {
    background: rgba(255,255,255,0.1);
    padding: 2rem;
    border-radius: 12px;
    border: 1px solid rgba(255,255,255,0.2);
}

.feature-icon {
    font-size: 3rem;
    margin-bottom: 1rem;
}

.cta-feature h3 {
    color: white;
    margin-bottom: 1rem;
    font-size: 1.25rem;
}

.cta-feature p {
    color: #f5deb3;
    line-height: 1.6;
}

.cta-actions {
    display: flex;
    gap: 1rem;
    justify-content: center;
    flex-wrap: wrap;
    margin-bottom: 3rem;
}

.cta-primary-button {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    background: white;
    color: #8b4513;
    padding: 1rem 2rem;
    border-radius: 8px;
    text-decoration: none;
    font-weight: 700;
    font-size: 1.1rem;
    transition: all 0.3s ease;
    box-shadow: 0 4px 12px rgba(0,0,0,0.2);
}

.cta-primary-button:hover {
    background: #f5deb3;
    color: #654321;
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(0,0,0,0.3);
}

.cta-secondary-button {
    display: inline-flex;
    align-items: center;
    background: transparent;
    color: white;
    padding: 1rem 2rem;
    border: 2px solid white;
    border-radius: 8px;
    text-decoration: none;
    font-weight: 600;
    font-size: 1.1rem;
    transition: all 0.3s ease;
}

.cta-secondary-button:hover {
    background: white;
    color: #8b4513;
}

.button-arrow {
    transition: transform 0.3s ease;
}

.cta-primary-button:hover .button-arrow {
    transform: translate(2px, -2px);
}

.cta-testimonial {
    background: rgba(255,255,255,0.1);
    padding: 2rem;
    border-radius: 12px;
    border-left: 4px solid #f5deb3;
    max-width: 800px;
    margin: 0 auto;
}

.cta-testimonial blockquote {
    font-size: 1.2rem;
    font-style: italic;
    color: #f5deb3;
    margin-bottom: 1rem;
    line-height: 1.6;
}

.cta-testimonial cite {
    color: white;
    font-weight: 600;
    font-style: normal;
}

/* Footer Styles */
.site-footer {
    background: #1a0f0a;
    color: #f5deb3;
    padding: 3rem 0 1rem;
}

.footer-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 1rem;
}

.footer-content {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 2rem;
    margin-bottom: 2rem;
}

.footer-section h3,
.footer-section h4 {
    color: white;
    margin-bottom: 1rem;
}

.footer-section ul {
    list-style: none;
    padding: 0;
}

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

.footer-section a {
    color: #f5deb3;
    text-decoration: none;
    transition: color 0.3s ease;
}

.footer-section a:hover {
    color: white;
}

.footer-bottom {
    border-top: 1px solid rgba(245, 222, 179, 0.2);
    padding-top: 1rem;
    text-align: center;
    font-size: 0.9rem;
    color: #d2b48c;
}

.footer-bottom p {
    margin-bottom: 0.5rem;
}

/* ========================================
   ARTICLE SPACING STYLES
   ======================================== */

/* Enhanced Article Spacing for Historical Website */
.article-spacing {
    margin-top: 2.5rem;
    margin-bottom: 2.5rem;
}

.article-spacing + .article-spacing {
    margin-top: 3rem;
}

/* For major section breaks */
.section-break {
    margin-top: 4rem;
    margin-bottom: 4rem;
    padding-top: 2rem;
    border-top: 1px solid #e5e5e5;
}

/* For subsection spacing within article-spacing divs */
.article-spacing h3 {
    margin-top: 2rem;
    margin-bottom: 1rem;
}

.article-spacing h2 {
    margin-top: 2.5rem;
    margin-bottom: 1.5rem;
}

/* Blockquotes within articles */
.article-spacing blockquote {
    margin: 2rem 0;
    padding: 1rem 2rem;
    border-left: 4px solid #8B4513;
    background-color: #f9f7f4;
    font-style: italic;
}

/* Special spacing for scholarly references */
.scholarly-reference {
    margin: 1.5rem 0;
    font-size: 0.95em;
    color: #666;
}

/* Community funnel spacing */
.community-cta {
    margin: 3rem 0;
    padding: 2rem;
    background-color: #f5f3f0;
    border-radius: 8px;
    border-left: 4px solid #8B4513;
}

/* Teaching notes section */
.teaching-notes {
    margin-top: 4rem;
    padding-top: 2rem;
    border-top: 2px solid #8B4513;
    background-color: #faf9f7;
    padding: 2rem;
    border-radius: 8px;
}

@media (max-width: 768px) {
    /* Mobile Header */
    .mobile-menu-toggle {
        display: block;
    }
    
    .site-title {
        font-size: 1.2rem;
    }
    
    .site-tagline {
        display: none;
    }
    
    /* Mobile Navigation */
    .nav-menu {
        display: none;
        position: absolute;
        top: 100%;
        left: 0;
        right: 0;
        background: #4a321c;
        flex-direction: column;
        box-shadow: 0 4px 6px rgba(0,0,0,0.1);
    }
    
    .nav-menu.is-open {
        display: flex;
    }
    
    .nav-link {
        padding: 1rem;
    }
    
    .dropdown-menu {
        position: static;
        box-shadow: none;
        background: #3a2614;
        margin-left: 1rem;
    }
    
    .desktop-search {
        display: none;
    }
    
    /* Mobile Hero */
    .hero-container {
        grid-template-columns: 1fr;
        text-align: center;
    }
    
    .hero-title {
        font-size: 2rem;
    }
    
    .hero-stats {
        grid-template-columns: repeat(2, 1fr);
    }
    
    /* Mobile Timeline */
    .timeline-grid {
        grid-template-columns: 1fr;
    }
    
    /* Mobile Featured */
    .featured-grid {
        grid-template-columns: 1fr;
    }
    
    /* Mobile Resources */
    .resources-grid {
        grid-template-columns: 1fr;
    }
    
    /* Mobile Typography */
    h1 { font-size: 2rem; }
    h2 { font-size: 1.75rem; }
    .timeline-title,
    .featured-title,
    .resources-title {
        font-size: 2rem;
    }
    
    /* Mobile Article Spacing */
    .article-spacing {
        margin-top: 1.5rem;
        margin-bottom: 1.5rem;
    }
    
    .article-spacing + .article-spacing {
        margin-top: 2rem;
    }
}

@media (max-width: 480px) {
    .header-container,
    .navigation-container,
    .hero-container,
    .intro-container,
    .timeline-container,
    .featured-container,
    .resources-container {
        padding: 0 0.5rem;
    }
    
    .hero-section,
    .intro-section,
    .timeline-overview,
    .featured-content,
    .resources-section {
        padding: 2rem 0;
    }
    
    .hero-title {
        font-size: 1.75rem;
    }
    
    .hero-stats {
        grid-template-columns: 1fr;
    }
    
    .stat-item {
        padding: 0.75rem;
    }
    
    /* Small mobile article spacing */
    .article-spacing {
        margin-top: 1rem;
        margin-bottom: 1rem;
    }
}

/* ========================================
   PRINT STYLES
   ======================================== */

@media print {
    .site-header,
    .main-navigation,
    .community-banner,
    .search-container,
    .mobile-menu-toggle,
    .community-funnel,
    .site-footer {
        display: none;
    }
    
    body {
        font-size: 12pt;
        line-height: 1.4;
        color: black;
        background: white;
    }
    
    a {
        color: black;
        text-decoration: underline;
    }
    
    .main-content {
        margin: 0;
        padding: 0;
    }
}
