@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;800&family=Roboto:wght@400;500;700&display=swap');

/* =========================================
   VARIABLES & DESIGN TOKENS
   ========================================= */
:root {
  /* Colors */
  --primary-red: #e62b2b; /* Workiffy brand red */
  --primary-red-hover: #cc2525;
  --dark-bg: #121212;
  --darker-bg: #0a0a0a;
  --light-bg: #f9f9f9;
  --white: #ffffff;
  
  --text-primary: #1a1a1a;
  --text-secondary: #555555;
  --text-light: #f5f5f5;
  --text-muted: #a0a0a0;

  /* Typography */
  --font-heading: 'Inter', sans-serif;
  --font-body: 'Roboto', sans-serif;
  
  /* Transitions */
  --transition-fast: 0.2s ease;
  --transition-normal: 0.4s cubic-bezier(0.165, 0.84, 0.44, 1);
  
  /* Shadows */
  --shadow-sm: 0 4px 6px rgba(0, 0, 0, 0.05);
  --shadow-md: 0 10px 30px rgba(0, 0, 0, 0.08);
  --shadow-lg: 0 20px 40px rgba(0, 0, 0, 0.15);
  --shadow-red: 0 15px 35px rgba(230, 43, 43, 0.2);
}

/* =========================================
   RESET & BASE STYLES
   ========================================= */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  font-size: 16px;
}

body {
  font-family: var(--font-body);
  color: var(--text-primary);
  background-color: var(--light-bg);
  line-height: 1.6;
  overflow-x: hidden;
}

h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-heading);
  text-transform: uppercase;
  font-weight: 800;
  line-height: 1.2;
  letter-spacing: -0.02em;
}

h1 { font-size: clamp(2.5rem, 5vw, 4rem); }
h2 { font-size: clamp(2rem, 4vw, 3rem); }
h3 { font-size: clamp(1.5rem, 3vw, 2rem); margin-bottom: 1rem; }
p { margin-bottom: 1rem; }

a {
  text-decoration: none;
  color: inherit;
  transition: color var(--transition-fast);
}

ul { list-style: none; }
img { max-width: 100%; height: auto; display: block; }

/* =========================================
   UTILITY CLASSES
   ========================================= */
.container {
  width: 100%;
  max-width: 1280px;
  margin: 0 auto;
  padding: 0 2rem;
}

.text-center { text-align: center; }
.text-red { color: var(--primary-red); }
.bg-dark { background-color: var(--dark-bg); color: var(--text-light); }
.bg-light { background-color: var(--light-bg); color: var(--text-primary); }
.bg-white { background-color: var(--white); color: var(--text-primary); }

.section-padding { padding: 5rem 0; }
.section-title { margin-bottom: 3rem; position: relative; }
.section-title::after {
  content: '';
  display: block;
  width: 60px;
  height: 4px;
  background-color: var(--primary-red);
  margin-top: 1rem;
}
.section-title.center::after { margin: 1rem auto 0; }

.btn {
  display: inline-block;
  padding: 1rem 2rem;
  border-radius: 50px;
  font-family: var(--font-heading);
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  transition: all var(--transition-normal);
  cursor: pointer;
  border: none;
}

.btn-primary {
  background-color: var(--primary-red);
  color: var(--white);
  box-shadow: var(--shadow-sm);
}

.btn-primary:hover {
  background-color: var(--primary-red-hover);
  transform: translateY(-2px);
  box-shadow: var(--shadow-red);
}

.btn-outline {
  background-color: transparent;
  border: 2px solid var(--white);
  color: var(--white);
}

.btn-outline:hover {
  background-color: var(--white);
  color: var(--dark-bg);
}

/* =========================================
   GLOBAL HEADER & NAVIGATION
   ========================================= */
header {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  z-index: 1000;
  transition: all var(--transition-fast);
  background-color: rgba(255, 255, 255, 0.95);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid rgba(0,0,0,0.05);
}

header.scrolled {
  box-shadow: var(--shadow-sm);
  padding: 0.5rem 0;
}

header .container {
  max-width: 1400px;
  padding: 0 1.5rem;
}

.nav-container {
  display: flex;
  justify-content: space-between;
  align-items: center;
  height: 80px;
  gap: 1.5rem;
}

.logo {
  display: flex;
  align-items: center;
  flex-shrink: 0;
}

.logo img {
  height: 44px;
  width: auto;
  object-fit: contain;
  transition: transform var(--transition-fast);
}

.logo img:hover {
  transform: scale(1.03);
}

.footer-logo {
  height: 55px;
  width: auto;
  object-fit: contain;
  margin-bottom: 1.5rem;
  display: block;
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 1.5rem;
  margin-left: auto;
}

.nav-links a {
  font-family: var(--font-heading);
  font-weight: 600;
  font-size: 0.85rem;
  text-transform: uppercase;
  position: relative;
  white-space: nowrap;
  letter-spacing: 0.02em;
  flex-shrink: 0;
}

.nav-container .btn-primary {
  flex-shrink: 0;
  white-space: nowrap;
  padding: 0.75rem 1.4rem;
  font-size: 0.85rem;
}

.nav-links a::after {
  content: '';
  position: absolute;
  bottom: -5px;
  left: 0;
  width: 0;
  height: 2px;
  background-color: var(--primary-red);
  transition: width var(--transition-fast);
}

.nav-links a:hover::after,
.nav-links a.active::after {
  width: 100%;
}

@media (min-width: 993px) and (max-width: 1250px) {
  .nav-container {
    gap: 1rem;
  }
  .nav-links {
    gap: 0.9rem;
  }
  .nav-links a {
    font-size: 0.78rem;
  }
  .nav-container .btn-primary {
    padding: 0.65rem 1rem;
    font-size: 0.78rem;
  }
}

.mobile-toggle {
  display: none;
  font-size: 1.5rem;
  cursor: pointer;
}

/* =========================================
   GLOBAL FOOTER
   ========================================= */
footer {
  background: linear-gradient(180deg, #111622 0%, #080b12 100%);
  color: var(--text-light);
  padding: 5rem 0 2rem;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
}

.footer-top {
  text-align: center;
  margin-bottom: 4rem;
  padding-bottom: 4rem;
  border-bottom: 1px solid rgba(255,255,255,0.1);
}

.footer-top h2 {
  font-size: 2.5rem;
  margin-bottom: 1rem;
}

.footer-top p {
  color: var(--text-muted);
  font-size: 1.1rem;
  margin-bottom: 2rem;
}

.footer-grid {
  display: grid;
  grid-template-columns: 1.4fr 1fr 1.2fr 1.2fr;
  gap: 3rem;
  margin-bottom: 3rem;
}

.footer-col h4 {
  color: var(--white);
  margin-bottom: 1.5rem;
  font-size: 1.2rem;
}

.footer-col ul {
  display: flex;
  flex-direction: column;
  gap: 0.8rem;
}

.footer-col a {
  color: var(--text-muted);
  transition: color var(--transition-fast);
}

.footer-col a:hover {
  color: var(--primary-red);
}

.contact-info li {
  display: flex;
  align-items: flex-start;
  gap: 1rem;
  color: var(--text-muted);
  margin-bottom: 1rem;
}

.contact-info i {
  color: var(--primary-red);
  margin-top: 0.3rem;
}

.footer-bottom {
  text-align: center;
  padding-top: 2rem;
  border-top: 1px solid rgba(255,255,255,0.1);
  color: var(--text-muted);
  font-size: 0.9rem;
}

.footer-sister-brand {
  margin-bottom: 0.8rem;
  color: #ddd;
  font-size: 0.95rem;
  font-weight: 500;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.4rem;
  flex-wrap: wrap;
  line-height: 1.5;
}

.footer-sister-brand a {
  color: var(--primary-red, #e62b2b);
  font-weight: 600;
  text-decoration: none;
  transition: color 0.3s ease, text-decoration 0.3s ease;
}

.footer-sister-brand a:hover {
  text-decoration: underline;
  color: #ff4d4d;
}

/* Consultation Step Wizard Styles */
.booking-wizard-steps {
  display: flex;
  justify-content: space-between;
  margin-bottom: 2.5rem;
  position: relative;
  gap: 0.5rem;
}

.booking-wizard-steps::before {
  content: '';
  position: absolute;
  top: 20px;
  left: 10%;
  right: 10%;
  height: 3px;
  background: #e0e0e0;
  z-index: 0;
}

.wizard-step {
  position: relative;
  z-index: 1;
  text-align: center;
  flex: 1;
}

.wizard-step-num {
  width: 42px;
  height: 42px;
  border-radius: 50%;
  background: #e9ecef;
  color: #6c757d;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 1.05rem;
  margin: 0 auto 0.6rem;
  transition: all 0.3s ease;
  border: 3px solid #fff;
  box-shadow: 0 2px 5px rgba(0,0,0,0.1);
}

.wizard-step-label {
  font-size: 0.85rem;
  font-weight: 600;
  color: #6c757d;
  transition: color 0.3s ease;
}

.wizard-step.active .wizard-step-num {
  background: var(--primary-red, #e62b2b);
  color: #fff;
  box-shadow: 0 0 0 4px rgba(230, 43, 43, 0.2);
}

.wizard-step.active .wizard-step-label {
  color: var(--primary-red, #e62b2b);
  font-weight: 700;
}

.wizard-step.completed .wizard-step-num {
  background: #28a745;
  color: #fff;
}

.wizard-step.completed .wizard-step-label {
  color: #28a745;
}

@media (max-width: 640px) {
  .wizard-step-label {
    font-size: 0.75rem;
  }
  .wizard-step-num {
    width: 34px;
    height: 34px;
    font-size: 0.9rem;
  }
  .booking-wizard-steps::before {
    top: 17px;
  }
}

/* =========================================
   HERO SECTIONS (Pages)
   ========================================= */
.page-hero {
  padding: 12rem 0 6rem;
  background-color: var(--dark-bg);
  color: var(--white);
  text-align: center;
  position: relative;
}

.page-hero::before {
  content: '';
  position: absolute;
  top: 0; left: 0; width: 100%; height: 100%;
  background: linear-gradient(rgba(0,0,0,0.7), rgba(0,0,0,0.7)), url('https://images.unsplash.com/photo-1614728263952-84ea256f9679?q=80&w=2000&auto=format&fit=crop') center/cover;
  z-index: 0;
  opacity: 0.3;
}

.page-hero .container {
  position: relative;
  z-index: 1;
}

/* =========================================
   COMPONENTS (Catalog Cards)
   ========================================= */
.layered-grid-container {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
  gap: 2.5rem;
}

.catalog-card {
  position: relative;
  border-radius: 16px;
  overflow: hidden;
  background: var(--white);
  box-shadow: var(--shadow-md);
  transition: transform var(--transition-normal);
  z-index: 1;
  padding: 2rem;
  min-height: 400px;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
}

.catalog-card .card-content {
  position: relative;
  z-index: 2;
}

.catalog-card::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 60%;
  background-image: var(--bg-image);
  background-size: cover;
  background-position: center;
  z-index: -1;
  transition: transform var(--transition-normal), filter var(--transition-normal);
  filter: brightness(0.9);
}

/* Gradient overlay for readability */
.catalog-card::after {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0; bottom: 0;
  background: linear-gradient(to bottom, rgba(255,255,255,0) 40%, rgba(255,255,255,1) 60%);
  z-index: -1;
}

.catalog-card.dark-theme {
  background: var(--dark-bg);
  color: var(--white);
}

.catalog-card.dark-theme::after {
  background: linear-gradient(to bottom, rgba(18,18,18,0) 40%, rgba(18,18,18,1) 60%);
}

.catalog-card:hover {
  transform: translateY(-10px);
  z-index: 2;
  box-shadow: var(--shadow-lg);
}

.catalog-card:hover::before {
  transform: scale(1.05);
  filter: brightness(1);
}

.card-icon {
  position: relative;
  z-index: 2;
  width: 52px;
  height: 52px;
  background: var(--primary-red);
  color: var(--white);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.5rem;
  margin-bottom: 1.2rem;
  box-shadow: 0 6px 16px rgba(230, 43, 43, 0.3);
  flex-shrink: 0;
}

.card-content {
  position: relative;
  z-index: 2;
  padding-top: 2rem; /* Make room for icon if needed */
}

.card-content h3 {
  font-size: 1.25rem;
  margin-bottom: 1rem;
}

.card-content ul li {
  position: relative;
  padding-left: 1.5rem;
  margin-bottom: 0.5rem;
  font-size: 0.95rem;
  color: var(--text-secondary);
}

.dark-theme .card-content ul li {
  color: var(--text-muted);
}

.card-content ul li::before {
  content: '•';
  color: var(--primary-red);
  position: absolute;
  left: 0;
  font-weight: bold;
}

/* =========================================
   RESPONSIVE
   ========================================= */
@media (max-width: 992px) {
  .nav-links {
    position: absolute;
    top: 80px;
    left: 0;
    width: 100%;
    background: var(--white);
    flex-direction: column;
    padding: 2rem;
    gap: 1.5rem;
    box-shadow: var(--shadow-md);
    transform: translateY(-150%);
    transition: transform var(--transition-normal);
  }

  .nav-links.show {
    transform: translateY(0);
  }

  .mobile-toggle {
    display: block;
  }

  .footer-grid {
    grid-template-columns: 1fr;
    text-align: center;
  }

  .contact-info li {
    justify-content: center;
  }
}

/* =========================================
   3D VISUAL DYNAMICS & AMBIENT EFFECTS
   ========================================= */

/* Ambient Animated Glow for Dark Sections */
.bg-dark {
  background-color: var(--dark-bg);
  color: var(--text-light);
  position: relative;
  overflow: hidden;
}

.bg-dark::before {
  content: '';
  position: absolute;
  top: -30%;
  left: -20%;
  width: 140%;
  height: 160%;
  background: radial-gradient(circle at 20% 30%, rgba(230, 43, 43, 0.15) 0%, transparent 40%),
              radial-gradient(circle at 80% 70%, rgba(230, 43, 43, 0.08) 0%, transparent 50%);
  pointer-events: none;
  z-index: 0;
  animation: ambientFloat 18s ease-in-out infinite alternate;
}

@keyframes ambientFloat {
  0% { transform: translate(0, 0) scale(1); }
  50% { transform: translate(-3%, 3%) scale(1.05); }
  100% { transform: translate(3%, -2%) scale(1); }
}

/* Geometric Subtle Grid Background */
.bg-grid-pattern {
  background-image: radial-gradient(rgba(230, 43, 43, 0.12) 1px, transparent 1px);
  background-size: 32px 32px;
}

/* 3D Elevate & Dynamic Perspective Hover Effects */
.catalog-card, .process-card, .service-card, .contact-card {
  transition: transform 0.4s cubic-bezier(0.165, 0.84, 0.44, 1), box-shadow 0.4s cubic-bezier(0.165, 0.84, 0.44, 1), border-color 0.3s ease;
  transform-style: preserve-3d;
  will-change: transform, box-shadow;
}

.catalog-card:hover, .process-card:hover, .service-card:hover {
  transform: translateY(-8px) rotateX(2deg) rotateY(-2deg) scale(1.015);
  box-shadow: 0 25px 45px -10px rgba(230, 43, 43, 0.2), 0 12px 24px -6px rgba(0, 0, 0, 0.12);
  border-color: rgba(230, 43, 43, 0.35);
}

/* Glassmorphism Styling */
.glass-panel {
  background: rgba(255, 255, 255, 0.04);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 20px;
}

/* Smooth Floating Micro-Animations */
@keyframes floatY {
  0%, 100% { transform: translateY(0px); }
  50% { transform: translateY(-10px); }
}

.float-anim {
  animation: floatY 5s ease-in-out infinite;
}

/* Shimmer Light Reflection on Hover */
.shimmer-hover {
  position: relative;
  overflow: hidden;
}

.shimmer-hover::after {
  content: '';
  position: absolute;
  top: -50%;
  left: -50%;
  width: 200%;
  height: 200%;
  background: linear-gradient(60deg, transparent, rgba(255, 255, 255, 0.18), transparent);
  transform: rotate(30deg) translateY(-100%);
  transition: transform 0.8s ease;
  pointer-events: none;
}

.shimmer-hover:hover::after {
  transform: rotate(30deg) translateY(100%);
}



/* =========================================
   COMPREHENSIVE MOBILE & TABLET RESPONSIVENESS
   ========================================= */

@media (min-width: 993px) {
  .d-none-desktop { display: none !important; }
}

@media (max-width: 992px) {
  .d-none-mobile { display: none !important; }
  
  html { font-size: 15px; }
  body { overflow-x: hidden; }

  /* Header & Mobile Navigation */
  header {
    background: #ffffff !important;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08) !important;
  }
  
  .nav-container {
    height: 65px !important;
    padding: 0 1rem !important;
    display: flex !important;
    justify-content: space-between !important;
    align-items: center !important;
  }
  
  .logo {
    display: flex !important;
    align-items: center !important;
    max-width: 65% !important;
  }

  .logo img {
    height: 38px !important;
    max-height: 38px !important;
    max-width: 160px !important;
    width: auto !important;
    object-fit: contain !important;
    transition: transform var(--transition-fast);
  }

  .logo img:hover {
    transform: scale(1.03);
  }

  .footer-logo {
    height: 48px;
    max-width: 180px;
    width: auto;
    object-fit: contain;
    margin-bottom: 1.5rem;
    display: block;
  }

  .mobile-toggle {
    display: block !important;
    font-size: 1.8rem !important;
    cursor: pointer !important;
    color: var(--text-primary) !important;
    padding: 0.25rem 0.5rem !important;
    z-index: 1001 !important;
    line-height: 1 !important;
  }

  .nav-links {
    position: fixed !important;
    top: 70px !important;
    left: 0 !important;
    width: 100% !important;
    height: calc(100vh - 70px) !important;
    background: #ffffff !important;
    flex-direction: column !important;
    align-items: center !important;
    justify-content: flex-start !important;
    padding: 2rem 1.5rem !important;
    gap: 1.25rem !important;
    box-shadow: 0 15px 30px rgba(0, 0, 0, 0.15) !important;
    overflow-y: auto !important;
    opacity: 0 !important;
    visibility: hidden !important;
    transform: translateY(-20px) !important;
    transition: all 0.3s cubic-bezier(0.165, 0.84, 0.44, 1) !important;
    z-index: 999 !important;
  }

  .nav-links.show {
    opacity: 1 !important;
    visibility: visible !important;
    transform: translateY(0) !important;
  }

  .nav-links a {
    font-size: 1.1rem !important;
    font-weight: 700 !important;
    color: var(--text-primary) !important;
    width: 100% !important;
    text-align: center !important;
    padding: 0.75rem 0 !important;
    border-bottom: 1px solid #f0f0f0 !important;
  }

  .nav-links a.active {
    color: var(--primary-red) !important;
  }

  .mobile-menu-cta {
    margin-top: 1rem !important;
    display: inline-block !important;
    width: 100% !important;
    max-width: 280px !important;
    padding: 1rem 1.5rem !important;
    background: var(--primary-red) !important;
    color: #ffffff !important;
    border-radius: 50px !important;
    font-weight: 700 !important;
    text-transform: uppercase !important;
    text-align: center !important;
    border: none !important;
    box-shadow: 0 10px 25px rgba(230, 43, 43, 0.3) !important;
    border-bottom: none !important;
  }

  /* Universal Split Grids Override */
  [style*="grid-template-columns: 1fr 1fr"],
  [style*="grid-template-columns: 2fr 1fr"],
  [style*="grid-template-columns: 1fr 2fr"] {
    grid-template-columns: 1fr !important;
    gap: 2rem !important;
  }

  /* Section Padding & Headers */
  .section-padding {
    padding: 3.5rem 0 !important;
  }

  /* Footer Responsive */
  .footer-grid {
    grid-template-columns: 1fr !important;
    gap: 2rem !important;
    text-align: center !important;
  }

  .footer-col {
    display: flex !important;
    flex-direction: column !important;
    align-items: center !important;
  }

  .contact-info li {
    justify-content: center !important;
  }

  .footer-top {
    text-align: center !important;
  }
}

@media (max-width: 768px) {
  html { font-size: 14px; }

  /* Universal Grid Overrides for Mobile Phones */
  .layered-grid-container,
  [style*="grid-template-columns: repeat"],
  [style*="grid-template-columns: repeat(2, 1fr)"],
  [style*="grid-template-columns: repeat(3, 1fr)"],
  div[style*="grid-template-columns: 1fr 1fr"] {
    grid-template-columns: 1fr !important;
    gap: 1.5rem !important;
  }

  /* Service & Packaging cards layout on phones */
  .process-card, .catalog-card, .service-card, .contact-card {
    padding: 1.75rem 1.25rem !important;
  }

  /* Badges Grid */
  [style*="grid-template-columns: repeat(3, 1fr)"] {
    padding: 2rem 1rem !important;
  }

  /* Stack Hero Buttons & Hero Text */
  .home-hero, .page-hero {
    padding-top: 7rem !important;
    padding-bottom: 4rem !important;
    min-height: auto !important;
  }

  .hero-fade .btn {
    display: block !important;
    width: 100% !important;
    margin-right: 0 !important;
    margin-bottom: 1rem !important;
    text-align: center !important;
  }

  /* Contact Page Grid */
  .contact-card {
    padding: 2rem 1.25rem !important;
  }

  /* Fixed height cards adjustments */
  div[style*="min-height: 200px"], div[style*="height: 600px"] {
    min-height: 220px !important;
    height: auto !important;
  }

  img[style*="height: 100%"] {
    max-height: 250px !important;
    object-fit: cover !important;
  }
}


/* =========================================
   FAQ ACCORDION COMPONENT
   ========================================= */
.faq-item {
  transition: all 0.3s ease;
}

.faq-content {
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.4s cubic-bezier(0, 1, 0, 1), padding 0.3s ease;
}

.faq-icon {
  transition: transform 0.3s ease;
}

.faq-item.active {
  border-color: var(--primary-red) !important;
  box-shadow: var(--shadow-md) !important;
}


/* =========================================
   ENHANCED MOBILE & TABLET MEDIA QUERIES
   ========================================= */

@media (max-width: 992px) {
  /* Catalog cards on services.html */
  .catalog-card {
    min-height: 380px !important;
    padding: 1.5rem !important;
  }

  .catalog-card::before {
    height: 50% !important;
  }

  /* Packaging Cards Grid on services.html */
  div[style*="grid-template-columns: repeat(auto-fit, minmax(450px, 1fr))"] {
    grid-template-columns: 1fr !important;
    gap: 1.5rem !important;
  }

  div[style*="grid-template-columns: 1fr 1fr"] {
    grid-template-columns: 1fr !important;
  }
}

@media (max-width: 768px) {
  /* Images max bounds & responsiveness */
  img {
    max-width: 100% !important;
    height: auto !important;
    object-fit: cover !important;
  }

  /* Fix packaging horizontal cards on phone screen */
  .process-card[style*="display: grid; grid-template-columns: 1fr 1fr"] {
    grid-template-columns: 1fr !important;
  }

  .process-card img[style*="height: 100%"] {
    height: 220px !important;
    width: 100% !important;
  }

  /* Hero section adjustments */
  .page-hero {
    padding-top: 7.5rem !important;
    padding-bottom: 3.5rem !important;
    min-height: auto !important;
  }

  .hero-content-layer h1 {
    font-size: 1.85rem !important;
    line-height: 1.25 !important;
  }

  /* Portfolio grid on phones */
  div[style*="grid-template-columns: repeat(auto-fit, minmax(350px, 1fr))"] {
    grid-template-columns: 1fr !important;
    gap: 1.25rem !important;
  }
}

/* =========================================
   ROBUST MOBILE GRID SPLIT & IMAGE FIXES
   ========================================= */

@media (max-width: 992px) {
  .grid-split,
  [class*="grid-split"],
  [style*="grid-template-columns: 1.1fr"],
  [style*="grid-template-columns: 1.2fr"],
  [style*="grid-template-columns: 1.5fr"],
  [style*="grid-template-columns: 1fr 1fr"],
  [style*="grid-template-columns: 2fr 1fr"],
  [style*="grid-template-columns: 1fr 2fr"],
  div[style*="grid-template-columns"] {
    grid-template-columns: 1fr !important;
    gap: 2.5rem !important;
  }

  .grid-split > div,
  div[style*="grid-template-columns"] > div {
    width: 100% !important;
    height: auto !important;
  }

  .grid-split img,
  div[style*="grid-template-columns"] img {
    width: 100% !important;
    height: 280px !important;
    max-height: 350px !important;
    object-fit: cover !important;
    border-radius: 16px !important;
  }
}

@media (max-width: 768px) {
  .grid-split img,
  div[style*="grid-template-columns"] img {
    height: 220px !important;
  }
}

/* =========================================
   3D INDUSTRY CARD SHOWCASE STYLES
   ========================================= */

.industry-3d-section {
  background: radial-gradient(circle at 50% 20%, #1a202c 0%, #0b0f17 100%) !important;
  position: relative;
  overflow: hidden;
  padding: 6rem 0;
}

.industry-3d-section::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: radial-gradient(rgba(227, 26, 34, 0.15) 1px, transparent 1px);
  background-size: 36px 36px;
  pointer-events: none;
  opacity: 0.7;
}

.industry-card-3d {
  background: rgba(255, 255, 255, 0.05);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 24px;
  padding: 2.5rem 2rem;
  position: relative;
  transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
  box-shadow: 0 15px 35px rgba(0, 0, 0, 0.4), inset 0 1px 0 rgba(255, 255, 255, 0.2);
  transform-style: preserve-3d;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}

.industry-card-3d:hover {
  border-color: rgba(227, 26, 34, 0.6);
  box-shadow: 0 25px 50px rgba(227, 26, 34, 0.3), inset 0 1px 0 rgba(255, 255, 255, 0.4);
  transform: translateY(-12px) scale(1.03);
}

.industry-icon-wrapper {
  width: 80px;
  height: 80px;
  border-radius: 20px;
  background: linear-gradient(135deg, rgba(227, 26, 34, 0.25) 0%, rgba(227, 26, 34, 0.05) 100%);
  border: 1px solid rgba(227, 26, 34, 0.4);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 2.8rem;
  margin-bottom: 1.5rem;
  box-shadow: 0 10px 25px rgba(227, 26, 34, 0.2);
  transform: translateZ(30px);
  animation: float3d 4s ease-in-out infinite;
}

@keyframes float3d {
  0%, 100% { transform: translateZ(30px) translateY(0px); }
  50% { transform: translateZ(30px) translateY(-8px); }
}

.industry-card-3d h3 {
  color: #ffffff !important;
  font-size: 1.4rem;
  font-weight: 700;
  margin-bottom: 0.8rem;
  transform: translateZ(20px);
  letter-spacing: -0.02em;
}

.industry-card-3d p {
  color: #cbd5e1 !important;
  font-size: 0.98rem;
  line-height: 1.65;
  transform: translateZ(15px);
  margin-bottom: 1.5rem;
}

.industry-card-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.45rem 1.1rem;
  border-radius: 50px;
  background: rgba(227, 26, 34, 0.15);
  border: 1px solid rgba(227, 26, 34, 0.35);
  color: #ff6b6b;
  font-size: 0.82rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  transform: translateZ(25px);
  width: fit-content;
}

/* =========================================
   REUSABLE TESTIMONIAL COMPONENT (SPEC 5)
   ========================================= */
.testimonial-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 2rem;
  align-items: stretch;
}

@media (max-width: 992px) {
  .testimonial-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 640px) {
  .testimonial-grid {
    grid-template-columns: 1fr;
  }
}

.testimonial-card {
  background: rgba(255, 255, 255, 0.04);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 20px;
  padding: 2rem 1.75rem;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  min-height: 280px;
  position: relative;
  transition: transform 0.35s ease, box-shadow 0.35s ease, border-color 0.3s ease;
}

.testimonial-card:hover {
  transform: translateY(-6px);
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.35), 0 0 20px rgba(227, 26, 34, 0.2);
  border-color: rgba(227, 26, 34, 0.4);
}

.testimonial-card.light-theme {
  background: #ffffff;
  border: 1px solid rgba(0, 0, 0, 0.08);
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.05);
}

.testimonial-card.light-theme:hover {
  border-color: var(--primary-red);
  box-shadow: 0 20px 40px rgba(227, 26, 34, 0.12);
}

.testimonial-tag {
  font-size: 0.78rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  color: var(--primary-red);
  background: rgba(227, 26, 34, 0.12);
  padding: 4px 10px;
  border-radius: 6px;
  width: fit-content;
  margin-bottom: 1rem;
  font-family: var(--font-heading);
}

.testimonial-quote {
  font-size: 1.02rem;
  line-height: 1.65;
  color: #e2e8f0;
  font-style: italic;
  margin-bottom: 1.5rem;
  flex-grow: 1;
}

.testimonial-card.light-theme .testimonial-quote {
  color: var(--text-primary);
}

.testimonial-stars {
  color: #f59e0b;
  font-size: 1rem;
  margin-bottom: 1rem;
  letter-spacing: 2px;
}

.testimonial-author {
  display: flex;
  align-items: center;
  gap: 0.85rem;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  padding-top: 1rem;
}

.testimonial-card.light-theme .testimonial-author {
  border-top: 1px solid rgba(0, 0, 0, 0.06);
}

.avatar-initials {
  width: 46px;
  height: 46px;
  min-width: 46px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--primary-red), #991b1b);
  color: #ffffff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 1rem;
  letter-spacing: 0.5px;
  box-shadow: 0 4px 12px rgba(227, 26, 34, 0.3);
}

.author-info h4 {
  margin: 0;
  font-size: 0.95rem;
  font-weight: 700;
  color: #ffffff;
}

.testimonial-card.light-theme .author-info h4 {
  color: var(--text-primary);
}

.author-info p {
  margin: 2px 0 0;
  font-size: 0.83rem;
  color: var(--primary-red);
  font-weight: 600;
}

.testimonial-card.hidden-card {
  display: none !important;
}

.testimonial-controls {
  text-align: center;
  margin-top: 2.5rem;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1.5rem;
}

/* =========================================
   BLOG & ARTICLE SECTION STYLES
   ========================================= */

.blog-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 2rem;
}

@media (max-width: 992px) {
  .blog-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 640px) {
  .blog-grid {
    grid-template-columns: 1fr;
  }
}

.blog-card {
  background: var(--white);
  border-radius: 16px;
  overflow: hidden;
  border: 1px solid rgba(0, 0, 0, 0.08);
  box-shadow: var(--shadow-sm);
  display: flex;
  flex-direction: column;
  transition: all var(--transition-normal);
}

.blog-card:hover {
  transform: translateY(-6px);
  box-shadow: var(--shadow-md);
  border-color: var(--primary-red);
}

.blog-card-img {
  position: relative;
  width: 100%;
  height: 220px;
  overflow: hidden;
}

.blog-card-img img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.5s ease;
}

.blog-card:hover .blog-card-img img {
  transform: scale(1.06);
}

.blog-badge {
  position: absolute;
  top: 1rem;
  left: 1rem;
  background: var(--primary-red);
  color: var(--white);
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  padding: 0.35rem 0.85rem;
  border-radius: 50px;
  box-shadow: 0 4px 10px rgba(230, 43, 43, 0.3);
}

.blog-card-body {
  padding: 1.75rem;
  display: flex;
  flex-direction: column;
  flex-grow: 1;
}

.blog-meta {
  display: flex;
  align-items: center;
  gap: 1rem;
  font-size: 0.85rem;
  color: var(--text-secondary);
  margin-bottom: 0.75rem;
}

.blog-meta span {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
}

.blog-card-title {
  font-size: 1.2rem;
  line-height: 1.4;
  margin-bottom: 0.85rem;
  font-weight: 700;
  color: var(--text-primary);
  transition: color var(--transition-fast);
}

.blog-card:hover .blog-card-title {
  color: var(--primary-red);
}

.blog-card-excerpt {
  color: var(--text-secondary);
  font-size: 0.95rem;
  line-height: 1.6;
  margin-bottom: 1.5rem;
  flex-grow: 1;
}

.blog-card-footer {
  border-top: 1px solid #f0f0f0;
  padding-top: 1rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.blog-read-more {
  font-family: var(--font-heading);
  font-weight: 700;
  font-size: 0.85rem;
  text-transform: uppercase;
  color: var(--primary-red);
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
}

.blog-read-more i {
  transition: transform var(--transition-fast);
}

.blog-card:hover .blog-read-more i {
  transform: translateX(4px);
}

/* Single Article Styling */
.article-wrapper {
  background: var(--white);
  border-radius: 20px;
  padding: 3rem 2.5rem;
  box-shadow: var(--shadow-md);
  margin-bottom: 4rem;
}

@media (max-width: 768px) {
  .article-wrapper {
    padding: 2rem 1.25rem;
  }
}

.article-header {
  margin-bottom: 2.5rem;
  border-bottom: 1px solid #eeeeee;
  padding-bottom: 2rem;
}

.article-header h1 {
  font-size: clamp(1.8rem, 4vw, 2.75rem);
  text-transform: none;
  letter-spacing: -0.02em;
  margin-bottom: 1.25rem;
  color: var(--text-primary);
}

.article-meta-bar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 1.5rem;
  color: var(--text-secondary);
  font-size: 0.92rem;
}

.article-author-info {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.article-author-avatar {
  width: 42px;
  height: 42px;
  border-radius: 50%;
  background: var(--primary-red);
  color: var(--white);
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
}

.article-content {
  font-size: 1.08rem;
  line-height: 1.85;
  color: #2d3748;
}

.article-content h2 {
  font-size: 1.65rem;
  margin: 2.5rem 0 1.25rem;
  text-transform: none;
  color: var(--text-primary);
  border-left: 4px solid var(--primary-red);
  padding-left: 1rem;
}

.article-content h3 {
  font-size: 1.35rem;
  margin: 2rem 0 1rem;
  text-transform: none;
  color: var(--text-primary);
}

.article-content p {
  margin-bottom: 1.5rem;
}

.article-content ul, .article-content ol {
  margin-bottom: 1.5rem;
  padding-left: 1.75rem;
}

.article-content ul {
  list-style: disc;
}

.article-content li {
  margin-bottom: 0.5rem;
}

.article-content blockquote {
  background: rgba(230, 43, 43, 0.05);
  border-left: 4px solid var(--primary-red);
  padding: 1.5rem 2rem;
  margin: 2rem 0;
  border-radius: 0 12px 12px 0;
  font-style: italic;
  font-size: 1.12rem;
  color: #1a202c;
}

.article-content a {
  color: var(--primary-red);
  font-weight: 600;
  text-decoration: underline;
  text-underline-offset: 3px;
  transition: opacity var(--transition-fast);
}

.article-content a:hover {
  opacity: 0.85;
}

/* Ensure buttons inside article content have high contrast white text */
.article-content a.btn,
.article-content .btn,
.article-interlink-box a.btn,
.article-interlink-box .btn {
  display: inline-block !important;
  color: #ffffff !important;
  text-decoration: none !important;
  font-weight: 700 !important;
  text-align: center !important;
  padding: 0.85rem 1.75rem !important;
  font-size: 0.9rem !important;
  border-radius: 50px !important;
}

.article-content a.btn-primary,
.article-interlink-box a.btn-primary,
.article-interlink-box .btn-primary {
  background-color: var(--primary-red) !important;
  color: #ffffff !important;
  box-shadow: 0 6px 18px rgba(230, 43, 43, 0.4) !important;
}

.article-content a.btn-primary:hover,
.article-interlink-box a.btn-primary:hover,
.article-interlink-box .btn-primary:hover {
  background-color: var(--primary-red-hover) !important;
  color: #ffffff !important;
  transform: translateY(-2px) !important;
  box-shadow: 0 8px 22px rgba(230, 43, 43, 0.5) !important;
}

.article-content a.btn-outline,
.article-interlink-box a.btn-outline,
.article-interlink-box .btn-outline {
  background-color: transparent !important;
  border: 2px solid var(--white) !important;
  color: var(--white) !important;
}

.article-content a.btn-outline:hover,
.article-interlink-box a.btn-outline:hover,
.article-interlink-box .btn-outline:hover {
  background-color: var(--white) !important;
  color: var(--dark-bg) !important;
}

.article-interlink-box {
  background: linear-gradient(135deg, #1e293b 0%, #0f172a 100%);
  color: var(--white);
  padding: 2.25rem 2rem;
  border-radius: 16px;
  margin: 2.5rem 0;
  border: 1px solid rgba(255, 255, 255, 0.12);
  box-shadow: 0 12px 35px rgba(0, 0, 0, 0.2);
}

.article-interlink-box h4 {
  color: #ffffff !important;
  text-transform: none;
  margin-bottom: 0.75rem;
  font-size: 1.3rem;
  font-weight: 700;
}

.article-interlink-box p {
  color: #cbd5e1 !important;
  margin-bottom: 1.5rem;
  font-size: 1rem;
  line-height: 1.65;
}

/* Extra Mobile Fixes for screens <= 480px */
@media (max-width: 480px) {
  .logo img {
    height: 32px !important;
    max-height: 32px !important;
    max-width: 130px !important;
  }
  .nav-container {
    height: 60px !important;
    padding: 0 0.75rem !important;
  }
  .mobile-toggle {
    font-size: 1.6rem !important;
  }
  .nav-links {
    top: 60px !important;
    height: calc(100vh - 60px) !important;
  }
}

/* =========================================
   CLIENT PORTFOLIO GRID & CARDS
   ========================================= */
.client-portfolio-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1rem;
}

@media (min-width: 640px) {
  .client-portfolio-grid {
    grid-template-columns: repeat(3, 1fr);
    gap: 1.25rem;
  }
}

@media (min-width: 992px) {
  .client-portfolio-grid {
    grid-template-columns: repeat(5, 1fr);
    gap: 1.5rem;
  }
}

.client-logo-card {
  background: #ffffff;
  border-radius: 12px;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.03);
  padding: 1.25rem 1rem;
  display: flex;
  align-items: center;
  justify-content: center;
  height: 100px;
  border: 1px solid #f0f0f0;
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.client-logo-card:hover {
  transform: translateY(-3px);
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.08);
}

.client-logo-card img {
  max-width: 100%;
  max-height: 50px;
  width: auto;
  height: auto;
  object-fit: contain;
}
