@import url('https://fonts.googleapis.com/css2?family=Poppins:wght@300;400;500;600;700&display=swap');

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    text-decoration: none;
    border: none;
    outline: none;
    font-family: 'Poppins', sans-serif;
}

html {
    font-size: 62.5%;
}

body {
    width: 100%;
    min-height: 100vh;
    background-color: black;
    color: white;
}

/* Header & Nav Layout */
header {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    padding: 2rem 9%;
    background-color: rgba(0, 0, 0, 0.9);
    display: flex;
    justify-content: space-between;
    align-items: center;
    z-index: 100;
    border-bottom: 1px solid #222;
}

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

.logo img {
    height: 4rem;
    margin-right: 1rem;
}

.logo h2 {
    font-size: 3rem;
    color: white;
}

.logo span {
    color: #ea4747;
}

nav a {
    font-size: 1.8rem;
    color: white;
    margin-left: 4rem;
    font-weight: 500;
    transition: 0.3s ease;
}

nav a:hover, nav a.active {
    color: #ea4747;
}

/* Main Content Area */
.main-content {
    padding: 12rem 9% 5rem;
}

.header-section {
    text-align: center;
    margin-bottom: 5rem;
}

.header-section h1 {
    font-size: 5rem;
    margin-bottom: 1rem;
}

.header-section span {
    color: #ea4747;
}

.header-section p {
    font-size: 1.6rem;
    color: #ccc;
    max-width: 600px;
    margin: 0 auto 3rem auto;
}

.controls-container {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 2rem;
    flex-wrap: wrap;
    max-width: 800px;
    margin: 0 auto;
}

/* Search Bar Styling */
.search-container {
    position: relative;
    flex-grow: 1;
    max-width: 500px;
}

.sort-container {
    position: relative;
    display: flex;
    align-items: center;
}

.sort-container i {
    position: absolute;
    left: 2rem;
    font-size: 1.6rem;
    color: #ea4747;
    pointer-events: none;
}

.sort-container select {
    -webkit-appearance: none;
    -moz-appearance: none;
    appearance: none;
    padding: 1.5rem 5rem 1.5rem 4.5rem;
    font-size: 1.6rem;
    border-radius: 3rem;
    background: #111;
    color: white;
    border: 2px solid #333;
    transition: 0.3s ease;
    cursor: pointer;
}

.sort-container::after {
    content: '\f078';
    font-family: 'Font Awesome 6 Free';
    font-weight: 900;
    position: absolute;
    right: 2.5rem;
    color: #aaa;
    pointer-events: none;
}

.search-container input {
    width: 100%;
    padding: 1.5rem 2.5rem;
    font-size: 1.6rem;
    border-radius: 3rem;
    background: #111;
    color: white;
    border: 2px solid #333;
    transition: 0.3s ease;
}

.search-container input:focus,
.sort-container select:focus {
    border-color: #ea4747;
    box-shadow: 0 0 15px rgba(234, 71, 71, 0.3);
}

.search-container i {
    position: absolute;
    right: 2.5rem;
    top: 50%;
    transform: translateY(-50%);
    font-size: 2rem;
    color: #ea4747;
}

.blog-grid {
    display: grid;
    /* This creates fixed 320px columns that don't stretch */
    grid-template-columns: repeat(auto-fill, 320px);
    /* This keeps the cards centered even if there is only 1 search result */
    justify-content: center;
    gap: 4rem;
    padding: 2rem;
}

.blog-card {
    background: #111;
    border-radius: 1.5rem;
    overflow: hidden;
    border: 1px solid #333;
    transition: 0.4s ease;
    display: flex;
    flex-direction: column;
    /* Force a fixed width so they don't grow */
    width: 320px; 
    /* Maintain height logic if needed, but width is the priority */
    flex-shrink: 0;
}

.blog-card:hover {
    transform: translateY(-10px);
    border-color: #ea4747;
    box-shadow: 0 10px 25px rgba(234, 71, 71, 0.2);
}

/* YouTube Thumbnail Embed System */
.yt-embed-container {
    position: relative;
    width: 100%;
    padding-top: 56.25%; /* Perfect 16:9 Aspect Ratio */
    cursor: pointer;
    overflow: hidden;
}

.yt-thumbnail {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: 0.4s ease;
}

.yt-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.7);
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    opacity: 0;
    transition: 0.4s ease;
}

.yt-overlay i {
    font-size: 5rem;
    color: #ff0000;
    margin-bottom: 1rem;
    filter: drop-shadow(0 0 15px rgba(255,0,0,0.5));
}

.yt-overlay span {
    font-size: 1.8rem;
    font-weight: 600;
    color: white;
}

.yt-embed-container:hover .yt-thumbnail {
    transform: scale(1.1);
}

.yt-embed-container:hover .yt-overlay {
    opacity: 1;
}

/* Blog Text Formatting */
.blog-info {
    padding: 2.5rem;
    display: flex;
    flex-direction: column;
    flex-grow: 1;
}

.blog-info h2 {
    font-size: 2.2rem;
    margin-bottom: 1rem;
    color: white;
}

.blog-info .date {
    font-size: 1.3rem;
    color: #ea4747;
    margin-bottom: 1.5rem;
    font-weight: 500;
}

.blog-info p {
    font-size: 1.4rem;
    color: #bbb;
    line-height: 1.6;
    margin-bottom: 2.5rem;
    flex-grow: 1;
}

/* Unified Button Style */
.btn {
    display: inline-block;
    padding: 1.2rem 2rem;
    background-color: black;
    border-radius: 3rem;
    font-size: 1.4rem;
    color: #ea4747;
    text-align: center;
    font-weight: 600;
    border: 2px solid #ea4747;
    transition: 0.3s ease;
    cursor: pointer;
    margin-top: auto; /* Pushes button to bottom of card */
}

.btn:hover {
    background-color: #ea4747;
    color: black;
    box-shadow: 0 0 15px #ea4747;
    transform: scale(1.02);
}

/* Special Button Variants */
.btn-discord {
    background-color: rgba(0, 0, 0, 0.3);
    border-color: #5865F2;
    color: #5865F2;
}

.btn-discord:hover {
    background-color: #5865F2;
    color: white;
    box-shadow: 0 0 15px #5865F2;
}

/* --- Join Us Page Styles --- */
.join-us-container {
    max-width: 900px;
    margin: 0 auto;
}

.page-intro {
    text-align: center;
    margin-bottom: 5rem;
}

.page-intro p {
    font-size: 1.8rem;
    line-height: 1.6;
    margin-bottom: 3rem;
    color: #ccc;
}

.steps-container {
    background: #111;
    padding: 4rem;
    border-radius: 1.5rem;
    border: 1px solid #333;
    text-align: center;
}

.steps-container h2 {
    font-size: 3rem;
    margin-bottom: 2rem;
}

.steps-list {
    display: flex;
    flex-direction: column;
    gap: 2rem;
    align-items: center;
}

.step-card {
    width: 100%;
    max-width: 600px;
    padding: 2rem;
    background: rgba(0,0,0,0.3);
    border-radius: 1rem;
}

.step-card h3 {
    color: #ea4747;
    font-size: 2rem;
    margin-bottom: 1rem;
}

.step-card p {
    font-size: 1.5rem;
    color: #ccc;
}

.step-card .btn {
    margin-top: 1.5rem;
}

.page-footer-note {
    text-align: center;
    margin-top: 5rem;
}

.page-footer-note p {
    font-size: 1.4rem;
    color: #777;
}

.highlight-aero {
    color: #788fff;
    font-weight: 600;
}

/* --- About Page Styles --- */
.about-title,
.page-title {
    font-size: clamp(4rem, 10vw, 6rem);
    font-weight: 700;
    text-align: center;
    margin-bottom: 1rem;
}

.about-title span,
.page-title span,
.steps-container h2 span,
.section-heading span {
    color: #ea4747;
}

.section-heading {
    text-align: center;
    font-size: 3rem;
    margin-top: 4rem;
    margin-bottom: 3rem;
}

.team-photo, .gallery-photo {
    transition: 0.3s ease;
}

.team-photo {
    width: 180px;
    height: 180px;
    border-radius: 50%;
    border: 3px solid #ea4747;
    margin-bottom: 1.5rem;
    object-fit: cover;
}

.team-photo:hover {
    transform: scale(1.05);
    box-shadow: 0 0 25px rgba(234, 71, 71, 0.5);
}

.gallery-photo {
    width: 400px;
    height: 225px;
    object-fit: cover;
    border-radius: 1.5rem;
    border: 2px solid #ea4747;
    box-shadow: 0 0 15px rgba(234, 71, 71, 0.2);
}

.gallery-photo:hover {
    transform: scale(1.05);
    box-shadow: 0 0 25px rgba(234, 71, 71, 0.4);
}

@media (max-width: 400px) {
    .blog-grid {
        grid-template-columns: 1fr;
    }
    .blog-card {
        width: 100%;
    }
}

/* Footer Styles */
footer {
    background-color: #050505;
    padding: 5rem 9% 0;
    border-top: 1px solid #222;
    overflow-x: hidden;
}

.footer-top-content {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    flex-wrap: wrap;
    gap: 4rem;
    padding-bottom: 5rem;
}

.footer-left {
    display: flex;
    align-items: flex-start;
    gap: 3rem;
}

.footer-logo h2 {
    font-size: 2.4rem;
    color: white;
}

.footer-logo span {
    color: #ea4747;
}

.footer-settings {
    padding-top: 0.5rem;
}

.footer-settings h3 {
    font-size: 1.4rem;
    color: #999;
    margin-bottom: 0.5rem;
    font-weight: 500;
    text-align: left;
}

.footer-links-container {
    display: flex;
    justify-content: flex-end;
    flex-wrap: wrap;
    gap: 4rem;
}

.footer-column {
    min-width: 140px;
}

.footer-column h3 {
    font-size: 1.8rem;
    color: white;
    margin-bottom: 1.5rem;
    position: relative;
    padding-bottom: 1rem;
    font-weight: 600;
}

.footer-column h3::after {
    content: '';
    position: absolute;
    left: 0;
    bottom: 0;
    width: 40px;
    height: 2px;
    background-color: #ea4747;
}

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

.footer-column ul li {
    margin-bottom: 1.2rem;
}

.footer-column ul li a {
    font-size: 1.5rem;
    color: #999;
    transition: 0.3s ease;
}

.footer-column ul li a:hover {
    color: #ea4747;
    padding-left: 5px;
}

@media (max-width: 768px) {
    .footer-top-content {
        flex-direction: column;
        align-items: center;
        text-align: center;
    }
    .footer-links-container {
        justify-content: center;
        width: 100%;
    }
    .footer-column h3::after {
        left: 50%;
        transform: translateX(-50%);
    }
    .footer-left {
        flex-direction: column;
        align-items: center;
    }
}

/* Theme Toggle */
.theme-switch {
    position: relative;
    display: inline-block;
    width: 60px;
    height: 34px;
}

.theme-switch input {
    opacity: 0;
    width: 0;
    height: 0;
}

.switch-slider {
    position: absolute;
    cursor: pointer;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: #1a1a1a;
    border: 1px solid #333;
    transition: .4s;
    border-radius: 34px;
}

.switch-icon-container {
    position: absolute;
    height: 26px;
    width: 26px;
    left: 3px;
    bottom: 3px;
    background-color: #a0aabf;
    transition: .4s;
    border-radius: 50%;
    display: flex;
    justify-content: center;
    align-items: center;
    color: #1a1a1a;
    font-size: 1.4rem;
}

.theme-switch input:checked + .switch-slider .switch-icon-container {
    transform: translateX(26px);
}

.switch-slider .fa-sun { display: none; }
.theme-switch input:checked + .switch-slider .fa-moon { display: none; }
.theme-switch input:checked + .switch-slider .fa-sun { display: block; }

/* Light Theme */
body.light-theme {
    background-color: white;
    color: #1a1a1a;
}

body.light-theme header {
    background-color: rgba(255, 255, 255, 0.9);
    border-bottom-color: #e0e0e0;
}

body.light-theme .logo h2 {
    color: #1a1a1a;
}

body.light-theme nav a {
    color: #1a1a1a;
}

body.light-theme .switch-slider {
    background-color: #f0f0f0;
    border-color: #dcdcdc;
}

body.light-theme .switch-icon-container {
    background-color: #555;
    color: #f0f0f0;
}

body.light-theme input:checked + .switch-slider .switch-icon-container {
    background-color: #a0aabf;
    color: #1a1a1a;
}

body.light-theme footer {
    background-color: #f7f7f7;
    border-top-color: #e0e0e0;
}

body.light-theme .footer-logo h2 {
    color: #1a1a1a;
}

body.light-theme .footer-column h3 {
    color: #1a1a1a;
}

body.light-theme .footer-column ul li a,
body.light-theme .footer-settings h3 {
    color: #666;
}

body.light-theme .header-section p {
    color: #555;
}

body.light-theme .search-container input,
body.light-theme .sort-container select {
    background: #f5f5f5;
    border-color: #ddd;
    color: #1a1a1a;
}

body.light-theme .blog-card {
    background: white;
    border-color: #e0e0e0;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.05);
}

body.light-theme .blog-card:hover {
    border-color: #ea4747;
}

body.light-theme .blog-info h2 {
    color: #1a1a1a;
}

body.light-theme .blog-info p {
    color: #555;
}

body.light-theme .join-us-container p,
body.light-theme .page-intro p,
body.light-theme .page-footer-note p {
    color: #555;
}

body.light-theme .steps-container {
    background: white;
    border-color: #e0e0e0;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.05);
}

body.light-theme .step-card {
    background: #f5f5f5;
}

body.light-theme .step-card p {
    color: #555;
}