/* FLINCO - Estilos CSS */

:root {
  --font-size: 16px;
  --background: #ffffff;
  --foreground: #242424;
  --primary: #0367A6;
  --primary-foreground: #ffffff;
  --secondary: #60a5fa;
  --secondary-foreground: #030213;
  --accent: #e9ebef;
  --border: rgba(0, 0, 0, 0.1);
  --radius: 0.625rem;
}

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

body {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
  font-size: var(--font-size);
  background: var(--background);
  color: var(--foreground);
  line-height: 1.6;
}

html {
  scroll-behavior: smooth;
}

/* Animaciones */
@keyframes infinite-scroll {
  from {
    transform: translateX(0);
  }
  to {
    transform: translateX(-50%);
  }
}

@keyframes fade-in {
  from {
    opacity: 0;
  }
  to {
    opacity: 1;
  }
}

@keyframes slide-down {
  from {
    opacity: 0;
    transform: translateY(-20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes slide-up {
  from {
    opacity: 0;
    transform: translateY(20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.animate-infinite-scroll {
  animation: infinite-scroll 10s linear infinite;
}

.animate-fade-in {
  animation: fade-in 1s ease-out;
}

.animate-slide-down {
  animation: slide-down 0.8s ease-out;
}

.animate-slide-up {
  animation: slide-up 0.8s ease-out;
}

/* Contenedor */
.container {
  width: 100%;
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 1.5rem;
}

/* Navbar */
.navbar {
  position: fixed;
  width: 100%;
  top: 0;
  left: 0;
  background-color: var(--primary);
  box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
  z-index: 1000;
  padding: 1rem 0;
}

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

.navbar-logo img {
  height: 3rem;
}

.navbar-menu {
  display: flex;
  gap: 2rem;
  align-items: center;
  list-style: none;
}

.navbar-menu a {
  color: white;
  text-decoration: none;
  font-weight: 500;
  transition: opacity 0.3s;
}

.navbar-menu a:hover {
  opacity: 0.8;
}

/* Botones */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.75rem 1.5rem;
  border-radius: var(--radius);
  font-weight: 500;
  text-decoration: none;
  transition: all 0.3s;
  cursor: pointer;
  border: none;
}

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

.btn-primary:hover {
  background-color: #025a8a;
  transform: scale(1.05);
}

.btn-secondary {
  background-color: var(--secondary);
  color: white;
}

.btn-orange {
  background-color: #ff6b35;
  color: white;
}

.btn-green {
  background-color: #10b981;
  color: white;
}

/* Cards */
.card {
  background: white;
  border-radius: 1rem;
  padding: 1.5rem;
  box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
  transition: transform 0.3s, box-shadow 0.3s;
}

.card:hover {
  transform: translateY(-0.5rem);
  box-shadow: 0 10px 20px rgba(0, 0, 0, 0.15);
}

/* Hero Section */
.hero {
  min-height: calc(100vh - 45px);
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  background-size: cover;
  background-position: center;
  position: relative;
  padding-top: 2rem;
}

.hero::before {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(to bottom, rgba(3, 103, 166, 0.7), rgba(2, 57, 106, 0.9));
}

.hero-content {
  position: relative;
  z-index: 10;
  color: white;
  padding: 2rem;
}

.hero h1 {
  font-size: 3.5rem;
  margin-bottom: 1rem;
}

.hero p {
  font-size: 1.25rem;
  margin-bottom: 2rem;
}

/* Footer */
.footer {
  background: linear-gradient(to right, #f3f4f6, #e5e7eb);
  padding: 4rem 0 2rem;
  border-top: 1px solid var(--border);
}

.footer-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 2rem;
  margin-bottom: 2rem;
}

.footer h4 {
  margin-bottom: 1rem;
  color: #374151;
}

.footer a {
  color: #6b7280;
  text-decoration: none;
  transition: color 0.3s;
}

.footer a:hover {
  color: var(--primary);
}

/* Responsive */
@media (max-width: 768px) {
  .navbar-menu {
    display: none;
  }
  
  .hero h1 {
    font-size: 2rem;
  }
  
  .hero p {
    font-size: 1rem;
  }
}

/* Utilidades */
.text-center {
  text-align: center;
}

.mb-1 { margin-bottom: 0.25rem; }
.mb-2 { margin-bottom: 0.5rem; }
.mb-3 { margin-bottom: 1rem; }
.mb-4 { margin-bottom: 1.5rem; }
.mb-5 { margin-bottom: 2rem; }

.mt-1 { margin-top: 0.25rem; }
.mt-2 { margin-top: 0.5rem; }
.mt-3 { margin-top: 1rem; }
.mt-4 { margin-top: 1.5rem; }
.mt-5 { margin-top: 2rem; }

.grid {
  display: grid;
}

.grid-cols-2 { grid-template-columns: repeat(2, 1fr); }
.grid-cols-3 { grid-template-columns: repeat(3, 1fr); }
.grid-cols-4 { grid-template-columns: repeat(4, 1fr); }

.gap-2 { gap: 0.5rem; }
.gap-3 { gap: 1rem; }
.gap-4 { gap: 1.5rem; }

.hidden {
  display: none;
}


/* Topbar Styles */
.bg-dark {
  background-color: #1a1d20 !important; /* Un gris muy oscuro para contraste */
}

/* Evitar que los links de tel y mail se vean como links comunes */
.no-link {
  color: inherit;
  text-decoration: none;
  transition: color 0.3s;
}

.no-link:hover {
  color: var(--secondary);
  text-decoration: none;
}

/* Ajustes para los iconos de redes sociales en el Topbar */
.btn-sm-square {
  width: 30px;
  height: 30px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0;
  font-size: 14px;
}

.rounded-circle {
  border-radius: 50% !important;
}

.btn-outline-light {
  color: #f8f9fa;
  border-color: #f8f9fa;
}

.btn-outline-light:hover {
  background-color: var(--primary);
  border-color: var(--primary);
  color: white;
}

.contenedor-botones {
  position: fixed;
  bottom: 32px;
  right: 33px;
  width: 50px;
  height: 110px; /* Espacio para ambos */
  z-index: 1000;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-end;
  transition: all 0.4s ease;
}

.boton-wha {
  width: 47px;
  height: 47px;
  background-color: #25d366;
  color: #FFF;
  border-radius: 50px;
  font-size: 30px;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 4px 6px rgba(0,0,0,0.2);
  transition: all 0.3s ease;
  position: absolute;
  top: 0; /* WhatsApp arriba */
  animation: pulseSincronizado 2s infinite;
}

.boton-subir {
  width: 47px;
  height: 47px;
  background-color: #2563eb;
  color: #FFF;
  border-radius: 50px;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 4px 6px rgba(0,0,0,0.2);
  border: none;
  cursor: pointer;
  transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
  position: absolute;
  bottom: 0; /* Flecha abajo al inicio */
  animation: pulseSincronizado 2s infinite;
}

/* Hover Zoom */
.boton-wha:hover, .boton-subir:hover { transform: scale(1.15); }

/* Parpadeo Sincronizado */
@keyframes pulseSincronizado {
  0% { box-shadow: 0 0 0 0 rgba(0, 0, 0, 0.2); }
  70% { box-shadow: 0 0 0 10px rgba(0, 0, 0, 0); }
  100% { box-shadow: 0 0 0 0 rgba(0, 0, 0, 0); }
}

/* ESTADOS */
/* 1. Ocultar todo el bloque */
.ocultar-todo { 
  opacity: 0 !important; 
  visibility: hidden !important; 
  transform: translateY(40px); 
}

/* 2. Cuando llegamos al Footer */
.en-footer .boton-wha {
  opacity: 0 !important;
  visibility: hidden !important;
  transform: scale(0) translateY(20px);
}

.en-footer .boton-subir {
  bottom: 60px; /* La flecha sube a la posición de WhatsApp (aprox) */
}

.machine-card {
  position: relative;
  overflow: hidden;
}
.machine-overlay {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.6);
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  transition: opacity 0.3s;
}
.machine-card:hover .machine-overlay {
  opacity: 1;
}
.machine-card:hover {
  transform: translateY(-1rem);
}

/* Clase que aplica el JS al bajar el scroll */
    .top-bar-hidden {
        max-height: 0 !important;
        padding-top: 0 !important;
        padding-bottom: 0 !important;
        opacity: 0;
        pointer-events: none;
        border: none !important;
    }

    /* Opcional: El navbar se vuelve un poco más delgado al bajar */
    .header-scrolled #navbar-main .container {
        padding-top: 0.75rem !important;
        padding-bottom: 0.75rem !important;
    }   

    
        .grid-equipos {
            display: grid;
            /* Definimos 4 columnas iguales */
            grid-template-columns: repeat(4, 1fr);
            gap: 1.5rem;
            max-width: 1100px;
            margin: 0 auto;
            padding: 0 1.5rem;
        }

        .card-equipo {
            background: white;
            height: 100px; 
            border: 2px solid rgba(3, 103, 166, 0.2);
            border-radius: 12px;
            display: flex; 
            align-items: center;    
            justify-content: center; 
            padding: 1rem;
            text-align: center;
            box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.05);
            transition: all 0.3s ease;
        }

        /* Hover */
        .card-equipo:hover {
            transform: translateY(-5px);
            border-color: #0367A6;
            box-shadow: 0 10px 15px -3px rgba(3, 103, 166, 0.1);
        }

        .card-equipo h3 {
            color: #0367A6;
            font-size: 1.1rem;
            font-weight: 700;
            margin: 0;
            line-height: 1.2;
        }

        /* TRUCO PARA EL CENTRADO: */
        /* Forzamos a la tarjeta #9 (Jogers) a empezar en la columna 2 */
        .card-equipo:nth-child(9) {
            grid-column: 2;
        }

        /* Responsivo: En móvil volvemos a 1 o 2 columnas */
        @media (max-width: 768px) {
            .grid-equipos {
                grid-template-columns: repeat(2, 1fr);
            }
            .card-equipo:nth-child(9) {
                grid-column: auto;
            }
        }
        @media (max-width: 480px) {
            .grid-equipos {
                grid-template-columns: 1fr;
            }
        }