/**
 * Maintenance ("Solutions — Maintenance") page styles.
 * Ported from the dylan-draft.com /maintenance.html reference. Every rule is
 * scoped under .maintenance-page and keyframes are prefixed mx- so nothing
 * leaks into or collides with the global theme / other page styles.
 * Nav & footer come from the shared theme header/footer.
 */

.maintenance-page {
    --mx-red: #EB262A;
    --mx-blue: #307FE2;
    --mx-dark: #231F20;
    background: #fff;
    color: #231F20;
}

.maintenance-page *,
.maintenance-page *::before,
.maintenance-page *::after {
    box-sizing: border-box;
}

/* ── Buttons ── */
.maintenance-page .btn-blue {
    display: inline-block;
    background: #307FE2;
    color: #fff;
    padding: 14px 32px;
    border-radius: 100px;
    font-size: 15px;
    font-weight: 600;
    text-decoration: none;
    box-shadow: 0 4px 18px rgba(48, 127, 226, 0.4);
    transition: transform 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
}

.maintenance-page .btn-blue:hover {
    background: #1f6dd4;
    transform: translateY(-2px);
    box-shadow: 0 8px 28px rgba(48, 127, 226, 0.5);
}

.maintenance-page .btn-outline-white {
    display: inline-block;
    background: transparent;
    color: #fff;
    padding: 14px 32px;
    border-radius: 100px;
    font-size: 15px;
    font-weight: 600;
    text-decoration: none;
    border: 2px solid rgba(255, 255, 255, 0.3);
    transition: background 0.2s ease, transform 0.2s ease;
}

.maintenance-page .btn-outline-white:hover {
    background: rgba(255, 255, 255, 0.08);
    transform: translateY(-2px);
}

/* ── HERO ── */
.maintenance-page .mx-hero {
    position: relative;
    min-height: 60vh;
    padding-top: 96px;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    background: #0a1628;
}

.maintenance-page .hero-bg-img {
    position: absolute;
    inset: 0;
    background: url('../img/hero-mx.jpg') center center / cover no-repeat;
}

.maintenance-page .hero-overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(160deg, rgba(0, 0, 0, 0.72) 0%, rgba(0, 0, 0, 0.55) 50%, rgba(0, 0, 0, 0.72) 100%);
}

.maintenance-page .hero-content {
    position: relative;
    z-index: 10;
    text-align: center;
    padding: 80px 24px;
    max-width: 860px;
    margin: 0 auto;
}

.maintenance-page .hero-eyebrow {
    font-size: 11px;
    font-weight: 600;
    letter-spacing: 0.22em;
    text-transform: uppercase;
    color: #307FE2;
    margin-bottom: 20px;
}

.maintenance-page .hero-h1 {
    font-size: clamp(42px, 7vw, 78px);
    font-weight: 800;
    color: #fff;
    line-height: 1.05;
    letter-spacing: -0.03em;
    margin-bottom: 24px;
}

.maintenance-page .hero-h1 span {
    color: #307FE2;
}

.maintenance-page .hero-sub {
    font-size: 18px;
    line-height: 1.7;
    color: rgba(255, 255, 255, 0.6);
    max-width: 560px;
    margin: 0 auto 40px;
}

.maintenance-page .hero-ctas {
    display: flex;
    gap: 16px;
    justify-content: center;
    flex-wrap: wrap;
}

/* ── SECTIONS ── */
.maintenance-page .section-eyebrow {
    font-size: 11px;
    font-weight: 600;
    letter-spacing: 0.22em;
    text-transform: uppercase;
    color: #307FE2;
    margin-bottom: 12px;
    display: block;
}

.maintenance-page .section-h2 {
    font-size: clamp(28px, 4vw, 44px);
    font-weight: 800;
    color: #0d1f3c;
    letter-spacing: -0.03em;
    line-height: 1.1;
    margin-bottom: 16px;
}

.maintenance-page .section-sub {
    font-size: 16px;
    line-height: 1.7;
    color: rgba(7, 21, 56, 0.6);
    max-width: 560px;
}

/* ── FEATURE CARDS ── */
.maintenance-page .features-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
    gap: 24px;
    margin-top: 56px;
}

.maintenance-page .feature-card {
    background: #fff;
    border-radius: 20px;
    padding: 32px 28px;
    border: 1px solid rgba(0, 0, 0, 0.06);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.02), 0 12px 32px rgba(48, 127, 226, 0.06);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.maintenance-page .feature-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 8px 32px rgba(48, 127, 226, 0.12);
}

/* ── Icon hover animations (trigger on card hover) ── */
@keyframes mx-icon-pulse {
    0%, 100% {
        transform: scale(1);
    }
    50% {
        transform: scale(1.18);
    }
}

@keyframes mx-icon-bounce {
    0%, 100% {
        transform: translateY(0);
    }
    40% {
        transform: translateY(-4px);
    }
    60% {
        transform: translateY(-2px);
    }
}

@keyframes mx-icon-upload {
    0%, 100% {
        transform: translateY(0);
        opacity: 1;
    }
    45% {
        transform: translateY(-5px);
        opacity: 0.5;
    }
    46% {
        transform: translateY(4px);
        opacity: 0.5;
    }
    80% {
        transform: translateY(0);
        opacity: 1;
    }
}

@keyframes mx-wrench-tighten {
    0% {
        transform: rotate(0deg);
    }
    20% {
        transform: rotate(-28deg);
    }
    40% {
        transform: rotate(8deg);
    }
    60% {
        transform: rotate(-18deg);
    }
    80% {
        transform: rotate(4deg);
    }
    100% {
        transform: rotate(0deg);
    }
}

@keyframes mx-alert-shake {
    0%, 100% {
        transform: rotate(0deg);
    }
    15% {
        transform: rotate(-12deg);
    }
    30% {
        transform: rotate(12deg);
    }
    45% {
        transform: rotate(-8deg);
    }
    60% {
        transform: rotate(8deg);
    }
    75% {
        transform: rotate(-4deg);
    }
    90% {
        transform: rotate(4deg);
    }
}

.maintenance-page .feature-card:hover .icon-graphing {
    animation: mx-icon-pulse 0.6s ease infinite;
}

.maintenance-page .feature-card:hover .icon-alert {
    animation: mx-alert-shake 0.6s ease infinite;
}

.maintenance-page .feature-card:hover .icon-upload {
    animation: mx-icon-upload 0.8s ease infinite;
}

.maintenance-page .feature-card:hover .icon-wrench {
    animation: mx-wrench-tighten 0.7s ease infinite;
    transform-origin: bottom right;
}

.maintenance-page .feature-card:hover .icon-records {
    animation: mx-icon-bounce 0.6s ease infinite;
}

.maintenance-page .feature-icon {
    width: 48px;
    height: 48px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(48, 127, 226, 0.1);
    margin-bottom: 20px;
}

.maintenance-page .feature-card h3 {
    font-size: 17px;
    font-weight: 700;
    color: #0d1f3c;
    margin: 0 0 10px;
}

.maintenance-page .feature-card p {
    font-size: 14px;
    line-height: 1.7;
    color: rgba(7, 21, 56, 0.6);
    margin: 0;
}

/* ── STATS ── */
.maintenance-page .stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: 0;
    border: 1px solid rgba(0, 0, 0, 0.07);
    border-radius: 20px;
    overflow: hidden;
}

.maintenance-page .stat-item {
    padding: 28px 20px;
    text-align: center;
    background: #fff;
    border-right: 1px solid rgba(0, 0, 0, 0.07);
}

.maintenance-page .stat-item:last-child {
    border-right: none;
}

.maintenance-page .stat-val {
    font-size: clamp(22px, 2.2vw, 36px);
    font-weight: 800;
    color: #0d1f3c;
    letter-spacing: -0.03em;
    display: block;
    white-space: nowrap;
}

.maintenance-page .stat-label {
    font-size: 12px;
    font-weight: 600;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: #9ca3af;
    margin-top: 6px;
    display: block;
}

/* ── MX INTEGRATION CARDS ── */
.maintenance-page .mx-card {
    background: #fff;
    border: 1px solid rgba(0, 0, 0, 0.07);
    border-radius: 20px;
    overflow: hidden;
    box-shadow: 0 2px 12px rgba(48, 127, 226, 0.06);
}

/* ── COCKPIT VIEW (animated flight-replay video + loading poster) ── */
.maintenance-page .mx-replay {
    position: relative;
    width: 100%;
    border-radius: 16px;
    overflow: hidden;
    box-shadow: 0 8px 40px rgba(48, 127, 226, 0.12);
    border: 1px solid rgba(0, 0, 0, 0.06);
    background: linear-gradient(135deg, #0d2040 0%, #0a1628 100%);
    min-height: 280px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.maintenance-page .mx-replay video,
.maintenance-page .mx-replay-video {
    position: relative;
    z-index: 2;
    width: 100%;
    display: block;
}

/* The fallback is a loading poster shown behind the video; the video covers
   it once it starts playing, and it remains visible if the video can't load. */
.maintenance-page .mx-replay-fallback {
    position: absolute;
    inset: 0;
    z-index: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 14px;
    color: rgba(255, 255, 255, 0.7);
    text-align: center;
    padding: 24px;
}

.maintenance-page .mx-replay-play {
    width: 64px;
    height: 64px;
    border-radius: 50%;
    background: rgba(48, 127, 226, 0.9);
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 8px 24px rgba(48, 127, 226, 0.4);
}

.maintenance-page .mx-replay-caption {
    font-size: 13px;
    font-weight: 600;
    letter-spacing: 0.04em;
}

/* ── EXCEEDANCE REVIEW WIDGET ── */
.maintenance-page .mx-exc-section {
    padding: 140px 24px 100px;
    background: linear-gradient(160deg, #e8eef8 0%, #edf1f9 60%, #e4ecf7 100%);
}

.maintenance-page #exc-tabs {
    display: flex;
    flex-direction: column;
    gap: 6px;
    margin-bottom: 36px;
}

.maintenance-page .mx-exc-tab {
    display: flex;
    align-items: center;
    justify-content: space-between;
    width: 100%;
    padding: 10px 14px;
    border-radius: 10px;
    border: 1.5px solid rgba(13, 31, 60, 0.1);
    background: rgba(255, 255, 255, 0.45);
    cursor: pointer;
    font-family: inherit;
    text-align: left;
    opacity: 0.65;
    transition: background 0.15s, box-shadow 0.15s, opacity 0.15s;
}

.maintenance-page .mx-exc-tab.is-active {
    background: #fff;
    box-shadow: 0 2px 14px rgba(13, 31, 60, 0.13);
    opacity: 1;
    border-width: 2px;
}

.maintenance-page .mx-exc-tab-name {
    font-size: 13px;
    font-weight: 700;
    color: #0d1f3c;
}

.maintenance-page .mx-exc-tab-badge {
    font-size: 10px;
    font-weight: 800;
    letter-spacing: 0.09em;
    padding: 3px 10px;
    border-radius: 100px;
    border: 1px solid transparent;
}

.maintenance-page .mx-exc-badge-exceedance {
    color: #c0392b;
    background: rgba(192, 57, 43, 0.12);
    border-color: rgba(192, 57, 43, 0.25);
}

.maintenance-page .mx-exc-badge-warning {
    color: #b45309;
    background: rgba(180, 83, 9, 0.09);
    border-color: rgba(180, 83, 9, 0.18);
}

.maintenance-page .mx-exc-badge-normal {
    color: #15803d;
    background: rgba(21, 128, 61, 0.08);
    border-color: rgba(21, 128, 61, 0.15);
}

.maintenance-page .mx-exc-navbtn {
    width: 40px;
    height: 40px;
    border-radius: 10px;
    border: 1.5px solid rgba(13, 31, 60, 0.15);
    background: #fff;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 1px 4px rgba(0, 0, 0, 0.06);
    transition: box-shadow 0.15s;
}

.maintenance-page .mx-exc-navbtn:hover {
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.10);
}

.maintenance-page .mx-exc-page-info {
    font-size: 13px;
    font-weight: 600;
    color: rgba(13, 31, 60, 0.45);
    min-width: 50px;
    text-align: center;
}

.maintenance-page .mx-exc-card {
    border-radius: 20px;
    overflow: hidden;
    background: #0d1f3c;
    box-shadow: 0 24px 60px rgba(0, 0, 0, 0.18);
}

.maintenance-page .mx-exc-card-header {
    background: #0d1f3c;
    padding: 18px 24px 16px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    border-bottom: 1px solid rgba(255, 255, 255, 0.07);
}

.maintenance-page .mx-exc-header-badge {
    background: rgba(239, 68, 68, 0.18);
    border: 1px solid rgba(239, 68, 68, 0.35);
    color: #f87171;
    font-size: 10px;
    font-weight: 800;
    letter-spacing: 0.12em;
    padding: 5px 12px;
    border-radius: 100px;
}

.maintenance-page .mx-exc-chart {
    background: #0d1f3c;
    padding: 24px 24px 8px;
    position: relative;
}

.maintenance-page .mx-exc-stats {
    background: #0a192e;
    padding: 16px 24px;
    display: flex;
    gap: 0;
    border-top: 1px solid rgba(255, 255, 255, 0.06);
}

.maintenance-page .mx-exc-stat {
    flex: 1;
    padding: 0 20px;
    border-right: 1px solid rgba(255, 255, 255, 0.06);
}

.maintenance-page .mx-exc-stat:first-child {
    padding-left: 0;
}

.maintenance-page .mx-exc-stat:last-child {
    padding-right: 0;
}

.maintenance-page .mx-exc-stat-label {
    font-size: 10px;
    font-weight: 600;
    letter-spacing: 0.1em;
    color: rgba(255, 255, 255, 0.35);
    text-transform: uppercase;
    margin-bottom: 4px;
}

.maintenance-page .mx-exc-stat-val {
    font-size: 18px;
    font-weight: 800;
}

.maintenance-page .mx-exc-pills {
    display: flex;
    gap: 8px;
    margin-top: 16px;
    flex-wrap: wrap;
}

.maintenance-page .mx-exc-pill {
    border-radius: 100px;
    padding: 6px 14px;
    font-size: 12px;
    font-weight: 600;
}

.maintenance-page .mx-exc-pill-bad {
    background: rgba(239, 68, 68, 0.1);
    border: 1px solid rgba(239, 68, 68, 0.25);
    color: #ef4444;
}

.maintenance-page .mx-exc-pill-good {
    background: rgba(21, 128, 61, 0.08);
    border: 1px solid rgba(21, 128, 61, 0.2);
    color: #22c55e;
}

/* ── PAGE FOOTER (this template is intentionally excluded from the shared
   site footer per the design brief) ── */
.maintenance-page .mx-page-footer {
    background: #0a1628;
    padding: 40px 48px;
    border-top: 1px solid rgba(255, 255, 255, 0.07);
    text-align: center;
}

.maintenance-page .mx-page-footer p {
    font-size: 13px;
    color: rgba(255, 255, 255, 0.35);
    margin: 0;
}

.maintenance-page .mx-page-footer a {
    color: rgba(255, 255, 255, 0.4);
    text-decoration: none;
}

/* ── CTA ── */
.maintenance-page .mx-cta {
    background: linear-gradient(135deg, #0a1628 0%, #112240 100%);
    padding: 100px 24px;
    text-align: center;
}

.maintenance-page .mx-cta h2 {
    font-size: clamp(28px, 4vw, 44px);
    font-weight: 800;
    color: #fff;
    letter-spacing: -0.03em;
    margin-bottom: 16px;
}

.maintenance-page .mx-cta p {
    font-size: 16px;
    color: rgba(255, 255, 255, 0.6);
    margin-bottom: 40px;
}
