:root {
  --primary: #007bff;
  --primary-dark: #0056b3;
  --text-dark: #1e293b;
  --text-light: #64748b;
  --bg-light: #ffffff;
  --bg-gray: #f8f9fa;
  --border: #e2e8f0;
  --shadow: rgba(0, 0, 0, 0.1);
  --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  font-family: 'Poppins', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  background-color: var(--bg-light);
  color: var(--text-dark);
  line-height: 1.6;
  overflow-x: hidden;
}

h1, h2, h3 {
  line-height: 1.2;
  color: var(--text-dark);
  font-weight: 600;
}

h1 {
  font-size: clamp(2.5rem, 5vw, 4rem);
  font-weight: 700;
}

h2 {
  font-size: clamp(2.25rem, 4vw, 3.25rem);
  margin-bottom: 1rem;
}

h3 {
  font-size: clamp(1.3rem, 2vw, 1.65rem);
}

p {
  color: var(--text-light);
  font-size: 1.1rem;
  line-height: 1.75;
}

/* Container */
.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 2rem;
}

/* Navigation */
.nav {
  position: fixed;
  top: 0;
  width: 100%;
  z-index: 1000;
  background: rgba(255, 255, 255, 0.98);
  backdrop-filter: blur(10px);
  box-shadow: 0 2px 20px var(--shadow);
  transition: var(--transition);
  box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.05);
}

.nav-container {
  max-width: 1400px;
  margin: 0 auto;
  padding: 0.5rem 2rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
  min-height: 90px;
}

.brand {
  font-weight: 700;
  font-size: 1.5rem;
  text-decoration: none;
  color: #0f172a;
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.brand img {
  height: 40px;
  filter: none;
}

.nav-container {
  max-width: 1400px;
  margin: 0 auto;
  padding: 1rem 2rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.brand {
  display: flex;
  align-items: center;
  text-decoration: none;
}

.nav-logo {
  height: 160px;
  width: auto;
  transition: var(--transition);
}

.nav-logo:hover {
  transform: scale(1.05);
}

.nav-links {
  display: flex;
  gap: 2.5rem;
  align-items: center;
}

.nav-link {
  color: var(--text-light);
  text-decoration: none;
  font-weight: 500;
  font-size: 1.1rem;
  transition: var(--transition);
  position: relative;
}

.nav-link:hover,
.nav-link.active {
  color: var(--primary);
}

.nav-link.active::after {
  content: '';
  position: absolute;
  bottom: -5px;
  left: 0;
  width: 100%;
  height: 2px;
  background: var(--primary);
}

.nav-link-gestion {
  background: linear-gradient(135deg, var(--primary), var(--primary-dark));
  color: #ffffff !important;
  padding: 0.6rem 1.5rem;
  border-radius: 25px;
  display: flex;
  align-items: center;
  gap: 0.5rem;
  transition: var(--transition);
}

.nav-link-gestion:hover {
  transform: translateY(-2px);
  box-shadow: 0 5px 15px rgba(0, 123, 255, 0.3);
}

.nav-link-gestion::after {
  display: none;
}

.menu-toggle {
  display: none;
  flex-direction: column;
  gap: 5px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 5px;
}

.menu-toggle span {
  width: 25px;
  height: 3px;
  background: var(--text-dark);
  border-radius: 2px;
  transition: var(--transition);
}

/* Hero Banner */
.hero-banner {
  min-height: 75vh;
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  background: url('img/banner_inicio.jpg') no-repeat center center/cover;
  background-attachment: fixed;
}

.hero-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg, rgba(0, 123, 255, 0.7), rgba(0, 86, 179, 0.8));
  z-index: 1;
}

.hero-content {
  position: relative;
  z-index: 2;
  text-align: center;
  padding: 2rem;
  animation: fadeInUp 1s ease-out;
}

.hero-logo {
  width: 500px;
  max-width: 85%;
  margin-bottom: 3rem;
  animation: fadeIn 1.5s ease-out;
  filter: drop-shadow(0 10px 30px rgba(0, 0, 0, 0.3));
}

.hero-subtitle {
  color: rgba(255, 255, 255, 0.98);
  font-size: clamp(1.25rem, 2.5vw, 1.75rem);
  margin-bottom: 2.5rem;
  font-weight: 400;
  text-shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
}

.btn-primary {
  display: inline-block;
  padding: 1.1rem 2.75rem;
  background: #ffffff;
  color: var(--primary);
  text-decoration: none;
  border-radius: 50px;
  font-weight: 600;
  font-size: 1.15rem;
  transition: var(--transition);
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
}

.btn-primary:hover {
  transform: translateY(-3px);
  box-shadow: 0 15px 40px rgba(0, 0, 0, 0.3);
  background: #f8f9fa;
}

.scroll-indicator {
  position: absolute;
  bottom: 2rem;
  left: 50%;
  transform: translateX(-50%);
  z-index: 2;
  color: #ffffff;
  font-size: 2rem;
  animation: bounce 2s infinite;
}

/* Sections */
.section {
  min-height: 100vh;
  display: flex;
  align-items: center;
  padding: 6rem 0;
  position: relative;
  background-size: cover;
  background-position: center;
  background-attachment: fixed;
}

.section-overlay {
  position: absolute;
  inset: 0;
  background: rgba(255, 255, 255, 0.85);
  z-index: 1;
}

.section .container {
  position: relative;
  z-index: 2;
}

.section-header {
  text-align: center;
  max-width: 750px;
  margin: 0 auto 4rem;
}

.section-header h2 {
  margin-bottom: 1.25rem;
  color: var(--text-dark);
}

.section-header p {
  font-size: 1.25rem;
  color: var(--text-light);
}

/* Section Servicios */
.section-servicios {
  background-image: url('img/banner_servicios.jpg');
}

.services-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 2rem;
}

.service-card {
  background: #ffffff;
  padding: 2.5rem;
  border-radius: 15px;
  text-align: center;
  transition: var(--transition);
  box-shadow: 0 5px 15px var(--shadow);
}

.service-card:hover {
  transform: translateY(-10px);
  box-shadow: 0 15px 40px rgba(0, 123, 255, 0.15);
}

.service-card:hover .service-icon {
  transform: scale(1.1);
  box-shadow: 0 8px 25px rgba(0, 123, 255, 0.4);
}

.service-icon {
  width: 90px;
  height: 90px;
  margin: 0 auto 1.5rem;
  background: linear-gradient(135deg, var(--primary), var(--primary-dark));
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 2.5rem;
  color: #ffffff;
  box-shadow: 0 5px 20px rgba(0, 123, 255, 0.3);
  transition: var(--transition);
}

.service-card h3 {
  margin-bottom: 1rem;
  color: var(--text-dark);
  font-size: 1.35rem;
}

.service-card p {
  color: var(--text-light);
  font-size: 1.05rem;
}

/* Section Empresa */
.section-empresa {
  background-image: url('img/banner_empresa.jpg');
}

.content-split {
  max-width: 900px;
  margin: 0 auto;
}

.content-text {
  background: #ffffff;
  padding: 3rem;
  border-radius: 20px;
  box-shadow: 0 10px 30px var(--shadow);
}

.content-text h2 {
  margin-bottom: 1.5rem;
}

.content-text p {
  margin-bottom: 1.5rem;
  font-size: 1.05rem;
}

.stats-row {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 2rem;
  margin-top: 2.5rem;
  padding-top: 2.5rem;
  border-top: 2px solid var(--border);
}

.stat-item {
  text-align: center;
}

.stat-item h3 {
  font-size: 2.75rem;
  color: var(--primary);
  margin-bottom: 0.5rem;
  font-weight: 700;
}

.stat-item p {
  color: var(--text-light);
  font-size: 1rem;
}

/* Section Personal */
.section-personal {
  background-image: url('img/banner_inicio_darker.jpg');
}

/* Section Instalaciones */
.section-instalaciones {
  background-image: url('img/banner_empresa.jpg');
  background-color: var(--bg-gray);
}

.features-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 2rem;
}

.feature-item {
  background: #ffffff;
  padding: 2rem;
  border-radius: 15px;
  text-align: center;
  transition: var(--transition);
  box-shadow: 0 5px 15px var(--shadow);
}

.feature-item:hover {
  transform: translateY(-5px);
  box-shadow: 0 10px 25px rgba(0, 123, 255, 0.1);
}

.feature-item i {
  font-size: 3rem;
  color: var(--primary);
  margin-bottom: 1rem;
}

.feature-item h3 {
  margin-bottom: 0.75rem;
  font-size: 1.35rem;
}

.feature-item p {
  font-size: 1.05rem;
  color: var(--text-light);
}

.trusted-logos {
  display: flex;
  gap: 2.5rem;
  opacity: 0.6;
  filter: grayscale(1);
}

.trusted-logos span {
  font-weight: 700;
  font-size: 1.1rem;
  color: var(--text-muted);
}

/* Sections */
.section {
  padding: 8rem 2rem;
  max-width: 1280px;
  margin: 0 auto;
}

.section-header {
  margin-bottom: 4rem;
  max-width: 600px;
}

/* Cards (Light Clean) */
.grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 2rem;
}

.card {
  background: #ffffff;
  border: 1px solid var(--border);
  padding: 2.5rem;
  border-radius: 16px;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.04);
  transition: all 0.3s ease;
  position: relative;
  overflow: hidden;
}

.card:hover {
  transform: translateY(-5px);
  box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
  border-color: #cbd5e1;
}

.card h3 {
  font-size: 1.35rem;
  margin-bottom: 1rem;
  color: #0f172a;
  font-weight: 700;
}

.card i {
  font-size: 2rem;
  color: var(--primary);
  margin-bottom: 1.5rem;
  display: block;
}

.card p {
  font-size: 1rem;
  color: var(--text-muted);
}

/* Company */
.company-split {
  display: grid;
  grid-template-columns: 1.5fr 1fr;
  gap: 4rem;
  align-items: start;
}

.stat-box {
  display: flex;
  gap: 1rem;
  flex-wrap: wrap;
  margin-top: 2rem;
}

.stat {
  background: var(--bg-surface);
  border: 1px solid var(--border);
  padding: 1rem 2rem;
  border-radius: 12px;
  text-align: center;
}

.stat strong {
  display: block;
  font-size: 1.8rem;
  color: var(--primary);
  font-weight: 800;
}

/* Section Contacto */
.section-contacto {
  background-image: url('img/banner_contacto.jpg');
  background-color: var(--bg-gray);
}

.contact-info-center {
  max-width: 1200px;
  margin: 0 auto;
}

.contact-cards {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 2.5rem;
}

.contact-card {
  background: #ffffff;
  padding: 3rem 2rem;
  border-radius: 20px;
  text-align: center;
  box-shadow: 0 10px 30px var(--shadow);
  transition: var(--transition);
}

.contact-card:hover {
  transform: translateY(-10px);
  box-shadow: 0 20px 40px rgba(0, 123, 255, 0.15);
}

.contact-icon-large {
  width: 80px;
  height: 80px;
  background: linear-gradient(135deg, var(--primary), var(--primary-dark));
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 1.5rem;
  box-shadow: 0 10px 25px rgba(0, 123, 255, 0.2);
}

.contact-icon-large i {
  font-size: 2rem;
  color: #ffffff;
}

.contact-card h3 {
  color: var(--text-dark);
  font-size: 1.5rem;
  margin-bottom: 1rem;
}

.contact-card p {
  color: var(--text-light);
  font-size: 1.1rem;
  margin: 0.5rem 0;
  font-weight: 500;
}



/* Footer */
.footer {
  background: linear-gradient(135deg, var(--primary-dark), var(--primary));
  color: #ffffff;
  padding: 1.5rem 0;
}

.footer-content {
  display: flex;
  flex-direction: row;
  justify-content: space-between;
  align-items: center;
  gap: 2rem;
}

.footer-logo img {
  width: 160px;
}

.footer-text {
  text-align: right;
}

.footer-text p {
  color: rgba(255, 255, 255, 0.9);
  font-size: 1rem;
  margin: 0;
}

/* Animations */
@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(30px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes fadeIn {
  from {
    opacity: 0;
  }
  to {
    opacity: 1;
  }
}

@keyframes bounce {
  0%, 20%, 50%, 80%, 100% {
    transform: translateX(-50%) translateY(0);
  }
  40% {
    transform: translateX(-50%) translateY(-10px);
  }
  60% {
    transform: translateX(-50%) translateY(-5px);
  }
}

/* Responsive */
@media (max-width: 768px) {
  .nav-links {
    position: fixed;
    top: 70px;
    left: -100%;
    width: 100%;
    height: calc(100vh - 70px);
    background: rgba(255, 255, 255, 0.98);
    backdrop-filter: blur(10px);
    flex-direction: column;
    justify-content: center;
    align-items: center;
    gap: 2rem;
    transition: left 0.3s ease;
  }

  .nav-links.active {
    left: 0;
  }

  .menu-toggle {
    display: flex;
  }

  .hero-logo {
    width: 200px;
  }

  .services-grid,
  .features-grid {
    grid-template-columns: 1fr;
  }

  .contact-cards {
    grid-template-columns: 1fr;
    gap: 1.5rem;
  }

  .stats-row {
    grid-template-columns: 1fr;
    gap: 1.5rem;
  }

  .section {
    min-height: auto;
    padding: 4rem 0;
  }

  .container {
    padding: 0 1.5rem;
  }

  .footer-content {
    flex-direction: column;
    text-align: center;
  }

  .footer-text {
    text-align: center;
  }
}

@media (max-width: 480px) {
  .hero-banner h1 {
    font-size: 2rem;
  }

  .hero-subtitle {
    font-size: 1rem;
  }

  .btn-primary {
    padding: 0.875rem 2rem;
    font-size: 1rem;
  }

  .section-header h2 {
    font-size: 1.75rem;
  }

  .content-text {
    padding: 2rem 1.5rem;
  }
}