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

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

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

body {
  background: #f1f5f9;
  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;
}

section.bg-brand-bg {
  background-color: #eef3f8 !important;
}

section.bg-white {
  background-color: #ffffff !important;
}

section.bg-brand-primary {
  background-color: #1e40af !important;
}

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

.navbar-scrolled {
  background: rgba(255, 255, 255, 0.98) !important;
  box-shadow: 0 8px 28px rgba(15, 23, 42, 0.08);
  backdrop-filter: blur(12px);
}

.navbar-scrolled .nav-link,
.navbar-scrolled .brand-text,
.navbar-scrolled .menu-icon {
  color: #0f172a !important;
}

.nav-link {
  transition: all .25s ease;
}

.navbar-scrolled .nav-link:hover,
.navbar-scrolled .nav-link:focus {
  color: #1e40af !important;
  background: #eff6ff !important;
}

.navbar-scrolled .nav-link.text-white {
  color: #ffffff !important;
  background: #1e40af !important;
}

.card-hover {
  transition: transform .25s ease, box-shadow .25s ease;
}

.card-hover:hover {
  transform: translateY(-4px);
  box-shadow: 0 14px 30px rgba(15, 23, 42, 0.12);
}

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

.btn-primary {
  background: #1E40AF;
  border: none;
  transition: background-color .2s ease, transform .2s ease, box-shadow .2s ease;
}

.btn-primary::before {
  content: none;
}

.btn-primary:hover::before {
  left: auto;
}

.btn-primary:hover {
  background: #1d4ed8;
  transform: translateY(-1px);
  box-shadow: 0 8px 18px rgba(30, 64, 175, .25);
}

.btn-secondary {
  border: 2px solid #1E40AF;
  color: #1E40AF;
  transition: all .3s ease;
}

.btn-secondary:hover {
  background: #1E40AF;
  border-color: #1E40AF;
  color: white;
}

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

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

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

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

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

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

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

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

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

.whatsapp-float {
  position: fixed;
  bottom: 22px;
  right: 22px;
  z-index: 80;
}

.select2-container .select2-selection--single {
  height: 48px;
  border: 1px solid #d1d5db;
  border-radius: 0.5rem;
  display: flex;
  align-items: center;
}

.select2-container {
  width: 100% !important;
}

.select2-container .select2-selection--single .select2-selection__rendered {
  padding-left: 0.75rem;
  padding-right: 2.25rem;
  color: #0f172a;
  line-height: 1.5;
}

.select2-container .select2-selection--single .select2-selection__arrow {
  height: 100%;
  right: 0.75rem;
}

.select2-container--default .select2-selection--single .select2-selection__arrow b {
  border-color: #64748b transparent transparent transparent;
}

.select2-container--default .select2-search--dropdown .select2-search__field {
  border: 1px solid #d1d5db;
  border-radius: 0.5rem;
  padding: 0.5rem 0.75rem;
}

.select2-dropdown {
  border-radius: 0.75rem;
  border: 1px solid #e2e8f0;
  box-shadow: 0 10px 28px rgba(15, 23, 42, 0.12);
}

.select2-container--open .select2-dropdown {
  z-index: 70;
}

@media (max-width: 768px) {

  button,
  [role="button"],
  .btn-primary,
  .btn-secondary,
  .mobile-link,
  #mobile-menu-btn,
  #close-menu-btn {
    min-height: 44px;
    min-width: 44px;
  }
}

.mobile-safe-text {
  max-width: 260px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  display: inline-block;
  vertical-align: bottom;
}

.gallery-modal-hidden {
  display: none;
}

.detail-soft-text {
  color: rgba(248, 250, 252, 0.9);
}

/* Legacy visual refinements requested */
::-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);
}

.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(59, 130, 246, 0.1);
}

.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(59, 130, 246, 0.1) !important;
  color: #1E40AF;
}

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

.whatsapp-float {
  animation: pulse-shadow 2.4s infinite;
  border: none;
  cursor: pointer;
}

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

  70% {
    box-shadow: 0 0 0 14px 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);
}

@media (max-width: 768px) {

  button,
  a,
  .nav-link {
    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;
  }
}

@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;
  }
}

.archive-hero {
  background: linear-gradient(140deg, #0f172a 0%, #1e40af 60%, #0ea5e9 100%);
}

.hero-overlay {
  background: linear-gradient(180deg, rgba(15, 23, 42, 0.55), rgba(15, 23, 42, 0.88));
}

.archive-chip {
  background: rgba(255, 255, 255, 0.15);
  border: 1px solid rgba(255, 255, 255, 0.3);
  backdrop-filter: blur(8px);
}

.clean-card {
  background: #ffffff;
  border: 1px solid #dbe5ef;
  box-shadow: 0 8px 20px rgba(15, 23, 42, 0.06);
}

.package-card {
  background: #ffffff;
  border: 1px solid #dbe5ef;
  box-shadow: 0 10px 20px rgba(15, 23, 42, 0.07);
}

.package-card:hover {
  transform: translateY(-6px);
  box-shadow: 0 18px 35px rgba(15, 23, 42, 0.12);
}

.verse-card {
  border-left: 4px solid #1e40af;
}

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

.blog-content {
  color: #334155;
  line-height: 1.75;
}

.blog-content h1,
.blog-content h2,
.blog-content h3,
.blog-content h4 {
  color: #0f172a;
  font-family: 'Playfair Display', serif;
  margin-top: 1.2em;
  margin-bottom: 0.6em;
}

.blog-content p,
.blog-content ul,
.blog-content ol,
.blog-content blockquote {
  margin-bottom: 1rem;
}

.blog-content ul,
.blog-content ol {
  padding-left: 1.25rem;
}

.blog-content a {
  color: #1e40af;
  text-decoration: underline;
  text-underline-offset: 3px;
}

.blog-content img {
  border-radius: 0.75rem;
  margin: 1rem 0;
  max-width: 100%;
  height: auto;
}

.gallery-tile img {
  transition: transform 0.35s ease, box-shadow 0.35s ease;
}

.gallery-tile:hover img {
  transform: scale(1.03);
  box-shadow: 0 16px 28px rgba(15, 23, 42, 0.18);
}

.page-hero {
  position: relative;
  overflow: hidden;
  color: #ffffff;
  background: linear-gradient(135deg, #0f172a 0%, #1e293b 55%, #1e40af 100%);
}

.page-hero-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(15, 23, 42, 0.2), rgba(15, 23, 42, 0.62));
}

.page-hero .hero-chip {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  padding: 0.45rem 0.9rem;
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, 0.35);
  background: rgba(255, 255, 255, 0.12);
  font-size: 0.8rem;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.section-shell {
  border-radius: 1rem;
  border: 1px solid #dbe5ef;
  background: #ffffff;
  box-shadow: 0 8px 20px rgba(15, 23, 42, 0.06);
}
