/* ============================================
   School Registration Form — Arabic RTL Theme
   Gold & Cream Theme (matched to MAINUI.CSS)
   ============================================ */

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

/* ── CSS Variables ── */
:root {
  --bg-main:        #FBF7EC;
  --bg-card:        #F5EDD6;
  --bg-input:       #FFFCF0;
  --accent-gold:    #C9A84C;
  --accent-glow:    #C9A84C55;
  --accent-hover:   #8B6914;
  --text-primary:   #1A1208;
  --text-label:     #5C4A2A;
  --text-muted:     #b8926a;
  --border-idle:    rgba(201, 168, 76, 0.35);
  --border-focus:   #C9A84C;
  --error:          #c0392b;
  --success:        #1e8c5a;
  --radius:         12px;
  --radius-sm:      8px;
  --shadow-card:    0 8px 40px rgba(201, 168, 76, 0.18);
  --shadow-glow:    0 0 18px rgba(201, 168, 76, 0.20);
  --transition:     0.25s cubic-bezier(.4,0,.2,1);
}

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

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

body {
  font-family: 'Cairo', 'Noto Naskh Arabic', sans-serif;
  background: var(--bg-main);
  background-image:
    radial-gradient(ellipse at 20% 10%, rgba(232, 201, 122, 0.35) 0%, transparent 55%),
    radial-gradient(ellipse at 80% 90%, rgba(186, 117, 23, 0.18) 0%, transparent 50%);
  min-height: 100vh;
  direction: rtl;
  color: var(--text-primary);
  padding: 2rem 1rem 4rem;
}

/* ── Form Card ── */
form {
  max-width: 520px;
  margin: 0 auto;
  background: var(--bg-card);
  border: 1px solid var(--border-idle);
  border-radius: 20px;
  padding: 2.5rem 2rem;
  box-shadow: var(--shadow-card);
  position: relative;
  overflow: hidden;
}

/* Decorative top bar */
form::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 4px;
  background: linear-gradient(90deg, #C9A84C, #E8C97A, #BA7517, #C9A84C);
  background-size: 200% 100%;
  animation: shimmer 3s linear infinite;
}

@keyframes shimmer {
  0%   { background-position: 200% 0; }
  100% { background-position: -200% 0; }
}

/* ── Section Wrapper ── */
#school_info {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

/* ── Headings ── */
h2 {
  text-align: center;
  font-family: 'Amiri', serif;
  font-size: 1.75rem;
  font-weight: 700;
  color: var(--accent-hover);
  letter-spacing: 0.02em;
  margin-bottom: 0.25rem;
  text-shadow: 0 0 24px var(--accent-glow);
}

/* ── Labels & Anchors ── */
label, a:not([href]) {
  display: block;
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--text-label);
  margin-bottom: 0.25rem;
}

/* ── Inputs ── */
input[type="text"],
input[type="date"],
input[type="number"],
input[type="tel"],
input[type="email"],
input[type=""] ,
input[type=" "] {
  width: 100%;
  padding: 0.75rem 1rem;
  background: var(--bg-input);
  border: 1.5px solid var(--border-idle);
  border-radius: var(--radius-sm);
  color: var(--text-primary);
  font-family: 'Cairo', sans-serif;
  font-size: 0.95rem;
  direction: rtl;
  transition: border-color var(--transition), box-shadow var(--transition), background var(--transition);
  outline: none;
  /* webkit-appearance: none; */
}

input::placeholder {
  color: var(--text-muted);
  font-size: 0.9rem;
}

input:focus {
  border-color: var(--border-focus);
  background: #fffdf5;
  box-shadow: 0 0 0 3px var(--accent-glow);
}

input:valid:not(:placeholder-shown) {
  border-color: rgba(30, 140, 90, 0.4);
}

input[readonly] {
  background: #f1e9d2;
  color: var(--text-muted);
  cursor: not-allowed;
  border-style: dashed;
}

/* Hide hidden inputs entirely */
input[hidden],
input[type="text"][hidden] {
  display: none !important;
}

/* ── Date Input Fix ── */
input[type="date"]::-webkit-calendar-picker-indicator {
  filter: sepia(1) saturate(4) hue-rotate(5deg) brightness(0.9);
  cursor: pointer;
  opacity: 0.75;
}

/* ── button Button ── */
button[type="button"] {
  width: 100%;
  padding: 0.9rem 1.5rem;
  margin-top: 1rem;
  background: linear-gradient(135deg, #E8C97A, #C9A84C);
  color: var(--text-primary);
  font-family: 'Cairo', sans-serif;
  font-size: 1.1rem;
  font-weight: 700;
  border: none;
  border-radius: var(--radius);
  cursor: pointer;
  letter-spacing: 0.04em;
  box-shadow: 0 4px 20px rgba(201, 168, 76, 0.30);
  transition: transform var(--transition), box-shadow var(--transition), background var(--transition);
  position: relative;
  overflow: hidden;
}

button[type="button"]:hover {
  background: linear-gradient(135deg, #C9A84C, #8B6914);
  color: #fff;
  box-shadow: 0 6px 28px rgba(201, 168, 76, 0.40);
  transform: translateY(-2px);
}

button[type="button"]:active {
  transform: translateY(0);
  box-shadow: 0 2px 10px rgba(201, 168, 76, 0.30);
}

button[type="button"]::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg, transparent 40%, #ffffff30 100%);
  pointer-events: none;
}

/* ── WhatsApp Link ── */
a[href*="wa.me"] {
  display: block;
  text-align: center;
  margin-top: 1.5rem;
  padding: 0.7rem 1.25rem;
  background: rgba(30, 140, 90, 0.10);
  border: 1.5px solid rgba(30, 140, 90, 0.30);
  border-radius: var(--radius-sm);
  color: var(--success);
  font-weight: 700;
  font-size: 1rem;
  text-decoration: none;
  transition: background var(--transition), border-color var(--transition), box-shadow var(--transition);
  max-width: 520px;
  margin-inline: auto;
}

a[href*="wa.me"]:hover {
  background: rgba(30, 140, 90, 0.16);
  border-color: var(--success);
  box-shadow: 0 0 14px rgba(30, 140, 90, 0.25);
  text-decoration: none;
}

a[href*="wa.me"]::before {
  content: '💬 ';
}

/* ── br spacers — remove visual gap stacking ── */
br {
  display: block;
  content: '';
  margin: 0;
}

/* ── Scrollbar ── */
::-webkit-scrollbar { width: 6px; }
::-webkit-scrollbar-track { background: var(--bg-main); }
::-webkit-scrollbar-thumb { background: var(--border-idle); border-radius: 99px; }
::-webkit-scrollbar-thumb:hover { background: var(--accent-gold); }

/* ── Responsive ── */
@media (max-width: 560px) {
  form {
    padding: 1.75rem 1.25rem;
  }
  h2 {
    font-size: 1.4rem;
  }
}
