/* Al-Amin Educational Platform — Android App Promo & Smart Banner Styles */

.alamin-smart-banner[hidden] {
    display: none !important;
}

.alamin-smart-banner {
    position: relative;
    z-index: 1030;
    background: linear-gradient(90deg, #e8f4fa 0%, #ffffff 65%, #f3f9fc 100%);
    border-bottom: 1px solid #c5dfec;
    box-shadow: 0 2px 10px rgba(0, 54, 79, 0.08);
    padding: 8px 12px;
    direction: rtl;
}

.alamin-smart-banner__inner {
    max-width: 1240px;
    margin: 0 auto;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
}

.alamin-smart-banner__close {
    flex: 0 0 36px;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    border: 1px solid #cbd5e1;
    background: #ffffff;
    color: #475569;
    font-size: 16px;
    line-height: 1;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    padding: 0;
    transition: background-color 0.2s ease, color 0.2s ease, border-color 0.2s ease;
}

.alamin-smart-banner__close:hover,
.alamin-smart-banner__close:focus-visible {
    background: #f1f5f9;
    color: #0f172a;
    border-color: #94a3b8;
    outline: 2px solid #005078;
    outline-offset: 2px;
}

.alamin-smart-banner__info {
    flex: 1 1 auto;
    min-width: 0;
    display: flex;
    align-items: center;
    gap: 10px;
    text-decoration: none;
    color: inherit;
}

.alamin-smart-banner__icon {
    width: 42px;
    height: 42px;
    border-radius: 10px;
    object-fit: cover;
    flex-shrink: 0;
    box-shadow: 0 2px 6px rgba(0, 54, 79, 0.18);
    border: 1px solid rgba(0, 80, 120, 0.15);
}

.alamin-smart-banner__text {
    min-width: 0;
    display: flex;
    flex-direction: column;
    gap: 1px;
}

.alamin-smart-banner__title {
    font-size: 0.92rem;
    font-weight: 800;
    color: #003a57;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.alamin-smart-banner__subtitle {
    font-size: 0.76rem;
    font-weight: 600;
    color: #475569;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.alamin-smart-banner__cta {
    flex-shrink: 0;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 36px;
    padding: 7px 14px;
    border-radius: 999px;
    background: #005078;
    color: #ffffff !important;
    font-size: 0.84rem;
    font-weight: 800;
    text-decoration: none !important;
    white-space: nowrap;
    box-shadow: 0 3px 10px rgba(0, 80, 120, 0.24);
    transition: background-color 0.2s ease, box-shadow 0.2s ease;
}

.alamin-smart-banner__cta:hover,
.alamin-smart-banner__cta:focus-visible {
    background: #003a57;
    color: #ffffff !important;
    box-shadow: 0 4px 14px rgba(0, 58, 87, 0.34);
}

/* Navbar Pill Link */
.alamin-nav-app-pill {
    background: rgba(0, 80, 120, 0.08) !important;
    color: #005078 !important;
    border: 1px solid rgba(0, 80, 120, 0.22);
    border-radius: 999px !important;
    transition: background-color 0.22s ease, color 0.22s ease, border-color 0.22s ease;
}

.alamin-nav-app-pill:hover,
.alamin-nav-app-pill:focus-visible {
    background: #005078 !important;
    color: #ffffff !important;
    border-color: #005078 !important;
}

.alamin-nav-app-pill::after {
    display: none !important;
}

/* Fix Bootstrap dropdown caret colliding with underline ::after in layout */
.navbar-nav .nav-link.dropdown-toggle::after {
    position: static;
    bottom: auto;
    right: auto;
    transform: none;
    width: auto;
    height: auto;
    background: transparent;
    vertical-align: 0.15em;
    margin-right: 0.35em;
    transition: none;
}

.navbar-nav .nav-link.dropdown-toggle:hover::after {
    width: auto;
}

/* Mobile Offcanvas App Promo Card */
.alamin-mobile-menu-app-card {
    display: flex;
    align-items: center;
    gap: 12px;
    width: calc(100% - 32px);
    margin: 12px 16px;
    padding: 12px 14px;
    box-sizing: border-box;
    text-align: right;
    border-radius: 14px;
    background: linear-gradient(135deg, #003956 0%, #005078 100%);
    color: #ffffff !important;
    text-decoration: none !important;
    box-shadow: 0 6px 16px rgba(0, 54, 79, 0.2);
}

.alamin-mobile-menu-app-card > div {
    min-width: 0;
    flex: 1 1 auto;
}

.alamin-mobile-menu-app-card:hover {
    color: #ffffff !important;
    background: linear-gradient(135deg, #002d42 0%, #003a57 100%);
}

.alamin-mobile-menu-app-card img {
    width: 44px;
    height: 44px;
    border-radius: 10px;
    flex-shrink: 0;
    border: 1px solid rgba(255, 255, 255, 0.25);
}

.alamin-mobile-menu-app-title {
    font-size: 0.92rem;
    font-weight: 800;
    color: #ffffff;
    line-height: 1.3;
}

.alamin-mobile-menu-app-sub {
    font-size: 0.78rem;
    color: #fde68a;
    font-weight: 600;
}

/* Footer Play Badge */
.alamin-footer-app-box {
    margin-top: 16px;
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 12px;
}

.alamin-play-badge-link {
    display: inline-block;
    border-radius: 10px;
    line-height: 0;
    box-shadow: 0 6px 18px rgba(0, 0, 0, 0.25);
    transition: box-shadow 0.25s ease, opacity 0.25s ease;
}

.alamin-play-badge-link:hover,
.alamin-play-badge-link:focus-visible {
    box-shadow: 0 8px 22px rgba(56, 189, 248, 0.35);
    opacity: 0.96;
}

.alamin-play-badge-img {
    display: block;
    width: 160px;
    height: auto;
    max-width: 100%;
    border-radius: 10px;
}

.alamin-footer-app-details-link {
    color: #cbd5e1 !important;
    font-size: 0.84rem;
    font-weight: 600;
    text-decoration: underline !important;
    text-underline-offset: 4px;
}

.alamin-footer-app-details-link:hover {
    color: #38bdf8 !important;
}

/* Homepage Hero App Button */
.btn-hero-app {
    background: #002d42 !important;
    color: #fde68a !important;
    border: 1.5px solid rgba(235, 182, 39, 0.65) !important;
    font-weight: 700 !important;
    padding: 11px 24px !important;
    border-radius: 50px !important;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    font-size: 1.02rem;
    text-decoration: none !important;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.18);
    transition: background-color 0.25s ease, border-color 0.25s ease, color 0.25s ease, transform 0.25s ease;
}

.btn-hero-app:hover,
.btn-hero-app:focus-visible {
    background: #001f2e !important;
    color: #ebb627 !important;
    border-color: #ebb627 !important;
    transform: translateY(-2px);
}

/* Homepage Android App Showcase Section */
.alamin-home-app-section {
    background: linear-gradient(135deg, #003956 0%, #005078 55%, #08749e 100%);
    color: #ffffff;
    padding: 4rem 0;
    position: relative;
    overflow-x: clip;
    direction: rtl;
}

.alamin-home-app-grid {
    display: grid;
    grid-template-columns: 1.15fr 0.85fr;
    gap: 2.5rem;
    align-items: center;
}

.alamin-home-app-grid > * {
    min-width: 0;
}

/* Balance 4-card Homepage Features Grid (avoid 3+1 orphan row on desktop) */
@media (min-width: 1200px) {
    .features-section .features-grid {
        grid-template-columns: repeat(4, minmax(0, 1fr));
        gap: 1.5rem;
    }
}

@media (min-width: 768px) and (max-width: 1199.98px) {
    .features-section .features-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

.alamin-home-app-pill {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 6px 16px;
    border-radius: 999px;
    background: rgba(235, 182, 39, 0.16);
    border: 1px solid rgba(235, 182, 39, 0.45);
    color: #fde68a;
    font-size: 0.88rem;
    font-weight: 700;
    margin-bottom: 1rem;
}

.alamin-home-app-title {
    font-size: 2.2rem;
    font-weight: 800;
    color: #ffffff;
    margin-bottom: 1rem;
    line-height: 1.3;
}

.alamin-home-app-title span {
    color: #ebb627;
}

.alamin-home-app-desc {
    font-size: 1.06rem;
    line-height: 1.8;
    color: #e2f1f8;
    margin-bottom: 1.5rem;
}

.alamin-home-app-points {
    list-style: none;
    padding: 0;
    margin: 0 0 1.85rem 0;
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 0.85rem 1rem;
}

.alamin-home-app-points li {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 0.95rem;
    font-weight: 600;
    color: #ffffff;
    background: rgba(255, 255, 255, 0.08);
    border: 1px solid rgba(255, 255, 255, 0.14);
    border-radius: 12px;
    padding: 10px 12px;
}

.alamin-home-app-point-mark {
    width: 24px;
    height: 24px;
    border-radius: 50%;
    background: #ebb627;
    color: #002d42;
    font-size: 0.8rem;
    font-weight: 900;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.alamin-home-app-actions {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 14px;
}

.alamin-home-app-details-btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 12px 22px;
    border-radius: 999px;
    background: #ebb627;
    color: #002d42 !important;
    font-weight: 800;
    font-size: 0.95rem;
    text-decoration: none !important;
    box-shadow: 0 6px 20px rgba(235, 182, 39, 0.35);
    transition: background-color 0.25s ease, transform 0.25s ease;
}

.alamin-home-app-details-btn:hover {
    background: #d9a41a;
    color: #001d2b !important;
    transform: translateY(-2px);
}

.alamin-home-app-phones {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: auto;
    padding: 10px 0;
    max-width: 100%;
    overflow: visible;
}

.alamin-home-phone-back {
    display: block;
    width: 180px;
    max-width: 46%;
    height: auto !important;
    aspect-ratio: 640 / 1138;
    border-radius: 22px;
    border: 4px solid rgba(255, 255, 255, 0.78);
    box-shadow: 0 18px 40px rgba(0, 18, 28, 0.4);
    transform: rotate(5deg);
    margin-inline-end: -34px;
    opacity: 0.95;
}

.alamin-home-phone-front {
    display: block;
    width: 220px;
    max-width: 56%;
    height: auto !important;
    aspect-ratio: 640 / 1138;
    border-radius: 26px;
    border: 4px solid #ebb627;
    box-shadow: 0 24px 50px rgba(0, 18, 28, 0.5);
    position: relative;
    z-index: 2;
}

/* Profile Page Compact App Card */
.alamin-profile-app-card {
    background: linear-gradient(135deg, #f0f8fc 0%, #ffffff 100%);
    border: 1px solid #cce3ef;
    border-radius: 1rem;
    padding: 1.35rem;
    box-shadow: 0 4px 16px rgba(0, 80, 120, 0.08);
    margin-top: 1.25rem;
}

.alamin-profile-app-header {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 0.85rem;
}

.alamin-profile-app-header img {
    width: 52px;
    height: 52px;
    border-radius: 14px;
    flex-shrink: 0;
    box-shadow: 0 4px 10px rgba(0, 80, 120, 0.16);
}

.alamin-profile-app-title {
    font-size: 1rem;
    font-weight: 800;
    color: #003a57;
    margin: 0 0 2px 0;
}

.alamin-profile-app-sub {
    font-size: 0.78rem;
    color: #475569;
    font-weight: 600;
}

.alamin-profile-app-text {
    font-size: 0.88rem;
    line-height: 1.65;
    color: #334155;
    margin-bottom: 1rem;
}

.alamin-profile-app-actions {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 10px;
}

.alamin-profile-app-link {
    font-size: 0.85rem;
    font-weight: 700;
    color: #005078 !important;
    text-decoration: underline !important;
    text-underline-offset: 3px;
}

/* Zero transform on SVGs across all promo components */
.alamin-smart-banner svg,
.alamin-footer-app-box svg,
.alamin-home-app-section svg,
.alamin-profile-app-card svg {
    transform: none !important;
}

@media (max-width: 991.98px) {
    .alamin-home-app-grid {
        grid-template-columns: 1fr;
        text-align: center;
    }

    .alamin-home-app-actions {
        justify-content: center;
    }

    .alamin-home-app-phones {
        min-height: auto;
        padding: 8px 0;
    }
}

@media (max-width: 768px) {
    .alamin-home-app-section .container {
        padding-left: 16px !important;
        padding-right: 16px !important;
        margin-left: auto !important;
        margin-right: auto !important;
    }
}

@media (max-width: 640px) {
    .alamin-smart-banner {
        padding: 7px 10px;
    }

    .alamin-smart-banner__icon {
        width: 38px;
        height: 38px;
    }

    .alamin-smart-banner__title {
        font-size: 0.86rem;
    }

    .alamin-smart-banner__subtitle {
        font-size: 0.72rem;
    }

    .alamin-smart-banner__cta {
        padding: 6px 12px;
        font-size: 0.8rem;
    }

    .alamin-home-app-section {
        padding: 3rem 0;
    }

    .alamin-home-app-title {
        font-size: 1.65rem;
    }

    .alamin-home-app-points {
        grid-template-columns: 1fr;
        text-align: right;
    }

    .alamin-home-app-phones {
        min-height: auto;
        padding: 6px 0;
    }

    .alamin-home-phone-back {
        width: 124px;
        margin-inline-end: -24px;
        transform: rotate(4deg);
    }

    .alamin-home-phone-front {
        width: 150px;
    }
}
