/* General Body Styles */
body {
    /* font-family: "Helvetica Neue", Helvetica, Arial, sans-serif; */
    line-height: 1.6;
    /* color: #333; */
    /* background-color: #fff; */
    margin: 0;
    padding: 0;
    display: flex;
    flex-direction: column;
    min-height: 100vh;
}

.centered-container {
    flex-grow: 1;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* Container */
.container {
    margin-left: 20px;
    margin-right: 20px;
    padding: 2em;
    /* background-color: #fff; */
    padding-bottom:-20px;
    margin-bottom:-20px;
}

/* Header */
.main-header {
    background-color: #2c3e50;
    padding: 1em 2em;
    border-bottom: 1px solid #e7e7e7;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.main-header .logo {
    flex: 1;
}

.main-header .logo img {
    max-height: 50px;
}

.main-header nav {
    flex: 0 0 auto;
}

/* Navigation */
nav ul {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
}

nav li {
    margin-left: 20px;
}

nav a {
    text-decoration: none;
    color: inherit;
    font-weight: bold;
    padding: 5px 10px;
    border-radius: 4px;
    transition: background-color 0.3s;
}

nav a:hover, nav a.active {
    background-color: rgba(255, 255, 255, 0.05);
    color: inherit;
}

/* Main Content */
main {
    display: flex;
    padding: -1em;
    max-width: 1100px;
    margin: 0 auto;
}

.content {
    flex-grow: 1;
}

/* Course Navigation */
.course-nav {
    width: 300px;
    margin-right: 1em;
    padding-right: 1em;
    flex-shrink: 0;
    border-right: 1px solid #e7e7e7;
}

.course-nav ul {
    list-style: none;
    padding: 0;
}

.course-nav li {
    margin-bottom: 0.5em;
}

.course-nav a {
    text-decoration: none;
    color: #94a3b8;
}

.course-nav details summary {
    font-weight: bold;
}

.course-nav details ul {
    padding-left: 40px;
    list-style-type: square;
}

.course-nav a:hover, .course-nav a.active-topic {
    color: #C5A059;
}

/* Post Navigation */
.post-nav {
    display: flex;
    justify-content: space-between;
    align-items: center;
    position: sticky;
    bottom: 0;
    background-color: #181a1e;
    padding: 1em;
    border-top: 1px solid #363b44;
}

.post-nav a:first-child {
    margin-right: auto;
}

.post-nav a:last-child {
    margin-left: auto;
}

/* Breadcrumbs */
.breadcrumbs {
    margin-bottom: 1em;
    font-size: 0.9em;
    color: #555;
}

.breadcrumbs a {
    color: #555;
    text-decoration: none;
}

.breadcrumbs a:hover {
    text-decoration: underline;
}

/* Typography */
h1, h2, h3, h4, h5, h6 {
    font-family: "Helvetica Neue", Helvetica, Arial, sans-serif;
    color: #e2e8f0;
}

a {
    color: #C5A059;
}

a:hover {
    text-decoration: underline;
}

/* Footer */
footer {
    text-align: center;
    padding: 2em;
    margin-top: -2em;
    border-top: 1px solid #e7e7e7;
    font-size: 0.9em;
    color: #777;
}

/* Mobile Styles */
@media (max-width: 850px) {
    .main-header {
        flex-direction: column;
        align-items: flex-start;
        padding: 1em;
    }

    .main-header nav {
        margin-top: 1em;
    }

    nav ul {
        flex-wrap: wrap;
        justify-content: center;
    }

    nav li {
        margin: 5px;
    }

    main {
        flex-direction: column;
    }

    .course-nav {
        display: none;
    }

    .container {
        padding: 0;
    }

    .post-nav {
        margin: 0 -1em;
    }

    iframe {
        width: 100%;
        height: auto;
    }
}

/* Homepage specific styles */
.homepage .content {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
}



.homepage h1 span {
    display: block;
}

.homepage .image-gallery {
    display: flex;
    justify-content: center;
    gap: 20px;
    margin-top: 2em;
    flex-wrap: wrap;
    width: 100%; /* This is the new addition */
    /* padding-bottom: 10em; */
}

.homepage .image-gallery img {
    width: 30%; /* Changed from max-width */
    height: auto;
    border-radius: 8px;
}

.homepage h1 {
    font-size: 4.5rem;
    font-weight: 900;
    line-height: 1;
    margin: 0;
    max-width: 100%;
    position: relative; /* Needed for z-index */
    z-index: 2; /* Bring the h1 text to the front */
}

.homepage svg {
    

}

.homepage .hero-svg {
    margin-top: -4em; /* Increased negative margin */
    margin-bottom: -7em; /* Increased negative margin */    
        position: relative;
    z-index: 1;
}

.homepage .bottom-text-svg {
    width: 90%; /* Match the image gallery width */
    max-width: 1100px;
}
.homepage .bottom-text-svg text {
    fill: #222;
}

/* Button Styles */
.button-container {
    text-align: center;
    margin-top: 2em;
}

.button {
    display: inline-block;
    background-color: #007acc;
    color: #fff;
    padding: 15px 30px;
    font-size: 1.2em;
    font-weight: bold;
    text-decoration: none;
    border-radius: 5px;
    transition: background-color 0.3s;
    cursor: pointer;
}

.button:hover {
    background-color: #005f9e;
}

/* Forum Link Button */
.forum-link-container {
    text-align: center;
    margin-top: 2em;
}

.forum-link-button {
    display: inline-block;
    background-color: #2c3e50;
    color: #fff;
    padding: 15px 30px;
    font-size: 1.2em;
    font-weight: bold;
    text-decoration: none;
    border-radius: 5px;
    transition: background-color 0.3s;
}

.forum-link-button:hover {
    background-color: #1a252f;
    color: #fff;
    text-decoration: none;
}

/* Responsive Videos */
.video-container {
    position: relative;
    width: 100%;
    padding-bottom: 56.25%; /* 16:9 aspect ratio */
    height: 0;
}

.video-container iframe {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
}

/* Scroll Indicator */
.scroll-indicator {
    position: absolute;
    bottom: 20px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    flex-direction: column;
    align-items: center;
}

.scroll-indicator span {
    display: block;
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background-color: #fff;
    margin: 4px;
    animation: scroll 1.5s infinite;
}

.scroll-indicator span:nth-child(2) {
    animation-delay: 0.2s;
}

.scroll-indicator span:nth-child(3) {
    animation-delay: 0.4s;
}

@keyframes scroll {
    0% {
        opacity: 0;
        transform: translateY(0);
    }
    50% {
        opacity: 1;
    }
    100% {
        opacity: 0;
        transform: translateY(20px);
    }
}

/* Membership bubbles */
.membership-bubble {
  display: inline-block;
  padding: 0.25rem 0.75rem;
  border-radius: 1rem;
  font-weight: bold;
  margin: 0 0.25rem;
  background-color: #181a1e;
  border: 1px solid #C5A059;
  color: #C5A059;
}

.membership-bubble-Free,
.membership-bubble-Skills,
.membership-bubble-Apprentice,
.membership-bubble-Master {
    background-color: #181a1e;
    color: #C5A059;
    border: 1px solid #C5A059;
}

.membership-bubble-None {
    background-color: #181a1e;
    color: #94a3b8;
    border: 1px solid #363b44;
}

.membership-required-message {
  text-align: center;
  padding: 2rem;
  background: #23262d;
  color: #e2e8f0;
  border: 1px solid #363b44;
  border-radius: 5px;
}

.course-content {
    width: 56rem;
    max-width: 100%;
}

/* Content Grid Layout */
.content-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    gap: 2em;
    padding: 1em 0;
}

.content-card {
    border: 1px solid #363b44;
    border-radius: 8px;
    background-color: #1e2127;
    overflow: hidden;
    transition: transform 0.2s, box-shadow 0.2s;
    display: flex;
    flex-direction: column;
    text-decoration: none;
    color: inherit;
}

.content-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 5px 15px rgba(0,0,0,0.3);
    text-decoration: none !important;
}

/* Ensure no underline on children elements when hovering the card */
.content-card:hover * {
    text-decoration: none !important;
}

/* Override prose defaults for content cards */
.prose a.content-card {
    text-decoration: none !important;
    color: inherit;
}

.prose a.content-card:hover {
    text-decoration: none !important;
}

.content-card:hover .content-card-title {
    color: #C5A059;
}

.content-card-image {
    width: 100%;
    height: 180px;
    object-fit: cover;
    background-color: #2c3e50;
    border-bottom: 1px solid #363b44;
}

.content-card-body {
    padding: 1.5em;
    flex-grow: 1;
    display: flex;
    flex-direction: column;
}

.content-card-title {
    margin-top: 0;
    margin-bottom: 0.5em;
    font-size: 1.25em;
}

.content-card-title a {
    text-decoration: none;
    color: #e2e8f0;
}

.content-card-title a:hover {
    color: #C5A059;
}

.content-card-description {
    font-size: 0.9em;
    color: #94a3b8;
    margin-bottom: 1em;
    flex-grow: 1;
}

.content-card-meta {
    font-size: 0.8em;
    color: #777;
    margin-top: auto;
}

/* Clerk Billing */
#clerk-billing {
    display: flex;
    justify-content: center;
    margin-top: 2rem;
    width: 100%;
}

/* Reset list styles inside Clerk to prevent prose interference */
#clerk-billing ul {
    margin: 0 !important;
    padding: 0 !important;
    list-style: none !important;
    gap: 0.5rem !important;
}

#clerk-billing li {
    margin: 0 !important;
    padding: 0.25rem 0 !important;
    list-style: none !important;
    line-height: 1.4 !important;
}

#clerk-billing li > span {
    margin: 0 !important;
    padding: 0 !important;
}

/* Clerk Social Buttons Fix */
.cl-socialButtonsBlockButton {
    background-color: #e2e8f0 !important; /* Light grey */
    color: #181a1e !important; /* Dark text */
    border: 1px solid #94a3b8 !important;
}

.cl-socialButtonsBlockButton:hover {
    background-color: #cbd5e1 !important;
}

/* Ensure specific buttons look correct */
.cl-socialButtonsBlockButton__github {
    background-color: #24292e !important;
    color: #ffffff !important;
}
.cl-socialButtonsBlockButton__github:hover {
    background-color: #181a1e !important;
}

.cl-socialButtonsBlockButton__google {
    background-color: #ffffff !important;
    color: #000000 !important;
}
.cl-socialButtonsBlockButton__google:hover {
    background-color: #f1f5f9 !important;
}
