/**
 * Capital School UAE — Global CSS
 * Compiled supplement to style.css
 * Loaded via wp_enqueue_style('cs-global')
 */

/* Mobile nav panel */
.cs-mobile-menu { position: fixed; inset: 0; z-index: 200; display: flex; }
.cs-mobile-menu[hidden] { display: none; }
.cs-mobile-menu__overlay { position: absolute; inset: 0; background: rgba(33,44,85,0.6); backdrop-filter: blur(4px); }
.cs-mobile-menu__panel {
  position: relative;
  z-index: 1;
  width: min(320px, 90vw);
  background: #fff;
  padding: 2rem 1.75rem;
  display: flex;
  flex-direction: column;
  overflow-y: auto;
}
.cs-mobile-menu__close {
  background: none;
  border: none;
  padding: 0.25rem;
  cursor: pointer;
  align-self: flex-end;
  color: #212c55;
  margin-bottom: 1.5rem;
}
.cs-mobile-menu ul { list-style: none; display: flex; flex-direction: column; gap: 0.25rem; }
.cs-mobile-menu ul li a {
  display: block;
  padding: 0.75rem 0.5rem;
  font-weight: 600;
  font-size: 1rem;
  color: #212c55;
  border-bottom: 1px solid #ebf0f8;
  text-decoration: none;
  text-align: left;
}

/* Mobile submenu — hidden until parent is tapped */
.cs-mobile-menu .sub-menu { display: none; }
.cs-mobile-menu .menu-item-has-children.is-open > .sub-menu {
  display: block;
  padding: 0 0 0.5rem 1rem;
  margin: 0.25rem 0 0.25rem 0.5rem;
  border-left: 3px solid #d4a843;
}

/* Expand / collapse indicator on parent items */
.cs-mobile-menu .menu-item-has-children > a {
  display: flex !important;
  justify-content: space-between;
  align-items: center;
}
.cs-mobile-menu .menu-item-has-children > a::after {
  content: '+';
  font-size: 1.3rem;
  font-weight: 300;
  color: #d4a843;
  line-height: 1;
  flex-shrink: 0;
  margin-left: 0.75rem;
  transition: transform 0.2s ease;
}
.cs-mobile-menu .menu-item-has-children.is-open > a::after {
  transform: rotate(45deg);
}

/* Ribbon close button */
#cs-ribbon-close {
  background: none;
  border: none;
  color: rgba(255,255,255,0.65);
  cursor: pointer;
  font-size: 1.1rem;
  line-height: 1;
  padding: 0 0.25rem;
  vertical-align: middle;
}

/* Smooth hero bg-img */
.cs-hero__bg-img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center top;
}

/* ── Sticky Mobile CTA Bar ───────────────────────────────────────── */
/* Shown only on mobile (≤768px) after scrolling 400px */
.cs-sticky-cta {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  z-index: 180;
  display: flex;
  gap: 0;
  box-shadow: 0 -4px 24px rgba(33,44,85,0.18);
  /* Slide-up animation */
  transform: translateY(100%);
  transition: transform 0.3s ease;
}
.cs-sticky-cta.is-visible {
  transform: translateY(0);
}
/* Hide entirely on desktop */
@media (min-width: 769px) {
  .cs-sticky-cta { display: none !important; }
}
.cs-sticky-cta__btn {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.45rem;
  padding: 0.95rem 0.5rem;
  font-family: 'Montserrat', sans-serif;
  font-size: 0.88rem;
  font-weight: 700;
  text-decoration: none;
  letter-spacing: 0.02em;
  transition: background 0.2s ease, color 0.2s ease, outline-offset 0.1s ease;
  outline: none;
}
.cs-sticky-cta__btn:active  { filter: brightness(0.9); }

/* Apply Now — navy → gold on hover/focus */
.cs-sticky-cta__btn--apply           { background: #212c55; color: #ffffff; }
.cs-sticky-cta__btn--apply:hover,
.cs-sticky-cta__btn--apply:focus-visible {
  background: #bd9a5f;
  color: #ffffff;
  outline: 3px solid rgba(189,154,95,0.5);
  outline-offset: -3px;
}

/* WhatsApp — green → darker green on hover/focus */
.cs-sticky-cta__btn--wa              { background: #25D366; color: #ffffff; }
.cs-sticky-cta__btn--wa:hover,
.cs-sticky-cta__btn--wa:focus-visible {
  background: #128C7E;
  color: #ffffff;
  outline: 3px solid rgba(18,140,126,0.45);
  outline-offset: -3px;
}

/* ── Enquiry Form Styles ─────────────────────────────────────────── */
.cs-enquiry-form-wrap { width: 100%; }
.cs-enquiry-form { display: flex; flex-direction: column; gap: 1.25rem; }

.cs-form__row { display: flex; gap: 1rem; }
.cs-form__row--2 > * { flex: 1 1 0; min-width: 0; }

.cs-form__group { display: flex; flex-direction: column; gap: 0.4rem; }
.cs-form__group label {
  font-size: 0.85rem;
  font-weight: 600;
  color: #212c55;
}
.cs-form__group label span[aria-hidden] { color: #bd9a5f; }

.cs-form__group input,
.cs-form__group select,
.cs-form__group textarea {
  width: 100%;
  padding: 0.75rem 1rem;
  border: 2px solid #ebf0f8;
  border-radius: 0.625rem;
  font-family: 'Montserrat', sans-serif;
  font-size: 0.9rem;
  color: #212c55;
  background: #fff;
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
  outline: none;
  -webkit-appearance: none;
  appearance: none;
}
.cs-form__group select {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath d='M1 1l5 5 5-5' stroke='%23212c55' stroke-width='1.5' fill='none' stroke-linecap='round'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 1rem center;
  padding-right: 2.5rem;
}
.cs-form__group input:focus,
.cs-form__group select:focus,
.cs-form__group textarea:focus {
  border-color: #bd9a5f;
  box-shadow: 0 0 0 3px rgba(189,154,95,0.15);
}
.cs-form__group input::placeholder,
.cs-form__group textarea::placeholder { color: #a0a7b8; }
.cs-form__group textarea { resize: vertical; min-height: 80px; }

/* Consent checkbox row */
.cs-form__consent label {
  display: flex;
  align-items: flex-start;
  gap: 0.75rem;
  font-weight: 400;
  cursor: pointer;
  line-height: 1.5;
}
.cs-form__consent input[type="checkbox"] {
  width: 18px;
  height: 18px;
  flex-shrink: 0;
  margin-top: 2px;
  accent-color: #bd9a5f;
  border: 2px solid #ebf0f8;
  border-radius: 4px;
}
.cs-form__consent span { font-size: 0.82rem; color: #54575a; }

/* Submit button — full width */
.cs-form__submit { width: 100%; font-size: 1rem; justify-content: center; }

/* Error box */
.cs-form__error {
  background: #fff5f5;
  border: 1px solid #f5c2c7;
  border-radius: 0.5rem;
  padding: 0.85rem 1rem;
  font-size: 0.88rem;
  color: #842029;
}

/* Success panel */
.cs-form__success {
  text-align: center;
  padding: 2rem 1rem;
}
.cs-form__success-icon {
  display: flex;
  justify-content: center;
  margin-bottom: 1rem;
}
.cs-form__success h3 { color: #212c55; margin-bottom: 0.5rem; }

/* Mobile: stack the 2-col row */
@media (max-width: 640px) {
  .cs-form__row--2 { flex-direction: column; gap: 1.25rem; }
}

