/* Calendly bounded shell: reserves space to prevent layout shift */
.calendly-shell {
    position: relative;
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
    height: 800px; /* desktop default */
    border-radius: 0px;
    overflow: hidden;
    background: var(--background-color);
}

/* Tablet */
@media (min-width: 768px) and (max-width: 1023.98px) {
    .calendly-shell {
        height: 1150px;
    }
}

/* Mobile */
@media (max-width: 767.98px) {
    .calendly-shell {
        height: 950px;
    }
}

@import url('https://fonts.googleapis.com/css?family=Merriweather');

html {
    overflow-x: hidden;
}

:root {
    font-size: 16px;
    --background-color: #EFEDE6;
    --text-color: #000;

    --box-background-color: #F5F4F0;
    --header-background-color: #EFEDE6;
    --svg-fill-color: #FFF;
    --svg-stroke-color: #000;
}

@media screen and (max-width: 800px) {
    .about-container {
        flex-direction: column; /* Stack columns on smaller screens */
    }
}

/* Global hyperlink styling */
a {
    color: #001fcf; /* Use text color from your defined variables */
    text-decoration: none; /* Remove underline */
    transition: color 0.2s; /* Smooth transition for hover effects */
}

a:hover {
    color: #5d75ff; /* Slightly lighter color on hover */
}

/* Orange variant used for some article cards on index */
.bg-orange {
    background-color: #C03D1A;
}

.about-container{
    border: 6px solid black; /* Adds a black border */
    padding: 20px; /* Optional: adds some padding inside the border */
    border-radius: 15px; /* Rounds the corners of the border */
    box-sizing: border-box; /* Ensures the padding and border are included in the element's total width/height */
}

/* Global body style */
body {
    font-family: 'Merriweather', serif;
    color: var(--text-color);
    line-height: 1.3;
    background-color: var(--background-color);
    padding: 1rem; 
}
/* CTA button styles */
.cta-button {
    display: inline-flex; /* Use flex for better alignment */
    align-items: center;
    justify-content: center;
    padding: 0.75rem 1.25rem;
    background-color: black;
    color: #EFEDE6;
    text-decoration: none;
    border: 3px solid #EFEDE6;
    border-radius: 20px;
    font-weight: bold;
    cursor: pointer;
    font-family: inherit; /* ensure consistent font */
    font-size: 1rem; /* ensure consistent size */
    line-height: 1.4;
    margin: 0; /* reset margins */
    box-sizing: border-box;
    min-height: 44px; /* ensure consistent height */
}

/* Hover effect for CTA buttons */
.cta-button:hover {
    transform: scale(1.02);
    transition: transform 0.2s ease;
}

/* Secondary button variation */
.cta-button.secondary-button {
    background-color: transparent;
    color: black;
    border-color: black;
}
.about-container {
    display: flex;
    gap: 1rem; /* Adds space between columns */
    align-items: stretch; /* Ensures both columns have the same height */
}

/* Left column styling */
.left-column {
    flex: 1; /* Takes up more space than the right column */
    display: flex;
    flex-direction: column; /* Stacks items vertically */
    justify-content: flex-start; /* Aligns items at the top */
}

/* Article card header colors */
.card-header.article-header {
    background-color: #C03D1A;
}

.card-header.project-header {
    background-color: #2D8B31;
}

/* Right column styling */
.right-column {
    flex: 1.2; /* Slightly more space than the left column */
    display: flex;
    flex-direction: column;
    justify-content: flex-start;
    padding: 0; /* Remove padding */
}



/* Ensure the injected iframe uses light color-scheme to avoid forced opaque backgrounds */
#calendly-embed > iframe,
.calendly-embed > iframe {
    width: 100%;
    height: 100%;
    min-height: 320px;
    border: 0;
    background: transparent;
    display: block;
    /* fallback blend if Calendly still renders white areas */
    mix-blend-mode: multiply;
}

/* Cal.com embed theming */
.cal-embed {
    background: var(--background-color);
    color: var(--text-color);
    border-radius: 10px;
    overflow: hidden;
}

.cal-embed iframe {
    width: 100%;
    height: 100%;
    border: 0;
    background: transparent;
}

.cal-loading-skeleton { background: var(--background-color); }

/* Small utility to ensure inner cal controls use brand color when possible */
:root {
    --cal-brand-fallback: #000000;
}



header {
    display: flex;
    flex-direction: column;
    align-items: center; /* Centers header content horizontally */
    justify-content: center; /* Centers header content vertically */
    position: relative; /* Correct the positioning */
}
/* Header title */
header h1 {
    font-family: 'Arial', sans-serif;
    font-size: 4rem;
    margin-left: 1.3rem;
    position: center;
    z-index: 2;
        border-radius: 9px; /* Rounded edges */
}

#logoContainer {
    display: flex;
    justify-content: center; /* Centers horizontally */
    align-items: center; /* Centers vertically */
    position: relative;
}

/* Adjust logo position and animation */
#logoSvg {
    position: absolute; /* Positioning behind the text */
    top: 22px; /* Adjust this to move the logo vertically */
    left: 245px; /* Adjust this to move the logo horizontally */
    z-index: 1; /* Ensure the logo is behind the text */
    width: 60px; /* Adjust the width to fit the design */
}

/* SVG styles */
#logoSvg svg {
    width: 125%;
    height: auto;
}

        .content {
            display: none;
            padding: 10px;
            border: 1px solid #ccc;
            border-top: none;
        }

/* Job and education section spacing */
h2 {
    font-size: 2em;
    border-bottom: 2px solid #000000;
    padding-bottom: 10px;
    margin-bottom: 2px;
}

h3 {
    font-size: 1.2em;
    margin-top: 10px;
}

/* Basic styles for expandable sections */
.expandable {
    cursor: pointer;
    padding: 10px 20px; /* Match button padding */
    background-color: black; /* Keep the background color black */
    color: #EFEDE6; /* Text color using the same as button */
    border-radius: 20px; /* Rounded corners to match buttons */
    margin-top: 5px;
    transition: background-color 0.3s, transform 0.1s; /* Smooth transition for hover effect */
        border-radius: 9px; /* Rounded edges */
}

/* Hover effect for expandable sections */
.expandable:hover {

    transform: scale(1.02); /* Slightly enlarge on hover */
}

section {
    padding: 2px;
    margin: auto; /* Center section */
    max-width: 1200px; /* Optional: limit the width for better alignment */
    background-color: #EFEDE6;
    color: #000000;
}

/* Adjust the profile image */
.profile-image {
    width: 320px; /* Increased from 200px */
    height: auto;
    border-radius: 7%;
    border: 6px solid rgb(0, 0, 0);
    display: block;
}

.profile-name {
    font-size: 1.5em;
    font-weight: bold;
    display: block;
    margin: 0.5em 0;
}


.badge-button {
    background-color: black;
    color: #EFEDE6;
    border: 0px solid #EFEDE6;
    border-radius: 20px;
    padding: 6px 15px;
    cursor: pointer;
    font-family: 'Merriweather', serif;
    font-weight: bold;
    text-decoration: none;
    position: relative;
    overflow: visible; /* Allow the image to overflow */
    display: inline-block;
}

.badge-button-first {
    margin-bottom: 10px;
}

.badge-text {
    display: block; /* Ensure text is on its own line */
    white-space: nowrap; /* Prevent text from wrapping */
}

.badge-image {
    display: none;
    position: absolute;
    top: -200px; /* Position above the button */
    left: 70%;
    transform: translateX(-50%); /* Center the image */
    width: 200px;
    height: auto;
    z-index:1; ;

}

.badge-button:hover .badge-image {
    display: block;
}

.profile-name + a {
    display: inline-block;
    margin-right: 10px;
    margin-bottom: 10px;
}

.progress-step.active {
    background-color: black;
    color: white;
}

/* News ticker - styles now in index.html inline for better control */


/* Blog Page Specific Styling */

.blog-header {
    text-align: center;
    background-color: var(--box-background-color);
    padding: 40px 20px;
    border-bottom: 4px solid black;
    margin-bottom: 20px;
}

/* Breadcrumb Navigation */
.breadcrumb {
    max-width: 800px;
    margin: 0 auto 20px;
    padding: 10px 20px;
    font-size: 0.9rem;
    color: #666;
}

.breadcrumb a {
    color: #666;
    text-decoration: none;
    transition: color 0.2s ease;
}

.breadcrumb a:hover {
    color: var(--text-color);
    text-decoration: underline;
}

.breadcrumb-separator {
    margin: 0 8px;
    color: #999;
}

.breadcrumb-current {
    color: var(--text-color);
    font-weight: 500;
}

.blog-title {
    font-size: 2rem;
    font-weight: bold;
    color: var(--text-color);
    margin-bottom: 10px;
}

.blog-meta {
    font-size: 1rem;
    color: #6d6d6d;
    margin-bottom: 20px;
}

.blog-content {
    max-width: 800px;
    margin: 10 auto;
    padding: 20px;
    background-color: var(--background-color);
    border: px solid black;
    border-radius: 15px;
}

.blog-image-container {
    margin: 20px 0;
    text-align: center;
}

.blog-image {
    width: 100%;
    max-width: 800px;
    border-radius: 10px;
    box-shadow: 2px 4px 10px rgba(0, 0, 0, 0.1);
}

.blog-article p {
    line-height: 1.6;
    margin-bottom: 1rem;
}

.blog-article h2 {
    font-size: 1.5rem;
    color: black;
    margin-top: 20px;
    border-bottom: 2px solid black;
    padding-bottom: 5px;
}

.blog-article ul {
    margin: 20px 0;
    padding-left: 20px;
}

.blog-article ul li {
    margin-bottom: 10px;
    list-style-type: disc;
}

blockquote {
    margin: 20px 0;
    padding: 10px 20px;
    border-left: 4px solid black;
    background-color: #EFEDE6;
    font-style: italic;
    color: #333;
}

footer {
    margin-top: 70px;
}

/* Blog Index Specific Styling */

.blogindex-content {
    max-width: 800px;
    margin: 10 auto;
    padding: 20px;
    background-color: var(--background-color);
    border-radius: 15px;
}

/* PECB header layout: logo on the left, text on the right */
.pecb-header-row {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.pecb-logo {
    width: 180px; /* larger logo */
    height: auto;
    display: block;
    flex: 0 0 auto; /* fixed width column */
}

.pecb-body {
    flex: 1 1 auto;
}

.pecb-title {
    margin: 0 0 0.25rem 0;
}

@media screen and (max-width: 700px) {
    .pecb-header-row {
        flex-direction: column; /* stack on small screens */
        text-align: center;
    }

    .pecb-logo {
        width: 200px; /* slightly bigger when stacked */
        margin-bottom: 0.5rem;
    }
}


/* Add these course-specific styles to your existing styles.css */

.courses-header {
    text-align: center;
    margin: 2rem 0;
}

.courses-title {
    font-size: 2.5rem;
    color: var(--text-color);
    border-bottom: 2px solid black;
    display: inline-block;
    padding-bottom: 0.5rem;
}

.course-type-toggle {
    display: flex;
    justify-content: center;
    gap: 1rem;
    margin: 2rem 0;
}

.toggle-btn {
    padding: 8px 16px;
    border: 2px solid black;
    border-radius: 20px;
    background: transparent;
    color: black;
    cursor: pointer;
    font-family: 'Merriweather', serif;
    transition: all 0.3s ease;
}

.toggle-btn.active {
    background: black;
    color: #EFEDE6;
}

.toggle-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
}

.course-entry[hidden] {
    display: none;
}

.courses-content {
    max-width: 800px;
    margin: 0 auto;
    padding: 2rem;
}

.course-entry {
    background-color: var(--background-color);
    border: 2px solid black;
    border-radius: 15px;
    padding: 2rem;
    margin-bottom: 2rem;
}

.course-metadata {
    display: flex;
    gap: 1rem;
    flex-wrap: wrap;
    margin: 1rem 0;
}

.course-metadata span {
    background-color: black;
    color: #EFEDE6;
    padding: 0.5rem 1rem;
    border-radius: 20px;
    font-size: 0.9rem;
}

.course-details {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 1.5rem;
}

.course-actions {
    display: flex;
    gap: 0.75rem;
    flex-wrap: wrap;
    justify-content: flex-end;
}

.course-price {
    font-size: 1.2rem;
    font-weight: bold;
    margin: 0;
}

.pecb-intro {
    display: flex;
    gap: 1.75rem;
    align-items: center;
    flex-wrap: wrap;
    margin-bottom: 2.5rem;
}

.pecb-intro-text {
    flex: 1 1 280px;
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}


.pecb-courses {
    margin-bottom: 3rem;
}

.pecb-courses h3 {
    margin-bottom: 1.5rem;
}

.card-container.pecb-card-grid {
    /* Inherit all grid properties from .card-container */
    display: grid;
}

.pecb-card .course-details {
    flex-direction: column;
    align-items: flex-start;
    justify-content: flex-start;
    gap: 0.75rem;
}

.pecb-card .cta-button {
    align-self: flex-start;
}

.pecb-card .course-actions {
    justify-content: flex-start;
}

.cta-button.secondary-button {
    background-color: transparent;
    color: black;
    border-color: black;
}

.cta-button.secondary-button:hover {
    background-color: rgba(0, 0, 0, 0.05);
}

.pecb-disclaimer {
    margin-top: 1rem;
    font-size: 0.9rem;
    font-style: italic;
}

@media (max-width: 768px) {
    .pecb-intro {
        flex-direction: column;
        align-items: flex-start;
    }

    .card-container.pecb-card-grid {
        grid-template-columns: 1fr;
    }
}

.nav-content {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 7px 7px;
    border-bottom: 5px dotted black;
}


.nav-logo img {
    width: 40px; /* Fixed width instead of percentage */
    min-width: 40px; /* Prevent shrinking */
    height: auto;
    display: block;
    margin-right: 16px; /* Add space between logo and any following content */
}

/* Nav buttons container */
.nav-buttons {
    display: flex;
    gap: 1rem; /* Reduced gap */
    margin-left: auto;
}

/* Navigation button styling */
.cta-button.nav-button {
    padding: 3px 10px;
    font-size: 0.8rem;
    background-color: transparent;
    color: black;
    border: 2px solid black;
    border-radius: 20px;
    transition: all 0.15s ease;
    text-decoration: none;
    white-space: nowrap; /* Prevent text wrapping */
    overflow: hidden;
    text-overflow: ellipsis;
    text-align: center;
    min-height: 38px;
    display: flex;
    align-items: center;
}

/* Primary button variant */
.cta-button.nav-button.primary {
    background-color: black;
    color: #EFEDE6;
    left: 90px;
    top: 2rem
}

/* Add to existing course styles */
.course-includes {
    margin: 1.5rem 0;
}

.course-includes h4 {
    margin-bottom: 0.5rem;
    font-size: 1.1rem;
}

.course-includes ul {
    list-style-type: disc;
    margin-left: 1.5rem;
}

.course-includes li {
    margin: 0.5rem 0;
    color: var(--text-color);
}

.blog-meta {
    color: #666;
    font-size: 0.9em;
    margin: 5px 0;
}

.no-posts-message {
    text-align: center;
    padding: 2rem;
    color: #666;
    font-style: italic;
}

#cookie-banner {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    background-color: var(--background-color);
    border-top: 4px solid black;
    z-index: 1000;
    padding: 20px;
}

.cookie-content {
    max-width: 1200px;
    margin: 0 auto;
}

.cookie-options {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 20px;
    margin: 20px 0;
}

.cookie-group {
    background: rgba(0,0,0,0.05);
    padding: 15px;
    border-radius: 10px;
}

.cookie-group label {
    display: flex;
    align-items: center;
    gap: 10px;
    font-weight: bold;
}

.cookie-actions {
    display: flex;
    gap: 10px;
    margin: 20px 0;
}

.cookie-actions button {
    padding: 10px 20px;
    border: 2px solid black;
    border-radius: 20px;
    background: transparent;
    cursor: pointer;
    font-family: 'Merriweather', serif;
}

.cookie-actions button:first-child {
    background: black;
    color: var(--background-color);
}

/* Resource Cards */
.resource-card {
    cursor: pointer;
    transition: transform 0.2s;
    border: 4px solid black;
    border-radius: 15px;
    padding: 20px;
    background-color: var(--background-color);
}

.resource-card:hover {
    transform: scale(1.02);
}

/* Newsletter Popup */
.newsletter-popup {
    display: none;
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background-color: var(--background-color);
    border: 6px solid black;
    border-radius: 15px;
    padding: 30px;
    max-width: 600px;
    width: 80%;
    z-index: 1001;
}

.popup-overlay {
    visibility: hidden;
    opacity: 0;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: rgba(0, 0, 0, 0.5);
    z-index: 1000;
    transition: opacity 0.3s ease, visibility 0.3s ease;
    pointer-events: none;
}

.newsletter-popup.active,
.popup-overlay.active {
    visibility: visible;
    opacity: 1;
    pointer-events: auto;
}

.newsletter-form {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.newsletter-form input {
    padding: 10px;
    border: 2px solid black;
    border-radius: 10px;
    font-family: 'Merriweather', serif;
}

.close-popup {
    position: absolute;
    top: 10px;
    right: 10px;
    cursor: pointer;
    font-size: 24px;
    color: black;
}

/* Contact Form Popup - minimal styling, let YouForm handle it */
.contact-form-popup {
    display: none;
    visibility: hidden;
    opacity: 0;
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background-color: var(--background-color);
    width: 90%;
    max-width: 900px;
    max-height: 90vh;
    z-index: 1001;
    overflow: auto;
    transition: opacity 0.3s ease, visibility 0.3s ease;
    pointer-events: none;
}

/* Ensure inert popup is completely hidden and non-interactive */
.contact-form-popup[inert] {
    display: none !important;
    visibility: hidden !important;
    pointer-events: none !important;
}

.contact-form-popup.active {
    display: block;
    visibility: visible;
    opacity: 1;
    pointer-events: auto;
}

.contact-form-popup h2 {
    display: none;
}

.contact-form-iframe-container {
    width: 100%;
    min-height: 500px;
}

/* Responsive adjustments for contact form */
@media (max-width: 768px) {
    .contact-form-popup {
        width: 100vw;
        height: 100vh;
        max-width: 100vw;
        max-height: 100vh;
        top: 0;
        left: 0;
        transform: none;
        border-radius: 0;
    }

    .contact-form-iframe-container {
        height: 100vh;
        min-height: 100vh;
    }
}

/* Resource page specific styles */
.feature-card.resource-card {
    background: var(--background-color);
    border: 4px solid black;
    border-radius: 15px;
    padding: 2rem;
    transition: transform 0.3s ease;
    height: 100%;
    display: flex;
    flex-direction: column;
}

.feature-card.resource-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
}

.feature-card.resource-card h3 {
    font-size: 1.5rem;
    margin-bottom: 1rem;
    color: var(--text-color);
}

.feature-card.resource-card .course-includes {
    margin-top: auto;
}

.feature-card.resource-card .course-includes ul {
    list-style-type: disc;
    padding-left: 1.5rem;
    margin-top: 1rem;
}

.feature-card.resource-card .course-includes li {
    margin-bottom: 0.5rem;
    color: var(--text-color);
}

/* Adjust feature grid layout */
.features-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 2rem;
    padding: 0;
    margin: 2rem auto;
}

@media (max-width: 768px) {
    .features-grid {
        grid-template-columns: 1fr;
        gap: 1.5rem;
        margin: 1.5rem auto;
    }
    
    .feature-card.resource-card {
        padding: 1.5rem;
    }
}

/* Resource page layout adjustments */
.courses-content {
    max-width: 1200px;
    margin: 0 auto;
    padding: 2rem;
}

.features-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 2rem;
    padding: 0;
    margin: 2rem auto;
}

.feature-card.resource-card {
    padding: 2rem;
    margin: 0;
    height: auto;
    min-height: 300px;
}

.courses-header {
    text-align: center;
    margin: 3rem auto 2rem;
    max-width: 1200px;
    padding: 0 2rem;
}

.courses-title {
    font-size: 2.5rem;
    margin-bottom: 1rem;
    padding-bottom: 1rem;
}

/* Adjust responsive behavior */
@media (max-width: 768px) {
    .courses-content {
        padding: 1rem;
    }
    
    .features-grid {
        grid-template-columns: 1fr;
        gap: 1.5rem;
        margin: 1.5rem auto;
    }
    
    .feature-card.resource-card {
        padding: 1.5rem;
    }
}

.consent-text {
    font-size: 0.9rem;
    color: #666;
    margin: 0.5rem 0;
    line-height: 1.4;
}

/* Add styles for the new "Menu" button */
.menu-button {
    padding: 12px 18px; /* Consistent padding */
    background-color: transparent; /* Match other nav buttons */
    color: #000000; /* Text color on hover */
    border: 2px solid black; /* Border similar to nav buttons */
    border-radius: 20px; /* Rounded corners */
    font-weight: bold; /* Bold text */
    cursor: pointer; /* Pointer cursor on hover */
    transition: background-color 0.3s, transform 0.1s; /* Smooth transitions */
    margin-left: 1rem; /* Space from other elements */
    margin-right: 1rem; /* Space from other elements */
    font-family: 'Merriweather', serif; /* Consistent font */
}

.menu-button:hover {
    background-color: black; /* Background on hover */
    color: #EFEDE6; /* Text color on hover */
    transform: scale(1.02); /* Slight enlargement on hover */
}



/* Hide the Menu button by default */
.menu-button {
    display: none;
}

/* Show the Menu button on screens narrower than 900px */
@media screen and (max-width: 900px) {
    .menu-button {
        display: inline-block; /* Makes the button visible */
        margin-left: auto; /* Push menu button to the right */
    }

    .nav-buttons:not(.active) {
        display: none; /* Hide nav buttons when menu is closed */
    }

    .nav-content {
        padding-right: 100px; /* Make space for menu button */
    }

    /* Ensure nav-buttons are hidden and can be toggled */
    .nav-buttons {
        display: none;
        flex-direction: column;
        width: 100%;
        background-color: var(--background-color);
        position: absolute;
        top: 100%;
        left: 0;
        right: 0;
        z-index: 1001;
    }

    /* Full-screen menu styles */
    .nav-buttons.active {
        position: fixed;
        top: 0;
        left: 0;
        right: 0;
        bottom: 0;
        width: 100vw;
        height: 100vh;
        min-height: 100vh;
        min-width: 100vw;
        display: flex;
        flex-direction: column;
        align-items: center;
        justify-content: center;
        gap: 2rem;
        z-index: 9999;
        background-color: var(--background-color);
    }

    .nav-buttons.active .nav-button {
        font-size: 1.5rem;
        width: 80%;
        max-width: 400px;
        margin: 0.5rem 0;
        padding: 1rem;
        border-width: 3px;
    }

    /* Keep the menu button visible (but below overlays) */
    .menu-button {
        position: fixed;
        top: 2rem;
        right: 1rem;
        z-index: 999;
    }
}

/* Remove any conflicting styles - consolidated above */
.nav-buttons.active {
    position: fixed;
    inset: 0;
    min-height: 100vh;
    min-width: 100vw;
}

/* Card Layout Styles */
.card-container,
.card-container.project-cards,
.card-container.pecb-card-grid {
    display: grid;
    /* Force exactly 2 columns that share available space */
    grid-template-columns: repeat(2, 1fr) !important; /* ensure this overrides any other grid settings */
    max-width: 1100px; /* keeps two columns readable */
    gap: 1.5rem;
    padding-top: 1rem;
    justify-content: center;
    margin: 0 auto;
}

/* Course filter buttons */
.course-type-toggle {
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
    padding-top: 1rem;
    justify-content: center;
}

.toggle-btn {
    border: 2px solid transparent;
    background: none;
    cursor: pointer;
    padding: 0.5rem 1.25rem;
    border-radius: 20px;
    transition: all 0.3s ease;
    font-family: inherit;
    font-size: 0.95rem;
    opacity: 0.85;
    position: relative;
}

.toggle-btn:hover {
    opacity: 1;
    border-color: rgba(0,0,0,0.1);
}

.toggle-btn.active {
    background-color: black;
    color: #EFEDE6;
    opacity: 1;
    border-color: black;
}

.card {
    background-color: var(--background-color);
    border: 2px solid black;
    border-radius: 15px;
    overflow: hidden;
    transition: transform 0.3s ease;
    display: flex;
    flex-direction: column;
    height: 100%; /* ensure all cards in a row are the same height */
}

/* Utility: make whole card look clickable */
.card-clickable {
    cursor: pointer;
}

.card:hover {
    transform: translateY(-5px);
}

.card-header {
    background-color: black;
    color: #EFEDE6;
    padding: 1.5rem; /* slightly more padding for consistent header height */
    font-size: 1.2rem;
    font-weight: bold;
    min-height: 4rem; /* ensure consistent header height */
    display: flex;
    align-items: center; /* center header text vertically */
}

.card-header h3 {
    margin: 0; /* remove default margins to ensure consistent height */
    line-height: 1.3;
}

/* Header color utilities (useful to replace inline background-color on headers) */
.card-header.bg-red { background-color: #B84A45; }
.card-header.bg-green { background-color: #2D8B31; }
.card-header.bg-blue { background-color: #1E4A6E; }
.card-header.bg-gold { background-color: #9A7528; }
.card-header.bg-orange { background-color: #C03D1A; }
.card-header.bg-yellow { background-color: #FFD700; color: #333; }

.card-header a {
    color: #EFEDE6;
    text-decoration: none;
}

.card-content {
    padding: 1.5rem;
    flex: 1;
    display: flex;
    flex-direction: column;
}

.card-content h4 {
    margin-top: 1rem;
    margin-bottom: 0.5rem;
}

/* Keep CTA group aligned at bottom consistently */
.card-buttons {
    margin-top: auto;
    display: flex;
    gap: 0.75rem;
    flex-wrap: wrap;
}

.card-buttons .cta-button {
    min-width: 160px;
}

/* Subline banner under header */
.card-subline {
    margin: 0 0 0.75rem 0;
    font-size: 0.95rem;
    color: #333;
    opacity: 0.9;
}

/* Small tag pill, e.g., Nyhet */
.tag {
    display: inline-block;
    margin-left: 0.5rem;
    background: #EFEDE6;
    color: #000;
    border-radius: 999px;
    padding: 0.15rem 0.5rem;
    font-size: 0.8rem;
    font-weight: 600;
}

.tag-new { border: 2px solid #9A7528; }

/* Utility: make a card span both columns in grid */
.card-wide {
    grid-column: 1 / -1;
}

/* PECB logo inside service card */
.service-pecb-logo {
    max-width: 140px;
    height: auto;
    display: block;
    margin: 0 0 1rem 0;
}

/* Two-column layout inside the PECB service card */
.service-pecb-grid {
    display: grid;
    grid-template-columns: 180px 1fr;
    gap: 1rem 1.25rem;
    align-items: start;
}

@media (max-width: 780px) {
    .service-pecb-grid {
        grid-template-columns: 1fr;
    }
    .service-pecb-logo {
        max-width: 160px;
        margin-bottom: 0.5rem;
    }
}

/* Generic service card grid (logo + body) */
.service-card-grid {
    display: grid;
    grid-template-columns: 220px 1fr;
    gap: 1.25rem 1.5rem;
    align-items: start;
}

@media (max-width: 780px) {
    .service-card-grid { grid-template-columns: 1fr; }
}

/* Logo frame used in service cards */
.service-logo-frame {
    display: flex;
    align-items: center;
    justify-content: center;
    background: #fff59d33; /* very light tint to hold logos if needed */
    border: 1px solid rgba(0,0,0,0.08);
    border-radius: 10px;
    padding: 0.75rem;
}

.service-logo { max-width: 100%; height: auto; display: block; }

/* Nimblr specific tweaks */
.nimblr-logo-frame { background: #FFD700; border-color: #FFD700; }
.nimblr-logo { max-width: 200px; height: auto; }

/* Løsninger page utilities */
.solutions-intro {
    text-align: center;
    max-width: 800px;
    margin: 0 auto 3rem auto;
    font-size: 1.1rem;
}

.solutions-section {
    margin-top: 4rem;
    text-align: center;
}

.section-title {
    font-size: 2rem;
    border-bottom: 2px solid black;
    display: inline-block;
    padding-bottom: 0.5rem;
    margin-bottom: 2rem;
}

.section-blurb {
    text-align: center;
    max-width: 800px;
    margin: 0 auto 2rem auto;
}

/* Course/service highlight blocks (mirrors courses.html style) */
.course-highlights {
    background: rgba(0,0,0,0.03);
    padding: 1rem;
    border-radius: 8px;
    border-left: 4px solid #B84A45; /* default red-ish */
    margin: 1rem 0;
}
.course-highlights.green-theme {
    background: rgba(45, 139, 49, 0.08);
    border-left-color: #2D8B31;
}
.course-highlights.blue-theme {
    background: rgba(30, 74, 110, 0.08);
    border-left-color: #1E4A6E;
}
.course-highlights.gold-theme {
    background: rgba(154, 117, 40, 0.08);
    border-left-color: #9A7528;
}
.course-highlights ul { margin: 0.5rem 0 0 0; padding-left: 1.5rem; }
.course-highlights li { margin: 0.5rem 0; }

/* Compact key stats row */
.key-stats {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1rem 1.25rem;
    margin: 1rem 0 1.25rem 0;
}
.key-stat { display: flex; flex-direction: column; gap: 0.25rem; }
.key-stat .stat-icon { font-size: 1.25rem; line-height: 1; }
.key-stat strong { font-size: 1.05rem; }
.key-stat span { font-size: 0.9rem; opacity: 0.9; }

.course-metadata {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin-bottom: 1rem;
}

.course-description {
    margin-bottom: 1rem;
}

.course-includes {
    flex: 1; /* take up remaining space */
    display: flex;
    flex-direction: column;
}

.course-includes ul {
    margin: 0.5rem 0;
    padding-left: 1.25rem;
}

.course-details {
    margin-top: auto; /* push to bottom */
    padding-top: 1rem;
    border-top: 1px solid rgba(0,0,0,0.1);
}

.course-price {
    margin: 0 0 1rem 0;
    font-weight: bold;
}

/* Course action buttons layout */
.course-actions {
    display: flex;
    gap: 0.75rem;
    justify-content: flex-start;
    margin: 0 -0.375rem; /* negative margin to offset button padding */
}

.course-actions .cta-button {
    flex: 1 1 0; /* equal width distribution */
    margin: 0 0.375rem; /* even spacing */
    white-space: nowrap; /* prevent text wrapping */
}

/* Course action buttons layout */
.course-actions {
    display: flex;
    gap: 0.75rem;
    flex-wrap: wrap;
}

/* Button styling and order */
.course-actions .cta-button {
    flex: 1 1 auto;
    min-width: 180px; /* ensure buttons don't collapse; widely supported */
    text-align: center;
}

/* CTA Section Styles */
.cta-section {
    text-align: center;
    margin: 4rem 0;
}

.cta-section p {
    margin: 20px 0;
}

/* Responsive: single column on narrow viewports */
@media screen and (max-width: 780px) {
    .card-container,
    .card-container.project-cards,
    .card-container.pecb-card-grid {
        grid-template-columns: 1fr !important; /* stack into one column */
        max-width: 500px; /* narrower container for better mobile reading */
        gap: 1rem; /* slightly tighter spacing on mobile */
    }

    .card-header {
        min-height: 3.5rem; /* slightly shorter on mobile */
        padding: 1rem;
    }
    
    .course-actions {
        flex-direction: column;
        margin: 0; /* reset negative margin on mobile */
        gap: 0.75rem;
    }
    
    .course-actions .cta-button {
        margin: 0;
        width: 100%;
        min-height: 48px; /* slightly bigger touch target on mobile */
    }
}
