/* ======================================
   مجموعة مدارس رسالة الحياة — الأنماط الرئيسية
   ====================================== */

@import url('https://fonts.googleapis.com/css2?family=Cairo:wght@400;600;700;800;900&family=Poppins:wght@400;600;700;800&display=swap');

/* ---- CSS Variables ---- */
:root {
  --blue-dark:    #0D47A1;
  --blue-main:    #1565C0;
  --blue-bright:  #1976D2;
  --blue-light:   #42A5F5;
  --pink-main:    #E91E8C;
  --pink-dark:    #C2185B;
  --pink-light:   #FF4DB8;
  --yellow:       #FFD600;
  --yellow-dark:  #F9A825;
  --red:          #E53935;
  --white:        #FFFFFF;
  --off-white:    #F0F8FF;
  --text-dark:    #0D1B4B;
  --shadow-blue:  0 8px 32px rgba(13,71,161,0.35);
  --shadow-pink:  0 8px 32px rgba(233,30,140,0.35);
  --radius-sm:    10px;
  --radius-md:    18px;
  --radius-lg:    30px;
  --radius-xl:    50px;
}

/* ---- Reset & Base ---- */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

html {
  scroll-behavior: smooth;
  font-size: 16px;
}

body {
  font-family: 'Cairo', 'Poppins', Arial, sans-serif;
  direction: rtl;
  background: var(--blue-dark);
  color: var(--white);
  overflow-x: hidden;
  min-height: 100vh;
}

/* ---- Typography ---- */
h1, h2, h3, h4 { font-weight: 900; line-height: 1.2; }
h1 { font-size: clamp(2rem, 5vw, 3.5rem); }
h2 { font-size: clamp(1.6rem, 4vw, 2.5rem); }
h3 { font-size: clamp(1.2rem, 3vw, 1.8rem); }
p  { line-height: 1.7; font-size: 1rem; }

a { text-decoration: none; color: inherit; }
img { max-width: 100%; display: block; }

/* ---- Stars / Confetti decorations ---- */
.stars-bg {
  position: absolute;
  inset: 0;
  pointer-events: none;
  overflow: hidden;
  z-index: 0;
}
.stars-bg span {
  position: absolute;
  border-radius: 50%;
  animation: floatStar 6s ease-in-out infinite;
  opacity: 0.7;
}
.stars-bg .s1  { width:14px; height:14px; background:var(--yellow);    top:8%;  left:5%;  animation-delay:0s; }
.stars-bg .s2  { width:10px; height:10px; background:var(--pink-main); top:15%; left:90%; animation-delay:1s; }
.stars-bg .s3  { width:18px; height:18px; background:var(--yellow);    top:30%; left:8%;  animation-delay:2s; }
.stars-bg .s4  { width:8px;  height:8px;  background:var(--white);     top:50%; left:95%; animation-delay:0.5s; }
.stars-bg .s5  { width:12px; height:12px; background:var(--pink-light);top:70%; left:3%;  animation-delay:1.5s; }
.stars-bg .s6  { width:16px; height:16px; background:var(--yellow);    top:80%; left:88%; animation-delay:2.5s; }
.stars-bg .s7  { width:9px;  height:9px;  background:var(--white);     top:90%; left:50%; animation-delay:3s; }
.stars-bg .s8  { width:14px; height:14px; background:var(--pink-main); top:20%; left:50%; animation-delay:0.8s; }
.stars-bg .s9  { width:11px; height:11px; background:var(--yellow);    top:60%; left:70%; animation-delay:1.8s; }
.stars-bg .s10 { width:7px;  height:7px;  background:var(--white);     top:40%; left:30%; animation-delay:2.2s; }

/* Star shapes using clip-path */
.stars-bg .star {
  border-radius: 0;
  clip-path: polygon(50% 0%,61% 35%,98% 35%,68% 57%,79% 91%,50% 70%,21% 91%,32% 57%,2% 35%,39% 35%);
}

@keyframes floatStar {
  0%,100% { transform: translateY(0)   rotate(0deg)   scale(1); }
  50%      { transform: translateY(-18px) rotate(20deg) scale(1.15); }
}

/* ---- Navbar ---- */
.navbar {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 1000;
  background: rgba(13,71,161,0.97);
  backdrop-filter: blur(12px);
  border-bottom: 3px solid var(--yellow);
  padding: 0 2rem;
  height: 70px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  box-shadow: 0 4px 20px rgba(0,0,0,0.3);
}

.navbar .nav-brand {
  display: flex;
  align-items: center;
  gap: 12px;
}
.navbar .nav-brand img {
  width: 52px;
  height: 52px;
  border-radius: 50%;
  border: 2px solid var(--yellow);
  object-fit: cover;
}
.navbar .nav-brand .brand-text {
  display: flex;
  flex-direction: column;
  line-height: 1.2;
}
.navbar .nav-brand .brand-text span:first-child {
  font-size: 0.75rem;
  color: var(--yellow);
  font-weight: 700;
  letter-spacing: 1px;
}
.navbar .nav-brand .brand-text span:last-child {
  font-size: 1rem;
  font-weight: 900;
  color: var(--white);
}

.nav-links {
  display: flex;
  gap: 6px;
  list-style: none;
  align-items: center;
}
.nav-links a {
  font-weight: 700;
  font-size: 0.9rem;
  padding: 7px 14px;
  border-radius: var(--radius-xl);
  transition: all 0.3s;
  color: rgba(255,255,255,0.9);
}
.nav-links a:hover,
.nav-links a.active {
  background: var(--pink-main);
  color: var(--white);
  box-shadow: 0 4px 15px rgba(233,30,140,0.5);
}

.btn-nav-register {
  background: var(--yellow) !important;
  color: var(--text-dark) !important;
  font-weight: 900 !important;
  padding: 8px 18px !important;
  border-radius: var(--radius-xl) !important;
  box-shadow: 0 4px 15px rgba(255,214,0,0.5) !important;
  animation: pulse-yellow 2s ease-in-out infinite;
}
@keyframes pulse-yellow {
  0%,100% { box-shadow: 0 4px 15px rgba(255,214,0,0.5); }
  50%      { box-shadow: 0 4px 25px rgba(255,214,0,0.9); }
}

.hamburger {
  display: none;
  flex-direction: column;
  gap: 5px;
  cursor: pointer;
  padding: 5px;
}
.hamburger span {
  display: block;
  width: 28px; height: 3px;
  background: var(--white);
  border-radius: 3px;
  transition: all 0.3s;
}

/* ---- Section Titles ---- */
.section-title {
  text-align: center;
  margin-bottom: 3rem;
  position: relative;
  z-index: 1;
}
.section-title h2 {
  color: var(--white);
  text-shadow: 0 3px 10px rgba(0,0,0,0.3);
  margin-bottom: 0.5rem;
}
.section-title .title-badge {
  display: inline-block;
  background: linear-gradient(135deg, var(--pink-main), var(--pink-dark));
  color: var(--white);
  padding: 6px 24px;
  border-radius: var(--radius-xl);
  font-size: 0.9rem;
  font-weight: 700;
  letter-spacing: 1px;
  box-shadow: var(--shadow-pink);
}
.section-title .underline {
  width: 80px;
  height: 5px;
  background: linear-gradient(90deg, var(--yellow), var(--pink-main));
  border-radius: 5px;
  margin: 10px auto 0;
}

/* ---- Cards ---- */
.card {
  background: rgba(255,255,255,0.12);
  backdrop-filter: blur(10px);
  border: 2px solid rgba(255,255,255,0.2);
  border-radius: var(--radius-md);
  padding: 1.5rem;
  transition: all 0.3s;
  position: relative;
  overflow: hidden;
}
.card::before {
  content: '';
  position: absolute;
  top: -50%;
  right: -50%;
  width: 200%;
  height: 200%;
  background: radial-gradient(circle, rgba(255,255,255,0.05) 0%, transparent 60%);
  pointer-events: none;
}
.card:hover {
  transform: translateY(-8px);
  border-color: var(--yellow);
  box-shadow: 0 20px 50px rgba(0,0,0,0.3), 0 0 30px rgba(255,214,0,0.2);
}

.card-white {
  background: var(--white);
  color: var(--text-dark);
  border: none;
  border-radius: var(--radius-md);
  padding: 1.5rem;
  box-shadow: 0 8px 30px rgba(0,0,0,0.15);
  transition: all 0.3s;
}
.card-white:hover {
  transform: translateY(-6px);
  box-shadow: 0 15px 40px rgba(13,71,161,0.3);
}

/* ---- Buttons ---- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 13px 30px;
  border-radius: var(--radius-xl);
  font-family: 'Cairo', sans-serif;
  font-weight: 800;
  font-size: 1rem;
  cursor: pointer;
  border: none;
  transition: all 0.3s;
  text-decoration: none;
}

.btn-primary {
  background: linear-gradient(135deg, var(--pink-main), var(--pink-dark));
  color: var(--white);
  box-shadow: var(--shadow-pink);
}
.btn-primary:hover {
  background: linear-gradient(135deg, var(--pink-dark), var(--pink-main));
  transform: translateY(-3px);
  box-shadow: 0 12px 30px rgba(233,30,140,0.5);
}

.btn-yellow {
  background: linear-gradient(135deg, var(--yellow), var(--yellow-dark));
  color: var(--text-dark);
  box-shadow: 0 8px 25px rgba(255,214,0,0.4);
}
.btn-yellow:hover {
  transform: translateY(-3px);
  box-shadow: 0 12px 35px rgba(255,214,0,0.6);
}

.btn-white {
  background: var(--white);
  color: var(--blue-main);
  box-shadow: 0 8px 25px rgba(0,0,0,0.15);
}
.btn-white:hover {
  background: var(--off-white);
  transform: translateY(-3px);
}

.btn-outline {
  background: transparent;
  border: 2px solid var(--white);
  color: var(--white);
}
.btn-outline:hover {
  background: var(--white);
  color: var(--blue-main);
}

.btn-lg { padding: 16px 40px; font-size: 1.15rem; }
.btn-sm { padding: 8px 20px; font-size: 0.85rem; }

/* ---- Wave Dividers ---- */
.wave-divider {
  width: 100%;
  overflow: hidden;
  line-height: 0;
}
.wave-divider svg {
  display: block;
  width: 100%;
}

/* ---- Section Backgrounds ---- */
.section-blue {
  background: linear-gradient(180deg, var(--blue-dark) 0%, var(--blue-main) 100%);
  position: relative;
}
.section-pink {
  background: linear-gradient(135deg, var(--pink-dark) 0%, var(--pink-main) 100%);
  position: relative;
}
.section-white {
  background: var(--white);
  color: var(--text-dark);
}
.section-light-blue {
  background: linear-gradient(135deg, #0A3A8C 0%, var(--blue-dark) 100%);
  position: relative;
}
.section-gradient {
  background: linear-gradient(135deg, var(--blue-dark) 0%, #1A237E 50%, var(--blue-main) 100%);
  position: relative;
}

/* ---- Grid utilities ---- */
.grid-2 { display: grid; grid-template-columns: repeat(2, 1fr); gap: 1.5rem; }
.grid-3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1.5rem; }
.grid-4 { display: grid; grid-template-columns: repeat(4, 1fr); gap: 1.5rem; }

/* ---- Padding utilities ---- */
.section-pad { padding: 5rem 0; }
.section-pad-sm { padding: 3rem 0; }
.container { max-width: 1200px; margin: 0 auto; padding: 0 1.5rem; }

/* ---- Badge / Chip ---- */
.badge {
  display: inline-block;
  padding: 4px 14px;
  border-radius: var(--radius-xl);
  font-size: 0.8rem;
  font-weight: 700;
}
.badge-pink   { background: var(--pink-main); color: var(--white); }
.badge-yellow { background: var(--yellow);    color: var(--text-dark); }
.badge-blue   { background: var(--blue-light);color: var(--white); }
.badge-white  { background: var(--white);     color: var(--blue-main); }

/* ---- Icon Circles ---- */
.icon-circle {
  width: 70px; height: 70px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.8rem;
  flex-shrink: 0;
}
.icon-circle-pink   { background: linear-gradient(135deg, var(--pink-main), var(--pink-dark)); box-shadow: 0 6px 20px rgba(233,30,140,0.4); }
.icon-circle-yellow { background: linear-gradient(135deg, var(--yellow), var(--yellow-dark)); box-shadow: 0 6px 20px rgba(255,214,0,0.4); }
.icon-circle-blue   { background: linear-gradient(135deg, var(--blue-light), var(--blue-main)); box-shadow: 0 6px 20px rgba(21,101,192,0.4); }
.icon-circle-white  { background: var(--white); box-shadow: 0 6px 20px rgba(0,0,0,0.15); }

/* ---- Forms ---- */
.form-group {
  margin-bottom: 1.25rem;
}
.form-group label {
  display: block;
  font-weight: 700;
  margin-bottom: 6px;
  font-size: 0.95rem;
}
.form-control {
  width: 100%;
  padding: 13px 18px;
  border-radius: var(--radius-sm);
  border: 2px solid rgba(255,255,255,0.25);
  background: rgba(255,255,255,0.1);
  color: var(--white);
  font-family: 'Cairo', sans-serif;
  font-size: 1rem;
  outline: none;
  transition: all 0.3s;
  direction: rtl;
}
.form-control::placeholder { color: rgba(255,255,255,0.5); }
.form-control:focus {
  border-color: var(--yellow);
  background: rgba(255,255,255,0.18);
  box-shadow: 0 0 20px rgba(255,214,0,0.3);
}
.form-control option { background: var(--blue-dark); color: var(--white); }

.form-control-white {
  background: var(--white);
  color: var(--text-dark);
  border: 2px solid #e0e0e0;
}
.form-control-white:focus {
  border-color: var(--blue-main);
  box-shadow: 0 0 15px rgba(21,101,192,0.2);
}
.form-control-white::placeholder { color: #aaa; }

/* ---- Toast Notifications ---- */
.toast {
  position: fixed;
  bottom: 2rem;
  left: 50%;
  transform: translateX(-50%) translateY(100px);
  background: var(--blue-main);
  color: var(--white);
  padding: 14px 30px;
  border-radius: var(--radius-xl);
  font-weight: 700;
  font-size: 1rem;
  box-shadow: 0 8px 30px rgba(0,0,0,0.3);
  border: 2px solid var(--yellow);
  z-index: 9999;
  transition: transform 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}
.toast.show {
  transform: translateX(-50%) translateY(0);
}
.toast.success { border-color: #4CAF50; background: #1B5E20; }
.toast.error   { border-color: var(--red); background: #B71C1C; }

/* ---- Loading Spinner ---- */
.spinner {
  width: 40px; height: 40px;
  border: 4px solid rgba(255,255,255,0.3);
  border-top-color: var(--yellow);
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
  margin: 2rem auto;
}
@keyframes spin { to { transform: rotate(360deg); } }

/* ---- Footer ---- */
footer {
  background: #060E2B;
  color: var(--white);
  padding-top: 4rem;
  border-top: 4px solid var(--yellow);
}
.footer-grid {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1.5fr;
  gap: 2.5rem;
  padding-bottom: 3rem;
}
.footer-logo-section img {
  width: 80px;
  border-radius: 50%;
  border: 3px solid var(--yellow);
  margin-bottom: 1rem;
}
.footer-links h4, .footer-contact-section h4 {
  color: var(--yellow);
  font-size: 1.1rem;
  font-weight: 800;
  margin-bottom: 1.2rem;
  padding-bottom: 0.5rem;
  border-bottom: 2px solid rgba(255,214,0,0.3);
}
.footer-links ul { list-style: none; }
.footer-links ul li { margin-bottom: 10px; }
.footer-links ul li a {
  color: rgba(255,255,255,0.75);
  transition: all 0.3s;
  font-weight: 600;
  font-size: 0.95rem;
}
.footer-links ul li a::before { content: '← '; }
.footer-links ul li a:hover  { color: var(--yellow); padding-right: 5px; }

.footer-contact-item {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 14px;
  color: rgba(255,255,255,0.8);
  font-size: 0.95rem;
}
.footer-contact-item span.ic {
  font-size: 1.3rem;
}

.footer-bottom {
  border-top: 1px solid rgba(255,255,255,0.1);
  padding: 1.2rem 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 0.85rem;
  color: rgba(255,255,255,0.5);
}
.footer-bottom a { color: var(--yellow); }

/* ---- Animations ---- */
.fade-in-up {
  opacity: 0;
  transform: translateY(40px);
  transition: all 0.7s ease;
}
.fade-in-up.visible {
  opacity: 1;
  transform: translateY(0);
}

.fade-in-left {
  opacity: 0;
  transform: translateX(-40px);
  transition: all 0.7s ease;
}
.fade-in-left.visible { opacity: 1; transform: translateX(0); }

.fade-in-right {
  opacity: 0;
  transform: translateX(40px);
  transition: all 0.7s ease;
}
.fade-in-right.visible { opacity: 1; transform: translateX(0); }

/* ---- Delay utilities ---- */
.delay-1 { transition-delay: 0.1s; }
.delay-2 { transition-delay: 0.2s; }
.delay-3 { transition-delay: 0.3s; }
.delay-4 { transition-delay: 0.4s; }
.delay-5 { transition-delay: 0.5s; }

/* ---- Ribbon Banner ---- */
.ribbon {
  position: absolute;
  top: 18px;
  left: -5px;
  background: var(--red);
  color: var(--white);
  padding: 4px 18px 4px 12px;
  font-weight: 800;
  font-size: 0.8rem;
  border-radius: 0 4px 4px 0;
  box-shadow: 2px 2px 8px rgba(0,0,0,0.3);
}
.ribbon::after {
  content: '';
  position: absolute;
  right: -10px;
  top: 0;
  border: 13px solid transparent;
  border-left-color: var(--red);
}

/* ---- Scrollbar ---- */
::-webkit-scrollbar { width: 8px; }
::-webkit-scrollbar-track { background: var(--blue-dark); }
::-webkit-scrollbar-thumb { background: var(--pink-main); border-radius: 4px; }

/* ---- Mobile nav ---- */
@media (max-width: 900px) {
  .hamburger { display: flex; }
  .nav-links {
    position: fixed;
    top: 70px; right: -100%;
    width: 260px;
    height: calc(100vh - 70px);
    background: var(--blue-dark);
    flex-direction: column;
    align-items: flex-start;
    padding: 2rem 1.5rem;
    gap: 0.5rem;
    transition: right 0.4s;
    border-left: 3px solid var(--yellow);
  }
  .nav-links.open { right: 0; }
  .nav-links a { font-size: 1.1rem; padding: 12px 18px; width: 100%; }
  .footer-grid { grid-template-columns: 1fr 1fr; }
}

@media (max-width: 600px) {
  .grid-2, .grid-3, .grid-4 { grid-template-columns: 1fr; }
  .footer-grid { grid-template-columns: 1fr; }
  .footer-bottom { flex-direction: column; gap: 0.5rem; text-align: center; }
}

/* ---- Scroll to top button ---- */
.scroll-top {
  position: fixed;
  bottom: 2rem;
  left: 1.5rem;
  width: 50px; height: 50px;
  background: linear-gradient(135deg, var(--pink-main), var(--pink-dark));
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.4rem;
  cursor: pointer;
  z-index: 999;
  box-shadow: 0 6px 20px rgba(233,30,140,0.5);
  opacity: 0;
  transform: translateY(20px);
  transition: all 0.3s;
  border: none;
  color: var(--white);
}
.scroll-top.visible {
  opacity: 1;
  transform: translateY(0);
}
.scroll-top:hover { transform: translateY(-4px); }

/* ---- Offer box (like the poster) ---- */
.offer-box {
  background: linear-gradient(135deg, var(--yellow) 0%, var(--yellow-dark) 100%);
  border-radius: var(--radius-lg);
  padding: 2rem;
  text-align: center;
  position: relative;
  overflow: hidden;
  color: var(--text-dark);
  box-shadow: 0 15px 50px rgba(255,214,0,0.4);
}
.offer-box .price {
  font-size: 4rem;
  font-weight: 900;
  line-height: 1;
  color: var(--text-dark);
}
.offer-box .currency {
  font-size: 1.8rem;
  font-weight: 700;
  vertical-align: super;
}

/* ---- Registration urgency banner ---- */
.urgency-bar {
  background: linear-gradient(90deg, var(--pink-main), var(--pink-dark), var(--pink-main));
  background-size: 200% 100%;
  animation: shimmer 3s linear infinite;
  padding: 14px;
  text-align: center;
  font-weight: 800;
  font-size: 1.05rem;
  letter-spacing: 0.5px;
}
@keyframes shimmer {
  0%   { background-position: 0% 0; }
  100% { background-position: 200% 0; }
}
