/* mobile-modern.css - GRAPHIC & LAYOUT MASTERPIECE */

:root {
    --brand:       #0B5FA5;
    --brand-hover: #084A82;
    --brand-deep:  #14146E;
    --brand-light: #DCE9F5;
    --red:         #8A6A16;
    --gold:        #E8B23D;
    --cream:       #EAF3FF;
    --bg:          #F5F9FF;
    --heading:     #0D315D;
    --text:        #102A43;
    --muted:       #526B85;
    --border:      #C5D7E8;

    --radius-sm: 12px;
    --radius-md: 20px;
    --radius-lg: 30px;
    --radius-xl: 40px;
    --radius-pill: 99px;

    --shadow-card: 0 20px 40px rgba(20, 20, 110, 0.08);
    --shadow-float: 0 15px 35px rgba(11, 95, 165, 0.25);
}

body.dark-theme {
    --brand-light: #163F6A;
    --shadow-card: 0 20px 40px rgba(0, 0, 0, 0.3);
    --shadow-float: 0 15px 35px rgba(59, 158, 232, 0.22);
}

body.dark-theme .login-box,
body.dark-theme .signup-box,
body.dark-theme .pay-row,
body.dark-theme .grade-row,
body.dark-theme .msg-row,
body.dark-theme .pillar,
body.dark-theme .approach-item,
body.dark-theme .contact-item {
    background: var(--cream) !important;
    border-color: var(--border) !important;
}

@keyframes slideUpFade {
    0% { opacity: 0; transform: translateY(40px); }
    100% { opacity: 1; transform: translateY(0); }
}

body {
    background: var(--bg) !important;
    font-family: 'Inter', system-ui, -apple-system, sans-serif !important;
    color: var(--text) !important;
    -webkit-font-smoothing: antialiased;
}

/* ── BUTTONS & INPUTS ── */
.btn-submit, .btn-primary {
    border-radius: var(--radius-pill) !important;
    background: linear-gradient(135deg, var(--brand) 0%, #084A82 100%) !important;
    color: #FFFFFF !important;
    border: none !important;
    box-shadow: var(--shadow-float) !important;
    transition: all 0.3s cubic-bezier(0.34, 1.56, 0.64, 1) !important;
    font-weight: 700 !important;
    text-transform: uppercase !important;
    letter-spacing: 0.05em !important;
    padding: 1.1rem 2.5rem !important;
}

.btn-submit:hover, .btn-primary:hover {
    transform: translateY(-4px) scale(1.02) !important;
    box-shadow: 0 20px 40px rgba(11, 95, 165, 0.35) !important;
}

/* Feedback must land the instant the pointer goes down, not just on hover-in.
   This has to win over the :hover lift above even while the pointer is still
   over the button (mousedown fires with :hover and :active both matching). */
.btn-submit:active, .btn-primary:active {
    transform: scale(0.97) !important;
    box-shadow: 0 6px 16px rgba(11, 95, 165, 0.3) !important;
    transition: transform 0.1s cubic-bezier(0.34, 1.56, 0.64, 1), box-shadow 0.1s ease !important;
}

input[type="text"], input[type="email"], input[type="password"], input[type="tel"], input[type="date"], select, textarea {
    border-radius: var(--radius-sm) !important;
    border: 2px solid transparent !important;
    background: var(--bg) !important;
    padding: 1.15rem 1.25rem !important;
    font-size: 1rem !important;
    color: var(--heading) !important;
    box-shadow: inset 0 2px 4px rgba(0,0,0,0.02) !important;
}

input:focus, select:focus, textarea:focus {
    outline: none !important;
    border-color: var(--brand) !important;
    box-shadow: 0 8px 25px rgba(11, 95, 165, 0.1) !important;
    transform: translateY(-2px);
}

label {
    font-size: 0.75rem !important;
    font-weight: 800 !important;
    color: var(--brand-deep) !important;
    text-transform: uppercase !important;
    letter-spacing: 0.1em !important;
    margin-bottom: 0.6rem !important;
}

/* ── GRAPHIC HERO OVERLAYS (DESKTOP & MOBILE) ── */
.panel-left, .page-header {
    position: relative;
    background: linear-gradient(135deg, var(--brand-deep) 0%, #084A82 100%) !important;
    overflow: visible !important;
}

.panel-left::before, .page-header::before {
    content: '' !important;
    position: absolute !important;
    inset: 0 !important;
    border-radius: inherit !important;
    overflow: hidden !important;
    background-image: repeating-linear-gradient(to bottom, transparent 0, transparent 27px, rgba(255,255,255,0.07) 27px, rgba(255,255,255,0.07) 28px) !important;
    background-size: 100% 28px !important;
    opacity: 0.8 !important;
    z-index: 0 !important;
}

/* Beautiful glow effect behind arabic text */
.panel-arabic {
    position: relative;
    z-index: 1;
    text-shadow: 0 4px 20px rgba(0,0,0,0.4) !important;
}
.panel-arabic::after {
    content: '';
    position: absolute;
    top: 50%; left: 50%; transform: translate(-50%, -50%);
    width: 150px; height: 150px;
    background: radial-gradient(circle, rgba(255,255,255,0.15) 0%, transparent 70%);
    z-index: -1;
}

.panel-left > *, .page-header > * {
    position: relative !important;
    z-index: 1 !important;
}

/* .page-header's background is dark navy at every width (see rule above),
   so its text needs the light treatment at every width too, not just mobile. */
.page-header .label {
    color: rgba(255,255,255,0.7) !important;
}

.page-header .page-title {
    color: #FFFFFF !important;
    text-shadow: 0 4px 15px rgba(0,0,0,0.2) !important;
}

.page-header .page-subtitle {
    color: rgba(255,255,255,0.8) !important;
}

/* ── OVERLAPPING CARDS DESKTOP ── */
.login-box, .signup-box {
    background: #FFFFFF !important;
    border-radius: var(--radius-xl) !important;
    box-shadow: var(--shadow-card) !important;
    border: none !important;
    padding: 3rem !important;
    max-width: 480px !important;
    animation: slideUpFade 0.6s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

/* ── MOBILE MASTERPIECE ── */
@media (max-width: 768px) {
    
    body {
        display: flex !important;
        flex-direction: column !important;
        min-height: 100vh !important;
    }

    /* Dramatic Curved Hero */
    .panel-left {
        display: flex !important;
        flex-direction: column !important;
        padding: 5rem 1.5rem 7rem !important;
        text-align: center !important;
        align-items: center !important;
        justify-content: center !important;
        border-radius: 0 0 40px 40px !important;
        box-shadow: 0 15px 40px rgba(0,0,0,0.2) !important;
    }

    .panel-arabic {
        font-size: 3.5rem !important;
        color: #FFFFFF !important;
        margin-bottom: 1.5rem !important;
        line-height: 1.2 !important;
    }

    .panel-tagline { font-size: 1rem !important; color: #FFFFFF !important; letter-spacing: 0.25em !important; font-weight: 600 !important; }
    .panel-quote { display: none !important; }

    .panel-right {
        padding: 0 1.25rem 5rem !important;
        margin-top: -5.5rem !important; /* Massive overlap */
        z-index: 10 !important;
        background: transparent !important;
    }

    .login-box, .signup-box {
        padding: 3rem 1.5rem !important;
    }

    .mobile-brand { display: none !important; }

    /* ── DASHBOARD PREMIUM ── */
    .page-header {
        padding: 4rem 1.5rem 2rem !important;
        text-align: center !important;
        border-radius: 0 0 40px 40px !important;
        box-shadow: 0 15px 40px rgba(0,0,0,0.2) !important;
    }

    .page-header .label {
        font-size: 0.85rem !important;
    }

    .page-title {
        font-size: 3rem !important;
        margin-top: 0.5rem !important;
        margin-bottom: 0.5rem !important;
    }

    .page-subtitle { font-size: 1.05rem !important; }

    /* Credit Card Style Pricing Summary */
    .pricing-summary {
        display: flex !important;
        flex-direction: row !important;
        background: linear-gradient(135deg, var(--brand) 0%, var(--brand-deep) 100%) !important;
        border-radius: var(--radius-lg) !important;
        box-shadow: 0 20px 40px rgba(11, 95, 165, 0.3) !important;
        margin-top: 2rem !important;
        margin-bottom: -5rem !important; /* Bleed out of the bottom of page-header */
        position: relative;
        z-index: 10;
        width: calc(100% - 2.5rem) !important;
        margin-left: auto !important;
        margin-right: auto !important;
        border: 1px solid rgba(255,255,255,0.15) !important;
        padding: 1.5rem 0 !important;
        animation: slideUpFade 0.7s cubic-bezier(0.16, 1, 0.3, 1) forwards;
        overflow: hidden !important;
    }

    /* Abstract shapes inside the credit card */
    .pricing-summary::before {
        content: ''; position: absolute; top: -50px; right: -30px;
        width: 150px; height: 150px;
        background: radial-gradient(circle, rgba(255,255,255,0.1) 0%, transparent 70%);
        border-radius: 50%;
    }
    .pricing-summary::after {
        content: ''; position: absolute; bottom: -30px; left: -20px;
        width: 100px; height: 100px;
        background: radial-gradient(circle, rgba(255,255,255,0.08) 0%, transparent 70%);
        border-radius: 50%;
    }

    .pricing-summary .summary-stat { 
        flex: 1 1 0% !important; /* Force exact 50% width */
        min-width: 0 !important; /* Prevent text from forcing column to expand beyond 50% */
        border: none !important; 
        padding: 0 0.5rem !important; 
        margin: 0 !important; 
        text-align: center !important;
        display: flex !important;
        flex-direction: column !important;
        justify-content: center !important;
        align-items: center !important;
    }
    .pricing-summary .summary-stat:first-child {
        border-right: 1px solid rgba(255,255,255,0.15) !important;
    }
    .pricing-summary .summary-label { 
        color: rgba(255,255,255,0.7) !important; 
        font-size: 0.55rem !important; 
        letter-spacing: 0 !important;
        margin-bottom: 0.5rem !important; 
        white-space: normal !important;
        line-height: 1.2 !important;
        word-break: break-word !important;
    }
    .pricing-summary .summary-value { color: #FFFFFF !important; font-size: 2.2rem !important; text-shadow: 0 2px 5px rgba(0,0,0,0.2) !important; }
    .pricing-note { display: none !important; } /* Hide text below credit card for cleaner look */

    /* ── AVATAR OVERLAP CARDS ── */
    .children-grid {
        padding-top: 2rem !important;
    }

    .child-card {
        position: relative !important;
        margin-top: 3rem !important; /* Space for avatar */
        padding: 3.5rem 1.5rem 2rem !important;
        border-radius: var(--radius-md) !important;
        border: none !important;
        background: #FFFFFF !important;
        box-shadow: var(--shadow-card) !important;
        text-align: center !important;
        animation: slideUpFade 0.6s cubic-bezier(0.16, 1, 0.3, 1) forwards;
    }

    .child-photo-wrap {
        position: absolute !important;
        top: -40px !important;
        left: 50% !important;
        transform: translateX(-50%) !important;
        width: 80px !important;
        height: 80px !important;
        border-radius: 50% !important;
        background: #FFFFFF !important;
        padding: 6px !important;
        box-shadow: 0 10px 25px rgba(0,0,0,0.15) !important;
        z-index: 5 !important;
    }

    .child-photo, .child-photo-placeholder {
        width: 100% !important;
        height: 100% !important;
        border-radius: 50% !important;
        border: 1px solid var(--border) !important;
    }

    .child-photo-edit {
        width: 28px !important; height: 28px !important;
        bottom: 0 !important; right: 0 !important;
        box-shadow: 0 4px 10px rgba(0,0,0,0.2) !important;
    }

    .child-header { border: none !important; margin: 0 !important; padding: 0 !important; }
    .child-header h3 { font-size: 1.8rem !important; color: var(--brand-deep) !important; margin-bottom: 1rem !important; }

    .child-info {
        background: var(--bg) !important;
        border-radius: var(--radius-sm) !important;
        padding: 1.5rem !important;
        border: none !important;
        margin-top: 1rem !important;
    }

    .child-info p { margin-bottom: 0.75rem !important; }
    .child-info p:last-child { margin-bottom: 0 !important; }

    .status-badge {
        position: absolute !important;
        top: 1rem !important; right: 1rem !important;
        margin: 0 !important;
        width: auto !important;
        box-shadow: 0 4px 10px rgba(0,0,0,0.05) !important;
    }

    /* Lists to Stylish Rows */
    .pay-row, .grade-row, .msg-row {
        background: #FFFFFF !important;
        border: none !important;
        border-radius: var(--radius-sm) !important;
        padding: 1.25rem !important;
        box-shadow: 0 5px 15px rgba(0,0,0,0.04) !important;
        margin-bottom: 1rem !important;
        display: flex !important;
        flex-direction: row !important;
        align-items: center !important;
        justify-content: space-between !important;
    }

    .section-title {
        font-size: 2rem !important;
        margin-bottom: 0.5rem !important;
    }

    .section-header {
        border: none !important;
        padding-bottom: 0 !important;
        margin-bottom: 2rem !important;
    }

    /* Primary Action Button (Standard Flow) */
    .section-header .btn-primary {
        width: 100% !important;
        padding: 1.15rem !important;
        font-size: 1.1rem !important;
        box-shadow: 0 10px 25px rgba(11, 95, 165, 0.25) !important;
        border-radius: var(--radius-pill) !important;
        margin-top: 1rem !important;
    }

    .main { 
        padding-top: 6rem !important; /* Clear the overlapping pricing summary */
        padding-bottom: 7.5rem !important; 
    }
}


/* ── INDEX.HTML PUBLIC LANDING PAGE MOBILE WOW EFFECT ── */
@media (max-width: 1100px) {
    .hero {
        display: flex !important;
        flex-direction: column-reverse !important; /* Put Arabic header on top! */
        margin-top: 60px !important;
    }

    .hero-right {
        padding: 5rem 1.5rem 8rem !important; 
        text-align: center !important;
        align-items: center !important;
        justify-content: center !important;
        border-radius: 0 0 40px 40px !important;
        box-shadow: 0 15px 40px rgba(0,0,0,0.2) !important;
        position: relative;
        z-index: 1;
    }

    .hero-arabic-script {
        font-size: 4rem !important;
        text-shadow: 0 4px 20px rgba(0,0,0,0.4) !important;
        margin-bottom: 0.5rem !important;
        line-height: 1.2 !important;
    }

    .hero-arabic-label {
        font-size: 1rem !important;
        font-weight: 600 !important;
        letter-spacing: 0.3em !important;
        color: #FFFFFF !important;
    }

    .hero-left {
        margin-top: -6rem !important; /* Massive overlap */
        position: relative !important;
        z-index: 10 !important;
        background: #FFFFFF !important;
        border-radius: 24px !important;
        box-shadow: 0 20px 40px rgba(0, 30, 15, 0.1) !important;
        margin-left: 1.5rem !important;
        margin-right: 1.5rem !important;
        padding: 3.5rem 2rem !important;
        animation: slideUpFade 0.6s cubic-bezier(0.16, 1, 0.3, 1) forwards;
    }

    /* Make Landing page pricing cards POP */
    .pricing-card {
        border-radius: 24px !important;
        border: none !important;
        box-shadow: 0 15px 35px rgba(0,0,0,0.06) !important;
        background: #FFFFFF !important;
        margin-bottom: 2rem !important;
    }

    .enrollment-box {
        border-radius: 24px !important;
        box-shadow: 0 15px 35px rgba(0,0,0,0.06) !important;
        background: #FFFFFF !important;
    }

    .pillar, .approach-item, .contact-item {
        background: #FFFFFF !important;
        border-radius: 16px !important;
        padding: 2rem !important;
        margin-bottom: 1.5rem !important;
        box-shadow: 0 10px 25px rgba(0,0,0,0.04) !important;
        border: none !important;
    }
}


/* ── SMALL SCREENS OPTIMIZATION (Galaxy S8+, iPhone SE, etc. < 410px) ── */
@media (max-width: 410px) {
    /* Scale down massive typography */
    .panel-arabic { font-size: clamp(2.2rem, 10vw, 3.5rem) !important; }
    .hero-arabic-script { font-size: clamp(2.5rem, 11vw, 4rem) !important; }
    .page-title { font-size: clamp(2rem, 8vw, 3rem) !important; }
    .hero-arabic-label { font-size: 0.75rem !important; }
    
    /* Adjust Pricing Summary to prevent text crushing */
    .pricing-summary {
        padding: 1.5rem 0 !important;
        border-radius: 16px !important;
    }
    .pricing-summary .summary-label {
        font-size: 0.55rem !important;
        letter-spacing: 0 !important;
        padding: 0 !important;
        word-break: break-word !important;
    }
    .pricing-summary .summary-value {
        font-size: clamp(1.5rem, 7vw, 2.2rem) !important;
    }

    /* Reduce paddings to give more breathing room to content */
    .panel-left, .page-header, .hero-right {
        padding-left: 1rem !important;
        padding-right: 1rem !important;
    }
    
    .login-box, .signup-box, .hero-left, .child-card, .form-section, .enrollment-box, .pricing-card {
        padding: 2rem 1rem !important;
        margin-left: 1rem !important;
        margin-right: 1rem !important;
        width: calc(100% - 2rem) !important;
    }

    /* Fixed button adjust */
    .section-header .btn-primary {
        width: calc(100% - 2rem) !important;
        padding: 1.1rem !important;
        font-size: 1rem !important;
    }
}

@media (prefers-reduced-motion: reduce) {
    .login-box, .signup-box, .pricing-summary, .child-card, .hero-left {
        animation: none !important;
    }

    .btn-submit:hover, .btn-primary:hover,
    .btn-submit:active, .btn-primary:active {
        transform: none !important;
        transition: box-shadow 0.15s ease, background 0.15s ease !important;
    }
}
