

/* Estilos generales */
:root {
  --primary: #D01718; /* Rojo principal - Team Ruscitti (marca) */
  --primary-hover: #B01415; /* Rojo principal al pasar el ratón (más oscuro) */
  --cta-primary-color: #D01718; /* Color para el botón CTA principal */
  --cta-primary-hover: #B01415; /* Hover para CTA principal */
  --secondary-accent: #FF4547; /* Rojo claro como acento secundario */
  --secondary-accent-hover: #D01718; /* Tono más intenso al pasar el ratón */
  --blue-primary: #001941; /* Azul principal - Team Ruscitti (marca) */
  --blue-hover: #002255; /* Azul hover (ligeramente más claro) */
  --blue-light: #1a365d; /* Azul claro para acentos */
  --text-dark: #001941; /* Texto oscuro principal (azul marca) */
  --text-light: #e2e8f0; /* Texto claro para fondos oscuros */
  --bg-light: #F5F2E5; /* Fondo beige/crema - Team Ruscitti (marca) */
  --bg-lighter: #ffffff; /* Fondo blanco puro */
  --bg-dark: #001941; /* Fondo oscuro azul marca para cabecera, footer */
  --card-bg: rgba(255, 255, 255, 0.95); /* Fondo blanco semi-transparente para tarjetas */
  --border-color-light: #e5e7eb; /* Color de borde sobre fondos claros */
  --border-color-dark: #001941; /* Color de borde azul marca sobre fondos oscuros */
}

/* Tipografía FinalSix - Aplicación global */
body {
  background-color: var(--bg-light) !important; /* Fondo fallback */
  color: var(--text-dark); /* Color de texto principal oscuro */
  overflow-x: hidden;
  font-family: 'FinalSix', sans-serif;
  font-weight: 400;
  position: relative;
  z-index: 1;
}

body::before {
  content: '';
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  background-image: url('../recursos/fondotextura.jpg') !important;
  background-size: cover !important;
  background-attachment: fixed !important;
  background-repeat: no-repeat !important;
  background-position: center top !important;
  z-index: -1;
  opacity: 0.5;
}

/* Fallback para dispositivos móviles con imagen específica para móvil */
@media (max-width: 790px) {
  body::before {
    background-image: url('../recursos/fondotextura-mobile.jpg') !important; /* Imagen específica para móvil */
    background-attachment: scroll !important;
    background-size: cover !important;
    background-repeat: no-repeat !important;
    background-position: center center !important; /* Centrado para mejor visualización en móvil */
  }
}

/* Títulos con diferentes pesos de FinalSix */
h1, .h1 {
  font-family: 'FinalSix', sans-serif;
  font-weight: 900; /* Black para títulos principales */
}

h2, .h2 {
  font-family: 'FinalSix', sans-serif;
  font-weight: 800; /* ExtraBold para subtítulos importantes */
}

h3, .h3 {
  font-family: 'FinalSix', sans-serif;
  font-weight: 700; /* Bold para subtítulos */
}

h4, .h4 {
  font-family: 'FinalSix', sans-serif;
  font-weight: 600; /* Semibold para títulos menores */
}

h5, .h5, h6, .h6 {
  font-family: 'FinalSix', sans-serif;
  font-weight: 500; /* Medium para títulos pequeños */
}

/* Botones y CTAs con tipografía destacada */
button, .btn, .cta-primary, .cta-secondary {
  font-family: 'FinalSix', sans-serif;
  font-weight: 600; /* Semibold para botones */
}

/* Navegación con peso medio */
nav, nav *, .nav-link, .navbar-brand {
  font-family: 'FinalSix', sans-serif;
  font-weight: 500; /* Medium para navegación */
}

/* Texto destacado */
.text-highlight, .lead, .hero-text {
  font-family: 'FinalSix', sans-serif;
  font-weight: 500; /* Medium para texto destacado */
}

/* Texto ligero para descripciones */
.text-light-content, .description, .subtitle {
  font-family: 'FinalSix', sans-serif;
  font-weight: 300; /* Light para descripciones */
}

/* Cards y contenido especial */
.card-title {
  font-family: 'FinalSix', sans-serif;
  font-weight: 700; /* Bold para títulos de cards */
}

.card-text, .card-description {
  font-family: 'FinalSix', sans-serif;
  font-weight: 400; /* Regular para contenido de cards */
}

/* Navegación */
.bg-slate-900\/80 {
    background-color: rgba(26, 32, 44, 0.8); /* Ajustar a var(--bg-dark) con opacidad */
    backdrop-filter: blur(10px); /* Mantener blur */
    border-color: var(--border-color-dark);
}

/* Clase para textura de fondo */
.bg-textura {
  background-color: var(--bg-light) !important;
  background-image: url('../recursos/fondotextura.jpg') !important;
  background-size: cover !important;
  background-attachment: fixed !important;
  background-repeat: no-repeat !important;
  background-position: center top !important;
}

@media (max-width: 790px) {
  .bg-textura {
    background-image: url('../recursos/fondotextura-mobile.jpg') !important;
    background-attachment: scroll !important;
    background-size: cover !important;
    background-position: center center !important;
  }
}

/* Elementos animados */


.animate-pulse {
  animation: pulse 2s cubic-bezier(0.4, 0, 0.6, 1) infinite;
}

.animate-gradient {
  background-size: 200% 200%;
  animation: gradient 15s ease infinite;
}



/* Mejoras para trabajar con la textura de fondo */
.bg-white {
  background-color: rgba(255, 255, 255, 0.95) !important;
  backdrop-filter: blur(1px);
}

.bg-slate-50 {
  background-color: rgba(248, 250, 252, 0.90) !important;
  backdrop-filter: blur(1px);
}

.bg-slate-100 {
  background-color: rgba(241, 245, 249, 0.85) !important;
  backdrop-filter: blur(1px);
}

/* Asegurar que las tarjetas se vean bien */
.shadow-lg, .shadow-xl, .shadow-2xl {
  box-shadow: 0 10px 25px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05), 0 0 0 1px rgba(255, 255, 255, 0.1);
}
  animation: 
    typing 3.5s steps(40, end),
    blink-caret .75s step-end infinite;
}

/* Efecto degradado */
.gradient-text {
  background-clip: text;
  -webkit-background-clip: text;
  color: transparent;
  background-image: linear-gradient(90deg, var(--primary), var(--secondary-accent)); /* Gradiente rojo */
}

/* Botones con mayor contraste */
.cta-primary {
  background-color: var(--cta-primary-color);
  color: white; /* Texto blanco en botón principal */
  font-weight: 600;
  padding: 0.75rem 1.5rem;
  border-radius: 9999px;
  transition: all 0.3s ease;
  box-shadow: 0 10px 25px -5px rgba(220, 38, 38, 0.3); /* Sombra roja */
}

.cta-primary:hover {
  background-color: var(--cta-primary-hover);
  transform: translateY(-3px);
  box-shadow: 0 15px 30px -5px rgba(185, 28, 28, 0.4); /* Sombra roja más intensa */
}

.cta-secondary {
  background-color: transparent;
  color: var(--primary); /* Usar color primary para botón secundario en fondo claro */
  border: 1px solid var(--primary); /* Borde con color primary */
  font-weight: 600;
  padding: 0.75rem 1.5rem;
  border-radius: 9999px;
  transition: all 0.3s ease;
}

.cta-secondary:hover {
  background-color: rgba(220, 38, 38, 0.1); /* Fondo ligero rojo al pasar el ratón */
  color: var(--primary-hover);
  border-color: var(--primary-hover);
  transform: translateY(-3px);
  box-shadow: 0 10px 25px -5px rgba(220, 38, 38, 0.1);
}

/* Partículas flotantes */
.particle {
  position: absolute;
  border-radius: 50%;
  background: rgba(220, 38, 38, 0.1); /* Partículas sutiles con tono rojo */
  pointer-events: none;
}

/* Estilos para tarjetas */
.feature-card {
  background-color: var(--card-bg); /* Fondo blanco para tarjetas */
  border: 1px solid var(--border-color-light); /* Borde claro */
  transition: all 0.3s ease;
  box-shadow: 0 4px 6px rgba(0, 0, 0, 0.05); /* Sombra sutil por defecto */
}

.feature-card:hover {
  border-color: var(--primary); /* Borde primary al pasar el ratón */
  box-shadow: 0 10px 20px rgba(0, 0, 0, 0.1); /* Sombra más pronunciada al pasar el ratón */
  transform: translateY(-5px);
}

/* Cómo Funciona - Ajustes */
#como-funciona {
  background-color: var(--bg-light); /* Fondo gris muy claro */
  padding-top: 4rem; /* Ajustar padding superior */
  padding-bottom: 4rem; /* Ajustar padding inferior */
}

#como-funciona .bg-slate-800\/70 { /* Apuntar a los divs internos con fondo semi-transparente */
    background-color: var(--bg-lighter); /* Fondo blanco para los ejemplos */
    border-color: var(--border-color-light); /* Ajustar borde */
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05); /* Sombra sutil */
}

#como-funciona .text-slate-300 { /* Ajustar color de texto si es necesario */
    color: var(--text-dark);
}

/* CTA Section - Ajustes */
.bg-gradient-to-r.from-violet-900.to-indigo-800 { /* Apuntar al div con el gradiente */
    background: linear-gradient(to right, #b91c1c, #dc2626); /* Gradiente CTA con tonos rojos */
    box-shadow: 0 20px 50px -10px rgba(220, 38, 38, 0.5); /* Ajustar sombra roja */
    color: white; /* Asegurar texto blanco */
    padding: 3rem; /* Aumentar padding */
    border-radius: 1.5rem; /* Ajustar borde redondeado */
}

/* Footer - Ajustes de color de texto */
footer.bg-slate-900 {
    background-color: var(--bg-dark); /* Usar variable para el fondo oscuro */
    color: var(--text-light); /* Texto claro */
    border-color: var(--border-color-dark);
}

footer .text-slate-400,
footer .text-slate-500 {
    color: var(--text-light); /* Asegurar texto claro para enlaces y copyright */
}

footer a {
    color: var(--text-light); /* Color de enlace por defecto */
}

footer a:hover {
    color: var(--secondary-accent); /* Acento secundario al pasar el ratón */
}

/* Swiper Styles */
.swiper {
    width: 100%;
    height: 400px;
    border-radius: 0.75rem;
}

.swiper-slide {
    object-fit: fill;
    display: flex;
    justify-content: center;
    align-items: center;
    flex-direction: column;
}

.swiper-button-next, 
.swiper-button-prev {
    color: #dc2626 !important;
}

.swiper-pagination-bullet-active {
    background: #dc2626 !important;
}

/* Project Pages */
.project-hero {
    padding-top: 8rem;
    padding-bottom: 4rem;
    background-image: linear-gradient(135deg, #991b1b, #dc2626);
}

.project-hero__badge {
    background-color: #fee2e2;
    color: #991b1b;
    padding: 0.5rem 1rem;
    border-radius: 9999px;
    font-weight: 600;
    font-size: 0.875rem;
    display: inline-block;
    margin-bottom: 1rem;
}

.project-cta {
    background-color: #dc2626;
    color: white;
    padding: 4rem 0;
    text-align: center;
}

.project-cta__button {
    background-color: white;
    color: #dc2626;
    padding: 0.75rem 2rem;
    border-radius: 9999px;
    font-weight: 600;
    transition: all 0.2s;
}

.project-cta__button:hover {
    background-color: #fee2e2;
}

.project-specs {
    background-color: white;
    padding: 1.5rem;
    border-radius: 0.5rem;
    box-shadow: 0 1px 3px rgba(0,0,0,0.1);
}

/* Estilos del equipo en grid */
.w-20 {
    width: 5rem !important;
    height: 5rem !important;
}

.w-32 {
    width: 8rem !important;
    height: 8rem !important;
}

@media (max-width: 768px) {
    .w-20 {
        width: 3.5rem !important;
        height: 3.5rem !important;
    }
    
    .w-32 {
        width: 5rem !important;
        height: 5rem !important;
    }
}

@media (max-width: 640px) {
    .w-20 {
        width: 3rem !important;
        height: 3rem !important;
    }
    
    .w-32 {
        width: 4rem !important;
        height: 4rem !important;
    }
}

/* Equipo de 7 integrantes - Layout personalizado */
/* Imagen grupal del equipo - VERSIÓN GRANDE */
.team-group-photo {
  position: relative;
  overflow: hidden;
  border-radius: 1.5rem;
}

.team-group-photo img {
  width: 100%;
  height: auto;
  object-fit: cover;
  transition: transform 0.7s ease;
}

.team-group-photo:hover img {
  transform: scale(1.02);
}

/* Sombras más dramáticas para imagen grande */
.team-group-container {
  box-shadow: 
    0 25px 50px -12px rgba(220, 38, 38, 0.3),
    0 0 0 1px rgba(255, 255, 255, 0.1);
  transition: all 0.5s ease;
  border-radius: 1.5rem;
}

.team-group-container:hover {
  box-shadow: 
    0 40px 80px -12px rgba(220, 38, 38, 0.4),
    0 0 0 1px rgba(255, 255, 255, 0.2);
  transform: translateY(-5px);
}

/* Overlay mejorado para imagen grande */
.team-group-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(
    to top, 
    rgba(0,0,0,0.8) 0%, 
    rgba(0,0,0,0.4) 40%, 
    rgba(0,0,0,0.1) 70%, 
    transparent 100%
  );
  opacity: 0;
  transition: opacity 0.5s ease;
  display: flex;
  align-items: flex-end;
  padding: 2rem;
  border-radius: 1.5rem;
}

.team-group-photo:hover .team-group-overlay {
  opacity: 1;
}

/* Badge más prominente */
.team-badge-large {
  position: absolute;
  top: 1.5rem;
  right: 1.5rem;
  background: linear-gradient(135deg, var(--primary), var(--primary-hover));
  color: white;
  padding: 0.75rem 1.5rem;
  border-radius: 9999px;
  font-size: 0.875rem;
  font-weight: 700;
  box-shadow: 0 8px 16px rgba(220, 38, 38, 0.3);
  z-index: 10;
  transition: transform 0.3s ease;
}

.team-group-photo:hover .team-badge-large {
  transform: scale(1.05);
}

/* Efectos especiales para hover */
.scale-102 {
  transform: scale(1.02);
}

.shadow-3xl {
  box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.25);
}

.shadow-4xl {
  box-shadow: 0 35px 70px -12px rgba(0, 0, 0, 0.35);
}

/* Responsive para imagen grupal grande */
@media (max-width: 1024px) {
  .team-group-container {
    max-width: 90vw;
    margin-left: auto;
    margin-right: auto;
  }
}

@media (max-width: 768px) {
  .team-group-container {
    margin-left: 1rem;
    margin-right: 1rem;
    max-width: calc(100vw - 2rem);
  }
  
  .team-group-overlay {
    padding: 1.5rem;
  }
  
  .team-group-overlay h3 {
    font-size: 2rem;
  }
  
  .team-group-overlay p {
    font-size: 1rem;
  }
  
  .team-badge-large {
    top: 1rem;
    right: 1rem;
    padding: 0.5rem 1rem;
    font-size: 0.75rem;
  }
}

/* Noticias Grid - Optimizaciones */
#noticias-grid {
  min-height: 400px; /* Altura mínima para evitar saltos durante la carga */
}

#noticias-grid article {
  transition: all 0.3s ease;
  height: fit-content;
}

#noticias-grid article:hover {
  transform: translateY(-5px);
  box-shadow: 0 15px 35px rgba(220, 38, 38, 0.15);
}

#noticias-grid img {
  transition: transform 0.3s ease;
}

#noticias-grid article:hover img {
  transform: scale(1.05);
}

/* Responsive para noticias */
@media (max-width: 1024px) {
  #noticias-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 640px) {
  #noticias-grid {
    grid-template-columns: 1fr;
    gap: 1rem;
  }
  
  #noticias-grid article {
    margin-bottom: 0;
  }
}

/* Media queries para dispositivos móviles */
@media (max-width: 640px) {
  h1 {
    font-size: 2.25rem;
    line-height: 2.5rem;
  }
  
  .container {
    padding-left: 1rem;
    padding-right: 1rem;
  }
  
  .cta-container {
    flex-direction: column;
    gap: 1rem;
  }
  
  .cta-primary, .cta-secondary {
    width: 100%;
  }
}

/* Estilos para testimonios */
.testimonios-slider {
    padding: 2rem 0;
    margin: -2rem -4rem;
    clip-path: inset(2rem 4rem);
}

.testimonios-slider .flex {
    transform: translateX(calc(50% - 160px)); /* Centra el slide activo */
}

.testimonio-item {
    transform: scale(0.85);
    opacity: 0.7;
    transition: all 0.5s ease;
    filter: grayscale(50%);
}

.testimonio-item.active {
    transform: scale(1);
    opacity: 1;
    filter: grayscale(0%);
}

.testimonio-item.active .opacity-0 {
    opacity: 1;
}

/* Media queries para testimonios */
@media (max-width: 1024px) {
    .testimonios-slider {
        margin: -2rem -2rem;
        clip-path: inset(2rem 2rem);
    }
}

@media (max-width: 768px) {
    .testimonios-slider {
        margin: -2rem -1rem;
        clip-path: inset(2rem 1rem);
    }
    
    .testimonios-slider .flex {
        transform: translateX(calc(50% - 160px));
    }
}

@media (max-width: 640px) {
    .testimonio-item {
        width: 280px;
    }
    
    .testimonios-slider .flex {
        transform: translateX(calc(50% - 140px));
    }
}

/* Estilos para Controles */

/* Botón flotante de WhatsApp */
.whatsapp-float {
  position: fixed;
  bottom: 20px;
  right: 20px;
  z-index: 9999;
  background-color: #25D366; /* Verde oficial de WhatsApp */
  color: white;
  border-radius: 50%;
  width: 60px;
  height: 60px;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 4px 12px rgba(37, 211, 102, 0.4);
  transition: all 0.3s ease;
  text-decoration: none;
  cursor: pointer;
}

.whatsapp-float:hover {
  background-color: #128C7E; /* Verde más oscuro al hover */
  transform: scale(1.1);
  box-shadow: 0 6px 20px rgba(90, 173, 88, 0.6);
}

.whatsapp-float svg {
  width: 32px;
  height: 32px;
  fill: currentColor;
}

/* Animación de entrada */
.whatsapp-float {
  animation: whatsapp-bounce 2s infinite;
}

@keyframes whatsapp-bounce {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-5px); }
}

/* Responsive - más pequeño en móvil */
@media (max-width: 768px) {
  .whatsapp-float {
    width: 50px;
    height: 50px;
    bottom: 15px;
    right: 15px;
  }
  
  .whatsapp-float svg {
    width: 26px;
    height: 26px;
  }
}

/* Clases utilitarias para FinalSix */
.finalsix-thin { font-family: 'FinalSix', sans-serif; font-weight: 100; }
.finalsix-light { font-family: 'FinalSix', sans-serif; font-weight: 300; }
.finalsix-regular { font-family: 'FinalSix', sans-serif; font-weight: 400; }
.finalsix-medium { font-family: 'FinalSix', sans-serif; font-weight: 500; }
.finalsix-bold { font-family: 'FinalSix', sans-serif; font-weight: 700; }
.finalsix-extrabold { font-family: 'FinalSix', sans-serif; font-weight: 800; }
.finalsix-black { font-family: 'FinalSix', sans-serif; font-weight: 900; }

/* Clases para truncar texto con line-clamp */
.line-clamp-1 {
  display: -webkit-box;
  -webkit-line-clamp: 1;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.line-clamp-2 {
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.line-clamp-3 {
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

/* Fallback para navegadores que no soportan line-clamp */
@supports not (-webkit-line-clamp: 2) {
  .line-clamp-1 {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
  }
  
  .line-clamp-2,
  .line-clamp-3 {
    overflow: hidden;
    display: block;
    max-height: calc(1.2em * 2); /* aproximadamente 2 líneas */
  }
}
