@import url('https://fonts.googleapis.com/css2?family=Poppins:wght@100;200;300;400;500;600&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;
    overflow-x: hidden;
    background-color: black;
    color: white;
}

header {
    margin-top: 20px;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    padding: 1rem 9%;
    background-color: rgba(0, 0, 0, 0.8);
    display: flex;
    justify-content: space-between;
    align-items: center;
    z-index: 100;
}

.logo img {
    height: 50px;
    cursor: pointer;
    transition: 0.5s ease;
}

.logo img:hover {
    transform: scale(1.1);
}

nav a {
    font-size: 1.8rem;
    color: white;
    margin-left: 4rem;
    font-weight: 500;
    transition: 0.3s ease;
    border-bottom: 3px solid transparent;
}

nav a:first-child {
    margin-left: 0;
}

nav a:hover,
nav a.active {
    color: #48d1cc; /* THEME COLOR */
    border-bottom: 3px solid #48d1cc; /* THEME COLOR */
}

nav {
    display: flex;
    align-items: center;
}

section {
    min-height: 100vh;
    padding: 12rem 9% 5rem;
}

span {
    color: #48d1cc; /* THEME COLOR */
}

.page-title {
    font-size: 5rem;
    text-align: center;
    margin-bottom: 5rem;
}

.card-container {
    display: flex;
    flex-wrap: wrap;
    gap: 3rem;
    justify-content: center;
}

.card {
    background: #111;
    border: 1px solid var(--card-color, #48d1cc);
    border-radius: 1.5rem;
    padding: 3rem;
    flex: 1 1 280px;
    max-width: 360px;
    width: 100%;
    text-align: center;
    box-shadow: 0 0 10px var(--card-shadow, rgba(72, 209, 204, 0.2));
    display: flex;
    flex-direction: column;
    align-items: center;
    transition: all 0.4s cubic-bezier(0.165, 0.84, 0.44, 1);
    position: relative; /* For the full-card link */
    cursor: pointer;
}

.card h3 {
    font-size: 2.5rem;
    margin-bottom: 1rem;
    color: var(--card-color, #48d1cc);
    position: relative;
    z-index: 2;
}

.card-icon {
    width: 60px;
    height: 60px;
    object-fit: contain;
    margin-bottom: 1rem;
    position: relative;
    z-index: 2;
    display: flex;
    align-items: center;
    justify-content: center;
}

.card p {
    font-size: 1.4rem;
    flex-grow: 1;
    position: relative;
    z-index: 2;
    color: #a0aabf;
}

.card .btn {
    display: inline-block;
    padding: 1rem 2.8rem;
    background-color: transparent;
    border-radius: 4rem;
    font-size: 1.6rem;
    letter-spacing: 0.3rem;
    font-weight: 600;
    border: 2px solid var(--card-color, #48d1cc);
    transition: 0.3s ease;
    cursor: pointer;
    color: var(--card-color, #48d1cc);
}

.card .btn:hover {
    transform: scale(1.03);
    background-color: var(--card-color, #48d1cc);
    color: black;
    box-shadow: 0 0 25px var(--card-shadow, #48d1cc);
}

/* Card Hover Effects */
.card:hover {
    transform: translateY(-10px);
    background-color: var(--card-color, #48d1cc);
    box-shadow: 0 10px 25px var(--card-shadow, rgba(72, 209, 204, 0.4));
}

.card:hover h3, 
.card:hover p,
.card:hover .card-icon {
    color: #111 !important;
}

.card:hover .btn {
    background-color: #111;
    color: var(--card-color, #48d1cc);
    border-color: #111;
}

.card:hover .btn:hover {
    background-color: rgba(0, 0, 0, 0.8);
    box-shadow: 0 0 15px rgba(0, 0, 0, 0.5);
}

/* Navbar Dropdown */
.navbar-dropdown {
    position: relative;
    display: inline-block;
    margin-left: 4rem;
}

.navbar-dropdown::before {
    content: '';
    position: absolute;
    left: 0;
    right: 0;
    top: 100%;
    height: 1.5rem; /* This is the bridge height */
    background-color: transparent;
}

.navbar-dropdown-content {
    display: none;
    position: absolute;
    background-color: #111;
    min-width: 260px;
    box-shadow: 0px 8px 16px 0px rgba(0,0,0,0.5);
    z-index: 1;
    border-radius: 0.5rem;
    border: 1px solid #333;
    padding: 0.5rem 0;
    margin-top: 1.5rem;
    left: 50%;
    transform: translateX(-50%);
}

.navbar-dropdown-content a {
    color: white;
    padding: 1.2rem 2rem;
    text-decoration: none;
    display: block;
    font-size: 1.6rem;
    margin-left: 0 !important;
    border-bottom: none !important;
    transition: background-color 0.2s ease;
    font-weight: 500;
    text-align: left;
}

/* Reset margin for the dropdown trigger link, as the container gets the margin */
.navbar-dropdown > a {
    margin-left: 0;
}

.navbar-dropdown-content a:hover {
    background-color: #222;
    color: #48d1cc;
}

/* Responsive Navbar */
.nav-item-store,
.nav-item-affiliates,
.nav-item-ads,
.nav-item-devs,
.nav-item-resources,
.nav-item-about {
    display: inline-block;
}

.nav-dropdown-container {
    position: relative;
    display: none; /* Hidden by default, shown when items collapse */
    margin-left: 2rem;
}

.nav-more-arrow {
    font-size: 2.4rem;
    color: white;
    padding: 0.5rem;
    border-bottom: 3px solid transparent;
    cursor: pointer;
}

.nav-dropdown-content {
    display: none; /* Toggled by JS */
    position: absolute;
    right: 0;
    top: 100%;
    margin-top: 1.5rem;
    background-color: #111;
    min-width: 220px;
    box-shadow: 0px 8px 16px 0px rgba(0,0,0,0.5);
    z-index: 1;
    border-radius: 0.5rem;
    border: 1px solid #333;
    padding: 0.5rem 0;
    overflow: hidden;
}

.nav-dropdown-content a {
    display: none; /* Links inside are hidden by default */
    color: white;
    padding: 1.2rem 2rem;
    font-size: 1.6rem;
    margin-left: 0;
    border-bottom: none;
    transition: background-color 0.2s ease;
    font-weight: 500;
}

.nav-dropdown-content a:hover,
.nav-dropdown-content a.active {
    background-color: #222;
    border-bottom: none;
    color: #48d1cc;
}

.navbar-dropdown:hover .navbar-dropdown-content {
    display: block;
}

.navbar-dropdown:hover > a,
.navbar-dropdown > a.active {
    color: #48d1cc;
    border-bottom-color: #48d1cc;
}

/* Breakpoints for responsive navbar */
@media (max-width: 1250px) {
    nav .nav-item-resources { display: none; }
    .nav-dropdown-container { display: inline-block; }
    .nav-dropdown-content a[href*="resources.html"] { display: block; }
}

@media (max-width: 1150px) {
    nav .nav-item-about { display: none; }
    .nav-dropdown-content a[href*="about.html"] { display: block; }
}

@media (max-width: 1024px) {
    nav .nav-item-devs { display: none; }
    .nav-dropdown-content a[href*="developers.html"] { display: block; }
}

@media (max-width: 920px) {
    nav .nav-item-ads { display: none; }
    .nav-dropdown-content a[href*="ads.html"] { display: block; }
}

@media (max-width: 820px) {
    nav .nav-item-affiliates { display: none; }
    .nav-dropdown-content a[href*="affiliates.html"] { display: block; }
}

@media (max-width: 750px) {
    nav .nav-item-store { display: none; }
    .nav-dropdown-content a[href*="store.html"] { display: block; }
}

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;
    margin-bottom: 5rem;
}

.footer-logo img {
    width: 80px;
    height: auto;
}

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

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

.footer-column h3 {
    font-size: 2rem;
    color: white;
    margin-bottom: 2rem;
    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: #ffa44b;
}

.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: #a0aabf;
    transition: all 0.3s ease;
    border-bottom: none;
    margin-left: 0;
}

.footer-column ul li a:hover {
    color: #ffa44b;
    padding-left: 5px;
    border-bottom: none;
}

.footer-column ul li a[href*="aeropro.html"]:hover { color: #788fff; }
.footer-column ul li a[href*="aeroprogold.html"]:hover { color: #ffe553; }
.footer-column ul li a[href*="courses.html"]:hover { color: #48d1cc; }
.footer-column ul li a[href*="staff/login.html"]:hover { color: #ff65f2; }
.footer-column ul li a[href*="discord.gg"]:hover { color: #5865F2; }

.footer-banner {
    text-align: center;
    padding-top: 4rem;
}

.footer-banner img {
    max-width: 800px;
    width: 100%;
    height: auto;
}

@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 {
    display: flex;
    align-items: flex-start;
    gap: 3rem;
}

@media (max-width: 768px) {
    .footer-left {
        flex-direction: column;
        align-items: center;
    }
}

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

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

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

body.light-theme {
    background-color: white;
    color: black;
}

body.light-theme header {
    background-color: rgba(255, 255, 255, 0.8);
}

body.light-theme nav a,
body.light-theme .nav-more-arrow {
    color: black;
}

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 .card {
    background: white;
    border-color: var(--card-color, #48d1cc);
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.05);
}

body.light-theme .card:hover h3,
body.light-theme .card:hover p,
body.light-theme .card:hover .card-icon {
    color: #111 !important;
}

body.light-theme .navbar-dropdown-content,
body.light-theme .nav-dropdown-content {
    background-color: white;
    border-color: #e0e0e0;
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.1);
}

body.light-theme .navbar-dropdown-content a,
body.light-theme .nav-dropdown-content a {
    color: #1a1a1a;
}

body.light-theme .navbar-dropdown-content a:hover,
body.light-theme .nav-dropdown-content a:hover {
    background-color: #f5f5f5;
}

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

body.light-theme .footer-column h3,
body.light-theme .footer-settings h3 {
    color: black;
}

body.light-theme .footer-column ul li a {
    color: #555;
}

/* Password Gate Styling */
.password-gate-box {
    background: #111;
    border: 1px solid #48d1cc;
    border-radius: 1.5rem;
    padding: 4rem 3rem;
    max-width: 480px;
    width: 90%;
    margin: 0 auto;
    box-shadow: 0 0 25px rgba(72, 209, 204, 0.2);
    text-align: center;
}

.input-group {
    position: relative;
    width: 100%;
    display: flex;
    align-items: center;
}

.input-group .input-icon {
    position: absolute;
    left: 1.6rem;
    font-size: 1.6rem;
    color: #48d1cc;
    pointer-events: none;
    transition: color 0.3s ease;
}

.password-gate-input {
    width: 100%;
    padding: 1.2rem 1.8rem 1.2rem 4.6rem;
    font-size: 1.6rem;
    border-radius: 1rem;
    border: 1px solid #333;
    background: #1a1a1a;
    color: white;
    outline: none;
    transition: border-color 0.3s ease, box-shadow 0.3s ease, background-color 0.3s ease;
}

.password-gate-input:focus {
    border-color: #48d1cc;
    box-shadow: 0 0 12px rgba(72, 209, 204, 0.4);
}

.password-gate-btn {
    width: 100%;
    padding: 1.2rem 2.8rem;
    background-color: transparent;
    border-radius: 4rem;
    font-size: 1.6rem;
    letter-spacing: 0.3rem;
    font-weight: 600;
    border: 2px solid #48d1cc;
    color: #48d1cc;
    cursor: pointer;
    transition: all 0.3s ease;
    margin-top: 1rem;
    text-transform: uppercase;
}

.password-gate-btn:hover {
    transform: scale(1.03);
    background-color: #48d1cc;
    color: black;
    box-shadow: 0 0 25px rgba(72, 209, 204, 0.6);
}

/* Light Theme Support for Password Gate */
body.light-theme .password-gate-box {
    background: white;
    border-color: #48d1cc;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.08);
}

body.light-theme .password-gate-input {
    background: #f9f9f9;
    border-color: #ddd;
    color: #111;
}

body.light-theme .password-gate-input:focus {
    border-color: #48d1cc;
    background: white;
    box-shadow: 0 0 12px rgba(72, 209, 204, 0.4);
}

/* Base Course Styles */
.course-detail-section {
    padding: 15rem 9% 5rem;
    max-width: 90%;
    margin: 0 auto;
    width: 100%;
    overflow-x: hidden;
    box-sizing: border-box;
}

.course-header {
    margin-bottom: 4rem;
    text-align: center;
}

.course-header h1 {
    font-size: 4.5rem;
    margin-bottom: 1rem;
    color: white;
}

.course-header h1 span {
    color: #48d1cc;
}

.course-category {
    display: inline-block;
    padding: 0.8rem 2rem;
    background-color: rgba(72, 209, 204, 0.1);
    color: #48d1cc;
    border-radius: 3rem;
    font-size: 1.4rem;
    font-weight: 500;
    margin-bottom: 2rem;
    border: 1px solid rgba(72, 209, 204, 0.3);
}

.course-content {
    background: #111;
    border: 1px solid #333;
    border-radius: 1.5rem;
    padding: 4rem;
    box-shadow: 0 5px 20px rgba(0,0,0,0.3);
    width: 100%;
    max-width: 100%;
    box-sizing: border-box;
    overflow-wrap: break-word;
    word-wrap: break-word;
}

.course-content h2 {
    font-size: 2.8rem;
    color: #48d1cc;
    margin-bottom: 2rem;
    margin-top: 3rem;
}

.course-content h2:first-child {
    margin-top: 0;
}

.course-content h3 {
    font-size: 2.2rem;
    color: white;
    margin-bottom: 1.5rem;
    margin-top: 2.5rem;
}

.course-content p {
    font-size: 1.6rem;
    color: #a0aabf;
    line-height: 1.8;
    margin-bottom: 2rem;
}

.course-content ul, .course-content ol {
    margin-bottom: 2.5rem;
    padding-left: 2.5rem;
}

.course-content li {
    font-size: 1.6rem;
    color: #a0aabf;
    line-height: 1.8;
    margin-bottom: 1rem;
}

.course-content li strong {
    color: white;
}

.back-btn {
    position: absolute;
    top: 12rem;
    left: 9%;
    padding: 1rem 2rem;
    border-radius: 2rem;
    background: rgba(72, 209, 204, 0.1);
    border: 1px solid rgba(72, 209, 204, 0.3);
    color: #a0aabf;
    font-size: 1.6rem;
    transition: all 0.3s ease;
    z-index: 10;
}

.back-btn i {
    margin-right: 0.8rem;
}

.back-btn:hover {
    color: #111;
    background-color: #48d1cc;
}

/* Light Theme overrides for course content */
body.light-theme .course-content {
    background: white;
    border-color: #eee;
    box-shadow: 0 5px 25px rgba(0,0,0,0.05);
}

body.light-theme .course-header h1,
body.light-theme .course-content h3,
body.light-theme .course-content li strong {
    color: black;
}

body.light-theme .course-content p,
body.light-theme .course-content li,
body.light-theme .back-btn {
    color: #555;
}

body.light-theme .back-btn:hover {
    color: #48d1cc;
}

/* Responsive Media Queries */
@media (max-width: 768px) {
    html {
        font-size: 55%;
    }

    header {
        padding: 1rem 4%;
    }

    section {
        padding: 10rem 5% 4rem;
    }

    .page-title {
        font-size: 3.6rem;
        margin-bottom: 3rem;
    }

    .back-btn {
        position: static;
        display: inline-block;
        margin-bottom: 3rem;
        padding: 0;
        background: transparent;
        border: none;
        color: #a0aabf;
    }

    .back-btn:hover {
        background: transparent;
        color: #48d1cc;
    }

    .course-detail-section {
        padding: 11rem 5% 4rem;
        max-width: 100%;
    }

    .course-header h1 {
        font-size: 3.2rem;
    }

    .course-content {
        padding: 2.5rem 2rem;
    }

    .password-gate-box {
        padding: 3rem 2rem;
        width: 95%;
    }
}

@media (max-width: 480px) {
    html {
        font-size: 50%;
    }

    header {
        padding: 1rem 3%;
    }

    .logo img {
        height: 40px;
    }

    section {
        padding: 9rem 3% 3rem;
    }

    .page-title {
        font-size: 2.8rem;
    }

    .course-header h1 {
        font-size: 2.5rem;
    }

    .course-content {
        padding: 2rem 1.5rem;
        border-radius: 1rem;
    }

    .course-content h2 {
        font-size: 2.2rem;
    }

    .course-content h3 {
        font-size: 1.8rem;
    }

    .card {
        width: 100%;
        max-width: 350px;
        padding: 2rem 1.5rem;
    }

    .password-gate-box {
        padding: 2.5rem 1.5rem;
        border-radius: 1rem;
    }

    .password-gate-btn {
        padding: 1rem 2rem;
        font-size: 1.4rem;
    }
}

/* Completion Button and Styles */
.mark-complete-btn {
    display: inline-block;
    padding: 1rem 2.8rem;
    background-color: transparent;
    border-radius: 4rem;
    font-size: 1.6rem;
    letter-spacing: 0.2rem;
    font-weight: 600;
    border: 2px solid #48d1cc;
    color: #48d1cc;
    cursor: pointer;
    transition: all 0.3s ease;
}

.mark-complete-btn:hover {
    background-color: #48d1cc;
    color: black;
    box-shadow: 0 0 20px rgba(72, 209, 204, 0.5);
}

.mark-complete-btn.completed {
    border-color: #2ecc71;
    color: #2ecc71;
}

.mark-complete-btn.completed:hover {
    background-color: #2ecc71;
    color: black;
    box-shadow: 0 0 20px rgba(46, 204, 113, 0.5);
}

.course-content.completed {
    border: 1px solid #2ecc71;
    background-color: rgba(46, 204, 113, 0.05);
    box-shadow: 0 5px 25px rgba(46, 204, 113, 0.15);
}

body.light-theme .course-content.completed {
    border: 1px solid #2ecc71;
    background-color: rgba(46, 204, 113, 0.1);
    box-shadow: 0 5px 25px rgba(46, 204, 113, 0.2);
}

/* Completed Card Styles on courses.html */
.card.completed-card {
    border-color: #2ecc71;
    background-color: rgba(46, 204, 113, 0.05);
    box-shadow: 0 0 15px rgba(46, 204, 113, 0.15);
}

.card.completed-card h3,
.card.completed-card .card-icon {
    color: #2ecc71 !important;
}

.card.completed-card .btn {
    border-color: #2ecc71;
    color: #2ecc71;
}

.card.completed-card:hover {
    background-color: #2ecc71;
    box-shadow: 0 10px 25px rgba(46, 204, 113, 0.3);
}

.card.completed-card:hover h3,
.card.completed-card:hover p,
.card.completed-card:hover .card-icon {
    color: #111 !important;
}

.card.completed-card:hover .btn {
    background-color: #111;
    color: #2ecc71;
    border-color: #111;
}

body.light-theme .card.completed-card {
    border-color: #2ecc71;
    background-color: rgba(46, 204, 113, 0.1);
    box-shadow: 0 5px 15px rgba(46, 204, 113, 0.15);
}
