/* ==========================================================================
   DESIGN SYSTEM & VARIABLES
   ========================================================================== */
:root {
  /* Colors */
  --color-slate-950: #020617;
  --color-slate-900: #0f172a;
  --color-slate-800: #1e293b;
  --color-slate-700: #334155;
  --color-slate-600: #475569;
  --color-slate-400: #94a3b8;
  --color-slate-200: #e2e8f0;
  --color-slate-100: #f1f5f9;
  --color-slate-50: #f8fafc;
  
  /* Category Colors */
  --color-construccion: #ea580c;      /* Orange */
  --color-construccion-light: #fff7ed;
  --color-mantenimiento: #0284c7;     /* Sky Blue */
  --color-mantenimiento-light: #f0f9ff;
  --color-instalaciones: #0d9488;     /* Teal */
  --color-instalaciones-light: #f0fdfa;
  
  --color-copper-500: #f97316;
  --color-copper-600: #ea580c;
  --color-copper-700: #c2410c;
  --color-copper-50: #fff7ed;
  
  /* Layout & Sizing */
  --max-width: 1200px;
  --header-height: 80px;
  --header-shrink-height: 70px;
  
  /* Typography */
  --font-heading: 'Outfit', 'Segoe UI', system-ui, sans-serif;
  --font-body: 'Plus Jakarta Sans', 'Segoe UI', system-ui, sans-serif;
  
  /* Shadows */
  --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
  --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.05), 0 2px 4px -2px rgba(0, 0, 0, 0.05);
  --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.08), 0 4px 6px -4px rgba(0, 0, 0, 0.08);
  --shadow-xl: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 8px 10px -6px rgba(0, 0, 0, 0.1);
  --shadow-glow-const: 0 10px 20px -5px rgba(234, 88, 12, 0.12);
  --shadow-glow-mant: 0 10px 20px -5px rgba(2, 132, 199, 0.12);
  --shadow-glow-inst: 0 10px 20px -5px rgba(13, 148, 136, 0.12);
  
  /* Transitions */
  --transition-fast: 0.2s cubic-bezier(0.4, 0, 0.2, 1);
  --transition-normal: 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  --transition-slow: 0.5s cubic-bezier(0.4, 0, 0.2, 1);
  
  /* Border Radius */
  --radius-sm: 6px;
  --radius-md: 12px;
  --radius-lg: 20px;
  --radius-full: 9999px;
}

/* ==========================================================================
   BASE STYLES & RESET
   ========================================================================== */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  scroll-behavior: smooth;
  font-size: 16px;
  -webkit-text-size-adjust: 100%;
}

body {
  font-family: var(--font-body);
  background-color: var(--color-slate-50);
  color: var(--color-slate-800);
  line-height: 1.6;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
}

img {
  max-width: 100%;
  height: auto;
  display: block;
}

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

button, input, select, textarea {
  font-family: inherit;
  font-size: inherit;
  color: inherit;
}

ul {
  list-style: none;
}

/* ==========================================================================
   REUSABLE UTILITIES & LAYOUT
   ========================================================================== */
.container {
  width: 100%;
  max-width: var(--max-width);
  margin-left: auto;
  margin-right: auto;
  padding-left: 20px;
  padding-right: 20px;
}

@media (max-width: 576px) {
  .container {
    padding-left: 16px;
    padding-right: 16px;
  }
}

.section-padding {
  padding-top: 100px;
  padding-bottom: 100px;
}

@media (max-width: 768px) {
  .section-padding {
    padding-top: 60px;
    padding-bottom: 60px;
  }
}

.bg-light {
  background-color: var(--color-slate-100);
}

.bg-dark {
  background-color: var(--color-slate-900);
  color: var(--color-slate-200);
}

.grid-two-columns {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 60px;
  align-items: center;
}

@media (max-width: 992px) {
  .grid-two-columns {
    grid-template-columns: 1fr;
    gap: 40px;
  }
}

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

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

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 14px 28px;
  font-family: var(--font-heading);
  font-weight: 600;
  border-radius: var(--radius-md);
  cursor: pointer;
  border: 2px solid transparent;
  transition: all var(--transition-normal);
  font-size: 0.95rem;
}

.btn-primary {
  background-color: var(--color-copper-600);
  color: white;
}

.btn-primary:hover {
  background-color: var(--color-copper-700);
  transform: translateY(-2px);
  box-shadow: 0 8px 20px rgba(234, 88, 12, 0.25);
}

.btn-secondary {
  background-color: transparent;
  color: white;
  border-color: rgba(255, 255, 255, 0.3);
}

.btn-secondary:hover {
  background-color: rgba(255, 255, 255, 0.1);
  border-color: white;
  transform: translateY(-2px);
}

.btn-outline {
  background-color: transparent;
  color: var(--color-slate-800);
  border-color: var(--color-slate-200);
}

.btn-outline:hover {
  background-color: var(--color-slate-100);
  border-color: var(--color-slate-400);
}

.btn-block {
  width: 100%;
}

.btn-icon {
  margin-right: 8px;
  width: 16px;
  height: 16px;
}

.btn-icon-right {
  margin-left: 8px;
  width: 16px;
  height: 16px;
}

/* Badges & Section Headers */
.badge-modern {
  display: inline-flex;
  align-items: center;
  background-color: rgba(234, 88, 12, 0.1);
  color: var(--color-copper-600);
  padding: 6px 16px;
  border-radius: var(--radius-full);
  font-family: var(--font-heading);
  font-weight: 600;
  font-size: 0.85rem;
  letter-spacing: 0.5px;
  margin-bottom: 24px;
}

.badge-dot {
  width: 8px;
  height: 8px;
  background-color: var(--color-copper-600);
  border-radius: 50%;
  margin-right: 8px;
  display: inline-block;
  animation: pulse-glow 2s infinite;
}

@keyframes pulse-glow {
  0% { transform: scale(0.95); box-shadow: 0 0 0 0 rgba(234, 88, 12, 0.5); }
  70% { transform: scale(1); box-shadow: 0 0 0 6px rgba(234, 88, 12, 0); }
  100% { transform: scale(0.95); box-shadow: 0 0 0 0 rgba(234, 88, 12, 0); }
}

.section-header {
  margin-bottom: 50px;
  max-width: 650px;
  margin-left: auto;
  margin-right: auto;
}

.section-subtitle {
  font-family: var(--font-heading);
  color: var(--color-copper-600);
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 2px;
  font-size: 0.85rem;
  display: block;
  margin-bottom: 12px;
}

.section-subtitle.light {
  color: var(--color-copper-500);
}

.section-title {
  font-family: var(--font-heading);
  font-size: 2.25rem;
  font-weight: 800;
  color: var(--color-slate-900);
  line-height: 1.25;
}

@media (max-width: 576px) {
  .section-title {
    font-size: 1.75rem;
  }
}

.section-title.light {
  color: white;
}

.header-line {
  width: 60px;
  height: 4px;
  background-color: var(--color-slate-900);
  margin: 16px auto 0;
  border-radius: var(--radius-full);
}

.header-line.left {
  margin-left: 0;
}

.header-line.orange {
  background-color: var(--color-copper-600);
}

.section-desc {
  margin-top: 20px;
  color: var(--color-slate-600);
  font-size: 1.05rem;
}

@media (max-width: 576px) {
  .section-desc {
    font-size: 0.95rem;
  }
}

/* ==========================================================================
   HEADER & NAVIGATION
   ========================================================================== */
#main-header {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: var(--header-height);
  z-index: 1000;
  transition: all var(--transition-normal);
  display: flex;
  align-items: center;
}

.header-transparent {
  background-color: transparent;
  border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

.header-scrolled {
  height: var(--header-shrink-height);
  background-color: rgba(255, 255, 255, 0.85);
  backdrop-filter: blur(12px) saturate(180%);
  -webkit-backdrop-filter: blur(12px) saturate(180%);
  box-shadow: var(--shadow-md);
  border-bottom: 1px solid rgba(15, 23, 42, 0.06);
}

.nav-container {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.logo-img {
  height: 48px;
  width: auto;
  transition: height var(--transition-normal);
}

.header-scrolled .logo-img {
  height: 42px;
}

.nav-menu {
  display: flex;
  align-items: center;
  gap: 32px;
}

.nav-list {
  display: flex;
  align-items: center;
  gap: 32px;
}

.nav-link {
  font-family: var(--font-heading);
  font-weight: 500;
  font-size: 0.95rem;
  color: white;
  padding: 8px 0;
  position: relative;
}

.header-scrolled .nav-link {
  color: var(--color-slate-700);
}

.header-scrolled .nav-link:hover {
  color: var(--color-slate-900);
}

.nav-link::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  width: 0;
  height: 2px;
  background-color: var(--color-copper-600);
  transition: width var(--transition-fast);
}

.nav-link:hover::after,
.nav-link.active::after {
  width: 100%;
}

.header-transparent .nav-link.active {
  color: white;
}

.header-scrolled .nav-link.active {
  color: var(--color-copper-600);
  font-weight: 600;
}

.btn-nav {
  padding: 8px 18px;
  font-size: 0.85rem;
  border-radius: var(--radius-sm);
  color: white;
  border-color: rgba(255, 255, 255, 0.25);
}

.header-scrolled .btn-nav {
  color: var(--color-slate-800);
  border-color: var(--color-slate-300);
}

.header-scrolled .btn-nav:hover {
  background-color: var(--color-slate-900);
  border-color: var(--color-slate-900);
  color: white;
}

/* Mobile Toggle */
.mobile-menu-toggle {
  display: none;
  flex-direction: column;
  justify-content: space-between;
  width: 24px;
  height: 18px;
  background: transparent;
  border: none;
  cursor: pointer;
  z-index: 1010;
}

.mobile-menu-toggle .bar {
  width: 100%;
  height: 2px;
  background-color: white;
  border-radius: 2px;
  transition: all var(--transition-normal);
}

.header-scrolled .mobile-menu-toggle .bar {
  background-color: var(--color-slate-900);
}

@media (max-width: 992px) {
  .mobile-menu-toggle {
    display: flex;
  }
  
  .nav-menu {
    position: fixed;
    top: 0;
    right: -100%;
    width: 300px;
    height: 100vh;
    background-color: white;
    box-shadow: var(--shadow-xl);
    flex-direction: column;
    justify-content: flex-start;
    align-items: flex-start;
    padding: 100px 40px 40px;
    gap: 40px;
    transition: right var(--transition-normal);
    z-index: 999;
  }
  
  .nav-menu.open {
    right: 0;
  }
  
  .nav-list {
    flex-direction: column;
    align-items: flex-start;
    width: 100%;
    gap: 24px;
  }
  
  .nav-link {
    color: var(--color-slate-800) !important;
    font-size: 1.1rem;
    width: 100%;
  }
  
  .btn-nav {
    color: var(--color-slate-800) !important;
    border-color: var(--color-slate-300) !important;
    width: 100%;
  }
  
  .mobile-menu-toggle.open .bar:nth-child(1) {
    transform: translateY(8px) rotate(45deg);
  }
  
  .mobile-menu-toggle.open .bar:nth-child(2) {
    opacity: 0;
  }
  
  .mobile-menu-toggle.open .bar:nth-child(3) {
    transform: translateY(-8px) rotate(-45deg);
  }
  
  .mobile-menu-toggle.open .bar {
    background-color: var(--color-slate-900) !important;
  }
}

/* ==========================================================================
   HERO SECTION
   ========================================================================== */
.hero-section {
  position: relative;
  height: 100vh;
  min-height: 650px;
  display: flex;
  align-items: center;
  background-image: url('./assets/images/hero_construction.png');
  background-size: cover;
  background-position: center;
  background-attachment: fixed;
}

@media (max-width: 768px) {
  .hero-section {
    background-attachment: scroll;
    height: calc(100vh - 60px);
  }
}

.hero-bg-overlay {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: linear-gradient(135deg, rgba(15, 23, 42, 0.95) 30%, rgba(15, 23, 42, 0.5) 100%);
  z-index: 1;
}

.hero-container {
  position: relative;
  z-index: 2;
}

.hero-content {
  max-width: 680px;
  animation: slide-up-fade 1s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

.hero-title {
  font-family: var(--font-heading);
  font-size: 3.5rem;
  font-weight: 800;
  line-height: 1.15;
  color: white;
  margin-bottom: 20px;
}

@media (max-width: 768px) {
  .hero-title {
    font-size: 2.25rem;
  }
}

.hero-subtitle {
  font-size: 1.15rem;
  color: var(--color-slate-300);
  margin-bottom: 40px;
  line-height: 1.6;
}

@media (max-width: 576px) {
  .hero-subtitle {
    font-size: 1rem;
    margin-bottom: 30px;
  }
}

.hero-actions {
  display: flex;
  gap: 16px;
}

@media (max-width: 480px) {
  .hero-actions {
    flex-direction: column;
    gap: 12px;
  }
  
  .hero-actions .btn {
    width: 100%;
  }
}

.hero-scroll-indicator {
  position: absolute;
  bottom: 40px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 2;
}

@media (max-width: 768px) {
  .hero-scroll-indicator {
    display: none;
  }
}

.mouse-scroll {
  width: 26px;
  height: 44px;
  border: 2px solid rgba(255, 255, 255, 0.4);
  border-radius: 13px;
  display: block;
  position: relative;
}

.mouse-scroll::after {
  content: '';
  width: 6px;
  height: 6px;
  background-color: white;
  border-radius: 50%;
  position: absolute;
  top: 8px;
  left: 50%;
  transform: translateX(-50%);
  animation: scroll-dot 1.5s infinite;
}

/* ==========================================================================
   AUTOMATIC SCROLLING CAROUSEL STRIP (PROJECTS)
   ========================================================================== */
.carousel-strip-section {
  background-color: var(--color-slate-900);
  padding: 28px 0;
  overflow: hidden;
  position: relative;
  border-bottom: 1px solid rgba(255, 255, 255, 0.05);
  z-index: 5;
}

.carousel-track-wrapper {
  width: 100%;
  overflow: hidden;
  display: flex;
}

.carousel-track {
  display: flex;
  gap: 20px;
  width: max-content;
  animation: scroll-marquee 30s linear infinite;
}

.carousel-track:hover {
  animation-play-state: paused;
}

.carousel-image-card {
  width: 280px;
  height: 170px;
  border-radius: var(--radius-md);
  overflow: hidden;
  position: relative;
  flex-shrink: 0;
  box-shadow: 0 10px 20px rgba(0, 0, 0, 0.3);
  border: 1px solid rgba(255, 255, 255, 0.08);
}

.carousel-image-card img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform var(--transition-slow);
}

.carousel-image-card:hover img {
  transform: scale(1.08);
}

.carousel-label {
  position: absolute;
  bottom: 0;
  left: 0;
  width: 100%;
  background: linear-gradient(to top, rgba(0, 0, 0, 0.85) 0%, rgba(0, 0, 0, 0.4) 60%, transparent 100%);
  color: white;
  padding: 12px 16px;
  font-family: var(--font-heading);
  font-size: 0.85rem;
  font-weight: 700;
  letter-spacing: 0.5px;
}

@keyframes scroll-marquee {
  0% {
    transform: translateX(0);
  }
  100% {
    /* Translate by exactly half the track width (there are 6 base images, we duplicate 6) */
    transform: translateX(calc(-50% - 10px));
  }
}

/* ==========================================================================
   STATISTICS RIBBON
   ========================================================================== */
.stats-ribbon {
  background-color: white;
  border-bottom: 1px solid var(--color-slate-200);
  position: relative;
  z-index: 10;
  box-shadow: var(--shadow-sm);
  margin-top: -40px;
  border-radius: var(--radius-md) var(--radius-md) 0 0;
  max-width: calc(var(--max-width) - 40px);
  margin-left: auto;
  margin-right: auto;
}

.stats-container {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  padding: 30px 40px;
}

.stat-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  position: relative;
  opacity: 0;
  transform: translateY(20px);
  animation: slide-up-fade 0.6s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

.stat-card:nth-child(1) { animation-delay: 0.1s; }
.stat-card:nth-child(2) { animation-delay: 0.2s; }
.stat-card:nth-child(3) { animation-delay: 0.3s; }
.stat-card:nth-child(4) { animation-delay: 0.4s; }

.stat-card:not(:last-child)::after {
  content: '';
  position: absolute;
  right: 0;
  top: 15%;
  height: 70%;
  width: 1px;
  background-color: var(--color-slate-200);
}

.stat-icon-wrapper {
  background-color: var(--color-copper-50);
  color: var(--color-copper-600);
  width: 48px;
  height: 48px;
  border-radius: var(--radius-md);
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 14px;
}

.stat-icon {
  width: 22px;
  height: 22px;
}

.stat-number {
  font-family: var(--font-heading);
  font-size: 2rem;
  font-weight: 800;
  color: var(--color-slate-900);
  line-height: 1;
}

.stat-label {
  font-size: 0.85rem;
  color: var(--color-slate-500);
  font-weight: 600;
  margin-top: 6px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

@media (max-width: 992px) {
  .stats-ribbon {
    margin-top: 0;
    max-width: 100%;
    border-radius: 0;
  }
  
  .stats-container {
    grid-template-columns: repeat(2, 1fr);
    gap: 30px;
    padding: 30px 20px;
  }
  
  .stat-card:nth-child(2)::after {
    display: none;
  }
}

@media (max-width: 480px) {
  .stats-container {
    grid-template-columns: repeat(2, 1fr);
    gap: 16px;
    padding: 20px 10px;
  }
  
  .stat-card {
    padding: 10px 5px;
  }
  
  .stat-icon-wrapper {
    width: 36px;
    height: 36px;
    margin-bottom: 8px;
    border-radius: 8px;
  }
  
  .stat-icon {
    width: 16px;
    height: 16px;
  }
  
  .stat-number {
    font-size: 1.5rem;
  }
  
  .stat-label {
    font-size: 0.7rem;
    margin-top: 4px;
    letter-spacing: 0.2px;
  }
  
  .stat-card::after {
    display: none !important;
  }
}

@media (max-width: 576px) {
  .filter-wrapper {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 6px;
    margin-bottom: 25px;
    padding: 0 5px;
  }

  .filter-btn {
    padding: 8px 2px;
    font-size: 0.72rem;
    border-radius: 8px;
    white-space: nowrap;
    text-overflow: ellipsis;
    overflow: hidden;
    display: block;
    text-align: center;
    width: 100%;
  }

  .filter-btn[data-filter="all"] {
    grid-column: 1 / span 3;
    justify-self: center;
    width: auto;
    min-width: 120px;
    padding: 8px 20px;
  }
}

/* ==========================================================================
   SERVICES SECTION & DIVERSE/PREMIUM CARDS
   ========================================================================== */
.services-section {
  background-color: var(--color-slate-50);
  background-image: 
    linear-gradient(rgba(15, 23, 42, 0.02) 1px, transparent 1px),
    linear-gradient(90deg, rgba(15, 23, 42, 0.02) 1px, transparent 1px);
  background-size: 30px 30px;
}

.filter-wrapper {
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: 10px;
  margin-bottom: 45px;
}

.filter-btn {
  background-color: white;
  border: 1px solid var(--color-slate-200);
  color: var(--color-slate-600);
  padding: 10px 22px;
  border-radius: var(--radius-md);
  font-family: var(--font-heading);
  font-weight: 600;
  font-size: 0.9rem;
  cursor: pointer;
  transition: all var(--transition-fast);
  box-shadow: var(--shadow-sm);
}

.filter-btn:hover {
  background-color: var(--color-slate-100);
  border-color: var(--color-slate-300);
  color: var(--color-slate-900);
}

.filter-btn.active {
  background-color: var(--color-slate-900);
  border-color: var(--color-slate-900);
  color: white;
}

.services-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 30px;
  align-items: start;
  transition: opacity var(--transition-normal);
}

@media (max-width: 992px) {
  .services-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 20px;
  }
}

@media (max-width: 768px) {
  .services-grid {
    grid-template-columns: 1fr;
    gap: 20px;
  }
}

/* Service Card Accordion Design */
.service-card {
  background-color: white;
  border: 1px solid rgba(15, 23, 42, 0.08);
  border-radius: var(--radius-lg);
  transition: all var(--transition-normal);
  display: flex;
  flex-direction: column;
  box-shadow: var(--shadow-sm);
  position: relative;
  overflow: hidden;
  cursor: pointer;
  opacity: 0;
  transform: translateY(30px);
  animation: slide-up-fade 0.8s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

.service-card:nth-child(3n+1) { animation-delay: 0.05s; }
.service-card:nth-child(3n+2) { animation-delay: 0.15s; }
.service-card:nth-child(3n+3) { animation-delay: 0.25s; }

.service-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-lg);
}

.service-card.expanded {
  box-shadow: var(--shadow-lg);
}

.service-card.expanded:hover {
  transform: none;
}

/* Card Header */
.card-header {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 20px 24px;
  width: 100%;
  position: relative;
  transition: background-color var(--transition-fast);
}

.service-icon-box {
  width: 44px;
  height: 44px;
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  transition: all var(--transition-normal);
}

.service-icon {
  width: 20px;
  height: 20px;
  transition: transform var(--transition-normal);
}

.service-card:hover .service-icon {
  transform: scale(1.08) rotate(5deg);
}

.service-title {
  font-family: var(--font-heading);
  font-size: 1.15rem;
  font-weight: 700;
  color: var(--color-slate-900);
  line-height: 1.3;
  margin-bottom: 0;
  padding-right: 10px;
  flex: 1;
  min-width: 0;
}

.card-header-right {
  margin-left: auto;
  display: flex;
  align-items: center;
}

.card-chevron {
  width: 18px;
  height: 18px;
  color: var(--color-slate-400);
  transition: transform var(--transition-normal);
}

.service-card.expanded .card-chevron {
  transform: rotate(180deg);
  color: var(--color-slate-900);
}

/* Category Text Injected into ::after on the top-right of header — HIDDEN */
.service-card::after {
  display: none;
}

/* 1. Category 1: CONSTRUCCIÓN (Orange Theme) */
.service-card[data-category="construccion"] .card-header {
  background-color: rgba(234, 88, 12, 0.04);
  border-bottom: 1px solid rgba(234, 88, 12, 0.08);
}
.service-card[data-category="construccion"]::after {
  content: 'CONSTRUCCIÓN';
  color: var(--color-construccion);
}
.service-card[data-category="construccion"] .service-icon-box {
  background-color: var(--color-construccion-light);
  color: var(--color-construccion);
}
.service-card[data-category="construccion"]:hover .card-header {
  background-color: rgba(234, 88, 12, 0.08);
}

/* 2. Category 2: MANTENIMIENTO (Blue Theme) */
.service-card[data-category="mantenimiento"] .card-header {
  background-color: rgba(2, 132, 199, 0.04);
  border-bottom: 1px solid rgba(2, 132, 199, 0.08);
}
.service-card[data-category="mantenimiento"]::after {
  content: 'MANTENIMIENTO';
  color: var(--color-mantenimiento);
}
.service-card[data-category="mantenimiento"] .service-icon-box {
  background-color: var(--color-mantenimiento-light);
  color: var(--color-mantenimiento);
}
.service-card[data-category="mantenimiento"]:hover .card-header {
  background-color: rgba(2, 132, 199, 0.08);
}

/* 3. Category 3: INSTALACIONES/ESPECIALIDADES (Teal Theme) */
.service-card[data-category="instalaciones"] .card-header {
  background-color: rgba(13, 148, 136, 0.04);
  border-bottom: 1px solid rgba(13, 148, 136, 0.08);
}
.service-card[data-category="instalaciones"]::after {
  content: 'ESPECIALIDADES';
  color: var(--color-instalaciones);
}
.service-card[data-category="instalaciones"] .service-icon-box {
  background-color: var(--color-instalaciones-light);
  color: var(--color-instalaciones);
}
.service-card[data-category="instalaciones"]:hover .card-header {
  background-color: rgba(13, 148, 136, 0.08);
}

/* Card Body (Accordion Expandable, plain white) */
.card-body-wrapper {
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.4s ease-in-out, opacity 0.3s ease;
  opacity: 0;
}

.service-card.expanded .card-body-wrapper {
  opacity: 1;
}

.card-body-content {
  padding: 24px;
  background-color: white;
}

.service-text {
  color: var(--color-slate-600);
  font-size: 0.95rem;
  margin-bottom: 0;
  line-height: 1.6;
}

/* Included details list */
.card-included-title {
  font-family: var(--font-heading);
  font-size: 0.95rem;
  font-weight: 700;
  color: var(--color-slate-900);
  margin: 20px 0 10px;
}

.card-included-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-bottom: 24px;
}

.card-included-list li {
  display: flex;
  gap: 8px;
  align-items: flex-start;
  font-size: 0.9rem;
  color: var(--color-slate-600);
  line-height: 1.4;
}

.card-included-list li::before {
  content: "✓";
  font-weight: bold;
  flex-shrink: 0;
}

.service-card[data-category="construccion"] .card-included-list li::before { color: var(--color-construccion); }
.service-card[data-category="mantenimiento"] .card-included-list li::before { color: var(--color-mantenimiento); }
.service-card[data-category="instalaciones"] .card-included-list li::before { color: var(--color-instalaciones); }

/* Card Actions inside Body */
.card-actions {
  display: flex;
  gap: 12px;
  border-top: 1px solid var(--color-slate-100);
  padding-top: 20px;
  margin-top: 10px;
}

.btn-sm {
  padding: 10px 18px;
  font-size: 0.85rem;
  border-radius: var(--radius-sm);
  border: 1px solid transparent;
}

.btn-quote {
  background-color: var(--color-slate-900);
  color: white;
}

.service-card[data-category="construccion"] .btn-quote { background-color: var(--color-construccion); }
.service-card[data-category="construccion"] .btn-quote:hover { background-color: var(--color-copper-700); }
.service-card[data-category="mantenimiento"] .btn-quote { background-color: var(--color-mantenimiento); }
.service-card[data-category="mantenimiento"] .btn-quote:hover { background-color: #0369a1; }
.service-card[data-category="instalaciones"] .btn-quote { background-color: var(--color-instalaciones); }
.service-card[data-category="instalaciones"] .btn-quote:hover { background-color: #0f766e; }

.btn-wa {
  background-color: white;
  border-color: var(--color-slate-200);
  color: var(--color-slate-700);
}

.btn-wa:hover {
  background-color: var(--color-slate-50);
  border-color: var(--color-slate-300);
}

/* Responsive adjustment for headers */
@media (max-width: 480px) {
  .service-card::after {
    display: none;
  }
  .card-header {
    padding: 16px 20px;
  }
  .service-title {
    font-size: 1.05rem;
    padding-right: 10px;
  }
}
.service-card.hidden {
  display: none;
}

/* ==========================================================================
   ABOUT US (NOSOTROS) SECTION
   ========================================================================== */
.nosotros-section {
  position: relative;
  overflow: hidden;
}

.nosotros-text {
  color: var(--color-slate-600);
  font-size: 1.05rem;
  margin-bottom: 35px;
}

.value-items {
  display: flex;
  flex-direction: column;
  gap: 24px;
}

.value-item {
  display: flex;
  gap: 16px;
  align-items: flex-start;
  opacity: 0;
  transform: translateX(-30px);
}

.value-item.revealed {
  opacity: 1;
  transform: translateX(0);
  transition: all 0.6s cubic-bezier(0.16, 1, 0.3, 1);
}

.value-item:nth-child(1) { transition-delay: 0.1s; }
.value-item:nth-child(2) { transition-delay: 0.2s; }
.value-item:nth-child(3) { transition-delay: 0.3s; }

.value-icon-holder {
  background-color: white;
  border: 1px solid var(--color-slate-200);
  color: var(--color-copper-600);
  padding: 8px;
  border-radius: var(--radius-md);
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: var(--shadow-sm);
}

.val-icon {
  width: 20px;
  height: 20px;
}

.value-item h4 {
  font-family: var(--font-heading);
  font-size: 1.1rem;
  color: var(--color-slate-900);
  font-weight: 700;
  margin-bottom: 4px;
}

.value-item p {
  color: var(--color-slate-600);
  font-size: 0.95rem;
}

.nosotros-images {
  display: flex;
  justify-content: center;
  position: relative;
  opacity: 0;
  transform: scale(0.95);
}

.nosotros-images.revealed {
  opacity: 1;
  transform: scale(1);
  transition: all 0.8s cubic-bezier(0.16, 1, 0.3, 1);
}

.image-box-wrapper {
  position: relative;
  width: 100%;
  max-width: 480px;
}

.main-image-card {
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: var(--shadow-xl);
  border: 4px solid white;
}

.rounded-img {
  width: 100%;
  height: 400px;
  object-fit: cover;
}

@media (max-width: 576px) {
  .rounded-img {
    height: 280px;
  }
}

.floating-badge-experience {
  position: absolute;
  bottom: -25px;
  left: -25px;
  background-color: var(--color-slate-900);
  color: white;
  padding: 24px 30px;
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-xl);
  display: flex;
  align-items: center;
  gap: 16px;
  border-left: 5px solid var(--color-copper-600);
  animation: float-badge 4s ease-in-out infinite;
}

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

.floating-badge-experience .large-number {
  font-family: var(--font-heading);
  font-size: 3rem;
  font-weight: 800;
  line-height: 1;
  color: var(--color-copper-500);
}

.floating-badge-experience .text-badge {
  font-size: 0.85rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 1px;
  line-height: 1.3;
}

@media (max-width: 992px) {
  .nosotros-images {
    margin-top: 40px;
  }
  
  .floating-badge-experience {
    left: 20px;
  }
}

@media (max-width: 480px) {
  .floating-badge-experience {
    bottom: -15px;
    left: 10px;
    padding: 15px 20px;
  }
  
  .floating-badge-experience .large-number {
    font-size: 2.25rem;
  }
  
  .floating-badge-experience .text-badge {
    font-size: 0.75rem;
  }
}

/* ==========================================================================
   PORTFOLIO / GALLERY SECTION
   ========================================================================== */
.gallery-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 30px;
}

@media (max-width: 992px) {
  .gallery-grid {
    grid-template-columns: 1fr;
    max-width: 600px;
    margin-left: auto;
    margin-right: auto;
    gap: 20px;
  }
}

.gallery-item {
  position: relative;
  border-radius: var(--radius-md);
  overflow: hidden;
  box-shadow: var(--shadow-md);
  height: 320px;
  opacity: 0;
  transform: translateY(20px);
}

.gallery-item.revealed {
  opacity: 1;
  transform: translateY(0);
  transition: all 0.6s cubic-bezier(0.16, 1, 0.3, 1);
}

.gallery-item:nth-child(1) { transition-delay: 0.1s; }
.gallery-item:nth-child(2) { transition-delay: 0.2s; }
.gallery-item:nth-child(3) { transition-delay: 0.3s; }

.gallery-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform var(--transition-slow);
}

.gallery-overlay {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: linear-gradient(to top, rgba(15, 23, 42, 0.9) 10%, rgba(15, 23, 42, 0.2) 60%, transparent 100%);
  display: flex;
  align-items: flex-end;
  padding: 30px;
  opacity: 0;
  transition: opacity var(--transition-normal);
}

.gallery-item:hover .gallery-img {
  transform: scale(1.08);
}

.gallery-item:hover .gallery-overlay {
  opacity: 1;
}

.gallery-info {
  transform: translateY(20px);
  transition: transform var(--transition-normal);
  color: white;
}

.gallery-item:hover .gallery-info {
  transform: translateY(0);
}

.gallery-cat {
  font-family: var(--font-heading);
  font-size: 0.75rem;
  font-weight: 700;
  color: var(--color-copper-500);
  text-transform: uppercase;
  letter-spacing: 1px;
  display: block;
  margin-bottom: 6px;
}

.gallery-info h4 {
  font-family: var(--font-heading);
  font-size: 1.25rem;
  font-weight: 700;
  margin-bottom: 6px;
}

.gallery-info p {
  font-size: 0.85rem;
  color: var(--color-slate-300);
}

/* ==========================================================================
   CONTACT SECTION & GLASSMORPHISM FORM
   ========================================================================== */
.contact-section {
  position: relative;
}

.contact-lead {
  font-size: 1.1rem;
  color: var(--color-slate-300);
  margin-bottom: 40px;
}

.contact-details {
  display: flex;
  flex-direction: column;
  gap: 30px;
}

.contact-detail-item {
  display: flex;
  gap: 20px;
  align-items: center;
  opacity: 0;
  transform: translateX(-20px);
}

.contact-detail-item.revealed {
  opacity: 1;
  transform: translateX(0);
  transition: all 0.5s cubic-bezier(0.16, 1, 0.3, 1);
}

.contact-detail-item:nth-child(1) { transition-delay: 0.1s; }
.contact-detail-item:nth-child(2) { transition-delay: 0.2s; }
.contact-detail-item:nth-child(3) { transition-delay: 0.3s; }
.contact-detail-item:nth-child(4) { transition-delay: 0.4s; }

.detail-icon {
  background-color: rgba(255, 255, 255, 0.05);
  color: var(--color-copper-500);
  width: 50px;
  height: 50px;
  border-radius: var(--radius-md);
  display: flex;
  align-items: center;
  justify-content: center;
  border: 1px solid rgba(255, 255, 255, 0.1);
  transition: all var(--transition-fast);
}

.contact-detail-item:hover .detail-icon {
  background-color: var(--color-copper-600);
  color: white;
  transform: scale(1.05);
}

.detail-icon svg {
  width: 20px;
  height: 20px;
}

.detail-text span {
  display: block;
  font-size: 0.8rem;
  color: var(--color-slate-400);
  text-transform: uppercase;
  letter-spacing: 0.5px;
  font-weight: 600;
}

.detail-text a, .detail-text p {
  font-family: var(--font-heading);
  font-size: 1.15rem;
  font-weight: 600;
  color: white;
}

.detail-text a:hover {
  color: var(--color-copper-500);
}

/* Glassmorphism Form Container */
.contact-form-wrapper {
  background: rgba(255, 255, 255, 0.03);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: var(--radius-lg);
  padding: 40px;
  box-shadow: var(--shadow-xl);
  opacity: 0;
  transform: scale(0.97);
}

.contact-form-wrapper.revealed {
  opacity: 1;
  transform: scale(1);
  transition: all 0.8s cubic-bezier(0.16, 1, 0.3, 1);
}

@media (max-width: 576px) {
  .contact-form-wrapper {
    padding: 30px 20px;
  }
}

.form-title {
  font-family: var(--font-heading);
  font-size: 1.5rem;
  font-weight: 700;
  margin-bottom: 24px;
  color: white;
}

.form-group {
  margin-bottom: 20px;
}

.grid-two-fields {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 20px;
}

@media (max-width: 576px) {
  .grid-two-fields {
    grid-template-columns: 1fr;
    gap: 0;
  }
}

.modern-form label {
  display: block;
  font-size: 0.85rem;
  color: var(--color-slate-300);
  margin-bottom: 8px;
  font-weight: 500;
}

.modern-form input,
.modern-form select,
.modern-form textarea {
  width: 100%;
  background-color: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.15);
  border-radius: var(--radius-md);
  padding: 12px 16px;
  color: white;
  transition: all var(--transition-fast);
}

.modern-form input::placeholder,
.modern-form textarea::placeholder {
  color: var(--color-slate-500);
}

.modern-form input:focus,
.modern-form select:focus,
.modern-form textarea:focus {
  outline: none;
  border-color: var(--color-copper-500);
  background-color: rgba(255, 255, 255, 0.08);
  box-shadow: 0 0 0 3px rgba(249, 115, 22, 0.2);
}

.modern-form select option {
  background-color: var(--color-slate-900);
  color: white;
}

.form-status {
  margin-top: 15px;
  font-size: 0.9rem;
  text-align: center;
  border-radius: var(--radius-sm);
  padding: 8px;
  display: none;
}

.form-status.success {
  background-color: rgba(16, 185, 129, 0.1);
  color: #10b981;
  border: 1px solid rgba(16, 185, 129, 0.2);
  display: block;
}

.form-status.error {
  background-color: rgba(239, 68, 68, 0.1);
  color: #ef4444;
  border: 1px solid rgba(239, 68, 68, 0.2);
  display: block;
}

/* ==========================================================================
   FOOTER SECTION
   ========================================================================== */
.main-footer {
  background-color: var(--color-slate-950);
  color: var(--color-slate-400);
  border-top: 1px solid rgba(255, 255, 255, 0.05);
}

.footer-grid {
  display: grid;
  grid-template-columns: 2fr repeat(3, 1fr);
  gap: 50px;
  padding-top: 80px;
  padding-bottom: 60px;
}

@media (max-width: 992px) {
  .footer-grid {
    grid-template-columns: 1fr 1fr;
    gap: 40px;
  }
}

@media (max-width: 576px) {
  .footer-grid {
    grid-template-columns: 1fr;
    gap: 30px;
    padding-top: 50px;
    padding-bottom: 40px;
  }
}

.footer-logo {
  height: 45px;
  width: auto;
  margin-bottom: 20px;
}

.footer-brand-desc {
  font-size: 0.9rem;
  line-height: 1.6;
  margin-bottom: 24px;
}

.social-icons {
  display: flex;
  gap: 12px;
}

.social-link {
  width: 38px;
  height: 38px;
  background-color: rgba(255, 255, 255, 0.03);
  color: white;
  border-radius: var(--radius-sm);
  display: flex;
  align-items: center;
  justify-content: center;
  border: 1px solid rgba(255, 255, 255, 0.08);
  transition: all var(--transition-fast);
}

.social-link svg {
  width: 18px;
  height: 18px;
}

.social-link:hover {
  background-color: var(--color-copper-600);
  border-color: var(--color-copper-600);
  transform: translateY(-2px);
}

.footer-links-col h4 {
  font-family: var(--font-heading);
  color: white;
  font-size: 1.1rem;
  font-weight: 700;
  margin-bottom: 24px;
}

@media (max-width: 576px) {
  .footer-links-col h4 {
    margin-bottom: 16px;
  }
}

.footer-links li {
  margin-bottom: 12px;
}

.footer-links a {
  font-size: 0.9rem;
  display: inline-block;
  transition: transform var(--transition-fast);
}

.footer-links a:hover {
  color: var(--color-copper-500);
  transform: translateX(4px);
}

.footer-info-list {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.footer-info-list li {
  display: flex;
  gap: 12px;
  align-items: flex-start;
  font-size: 0.9rem;
}

.f-icon {
  width: 18px;
  height: 18px;
  color: var(--color-copper-500);
  flex-shrink: 0;
  margin-top: 2px;
}

.footer-bottom {
  border-top: 1px solid rgba(255, 255, 255, 0.05);
  padding: 30px 0;
  font-size: 0.85rem;
}

.footer-bottom-container {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 12px;
}

@media (max-width: 576px) {
  .footer-bottom-container {
    flex-direction: column;
    text-align: center;
  }
}

/* ==========================================================================
   MODAL DIALOG (SERVICES DETAILS)
   ========================================================================== */
.modal-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(15, 23, 42, 0.7);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  z-index: 2000;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  pointer-events: none;
  transition: opacity var(--transition-normal);
  padding: 20px;
}

.modal-overlay.open {
  opacity: 1;
  pointer-events: auto;
}

.modal-box {
  background-color: white;
  width: 100%;
  max-width: 650px;
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-xl);
  overflow: hidden;
  position: relative;
  transform: translateY(30px);
  transition: transform var(--transition-normal);
  padding: 40px;
}

.modal-overlay.open .modal-box {
  transform: translateY(0);
}

@media (max-width: 576px) {
  .modal-box {
    padding: 30px 20px;
    max-height: 90vh;
    overflow-y: auto;
  }
}

.modal-close {
  position: absolute;
  top: 20px;
  right: 20px;
  background: none;
  border: none;
  font-size: 2rem;
  color: var(--color-slate-400);
  cursor: pointer;
  line-height: 1;
  transition: color var(--transition-fast);
}

.modal-close:hover {
  color: var(--color-slate-900);
}

.modal-header {
  display: flex;
  gap: 20px;
  align-items: center;
  margin-bottom: 24px;
}

.modal-icon-holder {
  background-color: var(--color-copper-50);
  color: var(--color-copper-600);
  width: 60px;
  height: 60px;
  border-radius: var(--radius-md);
  display: flex;
  align-items: center;
  justify-content: center;
}

.modal-icon-holder svg {
  width: 28px;
  height: 28px;
}

.modal-tag {
  font-family: var(--font-heading);
  font-size: 0.75rem;
  font-weight: 700;
  color: var(--color-copper-600);
  text-transform: uppercase;
  letter-spacing: 1px;
  display: block;
  margin-bottom: 4px;
}

.modal-title {
  font-family: var(--font-heading);
  font-size: 1.5rem;
  font-weight: 800;
  color: var(--color-slate-900);
  line-height: 1.25;
}

.modal-body {
  color: var(--color-slate-600);
  font-size: 1rem;
}

#modal-description {
  margin-bottom: 24px;
  line-height: 1.6;
}

.modal-sub-title {
  font-family: var(--font-heading);
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--color-slate-900);
  margin-bottom: 12px;
}

.modal-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-bottom: 30px;
}

.modal-list li {
  display: flex;
  gap: 10px;
  align-items: flex-start;
  font-size: 0.95rem;
}

.modal-list li::before {
  content: "✓";
  color: var(--color-copper-600);
  font-weight: bold;
}

.modal-cta-box {
  background-color: var(--color-slate-50);
  border: 1px solid var(--color-slate-200);
  border-radius: var(--radius-md);
  padding: 24px;
  text-align: center;
}

.modal-cta-box p {
  font-size: 0.9rem;
  margin-bottom: 16px;
  font-weight: 500;
}

.modal-actions {
  display: flex;
  justify-content: center;
  gap: 12px;
}

@media (max-width: 576px) {
  .modal-actions {
    flex-direction: column;
  }
}

.modal-actions .btn {
  padding: 10px 20px;
  font-size: 0.9rem;
}

/* ==========================================================================
   CSS KEYFRAMES ANIMATIONS
   ========================================================================== */
@keyframes slide-up-fade {
  from {
    opacity: 0;
    transform: translateY(30px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.reveal-fade-in {
  opacity: 0;
  transform: translateY(30px);
  transition: opacity 0.8s cubic-bezier(0.16, 1, 0.3, 1), transform 0.8s cubic-bezier(0.16, 1, 0.3, 1);
}

.reveal-fade-in.revealed {
  opacity: 1;
  transform: translateY(0);
}
