:root {
  --app-vh: 1vh;
}

html,
body {
  max-width: 100%;
}

html {
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
}

img,
svg {
  max-width: 100%;
  height: auto;
}

.min-h-screen {
  min-height: 100vh;
  min-height: calc(var(--app-vh) * 100);
}

body {
  background-color: #F8FAFC;
  color: #475569;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

a,
button,
input,
select,
textarea {
  -webkit-tap-highlight-color: transparent;
}

button,
input,
select,
textarea {
  font: inherit;
}

::-webkit-scrollbar {
  width: 8px;
}

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

::-webkit-scrollbar-thumb {
  background: linear-gradient(180deg, #1E40AF, #3B82F6);
  border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
  background: linear-gradient(180deg, #1E3A8A, #2563EB);
}

.navbar-scrolled {
  background: rgba(15, 23, 42, 0.96) !important;
  backdrop-filter: blur(16px);
  box-shadow: 0 8px 24px rgba(15, 23, 42, 0.2);
}

.navbar-scrolled .nav-link,
.navbar-scrolled a,
.navbar-scrolled span,
.navbar-scrolled button {
  color: #f8fafc !important;
}

.navbar-scrolled .nav-link:hover {
  background-color: rgba(148, 163, 184, 0.2) !important;
  color: #f8fafc !important;
}

.navbar-scrolled .dropdown-menu {
  background: rgba(15, 23, 42, 0.98) !important;
  border-color: rgba(148, 163, 184, 0.15);
}

.navbar-scrolled .dropdown-menu a {
  color: #f8fafc !important;
}

.navbar-scrolled .dropdown-menu a:hover {
  color: #38bdf8 !important;
}

.navbar-scrolled #logoIcon,
.navbar-scrolled #logoText,
.navbar-scrolled #logoMain {
  filter: brightness(0) invert(1) !important;
}

.site-header {
  background: #f8fafc;
  border-bottom-color: rgba(226, 232, 240, 0.95);
}

.site-topbar {
  background: #0b1120;
  color: #d7e1f0;
}

.site-topbar a {
  color: #d7e1f0;
}

.site-topbar a:hover {
  color: #38bdf8;
}

.site-header .nav-link {
  color: #334155;
}

.site-header .nav-link:hover {
  background-color: rgba(226, 232, 240, 0.85) !important;
  color: #0f172a;
}


.site-mobile-menu {
  background: #0b1120;
  transform: translateX(100%);
  transition: transform 0.3s ease;
}

.site-mobile-menu:not(.translate-x-full) {
  transform: translateX(0);
}

.dropdown-menu {
  opacity: 0;
  visibility: hidden;
  transform: translateY(10px);
  transition: all 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
  border: 1px solid rgba(15, 23, 42, 0.08);
  box-shadow: 0 16px 36px rgba(15, 23, 42, 0.12);
}

.dropdown:hover .dropdown-menu {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}

.dropdown-menu a {
  color: #0F172A;
  transition: all 0.2s ease;
}

.dropdown-menu a:hover {
  background-color: rgba(15, 23, 42, 0.06) !important;
  color: #1E3A8A;
}

.card-hover {
  transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.card-hover:hover {
  transform: translateY(-10px);
}

.gradient-text {
  background: linear-gradient(135deg, #1E40AF 0%, #06B6D4 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.btn-primary {
  background: linear-gradient(135deg, #1E40AF 0%, #3B82F6 100%);
  transition: all 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
  position: relative;
  overflow: hidden;
  border: none;
  cursor: pointer;
}

.btn-primary::before {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.3), transparent);
  transition: left 0.5s ease;
}

.btn-primary:hover::before {
  left: 100%;
}

.btn-primary:hover {
  transform: translateY(-3px);
  box-shadow: 0 15px 35px rgba(30, 64, 175, 0.5);
  background: linear-gradient(135deg, #1E3A8A 0%, #2563EB 100%);
}

.btn-primary:active {
  transform: translateY(-1px);
  box-shadow: 0 5px 15px rgba(30, 64, 175, 0.3);
}

.btn-secondary {
  background: transparent;
  border: 2px solid #1E40AF;
  color: #1E40AF;
  transition: all 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
  cursor: pointer;
}

.btn-secondary:hover {
  background: linear-gradient(135deg, #1E40AF, #3B82F6);
  color: white;
  border-color: transparent;
  box-shadow: 0 10px 25px rgba(30, 64, 175, 0.3);
  transform: translateY(-2px);
}

.img-overlay {
  position: relative;
  overflow: hidden;
}

.img-overlay::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, transparent 50%, rgba(15, 23, 42, 0.8) 100%);
}

.img-overlay img {
  transition: transform 0.5s ease;
}

.img-overlay:hover img {
  transform: scale(1.1);
}

.section-divider {
  width: 80px;
  height: 4px;
  background: linear-gradient(90deg, #1E40AF, #06B6D4);
  border-radius: 2px;
}

.glass {
  background: rgba(255, 255, 255, 0.25);
  backdrop-filter: blur(10px);
  border: 1px solid rgba(255, 255, 255, 0.18);
}

.form-input {
  transition: all 0.3s ease;
}

.form-input:focus {
  border-color: #3B82F6 !important;
  box-shadow: 0 0 0 4px rgba(59, 130, 246, 0.15) !important;
  outline: none !important;
}

.form-input:focus-visible {
  outline: none;
}

.whatsapp-float {
  position: fixed;
  bottom: 20px;
  right: 20px;
  z-index: 999;
  animation: pulse-shadow 2s infinite;
  border: none;
  cursor: pointer;
}

@media (min-width: 640px) {
  .whatsapp-float {
    bottom: 30px;
    right: 30px;
  }
}

.site-footer {
  background: #0b1120;
  position: relative;
  overflow: hidden;
}

.site-footer::before {
  content: '';
  position: absolute;
  inset: 0;
  background: radial-gradient(circle at 15% 10%, rgba(30, 64, 175, 0.18), transparent 60%);
  pointer-events: none;
}

.footer-top,
.footer-newsletter,
.footer-bottom {
  position: relative;
  z-index: 1;
}

.site-footer a {
  color: rgba(226, 232, 240, 0.82);
}

.site-footer a:hover {
  color: #38bdf8;
}

.footer-input {
  background: #0f172a;
  border: 1px solid rgba(148, 163, 184, 0.35);
  color: #f8fafc;
  transition: all 0.2s ease;
}

.footer-input::placeholder {
  color: rgba(226, 232, 240, 0.65);
}

.footer-input:focus {
  outline: none;
  border-color: #38bdf8;
  box-shadow: 0 0 0 4px rgba(56, 189, 248, 0.2);
}


.footer-bottom {
  background: rgba(2, 6, 23, 0.96);
}

.contact-modal {
  backdrop-filter: blur(6px);
}

.contact-card {
  background: linear-gradient(180deg, #ffffff 0%, #f8fafc 100%);
  border: 1px solid rgba(226, 232, 240, 0.9);
}

.contact-input {
  background: #f8fafc;
  border: 1px solid rgba(226, 232, 240, 0.9);
  color: #0f172a;
  transition: all 0.2s ease;
}

.contact-input:focus {
  outline: none;
  border-color: #3B82F6;
  box-shadow: 0 0 0 4px rgba(59, 130, 246, 0.15);
  background: #ffffff;
}

.contact-submit {
  background: linear-gradient(135deg, #1E40AF 0%, #3B82F6 100%);
  color: #ffffff;
  transition: all 0.25s ease;
}

.contact-submit:hover {
  transform: translateY(-2px);
  box-shadow: 0 18px 35px rgba(30, 64, 175, 0.35);
}

@keyframes pulse-shadow {
  0% {
    box-shadow: 0 0 0 0 rgba(34, 197, 94, 0.7);
  }

  70% {
    box-shadow: 0 0 0 25px rgba(34, 197, 94, 0);
  }

  100% {
    box-shadow: 0 0 0 0 rgba(34, 197, 94, 0);
  }
}

.reveal {
  opacity: 0;
  transform: translateY(30px);
  transition: all 0.8s ease-out;
}

.reveal.active {
  opacity: 1;
  transform: translateY(0);
}

.fade-in-left {
  opacity: 0;
  transform: translateX(-50px);
  transition: all 0.8s ease-out;
}

.fade-in-right {
  opacity: 0;
  transform: translateX(50px);
  transition: all 0.8s ease-out;
}

.active-side {
  opacity: 1;
  transform: translateX(0);
}

.mobile-scroll-row {
  display: flex;
  gap: 0.75rem;
  overflow-x: auto;
  overflow-y: hidden;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
  padding-bottom: 0.25rem;
}

.mobile-scroll-row::-webkit-scrollbar {
  display: none;
}

.mobile-safe-text {
  overflow-wrap: anywhere;
  word-break: break-word;
}

.line-clamp-2 {
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.full-screen {
  position: fixed !important;
  inset: 0 !important;
  z-index: 95 !important;
  background: rgba(15, 23, 42, 0.95) !important;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  padding: 1rem !important;
  border-radius: 0 !important;
}

.full-screen img {
  width: auto !important;
  max-width: 95vw !important;
  max-height: 92vh !important;
  height: auto !important;
  object-fit: contain !important;
}

a[href^="mailto:"] {
  overflow-wrap: anywhere;
  word-break: break-word;
}

html.is-android .bg-fixed {
  background-attachment: scroll !important;
}

@media (max-width: 768px) {

  button,
  a,
  .nav-link,
  [role="button"],
  .btn-primary,
  .btn-secondary,
  .mobile-link,
  #mobile-menu-btn,
  #close-menu-btn {
    min-height: 44px;
    min-width: 44px;
    transition: all 0.2s ease;
  }

  header {
    padding: 8px 0;
  }

  .mobile-link {
    font-size: 15px;
    padding: 12px 16px;
  }

  .btn-primary,
  .btn-secondary {
    min-height: 44px;
    font-size: 14px;
  }

  .sticky-mobile-safe {
    position: static !important;
    top: auto !important;
  }

  .mobile-scroll-x {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
  }

  .mobile-scroll-x::-webkit-scrollbar {
    display: none;
  }

  .mobile-text-wrap {
    overflow-wrap: anywhere;
    word-break: break-word;
  }

  .bg-fixed {
    background-attachment: scroll !important;
  }

  .mobile-scroll-row {
    flex-wrap: nowrap;
    justify-content: flex-start;
  }

  .mobile-scroll-row>* {
    flex: 0 0 auto;
  }
}

@media (min-width: 641px) and (max-width: 1024px) {
  header .max-w-7xl {
    padding: 0 16px;
  }

  nav {
    gap: 8px;
  }

  .dropdown-menu {
    width: 240px;
  }
}

@media (min-resolution: 2dppx) {

  .whatsapp-float,
  .btn-primary,
  .btn-secondary {
    box-shadow: 0 0 1px rgba(0, 0, 0, 0.3);
  }
}

@media (prefers-color-scheme: dark) {
  .dropdown-menu {
    background-color: #1F2937;
  }

  .dropdown-menu a {
    color: #F3F4F6;
  }
}

@media (hover: none) {

  .card-hover:hover,
  .btn-primary:hover,
  .btn-secondary:hover,
  .img-overlay:hover img {
    transform: none;
  }
}

.umrah-hero-gradient {
  background: linear-gradient(135deg, #1a472a 0%, #0f2e1a 50%, #0a1f12 100%);
}

.umrah-hero-pattern {
  background-image: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 100 100"><circle cx="50" cy="50" r="40" fill="none" stroke="gold" stroke-width="0.5"/><circle cx="50" cy="50" r="30" fill="none" stroke="gold" stroke-width="0.5"/><circle cx="50" cy="50" r="20" fill="none" stroke="gold" stroke-width="0.5"/></svg>');
  background-size: 100px 100px;
}

.bg-hero-pattern {
  background-image: linear-gradient(135deg, rgba(15, 23, 42, 0.9) 0%, rgba(30, 64, 175, 0.8) 100%),
    url('/assets/uploads/new-bg.jpeg');
  background-size: cover;
  background-position: center;
}

.bg-hero-hajj {
  background-image: linear-gradient(135deg, rgba(15, 23, 42, 0.9) 0%, rgba(245, 158, 11, 0.7) 100%),
    url('https://images.unsplash.com/photo-1591604129939-f1efa4d9f7fa?ixlib=rb-4.0.3&auto=format&fit=crop&w=2000&q=80');
  background-size: cover;
  background-position: center;
}

.blog-content h1,
.blog-content h2,
.blog-content h3,
.blog-content h4 {
  color: #0F172A;
  font-weight: 700;
  margin: 1.5rem 0 0.75rem;
}

.blog-content p {
  color: #475569;
  line-height: 1.8;
  margin: 0 0 1rem;
}

.blog-content img {
  max-width: 100%;
  height: auto;
  border-radius: 1rem;
  margin: 1.25rem 0 1.5rem;
  box-shadow: 0 10px 30px rgba(15, 23, 42, 0.12);
}

.blog-content ul,
.blog-content ol {
  margin: 0 0 1rem 1.5rem;
  color: #475569;
  line-height: 1.85;
}

.blog-content li {
  margin-bottom: 0.45rem;
}

.blog-content a {
  color: #1E40AF;
  text-decoration: underline;
}

.blog-content table {
  width: 100%;
  border-collapse: separate;
  border-spacing: 0;
  margin: 1.5rem 0;
  display: block;
  overflow-x: auto;
  border: 1px solid #E2E8F0;
  border-radius: 0.85rem;
}

.blog-content thead th {
  background: #EFF6FF;
  color: #0F172A;
  font-weight: 700;
  text-align: left;
  border-bottom: 1px solid #DBEAFE;
}

.blog-content th,
.blog-content td {
  padding: 0.85rem 1rem;
  white-space: nowrap;
  border-bottom: 1px solid #F1F5F9;
  color: #334155;
  font-size: 0.95rem;
}

.blog-content tbody tr:nth-child(even) {
  background: #FAFCFF;
}

.blog-content tbody tr:last-child td {
  border-bottom: 0;
}

.blog-content h2 {
  font-size: 1.65rem;
  margin-top: 2.2rem;
  padding-top: 0.25rem;
  border-top: 1px solid #EEF2F7;
}

.blog-content h2:first-of-type {
  border-top: 0;
  margin-top: 0.25rem;
}

.blog-content h3 {
  font-size: 1.25rem;
}

.blog-content blockquote {
  margin: 1.25rem 0;
  padding: 1rem 1.25rem;
  border-left: 4px solid #1E40AF;
  background: #F8FAFC;
  color: #334155;
  border-radius: 0.5rem;
}

@media (max-width: 768px) {
  .blog-content h2 {
    font-size: 1.35rem;
  }

  .blog-content table {
    font-size: 0.88rem;
  }
}

.page-hero {
  background: linear-gradient(135deg, #0f172a 0%, #1e3a8a 52%, #2563eb 100%);
  position: relative;
  overflow: hidden;
}

.page-hero::before {
  content: '';
  position: absolute;
  inset: 0;
  background: radial-gradient(circle at top right, rgba(56, 189, 248, 0.2), transparent 42%);
  pointer-events: none;
}

.section-pad {
  padding-top: 5rem;
  padding-bottom: 5rem;
}

.section-kicker {
  color: #1e40af;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.13em;
  text-transform: uppercase;
}

.section-title {
  color: #0f172a;
}

.text-gradient-gold {
  background: linear-gradient(135deg, #f59e0b, #facc15);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
}

.card-premium {
  background: #fff;
  border: 1px solid #e2e8f0;
  border-radius: 1rem;
  box-shadow: 0 12px 28px rgba(15, 23, 42, 0.08);
}

.icon-box {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 0.85rem;
}

.icon-box-premium {
  background: #dbeafe;
  color: #1d4ed8;
}

.icon-box-gold {
  background: #fef3c7;
  color: #b45309;
}

.premium-input-group {
  position: relative;
}

.input-icon {
  position: absolute;
  right: 0.95rem;
  top: 50%;
  transform: translateY(-50%);
  color: #94a3b8;
  pointer-events: none;
}

.form-control,
.form-select {
  width: 100%;
  border: 1px solid #cbd5e1;
  border-radius: 0.8rem;
  background: #fff;
  color: #0f172a;
  padding: 0.8rem 2.5rem 0.8rem 0.95rem;
  outline: none;
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.form-control:focus,
.form-select:focus {
  border-color: #3b82f6;
  box-shadow: 0 0 0 4px rgba(59, 130, 246, 0.14);
}

.drop-zone {
  border: 1px dashed #93c5fd;
  border-radius: 0.9rem;
  background: #eff6ff;
}

.btn-gold {
  background: linear-gradient(135deg, #b45309 0%, #f59e0b 100%);
  color: #fff;
}

/* Select2 Custom Styles to match Theme */
.select2-container--default .select2-selection--single {
  border: 1px solid #cbd5e1 !important;
  border-radius: 0.8rem !important;
  height: auto !important;
  padding: 0.5rem 0.6rem !important;
  background-color: #fff !important;
  transition: all 0.2s ease !important;
}

.select2-container--default.select2-container--focus .select2-selection--single {
  border-color: #3b82f6 !important;
  box-shadow: 0 0 0 4px rgba(59, 130, 246, 0.14) !important;
}

.select2-container--default .select2-selection--single .select2-selection__rendered {
  color: #0f172a !important;
  padding-left: 0 !important;
  line-height: 1.5 !important;
}

.select2-container--default .select2-selection--single .select2-selection__arrow {
  height: 100% !important;
  right: 1.5rem !important;
}

.select2-dropdown {
  border: 1px solid #e2e8f0 !important;
  border-radius: 0.8rem !important;
  box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1) !important;
  overflow: hidden !important;
}

.select2-results__option {
  padding: 0.6rem 1rem !important;
}

.select2-results__option--highlighted[aria-selected] {
  background-color: #1e40af !important;
}

/* Hide built-in arrow if we have a custom icon in premium-input-group */
.select-with-icon .select2-selection__arrow {
  display: none !important;
}