:root {
  --titan-bg-0: #0d1221;
  --titan-bg-1: #121a31;
  --titan-bg-2: #1a2540;
  --titan-panel: #131d34;
  --titan-panel-soft: #16233f;
  --titan-line: rgba(214, 173, 107, 0.22);
  --titan-text: #e8edf8;
  --titan-muted: #9fb0cf;
  --titan-accent-gold: #d6ad6b;
  --titan-accent-blue: #5c79d0;
  --titan-success: #3ecf8e;
  --titan-danger: #f07178;
  --titan-header-height-desktop: 112px;
  --titan-header-height-mobile: 102px;
  --titan-anchor-offset-desktop: calc(var(--titan-header-height-desktop) + 28px);
  --titan-anchor-offset-mobile: calc(var(--titan-header-height-mobile) + 28px);
}

* {
  box-sizing: border-box;
}

body.titan-theme {
  font-family: "Inter", sans-serif;
  color: var(--titan-text);
  background:
    radial-gradient(circle at 85% -12%, rgba(92, 121, 208, 0.22), transparent 42%),
    radial-gradient(circle at 8% 12%, rgba(214, 173, 107, 0.12), transparent 33%),
    linear-gradient(180deg, var(--titan-bg-0) 0%, var(--titan-bg-1) 55%, #0f162a 100%);
  min-height: 100vh;
}

.titan-theme h1,
.titan-theme h2,
.titan-theme h3,
.titan-theme h4,
.titan-theme h5,
.titan-theme h6 {
  color: #efe4d2;
  font-family: "Space Grotesk", "Inter", sans-serif;
}

.titan-theme p,
.titan-theme .text-muted,
.titan-theme .form-text {
  color: var(--titan-muted) !important;
}

.titan-header {
  background: linear-gradient(135deg, rgba(8, 12, 24, 0.98), rgba(13, 20, 38, 0.98));
  border-bottom: 1px solid var(--titan-line);
  backdrop-filter: blur(10px);
  position: sticky;
  top: 0;
  z-index: 1200;
  isolation: isolate;
}

.titan-header .container-fluid {
  min-height: var(--titan-header-height-desktop);
  gap: 0.75rem;
}

.titan-brand {
  margin-left: 50px;
}

.titan-brand img {
  height: 88px;
  width: auto;
  max-width: min(58vw, 360px);
  object-fit: contain;
}

.titan-nav ul li a,
.titan-nav a {
  color: #c8d4ea !important;
  font-weight: 600;
}

.titan-nav ul li a:hover,
.titan-nav ul li a.active {
  color: #efd2a6 !important;
}

.titan-login-btn,
.titan-user-btn {
  border-radius: 10px;
  border: 1px solid rgba(214, 173, 107, 0.45);
  background: linear-gradient(135deg, rgba(214, 173, 107, 0.16), rgba(92, 121, 208, 0.16));
  color: #f3e4cc !important;
  font-weight: 700;
  padding: 0.45rem 0.85rem;
}

.titan-login-btn:hover,
.titan-user-btn:hover {
  background: linear-gradient(135deg, rgba(214, 173, 107, 0.25), rgba(92, 121, 208, 0.25));
}

.titan-dropdown {
  background: #121c32;
  border: 1px solid var(--titan-line);
  border-radius: 12px;
  padding: 0.5rem;
  z-index: 1300;
}

.titan-dropdown .dropdown-item {
  color: #d3dff2;
  border-radius: 8px;
}

.titan-dropdown .dropdown-item:hover {
  background: rgba(92, 121, 208, 0.2);
  color: #f0d9b4;
}

.titan-dropdown .dropdown-divider {
  border-color: rgba(214, 173, 107, 0.2);
}

.titan-theme .main {
  padding-top: 1.1rem;
  position: relative;
}

.titan-theme.index-page section,
.titan-theme.index-page .section {
  padding: 34px 0 !important;
}

.titan-theme.index-page .row.gy-5 {
  --bs-gutter-y: 1.4rem;
}

.titan-theme.index-page .row.gy-4 {
  --bs-gutter-y: 1.05rem;
}

.titan-theme.index-page .hero {
  min-height: 58vh;
  padding: 56px 0 28px 0 !important;
}

.titan-theme.index-page .hero h1 {
  font-size: clamp(1.7rem, 3.1vw, 2.55rem) !important;
  font-weight: 700 !important;
  line-height: 1.2 !important;
  margin-bottom: 0.65rem !important;
}

.titan-theme.index-page .hero p {
  font-size: clamp(0.95rem, 1.25vw, 1.1rem) !important;
  line-height: 1.4 !important;
  margin: 0 0 0.95rem 0 !important;
}

.titan-theme.index-page .section-title {
  padding: 8px 0 !important;
  margin-bottom: 8px !important;
}

.titan-theme.index-page .section-title h2 {
  font-size: clamp(1.4rem, 2vw, 1.95rem) !important;
  font-weight: 700 !important;
  margin-bottom: 6px !important;
}

.titan-theme.index-page .section-title span {
  display: none !important;
}

.titan-theme.index-page h3 {
  font-size: clamp(1.08rem, 1.5vw, 1.35rem) !important;
  font-weight: 700 !important;
}

.titan-theme.index-page .service-item p,
.titan-theme.index-page .about p,
.titan-theme.index-page .team p,
.titan-theme.index-page .contact p {
  font-size: 0.98rem !important;
  line-height: 1.45 !important;
}

.titan-theme section,
.titan-theme .section {
  scroll-margin-top: var(--titan-anchor-offset-desktop);
}

.titan-theme .section,
.titan-theme .hero,
.titan-theme .featured-services,
.titan-theme .services,
.titan-theme .about,
.titan-theme .team,
.titan-theme .contact,
.titan-theme .light-background {
  background-color: transparent !important;
}

.titan-theme .service-item,
.titan-theme .info-wrap,
.titan-theme .pricing-zoom,
.titan-theme .php-email-form {
  background: rgba(19, 29, 52, 0.88) !important;
  border: 1px solid rgba(214, 173, 107, 0.18) !important;
  border-radius: 16px;
}

.titan-theme .pricing-zoom .card-body {
  display: flex;
  flex-direction: column;
  height: 100%;
}

.titan-theme .pricing-zoom .list-group {
  flex: 1 1 auto;
}

.titan-theme .pricing-zoom .btn.btnprimary {
  margin-top: auto;
}

.titan-theme .btn-primary,
.titan-theme .btn-success,
.titan-theme .btn-warning,
.titan-theme .btn-info,
.titan-theme .btn-danger,
.titan-theme .btn.btnprimary {
  border: 0;
  border-radius: 10px;
  font-weight: 700;
}

.titan-theme .btn-primary,
.titan-theme .btn.btnprimary {
  color: #142039;
  background: linear-gradient(135deg, #edd4a8, #d6ad6b);
}

.titan-theme .btn-success {
  color: #092219;
  background: linear-gradient(135deg, #8be7bf, #3ecf8e);
}

.titan-theme .btn-warning {
  color: #2d220f;
  background: linear-gradient(135deg, #f4d9a4, #d6ad6b);
}

.titan-theme .btn-danger {
  color: #2a1114;
  background: linear-gradient(135deg, #f7a0a6, #f07178);
}

.titan-theme .btn-info {
  color: #101f34;
  background: linear-gradient(135deg, #a8d0ff, #6c95e8);
}

.titan-theme .card,
.titan-theme .modal-content,
.titan-theme .list-group-item,
.titan-theme .table,
.titan-theme .table-responsive {
  background: rgba(19, 29, 52, 0.9);
  color: #e6ecf8;
  border-color: rgba(214, 173, 107, 0.16);
}

.titan-theme .card,
.titan-theme .modal-content {
  border: 1px solid rgba(214, 173, 107, 0.2);
  border-radius: 14px;
}

/* Global modal layering fix for all tenant/admin CRUD popups */
.titan-theme .modal {
  z-index: 2000 !important;
}

.titan-theme .modal-backdrop {
  z-index: 1990 !important;
}

body.modal-open .titan-header {
  pointer-events: none;
}

body.modal-open .navmenu,
body.modal-open .mobile-nav-toggle {
  z-index: 1100 !important;
}

.titan-theme .list-group-item {
  border: 1px solid rgba(214, 173, 107, 0.16);
  margin-bottom: 0.4rem;
  border-radius: 10px !important;
  color: #cad7ee;
}

.titan-theme .list-group-item.active {
  background: linear-gradient(135deg, rgba(214, 173, 107, 0.28), rgba(92, 121, 208, 0.28));
  border-color: rgba(214, 173, 107, 0.45);
  color: #f0dfc4;
}

.titan-theme .table > :not(caption) > * > * {
  background: transparent;
  color: #dde6f7;
  border-bottom-color: rgba(214, 173, 107, 0.14);
}

.titan-theme .table-striped > tbody > tr:nth-of-type(odd) > * {
  background: rgba(255, 255, 255, 0.02);
}

.titan-theme .form-control,
.titan-theme .form-select,
.titan-theme textarea,
.titan-theme input,
.titan-theme select {
  background: rgba(11, 18, 33, 0.76);
  color: #eaf0fb;
  border: 1px solid rgba(132, 156, 201, 0.45);
  border-radius: 10px;
}

.titan-theme .form-control:focus,
.titan-theme .form-select:focus,
.titan-theme textarea:focus {
  border-color: rgba(214, 173, 107, 0.65);
  box-shadow: 0 0 0 0.2rem rgba(214, 173, 107, 0.2);
}

.titan-theme .form-check-input {
  background-color: rgba(11, 18, 33, 0.9);
  border-color: rgba(132, 156, 201, 0.55);
}

.titan-theme .form-check-input:checked {
  background-color: #d6ad6b;
  border-color: #d6ad6b;
}

.titan-theme .alert {
  border-radius: 12px;
  border-width: 1px;
}

.titan-theme .alert-success {
  background: rgba(62, 207, 142, 0.16);
  border-color: rgba(62, 207, 142, 0.45);
  color: #b9f1d4;
}

.titan-theme .alert-danger {
  background: rgba(240, 113, 120, 0.16);
  border-color: rgba(240, 113, 120, 0.45);
  color: #ffd5d8;
}

.titan-theme .alert-info {
  background: rgba(92, 121, 208, 0.16);
  border-color: rgba(92, 121, 208, 0.45);
  color: #cbd8f6;
}

.titan-theme .badge.bg-primary,
.titan-theme .badge.bg-info {
  background: linear-gradient(135deg, rgba(92, 121, 208, 0.85), rgba(56, 90, 172, 0.95)) !important;
}

.titan-theme .badge.bg-success {
  background: linear-gradient(135deg, rgba(62, 207, 142, 0.85), rgba(44, 165, 113, 0.95)) !important;
}

.titan-theme .badge.bg-danger {
  background: linear-gradient(135deg, rgba(240, 113, 120, 0.88), rgba(193, 67, 74, 0.95)) !important;
}

.titan-theme .badge.bg-warning {
  background: linear-gradient(135deg, rgba(214, 173, 107, 0.92), rgba(188, 140, 70, 0.98)) !important;
  color: #1b1510 !important;
}

.titan-footer {
  background: linear-gradient(180deg, #10182d, #0c1324);
  border-top: 1px solid var(--titan-line);
}

.titan-footer .titan-footer-brand {
  gap: 0.55rem;
}

.titan-footer .titan-footer-mark {
  width: 28px;
  height: 28px;
}

#footer.titan-footer .footer-about .titan-footer-brand {
  display: inline-flex !important;
  align-items: center;
  justify-content: center;
  gap: 0;
  background: transparent;
  border: 0;
  padding: 0;
}

#footer.titan-footer .footer-about .titan-footer-logo-coin {
  width: clamp(42px, 3.3vw, 66px);
  height: clamp(42px, 3.3vw, 66px);
  max-width: 66px;
  max-height: 66px;
  overflow: hidden;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: transparent;
  border: 0;
}

#footer.titan-footer .footer-about .titan-footer-logo {
  width: 100%;
  height: 100%;
  display: block !important;
  object-fit: contain;
}

.titan-footer .footer-links a,
.titan-footer .social-links a,
.titan-footer .credits,
.titan-footer .copyright {
  color: #b8c8e5;
}

.titan-footer .footer-links a:hover,
.titan-footer .social-links a:hover {
  color: #efd2a6;
}

.titan-theme .scroll-top {
  background: linear-gradient(135deg, #d6ad6b, #b78645);
  color: #1a1520;
}

/* Keep desktop-style menu on common laptop/desktop widths (>= 992px). */
@media (min-width: 992px) {
  .titan-header .titan-brand {
    order: 1 !important;
  }

  .titan-header .titan-nav {
    order: 2 !important;
  }

  .titan-header .titan-login-btn,
  .titan-header .dropdown {
    order: 3 !important;
  }

  .titan-nav {
    padding: 0 !important;
    background: transparent !important;
    border: 0 !important;
  }

  .titan-nav ul {
    display: flex !important;
    position: static !important;
    inset: auto !important;
    margin: 0 !important;
    padding: 0 !important;
    background: transparent !important;
    border: 0 !important;
    box-shadow: none !important;
    overflow: visible !important;
  }

  .titan-nav ul li a,
  .titan-nav a {
    padding: 12px 9px !important;
    font-size: 14px !important;
    white-space: nowrap;
  }

  .titan-nav .mobile-nav-toggle,
  .titan-header .mobile-nav-toggle {
    display: none !important;
  }
}

@media (max-width: 991.98px) {
  .titan-brand img {
    height: 76px;
    max-width: 74vw;
  }

  .titan-theme.index-page .hero {
    min-height: auto;
    padding: 42px 0 20px 0 !important;
  }

  .titan-theme.index-page .section-title h2 {
    font-size: clamp(1.25rem, 5vw, 1.55rem) !important;
  }

  .titan-nav {
    background: rgba(16, 24, 44, 0.96);
    border-radius: 12px;
    border: 1px solid rgba(214, 173, 107, 0.2);
    padding: 0.7rem;
  }
}

@media (max-width: 575.98px) {
  .titan-brand img {
    height: 64px;
  }

  .titan-theme.index-page .hero h1 {
    font-size: clamp(1.35rem, 7vw, 1.8rem) !important;
  }
}

@media (max-width: 1199.98px) {
  .titan-header .container-fluid {
    min-height: var(--titan-header-height-mobile);
  }

  .titan-theme section,
  .titan-theme .section {
    scroll-margin-top: var(--titan-anchor-offset-mobile);
  }
}
