/* 
 * REDMCO Website Styles - Performance Optimized
 * Using BEM methodology for CSS organization
 */

/* ===== CSS Variables ===== */
:root {
  /* Colors */
  --primary-color: #C00000;
  --background-color: #FFFFFF;
  --text-color: #000000;
  --light-gray: #f5f5f5;
  --dark-gray: #333333;
  
  /* Typography */
  --font-primary: 'Lato', sans-serif;
  
  /* Font weights */
  --font-light: 300;
  --font-regular: 400;
  --font-bold: 700;
  --font-black: 900;
  
  /* Spacing */
  --spacing-base: 8px;
  --spacing-xs: calc(var(--spacing-base) * 0.5);
  --spacing-sm: var(--spacing-base);
  --spacing-md: calc(var(--spacing-base) * 2);
  --spacing-lg: calc(var(--spacing-base) * 3);
  --spacing-xl: calc(var(--spacing-base) * 4);
  --spacing-xxl: calc(var(--spacing-base) * 6);
  
  /* Transitions - consolidated for better performance */
  --transition-fast: 0.3s ease;
  --transition-medium: 0.5s ease;
  --transition-slow: 0.8s ease;
  
  /* Border radius */
  --border-radius-sm: 4px;
  --border-radius-md: 8px;
  --border-radius-lg: 16px;
  
  /* Animation Durations */
  --animation-slow: 1.2s;
  --animation-medium: 0.8s;
  --animation-fast: 0.4s;
  
  /* Animation Easings - using simple easings for better performance */
  --ease-out-back: cubic-bezier(0.175, 0.885, 0.32, 1.275);
  --ease-out-cubic: cubic-bezier(0.215, 0.61, 0.355, 1);
  --ease-in-out: cubic-bezier(0.645, 0.045, 0.355, 1);
}

/* ===== Critical CSS - Core styles needed for initial render ===== */
*, 
*::before, 
*::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  scroll-behavior: smooth;
  font-size: 16px;
  -webkit-text-size-adjust: 100%;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

body {
  font-family: var(--font-primary);
  font-weight: var(--font-regular);
  line-height: 1.6;
  color: var(--text-color);
  background-color: var(--background-color);
  overflow-x: hidden;
  width: 100%;
}

img {
  max-width: 100%;
  height: auto;
  display: block;
}

/* Optimized animation keyframes - reduced and simplified */
@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* Reduced animation set - only keep the most necessary ones */
@keyframes scaleIn {
  from {
    opacity: 0;
    transform: scale(0.95);
  }
  to {
    opacity: 1;
    transform: scale(1);
  }
}

/* Reduced number of keyframes for better performance */
@keyframes floatShadow {
  0%, 100% {
    transform: translateY(0px);
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.05);
  }
  50% {
    transform: translateY(-7px);
    box-shadow: 0 15px 25px rgba(0, 0, 0, 0.1);
  }
}

/* Animation utilities - streamlined for better performance */
.animate-on-scroll {
  opacity: 0;
  will-change: opacity, transform;
  transition: opacity 0.8s ease, transform 0.8s ease;
}

.animate-on-scroll.fade-in-up {
  transform: translateY(20px);
}

.animate-on-scroll.scale-in {
  transform: scale(0.95);
}

.animate-on-scroll.visible {
  opacity: 1;
  transform: translate(0) scale(1);
}

/* Using will-change only for elements that will animate */
.pulse-on-hover:hover {
  will-change: box-shadow;
  animation: borderPulse 1.5s infinite;
}

/* ===== Performance optimized components ===== */
/* Navbar - critical component */
.navbar {
  padding: var(--spacing-md) 0;
  transition: background-color var(--transition-fast), box-shadow var(--transition-fast);
  background-color: transparent;
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 1000;
}

.navbar-brand {
  display: flex;
  align-items: center;
  padding: 0;
}

.logo {
  height: 60px; /* Increased from 40px */
  width: auto;
  transition: height var(--transition-fast);
  margin-right: 10px; /* Add some margin to separate from text */
}

.navbar-scrolled {
  background-color: var(--background-color);
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
  padding: var(--spacing-sm) 0;
}

.navbar-scrolled .logo {
  height: 50px; /* Increased from 35px */
}

.nav-link {
  color: var(--text-color);
  font-weight: var(--font-regular);
  padding: var(--spacing-sm) var(--spacing-md) !important;
  position: relative;
  transition: color var(--transition-fast);
}

.nav-link::after {
  content: '';
  position: absolute;
  width: 0;
  height: 2px;
  bottom: 0;
  left: 50%;
  background-color: var(--primary-color);
  transform: translateX(-50%);
  transition: width var(--transition-fast);
}

/* Combined selectors for better performance */
.nav-link:hover,
.nav-link.active {
  color: var(--primary-color);
}

.nav-link:hover::after,
.nav-link.active::after {
  width: 70%;
}

/* Hero section - Above the fold content, critical for initial render */
.hero-section {
  position: relative;
  min-height: 100vh;
  padding-top: 80px;
  display: flex;
  align-items: center;
  background-color: var(--light-gray);
  z-index: 1; /* Ensure proper stacking context */
  overflow: visible; /* Ensure content is not clipped */
}

.hero-content {
  position: relative;
  z-index: 2;
  /* Remove any default opacity settings that might hide the content */
  will-change: opacity, transform; /* Optimize for animations */
}

.hero-title {
  font-size: 3.5rem;
  font-weight: var(--font-black);
  margin-bottom: var(--spacing-md);
  line-height: 1.2;
}

.hero-subtitle {
  font-size: 1.2rem;
  font-weight: var(--font-light);
  margin-bottom: var(--spacing-lg);
  max-width: 600px;
  color: var(--dark-gray);
}

/* Button styles - simplified and optimized */
.btn {
  transition: transform var(--transition-fast), 
              background-color var(--transition-fast),
              box-shadow var(--transition-fast);
}

.btn-primary {
  background-color: var(--primary-color);
  border-color: var(--primary-color);
}

.btn-primary:hover {
  background-color: #a00000;
  border-color: #a00000;
  transform: translateY(-3px);
  box-shadow: 0 7px 14px rgba(0, 0, 0, 0.15);
}

/* Back to top button - optimized with reduced properties */
#back-to-top {
  position: fixed;
  bottom: 20px;
  right: 20px;
  border-radius: 50%;
  width: 50px;
  height: 50px;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.3s ease, transform 0.3s ease;
  z-index: 99;
  box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
}

#back-to-top:hover {
  transform: translateY(-5px);
}

/* Media queries - optimized and combined for efficiency */
@media (max-width: 1199.98px) {
  .hero-title {
    font-size: 3rem;
  }
  
  .section-title {
    font-size: 2.2rem;
  }
}

@media (max-width: 991.98px) {
  .hero-section {
    min-height: 80vh;
    text-align: center;
    padding-top: 100px;
    padding-bottom: var(--spacing-xxl);
  }
  
  .hero-title {
    font-size: 2.5rem;
  }
}

@media (max-width: 767.98px) {
  .hero-title {
    font-size: 2rem;
  }
  
  .hero-subtitle {
    font-size: 1rem;
  }
}

/* Rest of the CSS remains as is, but I recommend applying similar 
   optimization techniques to the remaining sections */

/* ===== Base Styles ===== */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  font-family: var(--font-primary);
  font-weight: var(--font-regular);
  font-size: 16px;
  line-height: 1.6;
  color: var(--text-color);
  background-color: var(--background-color);
  overflow-x: hidden;
}

h1, h2, h3, h4, h5, h6 {
  font-weight: var(--font-bold);
  line-height: 1.2;
  margin-bottom: var(--spacing-md);
}

h1 {
  font-weight: var(--font-black);
}

p {
  margin-bottom: var(--spacing-md);
}

a {
  color: var(--primary-color);
  text-decoration: none;
  transition: color var(--transition-fast);
}

a:hover {
  color: var(--dark-gray);
}

section {
  padding: var(--spacing-xxl) 0;
}

.container {
  max-width: 1200px;
  padding: 0 var(--spacing-md);
}

/* ===== Utility Classes ===== */
.text-primary {
  color: var(--primary-color) !important;
}

.bg-primary {
  background-color: var(--primary-color) !important;
}

.btn-primary {
  background-color: var(--primary-color);
  border-color: var(--primary-color);
}

.btn-primary:hover {
  background-color: #a00000;
  border-color: #a00000;
}

/* ===== Animation Keyframes ===== */
@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes fadeInLeft {
  from {
    opacity: 0;
    transform: translateX(-20px);
  }
  to {
    opacity: 1;
    transform: translateX(0);
  }
}

@keyframes fadeInRight {
  from {
    opacity: 0;
    transform: translateX(20px);
  }
  to {
    opacity: 1;
    transform: translateX(0);
  }
}

@keyframes scaleIn {
  from {
    opacity: 0;
    transform: scale(0.95);
  }
  to {
    opacity: 1;
    transform: scale(1);
  }
}

@keyframes borderPulse {
  0% {
    box-shadow: 0 0 0 0 rgba(192, 0, 0, 0.4);
  }
  70% {
    box-shadow: 0 0 0 10px rgba(192, 0, 0, 0);
  }
  100% {
    box-shadow: 0 0 0 0 rgba(192, 0, 0, 0);
  }
}

@keyframes floatShadow {
  0%, 100% {
    transform: translateY(0px);
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.05);
  }
  50% {
    transform: translateY(-7px);
    box-shadow: 0 15px 25px rgba(0, 0, 0, 0.1);
  }
}

/* ===== Animation Utility Classes ===== */
.animate-on-scroll {
  opacity: 0;
  transition: opacity 0.8s ease, transform 0.8s ease;
}

.animate-on-scroll.fade-in-up {
  transform: translateY(20px);
}

.animate-on-scroll.fade-in-left {
  transform: translateX(-20px);
}

.animate-on-scroll.fade-in-right {
  transform: translateX(20px);
}

.animate-on-scroll.scale-in {
  transform: scale(0.95);
}

.animate-on-scroll.visible {
  opacity: 1;
  transform: translate(0) scale(1);
}

/* Pulse animation on hover */
.pulse-on-hover:hover {
  animation: borderPulse 1.5s infinite;
}

/* ===== Component Styles ===== */
/* These will be populated as components are developed */

/* ----- Navbar ----- */
.navbar {
  padding: var(--spacing-md) 0;
  transition: all var(--transition-fast);
  background-color: transparent;
}

.navbar-brand {
  display: flex;
  align-items: center;
  padding: 0;
}

.logo {
  height: 60px; /* Increased from 40px */
  width: auto;
  transition: height var(--transition-fast);
  margin-right: 10px; /* Add some margin to separate from text */
}

.navbar-scrolled {
  background-color: var(--background-color);
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
  padding: var(--spacing-sm) 0;
}

.navbar-scrolled .logo {
  height: 50px; /* Increased from 35px */
}

.navbar-nav {
  align-items: center;
}

.nav-link {
  color: var(--text-color);
  font-weight: var(--font-regular);
  padding: var(--spacing-sm) var(--spacing-md) !important;
  position: relative;
  transition: color var(--transition-fast);
}

.nav-link:hover,
.nav-link.active {
  color: var(--primary-color);
}

.nav-link::after {
  content: '';
  position: absolute;
  width: 0;
  height: 2px;
  bottom: 0;
  left: 50%;
  background-color: var(--primary-color);
  transform: translateX(-50%);
  transition: width var(--transition-fast);
}

.nav-link:hover::after,
.nav-link.active::after {
  width: 70%;
}

.navbar-toggler {
  border: none;
  padding: var(--spacing-xs);
}

.navbar-toggler:focus {
  box-shadow: none;
  outline: none;
}

.navbar .btn-primary {
  padding: var(--spacing-xs) var(--spacing-lg);
  border-radius: var(--border-radius-sm);
  font-weight: var(--font-bold);
  text-transform: uppercase;
  font-size: 0.9rem;
}

/* Mobile navbar styles */
@media (max-width: 991.98px) {
  .navbar-collapse {
    background-color: var(--background-color);
    padding: var(--spacing-md);
    border-radius: var(--border-radius-md);
    margin-top: var(--spacing-sm);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
  }
  
  .nav-link::after {
    display: none;
  }
  
  .navbar .btn-primary {
    margin-top: var(--spacing-md);
    display: block;
    text-align: center;
  }
}

/* ----- Hero Section ----- */
.hero-section {
  position: relative;
  min-height: 100vh;
  padding-top: 80px;
  display: flex;
  align-items: center;
  background-color: var(--light-gray);
  z-index: 1; /* Ensure proper stacking context */
  overflow: visible; /* Ensure content is not clipped */
}

.hero-content {
  position: relative;
  z-index: 2;
  /* Remove any default opacity settings that might hide the content */
  will-change: opacity, transform; /* Optimize for animations */
}

.hero-title {
  font-size: 3.5rem;
  font-weight: var(--font-black);
  margin-bottom: var(--spacing-md);
  line-height: 1.2;
}

.hero-subtitle {
  font-size: 1.2rem;
  font-weight: var(--font-light);
  margin-bottom: var(--spacing-lg);
  max-width: 600px;
  color: var(--dark-gray);
}

.hero-cta {
  margin-top: var(--spacing-lg);
}

.hero-cta .btn {
  padding: var(--spacing-sm) var(--spacing-xl);
  font-weight: var(--font-bold);
  text-transform: uppercase;
  letter-spacing: 1px;
  border-radius: var(--border-radius-md);
  transition: transform var(--transition-fast), box-shadow var(--transition-fast), background-color 0.3s;
  position: relative;
  overflow: hidden;
}

.hero-cta .btn::before {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.2), transparent);
  transition: left 0.7s;
  z-index: 1;
}

.hero-cta .btn:hover::before {
  left: 100%;
}

.hero-cta .btn:hover {
  transform: translateY(-5px);
  box-shadow: 0 7px 14px rgba(0, 0, 0, 0.15);
}

.hero-cta .btn-primary {
  background-color: var(--primary-color);
  border-color: var(--primary-color);
}

.hero-image {
  position: relative;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
}

.hero-shape {
  position: absolute;
  width: 400px;
  height: 400px;
  background: linear-gradient(135deg, rgba(192, 0, 0, 0.8) 0%, rgba(192, 0, 0, 0.4) 100%);
  border-radius: 50%;
  filter: blur(10px);
  animation: float 6s ease-in-out infinite;
}

.hero-bg-shape {
  position: absolute;
  top: -10%;
  right: -5%;
  width: 50%;
  height: 70%;
  background-color: rgba(192, 0, 0, 0.05);
  border-radius: 30% 70% 70% 30% / 30% 30% 70% 70%;
  z-index: 1;
}

@keyframes float {
  0% {
    transform: translateY(0px);
  }
  50% {
    transform: translateY(-20px);
  }
  100% {
    transform: translateY(0px);
  }
}

/* Hero Responsive Styles */
@media (max-width: 1199.98px) {
  .hero-title {
    font-size: 3rem;
  }
}

@media (max-width: 991.98px) {
  .hero-section {
    min-height: 80vh;
    text-align: center;
    padding-top: 100px;
    padding-bottom: var(--spacing-xxl);
  }
  
  .hero-title {
    font-size: 2.5rem;
  }
  
  .hero-subtitle {
    margin-left: auto;
    margin-right: auto;
  }
  
  .hero-bg-shape {
    width: 70%;
    height: 50%;
    top: 0;
    right: -20%;
  }
}

@media (max-width: 767.98px) {
  .hero-title {
    font-size: 2rem;
  }
  
  .hero-subtitle {
    font-size: 1rem;
  }
  
  .hero-cta .btn {
    padding: var(--spacing-sm) var(--spacing-lg);
    font-size: 0.9rem;
  }
}

/* ----- About Section ----- */
.about-section {
  background-color: var(--light-gray);
  position: relative;
  overflow: hidden;
}

.about-section::before {
  content: '';
  position: absolute;
  top: -100px;
  right: -100px;
  width: 300px;
  height: 300px;
  background-color: rgba(192, 0, 0, 0.05);
  border-radius: 50%;
  z-index: 1;
}

.section-title {
  font-size: 2.5rem;
  font-weight: var(--font-black);
  margin-bottom: var(--spacing-sm);
  position: relative;
}

.section-subtitle {
  font-size: 1.1rem;
  font-weight: var(--font-light);
  color: var(--dark-gray);
  max-width: 700px;
  margin: 0 auto var(--spacing-lg);
}

/* ----- About Section Card Styling ----- */
.about-card {
  background-color: var(--background-color);
  border-radius: var(--border-radius-md);
  box-shadow: 0 8px 30px rgba(0, 0, 0, 0.05);
  padding: var(--spacing-xl);
  height: 100%;
  transition: transform var(--transition-medium), box-shadow var(--transition-medium);
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  border: 1px solid var(--primary-color); /* Add red border to about cards */
  position: relative;
  overflow: hidden;
}

.about-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 15px 35px rgba(0, 0, 0, 0.1);
  border-color: var(--primary-color); /* Ensure border remains on hover */
}

.about-card-icon {
  width: 70px;
  height: 70px;
  border-radius: 50%;
  background-color: rgba(192, 0, 0, 0.1);
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: var(--spacing-md);
}

.about-card-icon i {
  font-size: 2rem;
  color: var(--primary-color);
}

.about-card-title {
  font-size: 1.5rem;
  font-weight: var(--font-bold);
  margin-bottom: var(--spacing-md);
  color: var(--dark-gray);
}

.about-card-text {
  font-size: 1rem;
  font-weight: var(--font-light);
  color: var(--dark-gray);
  line-height: 1.6;
}

/* Core Values */
.values-title {
  font-size: 1.8rem;
  font-weight: var(--font-bold);
  margin-bottom: var(--spacing-md);
  position: relative;
  display: inline-block;
}

.values-title::after {
  content: '';
  position: absolute;
  width: 50px;
  height: 3px;
  background-color: var(--primary-color);
  bottom: -10px;
  left: 50%;
  transform: translateX(-50%);
}

.value-card {
  background-color: var(--background-color);
  border-radius: var(--border-radius-md);
  padding: var(--spacing-lg);
  height: 100%;
  transition: transform var(--transition-fast), box-shadow var(--transition-fast);
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  position: relative;
  z-index: 2;
  overflow: hidden;
  border: 1px solid var(--primary-color); /* Add red border to value cards */
}

.value-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 0;
  background-color: rgba(192, 0, 0, 0.03);
  transition: height var(--transition-medium);
  z-index: -1;
}

.value-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 10px 25px rgba(0, 0, 0, 0.05);
  border-color: var(--primary-color); /* Ensure border remains on hover */
}

.value-icon {
  width: 60px;
  height: 60px;
  border-radius: 50%;
  background-color: rgba(192, 0, 0, 0.1);
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: var(--spacing-md);
  transition: transform var(--transition-fast);
}

.value-card:hover .value-icon {
  transform: scale(1.1);
}

.value-icon i {
  font-size: 1.5rem;
  color: var(--primary-color);
}

.value-title {
  font-size: 1.2rem;
  font-weight: var(--font-bold);
  margin-bottom: var(--spacing-xs);
  color: var(--dark-gray);
}

.value-text {
  font-size: 0.95rem;
  font-weight: var(--font-light);
  color: var(--dark-gray);
  margin-bottom: 0;
}

/* About Section Responsive Styles */
@media (max-width: 991.98px) {
  .section-title {
    font-size: 2.2rem;
  }
  
  .about-card {
    padding: var(--spacing-lg);
  }
}

@media (max-width: 767.98px) {
  .section-title {
    font-size: 2rem;
  }
  
  .about-card-icon, .value-icon {
    width: 60px;
    height: 60px;
  }
  
  .about-card-icon i {
    font-size: 1.8rem;
  }
  
  .value-icon i {
    font-size: 1.3rem;
  }
}

@media (max-width: 575.98px) {
  .section-title {
    font-size: 1.8rem;
  }
  
  .section-subtitle {
    font-size: 1rem;
  }
  
  .values-title {
    font-size: 1.5rem;
  }
  
  .about-card, .value-card {
    padding: var(--spacing-md);
  }
}

/* ----- Services Section ----- */
.services-section {
  background-color: var(--background-color);
  position: relative;
  overflow: hidden;
  padding: var(--spacing-xxl) 0;
}

.services-section::before {
  content: '';
  position: absolute;
  bottom: -150px;
  left: -150px;
  width: 300px;
  height: 300px;
  background-color: rgba(192, 0, 0, 0.05);
  border-radius: 50%;
  z-index: 1;
}

.service-card {
  background-color: var(--background-color);
  border-radius: var(--border-radius-md);
  box-shadow: 0 8px 30px rgba(0, 0, 0, 0.05);
  padding: var(--spacing-xl);
  height: 100%;
  transition: transform var(--transition-medium), box-shadow var(--transition-medium), border-color var(--transition-medium);
  position: relative;
  z-index: 2;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  border: 1px solid var(--primary-color); /* Add red border to service cards */
}

/* Remove the top-only border since we now have a full border */
.service-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 4px;
  background-color: var(--primary-color);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform var(--transition-medium);
}

.service-card:hover {
  transform: translateY(-10px);
  box-shadow: 0 15px 35px rgba(0, 0, 0, 0.1);
  border-color: var(--primary-color); /* Ensure border remains on hover */
}

.service-icon {
  width: 80px;
  height: 80px;
  border-radius: 50%;
  background-color: rgba(192, 0, 0, 0.1);
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: var(--spacing-md);
  transition: transform var(--transition-fast), background-color var(--transition-fast);
}

.service-card:hover .service-icon {
  transform: scale(1.1);
  background-color: rgba(192, 0, 0, 0.15);
}

.service-icon i {
  font-size: 2rem;
  color: var(--primary-color);
}

.service-title {
  font-size: 1.5rem;
  font-weight: var(--font-bold);
  margin-bottom: var(--spacing-md);
  color: var(--dark-gray);
}

.service-description {
  font-size: 1rem;
  color: var(--dark-gray);
  margin-bottom: var(--spacing-sm);
}

.service-list {
  list-style-type: none;
  padding-left: 0;
  margin-bottom: var(--spacing-md);
  text-align: left;
}

.service-list li {
  position: relative;
  padding-left: 1.5rem;
  margin-bottom: 0.5rem;
  font-size: 0.95rem;
  font-weight: var(--font-light);
}

.service-list li::before {
  content: '•';
  color: var(--primary-color);
  font-weight: bold;
  position: absolute;
  left: 0.5rem;
}

.service-link {
  font-weight: var(--font-bold);
  color: var(--primary-color);
  display: inline-block;
  margin-top: var(--spacing-sm);
  text-decoration: none;
  transition: color var(--transition-fast);
}

.service-link i {
  transition: transform var(--transition-fast);
  display: inline-block;
  margin-left: 5px;
}

.service-link:hover {
  color: var(--dark-gray);
}

.service-link:hover i {
  transform: translateX(5px);
}

.service-cta {
  margin-top: var(--spacing-lg);
  padding: var(--spacing-sm) var(--spacing-xl);
  font-weight: var(--font-bold);
  letter-spacing: 1px;
  transition: transform var(--transition-fast), box-shadow var(--transition-fast);
}

.service-cta:hover {
  transform: translateY(-3px);
  box-shadow: 0 5px 15px rgba(192, 0, 0, 0.2);
}

/* Services Responsive Styles */
@media (max-width: 1199.98px) {
  .service-card {
    padding: var(--spacing-lg);
  }
  
  .service-icon {
    width: 70px;
    height: 70px;
  }
  
  .service-icon i {
    font-size: 1.8rem;
  }
}

@media (max-width: 991.98px) {
  .service-title {
    font-size: 1.3rem;
  }
  
  .service-description, .service-list li {
    font-size: 0.9rem;
  }
}

@media (max-width: 767.98px) {
  .service-card {
    margin-bottom: var(--spacing-lg);
  }
}

/* ----- Why Choose Us Section ----- */
.why-us-section {
  background-color: var(--light-gray);
  position: relative;
  overflow: hidden;
  padding: var(--spacing-xxl) 0;
}

.why-us-section::before {
  content: '';
  position: absolute;
  top: -100px;
  left: -100px;
  width: 300px;
  height: 300px;
  background-color: rgba(192, 0, 0, 0.05);
  border-radius: 50%;
  z-index: 1;
}

.why-us-section::after {
  content: '';
  position: absolute;
  bottom: -150px;
  right: -150px;
  width: 250px;
  height: 250px;
  background-color: rgba(192, 0, 0, 0.03);
  border-radius: 30% 70% 70% 30% / 30% 30% 70% 70%;
  z-index: 1;
}

/* Feature Cards */
.feature-card {
  perspective: 1000px;
  height: 300px;
  width: 100%;
  position: relative;
  z-index: 2;
}

.feature-card-inner {
  position: relative;
  width: 100%;
  height: 100%;
  transition: transform 0.8s;
  transform-style: preserve-3d;
  cursor: pointer;
  box-shadow: 0 8px 30px rgba(0, 0, 0, 0.05);
  border-radius: var(--border-radius-md);
}

.feature-card:hover .feature-card-inner,
.feature-card.flipped .feature-card-inner {
  transform: rotateY(180deg);
}

.feature-card:hover {
  z-index: 3;
}

.feature-card-front, 
.feature-card-back {
  position: absolute;
  width: 100%;
  height: 100%;
  -webkit-backface-visibility: hidden;
  backface-visibility: hidden;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: var(--spacing-xl);
  border-radius: var(--border-radius-md);
  box-shadow: 0 8px 30px rgba(0, 0, 0, 0.05);
  text-align: center;
  border: 1px solid var(--primary-color); /* Add red border to feature cards (front & back) */
  transition: border-color var(--transition-medium);
}

.feature-card-front {
  background-color: var(--background-color);
}

.feature-card-back {
  background-color: var(--primary-color);
  color: white;
  transform: rotateY(180deg);
  border-color: white; /* Use white border for back side for better contrast */
}

.feature-icon {
  width: 70px;
  height: 70px;
  border-radius: 50%;
  background-color: rgba(192, 0, 0, 0.1);
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: var(--spacing-md);
  transition: transform var(--transition-medium);
}

.feature-icon i {
  font-size: 1.8rem;
  color: var(--primary-color);
}

.feature-title {
  font-size: 1.4rem;
  font-weight: var(--font-bold);
  margin-bottom: var(--spacing-sm);
  color: inherit;
}

.feature-hint {
  font-size: 0.9rem;
  color: var(--dark-gray);
  opacity: 0.7;
  margin-top: var(--spacing-md);
  transition: opacity var(--transition-fast);
}

.feature-card:hover .feature-hint {
  opacity: 0;
}

.feature-description {
  margin-bottom: var(--spacing-md);
  font-size: 1rem;
  line-height: 1.6;
}

.why-us-bottom {
  margin-top: var(--spacing-xl);
  padding: var(--spacing-lg) var(--spacing-xl);
  background-color: var(--background-color);
  border-radius: var(--border-radius-md);
  box-shadow: 0 8px 30px rgba(0, 0, 0, 0.05);
  position: relative;
  z-index: 2;
  border: 1px solid var(--primary-color); /* Add red border to why-us-bottom card */
}

.storytelling-bottom {
  margin-top: var(--spacing-xl);
  padding: var(--spacing-lg);
  background-color: var(--light-gray);
  border-radius: var(--border-radius-md);
  position: relative;
  z-index: 2;
  border: 1px solid var(--primary-color); /* Add red border to storytelling-bottom card */
}

/* ----- Custom Animations for Cards ----- */
/* Add subtle border animation on hover for all cards */
@keyframes borderPulse {
  0% {
    border-color: rgba(192, 0, 0, 0.5);
  }
  50% {
    border-color: rgba(192, 0, 0, 1);
  }
  100% {
    border-color: rgba(192, 0, 0, 0.5);
  }
}

.about-card:hover,
.value-card:hover,
.service-card:hover,
.feature-card:hover,
.story-card:hover,
.contact-info:hover,
.contact-form-wrapper:hover,
.why-us-bottom:hover,
.storytelling-bottom:hover {
  animation: borderPulse 2s infinite;
}

/* ----- Contact Section ----- */
.contact-section {
  background-color: var(--light-gray);
  position: relative;
  overflow: hidden;
  padding: var(--spacing-xxl) 0;
}

.contact-section::before {
  content: '';
  position: absolute;
  top: -100px;
  right: -150px;
  width: 250px;
  height: 250px;
  background-color: rgba(192, 0, 0, 0.05);
  border-radius: 30% 70% 70% 30% / 30% 30% 70% 70%;
  z-index: 1;
}

.contact-info {
  background-color: var(--background-color);
  border-radius: var(--border-radius-md);
  box-shadow: 0 8px 30px rgba(0, 0, 0, 0.05);
  padding: var(--spacing-xl);
  height: 100%;
  position: relative;
  z-index: 2;
  border: 1px solid var(--primary-color); /* Add red border to contact info card */
}

.contact-info h3 {
  font-size: 1.8rem;
  font-weight: var(--font-bold);
  margin-bottom: var(--spacing-md);
  color: var(--dark-gray);
  position: relative;
  padding-bottom: var(--spacing-sm);
}

.contact-info h3::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  width: 50px;
  height: 3px;
  background-color: var(--primary-color);
}

.contact-info p {
  margin-bottom: var(--spacing-lg);
  color: var(--dark-gray);
}

.contact-details {
  list-style: none;
  padding: 0;
  margin-bottom: var(--spacing-lg);
}

.contact-details li {
  display: flex;
  margin-bottom: var(--spacing-md);
  align-items: flex-start;
}

.contact-details li i {
  width: 40px;
  height: 40px;
  background-color: rgba(192, 0, 0, 0.1);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--primary-color);
  margin-right: var(--spacing-md);
  flex-shrink: 0;
}

.contact-details li div {
  flex-grow: 1;
}

.contact-details h4 {
  font-size: 1.1rem;
  margin-bottom: var(--spacing-xs);
  color: var(--dark-gray);
}

.contact-details a,
.contact-details p {
  color: var(--dark-gray);
  margin-bottom: 0;
  transition: color var(--transition-fast);
}

.contact-details a:hover {
  color: var(--primary-color);
}

.social-links {
  margin-top: var(--spacing-lg);
}

.social-links h4 {
  font-size: 1.1rem;
  margin-bottom: var(--spacing-md);
  color: var(--dark-gray);
}

.social-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  background-color: rgba(192, 0, 0, 0.1);
  color: var(--primary-color);
  border-radius: 50%;
  margin-right: var(--spacing-sm);
  transition: background-color var(--transition-fast), color var(--transition-fast), transform var(--transition-fast);
}

.social-link:hover {
  background-color: var(--primary-color);
  color: var(--background-color);
  transform: translateY(-3px);
}

/* Contact Form */
.contact-form-wrapper {
  background-color: var(--background-color);
  border-radius: var(--border-radius-md);
  box-shadow: 0 8px 30px rgba(0, 0, 0, 0.05);
  padding: var(--spacing-xl);
  position: relative;
  z-index: 2;
  border: 1px solid var(--primary-color); /* Add red border to contact form card */
}

.form-label {
  color: var(--dark-gray);
  font-weight: var(--font-bold);
  margin-bottom: var(--spacing-xs);
}

.form-control {
  border-radius: var(--border-radius-sm);
  border: 1px solid rgba(0, 0, 0, 0.1);
  padding: var(--spacing-md);
  font-size: 1rem;
  transition: border-color var(--transition-fast), box-shadow var(--transition-fast);
}

.form-control:focus {
  border-color: rgba(192, 0, 0, 0.3);
  box-shadow: 0 0 0 0.2rem rgba(192, 0, 0, 0.1);
}

.form-control.is-invalid {
  border-color: #dc3545;
  box-shadow: none;
}

.invalid-feedback {
  font-size: 0.85rem;
}

.form-check-label {
  font-size: 0.9rem;
  color: var(--dark-gray);
}

.form-check-input:checked {
  background-color: var(--primary-color);
  border-color: var(--primary-color);
}

.form-check-input:focus {
  border-color: rgba(192, 0, 0, 0.3);
  box-shadow: 0 0 0 0.2rem rgba(192, 0, 0, 0.1);
}

.contact-form .btn-primary {
  padding: var(--spacing-md) var(--spacing-lg);
  font-weight: var(--font-bold);
  position: relative;
  overflow: hidden;
  transition: background-color var(--transition-fast), 
              transform var(--transition-fast), 
              box-shadow var(--transition-fast);
}

.contact-form .btn-primary::before {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.2), transparent);
  transition: left 0.7s;
  z-index: 1;
}

.contact-form .btn-primary:hover::before {
  left: 100%;
}

.contact-form .btn-primary:hover {
  transform: translateY(-3px);
  box-shadow: 0 10px 20px rgba(192, 0, 0, 0.2);
}

.g-recaptcha {
  display: flex;
  justify-content: center;
  margin-bottom: var(--spacing-md);
}

.form-message .alert {
  border-radius: var(--border-radius-sm);
  padding: var(--spacing-md);
}

/* Contact Section Responsive Styles */
@media (max-width: 991.98px) {
  .contact-info {
    margin-bottom: var(--spacing-lg);
  }
}

@media (max-width: 767.98px) {
  .contact-info h3 {
    font-size: 1.5rem;
  }
  
  .contact-form-wrapper {
    padding: var(--spacing-lg);
  }
  
  .contact-details li i {
    width: 35px;
    height: 35px;
  }
}

@media (max-width: 575.98px) {
  .contact-info {
    padding: var(--spacing-lg);
  }
  
  .contact-details h4 {
    font-size: 1rem;
  }
  
  .social-link {
    width: 35px;
    height: 35px;
  }
}

/* ----- Footer Section ----- */
.footer {
  background-color: var(--light-gray);
  color: var(--dark-gray);
  position: relative;
  overflow: hidden;
}

.footer-top {
  padding: var(--spacing-xl) 0;
  position: relative;
  z-index: 2;
}

.footer::before {
  content: '';
  position: absolute;
  top: -200px;
  right: -200px;
  width: 400px;
  height: 400px;
  background-color: rgba(192, 0, 0, 0.03);
  border-radius: 50%;
  z-index: 1;
}

/* Update the footer logo styling to make it larger and more visible */
.footer-logo {
  height: 80px; /* Increased from 50px to 80px */
  width: auto; /* Maintain aspect ratio */
  margin-bottom: var(--spacing-lg);
  display: block; /* Ensure proper block display */
  transition: transform 0.3s ease; /* Add subtle animation on hover */
}

/* Add hover effect to make the logo more interactive */
.footer-brand:hover .footer-logo {
  transform: scale(1.05);
}

.footer-brand {
  display: flex;
  flex-direction: column;
  align-items: flex-start; /* Align logo to the left */
}

.footer-brand p {
  font-size: 0.95rem;
  opacity: 0.8;
  margin-bottom: 0;
}

.footer-heading {
  font-size: 1.2rem;
  font-weight: var(--font-bold);
  margin-bottom: var(--spacing-md);
  position: relative;
  padding-bottom: var(--spacing-xs);
}

.footer-heading::after {
  content: '';
  position: absolute;
  left: 0;
  bottom: 0;
  width: 40px;
  height: 2px;
  background-color: var(--primary-color);
}

.footer-nav, .footer-contact {
  list-style-type: none;
  padding-left: 0;
  margin-bottom: 0;
}

.footer-nav li, .footer-contact li {
  margin-bottom: var(--spacing-xs);
}

.footer-nav a, .footer-contact a {
  color: var(--dark-gray);
  text-decoration: none;
  transition: color var(--transition-fast);
  font-size: 0.95rem;
  opacity: 0.8;
  display: inline-block;
}

.footer-nav a:hover, .footer-contact a:hover {
  color: var(--primary-color);
  opacity: 1;
  transform: translateX(3px);
}

.footer-contact li {
  display: flex;
  align-items: flex-start;
  margin-bottom: var(--spacing-sm);
}

.footer-contact i {
  margin-right: var(--spacing-sm);
  color: var(--primary-color);
  width: 20px;
  text-align: center;
}

.footer-social {
  display: flex;
  gap: var(--spacing-sm);
}

.footer-social .social-link {
  width: 36px;
  height: 36px;
  display: flex;
  align-items: center;
  justify-content: center;
  background-color: rgba(192, 0, 0, 0.1);
  color: var(--primary-color);
  border-radius: 50%;
  transition: all var(--transition-fast);
}

.footer-social .social-link:hover {
  background-color: var(--primary-color);
  color: white;
  transform: translateY(-3px);
}

.footer-bottom {
  padding: var(--spacing-md) 0;
  border-top: 1px solid rgba(0, 0, 0, 0.05);
  position: relative;
  z-index: 2;
}

.footer-bottom p {
  margin-bottom: 0;
  font-size: 0.9rem;
  opacity: 0.8;
}

.footer-links a {
  color: var(--dark-gray);
  text-decoration: none;
  transition: color var(--transition-fast);
  font-size: 0.9rem;
  opacity: 0.8;
}

.footer-links a:hover {
  color: var(--primary-color);
  opacity: 1;
}

.footer-links .divider {
  margin: 0 var(--spacing-xs);
  opacity: 0.5;
}

/* Responsive Footer */
@media (max-width: 991.98px) {
  .footer-top {
    padding: var(--spacing-lg) 0;
  }
  
  .footer-heading {
    margin-top: var(--spacing-md);
  }
}

@media (max-width: 767.98px) {
  .footer-heading {
    text-align: center;
  }
  
  .footer-heading::after {
    left: 50%;
    transform: translateX(-50%);
  }
  
  .footer-nav, .footer-contact {
    text-align: center;
  }
  
  .footer-contact li {
    justify-content: center;
  }
  
  .footer-social {
    justify-content: center;
  }
}

/* ===== Responsive Styles ===== */
/* Will be implemented as development progresses */

/* Section dividers with animation */
.section-divider {
  width: 80px;
  height: 3px;
  background-color: var(--primary-color);
  margin: 0 auto var(--spacing-lg);
  position: relative;
  overflow: hidden;
}

.section-divider::after {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.8), transparent);
  animation: shine 2s infinite;
}

@keyframes shine {
  100% {
    left: 100%;
  }
}

/* Back to top button animation */
#back-to-top {
  position: fixed;
  bottom: 20px;
  right: 20px;
  border-radius: 50%;
  width: 50px;
  height: 50px;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.5s ease;
  z-index: 99;
  box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
}

#back-to-top.visible {
  opacity: 1;
  visibility: visible;
}

#back-to-top:hover {
  transform: translateY(-5px);
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.2);
}

/* Scroll Indicator */
.scroll-indicator {
  position: absolute;
  bottom: 30px;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  flex-direction: column;
  align-items: center;
  color: var(--dark-gray);
  font-size: 0.9rem;
  opacity: 0.7;
  transition: all 0.3s ease;
  z-index: 10;
}

.scroll-indicator:hover {
  opacity: 1;
}

.scroll-indicator .scroll-text {
  margin-bottom: 8px;
  font-weight: var(--font-light);
}

.scroll-indicator .scroll-mouse {
  width: 30px;
  height: 50px;
  border: 2px solid var(--dark-gray);
  border-radius: 15px;
  position: relative;
}

.scroll-indicator .scroll-wheel {
  position: absolute;
  top: 10px;
  left: 50%;
  width: 4px;
  height: 8px;
  background-color: var(--dark-gray);
  border-radius: 2px;
  transform: translateX(-50%);
  animation: scrollWheel 1.5s infinite;
}

@keyframes scrollWheel {
  0% {
    opacity: 1;
    transform: translateX(-50%) translateY(0);
  }
  100% {
    opacity: 0;
    transform: translateX(-50%) translateY(15px);
  }
}

/* Stats counter animation */
.stats-counter .counter-value {
  font-size: 2.5rem;
  font-weight: var(--font-black);
  color: var(--primary-color);
  line-height: 1;
  margin-bottom: var(--spacing-xs);
}

.stats-counter .counter-label {
  font-size: 1rem;
  font-weight: var(--font-light);
  color: var(--dark-gray);
}

.parallax-bg {
  position: absolute;
  width: 100%;
  height: 100%;
  top: 0;
  left: 0;
  z-index: 1;
}

.parallax-shape {
  position: absolute;
  opacity: 0.05;
  border-radius: 50%;
  background-color: var(--primary-color);
}

.shape-1 {
  width: 300px;
  height: 300px;
  top: -150px;
  right: -150px;
}

.shape-2 {
  width: 200px;
  height: 200px;
  bottom: -100px;
  left: -100px;
}

.shape-3 {
  width: 150px;
  height: 150px;
  top: 30%;
  right: -75px;
}

/* Story Cards - Updated to match Feature Cards */
.story-card {
  perspective: 1000px;
  height: 300px;
  width: 100%;
  position: relative;
  z-index: 2;
}

.story-card-inner {
  position: relative;
  width: 100%;
  height: 100%;
  transition: transform 0.8s;
  transform-style: preserve-3d;
  cursor: pointer;
  box-shadow: 0 8px 30px rgba(0, 0, 0, 0.05);
  border-radius: var(--border-radius-md);
}

.story-card:hover .story-card-inner,
.story-card.flipped .story-card-inner {
  transform: rotateY(180deg);
}

.story-card:hover {
  z-index: 3;
}

.story-card-front, 
.story-card-back {
  position: absolute;
  width: 100%;
  height: 100%;
  -webkit-backface-visibility: hidden;
  backface-visibility: hidden;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: var(--spacing-xl);
  border-radius: var(--border-radius-md);
  box-shadow: 0 8px 30px rgba(0, 0, 0, 0.05);
  text-align: center;
  border: 1px solid var(--primary-color);
  transition: border-color var(--transition-medium);
}

.story-card-front {
  background-color: var(--background-color);
}

.story-card-back {
  background-color: var(--primary-color);
  color: white;
  transform: rotateY(180deg);
  border-color: white;
}

.story-card-icon {
  width: 70px;
  height: 70px;
  border-radius: 50%;
  background-color: rgba(192, 0, 0, 0.1);
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: var(--spacing-md);
  transition: transform var(--transition-medium);
}

.story-card-icon i {
  font-size: 1.8rem;
  color: var(--primary-color);
}

.story-card-title {
  font-size: 1.4rem;
  font-weight: var(--font-bold);
  margin-bottom: var(--spacing-sm);
}

.story-hint {
  font-size: 0.9rem;
  color: var(--dark-gray);
  opacity: 0.7;
  margin-top: var(--spacing-md);
  transition: opacity var(--transition-fast);
}

.story-card:hover .story-hint {
  opacity: 0;
}

.story-feature-list {
  list-style-type: none;
  padding-left: 0;
  margin-bottom: var(--spacing-md);
  text-align: left;
}

.story-feature-list li {
  position: relative;
  padding-left: 1.5rem;
  margin-bottom: 0.5rem;
  font-size: 0.95rem;
}

.story-feature-list li::before {
  content: '•';
  color: white;
  font-weight: bold;
  position: absolute;
  left: 0.5rem;
}

/* Remove the old overlay styling since we're using the flip effect now */
.story-card-overlay {
  display: none;
}
