/* ===== CUSTOM STYLES - Institut Ibn Rochd ===== */

/* Smooth scrolling */
html {
  scroll-behavior: smooth;
}

/* ===== ANIMATIONS ===== */
@keyframes fade-in-up {
  from {
    opacity: 0;
    transform: translateY(30px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes wa-ping {
  0% {
    transform: scale(1);
    opacity: 0.6;
  }
  75%, 100% {
    transform: scale(1.8);
    opacity: 0;
  }
}

@keyframes float {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-10px); }
}

.animate-fade-in-up {
  animation: fade-in-up 0.8s ease-out both;
}

.animate-wa-ping {
  animation: wa-ping 2s cubic-bezier(0, 0, 0.2, 1) infinite;
}

.animate-float {
  animation: float 6s ease-in-out infinite;
}

/* ===== SCROLL ANIMATIONS ===== */
.scroll-animate {
  opacity: 0;
  transform: translateY(40px);
  transition: opacity 0.8s ease-out, transform 0.8s ease-out;
}

.scroll-animate.is-visible {
  opacity: 1;
  transform: translateY(0);
}

/* ===== NAVBAR STATES ===== */
#navbar {
  transition: background-color 0.4s ease, backdrop-filter 0.4s ease, box-shadow 0.4s ease;
}

#navbar.scrolled {
  background-color: rgba(15, 23, 42, 0.85);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  box-shadow: 0 4px 30px rgba(0, 0, 0, 0.15);
  border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

#navbar.scrolled .nav-title-text {
  color: #fff;
}

#navbar.scrolled .nav-subtitle-text {
  color: #6ee7b7;
}

/* ===== SELECT ARROW ===== */
select {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 24 24' stroke='%2394a3b8'%3E%3Cpath stroke-linecap='round' stroke-linejoin='round' stroke-width='2' d='M19 9l-7 7-7-7'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 1rem center;
  background-size: 1.25rem;
}

[dir="rtl"] select {
  background-position: left 1rem center;
}

/* ===== RTL ADJUSTMENTS ===== */
[dir="rtl"] {
  text-align: right;
}

[dir="rtl"] .space-x-3 > * + * {
  margin-right: 0.75rem;
  margin-left: 0;
}

/* ===== VIDEO HERO ===== */
#hero video {
  filter: brightness(0.7);
}

/* ===== FOCUS STATES ===== */
input:focus,
select:focus,
textarea:focus {
  outline: none;
}

/* ===== SCROLLBAR ===== */
::-webkit-scrollbar {
  width: 8px;
}

::-webkit-scrollbar-track {
  background: #f1f5f9;
}

::-webkit-scrollbar-thumb {
  background: linear-gradient(to bottom, #10b981, #0d9488);
  border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
  background: linear-gradient(to bottom, #059669, #0f766e);
}

/* ===== LOADING ===== */
.page-loading {
  position: fixed;
  inset: 0;
  z-index: 9999;
  background: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: opacity 0.5s ease;
}

.page-loading.hidden {
  opacity: 0;
  pointer-events: none;
}
