@import url('https://fonts.googleapis.com/css2?family=Outfit:wght@300;400;500;600;700;800&family=Inter:wght@400;500;600;700&display=swap');

:root {
  /* Clean Light Mode Corporate Palette */
  --bg-primary: #FFFFFF;
  /* Pure white */
  --bg-secondary: #F8F9FA;
  /* Soft off-white */
  --bg-dark: #FFFFFF;
  /* Main background */
  --text-primary: #0A2540;
  /* Deep corporate navy */
  --text-secondary: #1E293B;
  /* Professional dark slate */
  --text-light: #FFFFFF;
  /* Text on dark buttons */
  --accent: #0066FF;
  /* Bright corporate blue */
  --accent-light: rgba(0, 102, 255, 0.1);
  --accent-hover: #0052CC;
  --accent-vibrant: #FF5A5F;
  /* Vibrant geometric accent (orange/red) */
  --accent-cyan: #00C9B1;
  /* Vibrant secondary geometric accent */
  --border: #E2E8F0;
  /* Clean, subtle gray border */
  --border-highlight: #CBD5E1;

  /* Clean Shadows for Elevation */
  --shadow-sm: 0 1px 2px 0 rgba(10, 37, 64, 0.05);
  --shadow-md: 0 4px 6px -1px rgba(10, 37, 64, 0.1), 0 2px 4px -2px rgba(10, 37, 64, 0.05);
  --shadow-lg: 0 10px 15px -3px rgba(10, 37, 64, 0.1), 0 4px 6px -2px rgba(10, 37, 64, 0.05);
  --shadow-xl: 0 20px 25px -5px rgba(10, 37, 64, 0.1), 0 10px 10px -5px rgba(10, 37, 64, 0.04);

  --radius-md: 0.5rem;
  --radius-lg: 0.75rem;
  --radius-xl: 1rem;

  --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

/* =========================================
   Global Reset & Base
   ========================================= */
html {
  scroll-padding-top: 100px;
}

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
  scroll-behavior: smooth;
}

body {
  font-family: 'Inter', sans-serif;
  background-color: var(--bg-primary);
  /* Option A: Premium subtle dot-grid pattern */
  background-image: radial-gradient(rgba(10, 37, 64, 0.06) 1px, transparent 1px);
  background-size: 32px 32px;
  background-position: 0 0;
  color: var(--text-primary);
  line-height: 1.6;
  font-size: 16px;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
}

/* =========================================
   Typography
   ========================================= */
h1,
h2,
h3,
h4,
h5,
h6 {
  font-family: 'Outfit', sans-serif;
  font-weight: 800;
  /* Bolder for corporate look */
  line-height: 1.1;
  color: var(--text-primary);
  letter-spacing: -0.03em;
}

h1 {
  font-size: 3.5rem;
  margin-bottom: 1.25rem;
  text-transform: uppercase;
}

h2 {
  font-size: 2.25rem;
  margin-bottom: 1.25rem;
}

h3 {
  font-size: 1.25rem;
  margin-bottom: 0.5rem;
}

p {
  font-size: 1rem;
  color: var(--text-secondary);
  margin-bottom: 1.25rem;
}

a {
  color: var(--accent);
  text-decoration: none;
  transition: var(--transition);
}

@media (min-width: 993px) {
  a:hover {
    color: var(--accent-hover);
  }
}

/* TV & Ultra-wide Typography Scaling */
@media (min-width: 1600px) {
  h1 {
    font-size: 5rem;
  }

  h2 {
    font-size: 3.5rem;
  }

  h3 {
    font-size: 1.5rem;
  }

  p {
    font-size: 1.2rem;
  }
}

.text-center {
  text-align: center;
}

/* =========================================
   Layout & Containers
   ========================================= */
.container {
  width: 90%;
  max-width: 2000px;
  margin: 0 auto;
}

.section-padded {
  padding: 4rem 0;
}

/* Replaces glass panel for agency side */
.solid-panel {
  background: #FFFFFF;
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 3rem;
  box-shadow: var(--shadow-sm);
  position: relative;
  overflow: hidden;
  transition: var(--transition);
}

@media (min-width: 993px) {
  .solid-panel:hover {
    box-shadow: var(--shadow-lg);
    transform: translateY(-4px);
  }
}

.section-title {
  margin-bottom: 2rem;
  font-size: 2.25rem;
  font-weight: 800;
  text-transform: uppercase;
}

/* =========================================
   Navigation
   ========================================= */
header {
  position: fixed;
  top: 0;
  width: 100%;
  background: rgba(255, 255, 255, 0.95);
  backdrop-filter: blur(8px);
  z-index: 2000;
  border-bottom: 1px solid var(--border);
}

.nav-container {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 1rem 2rem;
  max-width: 100%;
  margin: 0 auto;
}

.nav-links-desktop {
  display: none;
}

@media (min-width: 1024px) {
  .nav-links-desktop {
    display: flex;
    gap: 2.5rem;
    align-items: center;
  }

  .nav-links-desktop a {
    font-family: 'Outfit', sans-serif;
    font-weight: 600;
    color: var(--text-primary);
    text-transform: uppercase;
    font-size: 0.9rem;
    letter-spacing: 0.5px;
  }

  @media (min-width: 993px) {
    .nav-links-desktop a:hover {
      color: var(--accent);
    }
  }

  .hamburger-menu {
    display: none !important;
  }
}

.hamburger-menu {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  width: 32px;
  height: 22px;
  cursor: pointer;
  z-index: 1001;
  flex-shrink: 0;
}

.hamburger-menu .bar {
  height: 2px;
  width: 100%;
  background-color: var(--text-primary);
  border-radius: 2px;
  transition: all 0.3s ease;
}

.hamburger-menu.active .bar:nth-child(1) {
  transform: translateY(10px) rotate(45deg);
}

.hamburger-menu.active .bar:nth-child(2) {
  opacity: 0;
}

.hamburger-menu.active .bar:nth-child(3) {
  transform: translateY(-10px) rotate(-45deg);
}

.side-nav {
  position: fixed;
  top: 0;
  right: 0;
  transform: translateX(100%);
  width: 320px;
  max-width: 80vw;
  height: 100vh;
  background-color: var(--bg-primary);
  border-left: 1px solid var(--border);
  box-shadow: var(--shadow-xl);
  z-index: 1000;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  transition: transform 0.4s ease;
}

.side-nav.active {
  transform: translateX(0);
}

.side-nav-links {
  display: flex;
  flex-direction: column;
  gap: 2rem;
  text-align: center;
}

.side-nav-links a {
  font-family: 'Outfit', sans-serif;
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--text-primary);
  text-transform: uppercase;
}

@media (min-width: 993px) {
  .side-nav-links a:hover {
    color: var(--accent);
  }
}

.nav-backdrop {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  background-color: rgba(10, 37, 64, 0.4);
  z-index: 999;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s ease;
}

.nav-backdrop.active {
  opacity: 1;
  pointer-events: all;
}

.logo-primary {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-family: 'Outfit', sans-serif;
  font-weight: 800;
  font-size: 1.5rem;
  color: var(--text-primary);
  text-transform: uppercase;
  letter-spacing: -1px;
}

.logo-icon {
  width: 32px;
  height: 32px;
  background: var(--accent);
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
  font-size: 1.2rem;
}

/* =========================================
   Hero Section
   ========================================= */
.hero {
  min-height: 60vh;
  display: flex;
  align-items: center;
  padding-top: 6rem;
  padding-bottom: 4rem;
  background-color: var(--bg-primary);
  position: relative;
  overflow: hidden;
}

.hero-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 4rem;
  align-items: center;
}

@media (max-width: 992px) {
  .hero {
    min-height: auto;
    padding-top: 5rem;
    padding-bottom: 2rem;
  }

  .hero-grid {
    grid-template-columns: 1fr;
    gap: 0;
    text-align: center;
    align-items: center;
    position: relative;
    padding: 2rem 0;
  }

  .hero-graphic {
    grid-row: 1;
    grid-column: 1;
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    margin: 0;
    z-index: 1;
    display: flex;
    justify-content: center;
    align-items: center;
    overflow: hidden;
  }

  .hero-graphic-inner {
    width: 500px;
    height: 500px;
    transform: scale(0.9);
    flex-shrink: 0;
  }
}

.hero-text {
  max-width: 600px;
}

.hero-title {
  font-size: clamp(3rem, 6vw, 5rem);
  letter-spacing: -2px;
  line-height: 1.05;
  color: var(--text-primary);
}

.hero-subtitle {
  font-size: 1.25rem;
  color: var(--text-secondary);
  margin: 1.5rem 0 2.5rem 0;
  font-weight: 400;
}

.hero-buttons {
  display: flex;
  gap: 1rem;
  flex-wrap: wrap;
}

@media (max-width: 992px) {
  .hero-buttons {
    justify-content: center;
  }

  .hero-text {
    margin: 0 auto;
    grid-row: 1;
    grid-column: 1;
    position: relative;
    z-index: 5;
    background: rgba(255, 255, 255, 0.35);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    padding: 2rem 1.5rem;
    border-radius: 1rem;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.4);
    max-width: 95%;
  }

  .hero-title {
    font-size: clamp(2rem, 5vw, 2.5rem);
  }

  .hero-subtitle {
    font-size: 1rem;
    margin: 0.5rem 0 1rem 0;
  }

  .hero-btn-primary {
    padding: 0.6rem 1.5rem;
    font-size: 0.8rem;
    white-space: nowrap;
  }

  /* Nudge shapes on mobile */
  .shape-1 {
    transform: translate(65px, -30px);
  }

  .shape-2 {
    transform: translate(-40px, 20px);
  }
}

@media (max-width: 768px) {
  .hero-graphic-inner {
    transform: scale(0.85);
  }
}

@media (max-width: 480px) {
  .hero-graphic-inner {
    transform: scale(0.75);
  }
}

/* Abstract Graphic for Hero */
.hero-graphic {
  position: relative;
  height: 500px;
  width: 100%;
}

.hero-graphic-inner {
  position: relative;
  width: 100%;
  height: 100%;
}

.shape-1 {
  position: absolute;
  top: calc(10% - 5px);
  right: calc(10% + 20px);
  width: 300px;
  height: 300px;
  background-color: var(--accent);
  border-radius: 50%;
  mix-blend-mode: multiply;
}

.shape-2 {
  position: absolute;
  bottom: 10%;
  left: 10%;
  width: 250px;
  height: 250px;
  background-color: var(--accent-vibrant);
  border-radius: 30px 100px 30px 100px;
  mix-blend-mode: multiply;
}

.shape-3 {
  position: absolute;
  top: 40%;
  left: 30%;
  width: 150px;
  height: 150px;
  background-color: var(--accent-cyan);
  border-radius: 20px;
  transform: rotate(45deg);
  mix-blend-mode: multiply;
}

/* =========================================
   Buttons
   ========================================= */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background-color: var(--text-primary);
  color: var(--text-light) !important;
  padding: 0.85rem 2rem;
  min-height: 44px;
  border-radius: 4px;
  font-weight: 600;
  font-family: 'Outfit', sans-serif;
  text-transform: uppercase;
  letter-spacing: 1px;
  border: none;
  cursor: pointer;
  transition: var(--transition);
}

@media (min-width: 993px) {
  .btn:hover {
    background-color: var(--accent);
    transform: translateY(-2px);
  }
}

.btn-outline {
  background-color: transparent;
  color: var(--text-primary) !important;
  border: 2px solid var(--text-primary);
}

@media (min-width: 993px) {
  .btn-outline:hover {
    background-color: var(--text-primary);
    color: var(--text-light) !important;
  }
}

.hero-btn-primary {
  padding: 1.1rem 2.5rem;
  font-size: 1rem;
  background-color: var(--accent);
}

@media (min-width: 993px) {
  .hero-btn-primary:hover {
    background-color: var(--text-primary);
  }
}

/* =========================================
   Services Grid
   ========================================= */
.services-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 2rem;
}

.service-card {
  padding: 2.5rem;
  background: var(--bg-primary);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  transition: var(--transition);
  position: relative;
  overflow: hidden;
}

@media (min-width: 993px) {
  .service-card:hover {
    box-shadow: var(--shadow-lg);
    border-color: var(--accent);
  }
}

.service-card h3 {
  font-size: 1.5rem;
  margin-bottom: 1rem;
  text-transform: uppercase;
}

.service-card p {
  color: var(--text-secondary);
  font-size: 1rem;
  line-height: 1.6;
}

.service-icon {
  font-size: 2.5rem;
  color: var(--accent);
  margin-bottom: 1.5rem;
}

/* =========================================
   Projects Grid
   ========================================= */
.projects-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
  gap: 3rem;
}

.project-card {
  background: var(--bg-primary);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  overflow: hidden;
  transition: var(--transition);
  display: flex;
  flex-direction: column;
}

@media (min-width: 993px) {
  .project-card:hover {
    box-shadow: var(--shadow-xl);
    transform: translateY(-8px);
  }
}

.project-image {
  width: 100%;
  height: 380px;
  object-fit: cover;
  border-bottom: 1px solid var(--border);
}

.project-content {
  padding: 2rem;
  flex: 1;
  display: flex;
  flex-direction: column;
}

.project-content h3 {
  font-size: 1.4rem;
  text-transform: uppercase;
  margin-bottom: 0.5rem;
}

.project-content p {
  font-size: 1rem;
  margin-bottom: 1.5rem;
  flex: 1;
  color: var(--text-secondary);
}

/* =========================================
   Forms & Inputs
   ========================================= */
.form-group {
  margin-bottom: 1.5rem;
}

.form-group label {
  display: block;
  margin-bottom: 0.5rem;
  font-weight: 600;
  color: var(--text-primary);
  font-size: 0.95rem;
}

input[type="text"],
input[type="email"],
input[type="tel"],
select,
textarea {
  width: 100%;
  padding: 1rem;
  background-color: var(--bg-secondary);
  border: 1px solid var(--border);
  border-radius: 4px;
  font-family: inherit;
  font-size: 1rem;
  color: var(--text-primary);
  transition: var(--transition);
}

input:focus,
select:focus,
textarea:focus {
  outline: none;
  border-color: var(--accent);
  background-color: var(--bg-primary);
  box-shadow: 0 0 0 3px var(--accent-light);
}

.form-card {
  max-width: 800px;
  width: 100%;
  margin: 0 auto 1.5rem auto;
  text-align: left;
  background: var(--bg-primary);
  padding: 2.5rem;
  border-radius: var(--radius-lg);
  border: 1px solid var(--border);
  box-shadow: var(--shadow-md);
}

.btn-full {
  width: 100%;
}

/* =========================================
   Modal (Estimate form)
   ========================================= */
.modal-overlay {
  display: none;
  position: fixed;
  z-index: 3000;
  left: 0;
  top: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(10, 37, 64, 0.8);
  backdrop-filter: blur(4px);
  overflow-y: auto;
  padding: 2rem 0;
  opacity: 0;
  transition: opacity 0.3s ease;
}

.modal-overlay.show {
  opacity: 1;
}

.modal-content {
  background-color: var(--bg-primary);
  margin: 0 auto;
  padding: 3rem;
  border-radius: var(--radius-lg);
  max-width: 800px;
  width: 90%;
  position: relative;
  box-shadow: var(--shadow-xl);
  transform: translateY(20px);
  opacity: 0;
  transition: transform 0.4s ease, opacity 0.4s ease;
}

.modal-overlay.show .modal-content {
  transform: translateY(0);
  opacity: 1;
}

.modal-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 2rem;
  border-bottom: 1px solid var(--border);
  padding-bottom: 1rem;
}

.close-btn {
  background: none;
  border: none;
  font-size: 2.5rem;
  line-height: 1;
  color: var(--text-secondary);
  cursor: pointer;
  transition: var(--transition);
}

@media (min-width: 993px) {
  .close-btn:hover {
    color: var(--accent);
  }
}

.form-section {
  margin-bottom: 3rem;
  padding: 2rem;
  background: var(--bg-secondary);
  border-radius: var(--radius-md);
  border: 1px solid var(--border);
}

.form-section h3 {
  margin-top: 0;
  margin-bottom: 1.5rem;
  color: var(--accent);
  font-size: 1.25rem;
  text-transform: uppercase;
}

/* Animations */
.reveal {
  opacity: 0;
  transform: translateY(30px);
  transition: all 0.6s ease;
}

.reveal.active {
  opacity: 1;
  transform: translateY(0);
}

/* Footer */
.site-footer {
  background-color: var(--bg-secondary);
  border-top: 1px solid var(--border);
  padding: 4rem 2rem 2rem;
  margin-top: 4rem;
  color: var(--text-secondary);
}

.footer-container {
  width: 90%;
  max-width: 2000px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: 1fr;
  gap: 3rem;
  text-align: left;
}

@media (min-width: 768px) {
  .footer-container {
    display: flex;
    justify-content: space-between;
    gap: 4rem;
  }
}

.footer-brand h3 {
  font-family: 'Outfit', sans-serif;
  color: var(--text-primary);
  font-size: 1.5rem;
  margin-bottom: 1rem;
}

.footer-brand p {
  line-height: 1.6;
  margin-bottom: 1.5rem;
  max-width: 400px;
}

.footer-links h4 {
  font-family: 'Outfit', sans-serif;
  color: var(--text-primary);
  margin-bottom: 1.5rem;
}

.footer-links ul {
  list-style: none;
}

.footer-links ul li {
  margin-bottom: 0.75rem;
}

.footer-links ul li a {
  color: var(--text-secondary);
  text-decoration: none;
  transition: var(--transition);
}

.footer-links ul li a:hover {
  color: var(--accent);
}

@media (min-width: 768px) {
  .footer-links {
    text-align: right;
  }
}

.footer-bottom {
  width: 90%;
  max-width: 2000px;
  margin: 4rem auto 0;
  padding-top: 2rem;
  border-top: 1px solid var(--border-highlight);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  text-align: center;
}

@media (min-width: 768px) {
  .footer-bottom {
    flex-direction: row;
    text-align: left;
  }
}

.social-links {
  display: flex;
  gap: 1rem;
}

.social-links a {
  color: var(--text-secondary);
  font-size: 1.25rem;
  transition: var(--transition);
}

.social-links a:hover {
  color: var(--accent);
}

/* =========================================
   Reviews Section & Modal
   ========================================= */
.review-card {
  background: white;
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 2.5rem;
  box-shadow: var(--shadow-sm);
  transition: var(--transition);
  text-align: left;
  display: flex;
  flex-direction: column;
}

@media (min-width: 993px) {
  .review-card:hover {
    box-shadow: var(--shadow-md);
    border-color: var(--accent);
  }
}

.review-stars {
  color: #fbbf24;
  /* yellow-400 */
  margin-bottom: 1rem;
  font-size: 1rem;
}

.review-text {
  font-size: 1rem;
  color: var(--text-primary);
  margin-bottom: 2rem;
  font-style: italic;
  flex-grow: 1;
}

.review-author {
  font-family: 'Outfit', sans-serif;
  font-weight: 700;
  color: var(--text-primary);
  font-size: 1.1rem;
}

.review-company {
  color: var(--text-secondary);
  font-size: 0.9rem;
}

#starRatingSelect .fa-star.selected,
@media (min-width: 993px) {

  #starRatingSelect .fa-star:hover,
  #starRatingSelect .fa-star:hover~.fa-star {
    color: #fbbf24;
  }
}

@media (min-width: 993px) {
  #starRatingSelect:hover .fa-star:hover~.fa-star {
    color: #cbd5e1 !important;
    /* Reset siblings when hovering */
  }
}

.carousel-container::-webkit-scrollbar {
  display: none;
}

/* =========================================
   Responsive Typography & Layout 
   ========================================= */
@media (max-width: 768px) {
  h1 {
    font-size: 2.25rem;
  }

  h2 {
    font-size: 1.75rem;
  }

  h3 {
    font-size: 1.15rem;
  }

  .section-title {
    font-size: 1.75rem;
    margin-bottom: 1.5rem;
  }

  .section-padded {
    padding: 3rem 0;
  }

  .two-col-grid,
  .process-steps {
    grid-template-columns: 1fr;
    gap: 1rem;
  }

  .services-grid {
    grid-template-columns: repeat(3, 1fr);
    gap: 0.5rem;
  }

  /* hero-grid is handled by 992px media query */

  /* Mobile Services Grid Buttons */
  .service-card p {
    display: none;
    /* Hidden on mobile grid, shown in lightbox */
  }

  .service-card {
    padding: 1.5rem 0.5rem;
    cursor: pointer;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    text-align: center;
    border-radius: var(--radius-md);
  }

  .service-card .service-icon {
    display: block;
    font-size: 1.5rem;
    color: var(--accent);
    margin-bottom: 0.75rem;
  }

  .service-card h3 {
    margin-bottom: 0;
    font-size: 0.85rem;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    gap: 0.5rem;
  }

  /* Mobile Projects Cards (Titles Only) */
  .project-card .project-image,
  .project-card p,
  .project-card a {
    display: none;
  }

  .project-card {
    cursor: pointer;
  }

  .project-content {
    padding: 1.5rem;
  }

  .project-content h3 {
    margin-bottom: 0;
    display: flex;
    justify-content: space-between;
    align-items: center;
  }

  .project-content h3::after {
    content: '\f105';
    /* fa-angle-right */
    font-family: 'Font Awesome 6 Free';
    font-weight: 900;
    font-size: 1rem;
  }

  .projects-grid {
    gap: 1rem;
  }
}

@keyframes fadeIn {
  from {
    opacity: 0;
    transform: translateY(-5px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* Project Lightbox Styles */
.project-lightbox {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  background: rgba(10, 37, 64, 0.9);
  backdrop-filter: blur(8px);
  z-index: 4000;
  align-items: center;
  justify-content: center;
  opacity: 0;
  transition: opacity 0.3s ease;
}

.project-lightbox.show {
  display: flex;
  opacity: 1;
}

.lightbox-content {
  background: var(--bg-primary);
  width: 90%;
  max-width: 600px;
  border-radius: var(--radius-lg);
  overflow: hidden;
  position: relative;
  transform: translateY(20px);
  transition: transform 0.4s ease;
}

.project-lightbox.show .lightbox-content {
  transform: translateY(0);
}

.lightbox-close {
  position: absolute;
  top: 1rem;
  right: 1rem;
  background: rgba(0, 0, 0, 0.5);
  color: white;
  border: none;
  width: 30px;
  height: 30px;
  border-radius: 50%;
  cursor: pointer;
  z-index: 10;
  display: flex;
  align-items: center;
  justify-content: center;
}

.lightbox-image {
  width: 100%;
  height: 250px;
  object-fit: cover;
}

.lightbox-body {
  padding: 2rem;
}

.lightbox-body h3 {
  font-size: 1.5rem;
  margin-bottom: 1rem;
}

.lightbox-body p {
  color: var(--text-secondary);
  margin-bottom: 1.5rem;
}

/* Mobile Input Zoom Prevention */
@media (max-width: 768px) {

  input[type="text"],
  input[type="email"],
  input[type="tel"],
  select,
  textarea {
    font-size: 16px !important;
  }
}

/* --- Infinite Marquee Carousel --- */
.marquee-container {
  width: 100%;
  overflow: hidden;
  position: relative;
  white-space: nowrap;
}

.marquee-container::before,
.marquee-container::after {
  content: "";
  position: absolute;
  top: 0;
  width: 50px;
  height: 100%;
  z-index: 2;
  pointer-events: none;
}

/* --- Slot Machine Reel Animation --- */
.slot-window {
  width: 100%;
  height: 120px;
  overflow: hidden;
  position: relative;
}

.slot-reel {
  display: flex;
  flex-direction: column;
  height: 200%; /* Contains 2 items */
  width: 100%;
  transform: translateY(-50%); /* Starts by showing the bottom item */
}

.slot-item {
  height: 50%;
  width: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
}

@keyframes slot-spin {
  0% {
    transform: translateY(-50%);
  }
  60% {
    transform: translateY(5%); /* Drop past the target */
  }
  80% {
    transform: translateY(-2%); /* Bounce back up */
  }
  100% {
    transform: translateY(0%); /* Settle on the top item */
  }
}

.spin-animation {
  animation: slot-spin 0.8s cubic-bezier(0.215, 0.61, 0.355, 1) forwards;
}

.marquee-container::before {
  left: 0;
  background: linear-gradient(to right, var(--bg-secondary) 0%, transparent 100%);
}

.marquee-container::after {
  right: 0;
  background: linear-gradient(to left, var(--bg-secondary) 0%, transparent 100%);
}

.marquee-track {
  display: flex;
  width: max-content;
  animation: marquee-scroll 40s linear infinite;
}

/* Pause animation on hover */
.marquee-track:hover {
  animation-play-state: paused;
}

.marquee-group {
  display: flex;
  gap: 2rem;
  padding-right: 2rem;
  /* Important: must match the gap to ensure perfectly equal spacing between groups */
}

.marquee-card {
  display: flex;
  flex-direction: column;
  width: 300px;
  /* Smaller than main project cards */
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: 12px;
  overflow: hidden;
  box-shadow: 0 4px 6px rgba(0, 0, 0, 0.05);
  transition: transform 0.3s ease, box-shadow 0.3s ease;
  white-space: normal;
  /* Override the nowrap from container */
  cursor: pointer;
}

.marquee-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 10px 15px rgba(0, 0, 0, 0.1);
}

.marquee-card img {
  width: 100%;
  height: 160px;
  object-fit: cover;
}

.marquee-card-content {
  padding: 1.5rem;
  display: flex;
  justify-content: center;
  align-items: center;
}

.marquee-card-content h4 {
  font-size: 1.1rem;
  margin: 0;
  color: var(--text-primary);
  text-align: center;
}

@keyframes marquee-scroll {
  0% {
    transform: translateX(0);
  }

  100% {
    transform: translateX(-50%);
  }
}

/* Mobile adjustments */
@media (max-width: 768px) {
  .marquee-card {
    width: 260px;
  }

  .marquee-card img {
    height: 140px;
  }

  .marquee-container::before,
  .marquee-container::after {
    width: 30px;
  }
}

/* =========================================
   Projects Carousel
   ========================================= */
.projects-carousel {
  display: flex !important;
  overflow-x: scroll;
  overflow-y: hidden;
  /* Force hide vertical scrollbar */
  scroll-snap-type: x mandatory;
  -webkit-overflow-scrolling: touch;
  gap: 2rem;
  padding-top: 1rem;
  /* Prevent clipping when cards hover up */
  margin-top: -1rem;
  padding-bottom: 1rem;
}

.projects-carousel::-webkit-scrollbar {
  height: 12px;
  display: block;
  -webkit-appearance: none;
  background-color: transparent;
}

.projects-carousel::-webkit-scrollbar-track {
  background: rgba(0, 0, 0, 0.1);
  border-radius: 10px;
}

.projects-carousel::-webkit-scrollbar-thumb {
  background: var(--text-primary);
  border-radius: 10px;
  border: 2px solid #ffffff;
}

.projects-carousel .project-card {
  flex: 0 0 calc(33.333% - 1.33rem);
  scroll-snap-align: start;
}

@media (max-width: 1024px) {
  .projects-carousel .project-card {
    flex: 0 0 calc(50% - 1rem);
  }
}

@media (max-width: 768px) {
  .projects-carousel {
    flex-direction: column !important;
    overflow-x: hidden !important;
    gap: 1rem !important;
    padding-top: 0 !important;
    padding-bottom: 0 !important;
  }
  
  .projects-carousel .project-card {
    width: 100% !important;
    min-width: 100% !important;
    flex: 0 0 auto;
    box-shadow: none !important;
  }

  .projects-carousel .project-card .project-image,
  .projects-carousel .project-card p,
  .projects-carousel .project-card a {
    display: none !important;
  }

  .projects-carousel .project-card .project-content {
    padding: 1.25rem;
  }

  .projects-carousel .project-card h3 {
    margin-bottom: 0;
    font-size: 1.1rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
  }
  
  .projects-carousel .project-card h3::after {
    content: '\f078' !important; /* FontAwesome angle-down */
  }
}

.carousel-nav-btn {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  background: transparent;
  color: var(--text-primary);
  border: none;
  font-size: 2.5rem;
  font-weight: 300;
  cursor: pointer;
  z-index: 10;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: color 0.2s, transform 0.2s, opacity 0.2s;
  opacity: 0;
  /* Hidden initially, shown by JS */
  pointer-events: none;
  padding: 0 10px;
}

.carousel-nav-btn:hover {
  color: var(--accent);
  transform: translateY(-50%) scale(1.1);
}

.carousel-nav-btn.visible {
  opacity: 1;
  pointer-events: auto;
}

.carousel-nav-btn.prev-btn {
  left: -40px;
}

.carousel-nav-btn.next-btn {
  right: -40px;
}

@media (max-width: 768px) {
  .carousel-nav-btn {
    display: none !important;
    /* Hide arrows on mobile where swipe is natural */
  }
}

/* Horizontal swipe carousel scrollbar */
#projectsCarousel::-webkit-scrollbar {
    -webkit-appearance: none;
    height: 12px;
}
#projectsCarousel::-webkit-scrollbar-track {
    background: transparent;
    border-radius: 6px;
}
#projectsCarousel::-webkit-scrollbar-thumb {
    background-color: var(--text-primary);
    border-radius: 6px;
}
.carousel-nav-btn:hover {
    opacity: 0.7;
}
