#t2Adulthood {
    width: 90%;
    margin: 0 auto;
    max-width: 1200px;
    /* padding: 20px; */
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    position: relative;
    margin-bottom: 100px;
}

#t2Adulthood .circles-row {
    display: flex;
    justify-content: space-around;
    width: 100%;
    z-index: 2;
}
#t2Adulthood .top-row {
    margin-right: 10%;
    width: 90%;
}
#t2Adulthood .bottom-row {
    margin-left: 10%;
    width: 90%;
}
#t2Adulthood a.circle {
    width: 150px;
    height: 150px;
    border-radius: 50%;
    display: flex;
    justify-content: center;
    align-items: center;
    text-align: center;
    color: #FFFFFF;
    font-weight: bold;
    font-size: 1.1em;
    cursor: pointer;
    background-size: cover;
    background-position: center;
    position: relative;
    transition: transform 0.3s ease-out, opacity 0.3s ease-out;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
    text-decoration: none;
    overflow: hidden;
}

/* Image styling for Age circles */
#t2Adulthood a.circle img {
    width: 100%;
    height: 100%;
    object-fit: cover; /* Ensures image covers the circle without distortion */
    border-radius: 50%; /* Ensures the image itself is clipped to a circle */
    filter: brightness(50%);
}

#t2Adulthood a.circle::after {
    content: attr(data-text);
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    color: #FFFFFF;
    text-shadow: 0 1px 2px rgba(0,0,0,0.8); 
    pointer-events: none;
    z-index: 3; 
}

/* Corrected Hover Effects */
#t2Adulthood .top-row a.circle:hover {
    opacity: 0.8;
    transform: translateY(-10px) scale(1.05); 
}

#t2Adulthood .bottom-row a.circle:hover {
    opacity: 0.8;
    transform: translateY(10px) scale(1.05);
}

/* Background colors for circles */
#t2Adulthood .age-14-15,
#t2Adulthood .age-17,
#t2Adulthood .age-19-26,
#t2Adulthood .resources { background-color: #C4122F; }
#t2Adulthood .age-16,
#t2Adulthood .age-18,
#t2Adulthood .mitransitions-plan,
#t2Adulthood .transition-worksheet { background-color: #513D94; }

/* Wavy line container */
#t2Adulthood .line-container {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    z-index: 1;
    margin: -10px 0;
}

#t2Adulthood #wavyLineSvg {
    width: 100%;
    height: auto;
    overflow: visible;
}
#t2Adulthood .line-container img {
    width: 100%;
}
.star-image {
    position: absolute;
    left: -100px;
    bottom: -100px;
    width: 200px;
}
.star-image img {
    width: 100%;
}
/*
===================================================
--- Mobile Responsiveness (Screen size up to 768px) ---
===================================================
*/
@media (max-width: 768px) {
    #t2Adulthood {
        flex-direction: row;
        align-items: flex-start;
        position: relative;
    }
    #t2Adulthood .circles-row {
        flex-direction: column;
        align-items: start;
    }

    #t2Adulthood .top-row,
    #t2Adulthood .bottom-row {
        margin-right: 0;
        margin-left: 0;
        width: 50%;
    }
    
    #t2Adulthood a.circle {
        width: 120px;
        height: 120px;
        margin: 15px auto;
        max-width: 100%;
       
    }
    #t2Adulthood .line-container {
        width: 10%;
        height: 100%;
        border: 1px solid #ccc;

        position: absolute;
        top: 0;
        bottom: 0;

        display: none;
    }
    #t2Adulthood #wavyLineSvg {
        transform: rotate(90deg);
        width: 100%;
    }
    .star-image {
        left: 0;
        bottom: -170px;
    }
}

/*
===================================================
--- Transition sub pages ---
===================================================
*/

/* Container and Layout */
.plan-container {
    display: flex;
    width: 100%;
    max-width: 1200px; /* Example max width */
    margin: auto; /* Centering the component */
    background-color: #fff;
}

.plan-left-col {
    flex: 2; /* Takes twice the width of the right column */
    padding-right: 2em;
    padding-top: 2em;
    box-sizing: border-box;
}

.plan-right-col {
    flex: 1; /* 1 part of the width */
    position: relative;
    background-color: #513D94; /* Yellow background color */
    overflow: hidden;
}

/* Header Section */
.plan-header-section {
    padding-bottom: 20px;
}
.plan-main-title {
    font-size: 2.5em !important;
    color: #000;
    margin-bottom: 15px;
    position: relative;
    padding-bottom: 10px;
}
.plan-main-title span {
    border-bottom: 4px solid #CC0000;
}

.plan-intro-text {
    font-size: 1.1em;
    line-height: 1.6;
    color: #000;
    margin-bottom: 30px;
}

/* Dropdown Section */
.plan-dropdown-section {
    border-top: 1px solid #ddd;
}

.plan-dropdown-item {
    border-bottom: 1px solid #ddd;
}

.plan-dropdown-button {
    background-color: transparent;
    color: #000000;
    padding: 15px 0;
    width: 100%;
    text-align: left;
    border: none;
    font-size: 1.05em;
    font-weight: 600;
    cursor: pointer;
    display: flex;
    justify-content: space-between;
    align-items: center;
    transition: background-color 0.2s;
}

.plan-dropdown-button:hover,
.plan-dropdown-button:active,
.plan-dropdown-button:focus{
	color: #000000 !important;
	background: #FFFFFF !important;
}

/* Caret Icon and Toggling using rotation on Unicode character \2303 */
.plan-dropdown-button::after {
    content: '\2303'; 
    font-size: 1.2em; 
    line-height: 0;
    margin-left: 10px;
    transition: transform 0.3s ease-in-out;
    transform: rotate(180deg);
}

.plan-dropdown-button.plan-active::after {
    transform: rotate(0deg);
}

.plan-dropdown-content {
    padding: 0 15px;
    max-height: 0; 
    overflow: hidden;
    transition: max-height 0.3s ease-in-out, padding 0.3s ease-in-out; 
}

.plan-dropdown-content a {
    color: #513D94;
}
.plan-dropdown-content a:hover {
    color: #C4122F;
}
.plan-dropdown-content.plan-show {
    max-height: 2000px; 
    padding: 15px 15px 20px;
}

.plan-dropdown-content p {
    margin: 0;
    color: #000;
    line-height: 1.5;
}

/* Right Column Image and Overlay */
.plan-right-image {
    width: 100%;
}
.plan-right-image.mobile {
    display: none;
}

/* --- Responsive adjustments --- */
@media (max-width: 768px) {
    .plan-container {
        flex-direction: column;
        width: 100%;
        margin: 0;
        border-radius: 0;
    }
    .plan-right-image.desktop {
        display: none;
    }
    .plan-right-image.mobile {
        display: block;
    }

    .plan-left-col {
        padding: 20px;
    }

    .plan-right-col {
        order: -1; 
    }
}

/* 
===================================================
--- Transition worksheet ---
===================================================
*/
#worksheet {
    background-color: white;
    border-radius: 10px;
    width: 100%;
    margin: 0 auto;
}
#worksheet .danger {
    color: #C4122F;
    font-weight: bold;
}
#worksheet header {
    display: block !important;
}
#worksheet header h1, 
#worksheet h2 {
    color: #000000;
    font-weight: bold;
    margin-bottom: 20px;
}

#worksheet header p {
    margin-bottom: 20px;
}

#worksheet .progress-bar-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin: 40px 0;
    position: relative;
    /* Ensure the full inactive line is always visible */
    background-color: #C4122F40;
    height: 4px;
    border-radius: 2px;
}

#worksheet .progress-bar-line {
    position: absolute;
    width: 0%;
    height: 100%;
    /* background-color: #513D94; */
    background-color: #C4122F;
    top: 0;
    left: 0;
    z-index: 0;
    transition: width 0.3s ease-in-out;
    border-radius: 2px;
}

#worksheet .progress-step {
    width: 20px;
    height: 20px;
    border-radius: 50%;
    z-index: 1;
    background-color: #FFFFFF; /* Inactive color */
    border: 3px solid #513D94;
}

#worksheet .progress-step.active {
    background-color: #513D94;
}

#worksheet .form-section {
    display: none;
}

#worksheet .form-section.active {
    display: block;
}

#worksheet .question-group {
    /* MOBILE FIRST: Stack elements by default */
    display: flex;
    flex-direction: column; /* Stack label and input/checkbox vertically */
    align-items: stretch;
    margin-bottom: 25px;
    padding: 20px;
    background-color: #513D941A;
    border-radius: 5px;
}

#worksheet .question-label {
    /* On mobile, labels take full width and have bottom margin */
    flex: none; 
    padding-right: 0;
    margin-bottom: 15px; 
}

#worksheet .question-label p {
    font-weight: bold;
    margin-bottom: 5px;
}

#worksheet .instruction {
    font-style: italic;
    font-weight: normal;
    font-size: 0.9em;
}
#worksheet input,
#worksheet textarea {
    background-color: #DEDAEA;
}
/* Ensure the main content containers take up the remaining width */
#worksheet .checkbox-container, 
#worksheet .radio-container, 
#worksheet textarea, 
#worksheet input[type="text"], 
#worksheet input[type="email"],
#worksheet .text-input-container {
    flex: 1; /* Allows it to take up the space below the label */
    min-width: 0; /* Prevents overflow issues */
}

#worksheet .checkbox-container label, 
#worksheet .radio-container label {
    display: flex;
    align-items: flex-start;
    margin-bottom: 8px;
    font-weight: normal;
    cursor: pointer;
}

#worksheet .checkbox-container input[type="checkbox"], 
#worksheet .radio-container input[type="radio"] {
    margin-right: 10px;
    cursor: pointer;
    accent-color: #513D94;
    appearance: none;
    -webkit-appearance: none; 
    -moz-appearance: none;
    display: inline-block;
    width: 16px;
    height: 16px;
    min-width: 16px;
    border: 1px solid #513D94;
}
#worksheet .radio-container input {
    border-radius: 50%; 
}
#worksheet .checkbox-container input:checked, 
#worksheet .radio-container input:checked {
    background-color: #513D94;
    border: 1px solid #513D94;
}
/* Fix for inline other fields */
#worksheet .other-inline-group {
    display: flex;
    align-items: center;
    gap: 1em;
    margin-bottom: 8px;
}
#worksheet .other-inline-group label {
    display: flex;
    align-items: center;
    margin: 0; 
    padding: 0;
    /* margin-right: 10px; */
    /* margin-bottom: 0; */
}
#worksheet .text-input-container label {
    margin-bottom: 0;
    margin-top: 8px;
}
.other-inline-group input[type="text"] {
    margin: 0;
    padding: 5px;
}
#worksheet .other-inline-group input[type="checkbox"] {
    margin-top: 0;
}

#worksheet textarea, 
#worksheet input[type="text"], 
#worksheet input[type="email"] {
    width: 100%;
    padding: 10px 0;
    padding-left: 10px;
    /* border: 1px solid #513D94; */
    border: none;
    border-radius: 5px;
    font-family: inherit;
    resize: vertical;
}

#worksheet .navigation-buttons {
    display: flex;
    justify-content: space-between;
    margin-top: 40px;
}

#worksheet #previousBtn, 
#worksheet #nextBtn, 
#worksheet #submitBtn {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 15px 30px;
    font-size: 1em;
    cursor: pointer;
    border: none;
    border-radius: 5px;
    transition: background-color 0.3s ease;
    text-transform: uppercase;
    font-weight: bold;
    color: white;
    background-color: #C4122F;
}

#worksheet #previousBtn:hover, 
#worksheet #nextBtn:hover, 
#worksheet #submitBtn:hover {
    filter: brightness(1.2);
}

#worksheet .navigation-buttons svg {
    fill: white;
    height: 20px;
    width: 20px;
}

#worksheet #previousBtn svg {
    margin-right: 10px;
}

#worksheet #nextBtn svg {
    margin-left: 10px;
}

#worksheet .final-message {
    text-align: center;
    margin-top: 50px;
}

#worksheet .final-message p {
    font-size: 1.2em;
    margin-bottom: 20px;
}

#worksheet #finalPrintBtn {
    background-color: #C4122F;
    color: white;
    padding: 15px 30px;
    border: none;
    border-radius: 5px;
    cursor: pointer;
    font-size: 1em;
    font-weight: bold;
    text-transform: uppercase;
}

/* * ***** DESKTOP OVERRIDES ***** */
@media (min-width: 768px) {
    #worksheet .question-group {
        /* On desktop, switch back to side-by-side flex layout */
        flex-direction: row; 
        align-items: flex-start;
    }
    
    #worksheet .question-label {
        /* Revert label to desktop flex property */
        flex: 1;
        padding-right: 20px;
        margin-bottom: 0; /* Remove mobile margin */
    }

    /* Revert main content containers to desktop flex property */
    #worksheet .checkbox-container, 
    #worksheet .radio-container, 
    #worksheet textarea, 
    #worksheet input[type="text"], 
    #worksheet input[type="email"],
    #worksheet .text-input-container {
        flex: 2;
    }
}


/* * ***** PRINT STYLES ***** */
@media print {
    body {
        /* Set background to white for printing efficiency */
        background-color: white !important;
    }

    #worksheet {
        box-shadow: none !important;
        /* Ensure it prints full width */
        max-width: none !important; 
    }

    /* 1. Show all form sections */
    .form-section {
        display: block !important;
    }

    /* 2. Hide navigation/controls that shouldn't be printed */
    .progress-bar-container,
    .navigation-buttons,
    #finalPrintBtn,
    .danger,
    header p:last-of-type { 
        display: none !important;
    }
    
    /* 3. Force all question groups to use the DESKTOP/PRINT layout */
    #worksheet .question-group {
        display: flex !important;
        flex-direction: row !important; 
        align-items: flex-start !important;
        break-inside: avoid; /* Prevent breaking a question group across pages */
    }
    
    #worksheet .question-label {
        flex: 1 !important;
        padding-right: 20px !important;
        margin-bottom: 0 !important;
    }

    #worksheet .checkbox-container, 
    #worksheet .radio-container, 
    #worksheet textarea, 
    #worksheet input[type="text"], 
    #worksheet input[type="email"],
    #worksheet .text-input-container {
        flex: 2 !important;
    }

    /* 4. Ensure input/textareas show their value, not just the box */
    input[type="text"],
    input[type="email"],
    textarea {
        border: none !important;
        background-color: #EFEFEF !important; /* Slightly grey background for text fields */
        padding: 5px !important;
    }

    /* Ensure radio/checkbox selections are clearly visible */
    input[type="radio"]:checked,
    input[type="checkbox"]:checked {
        /* Force color printing for checked box */
        background-color: #513D94 !important;
        -webkit-print-color-adjust: exact; 
        color-adjust: exact;
    }
    
    /* Ensure unchecked fields don't show the checkmark */
    input[type="radio"]:not(:checked),
    input[type="checkbox"]:not(:checked) {
        visibility: hidden;
    }
    
    /* Display the label next to the hidden/visible checkbox */
    .checkbox-container label, .radio-container label {
        display: block !important; /* Forces each option onto its own line for a clean list */
    }

    /* Ensure color in question groups prints correctly */
    .question-group {
        -webkit-print-color-adjust: exact;
        color-adjust: exact;
        background-color: #513D941A !important;
        border: 1px solid #513D941A;
        margin-bottom: 10px !important;
    }

    /* Ensure the final message content is visible */
    .final-message {
        display: block !important;
        text-align: left !important;
    }
}
