/* ==========================================================================
   Vyaaptam Luxury Theme & SXO Stylesheet
   Supports Rock-Solid Header, Light Mode, Dark Midnight Mode, and 3-Level Responsiveness
   ========================================================================== */

/* Smooth color transitions */
html {
  transition: background-color 0.3s ease, color 0.3s ease;
}

/* ==========================================================================
   1. UNIVERSAL ROCK-SOLID HEADER (Never Transparent in Light or Dark Mode)
   ========================================================================== */
header {
  background-color: rgba(250, 247, 242, 0.98) !important;
  backdrop-filter: blur(16px) !important;
  -webkit-backdrop-filter: blur(16px) !important;
  border-bottom: 1px solid #e4ddd1 !important;
  box-shadow: 0 4px 20px -5px rgba(27, 21, 51, 0.05) !important;
  position: sticky !important;
  top: 0 !important;
  z-index: 50 !important;
}

/* ==========================================================================
   MOBILE NAVIGATION DRAWER & UX ENHANCEMENTS
   ========================================================================== */
#mobile-nav {
  position: fixed !important;
  left: 0 !important;
  right: 0 !important;
  bottom: 0 !important;
  width: 100vw !important;
  max-width: 100% !important;
  z-index: 99998 !important;
  background-color: #faf7f2 !important;
  overflow-y: auto !important;
  -webkit-overflow-scrolling: touch !important;
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.15) !important;
}

html.dark #mobile-nav {
  background-color: #0c0a18 !important;
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.6) !important;
}

#mobile-nav ul.space-y-1 > li > a,
#mobile-nav ul.space-y-1 > li > div > a {
  color: #1b1533 !important;
}

html.dark #mobile-nav ul.space-y-1 > li > a,
html.dark #mobile-nav ul.space-y-1 > li > div > a {
  color: #f3f0ff !important;
}

#mobile-nav ul.space-y-1 > li {
  border-color: rgba(27, 21, 51, 0.1) !important;
}

html.dark #mobile-nav ul.space-y-1 > li {
  border-color: rgba(255, 255, 255, 0.1) !important;
}

/* Mobile Services Accordion Sublist */
.mobile-services-sublist {
  background-color: rgba(241, 235, 225, 0.7) !important;
  border-radius: 1rem;
  padding: 1rem !important;
  margin-top: 0.5rem;
  margin-bottom: 0.5rem;
  border: 1px solid rgba(228, 221, 209, 0.8) !important;
}

html.dark .mobile-services-sublist {
  background-color: rgba(26, 20, 48, 0.85) !important;
  border-color: rgba(67, 54, 110, 0.6) !important;
}

.mobile-services-sublist a {
  color: #4b5563 !important;
  font-size: 0.85rem !important;
  line-height: 1.25rem !important;
  padding: 0.35rem 0.5rem !important;
  border-radius: 0.5rem;
  transition: all 0.2s ease;
  display: block;
}

.mobile-services-sublist a:hover {
  color: #1b1533 !important;
  background-color: rgba(0, 0, 0, 0.05);
}

html.dark .mobile-services-sublist a {
  color: #cbd5e1 !important;
}

html.dark .mobile-services-sublist a:hover {
  color: #fb923c !important;
  background-color: rgba(255, 255, 255, 0.08);
}

/* Mobile Hamburger & Close Toggle Button */
button[aria-controls="mobile-nav"] {
  z-index: 100000 !important;
  position: relative;
  transition: all 0.2s ease;
  background-color: #ffffff !important;
  border-color: #e4ddd1 !important;
  color: #1b1533 !important;
}

html.dark button[aria-controls="mobile-nav"] {
  background-color: #1a1430 !important;
  border-color: #3b2c6d !important;
  color: #f3f0ff !important;
}

button[aria-controls="mobile-nav"][aria-expanded="true"] {
  background-color: #ef7a2d !important;
  border-color: #ef7a2d !important;
  color: #ffffff !important;
}

html.dark button[aria-controls="mobile-nav"][aria-expanded="true"] {
  background-color: #ef7a2d !important;
  border-color: #ef7a2d !important;
  color: #ffffff !important;
}

/* ==========================================================================
   FOOTER UNIVERSAL HIGH-CONTRAST DARK THEME GUARANTEE
   ========================================================================== */
footer,
html.dark footer {
  background-color: #0c0a18 !important;
  color: #ffffff !important;
}

footer h3,
html.dark footer h3 {
  color: #ef7a2d !important;
}

footer ul li a,
footer a:not(.text-brand):not(.text-orange):not(.text-emerald-400),
html.dark footer ul li a,
html.dark footer a:not(.text-brand):not(.text-orange):not(.text-emerald-400) {
  color: rgba(255, 255, 255, 0.82) !important;
  transition: color 0.2s ease !important;
}

footer ul li a:hover,
footer a:hover,
html.dark footer ul li a:hover,
html.dark footer a:hover {
  color: #ffffff !important;
}

footer p,
footer span:not(.text-brand):not(.text-orange),
footer li,
html.dark footer p,
html.dark footer span:not(.text-brand):not(.text-orange),
html.dark footer li {
  color: rgba(255, 255, 255, 0.75) !important;
}

footer .text-paper,
footer .text-paper\/75,
footer .text-paper\/70,
footer .text-paper\/85,
footer .text-paper\/60,
footer .text-paper\/55,
html.dark footer .text-paper,
html.dark footer .text-paper\/75,
html.dark footer .text-paper\/70,
html.dark footer .text-paper\/85,
html.dark footer .text-paper\/60,
html.dark footer .text-paper\/55 {
  color: rgba(255, 255, 255, 0.82) !important;
}

footer a.hover\:text-white:hover,
html.dark footer a.hover\:text-white:hover {
  color: #ffffff !important;
}

/* SEO Location Bar inside Footer */
footer .border-t,
html.dark footer .border-t {
  border-color: rgba(255, 255, 255, 0.12) !important;
}

/* Announcement Bar Global Contrast Guarantee */
#top-announcement-bar,
#vyaaptam-top-announcement {
  background-color: #1b1533 !important;
  color: #ffffff !important;
}

#top-announcement-bar span,
#vyaaptam-top-announcement span {
  color: #ffffff !important;
  font-weight: 500 !important;
}

/* ==========================================================================
   2. DARK MIDNIGHT MODE OVERRIDES
   ========================================================================== */
html.dark,
[data-theme="dark"] {
  --color-paper: #0c0a18;
  --color-sand: #16122b;
  --color-line: #262045;
  --color-ink: #f5f3ff;
  --color-ink-soft: #e2ddf8;
  --color-muted: #a39cb8;
  --color-violet-soft: #231842;
  --color-orange-soft: #381a10;
}

html.dark body {
  background-color: #0c0a18 !important;
  color: #f5f3ff !important;
}

/* Dark Header: Opaque dark glass with subtle glowing border */
html.dark header {
  background-color: rgba(12, 10, 24, 0.98) !important;
  backdrop-filter: blur(16px) !important;
  -webkit-backdrop-filter: blur(16px) !important;
  border-bottom: 1px solid #262045 !important;
  box-shadow: 0 4px 25px -5px rgba(0, 0, 0, 0.6) !important;
}

/* Dark Mobile Nav */
html.dark #mobile-nav {
  background-color: #0c0a18 !important;
}

/* Active Nav Link in Header */
html.dark nav a[aria-current="page"],
html.dark nav a.bg-sand {
  background-color: #221a42 !important;
  color: #fb923c !important;
  border: 1px solid #3b2c6d !important;
}

/* ==========================================================================
   3. CARDS, SECTIONS & GLASSMORPHISM (No Bright White Glare in Dark Mode)
   ========================================================================== */
/* High-contrast dark cards, showcase spotlights & calculation boxes across both Light & Dark modes */
.card.bg-ink,
.bg-ink.card,
section.card.bg-ink,
.card-dark,
.bg-ink,
.spotlight-dark-card,
[class*="from-ink"][class*="to-purple-950"],
[class*="from-ink"][class*="to-\[\#2d2252\]"],
.bg-gradient-to-tr.from-ink,
.bg-gradient-to-br.from-ink {
  background: linear-gradient(135deg, #1b1533 0%, #251848 50%, #1b1533 100%) !important;
  color: #ffffff !important;
  border: 1px solid rgba(255, 255, 255, 0.15) !important;
}

.spotlight-dark-card h2,
.spotlight-dark-card h3,
.card.bg-ink h2,
.card.bg-ink h3,
.bg-ink h2,
.bg-ink h3,
section.card.bg-ink h2,
[class*="from-ink"] h2,
[class*="from-ink"] h3 {
  color: #ffffff !important;
}

.spotlight-dark-card p,
.card.bg-ink p,
.bg-ink p,
section.card.bg-ink p,
[class*="from-ink"] p {
  color: rgba(255, 255, 255, 0.9) !important;
}

.spotlight-dark-card .text-paper,
.card.bg-ink .text-paper,
.bg-ink .text-paper,
[class*="from-ink"] .text-paper {
  color: #ffffff !important;
}

.spotlight-dark-card .text-paper\/80,
.card.bg-ink .text-paper\/80,
.bg-ink .text-paper\/80,
[class*="from-ink"] .text-paper\/80 {
  color: rgba(255, 255, 255, 0.88) !important;
}

.spotlight-dark-card .text-paper\/60,
.card.bg-ink .text-paper\/60,
.bg-ink .text-paper\/60,
[class*="from-ink"] .text-paper\/60 {
  color: rgba(255, 255, 255, 0.78) !important;
}

.spotlight-dark-card .text-paper\/70,
.card.bg-ink .text-paper\/70,
.bg-ink .text-paper\/70,
[class*="from-ink"] .text-paper\/70 {
  color: rgba(255, 255, 255, 0.82) !important;
}

.spotlight-dark-card a.btn:not(.btn-brand),
.card.bg-ink a.btn:not(.btn-brand),
.bg-ink a.btn:not(.btn-brand),
[class*="from-ink"] a.btn:not(.btn-brand) {
  color: #ffffff !important;
  border: 1px solid rgba(255, 255, 255, 0.35) !important;
  background-color: rgba(255, 255, 255, 0.08) !important;
}

html.dark .card,
html.dark .bg-white,
html.dark .bg-white\/80,
html.dark .bg-white\/90,
html.dark .bg-white\/95 {
  background-color: #140f2b !important;
  border-color: #2b234d !important;
  color: #f5f3ff !important;
}

html.dark .portfolio-card {
  background-color: #140f2b !important;
  border: 1px solid #2b234d !important;
}

html.dark .portfolio-card:hover {
  border-color: rgba(239, 122, 45, 0.6) !important;
  box-shadow: 0 20px 40px -15px rgba(239, 122, 45, 0.15), 0 0 25px rgba(107, 54, 200, 0.2) !important;
}

html.dark .portfolio-card .bg-sand\/40 {
  background-color: rgba(12, 10, 24, 0.7) !important;
  border-top: 1px solid #262045 !important;
}

html.dark .hover\:bg-sand:hover {
  background-color: #221c3b !important;
}

html.dark .bg-sand,
html.dark .bg-sand\/30,
html.dark .bg-sand\/40,
html.dark .bg-sand\/50,
html.dark .bg-sand\/60,
html.dark .bg-sand\/70 {
  background-color: rgba(22, 18, 43, 0.8) !important;
  border-color: #262045 !important;
}

html.dark .border-line {
  border-color: #262045 !important;
}

html.dark .text-ink {
  color: #f5f3ff !important;
}

html.dark .text-muted {
  color: #a39cb8 !important;
}

/* ==========================================================================
   4. METRIC BADGES & TAGS (Fixing White Box Glitch in Dark Theme)
   ========================================================================== */
html.dark .bg-emerald-50,
html.dark .bg-emerald-100 {
  background-color: rgba(6, 78, 59, 0.45) !important;
  color: #34d399 !important;
  border: 1px solid rgba(52, 211, 153, 0.35) !important;
}

html.dark .bg-purple-100,
html.dark .bg-purple-50 {
  background-color: rgba(88, 28, 135, 0.45) !important;
  color: #c084fc !important;
  border: 1px solid rgba(192, 132, 252, 0.35) !important;
}

html.dark .bg-brand\/10,
html.dark .bg-brand\/5 {
  background-color: rgba(239, 122, 45, 0.2) !important;
  color: #fb923c !important;
  border: 1px solid rgba(239, 122, 45, 0.3) !important;
}

html.dark .bg-orange\/10,
html.dark .bg-orange\/5 {
  background-color: rgba(249, 115, 22, 0.2) !important;
  color: #fb923c !important;
  border: 1px solid rgba(249, 115, 22, 0.3) !important;
}

html.dark .bg-magenta\/10,
html.dark .bg-magenta\/5 {
  background-color: rgba(194, 45, 134, 0.2) !important;
  color: #f472b6 !important;
  border: 1px solid rgba(194, 45, 134, 0.3) !important;
}

/* Verified Pill */
html.dark .portfolio-card .bg-sand {
  background-color: rgba(255, 255, 255, 0.08) !important;
  color: #c4bdd6 !important;
  border: 1px solid rgba(255, 255, 255, 0.12) !important;
}

/* ==========================================================================
   5. PORTFOLIO FILTER BUTTONS (High-Contrast Day & Midnight Styles)
   ========================================================================== */
.filter-btn {
  transition: all 0.25s ease !important;
}

html.dark .filter-btn.active {
  background: linear-gradient(135deg, #ef7a2d, #c22d86) !important;
  color: #ffffff !important;
  border: 1px solid rgba(255, 255, 255, 0.2) !important;
  box-shadow: 0 4px 18px rgba(239, 122, 45, 0.45) !important;
}

html.dark .filter-btn:not(.active) {
  background-color: #1e183a !important;
  color: #a39cb8 !important;
  border: 1px solid #2d2452 !important;
}

html.dark .filter-btn:not(.active):hover {
  background-color: #2b2353 !important;
  color: #ffffff !important;
  border-color: rgba(239, 122, 45, 0.4) !important;
}

/* ==========================================================================
   6. FORM INPUTS & INTERACTIVE CONTROLS
   ========================================================================== */
html.dark input,
html.dark select,
html.dark textarea {
  background-color: #1b1535 !important;
  color: #f5f3ff !important;
  border-color: #312856 !important;
}

html.dark input::placeholder,
html.dark textarea::placeholder {
  color: #797194 !important;
}

html.dark .team-card {
  background-color: #151128 !important;
  border-color: #2b234d !important;
}

html.dark .team-front,
html.dark .team-back {
  color: #f5f3ff !important;
}

/* Theme Toggle Button */
.theme-toggle-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 2.375rem;
  height: 2.375rem;
  border-radius: 9999px;
  border: 1px solid var(--color-line);
  background: var(--color-sand);
  color: var(--color-ink);
  transition: all 0.25s ease;
  cursor: pointer;
}

.theme-toggle-btn:hover {
  transform: rotate(15deg) scale(1.08);
  border-color: var(--color-orange);
}

html.dark .theme-toggle-btn {
  background: #1e183a;
  color: #fbbf24;
  border-color: #3b3068;
}

/* Services Mega Dropdown */
.services-mega-menu {
  box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.25), 0 0 0 1px rgba(0, 0, 0, 0.05);
}

html.dark .services-mega-menu {
  background-color: #140f2b !important;
  box-shadow: 0 25px 60px -10px rgba(0, 0, 0, 0.8), 0 0 0 1px rgba(255, 255, 255, 0.1) !important;
}