/* ==========================================================================
   THE MIDNIGHT CANVAS - PREMIUM AGENCY THEME
   ==========================================================================
   
   TABLE OF CONTENTS
   1. Base & Global Overrides
   2. Utility Classes (Glass, Typography, Spacing)
   3. Buttons & Forms
   4. Navbar & Contact Dropdown
   5. Hero Section & Canvas
   6. Stats Section
   7. Services Section (Bento & Slider)
   8. Portfolio Section & Filters
   9. Clients Marquee
   10. Team Section
   11. Footer Section
   12. Modals
   13. Global Animations & Scroll Reveal
   ========================================================================== */

/* ==========================================================================
   1. BASE & GLOBAL OVERRIDES
   ========================================================================== */
html {
  scroll-behavior: smooth;
}

body {
  background: var(--color-bg) !important;
  color: var(--color-text);
  margin: 0;
  overflow-x: hidden;
}

/* Custom Agency Cursor */
body,
a,
button,
.portfolio-card,
.client-logo-card {
  cursor:
    url("../images/pen-cursor.png") 0 0,
    auto !important;
}

/* ==========================================================================
   2. UTILITY CLASSES
   ========================================================================== */
.glass {
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  box-shadow: var(--shadow-glass);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
}

.text-gradient {
  background: linear-gradient(
    135deg,
    var(--color-accent-1),
    var(--color-accent-2)
  );
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  padding-bottom: 0.15em;
  display: inline-block;
  line-height: 1.2;
}

/* Section Layouts */
.section {
  padding: 4.5rem 0;
  scroll-margin-top: 120px; /* Clearance for fixed navbar */
}

.section-header {
  margin-top: 0;
  margin-bottom: 3rem;
  text-align: center;
}

.section-title {
  font-family: var(--font-display);
  font-size: clamp(2.5rem, 5vw, 4rem);
  margin-top: 0;
  margin-bottom: 1rem;
}

.section-subtitle {
  color: var(--color-muted);
  font-size: 1.1rem;
  max-width: 500px;
  margin: 0 auto;
}

/* Standalone Page Navbar Clearance (e.g., Portfolio Page) */
.page-top-spacing {
  padding-top: 140px !important;
}

/* ==========================================================================
   3. BUTTONS & FORMS
   ========================================================================== */
.btn-primary {
  background: linear-gradient(
    135deg,
    var(--color-accent-1),
    var(--color-accent-2)
  );
  color: #ffffff !important;
  padding: 0.85rem 2rem;
  border-radius: 99px;
  font-weight: 700;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  font-size: 0.85rem;
  transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
  box-shadow: 0 10px 20px rgba(229, 0, 90, 0.2);
  border: none;
  cursor: pointer;
}

.btn-primary:hover {
  transform: translateY(-4px) scale(1.02);
  box-shadow: 0 15px 25px rgba(20, 44, 130, 0.3);
}

.input-group {
  position: relative;
}

.input-group input {
  width: 100%;
  padding: 1rem 1rem 1rem 0;
  background: transparent;
  border: none;
  border-bottom: 2px solid var(--color-border);
  font-family: var(--font-sans);
  font-size: 1rem;
  color: var(--color-text);
  transition: border-color 0.3s ease;
  outline: none;
}

.input-group label {
  position: absolute;
  left: 0;
  top: 50%;
  transform: translateY(-50%);
  color: var(--color-muted);
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  pointer-events: none;
}

.input-group input:focus ~ label,
.input-group input:not(:placeholder-shown) ~ label {
  top: -10px;
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--color-accent-1);
  letter-spacing: 0.05em;
  text-transform: uppercase;
}

.input-group input:focus {
  border-bottom-color: var(--color-accent-1);
}

/* ==========================================================================
   4. NAVBAR & CONTACT DROPDOWN
   ========================================================================== */
.navbar {
  position: fixed;
  top: 1.5rem;
  left: 50%;
  transform: translateX(-50%);
  width: min(90%, var(--container-width));
  padding: 1rem 1.5rem;
  border-radius: 99px;
  z-index: 100;
  display: flex;
  justify-content: center;
  overflow: visible !important; /* Allows dropdown to escape */

  /* Running LED Capsule Border */
  border: 2px solid transparent;
  background: 
    linear-gradient(var(--color-surface), var(--color-surface)) padding-box,
    linear-gradient(90deg, #e5005a, #9d4edd, #00b4d8, #e5005a) border-box;
  background-size: 100% 100%, 200% 100%;
  animation: led-glow 3s linear infinite;
  box-shadow: var(--shadow-glass);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
}

.nav-container {
  display: flex;
  justify-content: space-between;
  align-items: center;
  width: 100%;
  overflow: visible !important;
}

.nav-logo {
  font-family: var(--font-display);
  font-size: 1.5rem;
  font-weight: 700;
  letter-spacing: -0.05em;
}

.nav-logo img {
  height: 40px;
  width: auto;
  max-width: 200px;
  object-fit: contain;
}

.nav-links {
  display: none;
  gap: 2.5rem;
}

@media (min-width: 768px) {
  .nav-links {
    display: flex;
  }
}

.nav-links a {
  font-size: 0.95rem;
  font-weight: 600;
  color: var(--color-muted);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  text-decoration: none;
  position: relative;
  padding: 0.25rem 0;
  transition: color 0.3s ease;
}

.nav-links a::after {
  content: "";
  position: absolute;
  width: 100%;
  height: 2px;
  bottom: -2px;
  left: 0;
  background: linear-gradient(
    to right,
    var(--color-accent-1),
    var(--color-accent-2)
  );
  transform: scaleX(0);
  transform-origin: right;
  transition: transform 0.4s cubic-bezier(0.86, 0, 0.07, 1);
}

.nav-links a:hover {
  color: var(--color-text);
}
.nav-links a:hover::after {
  transform: scaleX(1);
  transform-origin: left;
}

/* Contact Dropdown */
.nav-cta-wrapper {
  position: relative;
  z-index: 100;
}

.contact-dropdown {
  position: absolute;
  top: calc(100% + 15px);
  right: 0;
  min-width: 220px;
  background: rgba(255, 255, 255, 0.85);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border: 1px solid rgba(255, 255, 255, 0.4);
  border-radius: 1.2rem;
  box-shadow: 0 15px 35px rgba(20, 44, 130, 0.1);
  padding: 1rem 0.8rem 0.8rem;
  opacity: 0;
  visibility: hidden;
  transform: translateY(-15px) scale(0.95);
  transform-origin: top right;
  transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.contact-dropdown.active {
  opacity: 1;
  visibility: visible;
  transform: translateY(0) scale(1);
}

.dropdown-header {
  font-size: 0.7rem;
  text-transform: uppercase;
  letter-spacing: 0.15em;
  color: var(--color-text);
  opacity: 0.4;
  font-weight: 700;
  padding: 0 1rem 0.6rem;
  margin-bottom: 0.5rem;
  border-bottom: 1px solid rgba(0, 0, 0, 0.05);
}

.contact-item {
  display: flex;
  align-items: center;
  gap: 1rem;
  padding: 0.8rem 1rem;
  border-radius: 0.8rem;
  text-decoration: none;
  color: var(--color-text);
  transition: all 0.3s ease;
  position: relative;
  overflow: hidden;
}

.contact-item:hover {
  background: linear-gradient(
    90deg,
    rgba(229, 0, 90, 0.05) 0%,
    transparent 100%
  );
  transform: translateX(5px);
}

.contact-icon {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 38px;
  height: 38px;
  border-radius: 50%;
  color: #ffffff;
  transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.contact-item:hover .contact-icon {
  transform: scale(1.15) rotate(-5deg);
  box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
}

.call-icon {
  background: linear-gradient(135deg, #142c82, #2b45a6);
}
.wa-icon {
  background: linear-gradient(135deg, #25d366, #128c7e);
}
.email-icon {
  background: linear-gradient(
    135deg,
    var(--color-accent-1),
    var(--color-accent-2)
  );
}

.contact-details {
  display: flex;
  flex-direction: column;
}
.contact-text {
  font-family: var(--font-body);
  font-weight: 600;
  font-size: 0.95rem;
  line-height: 1.2;
}
.contact-sub {
  font-size: 0.75rem;
  opacity: 0.55;
  margin-top: 0.2rem;
  transition: opacity 0.3s ease;
}
.contact-item:hover .contact-sub {
  opacity: 0.8;
}

/* ==========================================================================
   5. HERO SECTION & CANVAS
   ========================================================================== */
.hero {
  position: relative;
  height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}

.hero-canvas {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: 1;
  pointer-events: none;
}

.hero-video-wrapper {
  position: absolute;
  inset: 0;
  z-index: 0;
}

.hero-video {
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0.4;
}

.video-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(
    to bottom,
    rgba(248, 249, 250, 0.8),
    rgba(248, 249, 250, 1)
  );
}

.hero-content {
  position: relative;
  z-index: 10;
  text-align: center;
}

.hero-title {
  font-family: var(--font-display);
  font-size: clamp(3rem, 8vw, 6.5rem);
  line-height: 1.1;
  margin-bottom: 1.5rem;
  letter-spacing: -0.02em;
}

.hero-subtitle {
  font-size: clamp(1rem, 2vw, 1.25rem);
  color: var(--color-muted);
  max-width: 600px;
  margin: 0 auto;
  line-height: 1.6;
}

.scroll-indicator {
  position: absolute;
  bottom: 2rem;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.5rem;
  z-index: 10;
  opacity: 0.7;
  transition: opacity 0.3s ease;
}

.scroll-indicator:hover {
  opacity: 1;
}
.scroll-text {
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.1em;
}
.scroll-line {
  width: 2px;
  height: 40px;
  background: linear-gradient(to bottom, var(--color-accent-1), transparent);
}

/* ==========================================================================
   6. STATS SECTION
   ========================================================================== */
.stats-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 2rem;
  text-align: center;
  padding: 1.5rem 2rem 2.5rem 2rem;
  background: rgba(255, 255, 255, 0.5);
  border-radius: 2rem;
  border: 1px solid var(--color-border);
  box-shadow: var(--shadow-glass);
  backdrop-filter: blur(20px);
}

@media (min-width: 768px) {
  .stats-grid {
    grid-template-columns: repeat(4, 1fr);
  }
}

.stat-number {
  font-family: var(--font-display);
  font-size: clamp(2.5rem, 5vw, 4rem);
  margin-top: 0 !important;
  margin-bottom: 0.2rem;
  padding-bottom: 0.1em;
  line-height: 1.2;
}

.stat-label {
  color: var(--color-muted);
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  font-size: 0.85rem;
  margin-bottom: 0 !important;
  display: block;
}

/* ==========================================================================
   7. SERVICES SECTION (BENTO & SLIDER)
   ========================================================================== */
.services-slider-wrapper {
  width: 100%;
  overflow: hidden;
  padding: 2rem 0;
  -webkit-mask-image: linear-gradient(
    to right,
    transparent,
    black 5%,
    black 95%,
    transparent
  );
  mask-image: linear-gradient(
    to right,
    transparent,
    black 5%,
    black 95%,
    transparent
  );
}

.services-track {
  display: flex;
  gap: 2rem;
  width: max-content;
  animation: slideServices 40s linear infinite;
}

.services-track:hover {
  animation-play-state: paused;
}

.service-card {
  background: #ffffff;
  border-radius: 1.5rem;
  border: 1px solid rgba(20, 44, 130, 0.15);
  box-shadow: 0 10px 30px rgba(20, 44, 130, 0.04);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  transition:
    transform 0.4s ease,
    border-color 0.4s ease,
    box-shadow 0.4s ease;
  cursor: pointer;
  width: calc((100vw - 4rem) / 3);
  max-width: 380px;
}

@media (max-width: 1024px) {
  .service-card {
    width: calc((100vw - 3rem) / 2);
  }
}
@media (max-width: 600px) {
  .service-card {
    width: calc(100vw - 3rem);
  }
}

.service-card:hover {
  transform: translateY(-8px) scale(1.02);
  border-color: var(--color-brand-pink);
  box-shadow:
    0 25px 50px rgba(229, 0, 90, 0.15),
    0 10px 20px rgba(20, 44, 130, 0.08);
}

.service-img-wrapper {
  width: 100%;
  height: 240px;
  overflow: hidden;
  background-color: #ffffff;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0.2rem;
  box-sizing: border-box;
}

.service-img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  transition: transform 0.6s cubic-bezier(0.25, 1, 0.5, 1);
}

.service-card:hover .service-img {
  transform: scale(1.08);
}

.service-content {
  padding: 1rem 1.5rem 1.8rem 1.5rem;
  background: #ffffff;
  flex-grow: 1;
  min-height: 140px;
  display: flex;
  flex-direction: column;
  justify-content: flex-start;
}

.service-title {
  font-family: var(--font-display);
  font-size: 1.3rem;
  margin-bottom: 0.5rem;
  color: var(--color-text);
}

.service-desc {
  font-size: 0.95rem;
  color: #555555;
  margin: 0;
  line-height: 1.5;
}

/* Base Bento Styles (If used elsewhere) */
.bento-card {
  padding: 3rem 2rem;
  border-radius: 1.5rem;
  border: 1px solid rgba(20, 44, 130, 0.25);
  background: #ffffff;
  box-shadow:
    0 15px 40px rgba(20, 44, 130, 0.06),
    0 4px 10px rgba(0, 0, 0, 0.04);
  transition:
    transform 0.4s ease,
    border-color 0.4s ease,
    box-shadow 0.4s ease;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}

.bento-card:hover {
  transform: translateY(-8px) scale(1.02);
  border-color: var(--color-brand-pink);
  box-shadow:
    0 25px 50px rgba(229, 0, 90, 0.15),
    0 10px 20px rgba(20, 44, 130, 0.08);
}

/* ==========================================================================
   8. PORTFOLIO SECTION & FILTERS
   ========================================================================== */
.portfolio-filters {
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: 1rem;
  margin-bottom: 3rem;
}

.filter-btn {
  padding: 0.8rem 1.8rem;
  background: rgba(255, 255, 255, 0.5);
  backdrop-filter: blur(10px);
  border: 1px solid rgba(229, 0, 90, 0.2);
  border-radius: 50px;
  color: var(--color-text);
  font-family: var(--font-body);
  font-weight: 600;
  cursor: pointer;
  transition: all 0.4s ease;
}

.filter-btn:hover {
  background: rgba(255, 255, 255, 0.9);
  border-color: var(--color-brand-pink);
  transform: translateY(-2px);
}

.filter-btn.active {
  background: linear-gradient(
    135deg,
    var(--color-accent-1),
    var(--color-accent-2)
  );
  color: #ffffff;
  border-color: transparent;
  box-shadow: 0 8px 20px rgba(229, 0, 90, 0.3);
}

.portfolio-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 2.5rem;
  transition: all 0.5s ease;
}

@media (min-width: 768px) {
  .portfolio-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}
@media (min-width: 1024px) {
  .portfolio-grid {
    grid-template-columns: repeat(3, 1fr);
  }
}

/* For Filterable Grid Support */
.portfolio-grid.filterable {
  grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
}

.portfolio-item,
.portfolio-card {
  position: relative;
  border-radius: 1.5rem;
  overflow: hidden;
  background: #ffffff;
  border: 1px solid rgba(20, 44, 130, 0.25);
  box-shadow:
    0 15px 40px rgba(20, 44, 130, 0.06),
    0 4px 10px rgba(0, 0, 0, 0.04);
  transition:
    transform 0.4s ease,
    border-color 0.4s ease,
    box-shadow 0.4s ease,
    opacity 0.4s ease;
  cursor: pointer;
  display: flex;
  flex-direction: column;
}
.portfolio-item {
  height: 380px;
}

.portfolio-item.hide {
  display: none;
}

.portfolio-item:hover,
.portfolio-card:hover {
  transform: translateY(-8px) scale(1.02);
  border-color: var(--color-brand-pink);
  box-shadow:
    0 25px 50px rgba(229, 0, 90, 0.15),
    0 10px 20px rgba(20, 44, 130, 0.08);
}

.portfolio-image-slider {
  width: 100%;
  aspect-ratio: 1 / 1;
  position: relative;
  overflow: hidden;
}

.slide-img,
.portfolio-img {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  object-fit: contain; /* Changed from cover to contain to stop all cropping */
  transition: transform 0.7s cubic-bezier(0.25, 1, 0.5, 1);
}

.slide-img {
  opacity: 0;
  transition:
    opacity 1s ease-in-out,
    transform 0.8s cubic-bezier(0.25, 1, 0.5, 1);
  transform: scale(1.05);
}

.slide-img.active {
  opacity: 1;
  transform: scale(1);
}

.portfolio-card:hover .slide-img.active,
.portfolio-item:hover .portfolio-img {
  transform: scale(1.1);
}

.portfolio-content {
  padding: 1.5rem;
  background: #ffffff;
  border-top: 1px solid var(--color-border);
  flex-grow: 1;
}

.portfolio-overlay {
  position: absolute;
  bottom: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: linear-gradient(
    to top,
    rgba(20, 44, 130, 0.95) 0%,
    rgba(229, 0, 90, 0.8) 50%,
    transparent 100%
  );
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  padding: 2.5rem 2rem;
  opacity: 0;
  transform: translateY(20px);
  transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
  color: #ffffff;
}

.portfolio-overlay h2,
.portfolio-overlay h3,
.portfolio-overlay h4,
.portfolio-overlay p,
.portfolio-overlay span {
  color: #ffffff;
}

.portfolio-item:hover .portfolio-overlay {
  opacity: 1;
  transform: translateY(0);
}

.portfolio-info {
  color: #ffffff;
}
.portfolio-category {
  font-size: 0.85rem;
  color: var(--color-brand-pink);
  text-transform: uppercase;
  letter-spacing: 0.1em;
  font-weight: 700;
  margin-bottom: 0.5rem;
  display: block;
}

.portfolio-client {
  font-size: 0.85rem;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  font-weight: 700;
  opacity: 0.8;
  display: block;
  margin-bottom: 0.5rem;
  transform: translateY(10px);
  transition: transform 0.5s ease 0.1s;
}

.portfolio-title {
  font-size: 1.8rem;
  font-family: var(--font-display);
  margin: 0;
  transform: translateY(10px);
  transition: transform 0.5s ease 0.15s;
}

.portfolio-item:hover .portfolio-client,
.portfolio-item:hover .portfolio-title {
  transform: translateY(0);
}

.portfolio-arrow {
  color: #ffffff;
  background: rgba(255, 255, 255, 0.2);
  backdrop-filter: blur(5px);
  width: 50px;
  height: 50px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  transform: translateX(-10px) rotate(-45deg);
  opacity: 0;
  transition: all 0.4s ease 0.2s;
}

.portfolio-item:hover .portfolio-arrow {
  transform: translateX(0) rotate(0);
  opacity: 1;
}

/* ==========================================================================
   9. CLIENTS MARQUEE
   ========================================================================== */
.marquee-fade-wrapper {
  position: relative;
  overflow: hidden;
  width: 100%;
  padding: 1rem 0;
  -webkit-mask-image: linear-gradient(
    to right,
    transparent,
    black 10%,
    black 90%,
    transparent
  );
  mask-image: linear-gradient(
    to right,
    transparent,
    black 10%,
    black 90%,
    transparent
  );
}

.client-marquee-track {
  display: flex;
  gap: 1.5rem;
  width: max-content;
}

.track-left {
  animation: scrollLeft 35s linear infinite;
}
.track-right {
  animation: scrollRight 35s linear infinite;
}

.client-marquee-track:hover {
  animation-play-state: paused;
}

.client-logo-card {
  width: 170px;
  height: 170px;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1rem;
  transform: translateY(var(--y-offset, 0px));
  animation: clientWave 6s ease-in-out infinite;
}

.client-logo-card:nth-child(2n) {
  animation-delay: -1.5s;
}
.client-logo-card:nth-child(3n) {
  animation-delay: -3s;
}
.client-logo-card:nth-child(4n) {
  animation-delay: -4.5s;
}

@keyframes clientWave {
  0%, 100% {
    transform: translateY(var(--y-offset, 0px));
  }
  50% {
    transform: translateY(calc(var(--y-offset, 0px) - 15px));
  }
}

.client-logo-card img {
  max-width: 100%;
  max-height: 100%;
  object-fit: contain;
}

/* ==========================================================================
   9b. TESTIMONIALS SECTION
   ========================================================================== */
.testimonials-container {
  margin-top: 6rem;
  border-top: 1px solid var(--color-border);
  padding-top: 5rem;
}

.testimonials-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 2.5rem;
}

.testimonial-card {
  background: #ffffff;
  padding: 2.5rem;
  border-radius: 1.5rem;
  border: 1px solid rgba(20, 44, 130, 0.15);
  box-shadow: 0 10px 30px rgba(20, 44, 130, 0.04);
  transition:
    transform 0.4s ease,
    border-color 0.4s ease,
    box-shadow 0.4s ease;
  cursor: pointer;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  text-decoration: none;
  color: inherit;
}

.testimonial-card:hover {
  transform: translateY(-8px) scale(1.02);
  border-color: var(--color-brand-pink);
  box-shadow:
    0 25px 50px rgba(229, 0, 90, 0.15),
    0 10px 20px rgba(20, 44, 130, 0.08);
}

.testimonial-stars {
  display: flex;
  align-items: center;
  gap: 0.25rem;
  margin-bottom: 1.5rem;
}

.star-icon {
  flex-shrink: 0;
}

.testimonial-rating-text {
  font-size: 0.85rem;
  font-weight: 700;
  color: var(--color-muted);
  margin-left: 0.5rem;
  font-family: var(--font-sans);
}

.google-review-link {
  margin-left: auto;
  display: flex;
  align-items: center;
  gap: 0.35rem;
  text-decoration: none;
  padding: 0.35rem 0.75rem;
  background: rgba(66, 133, 244, 0.05);
  border-radius: 20px;
  border: 1px solid rgba(66, 133, 244, 0.15);
  transition: all 0.3s ease;
}

.google-review-link:hover {
  background: rgba(66, 133, 244, 0.1);
  border-color: rgba(66, 133, 244, 0.3);
  transform: translateY(-2px);
}

.google-review-link span {
  font-size: 0.75rem;
  font-weight: 700;
  color: #4285F4;
  letter-spacing: 0.02em;
}

.testimonial-text {
  font-family: var(--font-sans);
  font-size: 1.05rem;
  line-height: 1.6;
  color: var(--color-text);
  margin: 0 0 2rem 0;
  font-style: italic;
  flex-grow: 1;
}

.testimonial-user {
  display: flex;
  align-items: center;
  gap: 1rem;
}

.testimonial-avatar {
  width: 54px;
  height: 54px;
  border-radius: 50%;
  object-fit: cover;
  border: 2px solid var(--color-brand-pink);
  box-shadow: 0 5px 15px rgba(229, 0, 90, 0.1);
  transition: transform 0.4s ease;
}

.testimonial-card:hover .testimonial-avatar {
  transform: scale(1.08);
}

.testimonial-info {
  display: flex;
  flex-direction: column;
}

.testimonial-name {
  font-family: var(--font-display);
  font-size: 1.15rem;
  font-weight: 700;
  margin: 0 0 0.25rem 0;
  color: var(--color-text);
}

.testimonial-role {
  font-size: 0.8rem;
  color: var(--color-muted);
  font-weight: 500;
}

@media (max-width: 1024px) {
  .testimonials-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 768px) {
  .testimonials-container {
    margin-top: 4rem !important;
    padding-top: 3rem !important;
  }
  .testimonials-grid {
    grid-template-columns: 1fr !important;
    gap: 1.5rem !important;
  }
  .testimonial-card {
    padding: 1.8rem !important;
  }
}

/* ==========================================================================
   10. TEAM SECTION
   ========================================================================== */
.team-hierarchy {
  display: flex;
  flex-direction: column;
  gap: 5rem;
  align-items: center;
  margin-top: 4rem;
}

.team-row {
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: 2rem;
  width: 100%;
}

.team-card {
  background: #ffffff;
  padding: 0 1.5rem 2.5rem 1.5rem;
  border-radius: 1.5rem;
  border: 1px solid rgba(20, 44, 130, 0.15);
  box-shadow: 0 10px 30px rgba(20, 44, 130, 0.04);
  text-align: center;
  width: 100%;
  max-width: 250px;
  flex: 0 0 auto;
  position: relative;
  transition:
    transform 0.4s ease,
    border-color 0.4s ease,
    box-shadow 0.4s ease;
  cursor: pointer;
}

.team-image-wrapper {
  width: 150px;
  height: 150px;
  flex-shrink: 0;
  margin: -50px auto 1.5rem auto;
  background: linear-gradient(
    135deg,
    var(--color-accent-1),
    var(--color-accent-2)
  );
  border-radius: 50%;
  padding: 5px;
  box-shadow: 0 15px 30px rgba(229, 0, 90, 0.15);
  transition: transform 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.team-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center 20%;
  border-radius: 50%;
  border: 4px solid #ffffff;
}

.team-card:hover {
  transform: translateY(-5px);
  border-color: var(--color-brand-pink);
  box-shadow:
    0 20px 40px rgba(229, 0, 90, 0.12),
    0 8px 15px rgba(20, 44, 130, 0.05);
}

.team-card:hover .team-image-wrapper {
  transform: translateY(-10px) scale(1.08);
}

.team-name {
  font-family: var(--font-display);
  font-size: 1.4rem;
  margin-bottom: 0.25rem;
  color: var(--color-text);
}

.team-role {
  font-size: 0.85rem;
  color: var(--color-brand-pink);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  font-weight: 700;
  margin: 0;
}

/* ==========================================================================
   11. FOOTER SECTION
   ========================================================================== */
.footer {
  background-color: transparent;
  padding: 8rem 0 3rem;
  position: relative;
  overflow: hidden;
}

.footer::before {
  content: "";
  position: absolute;
  bottom: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 80%;
  height: 300px;
  background: radial-gradient(
    ellipse at bottom,
    rgba(229, 0, 90, 0.15),
    transparent 70%
  );
  pointer-events: none;
  z-index: 0;
}

.footer .container {
  position: relative;
  z-index: 1;
  display: flex;
  flex-direction: column;
}

.footer-cta {
  text-align: center;
  margin-bottom: 5rem;
}

.footer-title {
  font-family: var(--font-display);
  font-size: clamp(3rem, 6vw, 6rem);
  line-height: 1.1;
  margin-bottom: 2.5rem;
  color: var(--color-text);
  letter-spacing: -0.02em;
}

.footer-divider {
  width: 100%;
  height: 1px;
  background: var(--color-border);
  margin-bottom: 2rem;
}

.footer-bottom {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1.5rem;
}

@media (min-width: 768px) {
  .footer-bottom {
    flex-direction: row;
    justify-content: space-between;
  }
}

.footer-copyright {
  color: var(--color-muted);
  font-size: 1rem;
  margin: 0;
}

.footer-socials {
  display: flex;
  gap: 2.5rem;
}
.footer-socials a {
  color: var(--color-text);
  font-size: 0.9rem;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  transition:
    color 0.3s ease,
    transform 0.3s ease;
}

.footer-socials a:hover {
  color: var(--color-accent-1);
  transform: translateY(-3px);
}

/* ==========================================================================
   12. MODALS
   ========================================================================== */
.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(15, 23, 42, 0.4);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  z-index: 1000;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  visibility: hidden;
  transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

.modal-overlay.is-open {
  opacity: 1;
  visibility: visible;
}

.modal-box {
  background: #ffffff;
  width: 90%;
  max-width: 480px;
  padding: 3rem;
  border-radius: 2rem;
  border: 1px solid rgba(20, 44, 130, 0.15);
  box-shadow: 0 25px 50px rgba(20, 44, 130, 0.2);
  position: relative;
  transform: scale(0.95) translateY(20px);
  transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
  opacity: 0;
}

.modal-overlay.is-open .modal-box {
  transform: scale(1) translateY(0);
  opacity: 1;
}

.modal-close {
  position: absolute;
  top: 1.5rem;
  right: 1.5rem;
  background: transparent;
  border: none;
  font-size: 2rem;
  color: var(--color-muted);
  cursor: pointer;
  transition:
    color 0.3s ease,
    transform 0.3s ease;
  line-height: 1;
}

.modal-close:hover {
  color: var(--color-brand-pink);
  transform: rotate(90deg);
}

.modal-title {
  font-family: var(--font-display);
  font-size: 2.2rem;
  margin: 0 0 0.5rem 0;
  color: var(--color-text);
}

.modal-subtitle {
  color: var(--color-muted);
  font-size: 0.95rem;
  margin-bottom: 2.5rem;
}

/* ==========================================================================
   13. GLOBAL ANIMATIONS & SCROLL REVEAL
   ========================================================================== */
.typing-cursor::after {
  content: "|";
  animation: blink 1s step-start infinite;
  color: var(--color-brand-pink);
  margin-left: 4px;
}

@keyframes blink {
  50% {
    opacity: 0;
  }
}

@keyframes led-glow {
  0% {
    background-position: 0% 0%;
  }
  100% {
    background-position: 200% 0%;
  }
}

/* Bubble Background Animation */
.bubble-container {
  position: absolute;
  inset: 0;
  overflow: hidden;
  pointer-events: none;
  z-index: 0;
}

.bubble {
  position: absolute;
  bottom: -60px;
  background: radial-gradient(circle at 30% 30%, rgba(229, 0, 90, 0.12), rgba(20, 44, 130, 0.04));
  border-radius: 50%;
  border: 1px solid rgba(255, 255, 255, 0.25);
  box-shadow: inset 0 2px 4px rgba(255, 255, 255, 0.3), 0 4px 12px rgba(20, 44, 130, 0.03);
  animation: rise 12s linear infinite;
  will-change: transform, opacity;
}

.bubble:nth-child(1) { left: 8%; width: 45px; height: 45px; animation-duration: 9s; animation-delay: 0s; }
.bubble:nth-child(2) { left: 22%; width: 25px; height: 25px; animation-duration: 13s; animation-delay: 2s; }
.bubble:nth-child(3) { left: 38%; width: 55px; height: 55px; animation-duration: 16s; animation-delay: 0.5s; }
.bubble:nth-child(4) { left: 52%; width: 35px; height: 35px; animation-duration: 11s; animation-delay: 3.5s; }
.bubble:nth-child(5) { left: 68%; width: 50px; height: 50px; animation-duration: 14s; animation-delay: 1s; }
.bubble:nth-child(6) { left: 82%; width: 30px; height: 30px; animation-duration: 10s; animation-delay: 5s; }
.bubble:nth-child(7) { left: 93%; width: 40px; height: 40px; animation-duration: 12s; animation-delay: 2.5s; }
.bubble:nth-child(8) { left: 14%; width: 20px; height: 20px; animation-duration: 8s; animation-delay: 6s; }
.bubble:nth-child(9) { left: 29%; width: 42px; height: 42px; animation-duration: 15s; animation-delay: 4.5s; }
.bubble:nth-child(10) { left: 45%; width: 28px; height: 28px; animation-duration: 10.5s; animation-delay: 1.5s; }
.bubble:nth-child(11) { left: 59%; width: 48px; height: 48px; animation-duration: 13.5s; animation-delay: 7s; }
.bubble:nth-child(12) { left: 74%; width: 22px; height: 22px; animation-duration: 9.5s; animation-delay: 3s; }
.bubble:nth-child(13) { left: 88%; width: 38px; height: 38px; animation-duration: 12.5s; animation-delay: 5.5s; }
.bubble:nth-child(14) { left: 3%; width: 32px; height: 32px; animation-duration: 11.5s; animation-delay: 8s; }
.bubble:nth-child(15) { left: 63%; width: 26px; height: 26px; animation-duration: 14.5s; animation-delay: 2.2s; }

@keyframes rise {
  0% {
    transform: translateY(0) scale(0.6) rotate(0deg);
    opacity: 0;
  }
  10% {
    opacity: 0.7;
  }
  90% {
    opacity: 0.7;
  }
  100% {
    transform: translateY(-110vh) scale(1.2) rotate(360deg);
    opacity: 0;
  }
}

@keyframes slideServices {
  0% {
    transform: translateX(0);
  }
  100% {
    transform: translateX(calc(-50% - 1rem));
  }
}

@keyframes scrollLeft {
  0% {
    transform: translateX(0);
  }
  100% {
    transform: translateX(calc(-50% - 0.75rem));
  }
}

@keyframes scrollRight {
  0% {
    transform: translateX(calc(-50% - 0.75rem));
  }
  100% {
    transform: translateX(0);
  }
}

[data-reveal] {
  opacity: 0;
  transform: translateY(40px);
  transition:
    opacity 0.8s cubic-bezier(0.175, 0.885, 0.32, 1.275),
    transform 0.8s cubic-bezier(0.175, 0.885, 0.32, 1.275);
  will-change: opacity, transform;
}

[data-reveal="zoom-up"] {
  transform: translateY(60px) scale(0.9);
}
[data-reveal="left"] {
  transform: translateX(-80px);
}
[data-reveal="right"] {
  transform: translateX(80px);
}

[data-reveal].is-visible {
  opacity: 1;
  transform: translate(0, 0) scale(1);
}

/* ==========================================================================
   MOBILE RESPONSIVENESS (MAX-WIDTH: 768px)
   ========================================================================== */
/* Display utility classes */
.mobile-only {
  display: none !important;
}
.mobile-only-cta {
  display: none !important;
}

@media (max-width: 768px) {
  /* Global Spacing Reductions */
  .section {
    padding: 2.5rem 0 !important;
  }
  .section-header {
    margin-bottom: 2rem !important;
  }
  .hero {
    height: auto !important;
    min-height: 70vh !important;
    padding: 7rem 0 3rem 0 !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
  }

  /* 1. Navbar & Hamburger Rules */
  .desktop-only {
    display: none !important;
  }
  .mobile-only {
    display: flex !important;
  }

  .navbar {
    top: 1rem;
    width: 95%;
    padding: 0.8rem 1rem;
  }
  .brand-logo-img {
    height: 32px !important;
  }

  .hamburger-toggle {
    flex-direction: column;
    gap: 6px;
    background: none;
    border: none;
    cursor: pointer;
    z-index: 1001;
    padding: 5px;
  }
  .hamburger-toggle span {
    width: 30px;
    height: 3px;
    background: var(--color-brand-purple);
    border-radius: 99px;
    transition: 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
  }
  .hamburger-toggle.is-active span:nth-child(1) {
    transform: translateY(9px) rotate(45deg);
  }
  .hamburger-toggle.is-active span:nth-child(2) {
    opacity: 0;
  }
  .hamburger-toggle.is-active span:nth-child(3) {
    transform: translateY(-9px) rotate(-45deg);
  }

  /* Off-Canvas Slide Menu */
  .nav-links {
    position: fixed;
    top: 0;
    right: -100%;
    width: 80%;
    height: 100vh;
    background: rgba(255, 255, 255, 0.98);
    backdrop-filter: blur(20px);
    display: flex !important;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    gap: 2rem !important;
    transition: 0.5s cubic-bezier(0.77, 0, 0.175, 1);
    box-shadow: -15px 0 30px rgba(0, 0, 0, 0.1);
    z-index: 1000;
  }
  .nav-links.is-active {
    right: 0;
  }
  .mobile-only-cta {
    display: block !important;
    width: 80%;
    margin-top: 1rem;
  }

  /* 2. Typography & Buttons */
  .hero-title {
    font-size: 3rem !important;
  }
  .section-title {
    font-size: 2.3rem !important;
    line-height: 1.2;
  }
  .footer-title {
    font-size: 2.8rem !important;
  }
  .section-subtitle {
    padding: 0 1rem;
    font-size: 1rem;
  }
  .btn-primary {
    width: 100%;
    text-align: center;
  }

  /* 3. Expertise Section (Auto Scrolling Marquee) */
  .services-slider-wrapper {
    padding: 1rem 0 2rem 0;
  }

  .services-track {
    display: flex !important;
    width: max-content !important;
    gap: 1.5rem !important;
    animation: slideServices 30s linear infinite !important;
  }

  .service-card {
    width: 260px !important;
    max-width: 260px !important;
    flex-shrink: 0 !important;
    transform: none !important;
  }

  .service-card:hover {
    transform: none !important;
    border-color: rgba(20, 44, 130, 0.15) !important;
    box-shadow: 0 10px 30px rgba(20, 44, 130, 0.04) !important;
  }

  .service-img-wrapper {
    height: 180px !important;
    padding: 0.2rem !important;
  }

  .service-content {
    padding: 0.8rem 1rem 1.2rem 1rem !important;
    min-height: 120px !important;
  }

  /* 4. Clients Section (Restore 2-Line Infinite Marquee) */
  .marquee-fade-wrapper {
    padding: 1.5rem 0 !important;
  }

  .client-logo-card {
    width: 120px !important;
    height: 120px !important;
    padding: 0.5rem !important;
  }

  /* 5. Global Buttons & Footer Fixes */
  .btn-primary {
    width: 85% !important;
    max-width: 300px !important; /* Prevents the button from becoming a massive block */
    margin: 0 auto !important; /* Centers the button perfectly */
    display: block !important;
  }

  .footer {
    padding-top: 4rem;
    padding-bottom: 2.5rem !important; /* Removed the massive extra bottom gap! */
    overflow: visible !important;
  }

  .footer-cta {
    margin-bottom: 3.5rem !important; /* Tightens the space between the button and the copyright text */
  }

  .footer-cta .btn-primary {
    font-size: 1rem !important; /* Scales down the inline font-size */
    padding: 0.9rem 2rem !important; /* Shrinks the inline padding for mobile */
  }

  .footer-bottom {
    flex-direction: column !important;
    text-align: center;
    gap: 1.5rem !important;
  }

  .footer-socials {
    flex-direction: column;
    gap: 1rem !important;
  }
  /* 6. Our Work Section (Mobile Refinements) */
  .portfolio-grid {
    gap: 2rem !important;
  }

  .portfolio-card {
    width: 100% !important;
    max-width: 350px !important;
    height: auto !important;
    margin: 0 auto !important;
    display: flex !important;
    flex-direction: column !important;
  }

  .portfolio-image-slider {
    width: 100%;
    aspect-ratio: 4 / 3; /* Changed from 1/1 to a wider, standard landscape rectangle */
    position: relative;
    overflow: hidden;
    background: #0b1120; /* Added a dark premium background */
  }

  .portfolio-content {
    padding: 1.2rem 1.5rem !important;
    flex-grow: 1 !important;
    display: flex !important;
    flex-direction: column !important;
    justify-content: center !important; /* perfectly centers the text vertically */
  }

  .portfolio-title {
    font-size: 1.5rem !important;
    margin-top: 0.2rem !important;
    line-height: 1.2 !important;
  }

  /* 7. Team Section Overlap Fix */
  .team-hierarchy {
    margin-top: 5rem !important; /* Pushes the Founder card further down from the header text */
    gap: 4.5rem !important; /* Adds massive space between the Founder, Leadership, and Core rows */
  }

  .team-row {
    gap: 4.5rem !important; /* Adds massive space between stacked cards inside the same row */
  }

  /* 8. Portfolio Page (Mobile Refinements) */
  .portfolio-item {
    height: 280px !important;
  }

  .portfolio-grid.filterable {
    grid-template-columns: repeat(auto-fill, minmax(min(100%, 280px), 1fr)) !important;
    gap: 1.5rem !important;
  }

  .portfolio-overlay {
    padding: 1.5rem 1.2rem !important;
  }

  .portfolio-filters {
    gap: 0.5rem !important;
    margin-bottom: 2rem !important;
  }

  .filter-btn {
    padding: 0.5rem 1.2rem !important;
    font-size: 0.85rem !important;
  }
}
