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

/* Font Awesome Icons */
@font-face {
    font-family: 'Font Awesome 6 Free';
    font-style: normal;
    font-weight: 400;
    font-display: block;
    src: url('../fonts/fa-regular-400.woff2') format('woff2');
}

@font-face {
    font-family: 'Font Awesome 6 Free';
    font-style: normal;
    font-weight: 900;
    font-display: block;
    src: url('../fonts/fa-solid-900.woff2') format('woff2');
}

@font-face {
    font-family: 'Font Awesome 6 Brands';
    font-style: normal;
    font-weight: 400;
    font-display: block;
    src: url('../fonts/fa-brands-400.woff2') format('woff2');
}

body {
    /* Enhanced system font stack for better cross-platform compatibility */
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "Roboto", "Helvetica Neue", Arial, sans-serif;
    line-height: 1.6;
    color: #333;
    background-color: #fff;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

/* Links */
a,
a:visited {
    text-decoration: none;
}

a:hover,
a:focus {
    text-decoration: none;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

/* Header Styles */
.header {
    background: #fff;
    border-bottom: 1px solid #e0e0e0;
    padding: 10px 0;
    position: sticky;
    top: 0;
    z-index: 100;
}

.header .container {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 20px;
}

.nav-brand h1, .nav-brand a, .nav-brand a:link, .nav-brand a:visited, .nav-brand a:hover, .nav-brand a:active {
    font-size: 24px;
    font-weight: 700;
    color: #333;
    text-decoration: none;
}

.nav-list {
    display: flex;
    list-style: none;
    gap: 30px;
    align-items: center;
}

.nav-link {
    text-decoration: none;
    color: #666;
    font-weight: 400;
    transition: color 0.3s ease;
}

.nav-link:hover,
.nav-link.active {
    color: #333;
    font-weight: bold;
}

.header-actions {
    display: flex;
    gap: 10px;
}

.btn {
    padding: 8px 16px;
    border: none;
    border-radius: 4px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    text-decoration: none;
    display: inline-block;
}

.btn-donate {
    background: #dc3545;
    color: white;
}

.btn-donate:hover {
    background: #c82333;
}

.btn-submit {
    background: #28a745;
    color: white;
}

.btn-submit:hover {
    background: #218838;
}

/* Main Content */
.main {
    padding: 40px 0;
    flex: 1;
}

/* Home page: center the word cloud in the remaining viewport space */
.page-index .main {
    padding: 0;
    display: flex;
}

.page-index .main > .container {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* Featured Section */
.section-title {
    font-size: 24px;
    margin-bottom: 30px;
    color: #333;
}

.date {
    font-size: 12px;
    color: #999;
}

/* Recent Section */
.recent-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 30px;
}

.recent-item {
    display: flex;
    gap: 15px;
    background: #fff;
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    padding: 20px;
    transition: box-shadow 0.3s ease;
}

.recent-item:hover {
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.recent-image img {
    width: 120px;
    height: 80px;
    object-fit: cover;
    border-radius: 4px;
}

.recent-content h4 {
    font-size: 16px;
    margin-bottom: 8px;
    color: #333;
}

.recent-content p {
    font-size: 14px;
    color: #666;
    margin-bottom: 8px;
    line-height: 1.4;
}

/* Page Styles */
.page-header {
    text-align: center;
    margin-bottom: 50px;
}

.page-title {
    font-size: 36px;
    margin-bottom: 15px;
    color: #333;
    font-weight: bold;
}

.page-subtitle {
    font-size: 18px;
    color: #666;
    max-width: 600px;
    margin: 0 auto;
}

.content-grid {
    display: flex;
    flex-direction: column;
    gap: 40px;
}

.content-section {
    background: #fff;
    padding: 30px;
    border: 1px solid #e0e0e0;
    border-radius: 8px;
}

.content-section h2 {
    font-size: 28px;
    margin-bottom: 20px;
    color: #333;
}

.content-section h3 {
    font-size: 20px;
    margin-bottom: 15px;
    color: #333;
}

.content-section p {
    margin-bottom: 15px;
    line-height: 1.6;
    color: #555;
    text-align: justify;
}

/* Methodology Grid */
.methodology-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 25px;
    margin-top: 25px;
}

.method-item {
    padding: 20px;
    background: #f8f9fa;
    border-radius: 8px;
}

.method-item h3 {
    margin-bottom: 10px;
    color: #333;
}

/* Stats Grid */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 25px;
    margin-top: 25px;
}

.stat-item {
    text-align: center;
    padding: 25px;
    background: #f8f9fa;
    border-radius: 8px;
}

.stat-number {
    font-size: 36px;
    font-weight: 700;
    color: #333;
    margin-bottom: 5px;
}

.stat-label {
    font-size: 14px;
    color: #666;
    text-transform: uppercase;
    letter-spacing: 1px;
}

/* Tech List */
.tech-list {
    list-style: none;
    margin-top: 20px;
}

.tech-list li {
    padding: 10px 0;
    border-bottom: 1px solid #e0e0e0;
}

.tech-list li:last-child {
    border-bottom: none;
}

/* Safety Tips */
.safety-tips {
    list-style: none;
    margin-top: 20px;
    padding: 0;
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.safety-tip {
    display: flex;
    gap: 12px;
    align-items: flex-start;
    padding: 10px 0;
    border-bottom: 1px solid #e0e0e0;
}

.safety-tip:last-child {
    border-bottom: none;
}

.safety-tip-icon {
    flex: 0 0 32px;
    width: 32px;
    height: 32px;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #e3f2fd;
    color: #2196f3;
}

.safety-tip-body p {
    margin: 0;
    color: #555;
    line-height: 1.5;
}

.safety-note {
    margin-top: 16px;
    color: #666;
}

.safety-note i {
    margin-right: 8px;
    color: #999;
}

/* Involvement Grid */
.involvement-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 25px;
    margin-top: 25px;
}

.involvement-item {
    padding: 20px;
    background: #f8f9fa;
    border-radius: 8px;
}

.involvement-item h3 {
    margin-bottom: 10px;
    color: #333;
}

/* Timeline */
.timeline {
    margin-top: 25px;
}

.timeline-item {
    display: flex;
    gap: 25px;
    margin-bottom: 30px;
    padding-bottom: 30px;
    border-bottom: 1px solid #e0e0e0;
}

.timeline-item:last-child {
    border-bottom: none;
}

.timeline-year {
    font-size: 24px;
    font-weight: 700;
    color: #333;
    min-width: 80px;
}

.timeline-content h3 {
    margin-bottom: 10px;
    color: #333;
}

/* Team Grid */
.team-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 18px;
    margin-top: 25px;
}

.team-member {
    padding: 16px 16px 14px;
    background: #fff;
    border: 1px solid #e5e7eb;
    border-radius: 12px;
}

.team-card-header {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 6px;
}

.team-card-icon {
    font-size: 38px;
    color: #111;
    line-height: 1;
    flex: 0 0 auto;
}

.team-card-meta {
    display: flex;
    flex-direction: column;
}

.team-card-name {
    font-size: 18px;
    font-weight: 800;
    letter-spacing: -0.2px;
    color: #0f172a;
}

.team-card-title {
    font-size: 12px;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: #64748b;
    margin: 2px 0 0;
}

.team-card-text {
    margin: 12px 0 0;
    color: #334155;
    font-size: 14.5px;
    line-height: 1.7;
    text-align: left;
}

.team-member .team-card-text {
    max-width: 62ch;
}

.member-role {
    font-size: 18px;
    font-weight: 600;
    margin-bottom: 10px;
    color: #333;
}

/* Legal Points */
.legal-points {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 25px;
    margin-top: 25px;
}

.legal-point {
    padding: 20px;
    background: #f8f9fa;
    border-radius: 8px;
}

.legal-point h3 {
    margin-bottom: 15px;
    color: #333;
}

/* Contact Grid */
.contact-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 25px;
    margin-top: 25px;
}

.contact-method {
    padding: 20px;
    background: #f8f9fa;
    border-radius: 8px;
}

.contact-method h3 {
    margin-bottom: 10px;
    color: #333;
}

/* Highlight Boxes */
.highlight-box {
    background: #e3f2fd;
    padding: 25px;
    border-radius: 8px;
    margin: 25px 0;
    border-left: 4px solid #2196f3;
}

.highlight-box h3 {
    margin-bottom: 15px;
    color: #333;
}

.highlight-box ul {
    list-style: none;
}

.highlight-box li {
    padding: 5px 0;
    color: #555;
}

.warning-box {
    background: #fff3cd;
    padding: 25px;
    border-radius: 8px;
    margin: 25px 0;
    border-left: 4px solid #ffc107;
}

.warning-box h3 {
    margin-bottom: 15px;
    color: #333;
}

/* Footer */
.footer {
    background: #f8f9fa;
    border-top: 1px solid #e0e0e0;
    padding: 20px 0;
    margin-top: 0;
}

.footer-content {
    text-align: center;
    padding: 0;
    margin-bottom: 0;
}

.footer-content p {
    font-size: 12px;
    color: #666;
    margin: 5px 0;
}

.footer-content a {
    color: #666;
    text-decoration: none;
}

.footer-content a:hover {
    color: #333;
}

.footer-section h4 {
    font-size: 16px;
    margin-bottom: 15px;
    color: #333;
}

.footer-section p {
    font-size: 14px;
    color: #666;
    line-height: 1.5;
}

.footer-bottom {
    text-align: center;
    padding-top: 20px;
    border-top: 1px solid #e0e0e0;
}

.social-links {
    display: flex;
    justify-content: center;
    gap: 15px;
}

.social-link {
    font-size: 20px;
    text-decoration: none;
    color: #666;
    transition: color 0.3s ease;
}

.social-link:hover {
    color: #333;
}

.noscript-popup {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 2000;
    background: #c1121f;
    display: flex;
    justify-content: center;
    padding: 14px 18px;
}

.noscript-popup__content {
    width: 100%;
    max-width: 1200px;
    color: #ffffff;
    text-align: center;
    font-weight: 700;
}

.noscript-popup__content strong {
    display: inline;
    margin-right: 8px;
    font-size: 1rem;
    color: #ffffff;
    font-weight: 700;
}

.noscript-popup__content p {
    display: inline;
    margin: 0;
    color: #ffffff;
    font-weight: 700;
}

.js-ready .js-required-warning {
    display: none !important;
}

/* Responsive Design */
@media (max-width: 768px) {
    .header .container {
        flex-direction: column;
        text-align: center;
    }

    .nav-list {
        flex-wrap: wrap;
        justify-content: center;
    }

    .recent-item {
        flex-direction: column;
    }

    .recent-image img {
        width: 100%;
        height: 150px;
    }

    .timeline-item {
        flex-direction: column;
        gap: 10px;
    }

    .page-title {
        font-size: 28px;
    }

    .content-section {
        padding: 20px;
    }
}

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

    .search-container {
        width: 100%;
    }

    .page-title {
        font-size: 24px;
    }

    .stat-number {
        font-size: 28px;
    }
}
