@import url("https://fonts.googleapis.com/css2?family=Poppins:wght@300;400;600;700&display=swap");
:root {
  --color-primary: #025373;
  --color-secondary: #fea709;
  --header-top-fix-color: #f1f1f1; /* Top Bar */
  --color-accent: #0077b6; /* acento - azul medio */
  --color-success: #00b894; /* acento verde */
  --color-highlight: #f9a825; /* acento amarillo */
}

.bg-patrol {
  background-color: var(--color-primary) !important;
}

.text-patrol {
  color: var(--color-primary) !important;
}

.bg-orange {
  background-color: var(--color-secondary);
}

/* --- Top bar animation --- */
.slider-container {
  height: 35px;
  display: flex;
  justify-content: center;
  align-items: center;
  background: var(--header-top-fix-color);
  font-family: "Poppins", sans-serif;
  font-size: 0.8rem;
  color: #2a2a2a;
  position: relative;
  overflow: hidden;
}

.slider-text {
  position: absolute;
  opacity: 0;
  transition: opacity 1s ease-in-out;
  width: 100%;
}

.slider-text.active {
  opacity: 1;
}

/* --- Hover links secondary nav --- */
.link-hover {
  position: relative;
  transition: color 0.3s ease;
}

.link-hover::after {
  content: "";
  position: absolute;
  left: 0;
  bottom: -3px;
  width: 0%;
  height: 2px;
  background-color: var(--color-secondary);
  transition: width 0.3s ease;
}

.link-hover:hover {
  color: var(--color-secondary) !important;
}

.link-hover:hover::after {
  width: 100%;
}

/* --- Input focus animation --- */
.form-control:focus {
  border-color: var(--color-secondary);
  box-shadow: 0 0 0 0.2rem rgba(254, 167, 9, 0.25);
}

/* --- Badge animation --- */
#num_cart {
  font-size: 0.75rem;
  animation: bounce 2s infinite;
}

@keyframes bounce {
  0%,
  100% {
    transform: translate(-50%, 0);
  }
  50% {
    transform: translate(-50%, -3px);
  }
}

/* --- Navbar animation when scrolling --- */
.transition-header {
  transition: all 0.4s ease-in-out;
}

.navbar-scrolled {
  background-color: rgba(255, 255, 255, 0.95) !important;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.15);
  transform: translateY(0);
}

/* Formulario de contacto */
.contact-form {
  padding: 60px 20px;
}

.contact-form .form-control {
  border-radius: 8px;
  padding: 12px;
}

.contact-form button {
  background-color: var(--color-secondary);
  border: none;
  border-radius: 8px;
  padding: 12px 25px;
  color: rgb(0, 0, 0);
  font-weight: 500;
  transition: 0.3s;
}

.contact-form button:hover {
  background-color: #ffb936;
}
/* Mantener altura uniforme */
.contact-card {
  min-height: 260px;
  transition: all 0.3s ease;
  background-color: var(--color-primary);
  color: #fff;
}

/* Efecto hover general */
.contact-card:hover {
  background-color: var(--color-secondary);
  color: var(--color-primary);
  transform: translateY(-8px);
  box-shadow: 0 12px 25px rgba(0, 0, 0, 0.25);
}

/* Efecto ícono */
.icon-bounce {
  transition: transform 0.4s ease;
  color: var(--color-primary);
}

.contact-card:hover .icon-bounce {
  transform: scale(1.2) rotate(8deg);
}

.project-card {
  background-color: var(--color-primary);
  color: #fff;
  min-height: 260px;
  transition: all 0.35s ease;
}

.project-card:hover {
  background-color: var(--color-secondary);
  color: var(--color-primary);
  transform: translateY(-8px);
  box-shadow: 0 12px 25px rgba(0, 0, 0, 0.25);
}

.project-icon {
  background-color: #fff;
  color: var(--color-primary);
  width: 60px;
  height: 60px;
  border-radius: 50%;
  font-size: 1.8rem;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 1rem;
  transition: transform 0.4s ease, color 0.3s ease;
}

.project-card:hover .project-icon {
  transform: scale(1.2) rotate(10deg);
}

.project-card strong {
  font-size: 1.1rem;
}

.project-card p {
  font-size: 0.95rem;
  line-height: 1.5;
  margin: 0;
}

/* === ANIMACIÓN GENERAL DE ENTRADA === */
@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(30px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

main {
  animation: fadeInUp 0.8s ease-out;
}

/* === ANIMACIONES INDIVIDUALES DE TARJETAS === */
.contact-card,
.project-card,
.contact-form {
  opacity: 0;
  transform: translateY(20px);
  animation: fadeInUp 0.8s ease-out forwards;
}

/* Retrasos progresivos para efecto escalonado */
.contact-card:nth-child(1) {
  animation-delay: 0.2s;
}
.contact-card:nth-child(2) {
  animation-delay: 0.4s;
}
.contact-card:nth-child(3) {
  animation-delay: 0.6s;
}
.project-card:nth-child(4) {
  animation-delay: 0.8s;
}
.project-card:nth-child(5) {
  animation-delay: 1s;
}
.project-card:nth-child(6) {
  animation-delay: 1.2s;
}
.contact-form {
  animation-delay: 0.2s;
}

/* Efecto rebote sutil en los íconos */
@keyframes iconPop {
  0% {
    transform: scale(0.5);
    opacity: 0;
  }
  70% {
    transform: scale(1.1);
    opacity: 1;
  }
  100% {
    transform: scale(1);
  }
}

.icon-bounce i,
.project-icon i {
  animation: iconPop 0.7s ease-out;
}

.text-patrol {
  color: var(--color-primary);
}
.text-accent {
  color: var(--color-secondary);
}

/* HERO */
.hero-about {
  height: 70vh;
  background: linear-gradient(rgba(2, 83, 115, 0.7), rgba(2, 83, 115, 0.7)),
    url("img/about-bg.jpg") center/cover no-repeat;
}
.hero-about .overlay {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.4);
}

/* CARDS */
.hover-card {
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}
.hover-card:hover {
  transform: translateY(-6px);
  box-shadow: 0 10px 25px rgba(0, 0, 0, 0.15);
}

/* CTA */
.cta-section {
  background: linear-gradient(135deg, #025373 0%, #036e8c 40%, #fea709 100%);
  border-bottom: 3px solid #fea709;
}
.hover-grow {
  transition: transform 0.3s ease;
}
.hover-grow:hover {
  transform: scale(1.05);
}

/* Imagen flotante */
.floating-img {
  animation: float 4s ease-in-out infinite;
}
@keyframes float {
  0%,
  100% {
    transform: translateY(0px);
  }
  50% {
    transform: translateY(-10px);
  }
}

/* Gradiente suave */
.bg-gradient {
  background: linear-gradient(180deg, #f8f9fa 0%, #ffffff 100%);
}

/* Botón Hero */
.btn-hero {
  background: var(--color-secondary);
  color: #fff;
  font-weight: 600;
  padding: 0.9rem 2rem;
  border-radius: 50px;
  text-decoration: none;
  transition: all 0.3s ease;
  box-shadow: 0 0 0 rgba(254, 167, 9, 0.4);
  animation: pulseGlow 2s infinite;
}

.btn-hero:hover {
  transform: scale(1.05);
  box-shadow: 0 0 20px rgba(254, 167, 9, 0.6);
  color: #fff;
}

/* Efecto de pulso */
@keyframes pulseGlow {
  0% {
    box-shadow: 0 0 0 0 rgba(254, 167, 9, 0.5);
  }
  70% {
    box-shadow: 0 0 0 15px rgba(254, 167, 9, 0);
  }
  100% {
    box-shadow: 0 0 0 0 rgba(254, 167, 9, 0);
  }
}
