:root {
  --primary: #507C7C;
  --secondary: #709584;
  --accent: #507C7C;
  --accent-hover: #3d6060;
  --accent-mid: #96C4BB;
  --accent-light: #A2D7D6;
  --accent-pale: #BFD6C1;
  --bg-dark: #2d4f4f;
  --bg-section: #f0f7f4;
  --text-light: #ffffff;
  --text-dark: #1a2e2e;
  --text-muted: #709584;
  --border: rgba(80,124,124,0.2);
  --glass: rgba(150,196,187,0.08);
  --gradient-hero: linear-gradient(135deg, #2d4f4f 0%, #507C7C 100%);
  --glow: 0 0 30px rgba(80,124,124,0.35);
}

body {
  font-family: 'Inter', sans-serif;
  background-color: var(--bg-section);
  color: var(--text-dark);
  overflow-x: hidden;
}

h1, h2, h3, h4, h5, h6 { font-family: 'Poppins', sans-serif; }

/* --- Global Animations --- */
@keyframes fadeInUp {
  from { opacity: 0; transform: translateY(40px); }
  to { opacity: 1; transform: translateY(0); }
}
@keyframes fadeInLeft {
  from { opacity: 0; transform: translateX(-60px); }
  to { opacity: 1; transform: translateX(0); }
}
@keyframes fadeInRight {
  from { opacity: 0; transform: translateX(60px); }
  to { opacity: 1; transform: translateX(0); }
}
@keyframes zoomIn {
  from { opacity: 0; transform: scale(0.85); }
  to { opacity: 1; transform: scale(1); }
}
@keyframes float {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-12px); }
}
@keyframes pulse-glow {
  0%, 100% { box-shadow: 0 0 20px rgba(80, 124, 124, 0.3); }
  50% { box-shadow: 0 0 40px rgba(80, 124, 124, 0.6); }
}
@keyframes rotateSlow {
  from { transform: rotate(0deg); }
  to { transform: rotate(360deg); }
}
@keyframes borderGlow {
  0%, 100% { border-color: var(--accent); }
  50% { border-color: var(--accent-mid); }
}
@keyframes shimmer {
  0% { background-position: -200% 0; }
  100% { background-position: 200% 0; }
}
@keyframes morphBg {
  0%, 100% { border-radius: 60% 40% 30% 70% / 60% 30% 70% 40%; }
  50% { border-radius: 30% 60% 70% 40% / 50% 60% 30% 60%; }
}
@keyframes bounceDown {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(8px); }
}
@keyframes slideUpFade {
  from { opacity: 0; transform: translateY(30px); }
  to { opacity: 1; transform: translateY(0); }
}

/* --- Hero Slider REBUILD --- */
.hero-slider {
  position: relative;
  width: 100%;
  height: 100vh;
  overflow: hidden;
}

/* UI Protection Overlays for Readability */
.hero-slider::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 200px;
  background: linear-gradient(
    to bottom,
    rgba(5,15,15,0.92) 0%,
    rgba(5,15,15,0.60) 50%,
    rgba(5,15,15,0.00) 100%
  );
  z-index: 6;
  pointer-events: none;
}

.hero-slider::after {
  content: '';
  position: absolute;
  top: 0; left: 0; bottom: 0;
  width: 55%;
  background: linear-gradient(
    to right,
    rgba(5,15,15,0.75) 0%,
    rgba(5,15,15,0.40) 50%,
    rgba(5,15,15,0.00) 100%
  );
  z-index: 6;
  pointer-events: none;
}

.slide {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  background-size: cover;
  background-position: center;
  opacity: 0;
  z-index: 0;
  transition: opacity 1s ease-in-out;
}

.slide.active {
  opacity: 1;
  z-index: 1;
}

.slide-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(to right, rgba(30,60,60,0.72) 0%, rgba(30,60,60,0.35) 60%, rgba(30,60,60,0.1) 100%);
}

.slide-content {
  position: absolute;
  bottom: 12%;
  left: 5%;
  max-width: 700px;
  z-index: 10;
}

.slide.active .slide-heading {
  animation: slideUpFade 0.7s ease forwards 0.3s;
}

.slide-heading {
  font-family: 'Poppins', sans-serif;
  font-weight: 800;
  font-size: clamp(1.8rem, 4.5vw, 3.5rem);
  color: white;
  text-transform: uppercase;
  line-height: 1.1;
  margin-bottom: 28px;
  opacity: 0;
  text-shadow: 0 2px 20px rgba(0,0,0,0.3);
}

.slide-label {
  color: rgba(255,255,255,0.85);
  font-size: 1rem;
  font-weight: 400;
  letter-spacing: 0.05em;
  margin-bottom: 16px;
  font-family: 'Inter', sans-serif;
}

.hero-cta {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  padding: 14px 32px;
  border: 2px solid rgba(255,255,255,0.9);
  color: white;
  font-family: 'Inter', sans-serif;
  font-weight: 500;
  font-size: 0.95rem;
  border-radius: 50px;
  background: transparent;
  cursor: pointer;
  transition: all 0.35s ease;
}

.hero-cta:hover {
  background: var(--primary);
  border-color: var(--primary);
  transform: translateX(4px);
}

.cta-circle {
  width: 36px;
  height: 36px;
  background: var(--primary);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
}

.hero-socials {
  position: absolute;
  left: 28px;
  top: 50%;
  transform: translateY(-50%);
  z-index: 10;
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.social-circle {
  width: 36px;
  height: 36px;
  border: 1px solid rgba(255,255,255,0.4);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
  font-size: 0.8rem;
  transition: all 0.3s ease;
  cursor: pointer;
}

.social-circle:hover {
  background: var(--primary);
  border-color: var(--primary);
  transform: scale(1.15);
}

.hero-scroll {
  position: absolute;
  right: 28px;
  top: 50%;
  transform: translateY(-50%);
  z-index: 10;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
}

.scroll-line {
  width: 1px;
  height: 60px;
  background: rgba(255,255,255,0.5);
}

.scroll-arrow {
  color: white;
  font-size: 1rem;
  animation: bounceDown 1.5s ease-in-out infinite;
}

.scroll-text {
  writing-mode: vertical-rl;
  transform: rotate(180deg);
  color: rgba(255,255,255,0.7);
  font-size: 0.72rem;
  letter-spacing: 0.15em;
  font-family: 'Inter', sans-serif;
  text-transform: uppercase;
}

.hero-arrows {
  position: absolute;
  bottom: 40px;
  right: 40px;
  z-index: 10;
  display: flex;
  gap: 12px;
}

.arrow-btn {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  border: 1.5px solid rgba(255,255,255,0.7);
  background: transparent;
  color: white;
  font-size: 1rem;
  cursor: pointer;
  transition: all 0.3s ease;
  display: flex;
  align-items: center;
  justify-content: center;
}

.arrow-btn:hover {
  background: var(--primary);
  border-color: var(--primary);
}

.hero-dots {
  position: absolute;
  bottom: 52px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 10;
  display: flex;
  gap: 8px;
}

.dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  border: 1.5px solid rgba(255,255,255,0.7);
  background: transparent;
  cursor: pointer;
  transition: all 0.3s ease;
}

.dot.active {
  background: var(--primary);
  border-color: var(--primary);
  width: 24px;
  border-radius: 4px;
}

/* --- Marquee Animation --- */
@keyframes marqueeLeft { 0% { transform: translateX(0); } 100% { transform: translateX(-50%); } }
@keyframes marqueeRight { 0% { transform: translateX(-50%); } 100% { transform: translateX(0); } }

.marquee-container {
  overflow: hidden;
  white-space: nowrap;
  position: relative;
  display: flex;
}
.marquee-row {
  display: flex;
  width: max-content;
}
.marquee-item {
  padding: 0 40px;
  font-family: 'Poppins', sans-serif;
  font-weight: 600;
  font-size: 1.1rem;
  text-transform: uppercase;
  color: rgba(255,255,255,0.7);
  letter-spacing: 0.05em;
  transition: color 0.3s ease;
}
.marquee-item:hover { color: var(--accent-mid); cursor: pointer; }
.marquee-container:hover .marquee-row { animation-play-state: paused; }

.diamond { color: var(--accent-mid); margin: 0 10px; }

/* --- 3D Tilt Cards --- */
.tilt-card {
  width: 380px;
  height: 520px;
  border-radius: 24px;
  overflow: hidden;
  position: relative;
  transform-style: preserve-3d;
  transition: transform 0.1s;
}
.tilt-card-featured { height: 560px; }

/* --- Masonry Grid --- */
.project-card {
  border-radius: 16px;
  overflow: hidden;
  position: relative;
  cursor: pointer;
}
.project-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(to top, rgba(45,79,79,0.95) 0%, rgba(45,79,79,0.4) 60%, transparent 100%);
  opacity: 0;
  transition: opacity 0.4s ease;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  padding: 24px;
}
.project-card:hover .project-overlay { opacity: 1; }

/* --- Why Choose RTS image stack --- */
.image-stack-main {
  border-radius: 20px;
  transform: perspective(1000px) rotateY(-8deg) rotateX(3deg);
  box-shadow: 30px 30px 80px rgba(0,0,0,0.5);
  transition: transform 0.6s ease;
}
.image-stack-main:hover { transform: rotateY(0deg); }

.float-img {
  position: absolute;
  bottom: -30px;
  right: -30px;
  border: 4px solid var(--accent-mid);
  border-radius: 16px;
  transform: perspective(500px) rotateY(8deg);
}

/* --- Testimonial Slider Rebuilt --- */
.testimonial-section {
  background: radial-gradient(circle at top right, rgba(150, 196, 187, 0.15), transparent),
              radial-gradient(circle at bottom left, rgba(80, 124, 124, 0.1), transparent);
}
.testimonial-card-container {
  max-width: 1000px;
  margin: 0 auto;
  position: relative;
  perspective: 1000px;
}
.testimonial-card {
  position: absolute;
  width: 100%;
  left: 0;
  top: 0;
  opacity: 0;
  pointer-events: none;
  transform: translateY(30px) rotateX(-5deg);
  transition: all 0.8s cubic-bezier(0.4, 0, 0.2, 1);
}
.testimonial-card.active {
  opacity: 1;
  pointer-events: auto;
  position: relative;
  transform: translateY(0) rotateX(0);
}
.quote-icon-bg {
  position: absolute;
  top: -20px;
  left: 40px;
  font-size: 120px;
  color: var(--accent-mid);
  opacity: 0.1;
  font-family: serif;
}
.testimonial-avatar-glow {
  position: relative;
}
.testimonial-avatar-glow::after {
  content: '';
  position: absolute;
  inset: -8px;
  border: 2px solid var(--accent-mid);
  border-radius: 50%;
  opacity: 0.3;
  animation: pulse-glow 2s infinite;
}
.test-dots .dot {
  width: 10px;
  height: 10px;
  background: var(--accent-mid);
  opacity: 0.3;
  transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}
.test-dots .dot.active {
  width: 40px;
  opacity: 1;
  background: var(--primary);
  border-radius: 20px;
}

/* --- CTA Banner --- */
.cta-section {
  background: linear-gradient(135deg, var(--primary) 0%, var(--bg-dark) 100%);
  position: relative;
  overflow: hidden;
}
.cta-pattern {
  position: absolute;
  inset: 0;
  background-image: linear-gradient(45deg, rgba(255,255,255,0.05) 25%, transparent 25%, transparent 50%, rgba(255,255,255,0.05) 50%, rgba(255,255,255,0.05) 75%, transparent 75%, transparent);
  background-size: 40px 40px;
  opacity: 0.1;
}

/* --- Utility Classes --- */
.reveal { opacity: 0; transition: all 0.8s ease-out; }
.reveal.visible { opacity: 1; }
.reveal.visible.fade-up { animation: fadeInUp 0.8s forwards; }
.reveal.visible.fade-left { animation: fadeInLeft 0.8s forwards; }
.reveal.visible.fade-right { animation: fadeInRight 0.8s forwards; }
.reveal.visible.zoom-in { animation: zoomIn 0.8s forwards; }

.glass-card {
  background: var(--glass);
  backdrop-filter: blur(12px);
  border: 1px solid var(--border);
  border-radius: 20px;
}

/* --- Navbar --- */
#navbar { 
  transition: all 0.4s ease; 
  background: linear-gradient(
    to bottom,
    rgba(5,15,15,0.80) 0%,
    rgba(5,15,15,0.00) 100%
  ) !important;
  backdrop-filter: none !important;
  padding-top: 1.5rem;
  padding-bottom: 1.5rem;
}

#navbar .nav-link, #navbar span { 
  color: #ffffff !important;
  text-shadow: 0 1px 8px rgba(0,0,0,0.8);
}

#navbar.scrolled {
  background: rgba(255, 255, 255, 0.97) !important;
  backdrop-filter: blur(20px) !important;
  padding-top: 1rem;
  padding-bottom: 1rem;
  box-shadow: 0 4px 30px rgba(0,0,0,0.1);
}

#navbar.scrolled .nav-link, #navbar.scrolled span { 
  color: var(--text-dark) !important; 
  text-shadow: none;
}

#navbar img {
  filter: brightness(0) invert(1);
  transition: all 0.4s ease;
}

#navbar.scrolled img {
  filter: none;
}

#navbar.scrolled .text-amber-500 { color: var(--primary); }

.nav-link.active { color: var(--primary) !important; }
#nav-underline {
  height: 2px;
  background: var(--accent-mid);
  width: 0;
  transition: width 0.3s ease;
}
.nav-link:hover #nav-underline, .nav-link.active #nav-underline { width: 100%; }

/* --- Components --- */
.btn-glow:hover { box-shadow: var(--glow); }

.service-card:hover {
  transform: translateY(-16px);
  border-color: var(--accent-mid);
  box-shadow: var(--glow);
}
.service-card:hover i { transform: rotate(10deg); color: var(--primary); }

.floating-input {
  background: rgba(255,255,255,0.05);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 1rem 1rem 1rem 3rem;
  width: 100%;
  color: var(--text-dark);
  transition: all 0.3s ease;
}
.floating-input:focus {
  border-color: var(--accent-mid);
  outline: none;
  box-shadow: 0 0 15px rgba(150, 196, 187, 0.4);
}

.typing-cursor { border-right: 3px solid var(--primary); animation: blink 0.7s infinite; }
@keyframes blink { 50% { border-color: transparent; } }

/* --- Footer --- */
footer {
  background-color: var(--bg-dark);
  border-top: 1px solid var(--accent-mid);
}
footer a:hover { color: var(--accent-light); }

/* --- Scrollbar --- */
::-webkit-scrollbar { width: 8px; }
::-webkit-scrollbar-track { background: var(--bg-section); }
::-webkit-scrollbar-thumb { background: var(--secondary); border-radius: 10px; }
::-webkit-scrollbar-thumb:hover { background: var(--primary); }

/* --- Transitions --- */
.page-fade-in {
  animation: fadeInUp 0.8s ease-out;
}

/* --- Mobile Queries --- */
@media (max-width: 768px) {
  .hero-socials, .hero-scroll { display: none; }
  .slide-heading { font-size: clamp(2rem, 8vw, 3rem); }
  .slide-content { bottom: 15%; }
  .hero-arrows { bottom: 20px; right: 16px; }
  .arrow-btn { width: 40px; height: 40px; }
  .hero-dots { bottom: 24px; }
  .tilt-card { width: 100%; height: auto; min-height: 450px; }
}
