/**
 * Cloud Resources Unified CSS
 * This file properly scopes styles to prevent global conflicts
 */

/* ======================================
   GLOBAL VARIABLES
   ====================================== */
:root {
  --primary-color: #41cb5b;
  --secondary-color: #1d2549;
  --white: #ffffff;
  --black: #000000;
  --light-grey: #f8f9fa;
  --dark-grey: #343a40;
  --transition-speed: 0.3s;
}

/* ======================================
   DEFAULT WEBSITE STYLES - These apply to all pages
   ====================================== */
body {
  font-family: 'Roboto', -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  line-height: 1.6;
  color: #333; /* Default text color for the entire site */
  background-color: #f5f7fa; /* Default background for entire site */
}

/* Default heading styles for all pages */
h1, h2, h3, h4, h5, h6 {
  font-weight: 600;
  color: #333; /* Default heading color */
}

/* Tech Badge - Global styling */
.tech-badge {
  background-color: var(--primary-color);
  color: var(--white);
  border-radius: 50rem;
  padding: 0.5rem 1rem;
  display: inline-flex;
  align-items: center;
  margin-bottom: 1rem;
  font-weight: 500;
  box-shadow: 0 2px 10px rgba(65, 203, 91, 0.2);
  transition: all var(--transition-speed) ease;
}

.tech-badge i {
  margin-right: 0.5rem;
}

.tech-badge:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 15px rgba(65, 203, 91, 0.3);
}

/* On homepage, ensure text is white */
.homepage-template .tech-badge {
  color: white !important;
}

/* ======================================
   CARD AND COMPONENT STYLES
   ====================================== */
/* Tech Card - Base card styling */
.tech-card {
  background-color: rgba(255, 255, 255, 0.1);
  backdrop-filter: blur(10px);
  border-radius: 1rem;
  border: none;
  box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
  transition: all var(--transition-speed) cubic-bezier(0.34, 1.56, 0.64, 1);
}

/* Hover-up effect for cards */
.hover-up {
  transition: transform var(--transition-speed) cubic-bezier(0.34, 1.56, 0.64, 1),
  box-shadow var(--transition-speed) cubic-bezier(0.34, 1.56, 0.64, 1);
}

.hover-up:hover {
  transform: translateY(-10px);
  box-shadow: 0 15px 30px rgba(0, 0, 0, 0.2);
}

/* Service Card specific styling */
.service-card {
  background-color: rgba(255, 255, 255, 0.1) !important;
  backdrop-filter: blur(10px) !important;
  transition: transform 0.3s cubic-bezier(0.34, 1.56, 0.64, 1),
  box-shadow 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.service-card:hover {
  transform: translateY(-15px);
  box-shadow: 0 15px 30px rgba(0, 0, 0, 0.2);
}

.service-card h3 {
  margin-bottom: 0.5rem;
}

.service-card p {
  margin-bottom: 1rem;
}

/* Icon styling */
.icon-wrapper {
  width: 60px;
  height: 60px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  margin-bottom: 1rem;
}

.icon-accent {
  background-color: var(--primary-color);
}

.icon-light {
  background-color: rgba(65, 203, 91, 0.15);
}

/* Counter values for stats */
.counter-value {
  color: white;
  font-weight: bold;
}

/* Stats cards */
.homepage-template .counter-value {
  color: white !important;
}

/* Stagger animation for items appearing in sequence */
.stagger-item {
  opacity: 0;              /* Starts hidden */
  transform: translateY(20px);
  transition: opacity 0.6s ease-out, transform 0.6s ease-out;
}

.stagger-item.visible {    /* Becomes visible only with this class */
  opacity: 1;
  transform: translateY(0);
}

/* Float animation for hovering elements */
.float-element {
  animation: float-animation 6s ease-in-out infinite;
}

@keyframes float-animation {
  0% { transform: translateY(0); }
  50% { transform: translateY(-10px); }
  100% { transform: translateY(0); }
}

/* Testimonial Card Styling */
.testimonial-card {
  position: relative;
  height: 330px;
  padding: 20px;
  background-color: rgba(29, 37, 73, 0.8);
  backdrop-filter: blur(10px);
  border-radius: 12px;
  margin-bottom: 20px;
  overflow: hidden;
  transition: transform 0.3s ease, box-shadow 0.3s ease;
  border: 1px solid rgba(65, 203, 91, 0.3);
}

.testimonial-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 10px 25px rgba(65, 203, 91, 0.3);
}

/* Quote icon positioning */
.testimonial-quote {
  position: absolute;
  top: 20px;
  left: 20px;
}

/* Header styling */
.testimonial-header {
  padding-left: 50px;
  margin-bottom: 10px;
}

.testimonial-header h4 {
  margin: 0;
  font-size: 1.1rem;
  font-weight: 600;
}

.testimonial-header p {
  margin: 0;
  font-size: 0.9rem;
}

/* Content area */
.testimonial-content {
  height: 200px;
  overflow-y: auto;
  scrollbar-width: thin;
  scrollbar-color: rgba(65, 203, 91, 1) transparent;
}

.testimonial-content p {
  font-size: 0.95rem;
  line-height: 1.5;
  margin: 0;
}

/* Footer styling */
.testimonial-footer {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  padding: 15px 20px;
  background-color: rgba(21, 28, 53, 0.9);
  border-top: 1px solid rgba(65, 203, 91, 0.3);
}

.testimonial-avatar {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background-color: rgba(65, 203, 91, 0.2);
  display: flex;
  align-items: center;
  justify-content: center;
  margin-right: 12px;
}

.testimonial-avatar i {
  font-size: 16px;
}

.testimonial-author h5 {
  font-size: 0.9rem;
  margin: 0;
  font-weight: 600;
}

.testimonial-author p {
  font-size: 0.8rem;
  margin: 0;
}

/* Feature item for CTA section */
.feature-item {
  display: flex;
  align-items: center;
  margin-bottom: 1rem;
}

.homepage-template .feature-item {
  color: white;
}

@media (max-width: 575.98px) {
  .feature-item {
    justify-content: center !important;
    margin-bottom: 1rem;
  }
}

/* ======================================
   HOMEPAGE SPECIFIC STYLES - These only apply to the homepage
   ====================================== */
.homepage-template {
  /* All homepage styles go here to avoid affecting other pages */
}

/* Tech Pattern - Section with tech-themed background */
.homepage-template .tech-pattern {
  position: relative;
  background-color: transparent;
  overflow: visible;
  z-index: 2;
  min-height: 60vh;
}

/* Tech Sections - Standard spacing for sections */
.homepage-template .tech-section {
  padding: 4rem 0;
  position: relative;
  z-index: 2;
}

/* Text Highlight - Highlighted text on dark background */
.homepage-template .text-highlight {
  position: relative;
  display: inline-block;
  color: var(--primary-color) !important;
  font-weight: 700;
}

.homepage-template .text-highlight::after {
  content: '';
  position: absolute;
  width: 100%;
  height: 8px;
  background-color: rgba(65, 203, 91, 0.2);
  left: 0;
  bottom: 5px;
  z-index: -1;
  transition: height var(--transition-speed);
}

.homepage-template .text-highlight:hover::after {
  height: 80%;
}

/* Background containers - only apply to homepage */
.homepage-template #stars-container {
  position: fixed !important;
  top: 0 !important;
  left: 0 !important;
  width: 100% !important;
  height: 100% !important;
  z-index: 0 !important;
  background-color: #1d2549 !important;
  pointer-events: none !important;
  display: block !important;
}

.homepage-template #clouds-container {
  position: fixed !important;
  top: 0 !important;
  left: 0 !important;
  width: 50% !important;
  height: 50% !important;
  z-index: 0 !important;
  pointer-events: none !important;
  display: block !important;
  opacity: 0.2 !important;
}

/* Make sure content areas are transparent to show stars/background on homepage only */
.homepage-template #wrapwrap,
.homepage-template #wrap,
.homepage-template main,
.homepage-template .o_header_wrapper {
  background-color: transparent !important;
}

/* Ensure content has higher z-index than background on homepage */
.homepage-template .tech-section,
.homepage-template .container,
.homepage-template .tech-pattern {
  position: relative !important;
  z-index: 5 !important;
}

/* Text color overrides for homepage only */
.homepage-template h1,
.homepage-template h2,
.homepage-template h3,
.homepage-template h4,
.homepage-template h5,
.homepage-template h6 {
  color: white !important;
}

.homepage-template p {
  color: rgba(255, 255, 255, 0.8) !important;
}

.homepage-template .text-white-50 {
  color: rgba(255, 255, 255, 0.7) !important;
}

/* Star styling */
.star {
  position: absolute;
  background-color: white;
  border-radius: 50%;
  animation: twinkle 4s infinite ease-in-out;
  pointer-events: none;
}

@keyframes twinkle {
  0% { opacity: 0.2; }
  50% { opacity: 1; }
  100% { opacity: 0.2; }
}

/* Cloud styling */
.cloud {
  position: absolute;
  transition: transform 0.3s ease-out;
  pointer-events: all;
}

.cloud svg {
  overflow: visible;
}

.cloud svg path {
  stroke: #000;
  stroke-width: 1.5px;
  fill: rgba(65, 203, 91, 0.1);
}

/* ======================================
   FOOTER SPECIFIC STYLES
   ====================================== */
.site-footer {
  position: relative;
  color: #464646;
  font-size: 16px;
  line-height: 1.6;
  background-color: #f8f9fa; /* Ensure footer has light background */
  z-index: 100; /* Keep footer above fixed background elements */
}

/* Footer text color overrides to ensure readability */
.site-footer h5,
.site-footer h6,
.site-footer p,
.site-footer a,
.site-footer span {
  color: #464646 !important; /* Force dark text in footer */
}

.site-footer .footer-heading {
  color: #333 !important;
}

.site-footer .about-text p {
  color: #464646 !important;
}

/* ======================================
   MOUSE TRACKER STYLES
   ====================================== */
.mouse-tracker-cursor {
  position: fixed;
  border-radius: 50%;
  pointer-events: none;
  z-index: 1000;
  transform: translate(-50%, -50%);
  will-change: transform;
  background-color: rgba(65, 203, 91, 0.7);
  width: 30px;
  height: 30px;
  box-shadow: 0 0 15px rgba(65, 203, 91, 0.5);
}

.mouse-tracker-follower {
  position: fixed;
  border-radius: 50%;
  pointer-events: none;
  z-index: 999;
  will-change: transform;
  transform: translate(-50%, -50%);
  background-color: rgba(255, 255, 255, 0.8);
  box-shadow: 0 0 10px rgba(255, 255, 255, 0.5);
}

/* Hide mouse tracker on mobile */
.is-mobile-device .mouse-tracker-cursor,
.is-mobile-device .mouse-tracker-follower {
  display: none !important;
}

/* 3D Tilt Effect - used for cards and images */
.tilt-effect {
  transform-style: preserve-3d;
  perspective: 1000px;
  will-change: transform;
  transition: transform 0.3s ease-out;
}

.tilt-effect img,
.tilt-effect .card-body {
  transform: translateZ(30px); /* Gives a subtle 3D effect */
}

.mouse-tilt {
  transform-style: preserve-3d;
  will-change: transform;
  transition: transform 0.3s ease-out;
}

/* Disable tilt effect on mobile */
.is-mobile-device .tilt-effect,
.is-mobile-device .mouse-tilt {
  transform: none !important;
  transition: none !important;
  perspective: none !important;
}

/* ======================================
   TYPEWRITER EFFECT STYLES
   ====================================== */
/* Enhanced typewriter effect styling */
#type-text {
  position: relative;
  display: inline-block;
  font-weight: 600 !important;
  text-shadow: 0 0 5px rgba(65, 203, 91, 0.3);
}

/* Typewriter container */
.typewriter {
  display: inline-block;
  position: relative;
}

.typewriter-text {
  display: inline-block;
}

.typewriter-cursor {
  display: inline-block;
  color: var(--primary-color);
  font-weight: bold;
  animation: typewriter-blink 750ms step-end infinite;
}

@keyframes typewriter-blink {
  0%, 49% {
    opacity: 1;
  }
  50%, 100% {
    opacity: 0;
  }
}

/* ======================================
   ANIMATION STYLES
   ====================================== */
/* Pulse Effect - Used for buttons/elements that need attention */
.pulse-effect {
  animation: pulse-glow 2s infinite;
  position: relative;
  overflow: hidden;
}

@keyframes pulse-glow {
  0% {
    box-shadow: 0 0 0 0 rgba(65, 203, 91, 0.7);
  }
  70% {
    box-shadow: 0 0 0 15px rgba(65, 203, 91, 0);
  }
  100% {
    box-shadow: 0 0 0 0 rgba(65, 203, 91, 0);
  }
}

/* WhatsApp floating button */
#whatsapp-btn {
  position: fixed;
  bottom: 20px;
  right: 20px;
  z-index: 100;
  width: 60px;
  height: 60px;
  background-color: #25D366; /* WhatsApp brand color */
  color: white;
  border: none;
  border-radius: 50%;
  font-size: 1.5rem;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.3s ease;
  box-shadow: 0 4px 10px rgba(37, 211, 102, 0.4);
}

#whatsapp-btn:hover {
  transform: translateY(-5px) scale(1.05);
  box-shadow: 0 6px 15px rgba(37, 211, 102, 0.5);
}

#whatsapp-btn:active {
  transform: translateY(-2px) scale(1.02);
}

/* Shadow utilities */
.shadow-lg {
  box-shadow: 0 10px 25px rgba(0, 0, 0, 0.15) !important;
}

.homepage-template .shadow-lg {
  box-shadow: 0 15px 35px rgba(0, 0, 0, 0.2) !important;
}

/* Rounded utilities */
.rounded-4 {
  border-radius: 1rem !important;
}

/* ======================================
   RESPONSIVE STYLES
   ====================================== */
@media (max-width: 991.98px) {
  .homepage-template h1.display-3 {
    font-size: calc(1.525rem + 2.7vw) !important;
  }

  .homepage-template h2.display-5,
  .homepage-template h2.display-4 {
    font-size: calc(1.425rem + 1.5vw) !important;
  }

  .homepage-template .lead {
    font-size: 1.1rem !important;
  }

  .homepage-template .tech-section {
    padding: 3rem 0;
  }
}

@media (max-width: 767.98px) {
  .homepage-template .tech-section {
    padding: 2.5rem 0;
  }

  .homepage-template .tech-card,
  .homepage-template .service-card,
  .homepage-template .card {
    aspect-ratio: auto !important;
    height: auto !important;
    min-height: 250px;
  }

  .homepage-template .btn {
    padding: 0.5rem 1rem !important;
    font-size: 1rem !important;
  }

  .homepage-template .icon-wrapper {
    width: 50px !important;
    height: 50px !important;
  }
}

@media (max-width: 575.98px) {
  .homepage-template .tech-section {
    padding: 2rem 0;
  }

  .homepage-template .col-6 {
    width: 100% !important;
  }

  .homepage-template h1.display-3 {
    font-size: calc(1.375rem + 1.5vw) !important;
  }

  .homepage-template .tech-pattern.tech-section {
    padding-top: 120px !important;
  }

  .service-desc {
    overflow: hidden;
    display: -webkit-box;
    -webkit-line-clamp: 4;
    -webkit-box-orient: vertical;
    max-height: 5.6em; /* 4 lines at 1.4em line height */
    line-height: 1.4;
    text-align: center;
    margin-bottom: 0;
  }

}