/* Variables de color */
:root {
  --primary-red: #FF3B3B;
  --primary-blue: #00BFFF;
  --gradient: linear-gradient(45deg, var(--primary-red), var(--primary-blue));
}

/* ======== Estilos generales ======== */

body {
    font-family: 'Montserrat', 'Helvetica Neue', Helvetica, Arial, sans-serif;
    background-color: #ffffff;
    color: #000000;
    scroll-behavior: smooth; /* Scroll suave al hacer click en los enlaces */
    margin: 0;
    padding: 0;
  }
  
  .navbar {
    background-color: #ffffff;
    transition: all 0.3s ease;
    padding: 1rem 0;
    z-index: 1000;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
  }
  
  .navbar-scrolled {
    background-color: rgba(255, 255, 255, 0.95);
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    padding: 0.5rem 0;
  }
  
  .hero {
    position: relative;
    padding: 120px 0 30px 0;
    display: flex;
    align-items: center;
    overflow: hidden;
    background-color: #ffffff;
  }
  
  .hero::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 100px;
    background: linear-gradient(to bottom, transparent, #ffffff);
    z-index: 1;
  }
  
  .pixel-background {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    display: grid;
    grid-template-columns: repeat(20, 1fr);
    grid-template-rows: repeat(20, 1fr);
    opacity: 0.1;
    z-index: 1;
  }
  
  .pixel-background::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: 
      conic-gradient(from 90deg at 1px 1px, transparent 90deg, #6C3BF7 90deg) 
      0 0/20px 20px;
  }
  
  .hero .container {
    position: relative;
    z-index: 2;
    max-width: 800px;
    display: flex;
    justify-content: center;
  }
  
  .hero-content {
    max-width: 600px;
    width: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
  }
  
  .hero h1 {
    font-size: 3.5rem;
    font-weight: 800;
    margin-bottom: 1.5rem;
    color: #000000;
    text-shadow: none;
    letter-spacing: -0.5px;
    white-space: nowrap;
    text-align: center;
  }
  
  .hero .lead {
    font-size: 1.25rem;
    color: #000000;
    text-shadow: none;
    text-align: center;
    max-width: 500px;
  }
  
  .service-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 1.5rem;
  }
  
  .service-icon img {
    width: 48px;
    height: 48px;
    object-fit: contain;
    transition: transform 0.3s ease;
  }
  
  .service-card:hover .service-icon img {
    transform: scale(1.1);
  }
  
  .btn-primary {
    background: var(--gradient);
    border: none;
  }
  
  .btn-primary:hover {
    background: linear-gradient(45deg, #ff5252, #1a75ff);
  }
  
  /* Footer */
  footer {
    background-color: #ffffff;
    color: #000000;
    border-top: 1px solid rgba(0, 0, 0, 0.1);
  }

  .footer-brand {
    font-size: 1.1rem;
    color: #000000;
  }

  .footer-brand img {
    transition: transform 0.3s ease;
  }

  .footer-brand:hover img {
    transform: scale(1.1);
  }

  @media (max-width: 768px) {
    .footer-brand {
      justify-content: center !important;
      margin-top: 1rem;
    }
    
    footer .text-md-start,
    footer .text-md-end {
      text-align: center !important;
    }
  }

  /* ======== Animaciones de aparición ======== */

.fade-in {
  opacity: 0;
  transform: translateY(20px);
  transition: opacity 0.8s ease-out, transform 0.8s ease-out;
}

.fade-in.visible {
  opacity: 1;
  transform: translateY(0);
}

/* ======== Estilos Nosotros ======== */
#nosotros {
  background-color: #ffffff;
}

.stats-container {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
  text-align: center;
}

.stat-item {
  padding: 20px;
  background: rgba(255, 255, 255, 0.05);
  border-radius: 8px;
  transition: transform 0.3s ease;
}

.stat-item:hover {
  transform: translateY(-5px);
}

.stat-item h4 {
  color: var(--primary-blue);
  font-size: 2.5rem;
  margin-bottom: 10px;
}

.stat-item p {
  color: #ccc;
  margin: 0;
}

/* ======== Estilos Navbar ======== */
.navbar-brand {
  font-weight: 700;
  font-size: 1.5rem;
  letter-spacing: 1px;
  color: #000000 !important;
}

.navbar-toggler {
  border-color: #000000;
}

.navbar-toggler-icon {
  background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 30 30'%3e%3cpath stroke='rgba(0, 0, 0, 0.8)' stroke-linecap='round' stroke-miterlimit='10' stroke-width='2' d='M4 7h22M4 15h22M4 23h22'/%3e%3c/svg%3e");
}

.nav-link {
  color: #000000 !important;
  font-weight: 500;
  padding: 0.5rem 1rem !important;
  position: relative;
  transition: color 0.3s ease;
}

.nav-link::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 50%;
  width: 0;
  height: 2px;
  background: var(--gradient);
  transition: all 0.3s ease;
  transform: translateX(-50%);
}

.nav-link:hover::after {
  width: 100%;
}

@media (max-width: 991.98px) {
  .navbar-collapse {
    background-color: #ffffff;
    padding: 1rem;
    border-radius: 8px;
    margin-top: 1rem;
  }
  
  .nav-link {
    padding: 0.5rem 0 !important;
  }
  
  .nav-link::after {
    display: none;
  }
}

@media (max-width: 768px) {
  .hero {
    padding: 80px 0 20px 0;
  }
  
  .hero .container {
    max-width: 100%;
    padding: 0 15px;
  }
  
  .hero h1 {
    font-size: 2.5rem;
    white-space: normal;
    text-shadow: 0 0 20px rgba(255, 255, 255, 0.4);
  }
  
  .hero .lead {
    font-size: 1.2rem;
  }
  
  #contacto {
    padding: 150px 0 60px 0;
  }
  
  #contacto h1 {
    font-size: 2.5rem;
  }
}

/* ======== Sección Servicios ======== */
#servicios {
  background-color: #ffffff;
  padding: 100px 0;
  position: relative;
}

.services-title {
  color: #000000;
  font-size: 3.5rem;
  font-weight: 700;
  margin-bottom: 1.5rem;
  line-height: 1.2;
}

.title-lines {
  display: flex;
  flex-direction: column;
  gap: 0.6rem;
  margin-bottom: 2rem;
  width: 100%;
}

.title-line {
  height: 5.2px;
  border: none;
  margin: 0;
}

.title-line:first-child {
  background-color: #FF3B3B;
  opacity: 0.4;
  width: 50%;
  margin-left: 0;
}

.title-line:last-child {
  background-color: #00BFFF;
  opacity: 0.4;
  width: 50%;
  margin-left: 10%;
}

.services-grid {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.service-card {
  background: #ffffff;
  padding: 2rem;
  transition: all 0.3s ease;
  display: flex;
  flex-direction: column;
  position: relative;
}

.service-card:hover {
  transform: translateY(-5px);
  background: #f8f9fa;
}

.service-header {
  display: flex;
  align-items: flex-start;
  gap: 1rem;
  margin-bottom: 1rem;
}

.service-card h3 {
  color: #000000;
  font-size: 1.5rem;
  font-weight: 600;
  margin: 0;
  line-height: 1.2;
  padding-top: 0.25rem;
}

.service-card p {
  color: #333333;
  font-size: 1rem;
  line-height: 1.6;
  margin-bottom: 0;
}

.service-icon {
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 1.5rem;
}

.service-icon img {
  width: 48px;
  height: 48px;
  object-fit: contain;
  transition: transform 0.3s ease;
}

.service-card:hover .service-icon img {
  transform: scale(1.1);
}

@media (max-width: 768px) {
  #servicios {
    padding: 60px 0;
  }
  
  .services-title {
    font-size: 2.5rem;
    margin-bottom: 1.5rem;
    text-align: center;
  }
  
  .title-lines {
    gap: 0.4rem;
    margin-bottom: 1.5rem;
  }
  
  .title-line {
    height: 3.9px;
  }
  
  .title-line:first-child {
    width: 45%;
  }
  
  .title-line:last-child {
    width: 45%;
    margin-left: 8%;
  }
  
  .services-grid {
    gap: 0.75rem;
  }
  
  .service-card {
    padding: 1.5rem;
  }
  
  .service-card h3 {
    font-size: 1.3rem;
  }
  
  .service-icon img {
    width: 40px;
    height: 40px;
  }
}

.pixels-container {
  position: relative;
  height: 120px;
  margin: 1rem auto;
  width: 100%;
}

.pixel {
  position: absolute;
  width: 20px;
  height: 20px;
  background-color: var(--primary-red);
  border-radius: 4px;
  opacity: 0.3;
  animation: pixelGlow 2s ease-in-out infinite;
  animation-delay: calc(var(--delay) * 0.2s);
}

.pixel:nth-child(odd) {
  background-color: var(--primary-blue);
}

.pixel:nth-child(1) { top: 20px; left: 30%; }
.pixel:nth-child(2) { top: 60px; left: 15%; }
.pixel:nth-child(3) { top: 40px; left: 70%; }
.pixel:nth-child(4) { top: 80px; left: 45%; }
.pixel:nth-child(5) { top: 10px; left: 85%; }
.pixel:nth-child(6) { top: 100px; left: 25%; }
.pixel:nth-child(7) { top: 30px; left: 55%; }
.pixel:nth-child(8) { top: 70px; left: 80%; }
.pixel:nth-child(9) { top: 50px; left: 10%; }
.pixel:nth-child(10) { top: 90px; left: 65%; }
.pixel:nth-child(11) { top: 15px; left: 40%; }
.pixel:nth-child(12) { top: 75px; left: 20%; }
.pixel:nth-child(13) { top: 45px; left: 90%; }
.pixel:nth-child(14) { top: 85px; left: 5%; }
.pixel:nth-child(15) { top: 25px; left: 75%; }

@keyframes pixelGlow {
  0%, 100% {
    opacity: 0.3;
    transform: scale(1);
  }
  50% {
    opacity: 1;
    transform: scale(1.1);
  }
}

.pixel:hover {
  transform: scale(1.2);
  opacity: 1;
}

@media (max-width: 768px) {
  .pixel {
    width: 10px;
    height: 10px;
  }
}

.container {
  max-width: 960px;
  margin: 0 auto;
  padding: 0 15px;
}

@media (min-width: 1200px) {
  .container {
    max-width: 1140px;
  }
}

/* Botón de WhatsApp */
.whatsapp-button {
  position: fixed;
  bottom: 30px;
  right: 30px;
  background-color: #25D366;
  color: white;
  width: 60px;
  height: 60px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
  transition: all 0.3s ease;
  z-index: 1000;
}

.whatsapp-button:hover {
  background-color: #128C7E;
  transform: scale(1.1);
  color: white;
  box-shadow: 0 6px 16px rgba(0, 0, 0, 0.2);
}

.whatsapp-button svg {
  width: 32px;
  height: 32px;
}

@media (max-width: 768px) {
  .whatsapp-button {
    width: 50px;
    height: 50px;
    bottom: 20px;
    right: 20px;
  }
  
  .whatsapp-button svg {
    width: 28px;
    height: 28px;
  }
}

.social-icons {
  display: flex;
  gap: 1.5rem;
  justify-content: flex-start;
}

.social-icon {
  color: #000000;
  transition: all 0.3s ease;
  opacity: 0.7;
}

.social-icon:hover {
  opacity: 1;
  transform: translateY(-2px);
}

.social-icon img {
  width: 20px;
  height: 20px;
}

@media (max-width: 768px) {
  .social-icons {
    justify-content: center;
  }
  
  .footer-brand {
    justify-content: center;
  }
  
  footer .text-md-start {
    text-align: center !important;
  }
}

/* ======== Sección Contacto ======== */
#contacto {
  background-color: #ffffff;
  padding: 50px 0;
  min-height: 100vh;
  position: relative;
  z-index: 1;
}

#contacto h1 {
  font-size: 3.5rem;
  font-weight: 700;
  color: #000000;
}

#contacto .form-label {
  font-weight: 500;
  color: #333333;
}

#contacto .form-control {
  border: 1px solid #dddddd;
  padding: 0.75rem;
  border-radius: 4px;
}

#contacto .form-control:focus {
  border-color: var(--primary-blue);
  box-shadow: 0 0 0 0.2rem rgba(0, 191, 255, 0.25);
}

@media (max-width: 768px) {
  #contacto {
    padding: 150px 0 60px 0;
  }
  
  #contacto h1 {
    font-size: 2.5rem;
  }
}

.project-types {
  list-style-type: none;
  padding-left: 0;
}

.project-types li {
  position: relative;
  padding-left: 1.5rem;
  margin-bottom: 0.75rem;
}

.project-types li::before {
  content: "•";
  color: #FF3B3B;
  position: absolute;
  left: 0;
  font-size: 1.2rem;
}

.service-content h3 {
  color: #333;
  font-weight: 600;
  margin-bottom: 1rem;
}

.service-content p {
  color: #666;
  line-height: 1.6;
}

.tech-stack-section {
  background-color: #00BFFF;
  color: white;
  padding: 4rem 0;
}

.tech-stack-section h2 {
  color: white;
  font-weight: 600;
  font-size: 2.5rem;
  margin-bottom: 3rem;
}

.tech-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
  gap: 2rem;
  justify-items: center;
  position: relative;
}

.tech-grid .tech-item:nth-last-child(-n+4) {
  grid-column: span 1;
}

@media (min-width: 992px) {
  .tech-grid {
    grid-template-columns: repeat(7, 1fr);
    max-width: 1200px;
    margin: 0 auto;
  }
  
  .tech-grid .tech-item:nth-last-child(-n+4) {
    grid-column: 2 / span 1;
  }
  
  .tech-grid .tech-item:nth-last-child(-n+3) {
    grid-column: 3 / span 1;
  }
  
  .tech-grid .tech-item:nth-last-child(-n+2) {
    grid-column: 4 / span 1;
  }
  
  .tech-grid .tech-item:nth-last-child(-n+1) {
    grid-column: 5 / span 1;
  }
}

.tech-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.75rem;
  transition: transform 0.3s ease;
}

.tech-item:hover {
  transform: translateY(-5px);
}

.tech-item img {
  filter: brightness(0) invert(1);
  transition: transform 0.3s ease;
}

.tech-item:hover img {
  transform: scale(1.1);
}

.tech-item span {
  color: white;
  font-weight: 500;
  font-size: 1rem;
}

@media (max-width: 768px) {
  .tech-stack-section {
    padding: 3rem 0;
  }
  
  .tech-stack-section h2 {
    font-size: 2rem;
    margin-bottom: 2rem;
  }
  
  .tech-grid {
    grid-template-columns: repeat(auto-fit, minmax(100px, 1fr));
    gap: 1.5rem;
  }
  
  .tech-item img {
    width: 40px;
    height: 40px;
  }
}