@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;700&display=swap');
@import url('./premium.css');

:root {
  --bg-color: #050505;
  --text-color: #f5f5f7;
  --text-muted: #a1a1a6;
  --accent-color: #2997ff;
  --border-color: rgba(255, 255, 255, 0.1);
  --glass-bg: rgba(20, 20, 20, 0.9);
  --font-main: 'Inter', -apple-system, sans-serif;
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

body {
  font-family: var(--font-main);
  background-color: var(--bg-color);
  color: var(--text-color);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

/* Nav */
nav {
  position: fixed;
  top: 0;
  width: 100%;
  height: 70px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0 5%;
  background: var(--glass-bg);
  backdrop-filter: blur(24px);
  -webkit-backdrop-filter: blur(24px);
  border-bottom: 1px solid var(--border-color);
  z-index: 1000;
}

.brand {
  font-weight: 700;
  font-size: 20px;
  letter-spacing: 1px;
}

.nav-links {
  display: flex;
  flex: 1;
  justify-content: center;
  gap: 40px;
  list-style: none;
  align-items: center;
  height: 100%;
}

.nav-links > li {
  height: 100%;
  display: flex;
  align-items: center;
}

.nav-actions {
  display: flex;
  align-items: center;
  gap: 16px;
  position: absolute;
  right: 5%;
}

.nav-links > li > a:not(.btn-primary) {
  color: var(--text-color);
  text-decoration: none;
  font-size: 14px;
  font-weight: 400;
  opacity: 0.8;
  transition: opacity 0.3s;
  display: flex;
  align-items: center;
}

.nav-links a:not(.btn-primary):hover {
  opacity: 1;
}

/* Dropdown */
.dropdown {
  position: relative;
}

/* Invisible bridge to keep hover active */
.dropdown::after {
  content: '';
  position: absolute;
  top: 100%;
  left: -20px;
  right: -20px;
  height: 25px;
}

.dropdown-content {
  display: none;
  position: absolute;
  top: calc(100% + 5px);
  left: -20px;
  background: var(--glass-bg);
  backdrop-filter: blur(24px);
  -webkit-backdrop-filter: blur(24px);
  min-width: 200px;
  border: 1px solid var(--border-color);
  border-radius: 12px;
  overflow: hidden;
  box-shadow: 0 10px 30px rgba(0,0,0,0.5);
  padding: 10px 0;
  z-index: 100;
}

.dropdown-content a {
  display: block;
  padding: 12px 20px;
  color: var(--text-color);
  font-size: 14px;
  text-decoration: none;
}

.dropdown-content a:hover {
  background: rgba(255,255,255,0.1);
}

.dropdown:hover .dropdown-content {
  display: block;
  animation: fadeUpMenu 0.3s ease forwards;
}

@keyframes fadeUpMenu {
  from { opacity: 0; transform: translateY(10px); }
  to { opacity: 1; transform: translateY(0); }
}

/* Mobile Toggle */
.menu-toggle {
  display: none;
  flex-direction: column;
  cursor: pointer;
  gap: 5px;
}

.menu-toggle .bar {
  width: 25px;
  height: 2px;
  background-color: var(--text-color);
  transition: all 0.3s ease;
}

.btn-primary {
  background: #fff;
  color: #000 !important;
  padding: 10px 20px;
  border-radius: 30px;
  text-decoration: none;
  font-weight: 600;
  font-size: 14px;
  display: inline-flex;
  align-items: center;
  opacity: 1 !important;
  transition: transform 0.3s, box-shadow 0.3s;
}

.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 10px 20px rgba(255, 255, 255, 0.15);
}

/* Hero Section */
.hero {
  position: relative;
  height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  overflow: hidden;
}

.hero::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0; bottom: 0;
  background: url('../images/hero_bg_dark.webp') center/cover no-repeat;
  filter: brightness(0.5);
  z-index: -1;
  animation: zoomBg 20s infinite alternate;
}

@keyframes zoomBg {
  from { transform: scale(1); }
  to { transform: scale(1.05); }
}

.hero-content {
  max-width: 900px;
  padding: 0 20px;
  animation: fadeUp 1.5s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

.hero h1 {
  font-size: clamp(40px, 6vw, 80px);
  font-weight: 700;
  line-height: 1.1;
  letter-spacing: -2px;
  margin-bottom: 20px;
}

.hero p {
  font-size: clamp(18px, 2vw, 24px);
  color: var(--text-muted);
  margin-bottom: 40px;
  font-weight: 300;
}

/* Trust Strip */
.trust-strip {
  display: flex;
  justify-content: center;
  padding: 80px 5% 40px;
  background: transparent;
  gap: clamp(40px, 8vw, 120px);
  flex-wrap: wrap;
}

.trust-item {
  text-align: center;
}

.trust-item h4 {
  font-size: clamp(24px, 4vw, 36px);
  font-weight: 700;
  margin-bottom: 8px;
  background: linear-gradient(180deg, #fff 0%, #888 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.trust-item p {
  color: var(--text-muted);
  font-size: 13px;
  text-transform: uppercase;
  letter-spacing: 2px;
  font-weight: 500;
}

/* Portfolio / Services Grid */
.section {
  padding: 80px 5%;
  max-width: 1400px;
  margin: 0 auto;
}

.section-header {
  margin-bottom: 80px;
  text-align: center;
}

.section-header h2 {
  font-size: clamp(40px, 5vw, 64px);
  margin-bottom: 20px;
  letter-spacing: -2px;
  font-weight: 700;
}

.section-header p {
  font-size: 20px;
  color: var(--text-muted);
  max-width: 600px;
  margin: 0 auto;
}

/* Balanced Portfolio Grid */
.portfolio-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 30px;
}

.portfolio-card {
  position: relative;
  border-radius: 24px;
  overflow: hidden;
  height: 500px;
  background: #111;
  cursor: pointer;
}

.portfolio-card img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.8s cubic-bezier(0.16, 1, 0.3, 1);
  opacity: 0.8;
}

.portfolio-card::after {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0; bottom: 0;
  background: linear-gradient(to top, rgba(0,0,0,0.95) 0%, rgba(0,0,0,0.1) 60%);
  transition: opacity 0.4s;
}

.portfolio-card:hover img {
  transform: scale(1.04);
  opacity: 1;
}

.portfolio-card:hover::after {
  opacity: 0.8;
}

.portfolio-content {
  position: absolute;
  bottom: 0;
  left: 0;
  width: 100%;
  padding: 40px 30px;
  z-index: 2;
  transform: translateY(10px);
  transition: transform 0.4s cubic-bezier(0.16, 1, 0.3, 1);
}

.portfolio-card:hover .portfolio-content {
  transform: translateY(0);
}

.portfolio-content h3 {
  font-size: clamp(22px, 2.5vw, 28px);
  margin-bottom: 12px;
  font-weight: 600;
  letter-spacing: -1px;
}

.portfolio-content p {
  color: #a1a1a6;
  font-size: 15px;
  margin-bottom: 24px;
  line-height: 1.5;
}

.portfolio-link {
  color: #fff;
  text-decoration: none;
  font-size: 14px;
  text-transform: uppercase;
  letter-spacing: 2px;
  border-bottom: 1px solid #fff;
  padding-bottom: 5px;
  transition: color 0.3s, border-color 0.3s;
}

.portfolio-link:hover {
  color: var(--accent-color);
  border-color: var(--accent-color);
}

/* Guides / Quality Nodes */
.guides-grid {
  display: grid;
  grid-template-columns: 1fr;
  max-width: 900px;
  margin: 0 auto;
}

.guide-card {
  border-top: 1px solid #333;
  padding: 40px 20px;
  transition: transform 0.4s cubic-bezier(0.16, 1, 0.3, 1);
  display: flex;
  flex-direction: column;
}

.guide-card:last-child {
  border-bottom: 1px solid #333;
}

.guide-card:hover {
  transform: translateX(15px);
}

.guide-card h3 {
  font-size: 28px;
  margin-bottom: 10px;
  font-weight: 500;
  letter-spacing: -0.5px;
}

.guide-card p {
  color: var(--text-muted);
  font-size: 18px;
  margin-bottom: 20px;
  line-height: 1.6;
}

.guide-card a {
  color: var(--accent-color);
  text-decoration: none;
  font-size: 14px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 1px;
}

/* Footer */
footer {
  border-top: 1px solid var(--border-color);
  padding: 80px 5% 40px;
  background: #000;
}

.footer-grid {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1fr;
  gap: 40px;
  margin-bottom: 60px;
}

.footer-col h3 {
  font-size: 24px;
  margin-bottom: 20px;
}

.footer-col h4 {
  font-size: 14px;
  color: #fff;
  margin-bottom: 20px;
  text-transform: uppercase;
  letter-spacing: 1px;
}

.footer-col ul {
  list-style: none;
}

.footer-col ul li {
  margin-bottom: 12px;
}

.footer-col ul li a {
  color: var(--text-muted);
  text-decoration: none;
  font-size: 14px;
  transition: color 0.3s;
}

.footer-col ul li a:hover {
  color: #fff;
}

.footer-bottom {
  text-align: center;
  padding-top: 40px;
  border-top: 1px solid #222;
  color: var(--text-muted);
  font-size: 14px;
}

/* Animations */
@keyframes fadeUp {
  from { opacity: 0; transform: translateY(30px); }
  to { opacity: 1; transform: translateY(0); }
}

.fade-in {
  opacity: 0;
  transform: translateY(30px);
  transition: opacity 1s ease, transform 1s ease;
}

.fade-in.is-visible {
  opacity: 1;
  transform: translateY(0);
}

/* Theme Toggle */
.theme-toggle {
  background: none;
  border: none;
  color: var(--text-color);
  cursor: pointer;
  padding: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: color 0.3s, transform 0.3s;
}

.theme-toggle:hover {
  transform: scale(1.1);
}

/* Light Mode Variables and Overrides */
body.light-mode {
  --bg-color: #f5f5f7;
  --text-color: #050505;
  --text-muted: #555555;
  --glass-bg: rgba(255, 255, 255, 0.95);
  --border-color: rgba(0, 0, 0, 0.1);
}

body.light-mode .hero::before {
  background: url('../images/hero_bg_light.webp') center/cover no-repeat;
  filter: brightness(1);
}

body.light-mode .hero h1 {
  color: #000;
  text-shadow: 0 0 20px rgba(255,255,255,0.9), 0 0 40px rgba(255,255,255,0.8);
}

body.light-mode .hero p {
  color: #000;
  font-weight: 500;
  text-shadow: 0 0 20px rgba(255,255,255,0.9), 0 0 40px rgba(255,255,255,0.8);
}

body.light-mode .trust-item h4 {
  background: linear-gradient(180deg, #111 0%, #666 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

body.light-mode .portfolio-card {
  background: #fff;
  border: 1px solid var(--border-color);
}

body.light-mode .portfolio-card::after {
  background: linear-gradient(to top, rgba(255,255,255,0.95) 0%, rgba(255,255,255,0.1) 60%);
}

body.light-mode .portfolio-link {
  color: #000;
  border-bottom: 1px solid #000;
}

body.light-mode .portfolio-link:hover {
  color: var(--accent-color);
  border-color: var(--accent-color);
}

body.light-mode footer {
  background: #f5f5f7;
}

body.light-mode .footer-col h4 {
  color: #111;
}

body.light-mode .dropdown-content a:hover {
  background: rgba(0,0,0,0.05);
}

body.light-mode .btn-primary {
  background: #000;
  color: #fff;
}

body.light-mode .btn-primary:hover {
  box-shadow: 0 10px 20px rgba(0, 0, 0, 0.15);
}

@media (max-width: 900px) {
  .menu-toggle { display: flex; }
  
  .nav-links { 
    position: absolute;
    top: 70px;
    left: -100%;
    flex-direction: column;
    background: #050505;
    width: 100%;
    text-align: center;
    transition: 0.3s;
    padding: 40px 0;
    border-bottom: 1px solid var(--border-color);
  }
  
  .nav-links.active {
    left: 0;
  }

  .dropdown-content {
    position: static;
    display: none;
    background: transparent;
    border: none;
    box-shadow: none;
    padding: 0;
  }

  .dropdown:hover .dropdown-content {
    display: block;
  }
  
  .nav-actions {
    margin-left: 0;
    justify-content: center;
    margin-top: 20px;
    position: static;
  }
  
  .portfolio-grid { grid-template-columns: 1fr; }
  .footer-grid { grid-template-columns: 1fr; }
}

/* =========================================
   HUB PAGES PREMIUM LAYOUT
   ========================================= */

.hero-hub {
  position: relative;
  padding: 180px 5% 100px;
  background: radial-gradient(circle at center, #1a1a1f 0%, #050505 100%);
  text-align: center;
  border-bottom: 1px solid var(--border-color);
}

.hero-hub h1 {
  font-size: clamp(36px, 5vw, 64px);
  font-weight: 700;
  letter-spacing: -1.5px;
  margin-bottom: 20px;
  background: linear-gradient(180deg, #fff 0%, #aaa 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.hero-hub p {
  font-size: clamp(18px, 2vw, 22px);
  color: var(--text-muted);
  max-width: 800px;
  margin: 0 auto;
  font-weight: 300;
}

.hub-intro {
  padding: 80px 5%;
  max-width: 1200px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 60px;
  align-items: center;
}

.hub-intro-text h2 {
  font-size: clamp(32px, 4vw, 42px);
  margin-bottom: 24px;
  font-weight: 700;
  letter-spacing: -1px;
  line-height: 1.2;
}

.hub-intro-text p {
  color: var(--text-muted);
  margin-bottom: 20px;
  font-size: 18px;
  line-height: 1.7;
}

.hub-intro-stats {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px;
}

.stat-box {
  background: var(--glass-bg);
  border: 1px solid var(--border-color);
  padding: 30px 30px 30px 40px;
  border-radius: 16px;
  text-align: left;
  position: relative;
  overflow: hidden;
  transition: transform 0.4s ease, box-shadow 0.4s ease, border-color 0.4s ease;
  box-shadow: 0 10px 30px rgba(0,0,0,0.3);
}

.stat-box::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 4px;
  height: 100%;
  background: linear-gradient(180deg, var(--accent-color) 0%, #0044aa 100%);
}

.stat-box:hover {
  transform: translateY(-8px);
  box-shadow: 0 15px 40px rgba(0,0,0,0.5);
  border-color: rgba(255,255,255,0.2);
}

.stat-box h4 {
  font-size: 36px;
  font-weight: 700;
  color: var(--text-color);
  margin-bottom: 4px;
  letter-spacing: -1px;
}

.stat-box p {
  font-size: 13px;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 1.5px;
  font-weight: 600;
}

.hub-services {
  padding: 80px 5%;
  background: #0a0a0c;
  border-top: 1px solid var(--border-color);
}

.hub-services h2 {
  text-align: center;
  font-size: 40px;
  margin-bottom: 60px;
}

.hub-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 30px;
  max-width: 1200px;
  margin: 0 auto;
}

.hub-card {
  background: #111;
  border: 1px solid #222;
  border-radius: 20px;
  padding: 40px 30px;
  transition: transform 0.4s, border-color 0.4s;
  display: flex;
  flex-direction: column;
  text-decoration: none;
  color: inherit;
}

.hub-card:hover {
  transform: translateY(-10px);
  border-color: var(--accent-color);
}

.hub-card h3 {
  font-size: 24px;
  margin-bottom: 16px;
}

.hub-card p {
  color: var(--text-muted);
  flex-grow: 1;
  margin-bottom: 24px;
  font-size: 16px;
}

.hub-card-link {
  color: #fff;
  text-transform: uppercase;
  font-size: 13px;
  letter-spacing: 2px;
  text-decoration: none;
  font-weight: 600;
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.hub-card-link::after {
  content: '→';
  transition: transform 0.3s;
}

.hub-card:hover .hub-card-link::after {
  transform: translateX(5px);
}

.hub-content-block {
  max-width: 800px;
  margin: 80px auto;
  padding: 0 5%;
}

.hub-content-block h2 {
  font-size: 32px;
  margin-bottom: 24px;
  padding-bottom: 12px;
  border-bottom: 1px solid #333;
}

.hub-content-block h3 {
  font-size: 24px;
  margin-top: 40px;
  margin-bottom: 16px;
  color: #fff;
}

.hub-content-block p {
  color: #ccc;
  font-size: 18px;
  margin-bottom: 20px;
}

.hub-content-block ul {
  padding-left: 20px;
  margin-bottom: 24px;
  color: #ccc;
  font-size: 18px;
}

.hub-content-block li {
  margin-bottom: 10px;
}

.hub-content-block a {
  color: var(--accent-color);
  text-decoration: none;
}

.hub-cta {
  background: linear-gradient(135deg, var(--accent-color) 0%, #0044aa 100%);
  padding: 80px 5%;
  text-align: center;
}

.hub-cta h2 {
  font-size: 40px;
  margin-bottom: 20px;
  color: #fff;
}

.hub-cta p {
  font-size: 20px;
  margin-bottom: 40px;
  opacity: 0.9;
  color: #fff;
}

.btn-secondary {
  background: #000;
  color: #fff;
  padding: 16px 32px;
  border-radius: 30px;
  text-decoration: none;
  font-weight: 600;
  font-size: 16px;
  transition: background 0.3s;
  display: inline-block;
}

.btn-secondary:hover {
  background: #222;
}

/* Light Mode Overrides */
body.light-mode .hero-hub {
  background: radial-gradient(circle at center, #eee 0%, #fff 100%);
}
body.light-mode .hero-hub h1 {
  background: none;
  color: #000;
  -webkit-text-fill-color: initial;
}
body.light-mode .hub-services {
  background: #f9f9fb;
}
body.light-mode .hub-card {
  background: #fff;
  border-color: #ddd;
}
body.light-mode .hub-card-link {
  color: #000;
}
body.light-mode .hub-content-block p, 
body.light-mode .hub-content-block ul {
  color: #444;
}
body.light-mode .hub-content-block h2,
body.light-mode .hub-content-block h3 {
  color: #000;
}
body.light-mode .stat-box {
  background: #ffffff;
  border: 1px solid rgba(0,0,0,0.06);
  box-shadow: 0 10px 30px rgba(0,0,0,0.04);
}
body.light-mode .stat-box:hover {
  box-shadow: 0 15px 40px rgba(0,0,0,0.1);
  border-color: rgba(0,0,0,0.15);
}

/* Hub Gallery */
.hub-gallery {
  padding: 80px 5%;
  max-width: 1400px;
  margin: 0 auto;
}

.hub-gallery h2 {
  text-align: center;
  font-size: 40px;
  margin-bottom: 40px;
}

.gallery-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
  gap: 20px;
}

.gallery-item {
  border-radius: 12px;
  overflow: hidden;
  aspect-ratio: 1;
  background: #111;
}

.gallery-item img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.4s;
  cursor: pointer;
}

.gallery-item:hover img {
  transform: scale(1.05);
}

/* FAQ Accordion */
.faq-item {
  background: var(--glass-bg);
  border: 1px solid var(--border-color);
  border-radius: 12px;
  margin-bottom: 16px;
  overflow: hidden;
  transition: box-shadow 0.3s;
}

.faq-item:hover {
  box-shadow: 0 4px 15px rgba(0,0,0,0.2);
}

.faq-item summary {
  padding: 20px;
  font-size: 20px;
  font-weight: 600;
  cursor: pointer;
  list-style: none;
  display: flex;
  justify-content: space-between;
  align-items: center;
  color: var(--text-color);
}

.faq-item summary::-webkit-details-marker {
  display: none;
}

.faq-item summary::after {
  content: '+';
  font-size: 28px;
  font-weight: 300;
  transition: transform 0.3s;
  color: var(--accent-color);
}

.faq-item[open] summary::after {
  transform: rotate(45deg);
}

.faq-item .faq-content {
  padding: 0 20px 20px;
  color: var(--text-muted);
  font-size: 16px;
  line-height: 1.6;
}

body.light-mode .faq-item {
  background: #fff;
  border-color: rgba(0,0,0,0.1);
}

/* =========================================
   HOMEPAGE LIGHT-MODE OVERRIDES
   Fixes hardcoded dark inline-style sections
   ========================================= */

/* Services / navigation grid section */
body.light-mode .section {
  background: var(--bg-color);
  border-top-color: rgba(0,0,0,0.08) !important;
}

body.light-mode .section h2,
body.light-mode .section h3 {
  color: #050505 !important;
}

body.light-mode .section p {
  color: #555 !important;
}

/* Service category nav cards (inline rgba(255,255,255,0.03) cards) */
body.light-mode .section a[style*="rgba(255,255,255,0.03)"],
body.light-mode .section div[style*="rgba(255,255,255,0.03)"] {
  background: #fff !important;
  border-color: rgba(0,0,0,0.1) !important;
}

body.light-mode .section a[style*="rgba(255,255,255,0.03)"]:hover {
  border-color: rgba(0,0,0,0.3) !important;
}

/* Why Us card headings and text (hardcoded color:#fff / color:#a1a1a6) */
body.light-mode .section h3[style*="color:#fff"],
body.light-mode .section h2[style*="color:#fff"] {
  color: #050505 !important;
}

body.light-mode .section p[style*="color:#a1a1a6"],
body.light-mode .section p[style*="color: #a1a1a6"] {
  color: #555 !important;
}

/* Homepage FAQ section (hardcoded background:#0d0d0d) */
body.light-mode section[style*="background:#0d0d0d"],
body.light-mode section[style*="background: #0d0d0d"] {
  background: #f0f0f2 !important;
  border-top-color: rgba(0,0,0,0.08) !important;
}

body.light-mode section[style*="background:#0d0d0d"] h2,
body.light-mode section[style*="background:#0d0d0d"] h4 {
  color: #050505 !important;
}

body.light-mode section[style*="background:#0d0d0d"] p {
  color: #555 !important;
}

/* Homepage CTA strip (hardcoded background:#050505) */
body.light-mode section[style*="background:#050505"],
body.light-mode section[style*="background: #050505"] {
  background: #e8e8ea !important;
  border-top-color: rgba(0,0,0,0.08) !important;
}

body.light-mode section[style*="background:#050505"] h2 {
  color: #050505 !important;
}

body.light-mode section[style*="background:#050505"] p {
  color: #555 !important;
}

/* CTA secondary button border fix */
body.light-mode section[style*="background:#050505"] a[style*="color:#fff"] {
  color: #050505 !important;
  border-color: rgba(0,0,0,0.25) !important;
}

/* Services dark section (background:#0a0a0a) */
body.light-mode section[style*="background:#0a0a0a"],
body.light-mode section[style*="background: #0a0a0a"] {
  background: #f8f8fa !important;
  border-top-color: rgba(0,0,0,0.08) !important;
}

body.light-mode section[style*="background:#0a0a0a"] h2,
body.light-mode section[style*="background:#0a0a0a"] h3 {
  color: #050505 !important;
}

body.light-mode section[style*="background:#0a0a0a"] p {
  color: #555 !important;
}

/* FAQ accordion items in light mode */
body.light-mode .cg-faq {
  background: #fff;
  border-color: rgba(0,0,0,0.1);
}

body.light-mode .cg-faq h4,
body.light-mode .cg-faq-toggle {
  color: #050505 !important;
}

body.light-mode .cg-faq-body p {
  color: #555 !important;
}


.gallery-item {
  position: relative;
}

.gallery-caption {
  position: absolute;
  bottom: 0;
  left: 0;
  width: 100%;
  background: linear-gradient(transparent, rgba(0,0,0,0.8));
  color: #fff;
  padding: 40px 20px 15px;
  font-size: 16px;
  font-weight: 600;
  opacity: 0;
  transition: opacity 0.3s;
  pointer-events: none;
}

.gallery-item:hover .gallery-caption {
  opacity: 1;
}

.lightbox {
  position: fixed;
  top: 0; left: 0; right: 0; bottom: 0;
  background: rgba(0,0,0,0.9);
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  z-index: 2000;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s ease;
}

.lightbox.active {
  opacity: 1;
  pointer-events: auto;
}

.lightbox img {
  max-width: 90%;
  max-height: 80vh;
  border-radius: 8px;
  box-shadow: 0 10px 30px rgba(0,0,0,0.5);
  transform: scale(0.9);
  transition: transform 0.3s ease;
}

.lightbox.active img {
  transform: scale(1);
}

.lightbox-close {
  position: absolute;
  top: 20px;
  right: 30px;
  color: #fff;
  font-size: 40px;
  cursor: pointer;
  z-index: 2001;
}

.lightbox-caption-text {
  color: #fff;
  font-size: 20px;
  margin-top: 20px;
  font-weight: 600;
}

/* =========================================
   SUB-NODE SPECIFIC CSS (cg-hero, cg-article)
   ========================================= */
.cg-hero {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 40px;
    padding: 140px 5% 80px;
    max-width: 1400px;
    margin: 0 auto;
    align-items: center;
}
.cg-hero-content {
    display: flex;
    flex-direction: column;
}
.cg-hero-label {
    font-size: 12px;
    font-weight: 700;
    letter-spacing: 2px;
    text-transform: uppercase;
    color: var(--text-muted);
    margin-bottom: 20px;
}
.cg-hero-title {
    font-size: clamp(32px, 4vw, 56px);
    font-weight: 800;
    letter-spacing: -1.5px;
    line-height: 1.1;
    color: #fff;
    margin-bottom: 24px;
}
.cg-hero-desc {
    font-size: 18px;
    color: var(--text-muted);
    line-height: 1.7;
    margin-bottom: 30px;
}
.cg-hero-image img {
    width: 100%;
    height: auto;
    border-radius: 20px;
    box-shadow: 0 20px 40px rgba(0,0,0,0.4);
}

.cg-article-content {
    max-width: 900px;
    margin: 0 auto;
    padding: 80px 5%;
}
.cg-article-content h2 {
    font-size: 32px;
    font-weight: 700;
    color: #fff;
    margin-bottom: 24px;
    border-bottom: 1px solid var(--border-color);
    padding-bottom: 12px;
}
.cg-article-content h3 {
    font-size: 24px;
    font-weight: 600;
    color: #fff;
    margin-top: 40px;
    margin-bottom: 16px;
}
.cg-article-content p {
    font-size: 16px;
    color: var(--text-muted);
    line-height: 1.8;
    margin-bottom: 20px;
}
.cg-article-content ul {
    margin-bottom: 30px;
    padding-left: 20px;
}
.cg-article-content li {
    color: var(--text-muted);
    margin-bottom: 10px;
}

/* =========================================
   GALLERY CSS FOR ALL PAGES
   ========================================= */
.cg-gallery-section { max-width: 1400px; margin: 0 auto; padding: 120px 5%; }
.cg-gallery-head { display: flex; justify-content: space-between; align-items: flex-end; margin-bottom: 56px; flex-wrap: wrap; gap: 20px; }
.cg-gallery-head h2 { font-size: clamp(34px, 4vw, 52px); font-weight: 800; letter-spacing: -2px; color: #fff; }
.cg-gallery-count { font-size: 14px; color: var(--text-muted); letter-spacing: 1px; }
.cg-gallery-count span { color: #fff; font-weight: 700; }
.cg-gallery-masonry { display: grid; grid-template-columns: repeat(4, 1fr); grid-auto-rows: 220px; gap: 16px; grid-auto-flow: dense; }
.cg-gallery-item { border-radius: 16px; overflow: hidden; cursor: pointer; position: relative; background: #111; }
.cg-gallery-item:nth-child(1) { grid-column: span 2; grid-row: span 2; }
.cg-gallery-item:nth-child(5) { grid-column: span 2; }
.cg-gallery-item img { width: 100%; height: 100%; object-fit: cover; transition: transform 0.7s cubic-bezier(0.16,1,0.3,1), filter 0.4s; filter: brightness(0.85); }
.cg-gallery-item:hover img { transform: scale(1.06); filter: brightness(1); }
.cg-gallery-overlay { position: absolute; inset: 0; background: linear-gradient(transparent 40%, rgba(3,3,10,0.9) 100%); opacity: 0; transition: opacity 0.4s; display: flex; align-items: flex-end; padding: 24px; }
.cg-gallery-item:hover .cg-gallery-overlay { opacity: 1; }
.cg-gallery-caption-text { color: #fff; font-size: 14px; font-weight: 600; letter-spacing: 0.3px; }
.cg-gallery-zoom { position: absolute; top: 16px; right: 16px; width: 40px; height: 40px; background: rgba(255,255,255,0.1); backdrop-filter: blur(10px); border-radius: 50%; display: flex; align-items: center; justify-content: center; color: #fff; opacity: 0; transition: opacity 0.3s, transform 0.3s; }
.cg-gallery-item:hover .cg-gallery-zoom { opacity: 1; transform: scale(1.05); }

.cg-lightbox { position: fixed; inset: 0; background: rgba(3,3,10,0.96); display: flex; flex-direction: column; align-items: center; justify-content: center; z-index: 9999; opacity: 0; pointer-events: none; transition: opacity 0.4s; backdrop-filter: blur(20px); }
.cg-lightbox.active { opacity: 1; pointer-events: all; }
.cg-lightbox img { max-width: min(90vw, 1100px); max-height: 80vh; object-fit: contain; border-radius: 12px; transform: scale(0.94); transition: transform 0.4s cubic-bezier(0.16,1,0.3,1); box-shadow: 0 30px 80px rgba(0,0,0,0.8); }
.cg-lightbox.active img { transform: scale(1); }
.cg-lightbox-cap { color: rgba(255,255,255,0.6); font-size: 14px; margin-top: 20px; letter-spacing: 0.5px; }
.cg-lightbox-close { position: fixed; top: 28px; right: 32px; color: rgba(255,255,255,0.5); font-size: 32px; cursor: pointer; line-height: 1; transition: color 0.2s, transform 0.2s; z-index: 10000; }
.cg-lightbox-close:hover { color: #fff; transform: rotate(90deg); }

@media (max-width: 900px) {
    .cg-hero { grid-template-columns: 1fr; padding-top: 100px; }
}
@media (max-width: 768px) {
    .cg-gallery-masonry { grid-template-columns: repeat(2,1fr); grid-auto-rows: 180px; }
    .cg-gallery-item:nth-child(1) { grid-column: span 2; grid-row: span 1; }
    .cg-gallery-item:nth-child(5) { grid-column: span 2; }
}
@media (max-width: 480px) {
    .cg-gallery-masonry { grid-template-columns: 1fr; grid-auto-rows: 240px; }
    .cg-gallery-item:nth-child(1), .cg-gallery-item:nth-child(5) { grid-column: span 1; }
}




        /* =============================================
           COMMERCIAL GLASS — V3 LAYOUT (OGILVY VOICE)
           ============================================= */

        :root {
            --cg-dark: var(--bg-color, #050505);
            --cg-card: var(--glass-bg, #111111);
            --cg-card2: #151515;
            --cg-border: var(--border-color, rgba(255,255,255,0.1));
            --cg-border-hover: #fff;
            --cg-accent: #fff;
            --cg-muted: var(--text-muted, #a1a1a6);
            --cg-text: var(--text-color, #f5f5f7);
        }

        .cg-page * { box-sizing: border-box; }
        .cg-page { background: var(--cg-dark); color: var(--cg-text); font-family: 'Inter', sans-serif; overflow-x: hidden; }

        .cg-hero-v2 { padding: 120px 5% 60px; max-width: 1500px; margin: 0 auto; }
        .cg-hero-box { display: grid; grid-template-columns: 1.2fr 0.8fr; background: var(--cg-card); border: 1px solid var(--cg-border); border-radius: 32px; overflow: hidden; }
        .cg-hero-content { padding: 80px 60px; display: flex; flex-direction: column; justify-content: center; }
        .cg-hero-eyebrow { display: inline-block; font-size: 11px; font-weight: 700; letter-spacing: 3px; text-transform: uppercase; color: var(--cg-muted); margin-bottom: 24px; }
        .cg-hero-v2 h1 { font-size: clamp(36px, 5vw, 64px); font-weight: 700; line-height: 1.05; letter-spacing: -2px; margin-bottom: 24px; color: #fff; }
        .cg-hero-v2 p { font-size: 18px; color: var(--cg-muted); margin-bottom: 40px; line-height: 1.6; max-width: 550px; font-weight: 300; }
        .cg-hero-visual { position: relative; min-height: 500px; }
        .cg-hero-visual img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; filter: grayscale(20%) brightness(0.8); }
        .cg-btn-primary { display: inline-flex; align-items: center; background: #fff; color: #000; padding: 14px 28px; border-radius: 30px; font-weight: 600; font-size: 14px; text-decoration: none; transition: transform 0.3s; }
        .cg-btn-primary:hover { transform: translateY(-2px); }

        .cg-stats-v2 { display: flex; justify-content: space-around; padding: 40px 5%; max-width: 1300px; margin: 0 auto; border-bottom: 1px solid var(--cg-border); }
        .cg-stat-item { text-align: center; }
        .cg-stat-val { font-size: 36px; font-weight: 700; margin-bottom: 4px; color: #fff; letter-spacing: -1px; }
        .cg-stat-label { font-size: 12px; color: var(--cg-muted); text-transform: uppercase; letter-spacing: 2px; font-weight: 500; }

        .cg-services { padding: 100px 5%; max-width: 1100px; margin: 0 auto; }
        .cg-section-title { font-size: clamp(32px, 4vw, 48px); font-weight: 700; letter-spacing: -1.5px; color: #fff; margin-bottom: 60px; text-align: center; }
        .cg-service-stack { display: flex; flex-direction: column; gap: 20px; }
        .cg-service-row { display: grid; grid-template-columns: 300px 1fr auto; align-items: center; gap: 40px; padding: 40px; background: var(--cg-card); border: 1px solid var(--cg-border); border-radius: 16px; text-decoration: none; color: inherit; transition: transform 0.3s, border-color 0.3s; }
        .cg-service-row:hover { transform: translateY(-4px); border-color: #fff; }
        .cg-service-row h3 { font-size: 24px; font-weight: 700; color: #fff; }
        .cg-service-row p { color: var(--cg-muted); font-size: 16px; line-height: 1.6; }
        .cg-arrow { font-size: 24px; color: #fff; opacity: 0.5; transition: opacity 0.3s, transform 0.3s; }
        .cg-service-row:hover .cg-arrow { opacity: 1; transform: translateX(5px); }

        .cg-process-v2 { background: var(--cg-card2); border-top: 1px solid var(--cg-border); padding: 100px 5%; }
        .cg-process-grid { max-width: 1300px; margin: 0 auto; display: grid; grid-template-columns: repeat(4, 1fr); gap: 30px; }
        .cg-process-step { padding: 30px; border-left: 2px solid var(--cg-border); }
        .cg-process-num { font-size: 12px; font-weight: 700; letter-spacing: 2px; color: #fff; margin-bottom: 16px; display: block; }
        .cg-process-step h4 { font-size: 20px; font-weight: 600; color: #fff; margin-bottom: 12px; }
        .cg-process-step p { font-size: 14px; color: var(--cg-muted); line-height: 1.6; }

        .cg-cta-v2 { padding: 120px 5%; text-align: center; }
        .cg-cta-v2 h2 { font-size: clamp(36px, 4vw, 56px); font-weight: 700; letter-spacing: -2px; margin-bottom: 24px; color: #fff; }
        .cg-cta-v2 p { font-size: 18px; color: var(--cg-muted); margin-bottom: 40px; max-width: 600px; margin-left: auto; margin-right: auto; }

        .cg-intro { max-width: 1300px; margin: 0 auto; padding: 120px 5%; display: grid; grid-template-columns: 1.1fr 0.9fr; gap: 80px; align-items: center; }
        .cg-section-label { display: inline-block; font-size: 11px; font-weight: 700; letter-spacing: 3px; text-transform: uppercase; color: #fff; margin-bottom: 20px; }
        .cg-intro-text h2 { font-size: clamp(34px, 4vw, 52px); font-weight: 800; line-height: 1.12; letter-spacing: -2px; margin-bottom: 28px; color: #fff; }
        .cg-intro-text p { color: var(--cg-muted); font-size: 18px; line-height: 1.75; margin-bottom: 20px; font-weight: 300; }
        .cg-feature-list { list-style: none; padding: 0; margin-top: 32px; display: flex; flex-direction: column; gap: 14px; }
        .cg-feature-list li { display: flex; align-items: center; gap: 12px; font-size: 16px; color: var(--cg-text); font-weight: 400; }
        .cg-check { width: 22px; height: 22px; background: rgba(255,255,255,0.05); border: 1px solid rgba(255,255,255,0.2); border-radius: 50%; display: flex; align-items: center; justify-content: center; flex-shrink: 0; color: #fff; }
        .cg-check svg { width: 12px; height: 12px; }

        .cg-pillars { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; }
        .cg-pillar { background: var(--cg-card); border: 1px solid var(--cg-border); border-radius: 20px; padding: 34px 28px; position: relative; overflow: hidden; transition: all 0.4s cubic-bezier(0.16,1,0.3,1); }
        .cg-pillar::before { content: ''; position: absolute; top: 0; left: 0; width: 3px; height: 100%; background: linear-gradient(180deg, #333 0%, transparent 100%); }
        .cg-pillar:hover { transform: translateY(-6px); border-color: var(--cg-border-hover); box-shadow: 0 20px 50px rgba(0,0,0,0.4), 0 0 30px rgba(255,255,255,0.06); }
        .cg-pillar-icon { width: 36px; height: 36px; color: #fff; margin-bottom: 16px; }
        .cg-pillar h4 { font-size: 20px; font-weight: 700; color: #fff; margin-bottom: 6px; letter-spacing: -0.5px; }
        .cg-pillar p { font-size: 13px; color: var(--cg-muted); text-transform: uppercase; letter-spacing: 1.5px; font-weight: 600; }

        .cg-benefits { max-width: 1300px; margin: 0 auto; padding: 120px 5%; }
        .cg-benefits-head { text-align: center; margin-bottom: 80px; }
        .cg-benefits-head h2 { font-size: clamp(36px, 4.5vw, 54px); font-weight: 800; letter-spacing: -2px; color: #fff; margin-bottom: 16px; }
        .cg-benefits-head p { font-size: 18px; color: var(--cg-muted); max-width: 560px; margin: 0 auto; font-weight: 300; }
        .cg-benefits-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 32px; }
        .cg-benefit-item { background: rgba(255, 255, 255, 0.02); border: 1px solid rgba(255, 255, 255, 0.05); border-radius: 24px; padding: 48px 40px; position: relative; overflow: hidden; transition: all 0.5s cubic-bezier(0.16,1,0.3,1); backdrop-filter: blur(10px); display: flex; flex-direction: column; justify-content: center; }
        .cg-benefit-item:hover { background: rgba(255, 255, 255, 0.04); border-color: rgba(255, 255, 255, 0.15); transform: translateY(-8px); box-shadow: 0 30px 60px rgba(0,0,0,0.6); }
        .cg-benefit-num { position: absolute; top: -20px; right: -20px; font-size: 180px; font-weight: 900; color: rgba(255,255,255,0.02); letter-spacing: -8px; line-height: 1; transition: all 0.5s cubic-bezier(0.16,1,0.3,1); z-index: 0; pointer-events: none; }
        .cg-benefit-item:hover .cg-benefit-num { color: rgba(255,255,255,0.04); transform: scale(1.05) translate(-10px, 10px); }
        .cg-benefit-content { position: relative; z-index: 1; }
        .cg-benefit-icon { width: 52px; height: 52px; color: #fff; margin-bottom: 32px; background: rgba(255,255,255,0.05); border-radius: 14px; padding: 12px; border: 1px solid rgba(255,255,255,0.1); transition: all 0.5s cubic-bezier(0.16,1,0.3,1); }
        .cg-benefit-item:hover .cg-benefit-icon { background: #fff; color: #000; transform: scale(1.1) rotate(5deg); box-shadow: 0 10px 20px rgba(255,255,255,0.1); }
        .cg-benefit-item h3 { font-size: 24px; font-weight: 700; color: #fff; margin-bottom: 16px; letter-spacing: -0.5px; line-height: 1.3; }
        .cg-benefit-item p { font-size: 16px; color: var(--cg-muted); line-height: 1.7; font-weight: 300; }

        .cg-faq-section { background: var(--cg-card); border-top: 1px solid var(--cg-border); border-bottom: 1px solid var(--cg-border); padding: 120px 5%; }
        .cg-faq-inner { max-width: 900px; margin: 0 auto; }
        .cg-faq-head { text-align: center; margin-bottom: 64px; }
        .cg-faq-head h2 { font-size: clamp(34px, 4vw, 50px); font-weight: 800; letter-spacing: -2px; color: #fff; margin-bottom: 12px; }
        .cg-faq-head p { font-size: 17px; color: var(--cg-muted); }
        .cg-faq-list { display: flex; flex-direction: column; gap: 12px; }
        .cg-faq { background: var(--cg-card2); border: 1px solid var(--cg-border); border-radius: 16px; overflow: hidden; transition: border-color 0.3s; }
        .cg-faq.open { border-color: rgba(255,255,255,0.25); }
        .cg-faq-q { display: flex; justify-content: space-between; align-items: center; padding: 24px 28px; cursor: pointer; user-select: none; gap: 20px; }
        .cg-faq-q h4 { font-size: 18px; font-weight: 600; color: #fff; letter-spacing: -0.3px; }
        .cg-faq-toggle { width: 36px; height: 36px; border: 1px solid var(--cg-border); border-radius: 50%; display: flex; align-items: center; justify-content: center; flex-shrink: 0; color: #fff; font-size: 20px; font-weight: 300; transition: all 0.3s; }
        .cg-faq.open .cg-faq-toggle { background: #fff; border-color: #fff; color: #000; transform: rotate(45deg); }
        .cg-faq-body { max-height: 0; overflow: hidden; transition: max-height 0.5s cubic-bezier(0.16,1,0.3,1), padding 0.3s; }
        .cg-faq.open .cg-faq-body { max-height: 400px; padding-bottom: 28px; }
        .cg-faq-body p { padding: 0 28px; color: var(--cg-muted); font-size: 16px; line-height: 1.75; }

        .cg-local-context { padding: 100px 5%; background: var(--cg-dark); max-width: 1300px; margin: 0 auto; border-bottom: 1px solid var(--cg-border); }
        .cg-local-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 60px; align-items: center; }
        .cg-local-text h2 { font-size: 36px; font-weight: 800; color: #fff; margin-bottom: 20px; letter-spacing: -1px; }
        .cg-local-text p { color: var(--cg-muted); font-size: 16px; line-height: 1.7; margin-bottom: 16px; }
        .cg-local-image { border-radius: 24px; overflow: hidden; border: 1px solid var(--cg-border); }
        
        .cg-tech-section { padding: 100px 5%; background: var(--cg-card2); }
        .cg-tech-inner { max-width: 1000px; margin: 0 auto; }
        .cg-tech-inner h2 { font-size: 36px; font-weight: 800; color: #fff; margin-bottom: 40px; text-align: center; letter-spacing: -1px;}
        .cg-tech-table { width: 100%; border-collapse: collapse; background: var(--cg-card); border-radius: 16px; overflow: hidden; border: 1px solid var(--cg-border); }
        .cg-tech-table th, .cg-tech-table td { padding: 20px 24px; text-align: left; border-bottom: 1px solid var(--cg-border); }
        .cg-tech-table th { background: rgba(255,255,255,0.03); color: #fff; font-weight: 700; font-size: 14px; text-transform: uppercase; letter-spacing: 1px;}
        .cg-tech-table td { color: var(--cg-muted); font-size: 15px; }
        .cg-tech-table tr:last-child td { border-bottom: none; }
        .cg-tech-table tr:hover td { background: rgba(255,255,255,0.02); color: #fff;}

        .cg-eeat-section { padding: 80px 5%; max-width: 1300px; margin: 0 auto; border-top: 1px solid var(--cg-border); }
        .cg-eeat-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 20px; }
        .cg-eeat-card { background: rgba(255,255,255,0.02); border: 1px solid rgba(255,255,255,0.05); border-radius: 16px; padding: 24px; display: flex; align-items: center; gap: 16px; }
        .cg-eeat-icon { width: 32px; height: 32px; color: #fff; opacity: 0.8; }
        .cg-eeat-text h4 { color: #fff; font-size: 16px; font-weight: 700; margin-bottom: 4px; }
        .cg-eeat-text p { color: var(--cg-muted); font-size: 12px; text-transform: uppercase; letter-spacing: 1px; }

        .cg-bridges { padding: 100px 5%; background: var(--cg-dark); max-width: 1300px; margin: 0 auto; }
        .cg-bridges h2 { font-size: 32px; font-weight: 800; color: #fff; margin-bottom: 40px; letter-spacing: -1px; }
        .cg-bridge-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px; }
        .cg-bridge-card { background: var(--cg-card); border: 1px solid var(--cg-border); border-radius: 16px; padding: 32px; transition: all 0.3s; text-decoration: none; display: block; }
        .cg-bridge-card:hover { border-color: #fff; transform: translateY(-4px); }
        .cg-bridge-label { font-size: 11px; color: var(--cg-muted); text-transform: uppercase; letter-spacing: 2px; margin-bottom: 12px; display: block; }
        .cg-bridge-card h3 { color: #fff; font-size: 20px; font-weight: 700; margin-bottom: 12px; }
        .cg-bridge-card p { color: var(--cg-muted); font-size: 14px; line-height: 1.6; }

        .cg-gallery-section { max-width: 1400px; margin: 0 auto; padding: 120px 5%; }
        .cg-gallery-head { display: flex; justify-content: space-between; align-items: flex-end; margin-bottom: 56px; flex-wrap: wrap; gap: 20px; }
        .cg-gallery-head h2 { font-size: clamp(34px, 4vw, 52px); font-weight: 800; letter-spacing: -2px; color: #fff; }
        .cg-gallery-count { font-size: 14px; color: var(--cg-muted); letter-spacing: 1px; }
        .cg-gallery-count span { color: #fff; font-weight: 700; }
        .cg-gallery-masonry { display: grid; grid-template-columns: repeat(4, 1fr); grid-auto-rows: 220px; gap: 16px; grid-auto-flow: dense; }
        .cg-gallery-item { border-radius: 16px; overflow: hidden; cursor: pointer; position: relative; background: #111; }
        .cg-gallery-item:nth-child(1) { grid-column: span 2; grid-row: span 2; }
        .cg-gallery-item:nth-child(5) { grid-column: span 2; }
        .cg-gallery-item img { width: 100%; height: 100%; object-fit: cover; transition: transform 0.7s cubic-bezier(0.16,1,0.3,1), filter 0.4s; filter: brightness(0.85); }
        .cg-gallery-item:hover img { transform: scale(1.06); filter: brightness(1); }
        .cg-gallery-overlay { position: absolute; inset: 0; background: linear-gradient(transparent 40%, rgba(3,3,10,0.9) 100%); opacity: 0; transition: opacity 0.4s; display: flex; align-items: flex-end; padding: 24px; }
        .cg-gallery-item:hover .cg-gallery-overlay { opacity: 1; }
        .cg-gallery-caption-text { color: #fff; font-size: 14px; font-weight: 600; letter-spacing: 0.3px; }
        .cg-gallery-zoom { position: absolute; top: 16px; right: 16px; width: 40px; height: 40px; background: rgba(255,255,255,0.1); backdrop-filter: blur(10px); border-radius: 50%; display: flex; align-items: center; justify-content: center; color: #fff; opacity: 0; transition: opacity 0.3s, transform 0.3s; }
        .cg-gallery-item:hover .cg-gallery-zoom { opacity: 1; transform: scale(1.05); }

        .cg-lightbox { position: fixed; inset: 0; background: rgba(3,3,10,0.96); display: flex; flex-direction: column; align-items: center; justify-content: center; z-index: 9999; opacity: 0; pointer-events: none; transition: opacity 0.4s; backdrop-filter: blur(20px); }
        .cg-lightbox.active { opacity: 1; pointer-events: all; }
        .cg-lightbox img { max-width: min(90vw, 1100px); max-height: 80vh; object-fit: contain; border-radius: 12px; transform: scale(0.94); transition: transform 0.4s cubic-bezier(0.16,1,0.3,1); box-shadow: 0 30px 80px rgba(0,0,0,0.8); }
        .cg-lightbox.active img { transform: scale(1); }
        .cg-lightbox-cap { color: rgba(255,255,255,0.6); font-size: 14px; margin-top: 20px; letter-spacing: 0.5px; }
        .cg-lightbox-close { position: fixed; top: 28px; right: 32px; color: rgba(255,255,255,0.5); font-size: 32px; cursor: pointer; line-height: 1; transition: color 0.2s, transform 0.2s; z-index: 10000; }
        .cg-lightbox-close:hover { color: #fff; transform: rotate(90deg); }

        .cg-reveal { opacity: 0; transform: translateY(40px); transition: opacity 0.9s cubic-bezier(0.16,1,0.3,1), transform 0.9s cubic-bezier(0.16,1,0.3,1); }
        .cg-reveal.visible, .cg-reveal.active { opacity: 1; transform: translateY(0); }

        @media (max-width: 1024px) {
            .cg-intro { grid-template-columns: 1fr; gap: 60px; }
            .cg-benefits-grid { grid-template-columns: 1fr; gap: 24px; }
            .cg-process-grid { grid-template-columns: repeat(2,1fr); gap: 40px; }
        }

        @media (max-width: 900px) {
            .cg-hero-box { grid-template-columns: 1fr; }
            .cg-hero-visual { min-height: 300px; }
            .cg-service-row { grid-template-columns: 1fr; gap: 20px; text-align: center; }
            .cg-local-grid { grid-template-columns: 1fr; }
            .cg-eeat-grid { grid-template-columns: repeat(2, 1fr); }
            .cg-bridge-grid { grid-template-columns: 1fr; }
        }

        @media (max-width: 768px) {
            .cg-stats-v2 { grid-template-columns: repeat(2,1fr); flex-wrap: wrap; }
            .cg-stat-item { flex: 1 1 40%; margin-bottom: 20px; }
            .cg-gallery-masonry { grid-template-columns: repeat(2,1fr); grid-auto-rows: 180px; }
            .cg-gallery-item:nth-child(1) { grid-column: span 2; grid-row: span 1; }
            .cg-gallery-item:nth-child(5) { grid-column: span 2; }
            .cg-pillars { grid-template-columns: 1fr; }
        }

        @media (max-width: 480px) {
            .cg-hero-v2 h1 { letter-spacing: -2px; }
            .cg-stat-item { flex: 1 1 100%; }
            .cg-gallery-masonry { grid-template-columns: 1fr; grid-auto-rows: 240px; }
            .cg-gallery-item:nth-child(1), .cg-gallery-item:nth-child(5) { grid-column: span 1; }
        }

/* =========================================
   INNER PAGE LIGHT-MODE OVERRIDES
   Covers ep-* and cg-* components on spoke
   and hub pages with hardcoded dark styles
   ========================================= */

/* CG page base — override ALL cg CSS variables so every component flips */
body.light-mode .cg-page,
body.light-mode.cg-page {
    --cg-dark: #f5f5f7;
    --cg-card: #ffffff;
    --cg-card2: #f0f0f2;
    --cg-border: rgba(0, 0, 0, 0.1);
    --cg-text: #050505;
    --cg-muted: #555555;
    background: var(--bg-color);
    color: var(--text-color);
}

/* Also override on body directly for pages that set cg-page on body */
body.light-mode {
    --cg-dark: #f5f5f7;
    --cg-card: #ffffff;
    --cg-card2: #f0f0f2;
    --cg-border: rgba(0, 0, 0, 0.1);
    --cg-text: #050505;
    --cg-muted: #555555;
}

/* Fix table specifically — th/td hardcoded white text */
body.light-mode .cg-tech-table th {
    color: #050505 !important;
    background: #f0f0f2 !important;
}
body.light-mode .cg-tech-table td {
    color: #333 !important;
    background: transparent;
}
body.light-mode .cg-tech-table td strong {
    color: #050505 !important;
}
body.light-mode .cg-tech-table tr:hover td {
    background: rgba(0,0,0,0.03) !important;
    color: #050505 !important;
}
body.light-mode .cg-tech-table-wrapper {
    border: 1px solid rgba(0,0,0,0.1) !important;
}


/* Article content areas */
body.light-mode .cg-article-content {
    color: var(--text-color);
}
body.light-mode .cg-article-content h1,
body.light-mode .cg-article-content h2,
body.light-mode .cg-article-content h3,
body.light-mode .cg-article-content strong {
    color: #050505 !important;
}
body.light-mode .cg-article-content p,
body.light-mode .cg-article-content li {
    color: #444 !important;
}

/* Hero sections */
body.light-mode .cg-hero {
    background: linear-gradient(135deg, #e8e8ea 0%, #f5f5f7 100%) !important;
    border-bottom-color: rgba(0,0,0,0.08) !important;
}
body.light-mode .cg-hero-title,
body.light-mode .cg-hero-label {
    color: #050505 !important;
}
body.light-mode .cg-hero-desc {
    color: #555 !important;
}
body.light-mode .cg-article-hero {
    border-bottom-color: rgba(0,0,0,0.08) !important;
}
body.light-mode .cg-article-hero h1 {
    color: #050505 !important;
}

/* EP benefit card sections (hardcoded #0a0a0a) */
body.light-mode .ep-benefits {
    background: #f0f0f2 !important;
    border-top-color: rgba(0,0,0,0.08) !important;
}
body.light-mode .ep-head h2 {
    color: #050505 !important;
}
body.light-mode .ep-head p {
    color: #555 !important;
}
body.light-mode .ep-card {
    background: #fff !important;
    border-color: rgba(0,0,0,0.1) !important;
}
body.light-mode .ep-card h3 {
    color: #050505 !important;
}
body.light-mode .ep-card p {
    color: #555 !important;
}

/* EP FAQ sections (hardcoded #0d0d0d) */
body.light-mode .ep-faq {
    background: #e8e8ea !important;
    border-top-color: rgba(0,0,0,0.08) !important;
}
body.light-mode .ep-faq-wrap h2 {
    color: #050505 !important;
}
body.light-mode .ep-faq-wrap > p {
    color: #555 !important;
}
body.light-mode .ep-qi {
    background: #fff !important;
    border-color: rgba(0,0,0,0.1) !important;
}
body.light-mode .ep-qq h4 {
    color: #050505 !important;
}
body.light-mode .ep-qt {
    color: #050505 !important;
}
body.light-mode .ep-qb p {
    color: #555 !important;
}

/* EP CTA sections (hardcoded #050505) */
body.light-mode .ep-cta {
    background: #dededf !important;
    border-top-color: rgba(0,0,0,0.08) !important;
}
body.light-mode .ep-cta h2 {
    color: #050505 !important;
}
body.light-mode .ep-cta > p {
    color: #555 !important;
}
body.light-mode .ep-btn-s {
    color: #050505 !important;
    border-color: rgba(0,0,0,0.25) !important;
}

/* CG Bridge / Related links section */
body.light-mode .cg-bridges {
    background: #f5f5f7 !important;
    border-top-color: rgba(0,0,0,0.08) !important;
}
body.light-mode .cg-bridges h2,
body.light-mode .cg-bridges h3 {
    color: #050505 !important;
}
body.light-mode .cg-bridge-card {
    background: #fff !important;
    border-color: rgba(0,0,0,0.1) !important;
}
body.light-mode .cg-bridge-card h3,
body.light-mode .cg-bridge-card h4 {
    color: #050505 !important;
}
body.light-mode .cg-bridge-card p {
    color: #555 !important;
}
body.light-mode .cg-bridge-label {
    color: #777 !important;
}

/* CG FAQ sections */
body.light-mode .cg-faq-section {
    background: #e8e8ea !important;
}
body.light-mode .cg-faq-head h2 {
    color: #050505 !important;
}
body.light-mode .cg-faq {
    background: #fff !important;
    border-color: rgba(0,0,0,0.1) !important;
}
body.light-mode .cg-faq-q h4,
body.light-mode .cg-faq-toggle {
    color: #050505 !important;
}
body.light-mode .cg-faq-body p {
    color: #555 !important;
}

/* Tech spec tables */
body.light-mode .cg-tech-table-wrapper {
    background: #fff;
    border-color: rgba(0,0,0,0.08);
}
body.light-mode .cg-tech-table th {
    background: #f0f0f2 !important;
    color: #050505 !important;
    border-color: rgba(0,0,0,0.1) !important;
}
body.light-mode .cg-tech-table td {
    color: #444 !important;
    border-color: rgba(0,0,0,0.07) !important;
}
body.light-mode .cg-tech-table tr:nth-child(even) td {
    background: #f8f8fa !important;
}

/* ---- Gallery / Portfolio section ---- */
body.light-mode .cg-gallery-head h2 {
    color: #050505 !important;
}
body.light-mode .cg-gallery-count span {
    color: #050505 !important;
}
body.light-mode .cg-gallery-section {
    background: transparent;
}

/* ---- btn-primary in light mode: invert to dark pill ---- */
body.light-mode .btn-primary {
    background: #050505 !important;
    color: #ffffff !important;
    box-shadow: none;
}
body.light-mode .btn-primary:hover {
    background: #333 !important;
    color: #fff !important;
}

/* ---- Hero image white-box fix ---- */
body.light-mode .cg-hero-image {
    background: transparent !important;
}
body.light-mode .cg-hero-image img {
    box-shadow: 0 20px 40px rgba(0,0,0,0.15) !important;
}

/* ---- Various section headings hardcoded white ---- */
body.light-mode .cg-section-head h2,
body.light-mode .cg-benefits-head h2,
body.light-mode .cg-process-head h2,
body.light-mode .cg-service-head h2,
body.light-mode .cg-eeat-head h2,
body.light-mode .cg-intro h2,
body.light-mode .cg-cta-head h2,
body.light-mode h2[style*="color:#fff"],
body.light-mode h3[style*="color:#fff"] {
    color: #050505 !important;
}
body.light-mode p[style*="color:#a1a1a6"],
body.light-mode p[style*="color: #a1a1a6"],
body.light-mode span[style*="color:#a1a1a6"] {
    color: #555 !important;
}

/* ---- CG service rows ---- */
body.light-mode .cg-service-row {
    background: #fff !important;
    border-color: rgba(0,0,0,0.1) !important;
}
body.light-mode .cg-service-row h3,
body.light-mode .cg-service-row h4 {
    color: #050505 !important;
}
body.light-mode .cg-service-row p {
    color: #555 !important;
}

/* ---- Benefit / process cards ---- */
body.light-mode .cg-benefit-card,
body.light-mode .cg-process-step {
    background: #fff !important;
    border-color: rgba(0,0,0,0.1) !important;
}
body.light-mode .cg-benefit-card h3,
body.light-mode .cg-process-step h3 {
    color: #050505 !important;
}
body.light-mode .cg-benefit-card p,
body.light-mode .cg-process-step p {
    color: #555 !important;
}

/* ---- Stats / number blocks ---- */
body.light-mode .cg-stat-item .cg-stat-number {
    color: #050505 !important;
}
body.light-mode .cg-stat-item .cg-stat-label {
    color: #555 !important;
}

/* ---- CTA sections with dark bg ---- */
body.light-mode .cg-cta,
body.light-mode .cg-cta-strip {
    background: #e8e8ea !important;
}
body.light-mode .cg-cta h2,
body.light-mode .cg-cta-strip h2 {
    color: #050505 !important;
}
body.light-mode .cg-cta p,
body.light-mode .cg-cta-strip p {
    color: #555 !important;
}
