﻿.mid-page-hero,
.mid-gallery-section,
.mid-cta-section {
    position: relative;
    overflow: hidden;
    font-family: "Segoe UI", Tahoma, Geneva, Verdana, sans-serif;
}

.mid-page-shell {
    width: min(1280px, calc(100% - 2rem));
    margin: 0 auto;
}

.mid-page-hero {
    padding: 8.5rem 0 5rem;
    background: radial-gradient(circle at 12% 20%, rgba(0, 173, 239, 0.24), transparent 22%), radial-gradient(circle at 82% 78%, rgba(135, 86, 255, 0.28), transparent 26%), linear-gradient(135deg, #071a57 0%, #123d8d 42%, #4f3ff0 100%);
}

    .mid-page-hero::before {
        content: "";
        position: absolute;
        inset: 0;
        background: repeating-linear-gradient( 125deg, rgba(255, 255, 255, 0.11) 0, rgba(255, 255, 255, 0.11) 2px, transparent 2px, transparent 24px );
        opacity: 0.22;
        pointer-events: none;
    }

    .mid-page-hero::after {
        content: "";
        position: absolute;
        inset: 0;
        background: radial-gradient(circle at 20% 16%, rgba(255, 255, 255, 0.85) 0 2px, transparent 3px), radial-gradient(circle at 73% 19%, rgba(255, 255, 255, 0.85) 0 2px, transparent 3px), radial-gradient(circle at 62% 74%, rgba(0, 224, 255, 0.75) 0 3px, transparent 4px), radial-gradient(circle at 88% 38%, rgba(169, 132, 255, 0.75) 0 3px, transparent 4px), radial-gradient(circle at 35% 55%, rgba(255, 255, 255, 0.45) 0 2px, transparent 3px);
        pointer-events: none;
    }

.mid-hero-grid {
    position: relative;
    z-index: 2;
    display: grid;
    grid-template-columns: 1.05fr 1fr;
    gap: 3rem;
    align-items: center;
}

.mid-hero-copy {
    color: #ffffff;
    animation: midFadeUp 0.9s ease both;
}

.mid-kicker,
.mid-section-label {
    display: inline-flex;
    align-items: center;
    padding: 0.55rem 1rem;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.12);
    border: 1px solid rgba(255, 255, 255, 0.16);
    color: #ffffff;
    font-size: 0.86rem;
    font-weight: 700;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    margin-bottom: 1rem;
}

.mid-title {
    font-size: clamp(2.4rem, 5vw, 4.7rem);
    line-height: 1.02;
    font-weight: 800;
    margin: 0 0 1rem;
}

.mid-subtitle {
    max-width: 42rem;
    color: rgba(255, 255, 255, 0.92);
    font-size: 1.15rem;
    line-height: 1.8;
    margin-bottom: 1.5rem;
}

.mid-chip-row {
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
    margin-bottom: 1.8rem;
}

.mid-chip {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0.6rem 1rem;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.14);
    border: 1px solid rgba(255, 255, 255, 0.18);
    color: #ffffff;
    font-weight: 600;
    font-size: 0.95rem;
}

.mid-hero-actions,
.mid-cta-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 0.9rem;
}

.mid-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 180px;
    padding: 0.95rem 1.45rem;
    border-radius: 999px;
    text-decoration: none;
    font-weight: 700;
    transition: transform 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
}

    .mid-btn:hover {
        transform: translateY(-2px);
        text-decoration: none;
    }

.mid-btn-primary {
    background: #ffffff;
    color: #123d8d;
    box-shadow: 0 14px 30px rgba(8, 21, 70, 0.18);
}

    .mid-btn-primary:hover {
        color: #123d8d;
        background: #f8fbff;
    }

.mid-btn-secondary {
    background: rgba(255, 255, 255, 0.08);
    color: #ffffff;
    border: 1px solid rgba(255, 255, 255, 0.18);
}

    .mid-btn-secondary:hover {
        color: #ffffff;
        background: rgba(255, 255, 255, 0.16);
    }

.mid-stage-wrap {
    position: relative;
    min-height: 820px;
    animation: midFadeUp 1s ease both;
}

.mid-stage-glow {
    position: absolute;
    inset: 20% 16% 12% 16%;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(255, 255, 255, 0.22) 0%, rgba(255, 255, 255, 0) 68%);
    filter: blur(12px);
    pointer-events: none;
}

.mid-stage-card {
    position: absolute;
    display: block;
    border-radius: 24px;
    overflow: hidden;
    background: rgba(255, 255, 255, 0.10);
    border: 1px solid rgba(255, 255, 255, 0.18);
    box-shadow: 0 28px 60px rgba(7, 20, 69, 0.30);
    backdrop-filter: blur(10px);
    transition: transform 0.25s ease, box-shadow 0.25s ease;
}

    .mid-stage-card:hover {
        transform: translateY(-8px) scale(1.02);
        box-shadow: 0 34px 70px rgba(7, 20, 69, 0.38);
        z-index: 12;
    }

    .mid-stage-card img {
        display: block;
        width: 100%;
        height: auto;
    }

.mid-stage-main {
    width: 280px;
    top: 120px;
    left: 50%;
    transform: translateX(-50%);
    z-index: 6;
    animation: midFloatMain 5.8s ease-in-out infinite;
}

.mid-stage-awareness {
    width: 220px;
    top: 40px;
    left: 0;
    transform: rotate(-8deg);
    z-index: 3;
    animation: midFloatA 6.6s ease-in-out infinite;
}

.mid-stage-convenience {
    width: 220px;
    top: 30px;
    right: 0;
    transform: rotate(8deg);
    z-index: 3;
    animation: midFloatB 6.8s ease-in-out infinite;
}

.mid-stage-steps {
    width: 255px;
    bottom: 40px;
    left: 20px;
    transform: rotate(-4deg);
    z-index: 4;
    animation: midFloatC 7.1s ease-in-out infinite;
}

.mid-stage-family {
    width: 245px;
    bottom: 28px;
    right: 18px;
    transform: rotate(4deg);
    z-index: 4;
    animation: midFloatD 6.9s ease-in-out infinite;
}

.mid-gallery-section {
    background: linear-gradient(180deg, #f6f9fd 0%, #eef4fb 100%);
    padding: 5rem 0;
}

.mid-gallery-head {
    text-align: center;
    margin-bottom: 2.5rem;
    animation: midFadeUp 0.85s ease both;
}

    .mid-gallery-head h2 {
        color: #1c2b5f;
        font-size: clamp(2rem, 4vw, 3rem);
        font-weight: 800;
        margin-bottom: 0.75rem;
    }

    .mid-gallery-head p {
        color: #5c6f86;
        font-size: 1.05rem;
        max-width: 720px;
        margin: 0 auto;
        line-height: 1.8;
    }

.mid-gallery-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 1.5rem;
}

.mid-gallery-card {
    display: flex;
    flex-direction: column;
    background: #ffffff;
    border: 1px solid #e4edf6;
    border-radius: 26px;
    overflow: hidden;
    box-shadow: 0 18px 40px rgba(22, 53, 97, 0.08);
    animation: midCardReveal 0.85s ease both;
}

.mid-gallery-card-wide {
    grid-column: 1 / -1;
}

.mid-gallery-image {
    background: linear-gradient(135deg, #eff5fc 0%, #e9f1fb 100%);
    padding: 1rem;
}

    .mid-gallery-image img {
        width: 100%;
        display: block;
        border-radius: 18px;
    }

.mid-gallery-body {
    padding: 1.35rem 1.35rem 1.5rem;
}

.mid-card-tag {
    display: inline-flex;
    align-items: center;
    padding: 0.42rem 0.8rem;
    border-radius: 999px;
    background: #edf4ff;
    border: 1px solid #d6e7fb;
    color: #195ca4;
    font-size: 0.82rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    margin-bottom: 0.9rem;
}

.mid-gallery-body h3 {
    color: #1c2b5f;
    font-size: 1.45rem;
    font-weight: 800;
    margin-bottom: 0.65rem;
}

.mid-gallery-body p {
    color: #617285;
    line-height: 1.8;
    margin-bottom: 1.15rem;
}

.mid-card-link {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0.8rem 1.15rem;
    border-radius: 999px;
    background: linear-gradient(160deg, #252d4d 0%, #195ca4 100%);
    color: #ffffff;
    text-decoration: none;
    font-weight: 700;
}

    .mid-card-link:hover {
        color: #ffffff;
        text-decoration: none;
        transform: translateY(-1px);
    }

.mid-cta-section {
    background: linear-gradient(135deg, #071a57 0%, #123d8d 45%, #4f3ff0 100%);
    padding: 0 0 5rem;
}

.mid-cta-box {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 2rem;
    background: rgba(255, 255, 255, 0.08);
    border: 1px solid rgba(255, 255, 255, 0.16);
    backdrop-filter: blur(10px);
    padding: 2rem;
    border-radius: 28px;
    color: #ffffff;
    box-shadow: 0 20px 50px rgba(7, 20, 69, 0.20);
}

    .mid-cta-box h2 {
        font-size: 2rem;
        font-weight: 800;
        margin: 0 0 0.75rem;
    }

    .mid-cta-box p {
        color: rgba(255, 255, 255, 0.88);
        line-height: 1.8;
        margin: 0;
        max-width: 680px;
    }

.mid-card-delay-1 {
    animation-delay: 0.05s;
}

.mid-card-delay-2 {
    animation-delay: 0.12s;
}

.mid-card-delay-3 {
    animation-delay: 0.19s;
}

.mid-card-delay-4 {
    animation-delay: 0.26s;
}

.mid-card-delay-5 {
    animation-delay: 0.33s;
}

@keyframes midFadeUp {
    from {
        opacity: 0;
        transform: translateY(26px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes midCardReveal {
    from {
        opacity: 0;
        transform: translateY(30px) scale(0.98);
    }

    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

@keyframes midFloatMain {
    0%, 100% {
        transform: translateX(-50%) translateY(0);
    }

    50% {
        transform: translateX(-50%) translateY(-12px);
    }
}

@keyframes midFloatA {
    0%, 100% {
        transform: rotate(-8deg) translateY(0);
    }

    50% {
        transform: rotate(-8deg) translateY(-10px);
    }
}

@keyframes midFloatB {
    0%, 100% {
        transform: rotate(8deg) translateY(0);
    }

    50% {
        transform: rotate(8deg) translateY(-11px);
    }
}

@keyframes midFloatC {
    0%, 100% {
        transform: rotate(-4deg) translateY(0);
    }

    50% {
        transform: rotate(-4deg) translateY(-9px);
    }
}

@keyframes midFloatD {
    0%, 100% {
        transform: rotate(4deg) translateY(0);
    }

    50% {
        transform: rotate(4deg) translateY(-10px);
    }
}

@media (max-width: 1199.98px) {
    .mid-stage-wrap {
        min-height: 700px;
    }

    .mid-stage-main {
        width: 240px;
    }

    .mid-stage-awareness,
    .mid-stage-convenience {
        width: 190px;
    }

    .mid-stage-steps,
    .mid-stage-family {
        width: 210px;
    }
}

@media (max-width: 991.98px) {
    .mid-page-hero {
        padding: 7.5rem 0 4rem;
    }

    .mid-hero-grid {
        grid-template-columns: 1fr;
        gap: 2.5rem;
    }

    .mid-stage-wrap {
        min-height: 640px;
        max-width: 720px;
        margin: 0 auto;
    }

    .mid-gallery-grid {
        grid-template-columns: 1fr;
    }

    .mid-gallery-card-wide {
        grid-column: auto;
    }

    .mid-cta-box {
        flex-direction: column;
        align-items: flex-start;
    }
}

@media (max-width: 767.98px) {
    .mid-page-shell {
        width: min(100% - 1.25rem, 1280px);
    }

    .mid-page-hero {
        padding: 7rem 0 3.5rem;
    }

    .mid-stage-wrap {
        min-height: auto;
        display: grid;
        grid-template-columns: repeat(2, 1fr);
        gap: 1rem;
    }

    .mid-stage-glow {
        display: none;
    }

    .mid-stage-card {
        position: relative;
        width: 100%;
        top: auto;
        left: auto;
        right: auto;
        bottom: auto;
        transform: none !important;
        animation: midCardReveal 0.8s ease both;
    }

    .mid-stage-main {
        grid-column: 1 / -1;
        max-width: 320px;
        margin: 0 auto;
    }

    .mid-title {
        font-size: 2.5rem;
    }

    .mid-subtitle {
        font-size: 1rem;
    }
}

@media (max-width: 575.98px) {
    .mid-chip-row,
    .mid-hero-actions,
    .mid-cta-actions {
        flex-direction: column;
    }

    .mid-btn {
        width: 100%;
    }

    .mid-gallery-body h3 {
        font-size: 1.25rem;
    }

    .mid-gallery-body,
    .mid-cta-box {
        padding: 1.2rem;
    }
}
