/* Variables for easy theming */
:root {
    --primary-color: #6A5ACD; /* Deep Purple */
    --secondary-color: #A060C0; /* Lighter Purple */
    --accent-color: #FFD700; /* Gold/Yellow for highlights */
    --text-color: #333;
    --background-color: #F8F9FA; /* Light Gray */
    --card-background: #ffffff;
    --border-color: #e0e0e0;
    --shadow-light: rgba(0, 0, 0, 0.05);
    --shadow-medium: rgba(0, 0, 0, 0.12);
    --font-family: 'Inter', sans-serif; /* Using Inter font */
    --border-radius: 12px;
    --transition-speed: 0.4s ease-in-out;
}

/* Base Styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: var(--font-family);
    line-height: 1.6;
    color: var(--text-color);
    background: linear-gradient(180deg, var(--background-color) 0%, #E6E8EB 100%); /* Subtle gradient background */
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    overflow-x: hidden; /* Prevent horizontal scroll due to responsive elements */
}

.container {
    width: 90%;
    max-width: 1400px; /* Increased max-width */
    margin: 0 auto;
    padding: 20px 0;
}

/* Header */
.main-header {
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    color: white;
    padding: 50px 0; /* More vertical padding */
    text-align: center;
    box-shadow: 0 6px 15px var(--shadow-medium);
    border-bottom-left-radius: var(--border-radius);
    border-bottom-right-radius: var(--border-radius);
}

.main-header h1 {
    font-size: clamp(2.8rem, 6vw, 4.5rem);
    margin-bottom: 15px;
    font-weight: 800; /* Bolder font */
    text-shadow: 2px 2px 4px rgba(0,0,0,0.2);
}

.main-header p {
    font-size: clamp(1.1rem, 2.5vw, 1.5rem);
    opacity: 0.9;
}

/* Main Content Area */
main {
    flex-grow: 1;
    padding: 40px 0;
}

.card {
    background-color: var(--card-background);
    padding: clamp(25px, 5vw, 50px); /* More responsive padding */
    margin-bottom: 35px; /* More spacing */
    border-radius: var(--border-radius);
    box-shadow: 0 8px 25px var(--shadow-medium); /* Stronger shadow */
    transition: transform var(--transition-speed), box-shadow var(--transition-speed);
    border: 1px solid var(--border-color);
}

.card:hover {
    transform: translateY(-8px); /* More pronounced lift effect */
    box-shadow: 0 12px 30px rgba(0, 0, 0, 0.18);
}

.card h2 {
    color: var(--primary-color);
    margin-bottom: 25px;
    font-size: clamp(2rem, 4.5vw, 3rem);
    border-bottom: 3px solid var(--secondary-color); /* Thicker border */
    padding-bottom: 12px;
    font-weight: 700;
}

.card p {
    margin-bottom: 20px;
    line-height: 1.8;
    font-size: clamp(1rem, 2.8vw, 1.2rem);
}

/* Buttons */
.btn {
    display: inline-block;
    padding: 14px 30px; /* Larger buttons */
    border: none;
    border-radius: var(--border-radius);
    font-size: clamp(1.05rem, 2.5vw, 1.2rem);
    font-weight: 600;
    cursor: pointer;
    transition: background-color var(--transition-speed), transform var(--transition-speed), box-shadow var(--transition-speed);
    text-decoration: none;
    text-align: center;
    box-shadow: 0 4px 10px rgba(0,0,0,0.1); /* Button shadow */
}

.btn.primary {
    background-color: var(--primary-color);
    color: white;
    background: linear-gradient(45deg, var(--primary-color), var(--secondary-color)); /* Gradient button */
}

.btn.primary:hover {
    background-color: #5d4aae; /* Darker primary */
    transform: translateY(-3px);
    box-shadow: 0 6px 15px rgba(0,0,0,0.15);
}

.btn.secondary {
    background-color: var(--accent-color);
    color: var(--text-color);
    border: 1px solid var(--accent-color);
}

.btn.secondary:hover {
    background-color: #e6c200; /* Darker accent */
    transform: translateY(-3px);
    box-shadow: 0 6px 15px rgba(0,0,0,0.15);
}

.btn.tertiary {
    background-color: transparent;
    color: var(--primary-color);
    border: 2px solid var(--primary-color);
}

.btn.tertiary:hover {
    background-color: var(--primary-color);
    color: white;
    transform: translateY(-3px);
    box-shadow: 0 6px 15px rgba(0,0,0,0.15);
}

/* Forms */
.form-group {
    margin-bottom: 25px;
}

.form-group label {
    display: block;
    margin-bottom: 10px;
    font-weight: 700;
    color: var(--primary-color);
    font-size: clamp(1rem, 2.5vw, 1.15rem);
}

.form-group input[type="text"],
.form-group input[type="number"],
.form-group textarea {
    width: 100%;
    padding: 14px;
    border: 2px solid var(--border-color); /* Thicker border */
    border-radius: var(--border-radius);
    font-family: var(--font-family);
    font-size: clamp(0.95rem, 2.2vw, 1.05rem);
    resize: vertical;
    transition: border-color var(--transition-speed), box-shadow var(--transition-speed);
}

.form-group input:focus,
.form-group textarea:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 4px rgba(106, 90, 205, 0.25); /* Larger, softer focus ring */
}

/* Spinner for Loading */
.spinner {
    border: 6px solid rgba(0, 0, 0, 0.1);
    border-top: 6px solid var(--primary-color);
    border-radius: 50%;
    width: 60px;
    height: 60px;
    animation: spin 1s linear infinite;
    margin: 30px auto;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* --- Roadmap Specific Styles (SVG related) --- */

.roadmap-summary {
    background-color: var(--secondary-color);
    color: white;
    padding: 25px 30px;
    border-radius: var(--border-radius);
    margin-bottom: 40px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
    font-size: clamp(1.1rem, 2.8vw, 1.3rem);
    font-weight: 600;
    text-align: center;
    background: linear-gradient(90deg, var(--secondary-color), #DDA0DD); /* Lighter purple gradient */
}

.roadmap-summary p {
    margin: 8px 0;
    font-size: clamp(1rem, 2.5vw, 1.2rem);
    line-height: 1.6;
}

/* SVG Container for the Roadmap */
#roadmapSvgContainer {
    width: 100%;
    overflow: auto; /* Enable scrolling for zoomable content if it exceeds container */
    max-height: 70vh; /* Limit height for initial view, enable scroll */
    background-color: var(--card-background);
    border-radius: var(--border-radius);
    box-shadow: 0 4px 15px var(--shadow-medium);
    border: 1px solid var(--border-color);
    margin-bottom: 30px;
    cursor: grab; /* Indicate draggable content */
}

#roadmapSvgContainer:active {
    cursor: grabbing;
}


/* Styling for elements within the SVG */
.roadmap-step-rect {
    fill: var(--card-background);
    stroke: var(--primary-color);
    stroke-width: 2;
    filter: drop-shadow(3px 3px 2px rgba(0,0,0,0.1));
    transition: all 0.3s ease-in-out;
}

.roadmap-step-rect:hover {
    fill: #f0f0f0; /* Slightly change color on hover */
    stroke: var(--accent-color); /* Highlight border on hover */
    transform: translate(-2px, -2px); /* Slight lift effect on hover */
    filter: drop-shadow(5px 5px 3px rgba(0,0,0,0.2));
}

.roadmap-step-title {
    font-family: 'Inter', sans-serif; /* Explicitly set font */
    font-size: 16px; /* Base size, will scale with SVG zoom */
    font-weight: 700;
    fill: var(--primary-color);
}

.roadmap-step-desc {
    font-family: 'Inter', sans-serif; /* Explicitly set font */
    font-size: 12px; /* Base size */
    fill: var(--text-color);
}

.roadmap-step-time {
    font-family: 'Inter', sans-serif; /* Explicitly set font */
    font-size: 11px; /* Base size */
    font-weight: 600;
    fill: var(--secondary-color);
}

.roadmap-line {
    stroke: var(--secondary-color);
    stroke-width: 3;
    fill: none; /* Paths should not be filled */
    marker-end: url(#arrowhead); /* Arrowhead for lines */
}

.roadmap-node-circle {
    fill: var(--primary-color);
    stroke: white;
    stroke-width: 2;
}

/* SVG Heading and Total Days */
.svg-roadmap-heading { /* Changed from svg-roadmap-title to avoid confusion */
    font-family: 'Inter', sans-serif;
    font-size: 28px;
    font-weight: 800;
    fill: var(--primary-color);
}

.svg-total-days-text { /* Changed from svg-total-days */
    font-family: 'Inter', sans-serif;
    font-size: 18px;
    font-weight: 600;
    fill: var(--text-color);
}


/* Roadmap Actions (Buttons below roadmap) */
.roadmap-actions {
    display: flex;
    justify-content: center;
    gap: 20px;
    margin-top: 30px;
    flex-wrap: wrap;
}

/* Footer */
.main-footer {
    background-color: var(--text-color);
    color: white;
    text-align: center;
    padding: 25px 0;
    font-size: 0.95rem;
    margin-top: auto;
}

/* Utility Class */
.hidden {
    display: none !important;
}

/* Responsive Adjustments */
@media (min-width: 768px) {
    .container {
        padding: 60px 0;
    }
    .main-header {
        padding: 60px 0;
    }
    .card {
        margin-bottom: 50px;
    }
    .form-group label {
        font-size: 1.15rem;
    }
    .form-group input[type="text"],
    .form-group input[type="number"],
    .form-group textarea {
        font-size: 1.05rem;
    }
    .btn {
        padding: 16px 35px;
        font-size: 1.2rem;
    }
}

@media (min-width: 1024px) {
    .container {
        max-width: 1600px; /* Even wider container for large displays */
    }
}

/* Print Styles (to ensure roadmap looks good when printed as PDF) */
@media print {
    body {
        background-color: #fff;
        color: #000;
        -webkit-print-color-adjust: exact;
        print-color-adjust: exact;
    }
    .main-header, .main-footer, .roadmap-actions, #assessment, #introduction, #loading {
        display: none !important;
    }
    .card {
        box-shadow: none;
        border: none; /* No borders for print */
        page-break-inside: avoid;
        margin-bottom: 10px;
        padding: 0; /* No padding on print card itself */
    }
    /* --- NEW STYLES for the Enhanced Roadmap Summary --- */
    .roadmap-summary {
        background: linear-gradient(135deg, #f5f7fa, #eef2f7); /* Lighter, more professional background */
        color: var(--text-color);
        padding: 25px 30px;
        border-radius: var(--border-radius);
        margin-bottom: 40px;
        border: 1px solid var(--border-color);
        text-align: left;
    }

    .summary-header h3 {
        font-size: clamp(1.2rem, 3vw, 1.5rem);
        font-weight: 700;
        color: var(--primary-color);
        margin-bottom: 20px;
        text-align: center;
    }

    .summary-details {
        display: grid;
        grid-template-columns: repeat(auto-fit, minmax(250px, 1fr)); /* Responsive grid */
        gap: 20px;
    }

    .summary-item {
        background-color: #ffffff;
        padding: 15px;
        border-radius: 8px;
        border: 1px solid #e5e7eb;
        box-shadow: 0 2px 4px var(--shadow-light);
    }

    .summary-label {
        display: block;
        font-size: 0.9rem;
        font-weight: 600;
        color: #6b7280; /* Muted gray for labels */
        margin-bottom: 5px;
    }

    .summary-value {
        font-size: 1.1rem;
        font-weight: 600;
        color: var(--text-color);
    }

    .summary-value.highlight {
        color: var(--secondary-color);
        font-size: 1.2rem;
        font-weight: 700;
    }

    #roadmapSvgContainer {
        border: none;
        box-shadow: none;
        overflow: visible !important; /* Ensure all content is visible */
        max-height: none !important; /* No max-height constraint */
        width: auto !important; /* Adjust width naturally */
        height: auto !important;
    }
    /* Ensure SVG elements print correctly - their fill/stroke should be sufficient */
    svg {
        width: 100% !important; /* Make SVG fill available print width */
        height: auto !important;
        overflow: visible !important;
    }
}
