/* Portal page layout — shared across home, contact, user pages */
.portal-page {
    padding-bottom: 0;
}

.portal-section {
    margin-bottom: 0;
}

/* Full-width section backgrounds (home page) */
.portal-section-band {
    padding: 2.5rem 0;
    position: relative;
}

.portal-section-band + .portal-section-band {
    border-top: 1px solid rgba(229, 231, 235, 0.6);
}

.portal-section-band--tricolor::before {
    background: linear-gradient(90deg, #FF9933 33.33%, #FFFFFF 33.33%, #FFFFFF 66.66%, #138808 66.66%);
    content: "";
    height: 3px;
    left: 0;
    position: absolute;
    top: 0;
    width: 100%;
}

.portal-section-band--hero {
    background: linear-gradient(180deg, #EFF6FF 0%, #FFFFFF 100%);
    padding-top: 1.5rem;
}

.portal-section-band--hero-banner {
    background: #0F1F3F;
    padding: 0;
}

.portal-section-band--hero-banner + .portal-section-band {
    border-top: none;
}

/* Full-width hero banner with overlaid content */
.portal-hero-banner {
    min-height: 360px;
    overflow: hidden;
    position: relative;
    width: 100%;
}

@media (min-width: 768px) {
    .portal-hero-banner {
        min-height: 440px;
    }
}

@media (min-width: 1024px) {
    .portal-hero-banner {
        min-height: 480px;
    }
}

.portal-hero-banner-bg {
    inset: 0;
    position: absolute;
}

.portal-hero-banner-img {
    display: block;
    height: 100%;
    object-fit: cover;
    object-position: center;
    transition: opacity 0.6s ease;
    width: 100%;
}

.portal-hero-banner-overlay {
    background: linear-gradient(
        105deg,
        rgba(15, 31, 63, 0.92) 0%,
        rgba(15, 31, 63, 0.78) 38%,
        rgba(7, 71, 166, 0.45) 68%,
        rgba(7, 71, 166, 0.2) 100%
    );
    inset: 0;
    position: absolute;
}

.portal-hero-banner-inner {
    align-items: flex-end;
    display: flex;
    flex-direction: column;
    justify-content: center;
    margin: 0 auto;
    max-width: 1280px;
    min-height: inherit;
    padding: 2.5rem 1rem 3.25rem;
    position: relative;
    width: 100%;
    z-index: 2;
}

@media (min-width: 768px) {
    .portal-hero-banner-inner {
        align-items: stretch;
        padding: 3.5rem 1.5rem 3.75rem;
    }
}

.portal-hero-banner-copy {
    max-width: 42rem;
    width: 100%;
}

.portal-hero-title {
    color: #FFFFFF;
    font-size: 1.75rem;
    font-weight: 700;
    line-height: 1.25;
    margin-bottom: 0.75rem;
    text-shadow: 0 2px 12px rgba(0, 0, 0, 0.25);
}

@media (min-width: 768px) {
    .portal-hero-title {
        font-size: 2.25rem;
    }
}

@media (min-width: 1024px) {
    .portal-hero-title {
        font-size: 2.5rem;
    }
}

.portal-hero-subtitle {
    color: rgba(255, 255, 255, 0.95);
    font-size: 1rem;
    font-weight: 500;
    line-height: 1.5;
    margin-bottom: 0.75rem;
}

@media (min-width: 768px) {
    .portal-hero-subtitle {
        font-size: 1.125rem;
    }
}

.portal-hero-description {
    color: rgba(255, 255, 255, 0.82);
    font-size: 0.875rem;
    line-height: 1.65;
    margin-bottom: 1.5rem;
    max-width: 38rem;
}

@media (min-width: 768px) {
    .portal-hero-description {
        font-size: 0.9375rem;
        margin-bottom: 1.75rem;
    }
}

.portal-hero-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
}

.portal-btn-outline--on-dark {
    background: rgba(255, 255, 255, 0.08);
    border-color: rgba(255, 255, 255, 0.75);
    color: #FFFFFF;
}

.portal-btn-outline--on-dark:hover {
    background: rgba(255, 255, 255, 0.18);
    border-color: #FFFFFF;
}

.portal-hero-banner-dots {
    bottom: 1rem;
    display: flex;
    gap: 0.5rem;
    position: absolute;
    right: 1rem;
    z-index: 3;
}

@media (min-width: 768px) {
    .portal-hero-banner-dots {
        bottom: 1.25rem;
        right: 1.5rem;
    }
}

.portal-section-band--soft-blue {
    background-color: #F0F7FF;
    background-image:
        radial-gradient(circle at 10% 20%, rgba(7, 71, 166, 0.06) 0%, transparent 45%),
        radial-gradient(circle at 90% 80%, rgba(19, 136, 8, 0.04) 0%, transparent 40%);
}

.portal-section-band--soft-gray {
    background-color: #F9FAFB;
    background-image:
        radial-gradient(circle at 85% 15%, rgba(7, 71, 166, 0.05) 0%, transparent 35%);
}

.portal-section-band--soft-green {
    background-color: #F0FDF4;
    background-image:
        radial-gradient(circle at 20% 50%, rgba(19, 136, 8, 0.06) 0%, transparent 50%);
}

.portal-section-band--soft-amber {
    background-color: #FFFBEB;
    background-image:
        radial-gradient(circle at 80% 30%, rgba(255, 153, 51, 0.08) 0%, transparent 45%);
}

.portal-section-band--cta {
    background: linear-gradient(135deg, #0747A6 0%, #0F1F3F 100%);
    color: #FFFFFF;
    padding: 2.5rem 0 3rem;
}

.portal-section-band--cta .portal-section-title {
    color: #FFFFFF;
}

.portal-section-band--cta .portal-card {
    background: rgba(255, 255, 255, 0.97);
    border-color: rgba(255, 255, 255, 0.25);
}

.portal-section-band-inner {
    margin: 0 auto;
    max-width: 1280px;
    padding-left: 1rem;
    padding-right: 1rem;
}

@media (min-width: 768px) {
    .portal-section-band {
        padding: 3rem 0;
    }

    .portal-section-band--hero-banner {
        padding: 0;
    }

    .portal-section-band-inner {
        padding-left: 1.5rem;
        padding-right: 1.5rem;
    }
}

.portal-section-band .portal-section {
    margin-bottom: 1.75rem;
}

.portal-section-band .portal-section:last-child {
    margin-bottom: 0;
}

.portal-section-title {
    color: #0747A6;
    font-size: 1.5rem;
    font-weight: 700;
    margin-bottom: 1.25rem;
    text-align: center;
}

@media (min-width: 768px) {
    .portal-section-title {
        font-size: 1.875rem;
        margin-bottom: 1.5rem;
    }
}

.portal-card {
    background: #FFFFFF;
    border: 1px solid #E5E7EB;
    border-radius: 0.75rem;
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.05);
}

.portal-card-body {
    padding: 1.5rem;
}

@media (min-width: 768px) {
    .portal-card-body {
        padding: 2rem;
    }
}

.portal-page-title {
    color: #0F1F3F;
    font-size: 1.875rem;
    font-weight: 700;
    line-height: 1.25;
    margin-bottom: 0.5rem;
}

@media (min-width: 768px) {
    .portal-page-title {
        font-size: 2.25rem;
    }
}

.portal-page-subtitle {
    color: #4B5563;
    font-size: 1rem;
    line-height: 1.6;
    margin-bottom: 1.5rem;
    max-width: 42rem;
}

.portal-btn-primary {
    background-color: #0747A6;
    border-radius: 0.375rem;
    color: #FFFFFF;
    display: inline-block;
    font-weight: 600;
    padding: 0.625rem 1.5rem;
    transition: background-color 0.2s ease;
}

.portal-btn-primary:hover {
    background-color: #053a8a;
}

.portal-btn-outline {
    background: #FFFFFF;
    border: 1px solid #0747A6;
    border-radius: 0.375rem;
    color: #0747A6;
    display: inline-block;
    font-weight: 600;
    padding: 0.625rem 1.5rem;
    transition: background-color 0.2s ease;
}

.portal-btn-outline:hover {
    background-color: #EFF6FF;
}

.portal-dates-table {
    border-collapse: collapse;
    font-size: 0.875rem;
    width: 100%;
}

.portal-dates-table th,
.portal-dates-table td {
    border-bottom: 1px solid #E5E7EB;
    padding: 0.75rem 0.5rem;
    text-align: left;
}

.portal-dates-table th {
    color: #6B7280;
    font-weight: 500;
    width: 55%;
}

.portal-dates-table td {
    color: #0F1F3F;
    font-weight: 600;
    text-align: right;
}

.portal-dates-table tr:last-child th,
.portal-dates-table tr:last-child td {
    border-bottom: none;
}

.portal-step-list {
    counter-reset: portal-step;
    list-style: none;
    margin: 0;
    padding: 0;
}

.portal-step-list li {
    border-left: 2px solid #E5E7EB;
    counter-increment: portal-step;
    margin-left: 0.75rem;
    padding: 0 0 1.25rem 1.25rem;
    position: relative;
}

.portal-step-list li:last-child {
    border-left-color: transparent;
    padding-bottom: 0;
}

.portal-step-list li::before {
    align-items: center;
    background: #0747A6;
    border-radius: 9999px;
    color: #FFFFFF;
    content: counter(portal-step);
    display: flex;
    font-size: 0.75rem;
    font-weight: 700;
    height: 1.75rem;
    justify-content: center;
    left: -0.9375rem;
    position: absolute;
    top: 0;
    width: 1.75rem;
}

.portal-step-list li:nth-child(n+5)::before {
    background: #10B981;
}

.portal-step-list strong {
    color: #0747A6;
    display: block;
    font-size: 0.9375rem;
    margin-bottom: 0.25rem;
}

.portal-step-list span {
    color: #4B5563;
    font-size: 0.875rem;
}

.portal-home-banner {
    border-radius: 0.75rem;
    height: 220px;
    overflow: hidden;
    position: relative;
}

@media (min-width: 768px) {
    .portal-home-banner {
        height: 280px;
    }
}

.portal-home-banner img {
    height: 100%;
    object-fit: cover;
    width: 100%;
}

.portal-home-banner-dots {
    bottom: 0.75rem;
    display: flex;
    gap: 0.5rem;
    left: 50%;
    position: absolute;
    transform: translateX(-50%);
    z-index: 2;
}

.portal-home-banner-dot {
    background: rgba(255, 255, 255, 0.5);
    border: none;
    border-radius: 9999px;
    cursor: pointer;
    height: 0.625rem;
    padding: 0;
    width: 0.625rem;
}

.portal-home-banner-dot.is-active {
    background: #FFFFFF;
}

/* Scheme highlight video — capped height (max half viewport / 320px) */
.portal-scheme-video-wrap {
    background: #000;
    height: min(50vh, 320px);
    max-height: 100vh;
    overflow: hidden;
    width: 100%;
}

.portal-scheme-video-wrap video {
    display: block;
    height: 100%;
    object-fit: cover;
    width: 100%;
}

@media (max-width: 767px) {
    .portal-scheme-video-wrap {
        height: min(40vh, 220px);
    }
}

/* User dashboard */
.portal-dashboard-card-title {
    border-bottom: 2px solid #EFF6FF;
    color: #0F1F3F;
    font-size: 1.125rem;
    font-weight: 600;
    margin-bottom: 1rem;
    padding-bottom: 0.75rem;
}

.portal-dashboard-card-title--success {
    border-bottom-color: #D1FAE5;
}

.portal-dashboard-card-title--warning {
    border-bottom-color: #FEF3C7;
}

.portal-status-banner {
    border-radius: 0.5rem;
    border: 1px solid;
    font-size: 0.875rem;
    line-height: 1.5;
    padding: 0.875rem 1rem;
}

.portal-status-banner--open {
    background-color: #ECFDF5;
    border-color: #86EFAC;
    color: #065F46;
}

.portal-status-banner--closed {
    background-color: #FEF3C7;
    border-color: #FCD34D;
    color: #92400E;
}

.portal-status-banner--correction {
    background-color: #EFF6FF;
    border-color: #93C5FD;
    color: #1E40AF;
}

.portal-status-banner--muted {
    background-color: #F3F4F6;
    border-color: #D1D5DB;
    color: #374151;
}

.portal-flow-step {
    align-items: center;
    border: 1px solid #E5E7EB;
    border-radius: 0.5rem;
    display: flex;
    justify-content: space-between;
    padding: 1rem 1.25rem;
    transition: background-color 0.15s ease;
}

.portal-flow-step:hover {
    background-color: #F9FAFB;
}

.portal-flow-step-card {
    border: 1px solid #E5E7EB;
    border-radius: 0.5rem;
    display: flex;
    flex-direction: column;
    height: 100%;
    justify-content: space-between;
    padding: 1.25rem;
    transition: box-shadow 0.15s ease;
}

.portal-flow-step-card:hover {
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.08);
}

.portal-btn-primary.portal-btn-block,
.portal-btn-outline.portal-btn-block {
    display: block;
    text-align: center;
    width: 100%;
}

.portal-btn-secondary {
    background-color: #2563EB;
    border-radius: 0.375rem;
    color: #FFFFFF;
    display: inline-block;
    font-weight: 600;
    padding: 0.625rem 1.5rem;
    transition: background-color 0.2s ease;
}

.portal-btn-secondary:hover {
    background-color: #1D4ED8;
}

.portal-btn-secondary.portal-btn-block {
    display: block;
    text-align: center;
    width: 100%;
}

.portal-btn-success {
    background-color: #10B981;
    border-radius: 0.375rem;
    color: #FFFFFF;
    display: inline-block;
    font-weight: 600;
    padding: 0.5rem 1.25rem;
    transition: background-color 0.2s ease;
}

.portal-btn-success:hover {
    background-color: #059669;
}
