/* Basic Resets & Global Styles */
:root {
    --primary-blue: #0056b3; /* Darker blue for accents/buttons */
    --secondary-blue: #007bff; /* Brighter blue for highlights */
    --dark-grey: #343a40; /* For text and deeper elements */
    --medium-grey: #6c757d; /* For secondary text */
    --light-grey: #f8f9fa; /* For backgrounds */
    --white: #ffffff;
    --border-color: #dee2e6; /* Light border */
    --shadow-color: rgba(0, 0, 0, 0.1);
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: 'Source Sans Pro', sans-serif;
    line-height: 1.6;
    color: var(--dark-grey);
    background-color: var(--white);
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 15px; /* Consistent padding on sides */
}

/* Typography */
h1, h2, h3 {
    font-family: 'Roboto', sans-serif;
    color: var(--dark-grey);
    line-height: 1.2;
    margin-bottom: 0.5em;
}

h1 { font-size: 2.5em; }
h2 { font-size: 2em; }
h3 { font-size: 1.5em; }

p {
    margin-bottom: 1em;
}

a {
    color: var(--primary-blue);
    text-decoration: none;
    transition: color 0.3s ease;
}

a:hover {
    color: var(--secondary-blue);
}

/* Buttons */
.btn {
    display: inline-flex; /* Use inline-flex to keep it flow like inline-block but use flex properties internally */
    align-items: center;   /* Vertically center the text/content */
    justify-content: center; /* Horizontally center the text/content */

    padding: 12px 25px;
    border-radius: 5px;
    font-weight: 600;
    text-transform: uppercase;
    transition: background-color 0.3s ease, color 0.3s ease, transform 0.2s ease;
    /* text-align: center; */ /* This can be removed now as justify-content handles horizontal centering */
    border: none;
    cursor: pointer;
}
/* .btn {
    display: inline-block;
    padding: 12px 25px;
    border-radius: 5px;
    font-weight: 600;
    text-transform: uppercase;
    transition: background-color 0.3s ease, color 0.3s ease, transform 0.2s ease;
    text-align: center;
    border: none;
    cursor: pointer;
} */

.primary-btn {
    background-color: var(--primary-blue);
    color: var(--white);
}

.primary-btn:hover {
    background-color: var(--secondary-blue);
    transform: translateY(-2px);
}

.large-btn {
    padding: 15px 30px;
    font-size: 1.1em;
}

/* Sections */
.section {
    padding: 60px 0;
    text-align: center;
}

.section:nth-of-type(even) {
    background-color: var(--light-grey);
}

.highlight-text {
    color: var(--primary-blue);
    font-weight: 700;
}

/* Header/Hero Section */
.hero-section {
    background: linear-gradient(135deg, var(--primary-blue), #003366); /* Darker gradient */
    color: var(--white);
    padding: 80px 0;
    text-align: center;
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 50vh; /* Make it a decent height */
    position: relative;
    overflow: hidden;
}

.hero-section::before { /* Subtle background pattern/texture */
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: url('data:image/svg+xml;utf8,<svg width="100" height="100" viewBox="0 0 100 100" xmlns="http://www.w3.org/2000/svg"><circle cx="50" cy="50" r="2" fill="rgba(255,255,255,0.05)"/></svg>');
    background-size: 20px 20px;
    opacity: 0.8;
}

.hero-section .container {
    position: relative;
    z-index: 1;
}

.main-logo-icon {
    width: 80px; /* Adjust size */
    height: auto;
    margin-bottom: 20px;
    filter: drop-shadow(0 4px 8px rgba(0,0,0,0.2));
}

.hero-section .domain-name {
    font-size: 3.5em;
    font-weight: 700;
    margin-bottom: 10px;
    color: var(--white);
    letter-spacing: -1px;
}

.hero-section .tagline {
    font-size: 1.5em;
    margin-bottom: 20px;
    font-weight: 400;
    opacity: 0.9;
}

.hero-section .sub-headline {
    font-size: 1.1em;
    margin-bottom: 40px;
    opacity: 0.8;
    max-width: 600px;
    margin-left: auto;
    margin-right: auto;
}

/* Demo Section */
.demo-section h2 {
    margin-bottom: 40px;
}

.demo-tabs {
    display: flex;
    justify-content: center;
    flex-wrap: wrap; /* Allow wrapping on small screens */
    margin-bottom: 30px;
    border-bottom: 2px solid var(--border-color);
}

.tab-button {
    background-color: transparent;
    border: none;
    padding: 15px 25px;
    cursor: pointer;
    font-size: 1.1em;
    font-weight: 600;
    color: var(--medium-grey);
    border-bottom: 3px solid transparent;
    transition: all 0.3s ease;
    margin: 0 10px; /* Space between buttons */
    flex-shrink: 0; /* Prevent shrinking too much */
}

.tab-button:hover:not(.active) {
    color: var(--primary-blue);
    border-color: var(--secondary-blue);
}

.tab-button.active {
    color: var(--primary-blue);
    border-color: var(--primary-blue);
    font-weight: 700;
}

.demo-content {
    display: none; /* Hidden by default */
    text-align: left; /* Align content inside tabs to left */
    padding-top: 20px;
    animation: fadeIn 0.5s ease-out; /* Fade in animation */
}

.demo-content.active {
    display: block; /* Shown when active */
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(20px); }
    to { opacity: 1; transform: translateY(0); }
}

.demo-content h3 {
    color: var(--primary-blue);
    font-size: 1.8em;
    margin-bottom: 15px;
}

.demo-content p {
    font-size: 1.1em;
    max-width: 900px;
    margin-left: auto;
    margin-right: auto;
    text-align: center; /* Center paragraph below heading */
}

.demo-placeholder {
    width: 100%;
    background-color: var(--border-color); /* A light background for the mockups */
    border-radius: 8px;
    /* overflow: hidden; */
    margin: 30px auto; /* Center and give space */
    box-shadow: 0 5px 15px var(--shadow-color);
    display: flex; /* For centering the image */
    justify-content: center;
    align-items: center;
    min-height: 350px; /* Minimum height for placeholders */
    position: relative; /* For potential overlays or effects */
}

.demo-image {
    max-width: 100%;
    height: auto;
    display: block; /* Remove extra space below image */
}


.demo-strength {
    font-style: italic;
    color: var(--medium-grey);
    margin-top: 20px;
    font-size: 0.95em;
}

/* Power of Name Section */
.power-of-name-section h2 {
    margin-bottom: 50px;
}

.features-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); /* Responsive grid */
    gap: 30px;
    text-align: left;
}

.feature-item {
    background-color: var(--white);
    padding: 30px;
    border-radius: 8px;
    box-shadow: 0 4px 10px var(--shadow-color);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.feature-item:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.15);
}

.feature-item h3 {
    color: var(--primary-blue);
    margin-bottom: 10px;
}

.feature-item p {
    font-size: 0.95em;
    color: var(--medium-grey);
}

/* Opportunity Section */
.opportunity-section {
    background: linear-gradient(45deg, #003366, var(--primary-blue)); /* Deeper blue gradient */
    color: var(--white);
    padding: 80px 0;
}

.opportunity-section h2 {
    color: var(--white);
    margin-bottom: 20px;
}

.opportunity-section p {
    font-size: 1.2em;
    max-width: 800px;
    margin: 0 auto 30px auto;
    opacity: 0.9;
}

.opportunity-section .btn {
    margin-top: 20px;
}

.contact-info {
    font-size: 1.1em;
    margin-top: 30px;
    opacity: 0.9;
}

.contact-info a {
    color: var(--white);
    text-decoration: underline;
}

.contact-info a:hover {
    color: var(--secondary-blue);
}

/* Footer */
.footer {
    background-color: var(--dark-grey);
    color: var(--white);
    padding: 30px 0;
    font-size: 0.9em;
    opacity: 0.9;
}

.footer a {
    color: var(--white);
    text-decoration: underline;
}

.footer a:hover {
    color: var(--secondary-blue);
}


/* --- Responsive Adjustments --- */

/* Mobile & Small Tablets (up to 768px) */
@media (max-width: 768px) {
    h1 { font-size: 2em; }
    h2 { font-size: 1.7em; }
    h3 { font-size: 1.3em; }

    .hero-section {
        padding: 60px 0;
        min-height: 40vh;
    }

    .hero-section .domain-name {
        font-size: 2.8em;
    }

    .hero-section .tagline {
        font-size: 1.2em;
    }

    .hero-section .sub-headline {
        font-size: 1em;
    }

    .btn {
        padding: 10px 20px;
        font-size: 0.9em;
    }

    .large-btn {
        padding: 12px 25px;
        font-size: 1em;
    }

    .section {
        padding: 40px 0;
    }

    .demo-tabs {
        flex-direction: column; /* Stack buttons vertically */
        align-items: center; /* Center buttons */
        border-bottom: none; /* Remove bottom border */
    }

    .tab-button {
        width: 90%; /* Make buttons full width */
        margin: 5px 0; /* Vertical spacing */
        border-bottom: 2px solid var(--border-color); /* Add individual bottom borders */
        padding: 12px 15px;
    }

    .tab-button.active {
        border-bottom: 2px solid var(--primary-blue);
    }

    .features-grid {
        grid-template-columns: 1fr; /* Single column on small screens */
    }

    .feature-item {
        padding: 25px;
    }

    .opportunity-section p {
        font-size: 1em;
    }
}

/* Small Mobile Devices (up to 480px) */
@media (max-width: 480px) {
    .main-logo-icon {
        width: 60px;
    }

    .hero-section .domain-name {
        font-size: 2.2em;
    }

    .hero-section .tagline {
        font-size: 1em;
    }

    .hero-section .sub-headline {
        font-size: 0.9em;
    }

    .tab-button {
        font-size: 0.9em;
        padding: 10px 10px;
    }

    .demo-content p {
        font-size: 1em;
    }
}

/* --- Workflow Diagram Styles (for Origination Demo) --- */
.workflow-diagram {
    display: flex;
    justify-content: center;
    align-items: center;
    flex-wrap: wrap; /* Allow wrapping on smaller screens */
    gap: 15px; /* Space between stages and arrows */
    margin: 40px auto;
    max-width: 1000px;
    padding: 20px;
    background-color: var(--white);
    border-radius: 10px;
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.08);
}

.workflow-stage {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 20px 15px;
    background-color: var(--light-grey);
    border-radius: 8px;
    /* flex: 1; Distribute space evenly */
    flex: 1;
    min-width: 120px; /* Minimum width for each stage */
    max-width: 180px; /* Max width to prevent stages from becoming too wide */
    transition: all 0.3s ease;
    position: relative; /* For tooltip positioning */
    cursor: help; /* Indicate hoverable element */
    border: 1px solid var(--border-color);
    opacity: 0; /* Start invisible */
    transform: translateY(20px); /* Start slightly below its final position */
    transition: opacity 0.5s ease-out, transform 0.5s ease-out, background-color 0.3s ease; /* Smooth transition */
}

.workflow-stage:hover {
    transform: translateY(-5px);
    box-shadow: 0 6px 15px var(--shadow-color);
    background-color: #e9ecef; /* Slightly darker on hover */
}

.workflow-stage.animate-in {
    opacity: 1; /* Fade in */
    transform: translateY(0); /* Move to final position */
}

.workflow-stage.approved-stage {
    background-color: #d4edda; /* Light green for approved */
    border-color: #28a745; /* Darker green border */
    color: #155724; /* Dark green text */
}

.workflow-stage.approved-stage .stage-icon img {
    filter: invert(30%) sepia(80%) saturate(1500%) hue-rotate(90deg) brightness(80%) contrast(120%); /* Make icon green */
}


.stage-icon {
    width: 50px;
    height: 50px;
    margin-bottom: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.stage-icon img {
    max-width: 100%;
    max-height: 100%;
    filter: invert(30%) sepia(10%) saturate(600%) hue-rotate(180deg) brightness(80%) contrast(100%); /* Blue tint for icons */
}

.stage-name {
    font-weight: 600;
    margin-bottom: 5px;
    font-size: 1em;
    text-align: center;
}

.stage-count {
    font-size: 1.8em;
    font-weight: 700;
    color: var(--primary-blue);
}

.workflow-stage.approved-stage .stage-count {
    color: #28a745; /* Green for approved count */
}

.workflow-arrow {
    width: 30px; /* Width of the arrow */
    height: 3px;
    background-color: var(--border-color);
    position: relative;
    margin: 0 -5px; /* Overlap slightly with stages to reduce gaps */
    flex-shrink: 0; /* Prevent arrow from shrinking */
}

.workflow-arrow::after {
    content: '';
    position: absolute;
    right: -5px; /* Position the arrowhead at the end */
    top: -5px; /* Center vertically */
    width: 0;
    height: 0;
    border-top: 6px solid transparent;
    border-bottom: 6px solid transparent;
    border-left: 10px solid var(--border-color);
}

/* Tooltip for workflow stages */
.workflow-tooltip {
    visibility: hidden;
    opacity: 0;
    background-color: var(--dark-grey);
    color: var(--white);
    text-align: center;
    border-radius: 5px;
    padding: 8px 12px;
    position: absolute;
    z-index: 10;
    bottom: 120%; /* Position above the stage */
    left: 50%;
    transform: translateX(-50%);
    white-space: nowrap;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.2);
    transition: opacity 0.3s ease, visibility 0.3s ease;
    font-size: 0.9em;
}

.workflow-tooltip::after {
    content: "";
    position: absolute;
    top: 100%;
    left: 50%;
    margin-left: -5px;
    border-width: 5px;
    border-style: solid;
    border-color: var(--dark-grey) transparent transparent transparent;
}

/* Tooltip visible on hover (JS will toggle a class, or direct CSS if JS isn't needed for dynamic content) */
/* We'll use JS to add a class, so it's .workflow-stage.tooltip-active .workflow-tooltip */

/* Responsive adjustments for workflow diagram */
@media (max-width: 900px) {
    .workflow-diagram {
        flex-direction: column; /* Stack vertically on smaller screens */
        align-items: center;
        gap: 25px; /* More space when stacked */
    }

    .workflow-stage {
        width: 80%; /* Take up more width when stacked */
        max-width: 300px; /* Keep a max width */
        margin: 0;
    }

    .workflow-arrow {
        width: 3px; /* Vertical arrow */
        height: 40px; /* Length of vertical arrow */
        margin: 0; /* Remove horizontal margin */
        background-color: var(--border-color);
    }

    .workflow-arrow::after {
        right: auto; /* Reset horizontal positioning */
        left: 50%; /* Center arrowhead horizontally */
        top: auto;
        bottom: -5px; /* Position arrowhead at bottom */
        transform: translateX(-50%); /* Center horizontally */
        border-top: 10px solid var(--border-color); /* Arrowhead points down */
        border-left: 6px solid transparent;
        border-right: 6px solid transparent;
        border-bottom: none; /* Remove bottom border */
    }
}

@media (max-width: 480px) {
    .workflow-stage {
        min-width: 100px;
        padding: 15px 10px;
    }

    .stage-icon {
        width: 40px;
        height: 40px;
    }

    .stage-name {
        font-size: 0.9em;
    }

    .stage-count {
        font-size: 1.5em;
    }
}

/* --- Dashboard Styles (for Portfolio & Risk Analytics Demo) --- */
.dashboard-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr)); /* Responsive grid for KPIs */
    gap: 20px; /* Space between grid items */
    margin-top: 40px;
    margin-bottom: 50px;
    text-align: left; /* Align text within cards */
}

.kpi-card {
    background-color: var(--white);
    border-radius: 8px;
    padding: 25px;
    box-shadow: 0 4px 15px var(--shadow-color);
    border-left: 5px solid var(--primary-blue); /* Left accent border */
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    display: flex;
    flex-direction: column;
    justify-content: space-between; /* Distribute content vertically */
    min-height: 140px; /* Ensure consistent height for KPI cards */
}

.kpi-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.15);
}

.kpi-label {
    font-size: 0.9em;
    color: var(--medium-grey);
    margin-bottom: 5px;
}

.kpi-value {
    font-size: 2.2em;
    font-weight: 700;
    color: var(--dark-grey);
    margin-bottom: 10px;
    line-height: 1; /* Tighter line height for large numbers */
}

.kpi-value.warning {
    color: #dc3545; /* Red for warning */
}

.kpi-trend {
    font-size: 0.85em;
    color: var(--medium-grey);
    font-weight: 600;
}

.kpi-trend.positive {
    color: #28a745; /* Green for positive trend */
}

.kpi-trend.negative {
    color: #dc3545; /* Red for negative trend */
}

/* Chart Cards */
.chart-card {
    background-color: var(--white);
    border-radius: 8px;
    padding: 25px;
    box-shadow: 0 4px 15px var(--shadow-color);
    grid-column: span 2; /* Chart cards span two columns by default */
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
}

.chart-card h4 {
    color: var(--primary-blue);
    font-size: 1.4em;
    margin-bottom: 20px;
}

.chart-visual {
    width: 100%;
    max-width: 600px; /* Max width for chart visuals */
    height: 250px; /* Fixed height for consistency */
    background-color: var(--light-grey);
    border-radius: 5px;
    display: flex; /* For centering chart image */
    align-items: center;
    justify-content: center;
    overflow: hidden; /* Hide parts of image if it overflows */
}

.chart-image {
    max-width: 100%;
    max-height: 100%;
    object-fit: contain; /* Ensure chart image scales properly */
}

.chart-legend {
    list-style: none;
    margin-top: 20px;
    padding: 0;
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    font-size: 0.9em;
}

.chart-legend li {
    margin: 0 10px 5px 0;
    display: flex;
    align-items: center;
}

.chart-legend li span {
    display: inline-block;
    width: 12px;
    height: 12px;
    border-radius: 3px;
    margin-right: 8px;
}

.chart-summary {
    font-size: 0.95em;
    color: var(--medium-grey);
    margin-top: 15px;
    text-align: center;
    max-width: 800px;
}

/* Responsive adjustments for Dashboard */
@media (max-width: 768px) {
    .dashboard-grid {
        grid-template-columns: 1fr; /* Single column layout on small screens */
    }

    .kpi-card {
        min-height: 120px; /* Slightly smaller KPI cards on mobile */
    }

    .chart-card {
        grid-column: span 1; /* Charts also take full width */
    }

    .chart-visual {
        height: 200px; /* Adjust chart height for mobile */
    }
}

/* Animation for KPI Cards and Chart Cards */
.kpi-card, .chart-card {
    opacity: 0; /* Start invisible */
    transform: translateY(20px); /* Start slightly below final position */
    transition: opacity 0.5s ease-out, transform 0.5s ease-out, box-shadow 0.3s ease; /* Smooth transition */
}

.kpi-card.animate-in, .chart-card.animate-in {
    opacity: 1; /* Fade in */
    transform: translateY(0); /* Move to final position */
}

/* Specific scale animation for chart cards to make them pop a bit more */
.chart-card {
    transform: scale(0.95) translateY(20px); /* Slightly smaller and lower initially */
}

.chart-card.animate-in {
    transform: scale(1) translateY(0); /* Scale up and move to final position */
}

.disclaimer {
    background-color: #ffffe0; /* Light yellow background */
    border: 1px solid #e0c200;
    padding: 20px;
    margin: 30px auto;
    max-width: 800px;
    border-radius: 8px;
    color: #806b00;
    font-size: 0.95em;
    text-align: left;
}

.disclaimer strong {
    color: #c00; /* Red for emphasis */
}


/* --- Servicing & Client Management Styles --- */
.servicing-dashboard {
    display: grid;
    grid-template-columns: 1fr 1.5fr; /* Header takes full width, then two columns */
    grid-template-rows: auto 1fr;
    gap: 30px;
    margin-top: 40px;
    margin-bottom: 50px;
    text-align: left;
    max-width: 1000px; /* Constrain max width of dashboard */
    margin-left: auto;
    margin-right: auto;
}

.servicing-header {
    grid-column: 1 / -1; /* Spans across all columns */
    text-align: center;
    margin-bottom: 20px;
}

.servicing-header h4 {
    font-size: 1.8em;
    color: var(--primary-blue);
    margin-bottom: 5px;
}

.servicing-header p {
    font-size: 1.1em;
    color: var(--medium-grey);
}

.loan-summary-card,
.communication-log-card {
    background-color: var(--white);
    border-radius: 8px;
    padding: 30px;
    box-shadow: 0 4px 15px var(--shadow-color);
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    min-height: 250px; /* Ensure cards have some minimum height */
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.loan-summary-card:hover,
.communication-log-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.15);
}

.loan-summary-card {
    border-top: 5px solid var(--primary-blue); /* Top accent border */
}

.loan-details {
    display: flex;
    justify-content: space-between;
    align-items: baseline;
    padding: 8px 0;
    border-bottom: 1px dashed var(--border-color); /* Subtle separator */
}

.loan-details:last-of-type {
    border-bottom: none; /* No border for the last detail */
}

.detail-label {
    font-size: 1em;
    color: var(--medium-grey);
    font-weight: 400;
}

.detail-value {
    font-size: 1.1em;
    color: var(--dark-grey);
    font-weight: 600;
}

.highlight-value {
    color: #28a745; /* Green for important dates/values */
    font-weight: 700;
    font-size: 1.2em;
}

.loan-actions {
    margin-top: 20px;
    display: flex;
    flex-wrap: wrap; /* Allow buttons to wrap */
    gap: 15px; /* Space between buttons */
    justify-content: center; /* Center buttons within the card */
}

.action-btn {
    flex: 1 1 auto; /* Allow buttons to grow and shrink, minimum size */
    min-width: 150px; /* Ensure buttons don't get too small */
    justify-content: center;
}

/* New button style for secondary actions */
.secondary-btn {
    background-color: var(--white);
    color: var(--primary-blue);
    border: 2px solid var(--primary-blue);
}

.secondary-btn:hover {
    background-color: var(--primary-blue);
    color: var(--white);
    transform: translateY(-2px);
}


.communication-log-card h4 {
    color: var(--primary-blue);
    font-size: 1.4em;
    margin-bottom: 20px;
    text-align: center;
}

.activity-list {
    list-style: none;
    padding: 0;
    margin-bottom: 20px;
    flex-grow: 1; /* Allow list to take available space */
}

.activity-list li {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    padding: 10px 0;
    border-bottom: 1px solid var(--light-grey); /* Subtle line for each activity */
}

.activity-list li:last-child {
    border-bottom: none;
}

.activity-date {
    font-size: 0.9em;
    color: var(--medium-grey);
    flex-shrink: 0; /* Prevent date from shrinking */
    margin-right: 15px;
    min-width: 90px; /* Ensure date column aligns */
}

.activity-desc {
    font-size: 1em;
    color: var(--dark-grey);
    flex-grow: 1; /* Allow description to take remaining space */
}

.view-all-link {
    display: block;
    text-align: center;
    margin-top: 15px;
    font-weight: 600;
}

/* Responsive adjustments for Servicing Dashboard */
@media (max-width: 768px) {
    .servicing-dashboard {
        grid-template-columns: 1fr; /* Stack into single column */
        gap: 20px;
    }

    .servicing-header {
        margin-bottom: 0; /* Adjust margin when stacked */
    }

    .loan-summary-card,
    .communication-log-card {
        padding: 25px; /* Slightly less padding on mobile */
        min-height: auto; /* Allow height to adjust to content */
    }

    .loan-actions {
        flex-direction: column; /* Stack buttons vertically */
        gap: 10px;
    }

    .action-btn {
        width: 100%; /* Full width buttons when stacked */
    }
}

@media (max-width: 480px) {
    .servicing-header h4 {
        font-size: 1.5em;
    }

    .servicing-header p {
        font-size: 1em;
    }

    .loan-details {
        flex-direction: column; /* Stack label and value vertically */
        align-items: flex-start;
    }

    .detail-label {
        font-size: 0.9em;
    }

    .detail-value {
        font-size: 1em;
        margin-top: 2px;
    }

    .highlight-value {
        font-size: 1.1em;
    }

    .activity-list li {
        flex-direction: column; /* Stack date and description */
        align-items: flex-start;
    }

    .activity-date {
        margin-bottom: 5px;
        font-size: 0.85em;
    }
}