/* Machakos Girls — Utumishi-inspired theme from school crest */
:root {
    --mg-blue: #1a3aa8;
    --mg-blue-dark: #0f2470;
    --mg-navy: #0b1633;
    --mg-maroon: #4a1810;
    --mg-silver: #e6e8ee;
    --mg-ink: #141824;
    --mg-muted: #5b6170;
    --mg-white: #ffffff;
    --mg-glow-blue: rgba(26, 58, 168, 0.35);
    --mg-glow-maroon: rgba(74, 24, 16, 0.28);
    --theme-color: #1a3aa8;
    --secondary-color: #4a1810;
    --title-color: #141824;
    --body-color: #5b6170;
    --title-font: "Lexend", sans-serif;
    --para-font: "Lexend", sans-serif;
    --body-font: "Lexend", sans-serif;
    --mg-meteors: url("data:image/svg+xml;utf8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='170' height='96' viewBox='0 0 170 96'%3E%3Cdefs%3E%3ClinearGradient id='t' x1='1' y1='0' x2='0' y2='1'%3E%3Cstop offset='0' stop-color='%23ffffff' stop-opacity='0.6'/%3E%3Cstop offset='1' stop-color='%23ffffff' stop-opacity='0'/%3E%3C/linearGradient%3E%3C/defs%3E%3Cg stroke='url(%23t)' stroke-width='1.5' stroke-linecap='round' fill='none'%3E%3Cpath d='M132 6 L104 34'/%3E%3Cpath d='M62 12 L38 36'/%3E%3Cpath d='M158 46 L134 70'/%3E%3Cpath d='M96 58 L70 84'/%3E%3Cpath d='M26 66 L6 86'/%3E%3C/g%3E%3Cg fill='%23ffffff'%3E%3Ccircle cx='132' cy='6' r='1.6' fill-opacity='0.85'/%3E%3Ccircle cx='62' cy='12' r='1.4' fill-opacity='0.8'/%3E%3Ccircle cx='158' cy='46' r='1.5' fill-opacity='0.85'/%3E%3Ccircle cx='96' cy='58' r='1.4' fill-opacity='0.8'/%3E%3Ccircle cx='26' cy='66' r='1.3' fill-opacity='0.75'/%3E%3Ccircle cx='84' cy='26' r='0.9' fill-opacity='0.45'/%3E%3Ccircle cx='18' cy='30' r='0.8' fill-opacity='0.4'/%3E%3Ccircle cx='146' cy='84' r='0.9' fill-opacity='0.4'/%3E%3C/g%3E%3C/svg%3E");
}

body,
h1, h2, h3, h4, h5, h6,
.sec-title,
.vs-btn,
.edura-header,
.mg-header,
.mg-footer {
    font-family: "Lexend", sans-serif !important;
}

.underline-title:after {
    background-color: var(--mg-maroon) !important;
}

/* ---------- Header ---------- */
.mg-header {
    position: sticky;
    top: 0;
    z-index: 1050;
    background: var(--mg-white);
    box-shadow: 0 8px 24px rgba(11, 22, 51, 0.08);
}

.mg-topbar {
    background: var(--mg-navy);
    color: #fff;
    font-size: 13px;
    font-weight: 400;
}

.mg-topbar-inner,
.mg-nav-inner {
    max-width: 1240px;
    margin: 0 auto;
    padding: 0 24px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
}

.mg-topbar-inner {
    min-height: 42px;
}

.mg-top-links,
.mg-social {
    display: flex;
    align-items: center;
    gap: 18px;
    list-style: none;
    margin: 0;
    padding: 0;
}

.mg-top-links a,
.mg-top-links span {
    color: rgba(255, 255, 255, 0.92);
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: 8px;
}

.mg-top-links a:hover { color: #fff; }

.mg-social a {
    width: 28px;
    height: 28px;
    border-radius: 50%;
    border: 1px solid rgba(255, 255, 255, 0.25);
    color: #fff;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 11px;
    text-decoration: none;
}

.mg-social a:hover {
    background: var(--mg-blue);
    border-color: var(--mg-blue);
}

.mg-nav {
    background: #fff;
    border-bottom: 1px solid var(--mg-silver);
    position: relative;
    z-index: 2;
}

.mg-nav-inner { min-height: 84px; }

.mg-brand {
    display: flex;
    align-items: center;
    align-self: stretch;
    gap: 12px;
    text-decoration: none;
    flex-shrink: 0;
    position: relative;
    padding-right: 52px;
}

/* Blue panel running from the left edge of the screen up to the logo block,
   cut diagonally on its right edge */
.mg-brand::before,
.mg-brand::after {
    content: "";
    position: absolute;
    top: 0;
    bottom: 0;
    right: 0;
    left: -100vw;
    z-index: 0;
    clip-path: polygon(0 0, 100% 0, calc(100% - 38px) 100%, 0 100%);
}

.mg-brand::before {
    background: var(--mg-blue);
}

/* Meteor shower pattern over the blue panel */
.mg-brand::after {
    pointer-events: none;
    background-image: var(--mg-meteors);
    background-repeat: repeat;
    background-size: 170px 96px;
    opacity: 0.5;
    animation: mgMeteors 22s linear infinite;
}

@keyframes mgMeteors {
    from { background-position: 0 0; }
    to { background-position: -170px 96px; }
}

@media (prefers-reduced-motion: reduce) {
    .mg-brand::after,
    .mg-footer-pattern { animation: none; }
}

.mg-brand > * {
    position: relative;
    z-index: 1;
}

.mg-brand img {
    height: 56px;
    width: auto;
    object-fit: contain;
}

.mg-brand-copy {
    display: flex;
    flex-direction: column;
    line-height: 1.15;
}

.mg-brand-copy strong {
    color: #fff;
    font-size: 16px;
    font-weight: 700;
}

.mg-brand-copy small {
    color: rgba(255, 255, 255, 0.8);
    font-size: 11px;
    font-weight: 500;
    letter-spacing: 0.04em;
    text-transform: uppercase;
}

.mg-menu {
    display: flex;
    align-items: center;
    gap: 4px;
    list-style: none;
    margin: 0;
    padding: 0;
}

.mg-menu > li { position: relative; }

.mg-menu > li > a {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 12px 12px;
    color: var(--mg-ink);
    text-decoration: none;
    font-size: 14px;
    font-weight: 500;
    border-radius: 8px;
    background: none !important;
}

.mg-menu > li > a:hover,
.mg-menu > li > a.active,
.mg-menu > li:hover > a {
    color: var(--mg-blue) !important;
    background: rgba(26, 58, 168, 0.08) !important;
}

.mg-menu .caret { font-size: 10px; }

.mg-dropdown {
    position: absolute;
    top: 100%;
    left: 0;
    min-width: 220px;
    background: #fff;
    border-radius: 10px;
    box-shadow: 0 16px 40px rgba(11, 22, 51, 0.14);
    padding: 8px 0;
    list-style: none;
    margin: 0;
    opacity: 0;
    visibility: hidden;
    transform: translateY(8px);
    transition: 0.2s ease;
    z-index: 30;
    border-top: 3px solid var(--mg-blue);
}

.mg-menu > li:hover .mg-dropdown {
    opacity: 1;
    visibility: visible;
    transform: none;
}

.mg-dropdown a {
    display: block;
    padding: 9px 16px;
    color: #334155;
    font-size: 14px;
    font-weight: 500;
    text-decoration: none;
}

.mg-dropdown a:hover {
    color: var(--mg-blue);
    background: #f5f7fb;
}

.mg-hamburger.vs-menu-toggle {
    display: none;
    width: 42px;
    height: 42px;
    border-radius: 8px;
    border: 1px solid var(--mg-silver);
    background: var(--mg-blue);
    color: #fff;
    padding: 0;
}

@media (max-width: 1199px) {
    .mg-menu { display: none; }
    .mg-hamburger.vs-menu-toggle {
        display: inline-flex;
        align-items: center;
        justify-content: center;
    }
    .mg-brand-copy small { display: none; }
}

@media (max-width: 991px) {
    .mg-top-hours, .mg-social { display: none; }
}

@media (max-width: 767px) {
    .mg-top-email { display: none; }
    .mg-brand img { height: 44px; }
    .mg-brand { padding-right: 34px; }
    .mg-brand::before,
    .mg-brand::after {
        clip-path: polygon(0 0, 100% 0, calc(100% - 24px) 100%, 0 100%);
    }
    .mg-brand-copy strong { font-size: 13px; }
    .mg-nav-inner { min-height: 70px; padding: 0 14px; }
    .mg-topbar-inner { padding: 0 14px; }
}

@media (max-width: 480px) {
    .mg-brand-copy { display: none; }
}

/* ---------- Footer ---------- */
.mg-footer {
    position: relative;
    overflow: hidden;
    background: var(--mg-navy);
    color: rgba(255, 255, 255, 0.82);
    padding-top: 72px;
}

.mg-footer-media {
    position: absolute;
    inset: 0;
    background-size: cover;
    background-position: center 40%;
    background-repeat: no-repeat;
    z-index: 0;
}

.mg-footer-media::after {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(180deg, rgba(11, 22, 51, 0.86) 0%, rgba(8, 14, 32, 0.94) 100%);
}

.mg-footer-pattern {
    position: absolute;
    inset: 0;
    z-index: 0;
    pointer-events: none;
    opacity: 0.4;
    background-image: var(--mg-meteors);
    background-repeat: repeat;
    background-size: 210px 118px;
    animation: mgMeteorsWide 34s linear infinite;
}

@keyframes mgMeteorsWide {
    from { background-position: 0 0; }
    to { background-position: -210px 118px; }
}

.mg-footer-watermark {
    position: absolute;
    right: 4%;
    bottom: 12%;
    width: 220px;
    opacity: 0.08;
    pointer-events: none;
    z-index: 1;
}

.mg-footer-inner {
    position: relative;
    z-index: 1;
    max-width: 1240px;
    margin: 0 auto;
    padding: 0 24px 40px;
}

.mg-footer h4 {
    color: #fff;
    font-size: 16px;
    font-weight: 600;
    margin-bottom: 18px;
    padding-bottom: 10px;
    border-bottom: 2px solid var(--mg-blue);
    display: inline-block;
}

.mg-footer-brand img { height: 58px; margin-bottom: 14px; }

.mg-footer-brand p { font-size: 14px; line-height: 1.7; max-width: 280px; }

.mg-footer-links {
    list-style: none;
    margin: 0;
    padding: 0;
}

.mg-footer-links a {
    color: rgba(255, 255, 255, 0.78);
    text-decoration: none;
    font-size: 14px;
    display: inline-block;
    padding: 5px 0;
}

.mg-footer-links a:hover { color: #fff; }

.mg-footer-contact p {
    margin: 0 0 10px;
    font-size: 14px;
    display: flex;
    gap: 10px;
}

.mg-footer-contact a { color: inherit; text-decoration: none; }
.mg-footer-contact i { color: #9db0ff; margin-top: 4px; }

.mg-footer-copy {
    position: relative;
    z-index: 1;
    border-top: 1px solid rgba(255, 255, 255, 0.08);
    padding: 16px 24px;
    text-align: center;
    font-size: 13px;
    color: rgba(255, 255, 255, 0.55);
}

.mg-footer-copy a { color: #c9d4ff; }

/* ---------- Shared sections ---------- */
.mg-dots {
    background-image: radial-gradient(rgba(26, 58, 168, 0.08) 1px, transparent 1px);
    background-size: 18px 18px;
}

.mg-kicker {
    display: inline-block;
    color: var(--mg-maroon);
    font-size: 12px;
    font-weight: 600;
    letter-spacing: 0.14em;
    text-transform: uppercase;
    margin-bottom: 10px;
}

.mg-heading {
    font-size: 36px;
    font-weight: 700;
    color: var(--mg-ink);
    line-height: 1.25;
    margin-bottom: 16px;
}

.mg-heading span { color: var(--mg-blue); }

.mg-card {
    background: #fff;
    border-radius: 16px;
    box-shadow: 0 12px 32px rgba(11, 22, 51, 0.08);
    overflow: hidden;
    border-top: 4px solid var(--mg-blue);
}

.mg-card.maroon { border-top-color: var(--mg-maroon); }

.mg-btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background: var(--mg-blue);
    color: #fff !important;
    padding: 12px 22px;
    border-radius: 10px;
    font-weight: 600;
    font-size: 14px;
    text-decoration: none;
    border: 0;
}

.mg-btn:hover { background: var(--mg-blue-dark); color: #fff !important; }

.mg-btn-outline {
    background: transparent;
    color: #fff !important;
    border: 1.5px solid rgba(255, 255, 255, 0.55);
}

.mg-btn-outline:hover {
    background: #fff;
    color: var(--mg-navy) !important;
}

/* About block */
.mg-about {
    padding: 90px 0;
    position: relative;
}

.mg-about-photo {
    position: relative;
    padding: 0 0 28px 0;
}

.mg-about-photo img {
    width: 100%;
    border-radius: 20px;
    object-fit: cover;
    min-height: 420px;
    box-shadow: 0 20px 50px rgba(11, 22, 51, 0.16);
}

.mg-about-photo .frame {
    position: absolute;
    top: auto;
    left: auto;
    right: -8px;
    bottom: 0;
    width: 46%;
    min-height: 0;
    height: 170px;
    border: 6px solid #fff;
    border-radius: 16px;
    object-fit: cover;
    box-shadow: 0 10px 24px rgba(11, 22, 51, 0.18);
}

.mg-value-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 14px;
}

.mg-value {
    display: flex;
    align-items: flex-start;
    gap: 14px;
    background: #fff;
    border-radius: 14px;
    padding: 18px;
    height: 100%;
    box-shadow: 0 8px 24px rgba(11, 22, 51, 0.06);
    border: 1px solid var(--mg-silver);
}

.mg-value-motto {
    grid-column: 1 / -1;
    background: linear-gradient(135deg, #f7f8fc 0%, #fff 100%);
    border-left: 4px solid var(--mg-maroon);
}

.mg-value i {
    width: 42px;
    height: 42px;
    flex-shrink: 0;
    border-radius: 10px;
    background: rgba(26, 58, 168, 0.1);
    color: var(--mg-blue);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 0;
}

.mg-value-motto i {
    background: rgba(74, 24, 16, 0.1);
    color: var(--mg-maroon);
}

.mg-value h4 {
    font-size: 16px;
    font-weight: 650;
    color: var(--mg-ink);
    margin-bottom: 6px;
}

.mg-value p { margin: 0; font-size: 14px; line-height: 1.6; }

@media (max-width: 575px) {
    .mg-value-grid { grid-template-columns: 1fr; }
    .mg-about-photo .frame {
        right: 12px;
        width: 52%;
        height: 130px;
    }
}

/* Admin / events / results */
.mg-admin-card {
    background: #fff;
    border-radius: 16px;
    overflow: hidden;
    box-shadow: 0 12px 32px rgba(11, 22, 51, 0.08);
    height: 100%;
}

.mg-admin-card img {
    width: 100%;
    height: 320px;
    object-fit: cover;
}

.mg-admin-card .body { padding: 22px; }

.mg-event {
    display: flex;
    gap: 16px;
    background: #fff;
    border-radius: 14px;
    padding: 18px;
    box-shadow: 0 8px 24px rgba(11, 22, 51, 0.06);
    border: 1px solid var(--mg-silver);
    height: 100%;
}

.mg-event-date {
    min-width: 72px;
    background: var(--mg-blue);
    color: #fff;
    border-radius: 12px;
    text-align: center;
    padding: 12px 8px;
    font-weight: 700;
    line-height: 1.2;
}

.mg-table {
    background: #fff;
    border-radius: 14px;
    overflow: hidden;
    box-shadow: 0 8px 24px rgba(11, 22, 51, 0.06);
}

.mg-table table { margin: 0; }

.mg-table thead,
.mg-table thead th,
.mg-table > table > thead > tr > th,
.mg-table .table > thead > tr > th {
    background: #fff !important;
    color: var(--mg-navy) !important;
    font-weight: 700;
    border-bottom: 2px solid var(--mg-blue) !important;
    box-shadow: none;
}

.mg-table th, .mg-table td {
    white-space: nowrap;
    font-size: 13px;
}

.mg-table tbody td {
    background: #fff;
    color: var(--mg-ink);
}

.mg-table tbody tr:nth-child(even) td {
    background: #f6f7fb;
}

/* Inner banners */
.banner-title h6,
.banner-title h6 a,
.banner h6 {
    color: #ffffff !important;
    opacity: 0.95;
    letter-spacing: 0.06em;
}

.banner-overlay {
    background: linear-gradient(120deg, rgba(11, 22, 51, 0.88) 0%, rgba(26, 58, 168, 0.55) 55%, rgba(74, 24, 16, 0.45) 100%) !important;
}

.banner-title h1,
.banner h1 {
    font-family: "Lexend", sans-serif !important;
    font-weight: 700;
}

.vs-menu-wrapper .vs-menu-area {
    font-family: "Lexend", sans-serif;
}

.vs-btn {
    font-family: "Lexend", sans-serif;
    background-color: var(--mg-blue);
}

.hero-bg-overlay {
    background: linear-gradient(90deg, rgba(8, 14, 32, 0.82) 0%, rgba(11, 22, 51, 0.55) 55%, rgba(11, 22, 51, 0.35) 100%) !important;
}

.fancy-btn.primary-btn {
    background: var(--mg-blue) !important;
    box-shadow: 0 6px 20px rgba(26, 58, 168, 0.4) !important;
}

.mg-event h4 a { color: var(--mg-ink); text-decoration: none; }
.mg-event h4 a:hover { color: var(--mg-blue); }
.mg-footer .mg-social { display: flex; }
