/* ===== SERVICES PAGE SPECIFIC STYLES ===== */

/* ===== ENHANCED PAGE HERO WITH WHITE BACKGROUND ===== */
.page-hero {
  padding: 8rem 0 6rem;
  background: var(--white);
  color: var(--text-dark);
  margin-top: 10px;
  position: relative;
  overflow: hidden;
}

.hero-background-elements {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: 0;
}

.floating-element {
  position: absolute;
  border-radius: 50%;
  animation: floatAnimation 6s ease-in-out infinite;
}

.element-1 {
  width: 200px;
  height: 200px;
  background: linear-gradient(135deg, rgba(5, 84, 64, 0.1), rgba(232, 136, 36, 0.1));
  top: 10%;
  right: 10%;
  animation-delay: 0s;
}

.element-2 {
  width: 150px;
  height: 150px;
  background: linear-gradient(135deg, rgba(232, 136, 36, 0.08), rgba(5, 84, 64, 0.08));
  bottom: 15%;
  left: 5%;
  animation-delay: 2s;
}

.element-3 {
  width: 100px;
  height: 100px;
  background: linear-gradient(135deg, rgba(5, 84, 64, 0.05), rgba(232, 136, 36, 0.05));
  top: 50%;
  left: 15%;
  animation-delay: 4s;
}

@keyframes floatAnimation {
  0%, 100% {
    transform: translateY(0) rotate(0deg) scale(1);
  }
  33% {
    transform: translateY(-20px) rotate(5deg) scale(1.05);
  }
  66% {
    transform: translateY(-10px) rotate(-3deg) scale(0.95);
  }
}

/* Added container for proper alignment */
.page-hero-container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 2rem;
  position: relative;
  z-index: 1;
}

.hero-content-wrapper {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 4rem;
  align-items: center;
  position: relative;
  z-index: 1;
  margin-bottom: 4rem;
}

.hero-text-content h1 {
  font-size: clamp(2.5rem, 5vw, 4rem);
  font-weight: 800;
  color: var(--primary-green);
  margin-bottom: 1.5rem;
  line-height: 1.1;
}

.hero-text-content p {
  font-size: 1.25rem;
  color: var(--text-light);
  margin-bottom: 2rem;
  line-height: 1.6;
}

.hero-features {
  display: flex;
  flex-wrap: wrap;
  gap: 1.5rem;
  margin-bottom: 2.5rem;
}

.feature-item {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.75rem 1.25rem;
  background: rgba(5, 84, 64, 0.05);
  border-radius: 25px;
  border: 2px solid rgba(5, 84, 64, 0.1);
  transition: all 0.3s ease;
}

.feature-item:hover {
  background: rgba(5, 84, 64, 0.1);
  border-color: var(--primary-green);
  transform: translateY(-2px);
}

.feature-item i {
  color: var(--primary-green);
  font-size: 1.1rem;
}

.feature-item span {
  color: var(--primary-green);
  font-weight: 600;
  font-size: 0.95rem;
}

.hero-cta {
  display: flex;
  gap: 1.5rem;
  flex-wrap: wrap;
}

.hero-visual-content {
  position: relative;
  display: flex;
  justify-content: center;
  align-items: center;
}

.hero-image-container {
  position: relative;
  width: 100%;
  max-width: 400px;
}

.hero-main-image {
  width: 300px;
  height: 300px;
  border-radius: 30px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 3rem;
  box-shadow: 0 20px 40px rgba(5, 84, 64, 0.2);
  position: relative;
  animation: heroImageFloat 4s ease-in-out infinite;
  overflow: hidden;
  background: linear-gradient(135deg, var(--primary-green), var(--primary-orange));
}

.hero-main-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: 30px;
}

@keyframes heroImageFloat {
  0%, 100% {
    transform: translateY(0) rotateY(0deg);
  }
  50% {
    transform: translateY(-10px) rotateY(5deg);
  }
}

.hero-main-image::before {
  content: '';
  position: absolute;
  top: -10px;
  left: -10px;
  right: -10px;
  bottom: -10px;
  background: linear-gradient(135deg, var(--primary-orange), var(--primary-green));
  border-radius: 35px;
  z-index: -1;
  opacity: 0.3;
  animation: pulse 2s ease-in-out infinite;
}

@keyframes pulse {
  0%, 100% {
    transform: scale(1);
    opacity: 0.3;
  }
  50% {
    transform: scale(1.05);
    opacity: 0.5;
  }
}

.government-badges {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1rem;
}

.badge-item {
  background: var(--white);
  padding: 1rem 0.75rem;
  border-radius: 15px;
  text-align: center;
  box-shadow: 0 8px 25px rgba(0, 0, 0, 0.1);
  border: 2px solid rgba(5, 84, 64, 0.1);
  transition: all 0.3s ease;
}

.badge-item:hover {
  transform: translateY(-5px);
  box-shadow: 0 15px 35px rgba(5, 84, 64, 0.15);
  border-color: var(--primary-green);
}

.badge-item i {
  color: var(--primary-green);
  font-size: 1.5rem;
  margin-bottom: 0.5rem;
}

.badge-item span {
  display: block;
  color: var(--text-dark);
  font-weight: 600;
  font-size: 0.85rem;
}

.hero-stats {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 2rem;
  position: relative;
  z-index: 1;
}

.hero-stat {
  text-align: center;
  padding: 2rem 1.5rem;
  background: var(--white);
  border-radius: 20px;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
  border: 2px solid rgba(5, 84, 64, 0.1);
  transition: all 0.3s ease;
  position: relative;
  overflow: hidden;
}

.hero-stat::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 4px;
  background: linear-gradient(90deg, var(--primary-green), var(--primary-orange));
  transform: scaleX(0);
  transition: transform 0.3s ease;
}

.hero-stat:hover::before {
  transform: scaleX(1);
}

.hero-stat:hover {
  transform: translateY(-5px);
  box-shadow: 0 20px 40px rgba(5, 84, 64, 0.15);
  border-color: var(--primary-green);
}

.hero-stat-number {
  font-size: 2.5rem;
  font-weight: 800;
  color: var(--primary-green);
  display: block;
  margin-bottom: 0.5rem;
}

.hero-stat-label {
  font-size: 1rem;
  color: var(--text-light);
  font-weight: 500;
}

/* ===== SERVICES GRID SECTION ===== */
.services-grid-section {
  padding: 6rem 0;
  background: var(--light-gray);
  position: relative;
}

.services-grid-section::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 1000 1000"><defs><pattern id="grid" width="40" height="40" patternUnits="userSpaceOnUse"><path d="M 40 0 L 0 0 0 40" fill="none" stroke="%23055440" stroke-width="0.5" opacity="0.05"/></pattern></defs><rect width="100%" height="100%" fill="url(%23grid)"/></svg>');
  z-index: 0;
}

.services-container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 2rem;
  position: relative;
  z-index: 1;
}

.section-header {
  text-align: center;
  margin-bottom: 4rem;
}

.section-header h2 {
  font-size: 3rem;
  font-weight: 800;
  color: var(--primary-green);
  margin-bottom: 1rem;
  position: relative;
}

.section-header h2::after {
  content: '';
  position: absolute;
  bottom: -10px;
  left: 50%;
  transform: translateX(-50%);
  width: 80px;
  height: 4px;
  background: linear-gradient(90deg, var(--primary-green), var(--primary-orange));
  border-radius: 2px;
}

.section-header p {
  font-size: 1.25rem;
  color: var(--text-light);
  max-width: 600px;
  margin: 0 auto;
  line-height: 1.6;
}

/* ===== DESKTOP SERVICES GRID ===== */
.desktop-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 2rem;
  margin-bottom: 4rem;
}

/* ===== MOBILE SERVICES CAROUSEL ===== */
.mobile-carousel {
  display: none;
}

.carousel-container {
  position: relative;
  overflow: hidden;
  border-radius: 20px;
  margin-bottom: 2rem;
}

.carousel-track {
  display: flex;
  transition: transform 0.5s ease-in-out;
  will-change: transform;
}

.carousel-controls {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 2rem;
  margin-top: 2rem;
}

.carousel-btn {
  width: 50px;
  height: 50px;
  border: 2px solid var(--primary-green);
  background: var(--white);
  color: var(--primary-green);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.3s ease;
  font-size: 1.2rem;
}

.carousel-btn:hover {
  background: var(--primary-green);
  color: var(--white);
  transform: scale(1.1);
}

.carousel-btn:disabled {
  opacity: 0.5;
  cursor: not-allowed;
  transform: scale(1);
}

.carousel-indicators {
  display: flex;
  gap: 0.5rem;
}

.indicator {
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: rgba(5, 84, 64, 0.3);
  cursor: pointer;
  transition: all 0.3s ease;
}

.indicator.active {
  background: var(--primary-green);
  transform: scale(1.2);
}

/* ===== FIXED SERVICE CARD FLIP ANIMATIONS ===== */
.service-card-flip {
  background: transparent;
  width: 100%;
  height: 450px;
  perspective: 1200px;
  cursor: pointer;
  position: relative;
}

.service-card-inner {
  position: relative;
  width: 100%;
  height: 100%;
  text-align: center;
  transition: transform 0.8s cubic-bezier(0.4, 0.2, 0.2, 1);
  transform-style: preserve-3d;
  border-radius: 25px;
  transform-origin: center center;
}

.service-card-flip:hover .service-card-inner {
  transform: rotateY(180deg);
}

.service-card-front,
.service-card-back {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  backface-visibility: hidden;
  -webkit-backface-visibility: hidden;
  border-radius: 25px;
  padding: 2rem;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  box-shadow: 0 20px 40px rgba(5, 84, 64, 0.15);
  overflow: hidden;
  transform-style: preserve-3d;
}

.service-card-front {
  background: var(--white);
  border: 2px solid rgba(5, 84, 64, 0.1);
  position: relative;
  transform: rotateY(0deg);
  z-index: 2;
}

.service-card-back {
  background: linear-gradient(135deg, var(--primary-green) 0%, #06614a 100%);
  color: var(--white);
  transform: rotateY(180deg);
  z-index: 1;
}

.service-card-front::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 4px;
  background: linear-gradient(90deg, var(--primary-green), var(--primary-orange));
  transform: scaleX(0);
  transition: transform 0.3s ease;
}

.service-card-flip:hover .service-card-front::before {
  transform: scaleX(1);
}

.service-icon-3d {
  width: 80px;
  height: 80px;
  background: linear-gradient(135deg, var(--primary-green) 0%, #06614a 100%);
  border-radius: 20px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 2rem;
  font-size: 2.5rem;
  color: var(--white);
  transition: all 0.4s ease;
  position: relative;
  overflow: hidden;
  box-shadow: 0 10px 25px rgba(5, 84, 64, 0.3);
}

.service-card-back .service-icon-3d {
  background: rgba(255, 255, 255, 0.2);
  border: 2px solid rgba(255, 255, 255, 0.3);
  box-shadow: 0 10px 25px rgba(0, 0, 0, 0.2);
}

.service-icon-3d::before {
  content: '';
  position: absolute;
  top: -50%;
  left: -50%;
  width: 200%;
  height: 200%;
  background: linear-gradient(45deg, transparent, rgba(255, 255, 255, 0.3), transparent);
  transform: rotate(45deg);
  transition: all 0.6s ease;
  opacity: 0;
}

.service-card-flip:hover .service-icon-3d::before {
  opacity: 1;
  transform: rotate(45deg) translate(100%, 100%);
}

.service-card-front h3 {
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--primary-green);
  margin-bottom: 1rem;
  line-height: 1.3;
}

.service-card-back h3 {
  font-size: 1.75rem;
  font-weight: 700;
  color: var(--white);
  margin-bottom: 1.5rem;
  line-height: 1.3;
}

.service-card-front p {
  color: var(--text-light);
  line-height: 1.6;
  margin-bottom: 1.5rem;
  font-size: 1rem;
}

.service-card-back p {
  color: rgba(255, 255, 255, 0.9);
  line-height: 1.6;
  margin-bottom: 2rem;
  font-size: 1.1rem;
}

.service-features-front {
  display: flex;
  gap: 0.5rem;
  flex-wrap: wrap;
  justify-content: center;
  margin-bottom: 1.5rem;
}

.feature-tag {
  background: rgba(5, 84, 64, 0.1);
  color: var(--primary-green);
  padding: 0.4rem 1rem;
  border-radius: 20px;
  font-size: 0.85rem;
  font-weight: 500;
  border: 1px solid rgba(5, 84, 64, 0.2);
}

.service-features-back {
  list-style: none;
  padding: 0;
  margin: 0 0 2rem 0;
  width: 100%;
}

.service-features-back li {
  margin-bottom: 0.75rem;
  display: flex;
  align-items: center;
  justify-content: flex-start;
  gap: 0.75rem;
  color: rgba(255, 255, 255, 0.9);
  text-align: left;
}

.service-features-back i {
  color: var(--primary-orange);
  font-size: 1rem;
  width: 16px;
  flex-shrink: 0;
}

.service-actions {
  display: flex;
  gap: 1rem;
  justify-content: center;
  flex-wrap: wrap;
  margin-top: auto;
}

.btn-3d {
  padding: 0.75rem 1.5rem;
  border: none;
  border-radius: 50px;
  font-weight: 600;
  font-size: 0.95rem;
  cursor: pointer;
  position: relative;
  overflow: hidden;
  transition: all 0.3s ease;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.1);
  transform-style: preserve-3d;
}

.btn-white-3d {
  background: var(--white);
  color: var(--primary-green);
  border: 2px solid rgba(255, 255, 255, 0.3);
}

.btn-outline-white {
  background: transparent;
  color: var(--white);
  border: 2px solid var(--white);
}

.btn-3d:hover {
  transform: translateY(-3px) rotateX(10deg);
}

.btn-white-3d:hover {
  background: var(--light-gray);
  box-shadow: 0 15px 30px rgba(0, 0, 0, 0.2);
}

.btn-outline-white:hover {
  background: rgba(255, 255, 255, 0.1);
}

/* ===== MOBILE VERSION: HIDE BUTTONS ON CARD FLIP ===== */
@media (max-width: 768px) {
  .mobile-carousel .service-actions {
    display: none !important;
  }
  
  .mobile-carousel .service-card-back {
    padding-bottom: 1.5rem;
  }
  
  .mobile-carousel .service-features-back {
    margin-bottom: 0;
  }
}

/* ===== HOW IT WORKS ===== */
.how-it-works {
  padding: 6rem 0;
  background: var(--white);
  position: relative;
}

.how-it-works-container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 2rem;
}

.steps-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 3rem;
  margin-top: 4rem;
  position: relative;
}

.steps-grid::before {
  content: '';
  position: absolute;
  top: 80px;
  left: 20%;
  right: 20%;
  height: 2px;
  background: linear-gradient(90deg, var(--primary-green) 0%, var(--primary-orange) 50%, var(--primary-green) 100%);
  z-index: 0;
}

.step-item {
  text-align: center;
  padding: 2rem;
  background: var(--white);
  border-radius: 25px;
  box-shadow: 0 20px 40px rgba(5, 84, 64, 0.15);
  transition: all 0.4s ease;
  position: relative;
  z-index: 1;
  border: 2px solid rgba(5, 84, 64, 0.1);
}

.step-item:hover {
  transform: translateY(-10px) rotateX(5deg);
  box-shadow: 0 30px 60px rgba(5, 84, 64, 0.25);
}

.step-number {
  width: 80px;
  height: 80px;
  background: linear-gradient(135deg, var(--primary-green), var(--primary-orange));
  color: var(--white);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 2rem;
  font-weight: 800;
  margin: 0 auto 2rem;
  box-shadow: 0 20px 40px rgba(5, 84, 64, 0.15);
  position: relative;
  overflow: hidden;
}

.step-number::after {
  content: '';
  position: absolute;
  width: 90px;
  height: 90px;
  border: 3px solid var(--primary-orange);
  border-radius: 50%;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%) scale(0);
  transition: transform 0.4s ease;
}

.step-item:hover .step-number::after {
  transform: translate(-50%, -50%) scale(1);
}

.step-content h3 {
  color: var(--primary-green);
  font-size: 1.5rem;
  font-weight: 700;
  margin-bottom: 1rem;
}

.step-content p {
  color: var(--text-light);
  line-height: 1.6;
  font-size: 1.1rem;
}

/* ===== CTA SECTION ===== */
.cta-section {
  padding: 6rem 0;
  background: linear-gradient(135deg, var(--primary-green) 0%, #06614a 100%);
  color: var(--white);
  text-align: center;
  position: relative;
  overflow: hidden;
}

.cta-section::before {
  content: '';
  position: absolute;
  top: -100px;
  right: -100px;
  width: 300px;
  height: 300px;
  background: rgba(232, 136, 36, 0.2);
  border-radius: 50%;
  animation: floatAnimation 12s ease-in-out infinite;
}

.cta-section::after {
  content: '';
  position: absolute;
  bottom: -150px;
  left: -150px;
  width: 400px;
  height: 400px;
  background: rgba(255, 255, 255, 0.1);
  border-radius: 50%;
  animation: floatAnimation 15s ease-in-out infinite reverse;
}

.cta-content {
  position: relative;
  z-index: 1;
  max-width: 800px;
  margin: 0 auto;
  padding: 0 2rem;
}

.cta-content h2 {
  font-size: 3rem;
  font-weight: 800;
  margin-bottom: 1.5rem;
}

.cta-content p {
  font-size: 1.25rem;
  margin-bottom: 2.5rem;
  opacity: 0.9;
}

.cta-buttons {
  display: flex;
  gap: 1.5rem;
  justify-content: center;
  flex-wrap: wrap;
}

/* ===== RESPONSIVE DESIGN ===== */
@media (max-width: 1024px) {
  .hero-content-wrapper {
    grid-template-columns: 1fr;
    gap: 3rem;
    text-align: center;
  }
  
  .hero-visual-content {
    order: -1;
  }
  
  .government-badges {
    justify-content: center;
  }
  
  .desktop-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 1.5rem;
  }

  .steps-grid {
    grid-template-columns: 1fr;
    gap: 2rem;
  }

  .steps-grid::before {
    display: none;
  }
}

@media (max-width: 768px) {
  .page-hero {
    padding: 6rem 0 4rem;
  }
  
  .page-hero-container {
    padding: 0 1rem;
  }
  
  .hero-content-wrapper {
    gap: 2rem;
  }
  
  .hero-text-content h1 {
    font-size: 2.5rem;
  }
  
  .hero-features {
    justify-content: center;
  }
  
  .feature-item {
    padding: 0.5rem 1rem;
  }
  
  .hero-cta {
    justify-content: center;
  }
  
  .hero-main-image {
    width: 250px;
    height: 250px;
  }
  
  .government-badges {
    grid-template-columns: 1fr;
    gap: 0.75rem;
  }
  
  .badge-item {
    padding: 0.75rem;
  }
  
  .badge-item i {
    font-size: 1.2rem;
  }
  
  .hero-stats {
    grid-template-columns: repeat(2, 1fr);
    gap: 1rem;
  }

  .section-header h2 {
    font-size: 2rem;
  }

  .cta-content h2 {
    font-size: 2rem;
  }

  /* Show mobile carousel, hide desktop grid */
  .desktop-grid {
    display: none;
  }
  
  .mobile-carousel {
    display: block;
  }
  
  .carousel-track .service-card-flip {
    flex: 0 0 100%;
    max-width: 100%;
  }
}

@media (max-width: 480px) {
  .page-hero {
    padding: 5rem 0 3rem;
  }
  
  .page-hero-container {
    padding: 0 1rem;
  }
  
  .hero-text-content h1 {
    font-size: 2rem;
  }
  
  .hero-text-content p {
    font-size: 1.1rem;
  }
  
  .hero-features {
    flex-direction: column;
    align-items: center;
  }
  
  .feature-item {
    width: 100%;
    max-width: 250px;
    justify-content: center;
  }
  
  .hero-cta {
    flex-direction: column;
    align-items: center;
  }
  
  .hero-main-image {
    width: 200px;
    height: 200px;
  }
  
  .hero-stats {
    grid-template-columns: 1fr;
  }

  .service-card-flip {
    height: 400px;
  }

  .service-card-front,
  .service-card-back {
    padding: 1.5rem;
  }

  .service-icon-3d {
    width: 60px;
    height: 60px;
    font-size: 1.75rem;
  }
  
  .carousel-controls {
    gap: 1rem;
  }
  
  .carousel-btn {
    width: 40px;
    height: 40px;
    font-size: 1rem;
  }
}

/* ===== LOADING ANIMATION ===== */
.services-grid {
  animation: fadeInUp 0.8s ease-out;
}

@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(30px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}