/* Reset and base styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: 'IBM Plex Sans', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    line-height: 1.6;
    color: #333;
    background-color: #FFFEFD;
}

.card-bg {
    background: #F5F1EB;
    border: 1px solid #E1D7CD;
    transition: transform 0.2s, box-shadow 0.2s;
}

.card-bg:hover {
    transform: translateY(-4px);
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.1);
}

/* Navigation */
.navbar {
    background: #FFFEFD;
    border-bottom: 1px solid #e5e7eb;
    position: sticky;
    top: 0;
    z-index: 100;
}

.nav-container {
    margin: 0 auto;
    padding: 1rem 6rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.nav-brand {
    font-size: 1.25rem;
    font-weight: 600;
    color: #111827;
    text-decoration: none;
    transition: color 0.2s;
}

.nav-brand:hover {
    color: #2563eb;
}

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

.nav-link {
    font-size: 0.875rem;
    font-weight: 500;
    color: #3B3028;
    text-decoration: none;
    transition: color 0.2s;
    position: relative;
}

.nav-link:hover {
    color: #2E2A27;
}

.nav-link.active {
    color: #9B7A52;
    border-bottom: 1px solid #9B7A52;
    padding-bottom: 2px;
}

.linkedin-link {
    display: flex;
    align-items: center;
    padding: 0.5rem;
    border-radius: 0.25rem;
    transition: all 0.2s;
}

.linkedin-link:hover {
    background-color: #f3f4f6;
    color: #0077b5;
}

/* Layout */
.content-and-footer-alignment {
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    min-height: calc(100vh - 69px);
}

.main-container {
    max-width: 1024px;
    margin: 0 auto;
    padding: 3rem 3rem;
}

.content-wrapper {
    max-width: 768px;
    margin: 0 auto;
}

/* Profile section */
.profile-section {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 2rem;
    margin-bottom: 2rem;
}

.profile-image {
    width: 200px;
    height: 200px;
    border-radius: 50%;
    object-fit: cover;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
    transition: transform 0.2s;
}

.profile-image--xs {
    width: 60px;
    height: 60px;
}

.profile-image:hover {
    transform: scale(1.05);
}

/* Typography */
.page-title {
    font-size: 2.5rem;
    font-weight: bold;
    color: #111827;
    margin-bottom: 1.5rem;
}

.page-header {
    text-align: center;
    margin-bottom: 0;
}

/* Workshop Detail Pages */
.workshop-detail-header {
    text-align: center;
    margin-bottom: 3rem;
}

.workshop-detail-title {
    font-size: 2.5rem;
    font-weight: bold;
    color: #111827;
    margin-bottom: 1rem;
}

.workshop-detail-subtitle {
    font-size: 1.25rem;
    color: #6b7280;
    max-width: 768px;
    margin: 0 auto;
    line-height: 1.6;
}

.workshop-detail-content {
    max-width: 768px;
    margin: 0 auto;
}

.workshop-detail-section {
    margin-bottom: 2.5rem;
}

.workshop-detail-section h3 {
    font-size: 1.5rem;
    font-weight: 600;
    color: #111827;
    margin-bottom: 1rem;
}

.detail-item {
    margin-bottom: 0.75rem;
    color: #374151;
}

.workshop-signup-section {
    background: #f8fafc;
    padding: 2rem;
    border-radius: 1rem;
    text-align: center;
    margin-top: 3rem;
}

.workshop-signup-section h3 {
    margin-bottom: 1rem;
}

.workshop-signup-section p {
    margin-bottom: 1.5rem;
    color: #6b7280;
}

/* Resources Page */
.resources-container {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
    margin-top: 2rem;
}

.resource-card {
    border-radius: 1rem;
    padding: 2rem;
    text-align: center;
    scroll-margin-top: 80px;
}

.resource-icon {
    font-size: 2rem;
    margin-bottom: 1rem;
}

.resource-card h3 {
    font-size: 1.25rem;
    font-weight: 600;
    color: #111827;
    margin-bottom: 1rem;
}

.resource-description {
    color: #6b7280;
    margin-bottom: 1.5rem;
    line-height: 1.6;
}

.resource-btn {
    width: auto;
    padding: 0.75rem 1.5rem;
}

.page-title {
    display: inline-flex;
    align-items: center;
    gap: 0.75rem;
    font-size: 2.5rem;
    font-weight: bold;
    color: #2E2A27;
    margin-bottom: 1rem;
}

.page-header .page-title {
    margin-bottom: 0;
}

.count-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 2rem;
    height: 2rem;
    background-color: #2563eb;
    color: white;
    border-radius: 50%;
    font-size: 1rem;
    font-weight: 600;
    line-height: 1;
}

.workshop-indicators {
    display: flex;
    justify-content: center;
    gap: 0.5rem;
    margin-bottom: 0.5rem;
}

.indicator {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background-color: #d1d5db;
    transition: background-color 0.2s;
}

.indicator.active {
    background-color: #2563eb;
}

.page-subtitle {
    font-size: 1.25rem;
    color: #2E2A27;
    margin-bottom: 3rem;
    max-width: 512px;
    text-align: center;
    margin-left: auto;
    margin-right: auto;
}

.hero-title {
    font-size: 3rem;
    font-weight: bold;
    color: #111827;
    margin-bottom: 1.5rem;
    text-align: center;
    line-height: 1.1;
}

.hero-subtitle {
    font-size: 1.25rem;
    color: #6b7280;
    margin-bottom: 2rem;
    text-align: center;
    max-width: 768px;
    margin-left: auto;
    margin-right: auto;
}

.lead {
    font-size: 1.25rem;
    color: #6b7280;
    margin-bottom: 2rem;
    line-height: 1.7;
}

.content-text p {
    margin-bottom: 1.5rem;
    line-height: 1.7;
}

.quote {
    border-left: 4px solid #A35638;
    padding-left: 1.5rem;
    font-style: italic;
    color: #6b7280;
    margin: 2rem 0;
    font-size: 1.1rem;
}

.text-link {
    color: #A35638;
    text-decoration: none;
    font-weight: 500;
    transition: all 0.2s;
}

.text-link:hover {
    color: #89482f;
    text-decoration: underline;
}

/* Buttons */
.btn {
    display: inline-flex;
    align-items: center;
    padding: 0.75rem 1.5rem;
    border-radius: 0.5rem;
    font-weight: 500;
    text-decoration: none;
    transition: all 0.2s;
    cursor: pointer;
    border: none;
    font-size: 1rem;
}

.btn-primary {
    background-color: #af9773;
    color: white;
}

.btn-primary:hover {
    background-color: #75503d;
    transform: translateY(-1px);
}

.btn-secondary {
    background-color: transparent;
    color: #111827;
    border: 1px solid #d1d5db;
}

.btn-secondary:hover {
    background-color: #f9fafb;
    border-color: #9ca3af;
}

/* Hero section */
.hero-section {
    text-align: center;
    margin-bottom: 4rem;
}

.hero-buttons {
    display: flex;
    gap: 1rem;
    justify-content: center;
    flex-wrap: wrap;
}

/* Features section */
.features-section {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
    margin-bottom: 4rem;
}

.feature-card {
    background: white;
    padding: 2rem;
    border-radius: 0.5rem;
    border: 1px solid #e5e7eb;
}

.feature-card h3 {
    font-size: 1.25rem;
    font-weight: 600;
    margin-bottom: 1rem;
    color: #111827;
}

.feature-card p {
    color: #6b7280;
    line-height: 1.6;
}

/* CTA section */
.cta-section {
    text-align: center;
    background: white;
    padding: 3rem 2rem;
    border-radius: 0.5rem;
    border: 1px solid #e5e7eb;
}

.cta-section h2 {
    font-size: 2rem;
    font-weight: bold;
    margin-bottom: 1rem;
    color: #111827;
}

.cta-section p {
    font-size: 1.125rem;
    color: #6b7280;
    margin-bottom: 2rem;
}

/* Workshop cards */
.workshop-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(400px, 1fr));
    gap: 2rem;
    margin-bottom: 3rem;
}

.workshop-card {
    border-radius: 1rem;
    padding: 2rem;
}

.workshop-icon {
    font-size: 3rem;
    margin-bottom: 1rem;
}

.workshop-icon.large {
    font-size: 4rem;
    margin-bottom: 1.5rem;
}

.workshop-card h3 {
    font-size: 1.5rem;
    font-weight: 600;
    margin-bottom: 1rem;
    color: #111827;
}

.workshop-description {
    color: #6b7280;
    margin-bottom: 1.5rem;
    line-height: 1.6;
}

/* Post Images */
.post-images {
    margin-bottom: 1.5rem;
    border-radius: 8px;
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
}

.post-image {
    width: 100%;
    object-fit: contain;
    object-position: center center;
    border-radius: 12px;
}

/* Carousel */
.carousel {
    position: relative;
}

.carousel-container {
    position: relative;
    overflow: hidden;
    border-radius: 12px;
    height: 80vh;
    max-height: 960px;
    background: transparent;
}

.carousel-track {
    display: flex;
    transition: transform 0.3s ease;
    height: 100%;
    padding-bottom: 15px;
}

.carousel .post-image {
    flex: 0 0 100%;
    width: 100%;
    height: 100%;
    max-height: 100%;
    object-fit: contain;
    object-position: center center;
    border-radius: 12px;
}

.carousel-btn {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background: rgba(0, 0, 0, 0.5);
    color: white;
    border: none;
    width: 44px;
    height: 44px;
    border-radius: 50%;
    cursor: pointer;
    font-size: 18px;
    font-weight: bold;
    z-index: 2;
    transition: background 0.2s ease;
}

.carousel-btn:hover {
    background: rgba(0, 0, 0, 0.7);
}

.carousel-prev {
    left: -15px;
}

.carousel-next {
    right: -15px;
}

.carousel-dots {
    position: absolute;
    left: 50%;
    bottom: 0;
    transform: translateX(-50%);
    display: flex;
    gap: 8px;
    margin-top: 0;
    z-index: 3;
}

.dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: rgba(0, 0, 0, 0.3);
    cursor: pointer;
    transition: background 0.2s ease;
}

.dot.active {
    background: #75503d;
}

.dot:hover {
    background: #af9773;
}

.workshop-features {
    list-style: none;
    margin-bottom: 1.5rem;
}

.workshop-features li {
    padding: 0.25rem 0;
    color: #374151;
}

.workshop-features li:before {
    content: "✓ ";
    color: #10b981;
    font-weight: bold;
}

.workshop-details {
    display: flex;
    gap: 1rem;
    margin-bottom: 1.5rem;
    flex-wrap: wrap;
}

.workshop-duration,
.workshop-format {
    background: #f3f4f6;
    padding: 0.25rem 0.75rem;
    border-radius: 0.25rem;
    font-size: 0.875rem;
    color: #374151;
}

.workshop-btn {
    width: 100%;
    justify-content: center;
}

.spinner {
    display: inline-block;
    width: 16px;
    height: 16px;
    border: 2px solid transparent;
    border-top: 2px solid white;
    border-radius: 50%;
    animation: spin 1.6s linear infinite;
    vertical-align: middle;
}

@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}

.coming-soon-notice {
    background: #fef3c7;
    border: 1px solid #f59e0b;
    border-radius: 0.5rem;
    padding: 1.5rem;
    text-align: center;
}

.coming-soon-notice h3 {
    color: #92400e;
    margin-bottom: 0.5rem;
}

.coming-soon-notice p {
    color: #78350f;
}

/* Modal styles */
.modal {
    display: none;
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
    backdrop-filter: blur(4px);
}

.modal.active {
    display: flex;
    align-items: center;
    justify-content: center;
}

.modal-content {
    background: white;
    padding: 0;
    border-radius: 0.5rem;
    width: 90%;
    max-width: 500px;
    max-height: 90vh;
    overflow-y: auto;
    box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.1);
}

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1.5rem;
    border-bottom: 1px solid #e5e7eb;
}

.modal-header h3, .modal-success-container h3 {
    font-size: 1.25rem;
    font-weight: 600;
    color: #111827;
    margin: 0;
}

.modal-close {
    background: none;
    border: none;
    font-size: 1.5rem;
    cursor: pointer;
    color: #6b7280;
    padding: 0.25rem;
    border-radius: 0.25rem;
    transition: color 0.2s, background-color 0.2s;
}

.modal-close:hover {
    color: #111827;
    background-color: #f3f4f6;
}

.modal-message {
    margin: 1.5rem;
    padding: 1rem;
    border-radius: 0.5rem;
    font-size: 0.95rem;
    font-weight: 500;
    text-align: center;
    animation: messageSlideIn 0.3s ease-out;
}

@keyframes messageSlideIn {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.modal-message-success {
    background-color: #dcfce7;
    color: #166534;
    border: 1px solid #bbf7d0;
}

.modal-message-error {
    background-color: #fef2f2;
    color: #dc2626;
    border: 1px solid #fecaca;
}

.modal form {
    padding: 1.5rem;
}

.modal-success-container {
    display: none;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 0 1.5rem 4rem;
}

.modal-success-container * {
    text-align: center;
}

.modal-success-container h3 {
    padding: 1rem;
}

.form-group {
    margin-bottom: 1rem;
}

.form-group label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 500;
    color: #374151;
}

.form-group input {
    width: 100%;
    padding: 0.75rem;
    border: 1px solid #d1d5db;
    border-radius: 0.375rem;
    font-size: 1rem;
    transition: border-color 0.2s, box-shadow 0.2s;
}

.form-group input:focus {
    outline: none;
    border-color: #2563eb;
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.1);
}

.form-actions {
    display: flex;
    gap: 1rem;
    justify-content: flex-end;
    margin-top: 1.5rem;
}

.inline-error-message {
    color: red;
    display: none;
    padding-top: 0.5rem;
}

/* Posts */
.insights-index .main-container,
.insights-index .content-wrapper {
    max-width: none;
    width: 100%;
    margin: 0 auto;
    padding-left: 3rem;
    padding-right: 3rem;
}

.insights-index .posts-container {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, auto));
    justify-content: center;
    gap: 2.5rem;
    margin-bottom: 3rem;
    max-width: calc(6 * 500px + 5 * 2rem);
    margin-left: auto;
    margin-right: auto;
}

.post-card {
    max-width: 500px;
    padding: 1.5rem;
    border-radius: 12px;
    display: flex;
    flex-direction: column;
    height: 100%;
}

.post-card.is-link {
    position: relative;
}

.post-card .post-card-overlay {
    position: absolute; inset: 0; z-index: 1;
}
.post-card .post-title a,
.post-card .post-continue a {
    position: relative;
    z-index: 2;
}

.post-meta {
    display: flex;
    justify-content: space-between;
    gap: 1rem;
    margin-bottom: 1.25rem;
    flex-wrap: wrap;
}

.post-date,
.post-read-time {
    font-weight: 400;
    line-height: 1;
    font-size: 1rem;
    color: #2E2A27;
    letter-spacing: -0.5px;
}

.post-title {
    font-size: 1.5rem;
    line-height: 1.2;
    font-weight: 600;
    margin-bottom: 0.75rem;
}

.post-title, .post-title a {
    color: #111827;
}

.post-content {
    color: #2E2A27;
    line-height: 1.3;
    font-size: 20px;
    font-weight: 500;
    width: 100%;
    letter-spacing: -0.5px;
    display: flex;
    flex-direction: column;
    flex: 1;
}

.post-full-content[style*="display: none"] {
    visibility: hidden;
    display: block !important;
    height: 0;
    overflow: hidden;
}

.post-full-content p, .post-full-content ul, .post-full-content ol {
    margin-bottom: 1rem;
}

.read-more-btn {
    margin-top: auto;
    padding-top: 2rem;
    background: none;
    border: none;
    color: #A35638;
    font-weight: 400;
    cursor: pointer;
    font-size: 20px;
    line-height: 1;
    letter-spacing: -0.5px;
    transition: color 0.2s;
    display: flex;
    align-items: center;
    gap: 4px;
    font-family: 'IBM Plex Sans', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
}

.post-card:hover .read-more-btn,
.read-more-btn:hover {
    color: #89482f;
    text-decoration: underline;
}

.read-more-btn img {
    transition: transform 0.2s ease;
}

.post-card:hover .read-more-btn img {
    transform: translateX(4px);
}

/* Single Post Page */
.post-page .post-page-header {
    text-align: left;
    margin-bottom: 3rem;
}

.post-page-header {
    margin-top: 1.5rem;
}

.post-page .post-page-icon.large {
    font-size: 3rem;
    margin-bottom: 1rem;
}

.post-page .post-page-title {
    font-size: 2.5rem;
    line-height: 1.2;
    font-weight: 700;
    color: #111827;
    margin-bottom: 0.5rem;
    letter-spacing: -0.08rem;
}

.post-page .post-page-meta {
    font-size: 1rem;
    color: #B09775;
    display: flex;
    text-align: left;
    align-items: center;
    gap: 8px;
    margin-top: 1.5rem;
}

.post-page-meta-author {
    display: flex;
    align-items: center;
    gap: 8px;
}

.post-page .post-page-hero {
    margin-bottom: 2rem;
}

.post-page-carousel {
    margin-top: 3rem;
    margin-bottom: 2.5rem;
    position: relative;
}

.post-page .post-page-hero-figure img {
    width: 100%;
    max-height: 450px;
    object-fit: contain;
    border-radius: 12px;
}

.post-page .post-page-body-container {
    max-width: 768px;
    margin: 0 auto;
}

.post-page .post-page-body p, .post-page .post-page-body ul, .post-page .post-page-body ol {
    margin-bottom: 1rem;
    line-height: 1.7;
    font-size: 17px;
    letter-spacing: -0.01rem;
}

.post-page-resources {
    margin-top: 1rem;
}

.post-full-content ul, .post-page .post-page-body ul,
.post-full-content ol, .post-page .post-page-body ol {
    margin-left: 1.5rem;
    padding-left: 1.5rem;
}

.newsletter-signup {
    background: #f3f4f6;
    padding: 2rem;
    border-radius: 0.5rem;
    text-align: center;
}

.newsletter-signup h3 {
    font-size: 1.25rem;
    font-weight: 600;
    margin-bottom: 1rem;
    color: #111827;
}

.newsletter-signup p {
    color: #6b7280;
    margin-bottom: 1.5rem;
}

/* Footer */
.footer {
    border-top: 1px solid #e5e7eb;
    background: white;
    margin-top: 4rem;
}

.footer-content {
    max-width: 1024px;
    margin: 0 auto;
    padding: 2rem 1.5rem;
    text-align: center;
    color: #6b7280;
}

/* Responsive */
@media (max-width: 1125px) {
    .insights-index .main-container,
    .insights-index .content-wrapper {
        padding-left: 2rem;
        padding-right: 2rem;
    }

    .insights-index .posts-container {
        grid-template-columns: repeat(auto-fit, minmax(320px, auto));
    }

    .post-card {
        max-width: 460px;
    }
}

@media (max-width: 768px) {
    .nav-container {
        flex-direction: column;
        gap: 1rem;
        padding: 1rem 1.5rem;
    }

    .nav-links {
        gap: 1rem;
    }

    .hero-title {
        font-size: 2rem;
    }

    .hero-subtitle {
        font-size: 1.125rem;
    }

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

    .profile-section {
        text-align: center;
    }

    .profile-image {
        width: 150px;
        height: 150px;
    }

    .profile-image--xs {
        width: 55px;
        height: 55px;
    }

    .workshop-grid {
        grid-template-columns: 1fr;
    }

    .workshop-card {
        min-width: auto;
    }

    .hero-buttons {
        flex-direction: column;
        align-items: center;
    }

    .btn {
        width: 100%;
        max-width: 200px;
        justify-content: center;
    }

    .btn--no-set-width {
        width: auto;
        max-width: unset;
    }

    .resource-card {
        scroll-margin-top: 130px;
    }

    .insights-index .main-container,
    .insights-index .content-wrapper {
        padding-left: 1.5rem;
        padding-right: 1.5rem;
    }

    .read-more-btn {
        padding-top: 1rem;
    }

    .post-page  .carousel-container {
        height: 450px;
    }
}

@media (max-width: 750px) {
    .insights-index .posts-container {
        gap: 1rem;
    }
}

@media (max-width: 467px) {
    .form-actions {
        flex-direction: column-reverse;
        align-items: center;
    }
}

/* Error page styles */
.error-section {
    text-align: center;
    padding: 4rem 2rem;
    max-width: 600px;
    margin: 0 auto;
}

.error-icon {
    font-size: 4rem;
    margin-bottom: 2rem;
}

.error-title {
    font-size: 2.5rem;
    font-weight: bold;
    color: #111827;
    margin-bottom: 1.5rem;
}

.error-message {
    font-size: 1.125rem;
    color: #6b7280;
    margin-bottom: 3rem;
    line-height: 1.6;
}

.error-details {
    background: #f9fafb;
    border: 1px solid #e5e7eb;
    border-radius: 0.5rem;
    padding: 1.5rem;
    margin: 2rem 0;
    text-align: left;
    max-width: 500px;
    margin-left: auto;
    margin-right: auto;
}

.error-detail-item {
    margin-bottom: 0.75rem;
    font-size: 0.875rem;
    color: #374151;
}

.error-detail-item:last-child {
    margin-bottom: 0;
}

.error-detail-item strong {
    color: #111827;
    font-weight: 600;
}

.error-actions {
    display: flex;
    gap: 1rem;
    justify-content: center;
    flex-wrap: wrap;
}

@media (max-width: 768px) {
    .error-section {
        padding: 3rem 1rem;
    }

    .error-title {
        font-size: 2rem;
    }

    .error-actions {
        flex-direction: column;
        align-items: center;
    }

    .error-actions .btn {
        width: 100%;
        max-width: 200px;
    }

    .error-details {
        text-align: left;
        padding: 1rem;
    }
}