@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;600;700&family=Merriweather:ital,wght@0,300;0,700;1,300&display=swap');

:root {
    /* Color Palette */
    --color-primary: #1e3a5f;      /* Navy Blue */
    --color-primary-dark: #122845; /* Darker Navy */
    --color-secondary: #c61e2c;    /* Cardinal Red */
    --color-secondary-light: #e02f3e;
    --color-accent: #c6a11e;       /* Old Gold */
    --color-accent-light: #d4b43c;
    --color-bg: #f9fbfd;           /* Very light gray/blue */
    --color-surface: #ffffff;
    --color-text: #2e3440;         /* Outer Space */
    --color-text-muted: #6b7280;
    --color-border: #e5e7eb;

    /* Typography */
    --font-sans: 'Inter', sans-serif;
    --font-serif: 'Merriweather', serif;

    /* Transitions & Shadows */
    --transition: all 0.3s ease;
    --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
    --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
    --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
    --glass-bg: rgba(255, 255, 255, 0.85);
}

[data-theme="dark"] {
    --color-bg: #0f172a;           /* Dark slate */
    --color-surface: #1e293b;      /* Slate */
    --color-text: #f8fafc;         /* White-ish */
    --color-text-muted: #94a3b8;
    --color-border: #334155;
    --glass-bg: rgba(30, 41, 59, 0.85);
}

/* Dark Mode Overrides for Typography */
[data-theme="dark"] h1, 
[data-theme="dark"] h2, 
[data-theme="dark"] h3, 
[data-theme="dark"] h4, 
[data-theme="dark"] h5, 
[data-theme="dark"] h6,
[data-theme="dark"] .logo-text,
[data-theme="dark"] .nav-link,
[data-theme="dark"] .content-section h3 {
    color: var(--color-text);
}

[data-theme="dark"] a {
    color: #93c5fd; /* light blue */
}

[data-theme="dark"] .nav-link {
    color: var(--color-text);
}

[data-theme="dark"] .nav-link:hover {
    color: var(--color-secondary-light);
}

[data-theme="dark"] .menu-toggle span {
    background-color: var(--color-text);
}

[data-theme="dark"] .hero h2,
[data-theme="dark"] .hero p {
    color: #ffffff;
}

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

html {
    scroll-behavior: smooth;
    -ms-overflow-style: none;  /* IE and Edge */
    scrollbar-width: none;  /* Firefox */
}

/* Hide scrollbar for Chrome, Safari and Opera */
::-webkit-scrollbar {
    display: none;
}

body {
    font-family: var(--font-sans);
    background-color: var(--color-bg);
    color: var(--color-text);
    line-height: 1.6;
    overflow-x: hidden;
    -ms-overflow-style: none;  /* IE and Edge */
    scrollbar-width: none;  /* Firefox */
}

h1, h2, h3, h4, h5, h6 {
    font-family: var(--font-serif);
    color: var(--color-primary);
    margin-bottom: 1rem;
    line-height: 1.3;
}

a {
    color: var(--color-primary);
    text-decoration: none;
    transition: var(--transition);
}

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

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

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

/* --- HEADER & NAVIGATION --- */
header {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    z-index: 1000;
    background: var(--glass-bg);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border-bottom: 1px solid var(--color-border);
    transition: transform 0.3s ease-in-out, background 0.3s ease;
}

header.scroll-down {
    transform: translateY(-100%);
}

header.scroll-up {
    transform: translateY(0);
    box-shadow: var(--shadow-sm);
}

.nav-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding-top: 1rem;
    padding-bottom: 1rem;
}

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

.logo img {
    height: 3rem;
}

.logo-text {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--color-primary);
    font-family: var(--font-serif);
}

.nav-links {
    display: flex;
    list-style: none;
    gap: 2rem;
    align-items: center;
}

.nav-item {
    position: relative;
}

.nav-link {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-weight: 600;
    color: var(--color-primary-dark);
    padding: 0.5rem 0;
}

.nav-link::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 0;
    height: 2px;
    background-color: var(--color-secondary);
    transition: var(--transition);
}

.nav-link:hover::after {
    width: 100%;
}

/* Dropdown */
.dropdown-content {
    position: absolute;
    top: 100%;
    right: 0;
    background-color: var(--color-surface);
    min-width: 150px;
    box-shadow: var(--shadow-lg);
    border-radius: 0.5rem;
    overflow: hidden;
    opacity: 0;
    visibility: hidden;
    transform: translateY(10px);
    transition: var(--transition);
    z-index: 10;
}

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

.dropdown-item {
    display: block;
    padding: 0.75rem 1rem;
    color: var(--color-text);
    border-bottom: 1px solid var(--color-border);
}

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

.dropdown-item:hover {
    background-color: var(--color-bg);
    color: var(--color-secondary);
}

/* Mobile Controls & Hamburger Menu */
.mobile-theme-toggle {
    display: none;
}
.menu-toggle {
    display: none;
    cursor: pointer;
    flex-direction: column;
    gap: 5px;
    z-index: 1001;
    background: transparent;
    border: none;
    padding: 0;
    outline: none;
    box-shadow: none;
    appearance: none;
    -webkit-appearance: none;
}

.menu-toggle span {
    display: block;
    width: 25px;
    height: 3px;
    background-color: var(--color-primary);
    transition: var(--transition);
    border-radius: 3px;
}

.menu-toggle.open span:nth-child(1) {
    transform: rotate(45deg) translate(5px, 6px);
}

.menu-toggle.open span:nth-child(2) {
    opacity: 0;
}

.menu-toggle.open span:nth-child(3) {
    transform: rotate(-45deg) translate(5px, -6px);
}

/* Mobile Nav */
.mobile-nav {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100vh;
    background-color: var(--color-primary-dark);
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    z-index: 999;
    opacity: 0;
    visibility: hidden;
    transition: var(--transition);
}

.mobile-nav.show {
    opacity: 1;
    visibility: visible;
}

.mobile-nav .nav-link {
    color: #ffffff;
    font-size: 1.5rem;
    margin: 1rem 0;
}

.mobile-nav .nav-link:hover {
    color: var(--color-accent);
}

/* --- HERO SECTION --- */
.hero {
    margin-top: 5rem;
    padding: 6rem 0;
    text-align: center;
    background: linear-gradient(135deg, var(--color-primary-dark) 0%, var(--color-primary) 100%);
    color: var(--color-surface);
    position: relative;
    overflow: hidden;
}

.hero::after {
    content: '';
    position: absolute;
    bottom: -50px;
    left: 0;
    width: 100%;
    height: 100px;
    background-color: var(--color-bg);
    transform: skewY(-2deg);
}

.hero h2 {
    color: #ffffff;
    font-size: 2.5rem;
    margin-bottom: 1.5rem;
}

.hero p {
    color: rgba(255, 255, 255, 0.9);
    font-size: 1.25rem;
    max-width: 800px;
    margin: 0 auto 2rem;
}

.hero .discord-widget {
    margin-top: 3rem;
    border-radius: 1rem;
    overflow: hidden;
    box-shadow: var(--shadow-lg);
    background: var(--color-surface);
    padding: 1rem;
    position: relative;
    z-index: 1;
}

/* --- SECTIONS & CARDS --- */
.section {
    padding: 5rem 0;
}

.section-bg-alt {
    background-color: var(--color-surface);
    border-top: 1px solid var(--color-border);
    border-bottom: 1px solid var(--color-border);
}

.section-title {
    text-align: center;
    font-size: 2.5rem;
    margin-bottom: 3rem;
    position: relative;
    padding-bottom: 1rem;
}

.section-title::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 60px;
    height: 4px;
    background-color: var(--color-secondary);
    border-radius: 2px;
}

.section-subtitle {
    text-align: center;
    font-size: 1.25rem;
    color: var(--color-text-muted);
    margin-bottom: 3rem;
}

.grid-2 {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 3rem;
    align-items: center;
}

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

.card {
    background: var(--color-surface);
    border-radius: 1rem;
    padding: 2.5rem 2rem;
    box-shadow: var(--shadow-md);
    text-align: center;
    transition: var(--transition);
    border: 1px solid var(--color-border);
    height: 100%;
}

.card:hover {
    transform: translateY(-10px);
    box-shadow: var(--shadow-lg);
    border-color: var(--color-accent);
}

.card-icon {
    font-size: 3rem;
    color: var(--color-secondary);
    margin-bottom: 1.5rem;
}

.card-title {
    font-size: 1.5rem;
    margin-bottom: 1rem;
}

.card-desc {
    color: var(--color-text-muted);
    margin-bottom: 2rem;
}

/* --- BUTTONS --- */
.btn {
    display: inline-block;
    padding: 0.75rem 2rem;
    border-radius: 0.5rem;
    font-weight: 600;
    font-family: var(--font-sans);
    cursor: pointer;
    border: none;
    transition: var(--transition);
    text-align: center;
}

.btn-primary {
    background-color: var(--color-secondary);
    color: var(--color-surface);
}

.btn-primary:hover {
    background-color: var(--color-secondary-light);
    color: var(--color-surface);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(198, 30, 44, 0.3);
}

.btn-outline {
    background-color: transparent;
    border: 2px solid var(--color-secondary);
    color: var(--color-secondary);
}

.btn-outline:hover {
    background-color: var(--color-secondary);
    color: var(--color-surface);
}

/* --- CONTENT SECTIONS (Timeline/History) --- */
.timeline {
    position: relative;
    max-width: 800px;
    margin: 0 auto;
    padding-left: 3rem;
}

.content-section {
    position: relative;
    margin-bottom: 3rem;
    background: var(--color-surface);
    padding: 2rem;
    border-radius: 0.5rem;
    box-shadow: var(--shadow-sm);
    border-left: 4px solid var(--color-primary);
}

.content-section::before {
    content: '';
    position: absolute;
    left: -3.5rem;
    top: 2rem;
    width: 1.5rem;
    height: 1.5rem;
    background-color: var(--color-secondary);
    border-radius: 50%;
    border: 4px solid var(--color-bg);
    z-index: 1;
}

.content-section::after {
    content: '';
    position: absolute;
    left: -2.85rem;
    top: 3rem;
    bottom: -4rem;
    width: 4px;
    background-color: var(--color-border);
    z-index: 0;
}

.content-section:last-child::after {
    display: none;
}

.content-section h3 {
    margin-bottom: 1rem;
    color: var(--color-primary);
}

/* --- FORMS --- */
.form-group {
    margin-bottom: 1.5rem;
    text-align: left;
}

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

.form-input, .form-textarea {
    width: 100%;
    padding: 0.75rem 1rem;
    border: 1px solid var(--color-border);
    border-radius: 0.5rem;
    font-family: var(--font-sans);
    transition: var(--transition);
    background-color: var(--color-bg);
}

.form-input:focus, .form-textarea:focus {
    outline: none;
    border-color: var(--color-primary);
    box-shadow: 0 0 0 3px rgba(30, 58, 95, 0.1);
}

/* --- FOOTER --- */
footer {
    background-color: var(--color-primary-dark);
    color: var(--color-surface);
    padding: 4rem 0 2rem;
}

footer h3 {
    color: var(--color-accent);
    font-size: 1.25rem;
    margin-bottom: 1.5rem;
}

footer ul {
    list-style: none;
}

footer li {
    margin-bottom: 0.75rem;
    display: flex;
    align-items: center;
    gap: 0.75rem;
    color: rgba(255, 255, 255, 0.8);
}

footer a {
    color: rgba(255, 255, 255, 0.8);
}

footer a:hover {
    color: var(--color-accent);
}

.footer-bottom {
    text-align: center;
    padding-top: 2rem;
    margin-top: 3rem;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    color: rgba(255, 255, 255, 0.6);
}

/* Table styles */
.data-table {
    width: 100%;
    border-collapse: collapse;
    margin-bottom: 2rem;
    background-color: var(--color-surface);
    box-shadow: var(--shadow-sm);
    border-radius: 0.5rem;
    overflow: hidden;
}

.data-table th, .data-table td {
    padding: 1rem;
    text-align: left;
    border-bottom: 1px solid var(--color-border);
}

.data-table th {
    background-color: var(--color-primary);
    color: var(--color-surface);
    font-weight: 600;
}

.data-table tr:hover {
    background-color: var(--color-bg);
}

/* Gallery */
.gallery {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1.5rem;
}

.gallery img {
    border-radius: 0.5rem;
    box-shadow: var(--shadow-md);
    transition: var(--transition);
    height: 250px;
    width: 100%;
    object-fit: cover;
}

.gallery img:hover {
    transform: scale(1.03);
    box-shadow: var(--shadow-lg);
}

/* Utility Classes */
.text-center { text-align: center; }
.mb-1 { margin-bottom: 0.5rem; }
.mb-2 { margin-bottom: 1rem; }
.mb-3 { margin-bottom: 1.5rem; }
.mb-4 { margin-bottom: 2rem; }
.mt-4 { margin-top: 2rem; }

/* Status Colors */
.text-green { color: #10b981; }
.text-red { color: #ef4444; }
.text-gray { color: var(--color-text-muted); }

/* Animation classes */
.animate-up {
    opacity: 0;
    transform: translateY(20px);
    transition: opacity 0.6s ease, transform 0.6s ease;
}

.animate-up.show {
    opacity: 1;
    transform: translateY(0);
}

/* Lightbox */
.lightbox {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.9);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 2000;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s ease;
}

.lightbox.show {
    opacity: 1;
    visibility: visible;
}

.lightbox img {
    max-width: 90%;
    max-height: 90%;
    border-radius: 0.5rem;
    box-shadow: 0 0 20px rgba(0,0,0,0.5);
    transform: scale(0.9);
    transition: transform 0.3s ease;
}

.lightbox.show img {
    transform: scale(1);
}

.lightbox-close {
    position: absolute;
    top: 1rem;
    right: 2rem;
    color: white;
    font-size: 3rem;
    cursor: pointer;
    transition: color 0.3s ease;
}

.lightbox-close:hover {
    color: var(--color-secondary);
}

.animate-up.show {
    opacity: 1;
    transform: translateY(0);
}

/* Media Queries */
@media (max-width: 1100px) {
    .nav-links {
        display: none;
    }
    .menu-toggle {
        display: flex;
    }
    .mobile-theme-toggle {
        display: block;
    }
    .grid-2, .grid-3, .gallery {
        grid-template-columns: 1fr;
    }
    .hero {
        padding: 4rem 0;
    }
    .hero h2 {
        font-size: 2rem;
    }
    .section-title {
        font-size: 2rem;
    }
    .timeline {
        padding-left: 2rem;
    }
    .content-section::before {
        left: -2.5rem;
    }
    .content-section::after {
        left: -1.85rem;
    }
    .logo-text {
        font-size: 1.2rem;
    }
    .data-table {
        display: block;
        overflow-x: auto;
        white-space: nowrap;
    }
    footer {
        text-align: center;
    }
    footer ul {
        display: inline-block;
        text-align: left;
    }
    footer li {
        justify-content: center;
    }
}

/* Scroll To Top Button */
.scroll-to-top {
    position: fixed;
    bottom: 2rem;
    right: 2rem;
    background-color: var(--color-secondary);
    color: white;
    width: 3.5rem;
    height: 3.5rem;
    border-radius: 50%;
    display: flex;
    justify-content: center;
    align-items: center;
    font-size: 1.5rem;
    cursor: pointer;
    box-shadow: var(--shadow-lg);
    z-index: 1000;
    opacity: 0;
    pointer-events: none;
    transform: translateY(20px);
}

.scroll-to-top:hover {
    background-color: var(--color-secondary-light);
}

/* Skeleton Loader */
.skeleton-loader {
    width: 100%;
    height: 1.5rem;
    background: linear-gradient(90deg, var(--color-border) 25%, var(--color-bg) 50%, var(--color-border) 75%);
    background-size: 200% 100%;
    animation: skeleton-loading 1.5s infinite;
    border-radius: 0.25rem;
    display: none; /* hidden by default, shown by JS if needed */
}

@keyframes skeleton-loading {
    0% { background-position: 200% 0; }
    100% { background-position: -200% 0; }
}
