.details-section .main-container {
    align-items: start;
}

.details-section .main-container .text-content h2 {
    margin-bottom: 20px;
}

.details-section .headline {
    padding-top: 50px;
    padding-bottom: 0px;
    padding-left: 30px;
    padding-right: 30px;

    max-width: 1280px;
    margin: 0 auto;

}

.details-section .headline .see-project-link {
    margin-top: 24px;
    padding: 12px 16px;
    border-radius: 6px;
    background-color: #131d25;
    text-decoration: none;
    color: #fff;
    display: flex;
    align-items: center;
    font-size: 14px;
    line-height: 20px;
    width: fit-content;
    gap: 8px;
    flex: 1;
    transition: background-color 0.25s ease;

}

.details-section .headline .see-project-link:hover {
    background-color: #2b3c49;
}

.details-section .headline .tags {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-bottom: 24px;
}

.details-section .headline .tags .tag {
    border: 1px solid rgb(212 212 216);
    background: rgba(212, 212, 216, 0.2);
    padding: 8px 12px;
    font-weight: 600;
    font-size: 12px;
    letter-spacing: .5px;
    border-radius: 999px;
}

.image-comparison-container {
    margin-top: 40px;
    display: flex;
    flex-direction: column;
    gap: 32px;
}

.image-comparison-container .design .design-title {
    font-size: 24px;
    font-weight: 500;
    margin-bottom: 20px;
}

.image-comparison-container .design.old-design .design-image {
    border: 1px solid #131d25;
}

.details-section .headline h1 {
    font-size: 36px;
    line-height: 44px;
    font-weight: 600;
    margin-bottom: 24px;

}

.details-section .main-container .text-content .highlight {
    display: inline-flex;
    gap: 8px;
    margin-bottom: 12px;
}

.details-section .main-container .text-content .highlight .icon {
    height: 24px;
    width: 24px;
    padding-top: 4px;
}

.details-section .main-container .text-content .highlight .icon img {
    height: 24px;
    width: 24px;
}


.details-section .main-container .text-content .highlight .highlight-text-content {
    padding-top: 0px;
}


.details-section .main-container .text-content .highlight p {
    font-size: 16px;
}

.journey-map-container {
    padding-top: 0px;
    padding-bottom: 50px;
    padding-left: 30px;
    padding-right: 30px;

    max-width: 1280px;
    margin: 0 auto;
}

.journey-map-container .design-title {
    font-size: 24px;
    font-weight: 500;
    margin-bottom: 20px;
}

.journey-map-wrapper {
    margin-top: 24px;
    padding: 16px;
    border-radius: 8px;
    border: 1px solid rgb(228 228 231);
    background: #fafafa;

}

.journey-map-wrapper .journey-steps {
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
}

.journey-map-wrapper .journey-steps .journey-step {
    display: flex;
    align-items: center;
    padding: 8px 12px;
    border-radius: 999px;
    background: #fff;
    border: 1px solid rgb(228 228 231);
    font-size: 14px;
    gap: 8px;
    width: 100%;
    font-weight: 500;
    letter-spacing: .2px;
    line-height: 18px;
}

.journey-map-wrapper .journey-steps .journey-step span {
    font-weight: 600;
    font-size: 14px;
    color: #26A541;
}

/* POPUP FORM */

.flow-block {
    margin-bottom: 2.5rem;

    padding-top: 0px;
    padding-bottom: 50px;
    padding-left: 30px;
    padding-right: 30px;

    max-width: 1280px;
    margin: 0 auto;
}

.flow-block-title {
    font-size: 24px;
    line-height: 1.6;
    font-weight: 500;
    margin-bottom: 20px;
}

.flow-block-intro {
    margin-bottom: 20px;
    max-width: 60ch;
}

.flow-block-body {
    display: grid;
    gap: 1.25rem;
    margin-bottom: 1rem;
    opacity: 90%;
}

.flow-block-subtitle {
    font-size: 18px;
    font-weight: 500;
    letter-spacing: 0.2px;
    margin-bottom: 12px;
}

.flow-block-list {
    font-size: 16px;
    line-height: 1.6;
    padding-left: 1rem;
    list-style: disc;
}

.flow-block-list li+li {
    margin-top: 8px;
}

@media (min-width: 768px) {
    .flow-block-body {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}


.email-breakdown-container {
    padding-top: 0px;
    padding-bottom: 50px;
    padding-left: 30px;
    padding-right: 30px;

    max-width: 1280px;
    margin: 0 auto;
}

.email-breakdown-container .design-title {
    font-size: 24px;
    font-weight: 500;
    margin-bottom: 20px;
}

.back-to-projects-container {
    padding-bottom: 0px;
    padding-left: 30px;
    padding-right: 30px;

    max-width: 1280px;
    margin: 0 auto 50px;
}

.back-to-projects {
    margin-top: 24px;
    padding: 12px 16px;
    border-radius: 6px;
    text-decoration: none;
    display: flex;
    align-items: center;
    font-size: 14px;
    line-height: 20px;
    width: fit-content;
    gap: 8px;
    flex: 1;

}

/* Email Cards (Accordion) */
.emails-list {
    margin-top: 1.5rem;
    display: grid;
    grid-template-columns: 1fr;
    gap: 1rem;
}

.email-card {
    border-radius: 12px;
    background: #fff;
    border: 1px solid #e5e7eb;
    overflow: hidden;
    transition:
        border-color 0.2s ease,
        box-shadow 0.2s ease,
        transform 0.15s ease;
}

.email-card:hover {
    box-shadow: 0 8px 20px rgba(15, 23, 42, 0.08);
    transform: translateY(-2px);
}

.email-card-header {
    padding: 12px 16px;
    display: flex;
    align-items: center;
    justify-content: flex-start;
    cursor: pointer;
    gap: 12px;
    width: 100%;
    border: none;
}

.email-meta {
    display: flex;
    flex-direction: column;
    gap: 8px;
    align-items: flex-start;
    text-align: left;
}

.email-title {
    font-size: 16px;
    font-weight: 600;
}

.email-summary {
    font-size: 14px;
    line-height: 1.6;
    letter-spacing: .2px;
    color: #6b7280;
}


.email-toggle-icon {
    font-size: 1.2rem;
    line-height: 1;
    color: #6b7280;
    transition: transform 0.2s ease, color 0.2s ease;
    margin-left: auto;
}

.email-card.is-open {
    border-color: #0f766e;
    box-shadow: 0 10px 24px rgba(15, 118, 110, 0.15);
}

.email-card.is-open .email-toggle-icon {
    transform: rotate(90deg);
    color: #0f766e;
}

.email-body {
    max-height: 0;
    overflow: scroll;
    transition: max-height 0.25s ease;
    background: rgba(15, 118, 110, 0.02);
}

.email-body::-webkit-scrollbar {
    display: none;
}

/* For Firefox */
.email-body {
    scrollbar-width: none;
}

/* For IE and Edge */
.email-body {
    -ms-overflow-style: none;
}

.email-card.is-open .email-body {
    border-top: 1px solid #e5e7eb;
}

.email-body-inner {
    padding: 0.9rem 1rem 1rem;
    font-size: 0.9rem;
}

.email-body-inner h4 {
    margin: 0 0 12px;
    font-size: 16px;
    font-weight: 600;
}

.email-body-inner p {
    font-size: 14px;
    margin: 0 0 0.4rem;
    color: #6b7280;
}

.email-body-inner ul {
    margin: 0.1rem 0 16px 1.1rem;
    padding: 0;
    color: #6b7280;
    font-size: 14px;
    width: fit-content;
}

.email-body-inner li {
    margin-bottom: 8px;
    list-style: disc;
}


.modal-view-email-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 12px 16px;
    margin-top: 0.5rem;
    border-radius: 6px;
    background: #131d25;
    color: #ffffff;
    font-size: 14px;
    line-height: 20px;
    text-decoration: none;
    border: none;
    cursor: pointer;
    transition: background-color 0.25s ease;
}

.modal-view-email-btn:hover {
    background-color: #2b3c49;
}

/* EMAIL MODAL */
.email-modal {
    position: fixed;
    inset: 0;
    z-index: 80;
    display: none;
    /* will toggle later with JS */
}

/* When open we’ll add .is-open via JS */
.email-modal.is-open {
    display: block;
}

/* Backdrop */
.email-modal-backdrop {
    position: absolute;
    inset: 0;
    background: rgba(15, 23, 42, 0.5);
}

/* Dialog container */
.email-modal-dialog {
    position: relative;
    max-width: 640px;
    margin: 4vh auto;
    background: #ffffff;
    border-radius: 16px;
    padding: 24px;
    box-shadow: 0 24px 70px rgba(15, 23, 42, 0.4);
    display: flex;
    flex-direction: column;
    max-height: 92vh;
}

/* Close button */
.email-modal-close {
    position: absolute;
    top: 0.6rem;
    right: 0.8rem;
    font-size: 1.6rem;
    border: none;
    background: transparent;
    cursor: pointer;
    line-height: 1;
    color: #6b7280;
}

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

/* Title */
.email-modal-dialog h2 {
    margin: 0 0 0.75rem;
    font-size: 16px;
    font-weight: 600;
}

/* Subject + Preheader */
.email-modal-meta {
    margin-bottom: 16px;
    font-size: 0.9rem;
}

.email-modal-subject {
    font-weight: 600;
    margin-bottom: 8px;
}

.email-modal-preheader {
    color: #6b7280;
    font-size: 0.85rem;
    margin-top: 0.15rem;
}

/* Desktop/Mobile toggle */
.email-modal-view-toggle {
    display: inline-flex;
    align-items: center;
    gap: 0.25rem;
    margin-bottom: 16px;
    border-radius: 6px;
    background: #f3f4f6;
}

.view-toggle-btn {
    border: none;
    background: transparent;
    padding: 8px 12px;
    border-radius: 6px;
    font-size: 14px;
    letter-spacing: 0.3px;
    cursor: pointer;
    color: #6b7280;
    transition: background 0.15s ease, color 0.15s ease;
}

.view-toggle-btn.is-active {
    background: #131d25;
    color: #ffffff;
}

/* Image container */
.email-modal-content {
    flex: 1;
    overflow-y: scroll;
    margin: 0 auto;
    background: #f9fafb;
}

.email-modal-content img {
    width: 100%;
    display: block;
}

.email-modal-content.is-desktop-view {
    max-width: 600px;
}

/* Mobile view width cap */
.email-modal-content.is-mobile-view {
    max-width: 360px;
}

/* Small screens */
@media (max-width: 640px) {
    .email-modal-dialog {
        margin: 6vh 1rem;
        padding: 1rem;
    }
}

@media (min-width: 1024px) {
    .details-section .headline h1 {
        font-size: 44px;
        line-height: 44px;

    }

    .image-comparison-container {
        margin-top: 40px;
        display: flex;
        flex-direction: row;
        gap: 32px;
    }

    .image-comparison-container .design {
        width: 40%;
    }

    .journey-map-wrapper .journey-steps .journey-step {
        width: fit-content;
    }
}