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

body {
    font-family: system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    line-height: 1.6;
    color: #1f2937;
    background: white;
}

/* Container */
.container {
    max-width: 75rem;
    margin: 0 auto;
    padding: 0 1rem;
}

/* Typography */
h1, h2, h3, h4, h5, h6 {
    font-weight: 600;
    line-height: 1.25;
    margin-bottom: 0.5em;
}

h1 {
    font-size: 2.5rem;
}

h2 {
    font-size: 2rem;
}

h3 {
    font-size: 1.5rem;
}

a {
    color: inherit;
    text-decoration: none;
}

a:hover {
    text-decoration: underline;
}

/* Layout Components */

/* Header */
.header {
    background: white;
    border-bottom: 1px solid #e5e7eb;
    position: sticky;
    top: 0;
    z-index: 50;
}

.nav {
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: 4rem;
}

.nav-brand a {
    font-size: 1.5rem;
    font-weight: bold;
    color: #111827;
    text-decoration: none;
}

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

.nav-link {
    color: #6b7280;
    text-decoration: none;
    font-weight: 500;
    transition: color 0.2s;
}

.nav-link:hover {
    color: #111827;
    text-decoration: none;
}

.nav-link.active {
    color: #111827;
    font-weight: 600;
}

.nav-auth {
    display: flex;
    align-items: center;
    gap: 1rem;
}

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

.hamburger {
    width: 1.5rem;
    height: 0.125rem;
    background: #374151;
    transition: all 0.3s;
}

.mobile-menu {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: white;
    border-bottom: 1px solid #e5e7eb;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
}

.mobile-menu.show {
    display: block;
}

.mobile-menu-content {
    padding: 1rem;
}

.mobile-menu-link {
    display: block;
    padding: 0.75rem 0;
    color: #6b7280;
    text-decoration: none;
    border-bottom: 1px solid #f3f4f6;
}

.mobile-menu-link.active {
    color: #111827;
    font-weight: 600;
}

.mobile-auth {
    margin-top: 1rem;
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

/* Main Content */
.hero {
    background: linear-gradient(135deg, #f9fafb 0%, #f3f4f6 100%);
    padding: 4rem 0;
}

.hero-content {
    text-align: center;
    max-width: 48rem;
    margin: 0 auto;
}

.hero-title {
    font-size: 3rem;
    font-weight: bold;
    margin-bottom: 1.5rem;
    color: #111827;
}

.hero-subtitle {
    font-size: 1.25rem;
    color: #6b7280;
    margin-bottom: 2rem;
}

.section {
    padding: 4rem 0;
}

.section-gray {
    background: #f9fafb;
}

.section-header {
    text-align: center;
    max-width: 48rem;
    margin: 0 auto 3rem;
}

.section-title {
    font-size: 2.25rem;
    font-weight: bold;
    margin-bottom: 1rem;
    color: #111827;
}

.section-subtitle {
    font-size: 1.125rem;
    color: #6b7280;
}

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

.grid-2 {
    grid-template-columns: repeat(auto-fit, minmax(20rem, 1fr));
}

.grid-3 {
    grid-template-columns: repeat(auto-fit, minmax(18rem, 1fr));
}

.grid-4 {
    grid-template-columns: repeat(auto-fit, minmax(12rem, 1fr));
}

/* Cards */
.card {
    background: white;
    border: 1px solid #e5e7eb;
    border-radius: 0.5rem;
    padding: 1.5rem;
    transition: all 0.3s;
}

.card:hover {
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.15);
    transform: translateY(-2px);
}

.card-image {
    height: 10rem;
    background: #d1d5db;
    border-radius: 0.375rem;
    margin-bottom: 1.5rem;
}

.card-title {
    font-size: 1.25rem;
    font-weight: 600;
    margin-bottom: 0.75rem;
}

.card-text {
    color: #6b7280;
    margin-bottom: 1.5rem;
    line-height: 1.6;
}

.card-date {
    color: #9ca3af;
    font-size: 0.875rem;
    font-weight: 500;
}

.card-link {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    color: #111827;
    font-weight: 500;
    text-decoration: none;
    transition: color 0.2s;
}

.card-link:hover {
    color: #374151;
    text-decoration: none;
}

/* Buttons */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0.75rem 1.5rem;
    font-size: 0.875rem;
    font-weight: 500;
    border-radius: 0.375rem;
    border: none;
    cursor: pointer;
    text-decoration: none;
    transition: all 0.2s;
    line-height: 1;
}

.btn-primary {
    background: #111827;
    color: white;
}

.btn-primary:hover {
    background: #1f2937;
    text-decoration: none;
}

.btn-ghost {
    background: transparent;
    color: #374151;
    border: 1px solid #e5e7eb;
}

.btn-ghost:hover {
    background: #f9fafb;
    text-decoration: none;
}

.btn-sm {
    padding: 0.5rem 1rem;
    font-size: 0.75rem;
}

.btn-lg {
    padding: 1rem 2rem;
    font-size: 1rem;
}

.btn-full {
    width: 100%;
}

/* Icons */
.icon {
    width: 1.5rem;
    height: 1.5rem;
}

.icon-sm {
    width: 1rem;
    height: 1rem;
}

/* Footer */
.footer {
    background: #111827;
    color: white;
    padding: 3rem 0 1rem;
}

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

.footer-title {
    font-size: 1.25rem;
    font-weight: bold;
    margin-bottom: 1rem;
}

.footer-subtitle {
    font-size: 1rem;
    font-weight: 600;
    margin-bottom: 1rem;
}

.footer-text {
    color: #d1d5db;
    margin-bottom: 1.5rem;
    line-height: 1.6;
}

.footer-links {
    list-style: none;
}

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

.footer-links a {
    color: #d1d5db;
    text-decoration: none;
    transition: color 0.2s;
}

.footer-links a:hover {
    color: white;
    text-decoration: none;
}

.footer-contact {
    list-style: none;
}

.footer-contact-item {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    margin-bottom: 1rem;
    color: #d1d5db;
}

.footer-contact-item a {
    color: #d1d5db;
    text-decoration: none;
}

.footer-contact-item a:hover {
    color: white;
    text-decoration: none;
}

.social-links {
    display: flex;
    gap: 1rem;
}

.social-link {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 2.5rem;
    height: 2.5rem;
    background: #374151;
    color: #d1d5db;
    border-radius: 0.375rem;
    transition: all 0.2s;
    text-decoration: none;
}

.social-link:hover {
    background: #4b5563;
    color: white;
    text-decoration: none;
}

.footer-bottom {
    text-align: center;
    padding-top: 2rem;
    border-top: 1px solid #374151;
    color: #9ca3af;
}

/* Form Elements */
.form-group {
    margin-bottom: 1.5rem;
}

.form-label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 500;
    color: #374151;
}

.form-input,
.form-textarea,
.form-select {
    width: 100%;
    padding: 0.75rem;
    border: 1px solid #d1d5db;
    border-radius: 0.375rem;
    font-size: 0.875rem;
    transition: all 0.2s;
}

.form-input:focus,
.form-textarea:focus,
.form-select:focus {
    outline: none;
    border-color: #374151;
    box-shadow: 0 0 0 3px rgba(55, 65, 81, 0.1);
}

.form-textarea {
    resize: vertical;
    min-height: 6rem;
}

.form-error {
    color: #dc2626;
    font-size: 0.875rem;
    margin-top: 0.25rem;
}

.form-success {
    color: #059669;
    font-size: 0.875rem;
    margin-top: 0.25rem;
}

/* Team Grid */
.team-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(16rem, 1fr));
    gap: 2rem;
    margin-top: 3rem;
}

.team-card {
    text-align: center;
    background: white;
    border: 1px solid #e5e7eb;
    border-radius: 0.5rem;
    padding: 2rem;
    transition: all 0.3s;
}

.team-card:hover {
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.15);
    transform: translateY(-2px);
}

.team-avatar {
    width: 5rem;
    height: 5rem;
    background: #d1d5db;
    border-radius: 50%;
    margin: 0 auto 1rem;
}

.team-name {
    font-size: 1.125rem;
    font-weight: 600;
    margin-bottom: 0.5rem;
}

.team-role {
    color: #6b7280;
    margin-bottom: 1rem;
}

.team-bio {
    color: #6b7280;
    font-size: 0.875rem;
    line-height: 1.6;
}

/* Stats */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(12rem, 1fr));
    gap: 2rem;
}

.stat-card {
    text-align: center;
    background: white;
    border: 1px solid #e5e7eb;
    border-radius: 0.5rem;
    padding: 2rem;
}

.stat-number {
    font-size: 2.5rem;
    font-weight: bold;
    color: #111827;
    margin-bottom: 0.5rem;
}

.stat-label {
    color: #6b7280;
    font-weight: 500;
}

/* Contact Map */
.contact-map {
    height: 20rem;
    background: #f3f4f6;
    border-radius: 0.5rem;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #6b7280;
    font-size: 1.125rem;
    margin-bottom: 2rem;
}

/* Notifications */
.notification {
    position: fixed;
    top: 1rem;
    right: 1rem;
    background: #111827;
    color: white;
    padding: 1rem 1.5rem;
    border-radius: 0.5rem;
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.25);
    z-index: 100;
    opacity: 0;
    transform: translateX(100%);
    transition: all 0.3s;
}

.notification.show {
    opacity: 1;
    transform: translateX(0);
}

.notification.success {
    background: #059669;
}

.notification.error {
    background: #dc2626;
}

/* Loading States */
.loading {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
}

.spinner {
    width: 1rem;
    height: 1rem;
    border: 2px solid #e5e7eb;
    border-top: 2px solid #374151;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    0% {
        transform: rotate(0deg);
    }
    100% {
        transform: rotate(360deg);
    }
}

/* Pagination */
.pagination {
    display: flex;
    justify-content: center;
    margin-top: 3rem;
}

.pagination-group {
    display: flex;
    gap: 0.5rem;
}

.pagination-btn {
    padding: 0.5rem 1rem;
    border: 1px solid #e5e7eb;
    background: white;
    color: #374151;
    text-decoration: none;
    border-radius: 0.375rem;
    transition: all 0.2s;
    cursor: pointer;
    font-size: 0.875rem;
}

.pagination-btn:hover {
    background: #f9fafb;
}

.pagination-btn.active {
    background: #111827;
    color: white;
    border-color: #111827;
}

.pagination-btn.active:hover {
    background: #1f2937;
}

/* Articles Page Styles */
.filter-bar {
    background: white;
    border-bottom: 1px solid #e5e7eb;
    padding: 1.5rem 0;
    position: sticky;
    top: 4rem;
    z-index: 10;
}

.filter-content {
    display: flex;
    align-items: center;
    gap: 1.5rem;
    flex-wrap: wrap;
}

.filter-group {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.filter-select {
    padding: 0.5rem 1rem;
    border: 1px solid #e5e7eb;
    border-radius: 0.375rem;
    background: white;
    font-size: 0.875rem;
    min-width: 10rem;
}

.search-box {
    position: relative;
    flex-grow: 1;
    max-width: 20rem;
}

.search-input {
    width: 100%;
    padding: 0.5rem 1rem;
    padding-right: 2.5rem;
    border: 1px solid #e5e7eb;
    border-radius: 0.375rem;
    font-size: 0.875rem;
}

.search-icon {
    position: absolute;
    right: 0.75rem;
    top: 50%;
    transform: translateY(-50%);
    color: #6b7280;
    width: 1rem;
    height: 1rem;
}

/* Portfolio Page Styles */
.portfolio-card {
    background: white;
    border: 1px solid #e5e7eb;
    border-radius: 0.5rem;
    overflow: hidden;
    transition: all 0.3s;
}

.portfolio-card:hover {
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.15);
    transform: translateY(-2px);
}

.portfolio-image {
    position: relative;
    height: 12rem;
    background: #d1d5db;
    overflow: hidden;
}

.portfolio-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.8);
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: opacity 0.3s;
}

.portfolio-content {
    padding: 1.5rem;
}

.portfolio-title {
    font-size: 1.125rem;
    font-weight: 600;
    margin-bottom: 0.75rem;
}

.portfolio-category {
    color: #6b7280;
    line-height: 1.5;
}

.filter-btn {
    padding: 0.5rem 1rem;
    border: 1px solid #e5e7eb;
    background: white;
    color: #374151;
    border-radius: 0.375rem;
    transition: all 0.2s;
    cursor: pointer;
    font-size: 0.875rem;
}

.filter-btn:hover {
    background: #f9fafb;
}

.filter-btn.active {
    background: #111827;
    color: white;
    border-color: #111827;
}

/* Forum Page Styles */
.forum-categories {
    background: white;
    border: 1px solid #e5e7eb;
    border-radius: 0.5rem;
    overflow: hidden;
}

.forum-category {
    border-bottom: 1px solid #e5e7eb;
}

.forum-category:last-child {
    border-bottom: none;
}

.forum-category-header {
    padding: 1.5rem;
    display: grid;
    grid-template-columns: auto 1fr auto auto;
    gap: 1rem;
    align-items: center;
    transition: background 0.2s;
}

.forum-category-header:hover {
    background: #f9fafb;
}

.forum-category-icon {
    width: 3rem;
    height: 3rem;
    background: #f3f4f6;
    border-radius: 0.5rem;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #6b7280;
}

.forum-category-title {
    font-size: 1.125rem;
    font-weight: 600;
    margin-bottom: 0.25rem;
}

.forum-category-desc {
    color: #6b7280;
    font-size: 0.875rem;
}

.forum-category-stats {
    display: flex;
    gap: 1rem;
    text-align: center;
}

.forum-stat {
    display: flex;
    flex-direction: column;
    align-items: center;
}

.forum-category-latest {
    text-align: right;
    min-width: 12rem;
}

.forum-topics {
    background: white;
    border: 1px solid #e5e7eb;
    border-radius: 0.5rem;
    overflow: hidden;
}

.forum-topic {
    padding: 1.5rem;
    border-bottom: 1px solid #e5e7eb;
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 2rem;
    transition: background 0.2s;
}

.forum-topic:hover {
    background: #f9fafb;
}

.forum-topic:last-child {
    border-bottom: none;
}

.forum-topic-content {
    flex: 1;
}

.forum-topic-title a {
    color: #1f2937;
    text-decoration: none;
    font-size: 1.125rem;
    font-weight: 600;
}

.forum-topic-title a:hover {
    color: #111827;
}

.forum-topic-stats {
    display: flex;
    gap: 2rem;
    text-align: center;
    flex-shrink: 0;
}

/* Newsletter Form */
.newsletter-form {
    display: flex;
    gap: 0.5rem;
}

.newsletter-input {
    flex: 1;
    padding: 0.75rem 1rem;
    border: 1px solid #e5e7eb;
    border-radius: 0.375rem;
    font-size: 0.875rem;
}

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

.mb-4 {
    margin-bottom: 1rem;
}

.mb-6 {
    margin-bottom: 1.5rem;
}

.mt-4 {
    margin-top: 1rem;
}

.mt-6 {
    margin-top: 1.5rem;
}

.hidden {
    display: none;
}

.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;
}

/* Responsive Design */
@media (max-width: 768px) {
    .nav-menu,
    .nav-auth {
        display: none;
    }

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

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

    .section-title {
        font-size: 1.875rem;
    }

    .grid-3 {
        grid-template-columns: 1fr;
    }

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

    .filter-content {
        flex-direction: column;
        align-items: stretch;
        gap: 1rem;
    }

    .search-box {
        max-width: none;
    }

    .forum-category-header {
        grid-template-columns: auto 1fr;
        gap: 1rem;
    }

    .forum-category-stats,
    .forum-category-latest {
        grid-column: 1 / -1;
        margin-top: 1rem;
        justify-self: start;
        text-align: left;
    }

    .forum-topic {
        flex-direction: column;
        gap: 1rem;
    }

    .forum-topic-stats {
        justify-content: space-around;
        width: 100%;
    }

    .newsletter-form {
        flex-direction: column;
    }

    .footer-content {
        grid-template-columns: 1fr;
        gap: 1.5rem;
    }
}

@media (max-width: 480px) {
    .hero-title {
        font-size: 1.75rem;
    }

    .section-title {
        font-size: 1.5rem;
    }

    .grid-4 {
        grid-template-columns: 1fr;
    }

    .container {
        padding: 0 0.75rem;
    }
}