/* ==============================
   مركز أوتيزم - النظام الحديث
   Profile Aesthetic & Redesign
   ============================== */

:root {
    --primary-blue: #091e3b; /* Deep Navy Text */
    --primary-bg: #091e3b;   /* Deep Navy Backgrounds */
    --secondary-blue: #2563eb; /* Vivid Blue */
    --light-blue: #eff6ff; /* Background Blue */
    --accent-blue: #3b82f6; 
    --white: #ffffff;
    --text-dark: #0f172a; 
    --text-muted: #64748b;
    --border-color: #e2e8f0;
    --danger: #ef4444;
    --success: #10b981;
    --success-bg: #ecfdf5;
    --whatsapp: #25d366;
    --shadow-sm: 0 4px 6px -1px rgba(0, 0, 0, 0.05);
    --shadow-md: 0 10px 25px -5px rgba(0, 0, 0, 0.1);
    --shadow-lg: 0 25px 50px -12px rgba(9, 30, 59, 0.25);
}

body.dark-theme {
    --primary-blue: #e2e8f0; /* Text gets light */
    --primary-bg: #0f172a;   /* Backgrounds stay dark */
    --secondary-blue: #60a5fa; 
    --light-blue: #0f172a; /* Deep Slate Background */
    --accent-blue: #3b82f6; 
    --white: #1e293b; /* Slate Card Background */
    --text-dark: #f8fafc; 
    --text-muted: #94a3b8;
    --border-color: #334155;
    --success-bg: #064e3b;
    --shadow-sm: 0 4px 6px -1px rgba(0, 0, 0, 0.5);
    --shadow-md: 0 10px 25px -5px rgba(0, 0, 0, 0.6);
    --shadow-lg: 0 25px 50px -12px rgba(0, 0, 0, 0.8);
}

* { margin: 0; padding: 0; box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
    font-family: 'Cairo', sans-serif;
    background-color: var(--white);
    color: var(--text-dark);
    direction: rtl;
    line-height: 1.7;
    overflow-x: hidden;
}

.container { max-width: 1200px; margin: 0 auto; padding: 20px; }

/* -----------------------------
   Hero Section (Profile Look)
   ----------------------------- */
.hero-section {
    display: flex;
    align-items: center;
    justify-content: space-between;
    min-height: 90vh;
    padding: 2rem 8%;
    gap: 2rem;
    background: linear-gradient(135deg, var(--white) 0%, var(--light-blue) 100%);
    position: relative;
    overflow: hidden;
}

/* Background blob */
.hero-section::before {
    content: '';
    position: absolute;
    top: -10%; left: -5%;
    width: 600px; height: 600px;
    background: radial-gradient(circle, rgba(37, 99, 235, 0.1) 0%, transparent 70%);
    border-radius: 50%;
    z-index: 0;
}

.hero-content {
    flex: 1;
    max-width: 600px;
    z-index: 10;
}

.hero-badge {
    display: inline-block;
    padding: 6px 16px;
    background: rgba(37, 99, 235, 0.1);
    color: var(--secondary-blue);
    border-radius: 30px;
    font-weight: 700;
    font-size: 1rem;
    margin-bottom: 20px;
}

.hero-title {
    font-size: 4.5rem;
    font-weight: 900;
    color: var(--primary-blue);
    line-height: 1.1;
    margin-bottom: 10px;
    letter-spacing: -2px;
}

.hero-subtitle {
    font-size: 1.6rem;
    color: var(--secondary-blue);
    font-weight: 700;
    margin-bottom: 25px;
}

.hero-desc {
    font-size: 1.15rem;
    color: var(--text-muted);
    font-weight: 600;
    margin-bottom: 40px;
    max-width: 500px;
}

.hero-image-wrapper {
    flex: 1;
    display: flex;
    justify-content: flex-end;
    position: relative;
    z-index: 10;
}

/* Big prominent image */
.hero-image {
    width: 100%;
    max-width: 550px;
    height: auto;
    object-fit: contain;
    border-radius: 30px;
    box-shadow: var(--shadow-lg);
    border: 10px solid var(--white);
    background: var(--light-blue);
    transform: rotate(2deg);
    transition: transform 0.5s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.hero-image:hover {
    transform: rotate(0deg) scale(1.02);
}

/* -----------------------------
   Info Cards
   ----------------------------- */
.info-section {
    background-color: var(--primary-bg);
    padding: 3rem 0;
    margin-top: -60px; /* Overlap with hero */
    position: relative;
    z-index: 20;
    border-radius: 40px 40px 0 0;
}

.info-cards {
    display: flex;
    justify-content: space-around;
    flex-wrap: wrap;
    gap: 20px;
}

.info-card {
    display: flex;
    align-items: center;
    gap: 15px;
    color: #ffffff;
    flex: 1;
    min-width: 280px;
}

.info-card .info-icon {
    width: 60px; height: 60px;
    background: rgba(255,255,255,0.1);
    border-radius: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.8rem;
    color: #ffffff;
}

.info-card h3 { font-size: 1.1rem; color: #ffffff; margin: 0; }
.info-card p { font-size: 0.9rem; color: rgba(255,255,255,0.7); margin: 0; }

/* -----------------------------
   General Sections
   ----------------------------- */
.section-header {
    text-align: center;
    margin: 5rem 0 3rem;
}

.section-title {
    font-size: 2.8rem;
    color: var(--primary-blue);
    font-weight: 900;
}

.section-header p {
    font-size: 1.1rem;
    color: var(--text-muted);
}

/* -----------------------------
   Programs Grid
   ----------------------------- */
.programs-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
    gap: 2rem;
}

.program-card {
    background: var(--white);
    border: 1px solid var(--border-color);
    border-radius: 20px;
    padding: 2rem;
    box-shadow: var(--shadow-sm);
    transition: all 0.3s ease;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
}

.program-card:hover {
    box-shadow: var(--shadow-md);
    border-color: var(--accent-blue);
    transform: translateY(-5px);
}

.program-card h3 {
    font-size: 1.4rem;
    color: var(--primary-blue);
    margin-bottom: 20px;
    display: flex;
    align-items: center;
    gap: 10px;
}

.program-card h3 i { color: var(--secondary-blue); }

.program-price {
    align-self: flex-start;
    background: var(--light-blue);
    color: var(--secondary-blue);
    font-weight: 800;
    padding: 8px 16px;
    border-radius: 10px;
    font-size: 1.1rem;
}

/* -----------------------------
   Booking Form
   ----------------------------- */
.booking-section {
    padding-bottom: 4rem;
}

.form-card {
    background: var(--white);
    padding: 3rem;
    border-radius: 24px;
    box-shadow: var(--shadow-lg);
    max-width: 800px;
    margin: 0 auto;
    border: 1px solid var(--border-color);
}

.form-row {
    display: flex;
    gap: 20px;
}

.form-row .form-group { flex: 1; }

.form-group { margin-bottom: 1.5rem; }

label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 700;
    color: var(--primary-blue);
    font-size: 0.95rem;
}

input, select, textarea {
    width: 100%;
    padding: 1rem 1.2rem;
    border: 2px solid var(--border-color);
    border-radius: 12px;
    font-family: inherit;
    font-size: 1rem;
    background: var(--light-blue);
    color: var(--text-dark);
    transition: all 0.3s;
}

textarea {
    resize: vertical;
}

/* Hide number arrows */
input[type=number]::-webkit-inner-spin-button, 
input[type=number]::-webkit-outer-spin-button { 
  -webkit-appearance: none; 
  appearance: none;
  margin: 0; 
}
input[type=number] {
  -moz-appearance: textfield; 
  appearance: textfield;
}

input:focus, select:focus, textarea:focus {
    outline: none;
    border-color: var(--secondary-blue);
    background: var(--white);
    box-shadow: 0 0 0 4px rgba(37, 99, 235, 0.1);
}

.btn {
    display: inline-block;
    padding: 1rem 2rem;
    border: none;
    border-radius: 12px;
    font-family: inherit;
    font-size: 1.1rem;
    font-weight: 800;
    cursor: pointer;
    transition: all 0.3s;
    text-align: center;
    text-decoration: none;
}

.btn-primary {
    background: var(--secondary-blue);
    color: #ffffff;
    box-shadow: 0 4px 15px rgba(37, 99, 235, 0.3);
}

.btn-primary:hover {
    background: var(--primary-bg);
    transform: translateY(-2px);
    color: #ffffff;
}

.btn-whatsapp {
    background: var(--whatsapp);
    color: #ffffff;
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 12px;
    width: 100%;
    margin-top: 20px;
}

.btn-whatsapp:hover {
    background: #1EBE57;
    transform: translateY(-2px);
}

/* Loader */
.loader { display: none; border: 4px solid var(--border-color); border-top: 4px solid var(--secondary-blue); border-radius: 50%; width: 40px; height: 40px; animation: spin 1s linear infinite; margin: 30px auto; }
@keyframes spin { 0% { transform: rotate(0deg); } 100% { transform: rotate(360deg); } }

/* Toast */
.toast { position: fixed; bottom: -100px; left: 50%; transform: translateX(-50%); background: var(--success); color: white; padding: 1rem 2rem; border-radius: 30px; font-weight: bold; transition: bottom 0.4s; z-index: 1000; box-shadow: 0 10px 25px rgba(16, 185, 129, 0.4); }
.toast.show { bottom: 30px; }

/* Theme Button */
.theme-btn { background: var(--light-blue); border: 1px solid var(--border-color); color: var(--text-muted); border-radius: 50%; width: 45px; height: 45px; cursor: pointer; display: flex; justify-content: center; align-items: center; transition: all 0.3s; font-size: 1.1rem; }
.theme-btn:hover { background: var(--white); transform: translateY(-2px); box-shadow: var(--shadow-md); color: var(--secondary-blue); }

/* Footer */
footer { text-align: center; padding: 3rem 1rem; background: var(--light-blue); color: var(--text-muted); font-size: 0.95rem; }
.admin-link { color: var(--secondary-blue); text-decoration: none; font-weight: bold; margin-top: 15px; display: inline-block; padding: 8px 20px; border-radius: 20px; border: 1px solid var(--secondary-blue); }
.admin-link:hover { background: var(--secondary-blue); color: var(--white); }

/* Responsive Media Queries */
@media (max-width: 991px) {
    .hero-section { 
        flex-direction: column; 
        text-align: center; 
        padding: 6rem 5% 4rem; 
        justify-content: flex-start;
        min-height: auto;
    }
    .hero-content { display: flex; flex-direction: column; align-items: center; width: 100%; }
    .hero-title { font-size: 3.5rem; width: 100%; }
    .hero-subtitle { font-size: 1.4rem; width: 100%; }
    .hero-desc { margin: 0 auto 30px; width: 100%; max-width: 100%; }
    .hero-image-wrapper { margin-top: 40px; justify-content: center; width: 100%; }
    .hero-image { transform: rotate(0); width: 80%; max-width: 400px; }
}

@media (max-width: 768px) {
    h1, h2, h3 { line-height: 1.2; }
    .hero-section { padding: 4rem 5% 3rem; }
    .hero-title { font-size: 2.4rem; letter-spacing: -1px; }
    .hero-subtitle { font-size: 1.1rem; margin-bottom: 20px; }
    .hero-desc { font-size: 1rem; padding: 0 10px; }
    
    .info-section { border-radius: 0; margin-top: 0; padding: 2rem 5%; }
    .info-cards { flex-direction: column; gap: 15px; }
    .info-card { flex-direction: row; text-align: right; padding: 10px; background: rgba(255,255,255,0.05); border-radius: 12px; }
    .info-card .info-icon { width: 45px; height: 45px; font-size: 1.2rem; }
    
    .section-header { margin: 3rem 0 2rem; }
    .section-title { font-size: 1.8rem; }
    
    .programs-grid { grid-template-columns: 1fr; gap: 1rem; }
    .program-card { padding: 1.5rem; }
    
    .form-row { flex-direction: column; gap: 0; }
    .form-card { padding: 1.5rem 1rem; border-radius: 16px; }
    .btn { padding: 0.8rem 1.2rem; font-size: 1rem; }
    
    .hero-buttons { width: 100%; display: flex; justify-content: center; }
    .hero-buttons .btn { width: 90%; }
}

/* Removed legacy flatpickr aesthetic modifications as we transitioned to a premium custom theme */


/* ==============================
   SweetAlert2 Customizations
   ============================== */
.swal2-popup {
    background: var(--white) !important;
    color: var(--text-dark) !important;
    border-radius: 20px !important;
    border: 1px solid var(--border-color) !important;
}
.swal2-title {
    color: var(--primary-blue) !important;
}
.swal2-html-container {
    color: var(--text-dark) !important;
}

/* ==============================
   Native Select (Patient List) Customizations
   ============================== */
select[size] {
    appearance: none;
    -webkit-appearance: none;
    background-color: var(--white);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    padding: 8px;
    font-family: inherit;
    color: var(--text-dark);
    font-size: 1rem;
    box-shadow: var(--shadow-sm);
    outline: none;
}
select[size]:focus {
    border-color: var(--secondary-blue);
    box-shadow: 0 0 0 3px rgba(37,99,235,0.1);
}
select[size] option {
    padding: 12px 15px;
    margin-bottom: 5px;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
}
select[size] option:hover {
    background-color: rgba(37,99,235, 0.05);
}
select[size] option:checked {
    background-color: var(--secondary-blue) !important;
    color: #ffffff !important;
    font-weight: 700;
}
/* ==============================
   Custom Scrollbar (Global & Smooth)
   ============================== */
::-webkit-scrollbar {
    width: 6px;
    height: 6px;
}
::-webkit-scrollbar-track {
    background: transparent;
}
::-webkit-scrollbar-thumb {
    background-color: rgba(148, 163, 184, 0.4);
    border-radius: 10px;
}
::-webkit-scrollbar-thumb:hover {
    background-color: rgba(148, 163, 184, 0.7);
}

/* ==============================
   SweetAlert2 Global Font Override
   ============================== */
.swal2-container,
.swal2-popup,
.swal2-title,
.swal2-html-container,
.swal2-confirm,
.swal2-cancel,
.swal2-actions button {
    font-family: 'Cairo', sans-serif !important;
}