:root {
  --primary-color: #1769e0;
  --primary-deep: #123d87;
  --primary-soft: #eaf2ff;
  --accent-color: #ffb547;
  --button-hover: #1257bd;
  --logo-bg: #1769e0;
  --app-canvas: #f5f8fd;
  --app-ink: #172b4d;
  --app-muted: #62738c;
  --app-line: #dfe8f4;
  --app-gutter: clamp(14px, 2.2vw, 36px);
}

* { box-sizing: border-box; }
html { min-width: 320px; scroll-behavior: smooth; }
body {
  width: 100%; min-height: 100vh; margin: 0; overflow-x: hidden;
  color: var(--app-ink); background: var(--app-canvas);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, "Segoe UI", sans-serif;
  -webkit-font-smoothing: antialiased;
}
img { max-width: 100%; height: auto; }

/* One consistent page width across header, content and footer. */
.navbar-custom .container,
.main-content > .container,
.custom-premium-footer > .container,
.custom-bottom-bar > .container {
  width: calc(100% - 2 * var(--app-gutter)) !important;
  max-width: 1640px !important;
  padding-right: 0 !important; padding-left: 0 !important;
  margin-right: auto !important; margin-left: auto !important;
}
.navbar-custom {
  position: sticky; top: 0; z-index: 1025; width: 100%;
  padding: 10px 0; border: 0; border-bottom: 1px solid rgba(255,255,255,.15);
  background: linear-gradient(110deg, #123d87 0%, #1769e0 62%, #2585f5 100%) !important;
  box-shadow: 0 8px 24px rgba(18,61,135,.18) !important;
}
.navbar-custom .container { display: flex; align-items: center; flex-wrap: wrap; }
.navbar-custom .navbar-brand { display: flex; align-items: center; flex: 0 1 auto; min-width: 0; margin-right: 1rem; }
.digital-land-logo {
  flex: 0 0 46px; width: 46px !important; height: 46px !important;
  border: 2px solid rgba(255,255,255,.9) !important; border-radius: 14px !important;
  box-shadow: 0 5px 14px rgba(4,30,75,.2) !important;
}
.brand-text { min-width: 0; }
.brand-text .brand-title { color: #fff !important; font-size: clamp(1.1rem, 1.8vw, 1.4rem) !important; line-height: 1.2; letter-spacing: -.02em; white-space: nowrap; }
.brand-text p { margin: 2px 0 0; color: rgba(255,255,255,.82) !important; font-size: .76rem; line-height: 1.25; white-space: nowrap; }
.navbar-toggler { flex: 0 0 auto; margin-left: auto; border: 1px solid rgba(255,255,255,.5) !important; border-radius: 12px; }
.navbar-toggler:focus { box-shadow: 0 0 0 .2rem rgba(255,255,255,.22) !important; }
.navbar-toggler-icon { filter: invert(1); }
.navbar-custom .navbar-collapse { flex-basis: 100%; }
.navbar-nav { align-items: stretch; }
.nav-link-custom { color: rgba(255,255,255,.95) !important; font-weight: 600; font-size: .94rem; padding: 10px 13px !important; border-radius: 11px; transition: background .18s ease; }
.nav-link-custom:hover, .nav-link-custom:focus, .nav-link-custom[aria-expanded="true"] { color: #fff !important; background: rgba(255,255,255,.15); }
.dropdown-menu-custom { max-height: min(72vh, 680px); overflow-y: auto; border: 1px solid var(--app-line) !important; border-top: 3px solid var(--accent-color) !important; border-radius: 14px; box-shadow: 0 14px 34px rgba(15,40,82,.18); }
.dropdown-item-custom { color: #2b3f5f; }
.dropdown-item-custom:hover, .dropdown-item-custom:focus { color: var(--primary-color); background: var(--primary-soft); }

.main-content { width: 100%; flex: 1 0 auto; }
.main-content > .container { padding-top: clamp(16px, 2.1vw, 30px); padding-bottom: 22px; }
.main-content .row { --bs-gutter-x: clamp(12px, 1.35vw, 22px); --bs-gutter-y: clamp(12px, 1.35vw, 22px); }
.card-custom {
  color: var(--app-ink); border: 1px solid var(--app-line) !important;
  border-radius: 20px; background: #fff; box-shadow: 0 8px 26px rgba(28,55,95,.07) !important;
}
.card-header-custom { color: #fff !important; border-radius: 19px 19px 0 0 !important; background: linear-gradient(110deg, #1456bd, #2585f5) !important; }

/* Homepage introduction and quick service search. */
.home-hero {
  position: relative; display: grid; grid-template-columns: minmax(0, 1.15fr) minmax(220px, .85fr);
  align-items: center; gap: clamp(20px, 4vw, 56px); min-height: 260px;
  padding: clamp(24px, 4vw, 52px); overflow: hidden; color: #fff;
  border: 1px solid rgba(255,255,255,.2); border-radius: 28px;
  background: radial-gradient(circle at 82% 35%, rgba(127,190,255,.45), transparent 27%), linear-gradient(120deg, #123d87 0%, #1769e0 62%, #2788f5 100%);
  box-shadow: 0 18px 44px rgba(23,105,224,.18);
}
.home-hero::after { content: ""; position: absolute; width: 290px; height: 290px; right: 7%; bottom: -210px; border: 1px solid rgba(255,255,255,.2); border-radius: 50%; box-shadow: 0 0 0 24px rgba(255,255,255,.045), 0 0 0 48px rgba(255,255,255,.04); }
.home-hero-copy, .home-hero-art { position: relative; z-index: 1; }
.home-hero h1 { max-width: 760px; margin: 0 0 12px; color: #fff; font-size: clamp(1.8rem, 4.2vw, 3.35rem); font-weight: 800; line-height: 1.18; letter-spacing: -.035em; }
.home-hero p { max-width: 730px; margin: 0; color: rgba(255,255,255,.87); font-size: clamp(.98rem, 1.45vw, 1.13rem); line-height: 1.7; }
.home-hero-art { display: grid; place-items: center; min-height: 150px; }
.home-hero-art-icon { display: grid; place-items: center; width: clamp(120px, 17vw, 190px); aspect-ratio: 1; color: #fff; border: 1px solid rgba(255,255,255,.45); border-radius: 38px; background: linear-gradient(145deg, rgba(255,255,255,.24), rgba(255,255,255,.08)); box-shadow: inset 0 1px 0 rgba(255,255,255,.32), 0 18px 45px rgba(4,37,97,.2); transform: rotate(4deg); }
.home-hero-art-icon i { font-size: clamp(3rem, 7vw, 5rem); transform: rotate(-4deg); }
.home-hero-actions { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 22px; }
.home-hero-actions .btn { min-height: 46px; padding: 10px 17px; border-radius: 12px; font-weight: 700; }
.home-hero-actions .btn-light { color: var(--primary-deep); }
.home-search-wrap { display: flex; align-items: center; gap: 12px; max-width: 780px; margin: 22px auto 26px; padding: 7px 8px 7px 17px; border: 1px solid var(--app-line); border-radius: 16px; background: #fff; box-shadow: 0 8px 24px rgba(22,54,101,.07); }
.home-search-wrap i { color: #6b7d98; }
.home-search-wrap input { flex: 1; min-width: 0; height: 46px; padding: 8px; border: 0; outline: 0; box-shadow: none !important; }
.home-search-wrap input:focus { border: 0; }
.home-search-wrap .btn { min-height: 44px; padding: 9px 17px; border-radius: 12px; }
.home-section-heading { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin: 8px 0 16px; }
.home-section-heading h2 { margin: 0; color: var(--app-ink); font-size: clamp(1.2rem, 2vw, 1.55rem); font-weight: 800; }
.home-section-heading p { margin: 4px 0 0; color: var(--app-muted); font-size: .9rem; }

.menu-btn {
  display: flex; align-items: center; justify-content: center; min-height: 88px; height: 100%;
  padding: 18px 15px; overflow-wrap: anywhere; text-align: center; line-height: 1.45;
  color: #fff !important; border: 1px solid rgba(255,255,255,.22) !important; border-radius: 18px;
  background: linear-gradient(145deg, #287df0, #1456bd) !important;
  box-shadow: 0 8px 18px rgba(20,86,189,.16) !important; font-weight: 700; text-decoration: none;
  transition: transform .18s ease, box-shadow .18s ease, filter .18s ease;
}
.menu-btn:hover, .menu-btn:focus-visible { color: #fff !important; background: linear-gradient(145deg, #1769e0, #10489f) !important; box-shadow: 0 13px 26px rgba(20,86,189,.24) !important; transform: translateY(-2px); }
.badge-new { top: 8px; left: 9px; padding: 4px 7px; color: #123d87; border-radius: 999px; background: #ffcf73; font-size: .62rem; font-weight: 800; }

.btn, .form-control, .form-select, .input-group-text { min-height: 44px; border-radius: 12px; }
.btn { font-weight: 650; transition: transform .16s ease, box-shadow .16s ease; }
.btn-primary, .blinking-action-btn { color: #fff !important; border-color: #1769e0 !important; background: linear-gradient(135deg, #1769e0, #2585f5) !important; }
.btn-primary:hover, .blinking-action-btn:hover { background: linear-gradient(135deg, #1456bd, #123d87) !important; }
.main-content .btn:not(.btn-outline-secondary):not(.btn-outline-light):not(.btn-link):not(.btn-light) { color: #fff !important; border-color: #1769e0 !important; background: linear-gradient(135deg, #1769e0, #2585f5) !important; }
.main-content .btn:not(.btn-outline-secondary):not(.btn-outline-light):not(.btn-link):not(.btn-light):hover { background: linear-gradient(135deg, #1456bd, #123d87) !important; }
.form-control, .form-select { border-color: #d4dfed; background-color: #fff; }
.form-control:focus, .form-select:focus { border-color: #4589ea; box-shadow: 0 0 0 .22rem rgba(23,105,224,.14); }
.card-custom img { border-radius: 15px; }
.alert { border-radius: 16px; }

.custom-premium-footer {
  margin-top: clamp(28px, 4vw, 56px) !important; padding-top: clamp(32px, 4vw, 56px) !important;
  color: #e8f0ff; border-top: 4px solid #4d9bff; background: linear-gradient(145deg, #102a56, #153b78) !important;
}
.custom-premium-footer .footer-title,
.custom-premium-footer .footer-desc,
.custom-premium-footer .copyright-text,
.custom-premium-footer .developer-text { color: #eaf2ff !important; }
.custom-premium-footer .footer-link { color: #d7e6ff !important; }
.custom-premium-footer .footer-link:hover { color: #8fc0ff !important; }
.custom-premium-footer .footer-calc-btn {
  display: block; height: 100%; min-height: 68px; color: #fff !important;
  border: 1px solid rgba(255,255,255,.18); border-radius: 13px;
  background: rgba(40,125,240,.2); transition: transform .18s ease, background .18s ease;
}
.custom-premium-footer .footer-calc-btn i { color: #9cc9ff !important; }
.custom-premium-footer .footer-calc-btn:hover { color: #fff !important; background: rgba(40,125,240,.42); transform: translateY(-2px); }
.custom-premium-footer .footer-calc-btn-main { border-color: rgba(143,192,255,.55); background: #1769e0; }
.footer-divider { border-color: rgba(255,255,255,.24); }
.small-btn-text { white-space: normal; overflow-wrap: anywhere; }

.custom-bottom-bar {
  left: 0 !important; right: 0 !important; width: 100% !important; max-width: none !important;
  height: auto !important; min-height: 68px; padding: 6px 0 calc(5px + env(safe-area-inset-bottom));
  border-top: 1px solid #dce7f5 !important; background: rgba(255,255,255,.97) !important;
  box-shadow: 0 -8px 24px rgba(23,57,105,.12) !important; backdrop-filter: blur(14px);
}
.custom-bottom-bar .container { min-height: 58px; }
.bottom-nav-link { flex: 1 1 0; min-width: 0; color: #516580; text-decoration: none; }
.bottom-nav-link .nav-icon, .bottom-nav-link .nav-text { color: #516580; }
.bottom-nav-link:hover .nav-icon, .bottom-nav-link:focus .nav-icon { color: #1769e0 !important; }
.app-calc-btn { color: #1456bd; }
.calc-icon-circle { background: linear-gradient(135deg, #287df0, #1456bd); box-shadow: 0 7px 18px rgba(23,105,224,.3); }
.calc-btn-text { color: #1456bd !important; }
#pwa-final-bar { bottom: calc(80px + env(safe-area-inset-bottom)); border-color: #9ec7ff; border-radius: 18px; }
.btn-jugar-action { background: linear-gradient(135deg, #1769e0, #2585f5) !important; }

@media (min-width: 768px) {
  .navbar-custom .navbar-collapse { flex: 1 1 auto; flex-basis: auto; }
  .navbar-nav { flex-direction: row; align-items: center; }
  .navbar-nav.mt-3 { margin-top: 0 !important; }
  .main-content > .container { padding-bottom: 32px; }
}
@media (max-width: 767.98px) {
  body { padding-bottom: calc(78px + env(safe-area-inset-bottom)) !important; }
  footer { margin-bottom: calc(70px + env(safe-area-inset-bottom)); }
  .navbar-custom { padding: 8px 0; }
  .navbar-custom .navbar-collapse { flex-basis: 100%; max-height: calc(100dvh - 74px); overflow-y: auto; overscroll-behavior: contain; }
  .navbar-nav { padding: 8px 0 4px; }
  .nav-link-custom { margin-right: 0 !important; }
  .dropdown-menu-custom { max-height: none; border-radius: 13px; background: rgba(255,255,255,.98); }
  .mobile-calc-header { color: #1456bd !important; }
  .mobile-calc-item { color: #263c5b !important; border-left-color: #bfd7f8 !important; }
  .mobile-calc-item:hover { color: #1456bd !important; background: #edf4ff !important; }
  .dropdown-divider-custom { border-color: #dce7f5; }
  .main-content > .container { padding-top: 15px; }
  .home-hero { grid-template-columns: minmax(0, 1fr); min-height: auto; gap: 12px; padding: 25px 20px; border-radius: 22px; }
  .home-hero-art { display: none; }
  .home-hero h1 { font-size: clamp(1.7rem, 7vw, 2.45rem); }
  .home-hero p { font-size: .96rem; }
  .home-hero-actions { margin-top: 17px; }
  .home-hero-actions .btn { flex: 1 1 auto; }
  .home-search-wrap { gap: 8px; margin: 16px 0 22px; padding: 6px 7px 6px 13px; }
  .home-search-wrap input { font-size: .95rem; }
  .home-search-wrap .btn { padding-inline: 12px; }
  .menu-btn { min-height: 78px; padding: 13px 10px; border-radius: 15px; font-size: .91rem; }
  .card-custom { border-radius: 17px; }
  .card-custom .p-4 { padding: 1rem !important; }
  .custom-premium-footer .footer-calc-btn { min-height: 62px; padding: 8px 4px !important; }
  .custom-bottom-bar .container { width: calc(100% - 16px) !important; }
  .bottom-nav-link .nav-text, .calc-btn-text { font-size: .68rem; }
  .calc-icon-circle { width: 50px; height: 50px; }
  #pwa-final-bar { bottom: calc(78px + env(safe-area-inset-bottom)); width: calc(100% - 24px); padding: 10px 12px; }
  .pwa-jugar-info { gap: 8px; }
  .btn-jugar-action { padding: 8px 11px; }
}
@media (max-width: 380px) {
  .brand-text p { display: none; }
  .digital-land-logo { margin-right: .6rem !important; }
  .home-search-wrap .btn { padding-inline: 9px; }
  .custom-premium-footer .small-btn-text { font-size: .62rem; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { scroll-behavior: auto !important; animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; }
}
