
/* ========================================
   MAHFOOZ ACADEMY - MOBILE QUICK ACCESS
======================================== */

/* Desktop par hidden */
.ma-quick-section {
    display: none;
}

@media screen and (max-width: 767px) {

    .ma-quick-section {
        display: block;
        width: 100%;
        padding: 24px 15px 32px;
        background: #f7f5f4;
        box-sizing: border-box;
        overflow: hidden;
        font-family: inherit;
    }

    .ma-quick-section *,
    .ma-quick-section *::before,
    .ma-quick-section *::after {
        box-sizing: border-box;
    }

    .ma-quick-wrap {
        width: 100%;
        max-width: 520px;
        margin: 0 auto;
    }

    /* ========================================
       SCHOOL BRAND HEADER
    ======================================== */

    .ma-brand {
        display: flex;
        align-items: center;
        gap: 13px;
        width: 100%;
        min-height: 108px;
        padding: 16px;
        border: 1px solid rgba(255,255,255,0.12);
        border-radius: 17px;
        background: linear-gradient(120deg, #760021, #a00035);
        box-shadow: 0 8px 22px rgba(105, 0, 33, 0.16);
        position: relative;
        overflow: hidden;
        isolation: isolate;
    }

    /* Decorative circles */
    .ma-brand::after {
        content: "";
        position: absolute;
        width: 155px;
        height: 155px;
        border: 1px solid rgba(255,255,255,0.10);
        border-radius: 50%;
        right: -60px;
        top: -85px;
        box-shadow:
            0 0 0 18px rgba(255,255,255,0.025),
            0 0 0 38px rgba(255,255,255,0.025);
        z-index: -1;
        pointer-events: none;
    }

    /* Your own school logo */
    .ma-crest {
        width: 65px;
        height: 72px;
        flex-shrink: 0;
        display: flex;
        align-items: center;
        justify-content: center;
        position: relative;
        z-index: 1;
    }

    .ma-logo-img {
        display: block;
        width: 100%;
        height: 100%;
        object-fit: contain;
        object-position: center;
        border-radius: 5px;
    }

    /* School name */
    .ma-brand-text {
        min-width: 0;
        flex: 1;
        position: relative;
        z-index: 1;
        color: #fff;
    }

    .ma-overline {
        display: block;
        font-size: 9px;
        line-height: 1.4;
        letter-spacing: 2.5px;
        color: #e9ce9a;
        font-weight: 600;
        margin-bottom: 4px;
    }

    .ma-brand-text h2 {
        font-size: 17px;
        line-height: 1.25;
        font-weight: 800;
        letter-spacing: 0.25px;
        color: #fff;
        margin: 0;
        padding: 0;
    }

    .ma-brand-text h3 {
        font-size: 11px;
        line-height: 1.4;
        letter-spacing: 3px;
        font-weight: 600;
        color: #f1dcae;
        margin: 3px 0 0;
        padding: 0;
    }

    .ma-brand-line {
        width: 40px;
        height: 2px;
        background: #dfbf78;
        margin: 7px 0 5px;
        border-radius: 3px;
    }

    .ma-brand-text p {
        color: rgba(255,255,255,0.78);
        font-size: 8px;
        line-height: 1.4;
        letter-spacing: 1.7px;
        font-weight: 600;
        margin: 0;
        padding: 0;
    }

    /* ========================================
       QUICK ACCESS HEADING
    ======================================== */

    .ma-section-heading {
        display: flex;
        align-items: center;
        justify-content: space-between;
        margin: 25px 2px 14px;
    }

    .ma-small-title {
        display: block;
        font-size: 9px;
        line-height: 1.4;
        font-weight: 800;
        letter-spacing: 2.2px;
        color: #a00035;
        margin-bottom: 3px;
    }

    .ma-section-heading h3 {
        font-size: 21px;
        line-height: 1.3;
        font-weight: 800;
        color: #30252a;
        margin: 0;
        padding: 0;
    }

    .ma-heading-icon {
        color: #b18a43;
        font-size: 23px;
        margin-right: 5px;
    }

    /* ========================================
       QUICK LINKS GRID
    ======================================== */

    .ma-links-grid {
        display: grid;
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 12px;
        width: 100%;
    }

    /* ========================================
       INDIVIDUAL CARDS
    ======================================== */

    .ma-link-card {
        min-width: 0;
        min-height: 92px;
        padding: 14px 11px;
        display: flex;
        align-items: center;
        gap: 10px;
        position: relative;
        overflow: hidden;
        text-decoration: none !important;
        background: #fff;
        border: 1px solid #eee7e8;
        border-radius: 13px;
        box-shadow: 0 4px 15px rgba(53, 17, 28, 0.045);
        -webkit-tap-highlight-color: transparent;
        transition:
            transform 0.25s ease,
            border-color 0.25s ease,
            box-shadow 0.25s ease;
    }

    /* Left decorative accent */
    .ma-link-card::before {
        content: "";
        position: absolute;
        left: 0;
        top: 15px;
        bottom: 15px;
        width: 3px;
        background: #a00035;
        border-radius: 0 5px 5px 0;
        transform: scaleY(0);
        transition: transform 0.25s ease;
    }

    /* ========================================
       CARD ICON
    ======================================== */

    .ma-link-icon {
        flex-shrink: 0;
        width: 43px;
        height: 43px;
        border-radius: 12px;
        display: flex;
        align-items: center;
        justify-content: center;
        color: #fff;
        background: linear-gradient(145deg, #a00035, #790024);
        box-shadow: 0 4px 10px rgba(128, 0, 38, 0.15);
        transition: transform 0.3s ease;
    }

    .ma-link-icon svg {
        display: block;
        width: 22px;
        height: 22px;
    }

    /* ========================================
       CARD TEXT
    ======================================== */

    .ma-link-text {
        min-width: 0;
        flex: 1;
    }

    .ma-link-text h4 {
        color: #33272c;
        font-size: 12px;
        line-height: 1.35;
        font-weight: 750;
        margin: 0 0 4px;
        padding: 0;
    }

    .ma-link-text p {
        color: #858087;
        font-size: 9px;
        line-height: 1.4;
        margin: 0;
        padding: 0;
    }

    /* Arrow */
    .ma-link-arrow {
        flex-shrink: 0;
        color: #b99aa4;
        font-size: 13px;
        align-self: flex-start;
        line-height: 1;
        transition:
            transform 0.25s ease,
            color 0.25s ease;
    }

    /* ========================================
       HOVER ANIMATION
    ======================================== */

    @media (hover: hover) {
        .ma-link-card:hover {
            transform: translateY(-4px);
            border-color: #d9b1bd;
            box-shadow: 0 9px 20px rgba(105, 0, 33, 0.10);
        }

        .ma-link-card:hover::before {
            transform: scaleY(1);
        }

        .ma-link-card:hover .ma-link-icon {
            transform: rotate(-6deg) scale(1.06);
        }

        .ma-link-card:hover .ma-link-arrow {
            color: #a00035;
            transform: translate(2px, -2px);
        }
    }

    /* Tap effect */
    .ma-link-card:active {
        transform: scale(0.96);
        background: #fffafb;
    }

    /* Keyboard focus */
    .ma-link-card:focus-visible {
        outline: 2px solid #a00035;
        outline-offset: 3px;
    }

    /* ========================================
       SCROLL REVEAL ANIMATION
    ======================================== */

    .ma-links-grid.ma-animated .ma-link-card {
        opacity: 0;
        transform: translateY(16px);
        transition:
            opacity 0.5s ease,
            transform 0.5s ease,
            box-shadow 0.25s ease,
            border-color 0.25s ease;
    }

    .ma-links-grid.ma-animated .ma-link-card.ma-show {
        opacity: 1;
        transform: translateY(0);
    }

    .ma-links-grid.ma-animated .ma-link-card:nth-child(2) {
        transition-delay: 0.08s;
    }

    .ma-links-grid.ma-animated .ma-link-card:nth-child(3) {
        transition-delay: 0.16s;
    }

    .ma-links-grid.ma-animated .ma-link-card:nth-child(4) {
        transition-delay: 0.24s;
    }

    /* ========================================
       RIPPLE EFFECT
    ======================================== */

    .ma-ripple {
        position: absolute;
        border-radius: 50%;
        background: rgba(160, 0, 53, 0.12);
        transform: scale(0);
        animation: maRipple 0.55s ease-out forwards;
        pointer-events: none;
    }

    @keyframes maRipple {
        to {
            transform: scale(2.5);
            opacity: 0;
        }
    }

    /* ========================================
       SMALL MOBILE SCREENS
    ======================================== */

    @media screen and (max-width: 360px) {

        .ma-quick-section {
            padding: 20px 11px 28px;
        }

        .ma-brand {
            padding: 15px 11px;
            gap: 9px;
        }

        .ma-crest {
            width: 53px;
            height: 61px;
        }

        .ma-brand-text h2 {
            font-size: 15px;
        }

        .ma-brand-text h3 {
            font-size: 10px;
            letter-spacing: 2px;
        }

        .ma-link-card {
            gap: 7px;
            padding: 12px 8px;
        }

        .ma-link-icon {
            width: 37px;
            height: 37px;
        }

        .ma-link-icon svg {
            width: 20px;
            height: 20px;
        }

        .ma-link-text h4 {
            font-size: 11px;
        }

        .ma-link-text p {
            font-size: 8px;
        }
    }

    /* ========================================
       ACCESSIBILITY
    ======================================== */

    @media (prefers-reduced-motion: reduce) {
        .ma-link-card,
        .ma-link-icon,
        .ma-link-arrow {
            transition: none !important;
        }

        .ma-links-grid.ma-animated .ma-link-card {
            opacity: 1;
            transform: none;
        }

        .ma-ripple {
            display: none;
        }
    }
}
.ma-crest {
    width: 90px;
    height: 100px;
    flex-shrink: 0;
    display: flex;
    align-items: center;
    justify-content: center;
}

.ma-logo-img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    object-position: center;
    display: block;
}
