/* ==========================================
   1. ESTILOS GLOBALES Y PALETA FUTURISTA
   ================================---------- */
:root {
  --bg-dark: #0b0f17;
  --bg-card: rgba(22, 31, 49, 0.7);
  --primary: #00d2ff;
  --secondary: #925fe2;
  --text-main: #f1f5f9;
  --text-muted: #94a3b8;
  --border-color: rgba(255, 255, 255, 0.1);
}

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  font-family: 'Inter', sans-serif;
  background-color: var(--bg-dark);
  color: var(--text-main);
  line-height: 1.6;
  overflow-x: hidden;
}

/* EFECTO GLASSMORPHISM */
.glass-card {
  background: var(--bg-card);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border: 1px solid var(--border-color);
  border-radius: 16px;
}

/* NAVBAR */
.navbar {
  position: fixed;
  top: 15px;
  left: 50%;
  transform: translateX(-50%);
  width: 90%;
  max-width: 1200px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 12px 30px;
  z-index: 100;
  background: rgba(11, 15, 23, 0.8);
  backdrop-filter: blur(15px);
  border: 1px solid var(--border-color);
  border-radius: 50px;
}

.logo {
  display: flex;
  align-items: center;
  gap: 10px;
}

.logo-img {
  height: 38px;
  width: auto;
}

.brand-name {
  font-weight: 800;
  letter-spacing: 1.5px;
  color: #fff;
  font-size: 16px;
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 25px;
}

.nav-links a {
  text-decoration: none;
  color: var(--text-muted);
  font-size: 14px;
  font-weight: 500;
  transition: color 0.3s;
}

.nav-links a:hover {
  color: var(--primary);
}

.btn-action {
  background: linear-gradient(135deg, var(--primary), var(--secondary));
  color: #fff !important;
  padding: 8px 20px;
  border-radius: 20px;
  font-weight: 600 !important;
  transition: transform 0.3s, box-shadow 0.3s !important;
}

.btn-action:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 15px rgba(0, 210, 255, 0.4);
}

/* HERO SECTION */
.hero {
  position: relative;
  min-height: 95vh;
  padding-top: 140px;
  padding-bottom: 120px;
  display: flex;
  justify-content: center;
  align-items: center;
  text-align: center;
  background: radial-gradient(circle at top center, rgba(146, 95, 226, 0.15), transparent 60%);
}

.hero-badge {
  display: inline-block;
  padding: 6px 16px;
  background: rgba(0, 210, 255, 0.1);
  border: 1px solid rgba(0, 210, 255, 0.3);
  color: var(--primary);
  border-radius: 20px;
  font-size: 12px;
  font-weight: 600;
  margin-bottom: 20px;
}

.hero-logo {
  height: 80px;
  margin: 0 auto 15px;
  display: block;
}

.hero-title {
  font-size: 56px;
  font-weight: 800;
  letter-spacing: -1px;
  max-width: 800px;
  margin: 0 auto 15px;
}

.gradient-text {
  background: linear-gradient(135deg, var(--primary), var(--secondary));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.hero-subtitle, .hero-description {
  color: var(--text-muted);
  font-size: 18px;
  max-width: 600px;
  margin: 0 auto 30px;
}

.hero-buttons {
  display: flex;
  gap: 15px;
  justify-content: center;
}

.btn-primary {
  background: linear-gradient(135deg, var(--primary), var(--secondary));
  color: #fff;
  padding: 12px 30px;
  border-radius: 30px;
  text-decoration: none;
  font-weight: 600;
  transition: transform 0.3s;
}

.btn-secondary {
  border: 1px solid var(--border-color);
  color: #fff;
  padding: 12px 30px;
  border-radius: 30px;
  text-decoration: none;
  font-weight: 600;
  background: rgba(255, 255, 255, 0.05);
}

.btn-primary:hover, .btn-secondary:hover {
  transform: translateY(-3px);
}

/* SECCIONES COMUNES */
.services-section, .portfolio-section {
  padding: 80px 5%;
  text-align: center;
  max-width: 1200px;
  margin: 0 auto;
}

.section-tag {
  color: var(--primary);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 2px;
  display: block;
  margin-bottom: 10px;
}

.section-title {
  font-size: 36px;
  font-weight: 800;
  margin-bottom: 10px;
}

.section-subtitle {
  color: var(--text-muted);
  margin-bottom: 50px;
}

/* CARDS GENERALES Y SERVICIOS (Formato horizontal deslizable) */
.cards-container {
  display: flex !important;
  flex-direction: row !important;
  flex-wrap: nowrap !important;
  gap: 24px;
  overflow-x: auto;
  scroll-behavior: smooth;
  width: 100%;
  padding: 10px 5px 25px 5px;
  scrollbar-width: none;
  -ms-overflow-style: none;
}

.cards-container::-webkit-scrollbar {
  display: none;
}

.cards-container .card, 
.cards-container .servicio-card {
  min-width: 320px !important;
  max-width: 320px !important;
  width: 320px !important;
  flex: 0 0 auto !important;
  padding: 35px 25px;
  text-align: left;
  transition: transform 0.3s, border-color 0.3s;
}

.card:hover, .servicio-card:hover {
  transform: translateY(-5px);
  border-color: var(--primary);
}

.card-icon {
  font-size: 24px;
  font-weight: 800;
  color: var(--primary);
  margin-bottom: 15px;
}

.card h3, .servicio-card h3 {
  font-size: 20px;
  margin-bottom: 12px;
}

.card p, .servicio-card p {
  color: var(--text-muted);
  font-size: 14px;
}

/* ABOUT */
.about-section {
  padding: 60px 5%;
  max-width: 1200px;
  margin: 0 auto;
}

.about-container {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 40px;
  padding: 50px;
  align-items: center;
}

.about-text h2 {
  font-size: 32px;
  margin-bottom: 15px;
}

.about-text p {
  color: var(--text-muted);
  margin-bottom: 25px;
}

.stats-grid {
  display: flex;
  gap: 30px;
}

.stat-item h4 {
  font-size: 28px;
  color: var(--primary);
}

.stat-item p {
  font-size: 12px;
  margin-bottom: 0;
}

.about-img {
  width: 100%;
  border-radius: 12px;
  object-fit: cover;
}

/* ==========================================
   PORTAFOLIO - TAMAÑOS EXACTAMENTE UNIFORMES
   ================================---------- */
.portfolio-scroll-container .portfolio-card {
  min-width: 300px !important;
  max-width: 300px !important;
  width: 350px !important;
  height: 400px !important;
  max-height: 400px !important;
  flex: 0 0 auto !important;
  display: flex !important;
  flex-direction: column !important;
  justify-content: flex-start !important;
  overflow: hidden !important;
}

/* Imagen fija idéntica arriba */
.portfolio-card .portfolio-img {
  width: 100% !important;
  height: 200px !important;
  min-height: 200px !important;
  max-height: 200px !important;
  background-size: cover !important;
  background-position: center !important;
  flex-shrink: 0 !important;
}

/* Contenido de texto con espacio controlado */
.portfolio-card .portfolio-content {
  display: flex !important;
  flex-direction: column !important;
  flex-grow: 1 !important;
  padding: 20px !important;
  justify-content: flex-start !important;
  overflow: hidden !important;
}

.badge {
  font-size: 10px;
  background: rgba(255, 255, 255, 0.1);
  padding: 4px 8px;
  border-radius: 4px;
  color: var(--primary);
  display: inline-block;
  width: max-content;
  flex-shrink: 0;
}

.portfolio-content h3 {
  font-size: 18px;
  margin: 10px 0 5px;
  flex-shrink: 0;
}

.portfolio-content p {
  font-size: 13px;
  color: var(--text-muted);
  overflow: hidden;
  text-overflow: ellipsis;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
}

.portfolio-carousel-wrapper {
  position: relative;
  display: flex;
  align-items: center;
  width: 100%;
}

.portfolio-scroll-container {
  display: flex !important;
  flex-direction: row !important;
  flex-wrap: nowrap !important;
  gap: 24px;
  overflow-x: auto;
  scroll-behavior: smooth;
  width: 100%;
  padding: 10px 5px 25px 5px;
  scrollbar-width: none;
  -ms-overflow-style: none;
}

.portfolio-scroll-container::-webkit-scrollbar {
  display: none;
}

/* Flechas estables */
.carousel-arrow, .scroll-btn {
  position: relative !important;
  top: auto !important;
  left: auto !important;
  right: auto !important;
  transform: none !important;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: rgba(15, 23, 42, 0.85);
  border: 1.5px solid #38bdf8;
  color: #38bdf8;
  font-size: 1.2rem;
  font-weight: bold;
  cursor: pointer;
  z-index: 10;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.4);
  transition: all 0.3s ease;
}

.carousel-arrow:hover, .scroll-btn:hover {
  background: #38bdf8;
  color: #0f172a;
  box-shadow: 0 0 15px rgba(56, 189, 248, 0.5);
}

/* SECCIÓN FAQ */
.faq-section {
  padding: 80px 20px;
  background-color: var(--bg-dark);
  color: #ffffff;
  display: flex;
  justify-content: center;
}

.faq-container {
  max-width: 900px;
  width: 100%;
  text-align: center;
}

.faq-list {
  display: flex;
  flex-direction: column;
  gap: 16px;
  text-align: left;
}

.faq-item {
  background: #121824;
  border: 1.5px solid rgba(255, 255, 255, 0.08);
  border-radius: 12px;
  padding: 18px 24px;
  transition: all 0.3s ease;
  cursor: pointer;
}

.faq-item:hover {
  border-color: var(--primary);
}

.faq-item[open] {
  border-color: #00aaff;
  background: #161e2e;
}

.faq-question {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 1.1rem;
  font-weight: 600;
  color: #e2e8f0;
  list-style: none;
}

.faq-question::-webkit-details-marker {
  display: none;
}

.faq-icon {
  font-size: 1.4rem;
  color: var(--primary);
  transition: transform 0.3s ease;
}

.faq-item[open] .faq-icon {
  transform: rotate(45deg);
}

.faq-answer {
  margin-top: 14px;
  font-size: 0.95rem;
  line-height: 1.6;
  color: var(--text-muted);
  border-top: 1px solid rgba(255, 255, 255, 0.05);
  padding-top: 12px;
}

/* SECCIÓN PROCESO DE TRABAJO (Formato horizontal deslizable y uniforme) */
.process-section {
  padding: 80px 20px;
  background-color: var(--bg-dark);
  color: #ffffff;
  display: flex;
  justify-content: center;
}

.process-container {
  max-width: 1100px;
  width: 100%;
  text-align: center;
}

.process-grid {
  display: flex !important;
  flex-direction: row !important;
  flex-wrap: nowrap !important;
  gap: 24px;
  overflow-x: auto;
  scroll-behavior: smooth;
  margin-top: 40px;
  text-align: left;
  scrollbar-width: none;
  -ms-overflow-style: none;
  padding-bottom: 15px;
}

.process-grid::-webkit-scrollbar {
  display: none;
}

.process-card {
  min-width: 320px !important;
  max-width: 320px !important;
  width: 320px !important;
  height: 320px !important;
  flex: 0 0 auto !important;
  background: #121824;
  border: 1.5px solid rgba(255, 255, 255, 0.08);
  border-radius: 16px;
  padding: 32px 24px;
  position: relative;
  transition: transform 0.3s ease, border-color 0.3s ease;
}

.process-card:hover {
  transform: translateY(-5px);
  border-color: var(--primary);
}

.process-number {
  font-size: 2.5rem;
  font-weight: 900;
  background: linear-gradient(90deg, #00d2ff, #3a7bd5);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  margin-bottom: 12px;
}

.process-card h3 {
  font-size: 1.25rem;
  font-weight: 700;
  color: #ffffff;
  margin-bottom: 12px;
}

.process-card p {
  font-size: 0.95rem;
  line-height: 1.6;
  color: var(--text-muted);
}

/* CONTACTO Y FOOTER */
.contact-section {
  padding: 80px 5% 30px;
  max-width: 1200px;
  margin: 0 auto;
}

.contact-container {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 40px;
  padding: 50px;
}

.contact-info h2 {
  font-size: 30px;
  margin-bottom: 10px;
}

.contact-details {
  margin-top: 30px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  color: var(--text-muted);
}

.contact-form form {
  display: flex;
  flex-direction: column;
  gap: 15px;
}

.input-group input, .input-group textarea {
  width: 100%;
  padding: 12px 15px;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid var(--border-color);
  border-radius: 8px;
  color: #fff;
  font-family: inherit;
}

.input-group input:focus, .input-group textarea:focus {
  outline: none;
  border-color: var(--primary);
}

.full-width {
  width: 100%;
  border: none;
  cursor: pointer;
}

.footer-bottom {
  text-align: center;
  margin-top: 50px;
  font-size: 12px;
  color: var(--text-muted);
}

/* ==========================================
   ADAPTACIÓN RESPONSIVE BÁSICA (MÓVILES)
   ================================---------- */
@media screen and (max-width: 768px) {
  .about-container, .contact-container {
    grid-template-columns: 1fr;
    padding: 25px;
  }
  
  .hero-title {
    font-size: 36px;
  }
  
  .nav-links {
    display: none;
  }
}
/* ==========================================
   PORTAFOLIO - TAMAÑO COMPACTO Y SIN ESPACIO SOBRANTE
   ================================---------- */
.portfolio-scroll-container > div,
.portfolio-scroll-container .portfolio-card,
.portfolio-section .portfolio-card {
  width: 350px !important;
  min-width: 350px !important;
  max-width: 350px !important;
  height: 380px !important; /* Altura compacta ideal para que no sobre espacio */
  min-height: 380px !important;
  max-height: 380px !important;
  flex: 0 0 auto !important;
  display: flex !important;
  flex-direction: column !important;
  box-sizing: border-box !important;
  overflow: hidden !important;
}

/* Imagen superior proporcional */
.portfolio-scroll-container .portfolio-card .portfolio-img,
.portfolio-section .portfolio-card .portfolio-img {
  width: 100% !important;
  height: 180px !important; /* Imagen un poco más equilibrada */
  min-height: 180px !important;
  max-height: 180px !important;
  flex-shrink: 0 !important;
  background-size: cover !important;
  background-position: center !important;
}

/* Contenedor de texto ajustado sin espacios vacíos */
.portfolio-scroll-container .portfolio-card .portfolio-content,
.portfolio-section .portfolio-card .portfolio-content {
  flex: 1 !important;
  display: flex !important;
  flex-direction: column !important;
  justify-content: flex-start !important;
  padding: 15px 20px !important;
  overflow: hidden !important;
}
/* ==========================================
   AJUSTE FINAL: TAMAÑO PERFECTO Y VISIBLE EN MÓVIL
   ================================---------- */
.portfolio-scroll-container > div,
.portfolio-scroll-container .portfolio-card,
.portfolio-section .portfolio-card {
  width: 300px !important;
  min-width: 300px !important;
  max-width: 300px !important;
  height: 380px !important;
  min-height: 380px !important;
  max-height: 380px !important;
  flex: 0 0 auto !important;
  display: flex !important;
  flex-direction: column !important;
  box-sizing: border-box !important;
  overflow: hidden !important;
}

.portfolio-scroll-container {
  display: flex !important;
  flex-direction: row !important;
  flex-wrap: nowrap !important;
  gap: 16px !important;
  overflow-x: auto !important;
  scroll-behavior: smooth !important;
  width: 100% !important;
  padding: 10px 15px 25px 15px !important;
  scrollbar-width: none !important;
  -ms-overflow-style: none !important;
}

.portfolio-scroll-container::-webkit-scrollbar {
  display: none !important;
}
/* ==========================================
   SOLUCIÓN DEFINITIVA PARA TUS TARJETAS
   ================================---------- */
.cards-container {
  display: flex !important;
  flex-direction: row !important;
  flex-wrap: nowrap !important;
  gap: 16px !important;
  overflow-x: auto !important;
  scroll-behavior: smooth !important;
  width: 100% !important;
  padding: 10px 5px 25px 5px !important;
  scrollbar-width: none !important;
  -ms-overflow-style: none !important;
}

.cards-container::-webkit-scrollbar {
  display: none !important;
}

.cards-container .portfolio-card {
  min-width: 300px !important;
  max-width: 300px !important;
  width: 300px !important;
  height: 380px !important;
  min-height: 380px !important;
  max-height: 380px !important;
  flex: 0 0 auto !important;
  display: flex !important;
  flex-direction: column !important;
  box-sizing: border-box !important;
  overflow: hidden !important;
}

.cards-container .portfolio-card .portfolio-img {
  width: 100% !important;
  height: 180px !important;
  min-height: 180px !important;
  max-height: 180px !important;
  flex-shrink: 0 !important;
  background-size: cover !important;
  background-position: center !important;
}

.cards-container .portfolio-card .portfolio-content {
  flex: 1 !important;
  display: flex !important;
  flex-direction: column !important;
  justify-content: flex-start !important;
  padding: 15px 20px !important;
  overflow: hidden !important;
}