/* ======================================================
   RESET GENERAL Y CONFIGURACIONES BÁSICAS
   ====================================================== */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html, body {
  overflow-x: hidden;
  width: 100%;
  scroll-behavior: smooth;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

body {
  font-family: 'Hind', sans-serif;
  background-color: #f5f5f5;
  color: #003057;
  line-height: 1.6;
  font-size: 16px;
}

.container {
  width: 100%;
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 20px;
}

/* ======================================================
   HEADER Y NAVEGACIÓN
   ====================================================== */
header {
  background-color: #ffffff;
  border-bottom: 1px solid #e6e6e6;
  position: sticky;
  top: 0;
  z-index: 1000;
  box-shadow: 0 2px 5px rgba(0,0,0,0.05);
}

.navbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  height: 90px;
  padding: 0 10px;
}

.logo img {
  height: 50px;
  width: auto;
}

.navbar-nav {
  display: flex;
  align-items: center;
  list-style: none;
  gap: 25px;
  height: 100%;
  font-weight: 700;
}

.navbar-nav li {
  display: flex;
  align-items: center;
  height: 100%;
  position: relative;
}

.navbar-nav li a {
  display: flex;
  align-items: center;
  height: 100%;
  padding: 10px 12px;
  color: #003057;
  text-decoration: none;
  font-weight: 800;
  font-size: 16px;
  border-radius: 4px;
  transition: background-color 0.3s ease, color 0.3s ease;
}

.navbar-nav li a:hover,
.navbar-nav li a.active {
  background-color: #0076a3;
  color: #fff;
  outline-offset: 2px;
  outline: 2px solid #005f82;
}

/* BOTÓN CATPORTAL */
.navbar-nav li a.btn-catportal {
  background-color: #003366;
  color: #fff !important;
  padding: 8px 20px;
  border-radius: 6px;
  font-weight: 700;
  line-height: 1.2;
  height: auto;
  transition: background-color 0.3s ease;
}

.navbar-nav li a.btn-catportal:hover,
.navbar-nav li a.btn-catportal:focus {
  background-color: #00509e;
  outline: none;
}

/* ======================================================
   SUBMENÚS DESPLEGABLES
   ====================================================== */
.dropdown-menu {
  display: none;
  position: absolute;
  top: 100%;
  left: 0;
  background: #fff;
  min-width: 220px;
  z-index: 999;
  box-shadow: 0 4px 12px rgba(0,0,0,0.15);
  border-radius: 6px;
  padding: 8px 0;
}

.dropdown-menu li a {
  display: block;
  padding: 10px 20px;
  font-weight: 400;
  color: #003057;
  white-space: nowrap;
  transition: background-color 0.3s ease;
  border-radius: 4px;
}

.dropdown-menu li a:hover,
.dropdown-menu li a:focus {
  background-color: #e6f4fb;
  color: #0076a3;
}

.navbar-nav li.dropdown:hover > .dropdown-menu,
.navbar-nav li.dropdown:focus-within > .dropdown-menu {
  display: block;
}

/* ======================================================
   HERO SLIDER
   ====================================================== */
#hero {
  position: relative;
  height: 65vh;
  overflow: hidden;
  margin-bottom: 30px;
}

#hero .slide {
  position: absolute;
  width: 100%;
  height: 100%;
  top: 0;
  left: 0;
  background-size: cover;
  background-position: center center;
  opacity: 0;
  z-index: 0;
  transition: opacity 0.6s ease-in-out;
}

#hero .slide.active {
  opacity: 1;
  z-index: 1;
}

#hero h1 {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  text-align: center;
  font-size: clamp(2rem, 6vw, 4rem);
  color: #fff;
  background-color: rgba(0, 0, 0, 0.65);
  padding: 12px 25px;
  border-radius: 8px;
  z-index: 2;
  user-select: none;
}

/* ======================================================
   SECCIÓN VIDEO PRESENTACIÓN
   ====================================================== */
#video-presentacion {
  margin-bottom: 40px;
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 0 10px;
}

#video-presentacion h2 {
  color: #003057;
  font-size: 2.8rem;
  margin-bottom: 20px;
  font-weight: 800;
  text-align: center;
  line-height: 1.2;
}

#video-presentacion video {
  width: 90%;
  max-width: 1200px;
  height: auto;
  background-color: #ffffff;
  border-radius: 8px;
  box-shadow: 0 6px 16px rgba(0,0,0,0.1);
}

/* ======================================================
   TÍTULOS DE SECCIÓN CENTRADOS Y SUBRAYADOS
   ====================================================== */
section.container > h2,
#clientes > h2 {
  display: flex;
  justify-content: center;
  align-items: center;
  text-align: center;
  margin-bottom: 40px;
  font-size: 2.8rem;
  font-weight: 800;
  color: #003057;
  line-height: 1.2;
}

section.container > h2 span,
#clientes > h2 span {
  display: inline-block;
  position: relative;
  padding-bottom: 10px;
}

section.container > h2 span::after,
#clientes > h2 span::after {
  content: '';
  position: absolute;
  width: 60%;
  height: 4px;
  background-color: #00a7e1;
  bottom: 0;
  left: 50%;
  transform: translateX(-50%);
  border-radius: 3px;
}

/* ======================================================
   CARDS SERVICIOS
   ====================================================== */
.row {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 25px;
  margin-bottom: 50px;
}

.card {
  flex: 1 1 calc(33.333% - 25px);
  max-width: calc(33.333% - 25px);
  background-color: #ffffff;
  border-radius: 12px;
  box-shadow: 0 4px 18px rgba(0, 0, 0, 0.14);
  overflow: hidden;
  transition: transform 0.3s ease, box-shadow 0.3s ease;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  padding-bottom: 20px;
  cursor: default;
}

.card:hover,
.card:focus-within {
  transform: translateY(-10px);
  box-shadow: 0 10px 28px rgba(0, 0, 0, 0.25);
  outline: none;
}

.card img {
  width: 100%;
  height: 240px;
  object-fit: cover;
  border-bottom: 4px solid #00a7e1;
  border-radius: 12px 12px 0 0;
}

.card h3 {
  color: #003057;
  font-weight: 900;
  font-size: 1.6rem;
  margin: 25px 0 10px;
  position: relative;
}

.card h3::after {
  content: '';
  width: 50px;
  height: 4px;
  background-color: #00a7e1;
  display: block;
  margin: 10px auto 0;
  border-radius: 3px;
}

.card p {
  font-size: 1rem;
  color: #333333;
  padding: 0 25px;
  margin-bottom: 20px;
  line-height: 1.4;
}

.card a {
  background-color: #003366;
  color: #fff !important;
  padding: 12px 25px;
  border-radius: 8px;
  font-weight: 700;
  font-size: 1rem;
  text-decoration: none;
  display: inline-block;
  transition: background-color 0.3s ease, box-shadow 0.3s ease;
  margin-top: auto;
  box-shadow: 0 4px 8px rgba(0, 51, 102, 0.3);
}

.card a:hover,
.card a:focus {
  background-color: #0076a3;
  color: #fff;
  outline: none;
}

/* ======================================================
   RESPONSIVE
   ====================================================== */
@media (max-width: 768px) {
  .row {
    flex-direction: column;
    align-items: center;
  }

  .card {
    width: 90%;
    max-width: 450px;
    flex: none;
    margin-bottom: 30px;
  }

  .navbar-nav {
    display: none;
    position: fixed;
    top: 90px;
    right: 0;
    background: #fff;
    height: calc(100vh - 90px);
    width: 250px;
    flex-direction: column;
    padding-top: 20px;
    box-shadow: -4px 0 8px rgba(0,0,0,0.1);
    z-index: 1100;
    overflow-y: auto;
  }

  .navbar-nav.open {
    display: flex;
  }

  .navbar-toggle {
    display: flex;
  }

  header {
    padding: 0 10px;
  }

  #video-presentacion h2 {
    font-size: 2rem;
  }

  section.container > h2 {
    font-size: 2.2rem;
  }
}
/* Mobile menu */
.navbar-toggle {
  display: none;
  flex-direction: column;
  cursor: pointer;
  z-index: 1001;
}

.navbar-toggle span {
  width: 25px;
  height: 3px;
  background: #003057;
  margin: 3px 0;
  transition: 0.3s;
}

/* ======================================================
   ACCESIBILIDAD Y OTROS DETALLES
   ====================================================== */
*:focus {
  outline: 2px solid #00a7e1;
  outline-offset: 2px;
}
/* ======================================================
   CARRUSEL CLIENTES
   ====================================================== */
#clientes {
  width: 100%;
  min-height: 60vh;
  background-image: url('../images/clientes/cat-mundial.jpg');
  background-size: cover;
  background-attachment: fixed;
  background-position: center center;
  background-repeat: no-repeat;
  padding: 60px 0;
  text-align: center;
  position: relative;
  color: #003057;
  overflow: hidden;
}

#clientes::before {
  content: '';
  position: absolute;
  inset: 0;
  background: rgba(255, 255, 255, 0.25);
  z-index: 1;
  pointer-events: none;
}

#clientes h2 {
  position: relative;
  z-index: 2;
  font-size: 2.8rem;
  font-weight: 800;
  margin-bottom: 40px;
  color: #003057;
}

.swiper {
  width: 100%;
  padding: 40px 0;
  position: relative;
  z-index: 2;
}

.swiper-wrapper {
  display: flex;
  align-items: center;
  justify-content: space-around;
  margin-top: 40px;
}

.swiper-slide {
  width: auto;
  height: auto;
  display: flex;
  justify-content: center;
  align-items: center;
  padding: 0 35px;
}

.swiper-slide img {
  width: 180px;
  height: 90px;
  object-fit: contain;
  filter: grayscale(60%);
  transition: filter 0.3s ease;
  user-select: none;
}

.swiper-slide img:hover,
.swiper-slide img:focus {
  filter: grayscale(0);
  outline: none;
  cursor: pointer;
}
/* ======================================================
   FOOTER
   ====================================================== */
footer {
  background-color: #02142b;
  color: #fff;
  padding: 25px 20px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  font-size: 0.85rem;
}

.data-fiscal {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  margin-right: 25px;
}

.data-fiscal img {
  width: 50px;
  height: auto;
  margin-bottom: 8px;
}

.data-fiscal p {
  font-size: 0.75rem;
  line-height: 1.4;
  text-align: left;
}

.footer-content {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  flex: 1;
  min-width: 280px;
  margin-bottom: 15px;
}

.footer-info {
  margin-bottom: 15px;
}

.footer-info p {
  font-size: 0.9rem;
  margin-bottom: 6px;
  line-height: 1.5;
}

.footer-info a {
  color: #00a7e1;
  text-decoration: none;
  transition: color 0.3s ease;
}

.footer-info a:hover,
.footer-info a:focus {
  color: #fff;
  outline: none;
}

.social-icons {
  list-style: none;
  display: flex;
  justify-content: center;
  gap: 14px;
  margin-bottom: 10px;
  padding: 0;
}

.social-icons li a {
  font-size: 18px;
  color: #00a7e1;
  transition: color 0.3s ease;
}

.social-icons li a:hover,
.social-icons li a:focus {
  color: #fff;
  outline: none;
}

.copyright {
  font-size: 0.75rem;
  text-align: center;
  flex-basis: 100%;
  margin-top: 10px;
  color: #a9a9a9;
}

/* ======================================================
   RESPONSIVE MEDIA QUERIES
   ====================================================== */

@media (max-width: 768px) {
  .swiper-wrapper {
    flex-wrap: wrap;
    justify-content: flex-start !important;
    padding-left: 10px;
  }

  .swiper-slide {
    padding: 10px;
    width: auto !important;
    flex-shrink: 0;
    margin-bottom: 25px;
  }

  .swiper-slide img {
    width: 100px !important;
    height: auto;
    max-width: 100%;
  }

  #clientes h2 {
    font-size: 2.2rem;
  }
}
/* Responsive */
@media (max-width: 768px) {
  .navbar-nav {
    display: none;
    position: fixed;
    top: 70px;
    left: 0;
    width: 100%;
    background: white;
    flex-direction: column;
    padding: 1rem;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
  }
  
  .navbar-nav.active {
    display: flex;
  }
  
  .navbar-toggle {
    display: flex;
  }
  
  .contact-grid {
    grid-template-columns: 1fr;
    gap: 2rem;
  }
  
  .contact-section h1 {
    font-size: 2rem;
  }
}
/* Accessibility improvements */
@media (prefers-reduced-motion: reduce) {
  * {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}

/* Focus indicators */
*:focus {
  outline: 2px solid #00a7e1;
  outline-offset: 2px;
}

/* Loading skeleton */
.skeleton {
  background: linear-gradient(90deg, #f0f0f0 25%, #e0e0e0 50%, #f0f0f0 75%);
  background-size: 200% 100%;
  animation: loading 1.5s infinite;
}

@keyframes loading {
  0% { background-position: 200% 0; }
  100% { background-position: -200% 0; }
}
