﻿/* ==========================================================================
   Shared styles for the association inner pages (booking pages, about page)
   Matches the StartPage.aspx / Home.aspx design language.
   ========================================================================== */

@font-face {
    font-family: 'PT Bold Heading';
    src: url('../Fonts/PT Bold Heading.ttf') format('truetype');
}
@font-face {
    font-family: 'ArbFONTS';
    src: url('../Fonts/ArbFONTS-A-Google.ttf') format('truetype');
}

:root {
    --primary-color: #6366f1;
    --secondary-color: #4f46e5;
    --accent-color: #818cf8;
    --danger-color: #ef4444;
    --success-color: #10b981;
    --bg-light: #f8fafc;
    --bg-gradient: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    --bg-card: #ffffff;
    --text-dark: #1e293b;
    --text-light: #64748b;
    --shadow-xl: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
    --transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

* {
    scroll-behavior: smooth;
}

body {
    font-family: 'ArbFONTS', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    background: var(--bg-light);
    overflow-x: hidden;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

/* ------------------------------- School Header ------------------------- */
.school-header {
    background: linear-gradient(135deg, #7b68ee 0%, #9370db 50%, #ba55d3 100%);
    padding: 8px 0;
}

.school-header .container {
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(255, 255, 255, 0.95);
    border-radius: 50px;
    padding: 4px 20px;
    max-width: 95%;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    overflow: hidden;
}

.school-header .mf-brand {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 15px;
    direction: rtl;
    text-align: center;
    animation: brandSlide 6s ease-in-out infinite;
}

@keyframes brandSlide {
    0%, 100% { transform: translateX(-70px); }
    50% { transform: translateX(70px); }
}

.school-header .mf-brand img {
    width: 95px;
    height: 95px;
}

.school-header .mf-brand-text h1 {
    margin: 0;
    font-family: 'ArbFONTS', sans-serif;
    font-size: 1.65rem;
    font-weight: 800;
    color: #667eea;
    text-align: center;
}

.school-header .mf-brand-text p {
    margin: 0;
    font-size: 1rem;
    color: #64748b;
    font-weight: 500;
    text-align: center;
}

/* ------------------------------- Hero Section -------------------------- */
.cta-section {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    position: relative;
    padding: 55px 0;
    text-align: center;
    overflow: hidden;
}

.cta-section::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background:
        radial-gradient(circle at 20% 50%, rgba(255, 255, 255, 0.12) 0%, transparent 50%),
        radial-gradient(circle at 80% 80%, rgba(255, 255, 255, 0.08) 0%, transparent 50%);
}

.cta-section .container {
    position: relative;
    z-index: 1;
}

.hero-logo-circle {
    width: 140px;
    height: 140px;
    background: white;
    border-radius: 50%;
    margin: 0 auto 1.8rem;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 15px 50px rgba(0, 0, 0, 0.3);
    padding: 18px;
    animation: logoFloat 3s ease-in-out infinite;
    border: 6px solid rgba(255, 255, 255, 0.4);
}

.hero-logo-img {
    width: 100%;
    height: 100%;
    object-fit: contain;
}

@keyframes logoFloat {
    0%, 100% { transform: translateY(0) scale(1); }
    50% { transform: translateY(-15px) scale(1.05); }
}

.cta-section h1 {
    font-family: 'ArbFONTS', sans-serif;
    font-size: clamp(2rem, 5vw, 3.6rem);
    color: white;
    text-shadow:
        0 2px 10px rgba(0, 0, 0, 0.6),
        0 4px 20px rgba(0, 0, 0, 0.5),
        2px 2px 0 rgba(0, 0, 0, 0.3);
    margin-bottom: 1rem;
    font-weight: 900;
    letter-spacing: 2px;
    animation: fadeInDown 1s ease;
}

.cta-section p {
    font-family: 'ArbFONTS', sans-serif;
    font-size: clamp(1.1rem, 3vw, 2rem);
    color: white;
    text-shadow: 0 2px 8px rgba(0, 0, 0, 0.5), 1px 1px 0 rgba(0, 0, 0, 0.3);
    font-weight: 700;
    animation: fadeInUp 1s ease 0.3s both;
    letter-spacing: 1.5px;
    margin-bottom: 0;
}

@keyframes fadeInDown {
    from { opacity: 0; transform: translateY(-50px) scale(0.95); }
    to { opacity: 1; transform: translateY(0) scale(1); }
}

@keyframes fadeInUp {
    from { opacity: 0; transform: translateY(50px) scale(0.95); }
    to { opacity: 1; transform: translateY(0) scale(1); }
}

/* ------------------------------- Page Content -------------------------- */
.page-section {
    background: linear-gradient(180deg, #f8fafc 0%, #e0e7ff 100%);
    padding: 4rem 0;
    direction: rtl;
    flex: 1;
}

.page-card {
    background: white;
    border-radius: 24px;
    box-shadow: 0 20px 60px rgba(102, 126, 234, 0.15);
    border: 1px solid rgba(102, 126, 234, 0.1);
    padding: 2.5rem 2rem;
    position: relative;
    overflow: hidden;
}

.page-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 5px;
    background: linear-gradient(90deg, #667eea 0%, #764ba2 50%, #f093fb 100%);
}

.page-card h2 {
    font-family: 'ArbFONTS', sans-serif;
    font-size: clamp(1.5rem, 3.5vw, 2.2rem);
    font-weight: 800;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    margin-bottom: 1.2rem;
    text-align: center;
}

.page-card p {
    font-family: 'ArbFONTS', sans-serif;
    font-size: 1.1rem;
    color: var(--text-dark);
    line-height: 1.9;
}

.page-card .lead-muted {
    color: var(--text-light);
    text-align: center;
}

.page-icon {
    width: 110px;
    height: 110px;
    margin: 0 auto 1.5rem;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    box-shadow: 0 12px 30px rgba(102, 126, 234, 0.35);
}

.page-icon i {
    font-size: 3.2rem;
    color: white;
}

.back-link {
    font-family: 'ArbFONTS', sans-serif;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 50%, #f093fb 100%);
    color: white !important;
    text-decoration: none;
    border-radius: 14px;
    padding: 0.9rem 2.2rem;
    font-size: 1.1rem;
    font-weight: 700;
    box-shadow: 0 10px 30px rgba(102, 126, 234, 0.4);
    transition: var(--transition);
    margin-top: 1.5rem;
}

.back-link:hover {
    transform: translateY(-3px);
    box-shadow: 0 15px 40px rgba(102, 126, 234, 0.5);
    color: white !important;
}

/* ------------------------------- Booking Form --------------------------
   Matches the form styling used in Student_Data.aspx.
   ---------------------------------------------------------------------- */
.required {
    color: var(--danger-color) !important;
    font-weight: bold;
    font-size: 1em;
}

.section-title {
    font-family: 'ArbFONTS', sans-serif;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 50%, #f093fb 100%) !important;
    color: white !important;
    border-radius: 18px !important;
    padding: 1.3rem 2rem !important;
    font-size: clamp(1.1rem, 2.5vw, 1.6rem) !important;
    letter-spacing: 1.2px;
    box-shadow: 0 8px 25px rgba(102, 126, 234, 0.4) !important;
    border: none !important;
    position: relative;
    overflow: hidden;
}

.section-title i {
    filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.2));
}

.form-section {
    background: linear-gradient(135deg, #f8fafc 0%, #ffffff 100%) !important;
    border-radius: 20px !important;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05) inset !important;
    padding: 3rem 2.5rem !important;
    border: 1px solid rgba(102, 126, 234, 0.15);
    margin: 0 auto;
    width: 100%;
    direction: rtl;
}

.form-section .row {
    row-gap: 1.5rem;
}

.form-label {
    font-family: 'ArbFONTS', sans-serif;
    font-weight: 600 !important;
    color: var(--text-dark) !important;
    font-size: 1rem;
    margin-bottom: 0.7rem;
    display: block;
    transition: var(--transition);
    direction: rtl !important;
    text-align: right !important;
}

.form-control, .form-select {
    font-family: 'ArbFONTS', sans-serif;
    border: 2px solid #e2e8f0 !important;
    border-radius: 12px !important;
    padding: 1.1rem 1.4rem !important;
    font-size: 1.05rem !important;
    transition: var(--transition) !important;
    background: white;
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.05);
    min-height: 56px;
    direction: rtl !important;
    text-align: right !important;
}

.form-control:focus, .form-select:focus {
    border-color: #667eea !important;
    box-shadow: 0 0 0 4px rgba(102, 126, 234, 0.2) !important;
    outline: none !important;
    transform: translateY(-1px);
}

.form-control:hover, .form-select:hover {
    border-color: #764ba2 !important;
    box-shadow: 0 2px 8px rgba(102, 126, 234, 0.15);
}

.form-control::placeholder {
    color: #94a3b8;
    font-size: 0.98rem;
}

.form-hint {
    font-family: 'ArbFONTS', sans-serif;
    display: block;
    margin-top: 0.6rem;
    font-size: 0.85rem;
    color: var(--text-light);
}

.custom-btn {
    font-family: 'ArbFONTS', sans-serif;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 50%, #f093fb 100%) !important;
    border: none !important;
    border-radius: 16px !important;
    padding: 1rem 3rem !important;
    font-size: 1.1rem !important;
    font-weight: 700 !important;
    color: white !important;
    box-shadow: 0 10px 25px rgba(102, 126, 234, 0.4) !important;
    transition: var(--transition) !important;
    letter-spacing: 1px;
}

.custom-btn:hover {
    transform: translateY(-3px) scale(1.02) !important;
    box-shadow: 0 15px 35px rgba(102, 126, 234, 0.5) !important;
    color: white !important;
}

.custom-btn:active {
    transform: translateY(-1px) scale(0.98) !important;
}

.custom-btn-secondary {
    font-family: 'ArbFONTS', sans-serif;
    background: white !important;
    border: 2px solid #667eea !important;
    border-radius: 16px !important;
    padding: 1rem 2.25rem !important;
    font-size: 1.05rem !important;
    font-weight: 700 !important;
    color: #667eea !important;
    box-shadow: 0 6px 15px rgba(102, 126, 234, 0.15) !important;
    transition: var(--transition) !important;
    letter-spacing: 1px;
}

.custom-btn-secondary:hover {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%) !important;
    color: white !important;
    box-shadow: 0 10px 25px rgba(102, 126, 234, 0.4) !important;
    transform: translateY(-2px) scale(1.02) !important;
    border-color: transparent !important;
}

.custom-btn-view {
    font-family: 'ArbFONTS', sans-serif;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.6rem;
    background: rgba(255, 255, 255, 0.95) !important;
    border: 2px solid #475569 !important;
    border-radius: 16px !important;
    padding: 0.9rem 2rem !important;
    font-size: 1rem !important;
    font-weight: 700 !important;
    color: #334155 !important;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08) !important;
    transition: var(--transition) !important;
    letter-spacing: 1px;
}

.custom-btn-view:hover {
    background: #1e293b !important;
    color: white !important;
    box-shadow: 0 8px 20px rgba(30, 41, 59, 0.35) !important;
    transform: translateY(-2px) scale(1.02) !important;
    border-color: #1e293b !important;
}

.custom-btn-view i {
    font-size: 1.2rem;
}

/* ---------------------------- Partial Update Loading ------------------- */
.booking-loading {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 10;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 1rem;
    background: rgba(248, 250, 252, 0.8);
    backdrop-filter: blur(3px);
    -webkit-backdrop-filter: blur(3px);
    border-radius: 20px;
    font-family: 'ArbFONTS', sans-serif;
    font-size: 1.1rem;
    font-weight: 700;
    color: #667eea;
}

.booking-spinner {
    width: 52px;
    height: 52px;
    border: 5px solid rgba(102, 126, 234, 0.2);
    border-top-color: #667eea;
    border-radius: 50%;
    animation: bookingSpin 0.8s linear infinite;
}

@keyframes bookingSpin {
    to { transform: rotate(360deg); }
}

/* ---------------------------- Available Dates Grid --------------------- */
.date-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(104px, 1fr));
    gap: 0.85rem;
    direction: rtl;
}

.date-chip {
    font-family: 'ArbFONTS', sans-serif;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 0.15rem;
    text-decoration: none !important;
    background: white;
    border: 2px solid #e2e8f0;
    border-radius: 14px;
    padding: 0.85rem 0.5rem;
    color: var(--text-dark) !important;
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.05);
    transition: var(--transition);
}

.date-chip:hover {
    border-color: #764ba2;
    box-shadow: 0 6px 18px rgba(102, 126, 234, 0.22);
    transform: translateY(-2px);
}

.date-chip-week {
    font-size: 0.82rem;
    color: var(--text-light);
}

.date-chip-day {
    font-size: 1.55rem;
    font-weight: 800;
    line-height: 1.1;
    color: #4f46e5;
}

.date-chip-month {
    font-size: 0.82rem;
    color: var(--text-light);
}

.date-chip-selected {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border-color: #4f46e5;
    color: white !important;
    box-shadow: 0 10px 25px rgba(102, 126, 234, 0.45);
}

.date-chip-selected .date-chip-day,
.date-chip-selected .date-chip-week,
.date-chip-selected .date-chip-month {
    color: white;
}

.date-picked {
    font-family: 'ArbFONTS', sans-serif;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    background: rgba(102, 126, 234, 0.1);
    border: 1px solid rgba(102, 126, 234, 0.3);
    border-radius: 12px;
    padding: 0.7rem 1.1rem;
    margin-bottom: 1rem;
    font-size: 1.02rem;
    font-weight: 700;
    color: #4f46e5;
}

.form-alert {
    font-family: 'ArbFONTS', sans-serif;
    display: flex;
    align-items: flex-start;
    gap: 0.65rem;
    border-radius: 14px;
    padding: 1rem 1.2rem;
    margin-bottom: 1.5rem;
    font-size: 1.02rem;
    font-weight: 600;
    line-height: 1.8;
    text-align: right;
    direction: rtl;
}

.form-alert i {
    font-size: 1.3rem;
    line-height: 1.5;
}

.form-alert-success {
    background: rgba(16, 185, 129, 0.1);
    border: 1px solid rgba(16, 185, 129, 0.35);
    color: #047857;
}

.form-alert-error {
    background: rgba(239, 68, 68, 0.1);
    border: 2px solid rgba(220, 38, 38, 0.55);
    color: #991b1b;
    font-size: 1.1rem;
    font-weight: 700;
    padding: 1.1rem 1.4rem;
    box-shadow: 0 4px 12px rgba(220, 38, 38, 0.15);
}

/* ------------------------------- Responsive ---------------------------- */
/* نفس breakpoints المستخدمة في Student_Data.aspx علشان الفورم يبقى موحّد على كل المقاسات */

/* للشاشات الكبيرة جداً */
@media (min-width: 1400px) {
    .form-control, .form-select {
        padding: 1.15rem 1.5rem !important;
        font-size: 1.08rem !important;
        min-height: 58px;
    }
    .form-label {
        font-size: 1.05rem !important;
        margin-bottom: 0.75rem;
    }
    .form-section {
        padding: 3.5rem 3rem !important;
    }
}

/* للتابلت الكبير */
@media (min-width: 769px) and (max-width: 1024px) {
    .form-control, .form-select {
        padding: 1.05rem 1.3rem !important;
        font-size: 1.02rem !important;
        min-height: 54px;
    }
    .form-label {
        font-size: 1rem !important;
    }
    .form-section {
        padding: 2.5rem 2rem !important;
    }
    .form-alert {
        font-size: 1rem;
        padding: 1rem 1.2rem;
    }
}

@media (min-width: 1025px) and (max-width: 1399px) {
    .form-section {
        padding: 3rem 2.5rem !important;
    }
}

/* للتابلت والموبايل */
@media (max-width: 767.98px) {
    .form-section {
        padding: 1.5rem 1rem !important;
    }
    .section-title {
        padding: 1rem 1.2rem !important;
        font-size: 1rem !important;
    }
    .form-control, .form-select {
        padding: 1rem 1.1rem !important;
        font-size: 0.98rem !important;
        border-radius: 10px !important;
        min-height: 50px;
    }
    .form-label {
        font-size: 0.9rem !important;
        font-weight: 600 !important;
        margin-bottom: 0.4rem;
    }
    .form-alert {
        font-size: 0.95rem;
        padding: 0.9rem 1rem;
    }
    .custom-btn, .custom-btn-view, .custom-btn-secondary {
        padding: 0.9rem 2rem !important;
        font-size: 0.95rem !important;
    }
    .date-grid {
        grid-template-columns: repeat(auto-fill, minmax(84px, 1fr));
        gap: 0.6rem;
    }
    .date-chip-day {
        font-size: 1.3rem;
    }
}

/* للشاشات الصغيرة جداً */
@media (max-width: 480px) {
    .form-label {
        font-size: 0.85rem !important;
    }
    .form-control, .form-select {
        padding: 1rem 0.8rem !important;
        font-size: 0.9rem !important;
        min-height: 48px;
    }
    .form-hint {
        font-size: 0.78rem;
    }
    .custom-btn, .custom-btn-view, .custom-btn-secondary {
        padding: 0.85rem 1.6rem !important;
        font-size: 0.9rem !important;
        width: 100%;
    }
    .form-alert {
        font-size: 0.9rem;
        padding: 0.8rem 0.9rem;
    }
}

/* ------------------------------- Footer -------------------------------- */
.site-footer {
    background: linear-gradient(135deg, #1e293b 0%, #334155 50%, #475569 100%);
    padding: 2.5rem 0;
    position: relative;
    overflow: hidden;
    margin-top: auto;
    direction: rtl;
}

.site-footer::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: linear-gradient(90deg, #667eea 0%, #764ba2 50%, #f093fb 100%);
}

.site-footer-bottom {
    position: relative;
    z-index: 1;
}

.copyright-text {
    font-family: 'ArbFONTS', sans-serif;
    font-size: 1rem;
    color: rgba(255, 255, 255, 0.9);
    font-weight: 500;
    margin: 0;
}

.copyright-text strong {
    color: white;
    font-weight: 700;
    display: inline-block;
    margin-top: 0.35rem;
    direction: ltr;
}

.social-icon {
    display: flex;
    gap: 1rem;
    list-style: none;
    padding: 0;
    margin: 0;
    justify-content: center;
}

.social-icon-link {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 50px;
    height: 50px;
    background: rgba(255, 255, 255, 0.15);
    border: 2px solid rgba(255, 255, 255, 0.3);
    border-radius: 50%;
    color: white !important;
    font-size: 1.3rem;
    transition: var(--transition);
}

.social-icon-link:hover {
    transform: translateY(-5px) scale(1.15);
    border-color: white;
    background: white;
    box-shadow: 0 10px 30px rgba(102, 126, 234, 0.6);
    color: #667eea !important;
}

.back-top-icon {
    width: 50px;
    height: 50px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border-radius: 50%;
    color: white !important;
    transition: var(--transition);
    box-shadow: 0 4px 15px rgba(102, 126, 234, 0.4);
    font-size: 1.5rem;
}

.back-top-icon:hover {
    transform: translateY(-3px) scale(1.1);
    box-shadow: 0 8px 25px rgba(102, 126, 234, 0.6);
    color: white !important;
}

/* ------------------------------- Responsive ---------------------------- */
@media (max-width: 768px) {
    .school-header .container {
        padding: 4px 12px;
    }

    .school-header .mf-brand {
        gap: 10px;
        animation-name: brandSlideSmall;
    }

    @keyframes brandSlideSmall {
        0%, 100% { transform: translateX(-18px); }
        50% { transform: translateX(18px); }
    }

    .school-header .mf-brand img {
        width: 68px;
        height: 68px;
    }

    .school-header .mf-brand-text h1 {
        font-size: 1.15rem;
    }

    .cta-section {
        padding: 45px 0;
    }

    .hero-logo-circle {
        width: 115px;
        height: 115px;
        border: 5px solid rgba(255, 255, 255, 0.4);
    }

    .page-section {
        padding: 3rem 0;
    }

    .page-card {
        padding: 2rem 1.2rem;
        border-radius: 20px;
    }

    .page-icon {
        width: 90px;
        height: 90px;
    }

    .page-icon i {
        font-size: 2.6rem;
    }

    .social-icon-link {
        width: 45px;
        height: 45px;
        font-size: 1.1rem;
    }
}
