/* --- Sección Proyectos --- */

.projects-section {
  position: relative;
  width: 100%;
  padding: 120px 0;
  background-color: #050505;
  overflow: hidden;
  font-family: 'Inter', system-ui, -apple-system, sans-serif;
}

.glow-orb-projects {
  position: absolute;
  border-radius: 50%;
  filter: blur(100px);
  z-index: 0;
  pointer-events: none;
}

.orb-1 {
  width: 600px;
  height: 600px;
  background: rgba(74, 144, 226, 0.1);
  top: -200px;
  left: -200px;
}

.orb-2 {
  width: 500px;
  height: 500px;
  background: rgba(120, 150, 255, 0.08);
  bottom: 0;
  right: -150px;
}

/* --- 1. Hero --- */

.projects-hero {
  position: relative;
  z-index: 1;
  max-width: 800px;
  margin-bottom: 60px;
}

.hero-title-projects {
  color: #ffffff;
  font-family: 'Outfit', sans-serif;
  font-size: 3rem;
  font-weight: 700;
  line-height: 1.15;
  letter-spacing: -0.5px;
  margin-bottom: 20px;
}

.hero-subtitle-projects {
  color: rgba(255, 255, 255, 0.65);
  font-size: 1.15rem;
  line-height: 1.6;
  margin-bottom: 30px;
}

.btn-primary-projects {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 14px 32px;
  border-radius: 50px;
  background: transparent;
  color: #ffffff;
  font-weight: 600;
  text-decoration: none;
  border: 1px solid rgba(255, 255, 255, 0.3);
  transition: all 0.4s ease;
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
}

.btn-primary-projects:hover {
  background: rgba(255, 255, 255, 0.1);
  border-color: #9fcb2d;
  color: #9eba57;
  transform: translateY(-3px);
  box-shadow: 0 10px 20px rgba(159,203,45,0.45);
}

/* --- 2. Barra de Filtros --- */

.filter-container {
  position: relative;
  z-index: 10;
  margin-bottom: 50px;
}

.filter-glass-panel {
  background: rgba(20, 25, 35, 0.6);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-top-color: rgba(255, 255, 255, 0.2);
  border-radius: 20px;
  padding: 25px;
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.5);
  display: flex;
  flex-wrap: wrap;
  gap: 20px;
  align-items: center;
  justify-content: space-between;
}

.filter-title {
  color: #ffffff;
  font-family: 'Outfit', sans-serif;
  font-size: 1.1rem;
  font-weight: 600;
  margin: 0;
  width: 100%;
}

.search-box {
  position: relative;
  flex-grow: 1;
  max-width: 350px;
}

.search-box svg {
  position: absolute;
  left: 15px;
  top: 50%;
  transform: translateY(-50%);
  color: rgba(255, 255, 255, 0.4);
}

.search-box input {
  width: 100%;
  padding: 12px 15px 12px 45px;
  border-radius: 50px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  background: rgba(0, 0, 0, 0.3);
  color: #ffffff;
  font-size: 0.9rem;
  outline: none;
  transition: all 0.3s ease;
}

.search-box input:focus {
  border-color: #4a90e2;
  box-shadow: 0 0 15px rgba(74, 144, 226, 0.2);
}

.filter-buttons {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.filter-btn {
  padding: 10px 20px;
  border-radius: 50px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  background: rgba(255, 255, 255, 0.03);
  color: rgba(255, 255, 255, 0.7);
  font-family: 'Outfit', sans-serif;
  font-size: 0.85rem;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.3s ease;
}

.filter-btn:hover, .filter-btn.active {
  background: #9cc62d;
  border-color: #9cc62d;
  color: #ffffff;
  box-shadow: 0 5px 15px rgba(150,226,74,0.3);
}

/* --- 3. Grid de Proyectos --- */

.grid-container {
  position: relative;
  z-index: 1;
  margin-bottom: 80px;
}

.project-card {
  height: 100%;
  background: rgba(20, 25, 35, 0.4);
  backdrop-filter: blur(15px);
  -webkit-backdrop-filter: blur(15px);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 20px;
  overflow: hidden;
  transition: all 0.5s cubic-bezier(0.25, 1, 0.5, 1);
  display: flex;
  flex-direction: column;
  cursor: pointer;
}

.project-card:hover {
  transform: translateY(-10px);
  border-color: rgba(159,203,45,0.45);
  box-shadow: 0 30px 60px rgba(0, 0, 0, 0.6), 0 0 30px rgba(74, 144, 226, 0.15);
}

.project-image-box {
  position: relative;
  width: 100%;
  height: 220px;
  overflow: hidden;
}

.project-image {
  width: 100%;
  height: 100%;
  background-size: cover;
  background-position: center;
  background-color: #1a1f2b;
  transition: transform 0.6s ease;
}

.project-card:hover .project-image {
  transform: scale(1.08);
}

.project-overlay {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: linear-gradient(180deg, rgba(0,0,0,0) 0%, rgba(20,25,35,0.9) 100%);
  z-index: 1;
}

.project-badge {
  position: absolute;
  top: 15px;
  left: 15px;
  padding: 6px 14px;
  border-radius: 50px;
  background: rgba(156,198,45,0.8);
  backdrop-filter: blur(5px);
  -webkit-backdrop-filter: blur(5px);
  color: #ffffff;
  font-family: 'Outfit', sans-serif;
  font-size: 0.75rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 1px;
  z-index: 2;
}

.project-content {
  padding: 25px;
  flex-grow: 1;
  display: flex;
  flex-direction: column;
}

.project-content h4 {
  color: #ffffff;
  font-family: 'Outfit', sans-serif;
  font-size: 1.2rem;
  font-weight: 600;
  line-height: 1.3;
  margin-bottom: 10px;
}

.project-meta {
  color: rgba(255, 255, 255, 0.5);
  font-size: 0.8rem;
  margin-bottom: 15px;
}

.project-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-bottom: 20px;
}

.project-tags span {
  padding: 4px 10px;
  border-radius: 50px;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.1);
  color: rgba(255, 255, 255, 0.7);
  font-size: 0.7rem;
}

.project-link {
  margin-top: auto;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: #9fcb2d;
  font-family: 'Outfit', sans-serif;
  font-size: 0.9rem;
  font-weight: 600;
  text-decoration: none;
  transition: all 0.3s ease;
}

.project-link:hover {
  color: #ffffff;
  gap: 10px;
}

/* Ocultar proyectos filtrados */

.project-item.hidden {
  display: none !important;
}

.no-results {
  text-align: center;
  padding: 40px;
  color: rgba(255, 255, 255, 0.5);
  font-size: 1.1rem;
  width: 100%;
}

/* --- 5. Cifras Globales --- */

.stats-container {
  position: relative;
  z-index: 1;
  margin-bottom: 80px;
}

.stats-glass-panel-projects {
  background: rgba(20, 25, 35, 0.4);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-top-color: rgba(255, 255, 255, 0.2);
  border-radius: 24px;
  padding: 40px;
  box-shadow: 0 30px 60px rgba(0, 0, 0, 0.5);
}

.stats-title {
  color: #ffffff;
  font-family: 'Outfit', sans-serif;
  font-size: 1.8rem;
  font-weight: 700;
  text-align: center;
  margin-bottom: 40px;
}

.stat-box {
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 15px;
}

.stat-number-wrapper {
  display: flex;
  align-items: baseline;
  justify-content: center;
  margin-bottom: 10px;
}

.stat-number {
  color: #ffffff;
  font-family: 'Outfit', sans-serif;
  font-size: 2.2rem;
  font-weight: 700;
  line-height: 1;
  text-shadow: 0 0 15px rgba(74, 144, 226, 0.4);
}

.stat-suffix {
  color: #4a90e2;
  font-family: 'Outfit', sans-serif;
  font-size: 1.4rem;
  font-weight: 600;
  margin-left: 2px;
}

.stat-label {
  color: rgba(255, 255, 255, 0.6);
  font-size: 0.85rem;
  margin: 0;
  text-align: center;
  line-height: 1.4;
}

/* --- 6. CTA Final --- */

.cta-projects-container {
  position: relative;
  z-index: 1;
}

.cta-projects-panel {
  background: rgba(20, 25, 35, 0.4);
  backdrop-filter: blur(24px);
  -webkit-backdrop-filter: blur(24px);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-top-color: rgba(255, 255, 255, 0.25);
  border-radius: 32px;
  padding: 60px 40px;
  box-shadow: 0 40px 80px rgba(0, 0, 0, 0.6);
}

.cta-projects-panel h2 {
  color: #ffffff;
  font-family: 'Outfit', sans-serif;
  font-size: 2.5rem;
  font-weight: 700;
  margin-bottom: 15px;
}

.cta-projects-panel p {
  color: rgba(255, 255, 255, 0.65);
  font-size: 1.1rem;
  margin-bottom: 30px;
}

.cta-buttons-projects {
  display: flex;
  justify-content: center;
  gap: 20px;
  flex-wrap: wrap;
}

.btn-primary-cta-projects {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 16px 36px;
  border-radius: 50px;
  background: linear-gradient(135deg, #4a90e2 0%, #2563eb 100%);
  color: #ffffff;
  font-weight: 600;
  text-decoration: none;
  border: 1px solid rgba(255, 255, 255, 0.2);
  box-shadow: 0 10px 25px rgba(37, 99, 235, 0.4);
  transition: all 0.4s ease;
}

.btn-primary-cta-projects:hover {
  transform: translateY(-3px) scale(1.02);
  box-shadow: 0 15px 35px rgba(37, 99, 235, 0.6);
  color: #ffffff;
}

.btn-secondary-cta-projects {
  display: inline-flex;
  align-items: center;
  padding: 16px 36px;
  border-radius: 50px;
  background: rgba(255, 255, 255, 0.05);
  color: rgba(255, 255, 255, 0.85);
  font-weight: 500;
  text-decoration: none;
  border: 1px solid rgba(255, 255, 255, 0.15);
  transition: all 0.4s ease;
}

.btn-secondary-cta-projects:hover {
  background: rgba(255, 255, 255, 0.12);
  border-color: rgba(255, 255, 255, 0.3);
  color: #ffffff;
  transform: translateY(-3px);
}

/* --- Animaciones Scroll --- */

.reveal-on-scroll {
  opacity: 0;
  transform: translateY(40px);
  transition: opacity 0.8s ease, transform 0.8s ease;
}

.reveal-on-scroll.is-visible {
  opacity: 1;
  transform: translateY(0);
}

/* --- Responsive --- */

@media (max-width: 991px) {
  .hero-title-projects {
    font-size: 2.5rem;
  }
}

@media (max-width: 991px) {
  .filter-glass-panel {
    flex-direction: column;
    align-items: stretch;
  }
}

@media (max-width: 991px) {
  .search-box {
    max-width: 100%;
  }
}

@media (max-width: 991px) {
  .stats-glass-panel-projects {
    padding: 25px;
  }
}

@media (max-width: 768px) {
  .projects-section {
    padding: 80px 0;
  }
}

@media (max-width: 768px) {
  .hero-title-projects {
    font-size: 2rem;
  }
}

@media (max-width: 768px) {
  .hero-subtitle-projects {
    font-size: 1rem;
  }
}

@media (max-width: 768px) {
  .cta-projects-panel {
    padding: 40px 20px;
  }
}

@media (max-width: 768px) {
  .cta-projects-panel h2 {
    font-size: 1.8rem;
  }
}

@media (max-width: 768px) {
  .cta-buttons-projects {
    flex-direction: column;
    width: 100%;
  }
}

@media (max-width: 768px) {
  .btn-primary-cta-projects, .btn-secondary-cta-projects {
    width: 100%;
    justify-content: center;
  }
}

@media (max-width: 768px) {
  .stat-number {
    font-size: 1.8rem;
  }
}

@media (max-width: 768px) {
  .stat-suffix {
    font-size: 1.2rem;
  }
}

