/* Chartered Tax Consultants - Futuristic Luxury Styling (Dual Light & Dark Modes) */
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700&family=Outfit:wght@400;500;600;700;800;900&display=swap');

:root {
  --bg-deep-navy: #060B18;
  --bg-navy-card: #0D1527;
  --bg-navy-elevated: #152238;
  --header-bg: rgba(6, 11, 24, 0.85);
  --topbar-bg: rgba(4, 8, 18, 0.95);
  --footer-bg: #040812;
  --card-bg: rgba(13, 21, 39, 0.75);
  --input-bg: rgba(6, 11, 24, 0.7);
  --accent-gold: #D4AF37;
  --accent-gold-bright: #F5D061;
  --accent-gold-dark: #A8841B;
  --accent-gold-glow: rgba(212, 175, 55, 0.25);
  --text-main: #F8FAFC;
  --text-muted: #94A3B8;
  --text-dark: #1E293B;
  --border-gold-subtle: rgba(212, 175, 55, 0.22);
  --border-glass: rgba(255, 255, 255, 0.08);
  --table-header-bg: rgba(6, 11, 24, 0.8);
  --font-heading: 'Outfit', -apple-system, BlinkMacSystemFont, sans-serif;
  --font-body: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
  --radius-sm: 8px;
  --radius-md: 16px;
  --radius-lg: 24px;
  --transition-smooth: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

/* Premium Light Theme Override */
[data-theme="light"] {
  --bg-deep-navy: #F8FAFC;
  --bg-navy-card: #FFFFFF;
  --bg-navy-elevated: #F1F5F9;
  --header-bg: rgba(255, 255, 255, 0.94);
  --topbar-bg: #F1F5F9;
  --footer-bg: #EDF2F7;
  --card-bg: #FFFFFF;
  --input-bg: #FFFFFF;
  --accent-gold: #B8860B;
  --accent-gold-bright: #C59B27;
  --accent-gold-dark: #8B6508;
  --accent-gold-glow: rgba(184, 134, 11, 0.18);
  --text-main: #0F172A;
  --text-muted: #475569;
  --text-dark: #0F172A;
  --border-gold-subtle: rgba(184, 134, 11, 0.3);
  --border-glass: rgba(0, 0, 0, 0.09);
  --table-header-bg: #F1F5F9;
}

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  font-family: var(--font-body);
  background-color: var(--bg-deep-navy);
  color: var(--text-main);
  transition: background-color 0.4s ease, color 0.4s ease;
  width: 100%;
  max-width: 100%;
  overflow-x: hidden;
}

body {
  width: 100%;
  max-width: 100%;
  overflow-x: hidden;
  position: relative;
  background: var(--bg-deep-navy);
  color: var(--text-main);
  line-height: 1.6;
  transition: background-color 0.4s ease, color 0.4s ease;
}

/* Dual Logo Image Visibility Controls */
.logo-light-img {
  display: none !important;
}

.logo-dark-img {
  display: inline-block !important;
}

[data-theme="light"] .logo-light-img {
  display: inline-block !important;
}

[data-theme="light"] .logo-dark-img {
  display: none !important;
}

/* Background Gradients & 3D Canvas Container */
#hero-canvas {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: 0;
  pointer-events: none;
}

.gradient-bg {
  background: radial-gradient(circle at 50% 10%, rgba(212, 175, 55, 0.08) 0%, transparent 60%),
              radial-gradient(circle at 80% 80%, rgba(16, 42, 67, 0.4) 0%, transparent 50%),
              var(--bg-deep-navy);
}

[data-theme="light"] .gradient-bg {
  background: radial-gradient(circle at 50% 10%, rgba(184, 134, 11, 0.12) 0%, transparent 60%),
              radial-gradient(circle at 80% 80%, rgba(203, 213, 225, 0.5) 0%, transparent 50%),
              var(--bg-deep-navy);
}

/* Typography Utilities */
h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-heading);
  letter-spacing: -0.02em;
  color: var(--text-main);
}

h1 {
  font-size: clamp(2.2rem, 5vw, 3.5rem);
}

h2 {
  font-size: clamp(1.8rem, 4vw, 2.5rem);
}

.gold-gradient-text {
  background: linear-gradient(135deg, #FFF6D6 0%, #D4AF37 50%, #AA7C11 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  display: inline-block;
}

[data-theme="light"] .gold-gradient-text {
  background: linear-gradient(135deg, #B8860B 0%, #996515 50%, #5B4010 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  display: inline-block;
}

.gold-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 6px 14px;
  border-radius: 999px;
  background: rgba(212, 175, 55, 0.12);
  border: 1px solid var(--border-gold-subtle);
  color: var(--accent-gold-bright);
  font-size: 0.825rem;
  font-weight: 600;
  letter-spacing: 0.5px;
  text-transform: uppercase;
}

[data-theme="light"] .gold-badge {
  background: rgba(184, 134, 11, 0.1);
  color: #B8860B;
}

/* Header & Navigation */
.main-header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 1000;
  transition: var(--transition-smooth);
  background: var(--header-bg);
  backdrop-filter: blur(20px);
  border-bottom: 1px solid var(--border-glass);
}

.header-inner {
  max-width: 1280px;
  margin: 0 auto;
  padding: 16px 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.logo-link {
  display: flex;
  align-items: center;
  gap: 12px;
  text-decoration: none;
}

.nav-menu {
  display: flex;
  align-items: center;
  gap: 32px;
  list-style: none;
}

.nav-link {
  color: var(--text-muted);
  text-decoration: none;
  font-weight: 500;
  font-size: 0.95rem;
  transition: var(--transition-smooth);
  position: relative;
}

.nav-link:hover, .nav-link.active {
  color: var(--accent-gold-bright);
}

.nav-link::after {
  content: '';
  position: absolute;
  bottom: -4px;
  left: 0;
  width: 0;
  height: 2px;
  background: var(--accent-gold);
  transition: var(--transition-smooth);
  border-radius: 2px;
}

.nav-link:hover::after, .nav-link.active::after {
  width: 100%;
}

/* Mobile Navigation Drawer & Hamburger Button */
.mobile-menu-btn {
  display: none;
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid var(--border-gold-subtle);
  color: var(--accent-gold-bright);
  width: 42px;
  height: 42px;
  border-radius: var(--radius-sm);
  align-items: center;
  justify-content: center;
  cursor: pointer;
  font-size: 1.2rem;
  transition: var(--transition-smooth);
}

[data-theme="light"] .mobile-menu-btn {
  background: #F1F5F9;
  color: #B8860B;
  border-color: rgba(184, 134, 11, 0.4);
}

.mobile-nav-drawer {
  position: fixed;
  top: 0;
  right: -320px;
  width: 300px;
  height: 100vh;
  background: var(--bg-navy-card);
  z-index: 2000;
  padding: 32px 24px;
  border-left: 1px solid var(--border-gold-subtle);
  box-shadow: -10px 0 30px rgba(0, 0, 0, 0.5);
  transition: right 0.4s ease;
  display: flex;
  flex-direction: column;
}

.mobile-nav-drawer.open {
  right: 0;
}

.mobile-nav-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.7);
  backdrop-filter: blur(4px);
  z-index: 1999;
  display: none;
}

.mobile-nav-overlay.open {
  display: block;
}

/* Buttons */
.btn-gold {
  background: linear-gradient(135deg, #D4AF37 0%, #B8860B 100%);
  color: #0A1128;
  font-weight: 700;
  padding: 12px 24px;
  border-radius: var(--radius-sm);
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  gap: 10px;
  border: none;
  cursor: pointer;
  box-shadow: 0 8px 24px var(--accent-gold-glow);
  transition: var(--transition-smooth);
  font-size: 0.95rem;
}

.btn-gold:hover {
  transform: translateY(-2px);
  box-shadow: 0 12px 32px rgba(212, 175, 55, 0.4);
  background: linear-gradient(135deg, #F5D061 0%, #D4AF37 100%);
}

.btn-glass {
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid var(--border-gold-subtle);
  color: var(--text-main);
  font-weight: 600;
  padding: 12px 24px;
  border-radius: var(--radius-sm);
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  gap: 10px;
  cursor: pointer;
  transition: var(--transition-smooth);
  backdrop-filter: blur(10px);
}

[data-theme="light"] .btn-glass {
  background: #F1F5F9;
  border-color: rgba(184, 134, 11, 0.3);
  color: var(--text-main);
}

.btn-glass:hover {
  background: rgba(212, 175, 55, 0.15);
  border-color: var(--accent-gold);
  color: var(--accent-gold-bright);
  transform: translateY(-2px);
}

/* Theme Switcher Button */
.theme-toggle-btn {
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid var(--border-gold-subtle);
  color: var(--accent-gold-bright);
  width: 42px;
  height: 42px;
  border-radius: 50%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: var(--transition-smooth);
  font-size: 1.1rem;
}

[data-theme="light"] .theme-toggle-btn {
  background: #F1F5F9;
  color: #B8860B;
  border-color: rgba(184, 134, 11, 0.4);
}

.theme-toggle-btn:hover {
  transform: rotate(20deg) scale(1.08);
  box-shadow: 0 0 16px var(--accent-gold-glow);
}

/* Cards & Glass Containers */
.glass-card {
  background: var(--card-bg);
  border: 1px solid var(--border-glass);
  border-radius: var(--radius-md);
  padding: clamp(20px, 4vw, 32px);
  backdrop-filter: blur(16px);
  transition: var(--transition-smooth);
  position: relative;
  overflow: hidden;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.05);
}

[data-theme="light"] .glass-card {
  box-shadow: 0 10px 30px rgba(15, 23, 42, 0.06);
}

.glass-card:hover {
  border-color: var(--border-gold-subtle);
  transform: translateY(-4px);
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.15), 0 0 30px var(--accent-gold-glow);
}

.glass-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(90deg, transparent, rgba(212, 175, 55, 0.08), transparent);
  transition: 0.6s;
}

.glass-card:hover::before {
  left: 100%;
}

/* Promotional Offers Cards Styling */
.offers-banner-card {
  background: linear-gradient(135deg, rgba(13, 21, 39, 0.9) 0%, rgba(212, 175, 55, 0.08) 100%);
  border: 1px solid var(--border-gold-subtle);
  border-radius: var(--radius-md);
  padding: clamp(24px, 5vw, 48px);
  transition: var(--transition-smooth);
}

[data-theme="light"] .offers-banner-card {
  background: linear-gradient(135deg, #FFFFFF 0%, rgba(184, 134, 11, 0.08) 100%);
  box-shadow: 0 10px 30px rgba(15, 23, 42, 0.06);
  border-color: var(--border-gold-subtle);
}

.offer-item-card {
  background: rgba(6, 11, 24, 0.8);
  border: 1px solid var(--border-glass);
  border-radius: var(--radius-md);
  padding: 24px;
  transition: var(--transition-smooth);
}

[data-theme="light"] .offer-item-card {
  background: #F8FAFC;
  border-color: var(--border-gold-subtle);
  box-shadow: 0 4px 14px rgba(15, 23, 42, 0.04);
}

/* Hero Section */
.hero-section {
  position: relative;
  min-height: 90vh;
  display: flex;
  align-items: center;
  padding: 140px 24px 80px;
  max-width: 1280px;
  margin: 0 auto;
}

.hero-grid {
  display: grid;
  grid-template-columns: 1.2fr 0.8fr;
  gap: 48px;
  align-items: center;
  width: 100%;
  z-index: 10;
}

.hero-stats {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
  margin-top: 40px;
  padding-top: 32px;
  border-top: 1px solid var(--border-glass);
}

.stat-number {
  font-family: var(--font-heading);
  font-size: 2rem;
  font-weight: 800;
  color: var(--accent-gold-bright);
}

.stat-label {
  font-size: 0.85rem;
  color: var(--text-muted);
}

/* Interactive Tax Calculator Widget Styling */
.calculator-box {
  background: var(--bg-navy-card);
  border: 1px solid var(--border-gold-subtle);
  border-radius: var(--radius-lg);
  padding: clamp(20px, 4vw, 32px);
  box-shadow: 0 24px 48px rgba(0, 0, 0, 0.12), 0 0 40px var(--accent-gold-glow);
}

.calc-tabs {
  display: flex;
  background: var(--bg-navy-elevated);
  padding: 4px;
  border-radius: var(--radius-sm);
  margin-bottom: 24px;
}

.calc-tab {
  flex: 1;
  text-align: center;
  padding: 10px 16px;
  border: none;
  background: transparent;
  color: var(--text-muted);
  font-weight: 600;
  font-size: 0.9rem;
  border-radius: 6px;
  cursor: pointer;
  transition: var(--transition-smooth);
}

.calc-tab.active {
  background: var(--accent-gold);
  color: #FFFFFF;
}

.form-group {
  margin-bottom: 20px;
}

.form-label {
  display: block;
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--text-muted);
  margin-bottom: 8px;
}

.form-input, .form-select, .form-textarea {
  width: 100%;
  padding: 14px 18px;
  background: var(--input-bg);
  border: 1px solid var(--border-glass);
  border-radius: var(--radius-sm);
  color: var(--text-main);
  font-size: 1rem;
  transition: var(--transition-smooth);
}

.form-input:focus, .form-select:focus, .form-textarea:focus {
  outline: none;
  border-color: var(--accent-gold);
  box-shadow: 0 0 12px var(--accent-gold-glow);
}

.result-card {
  background: rgba(212, 175, 55, 0.08);
  border: 1px dashed var(--accent-gold);
  border-radius: var(--radius-sm);
  padding: 20px;
  margin-top: 24px;
}

.result-row {
  display: flex;
  justify-content: space-between;
  margin-bottom: 10px;
  font-size: 0.95rem;
}

.result-row.total {
  border-top: 1px solid var(--border-gold-subtle);
  padding-top: 10px;
  font-weight: 700;
  font-size: 1.15rem;
  color: var(--accent-gold-bright);
}

/* Services Grid */
.services-section {
  padding: 80px 24px;
  max-width: 1280px;
  margin: 0 auto;
}

.section-header {
  text-align: center;
  max-width: 700px;
  margin: 0 auto 60px;
}

.services-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 32px;
}

.service-icon {
  width: 60px;
  height: 60px;
  border-radius: 14px;
  background: rgba(212, 175, 55, 0.12);
  border: 1px solid var(--border-gold-subtle);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--accent-gold-bright);
  font-size: 1.75rem;
  margin-bottom: 24px;
}

/* Floating WhatsApp Widget */
.whatsapp-widget {
  position: fixed;
  bottom: 30px;
  right: 30px;
  z-index: 999;
  display: flex;
  align-items: center;
  gap: 12px;
}

.wa-button {
  width: 64px;
  height: 64px;
  border-radius: 50%;
  background: linear-gradient(135deg, #25D366 0%, #128C7E 100%);
  color: white;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 32px;
  box-shadow: 0 10px 25px rgba(37, 211, 102, 0.4);
  text-decoration: none;
  position: relative;
  transition: var(--transition-smooth);
}

.wa-button:hover {
  transform: scale(1.1);
  box-shadow: 0 14px 35px rgba(37, 211, 102, 0.6);
}

.wa-pulse {
  position: absolute;
  width: 100%;
  height: 100%;
  border-radius: 50%;
  background: rgba(37, 211, 102, 0.4);
  animation: pulse-ring 2s infinite;
  pointer-events: none;
}

@keyframes pulse-ring {
  0% { transform: scale(0.95); opacity: 0.8; }
  100% { transform: scale(1.6); opacity: 0; }
}

.wa-tooltip {
  background: var(--bg-navy-elevated);
  border: 1px solid var(--border-gold-subtle);
  color: var(--text-main);
  padding: 10px 16px;
  border-radius: 12px;
  font-size: 0.85rem;
  font-weight: 600;
  box-shadow: 0 8px 24px rgba(0,0,0,0.15);
  display: flex;
  align-items: center;
  gap: 8px;
}

/* Footer Styling */
.main-footer {
  background: var(--footer-bg);
  border-top: 1px solid var(--border-glass);
  padding: 80px 24px 32px;
  color: var(--text-muted);
  transition: var(--transition-smooth);
}

[data-theme="light"] .main-footer {
  background: #EDF2F7;
  color: #475569;
  border-top: 1px solid rgba(0, 0, 0, 0.08);
}

.footer-grid {
  max-width: 1280px;
  margin: 0 auto 60px;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 48px;
}

.footer-bottom {
  max-width: 1280px;
  margin: 0 auto;
  padding-top: 32px;
  border-top: 1px solid var(--border-glass);
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 0.875rem;
}

/* Responsive Grid Utility Classes */
.responsive-grid-two {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 48px;
  align-items: center;
}

.responsive-grid-contact {
  display: grid;
  grid-template-columns: 1fr 1.5fr;
  gap: 48px;
  align-items: start;
}

.form-row-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
}

.responsive-grid-sidebar {
  display: grid;
  grid-template-columns: 2fr 1fr;
  gap: 48px;
  align-items: start;
}

/* Responsive Breakpoints & Multi-Device Styling */
@media (max-width: 1024px) {
  .hero-grid {
    grid-template-columns: 1fr;
    gap: 40px;
  }

  .responsive-grid-sidebar {
    grid-template-columns: 1fr;
    gap: 32px;
  }

  .responsive-grid-sidebar > div:nth-child(2) {
    position: static !important;
  }
}

@media (max-width: 992px) {
  .responsive-grid-two,
  .responsive-grid-contact {
    grid-template-columns: 1fr !important;
    gap: 32px !important;
  }
}

/* Table Styling & Strict Mobile Containment */
.glass-card {
  min-width: 0;
  max-width: 100%;
  box-sizing: border-box;
}

.table-responsive {
  display: block;
  width: 100%;
  max-width: 100%;
  min-width: 0;
  overflow-x: auto !important;
  -webkit-overflow-scrolling: touch;
  margin-top: 12px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border-glass);
  box-sizing: border-box;
}

table {
  width: 100%;
  border-collapse: collapse;
  text-align: left;
  font-size: 0.875rem;
}

.table-responsive table {
  min-width: 480px;
}

th {
  background: var(--table-header-bg);
  color: var(--accent-gold-bright);
  padding: 12px 14px;
  font-weight: 700;
  border-bottom: 1px solid var(--border-gold-subtle);
  white-space: nowrap;
}

td {
  padding: 12px 14px;
  border-bottom: 1px solid var(--border-glass);
  color: var(--text-main);
  line-height: 1.5;
}

tr:last-child td {
  border-bottom: none;
}

/* Styled Action Icon Buttons */
.icon-btn-quote {
  width: 36px;
  height: 36px;
  min-width: 36px;
  border-radius: 50%;
  background: var(--bg-navy-elevated);
  border: 1px solid var(--border-gold-subtle);
  color: var(--accent-gold-bright);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: var(--transition-smooth);
  font-size: 0.9rem;
}

.icon-btn-quote:hover {
  background: var(--accent-gold);
  color: #FFFFFF;
  transform: translateY(-2px);
}

@media (max-width: 768px) {
  .top-contact-bar {
    display: none !important;
  }

  .main-header {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
  }

  .header-inner {
    padding: 10px 16px;
  }

  .logo-dark-img, .logo-light-img {
    height: 36px !important;
  }

  .header-quote-btn {
    display: none !important;
  }

  .nav-menu {
    display: none;
  }

  .mobile-menu-btn {
    display: flex;
  }

  .hero-section {
    padding: 95px 16px 40px;
  }

  .hero-stats {
    grid-template-columns: repeat(3, 1fr);
    margin-top: 24px;
    padding-top: 20px;
  }

  .footer-grid {
    grid-template-columns: 1fr 1fr;
    gap: 32px;
  }

  .footer-bottom {
    flex-direction: column;
    gap: 16px;
    text-align: center;
  }

  .wa-tooltip {
    display: none;
  }

  .whatsapp-widget {
    bottom: 20px;
    right: 20px;
    z-index: 999;
  }

  .wa-button {
    width: 50px;
    height: 50px;
    font-size: 24px;
  }
}

@media (max-width: 640px) {
  .calc-tabs {
    flex-direction: column;
    padding: 6px;
    gap: 6px;
  }

  .calc-tab {
    width: 100%;
    padding: 10px 12px;
    font-size: 0.85rem;
    text-align: center;
  }

  .calc-cta-row, .offer-card-ctas {
    flex-direction: column !important;
    gap: 10px !important;
  }

  .calc-cta-row a, .calc-cta-row button, .offer-card-ctas a {
    width: 100% !important;
    justify-content: center !important;
    padding: 12px 16px !important;
    font-size: 0.9rem !important;
  }

  .result-card {
    padding: 16px;
  }

  .result-row.total {
    flex-direction: column;
    align-items: flex-start;
    gap: 4px;
  }

  .result-row.meta-row {
    flex-direction: column;
    align-items: flex-start;
    gap: 6px;
  }

  .form-row-grid {
    grid-template-columns: 1fr !important;
    gap: 12px !important;
  }

  .hero-stats {
    grid-template-columns: repeat(3, 1fr);
    text-align: center;
    gap: 12px;
  }

  .stat-number {
    font-size: 1.4rem;
  }

  .stat-label {
    font-size: 0.75rem;
  }

  .footer-grid {
    grid-template-columns: 1fr;
  }

  .services-grid {
    grid-template-columns: 1fr;
  }

  h1 {
    font-size: 2.1rem !important;
  }

  h2 {
    font-size: 1.65rem !important;
  }
}

@media (max-width: 480px) {
  /* Prevent width 100% override on buttons that are flex items with auto width */
  .btn-gold:not([style*="flex:"]), .btn-glass:not([style*="flex:"]) {
    width: 100%;
    justify-content: center;
  }
}
