/* Inherit everything from test_speak.css */
@import url("test_speak.css");

/* 
   Specific overrides and new classes for the Writing Test Page 
*/

/* --- Hero Section --- */
.hero-section .hero-main-image {
    /* Ensure the new hero character fits well */
    max-height: 400px;
}

/* --- Section 2: Exam Comparison --- */
/* --- Section 2: Exam Comparison --- */
.book-comparison.exam-comparison-container {
    margin-top: 50px;
    display: flex;
    justify-content: center;
    align-items: center;
    /* This will now apply! ro + sign at section 2 */
    gap: 30px;
}

.exam-book-icon-large {
    width: 140px;
    /* Bigger size for desktop */
    height: auto;
    /* Fix stretching */
    display: block;
}

.plus-sign {
    font-size: 64px;
    font-weight: 800;
    color: #333;
    margin: 0 20px;
}

/* Fix alignment for Book Comparison (Section 1 & 2) */
.book-comparison {
    align-items: flex-start;
    /* Override 'center' from test_speak.css to align tops (icons) */
}

/* Fix alignment for Book Comparison (Section 1 & 2) */
.book-comparison {
    align-items: flex-start;
    /* Override 'center' from test_speak.css to align tops (icons) */
}

/* Section Title Override for Writing Page */
h2.section-title {
    font-size: 48px;
    /* Matched to screenshot size */
    color: #2D3A45;
    /* Dark color from screenshot */
    font-weight: 800;
    /* Extra bold */
    margin-bottom: 40px;
}

.task-flow-diagram {
    display: flex;
    justify-content: center;
    gap: 60px;
    /* Space between GT and Academic groups */
    margin-top: 20px;
    flex-wrap: wrap;
}

.flow-group {
    display: flex;
    flex-direction: column;
    align-items: center;
}

/* Intro Title Customization */
.tan-box-title {
    font-weight: 400;
    /* Normal weight for non-bold text */
    font-size: clamp(19px, 5vw, 29px);
    /* Smart responsive sizing */
    line-height: 1.4;
    margin-bottom: 30px;
}

.tan-box-title strong {
    font-weight: 800;
    /* Ensure bold text stays bold */
}

.flow-main-icon {
    width: 120px;
    /* Increased from 80px */
    /* Top book icon */
    margin-bottom: 10px;
}

.flow-arrows {
    display: flex;
    justify-content: space-around;
    width: 100%;
    margin-bottom: 10px;
}

.flow-arrow {
    width: 20px;
    height: auto;
}

.flow-tasks {
    display: flex;
    gap: 20px;
}

.flow-task-item {
    display: flex;
    flex-direction: column;
    align-items: center;
}

.flow-task-item img {
    width: 60px;
    /* Increased from 40px */
    /* Task paper icon */
    margin-bottom: 5px;
}

.flow-task-item p {
    font-weight: 700;
    font-size: 15px;
    color: #333;
}

/* --- Section 1: Main Task Layout (Horizontal) --- */
.parts-flow-horizontal {
    display: flex;
    flex-direction: column;
    gap: 40px;
    margin-top: 50px;
    padding: 0 20px;
}

.task-row {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 20px;
}

/* Left Icon Group */
.task-label-group {
    display: flex;
    flex-direction: column;
    align-items: center;
    min-width: 70px;
    /* Increased to accommodate larger icon */
}

.task-icon-paper {
    width: 80px;
    /* Increased from 50px to match Task 2 icon */
    height: auto;
    margin-bottom: 5px;
    filter: drop-shadow(0px 4px 4px rgba(0, 0, 0, 0.25));
    /* Added drop shadow */
}

.task-label-text {
    font-weight: 800;
    font-size: 15px;
    color: #333;
    letter-spacing: 0.5px;
}

/* Right Bubble Container */
.task-bubble-container {
    position: relative;
    display: flex;
    align-items: center;
    max-width: 600px;
    width: 100%;
}

.task-bubble {
    border-radius: 50px;
    /* Pill shape */
    padding: 45px 80px 45px 40px;
    /* Increased vertical padding from 25px to 45px */
    /* Right padding creates space for image overlap */
    width: 100%;
    color: #fff;
    /* font-size moved to p tag for specificity */
    line-height: 1.4;
    position: relative;
    z-index: 1;
}

.task-bubble p {
    font-size: 22px;
    /* Increased size applied directly to text */
    margin: 0;
    /* Remove default margins if any */
}

.task-bubble.blue-bg {
    background-color: #008CBC;
}

.task-bubble.tan-bg {
    background: linear-gradient(90deg, #F2C98A 0%, #E8AF5D 100%);
    /* Gradient similar to styles I might infer or just make nice */
    color: #333;
}

/* Overlapping Images */
.task-overlap-img {
    position: absolute;
    right: -40px;
    z-index: 2;
    top: 50%;
    transform: translateY(-50%);
    width: 120px;
    height: auto;
}

.task-overlap-img.hand-letter {
    width: 130px;
    right: -50px;
}

.task-overlap-img.academic-charts {
    width: 140px;
    right: -60px;
    filter: drop-shadow(0px 8px 8px rgba(0, 0, 0, 0.35));
    /* Stronger shadow to stand out from tan bg */
}

/* --- Task 2 Essay Section --- */
.writing-task-essay {
    margin-top: 60px;
    position: relative;
    z-index: 2;
    text-align: center;
}

.essay-diagram-container {
    display: flex;
    justify-content: center;
    align-items: flex-start;
    /* Align tops of books */
    gap: 100px;
    /* Space between the two groups */
    position: relative;
    max-width: 600px;
    margin: 0 auto;
}

.essay-group {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 30px;
    /* Space between Book and Task 2 icon */
}

.essay-book-icon {
    width: 160px;
    /* Increased from 120px */
    height: auto;
}

.essay-task-item {
    display: flex;
    flex-direction: column;
    align-items: center;
}

.essay-task-item img {
    width: 80px;
    /* Increased from 60px */
    margin-bottom: 5px;
    filter: drop-shadow(0px 4px 4px rgba(0, 0, 0, 0.25));
    /* Added drop shadow */
}

.essay-task-item p {
    font-weight: 800;
    font-size: 15px;
    color: #333;
    letter-spacing: 0.5px;
}

.essay-pencil-overlay {
    position: absolute;
    top: 80%;
    /* Moved down to sit between the visual gap of items */
    left: 50%;
    transform: translate(-50%, -50%) rotate(0deg);
    width: 250px;
    /* Greatly increased from 180px */
    z-index: 5;
}

/* --- Responsive Adjustments --- */
@media (max-width: 600px) {

    /* Task Flow Diagram */
    .task-flow-diagram {
        gap: 40px;
    }

    .flow-tasks {
        gap: 15px;
    }

    /* Horizontal Task Layout */
    .parts-flow-horizontal {
        gap: 30px;
        /* More space between rows */
        margin-top: 30px;
        padding: 0 10px;
    }

    .task-row {
        flex-direction: column;
        /* Stack Icon top, Bubble bottom */
        gap: 15px;
    }

    .task-label-group {
        margin-bottom: 5px;
    }

    .task-bubble-container {
        justify-content: center;
        max-width: 100%;
        /* Ensure specific height isn't forcing overlap */
    }

    .task-bubble {
        padding: 35px 100px 35px 30px;
        /* Increased vertical padding from 25px to 35px */
        /* Big right padding to clear the image */
        text-align: center;
        /* Center the text as seen in similar designs, or left if preferred. Screenshot looks centered? No, screenshot text looks centered or left. Let's stick to center for pill. */
    }

    .task-bubble p {
        font-size: 19px;
        /* Mobile font size */
        /* Ensure text doesn't run into the image */
    }

    /* Adjust overlaps for mobile */
    .task-overlap-img {
        width: 90px;
        right: 0px;
        /* Align tight to edge or slightly inside */
        /* Make sure it sits nicely */
        top: 50%;
        transform: translateY(-50%);
        display: block;
    }

    .task-overlap-img.hand-letter {
        width: 100px;
        right: -10px;
    }

    .task-overlap-img.academic-charts {
        width: 100px;
        right: -10px;
    }

    /* Task 2 Essay Mobile */
    .essay-diagram-container {
        gap: 70px;
        /* Increased from 40px */
    }

    .essay-book-icon {
        width: 140px;
        /* Increased from 110px */
    }

    .essay-pencil-overlay {
        width: 160px;
        /* Increased from 120px */
    }

    /* Section 2: Exam Comparison Mobile */
    .exam-comparison-container {
        gap: 15px;
        /* Reduce gap */
    }

    .book-item .exam-book-icon-large {
        width: 125px;
        /* Increased size for mobile */
        height: auto;
        /* Override fixed height from test_speak.css */
    }

    .plus-sign {
        font-size: 40px;
        /* Smaller plus sign */
        margin: 0 10px;
        line-height: 1;
        /* Reset line height */
    }
}

/* --- Section 4: Criteria Cards Font Size --- */
.criteria-card-content h3 {
    font-size: 29px;
    /* Increased from 1.5rem */
}

.criteria-card-content p {
    font-size: 22px;
    /* Increased from 1.1rem */
}

/* Optimize spacing for text */
.criteria-card-horizontal {
    padding-right: 60px;
    /* Reduced from 130px */
}

.criteria-card-content {
    padding-right: 0;
    /* Removing extra padding */
}

/* --- CTA Button Styles (from test_listen.css) --- */
.btn-primary.large {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(90deg, #16a34a 0%, #22c55e 50%, #16a34a 100%);
    background-size: 200% 100%;
    color: #fff;
    font-size: 24px;
    font-weight: 800;
    padding: 20px 60px;
    border-radius: 50px;
    text-decoration: none;
    box-shadow: 0 10px 30px rgba(22, 163, 74, 0.3);
    opacity: 1;
    transition: transform 0.1s ease, box-shadow 0.1s ease, opacity 0.1s ease;
    animation: shimmer-green 6s ease-in-out infinite;
}

@keyframes shimmer-green {
    0% {
        background-position: 0% 50%;
    }

    50% {
        background-position: 400% 50%;
    }

    100% {
        background-position: 0% 50%;
    }
}

.btn-primary.large:hover {
    animation: none;
    background: linear-gradient(135deg, #16a34a 0%, #22c55e 100%) !important;
    background-size: 100% 100% !important;
    transform: scale(1.05);
    opacity: 1;
    box-shadow: 0 15px 40px rgba(22, 163, 74, 0.5);
}

.btn-primary.large:active {
    transform: translateY(0) scale(0.98);
    box-shadow: 0 5px 15px rgba(22, 163, 74, 0.4);
    opacity: 0.9;
}

/* Mobile Fixes for Icons, Green Box, Button (<450px) */
@media (max-width: 450px) {


    /* 2. Green Box (Ready Instructions) */
    .ready-instructions-wrapper {
        padding: 15px !important;
    }

    .ready-instructions-content {
        padding: 20px !important;
    }

    .ready-instructions-content p {
        font-size: clamp(16px, 5vw, 20px) !important;
        line-height: 1.4 !important;
    }

    /* 3. Warning Text (Ready Banner) */
    .ready-banner .highlight {
        padding: 20px !important;
        font-size: clamp(14px, 4vw, 18px) !important;
        width: 100%;
        box-sizing: border-box;
        margin-bottom: 5px !important;
    }

    /* 4. CTA Button & Disclaimer */
    .cta-area {
        display: flex !important;
        flex-direction: column !important;
        align-items: center !important;
    }

    .btn-primary.large {
        display: inline-flex !important;
        width: auto !important;
        max-width: 90%;
        margin: 0 0 20px 0 !important;
        padding: 15px 40px !important;
        font-size: clamp(18px, 5vw, 22px) !important;
        box-sizing: border-box;
    }

    .disclaimer-text {
        font-size: clamp(11px, 3.5vw, 14px) !important;
        line-height: 1.4;
        opacity: 0.8;
        text-align: center;
    }

    /* What to Do Intro Text Scaling */
    .what-to-do-intro {
        padding: 20px 25px !important;
    }

    .what-to-do-intro p {
        font-size: clamp(16px, 4vw, 22px) !important;
    }
}