:root {
  --primary: #0F172A;
  --primary-btn: #2563EB;
  --primary-btn-hover: #1D4ED8;
  --dark: #0F172A;
  --light-bg: #F8FAFC;
  --text-main: #FFF;
  --text-muted: #64748B;
  --white: #FFFFFF;
  --max-width: 1100px;
}

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

body {
  font-family: 'Inter', sans-serif;
  color: var(--text-main);
  background-color: var(--white);
  line-height: 1.6;
}

.container {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 20px;
}

/* Navegación */
.navbar {
  background: rgba(255, 255, 255, 0.95);
  backdrop-filter: blur(10px);
  position: sticky;
  top: 0;
  border-bottom: 1px solid #E2E8F0;
  z-index: 100;
}

.nav-container {
  display: flex;
  justify-content: space-between;
  align-items: center;
  height: 80px;
  position: relative;
}

.logo-link {
  display: flex;
  align-items: center;
  text-decoration: none;
}

.brand-logo {
  height: 42px;
  width: auto;
  object-fit: contain;
}

.nav-links {
  display: flex;
  list-style: none;
  gap: 24px;
  align-items: center;
}

.nav-links a {
  text-decoration: none;
  color: var(--text-main);
  font-weight: 600;
  font-size: 0.95rem;
  transition: color 0.2s ease;
}

.nav-links a:hover {
  color: var(--primary-btn);
}

.nav-actions {
  display: flex;
  align-items: center;
  gap: 12px;
}

.btn-nav {
  background: var(--primary-btn);
  color: var(--white) !important;
  padding: 10px 18px;
  border-radius: 6px;
  font-weight: 600;
  font-size: 0.9rem;
  text-decoration: none;
  white-space: nowrap;
  transition: background 0.2s ease;
}

.btn-nav:hover {
  background: var(--primary-btn-hover);
}

.hamburger {
  display: none;
  flex-direction: column;
  justify-content: space-between;
  width: 24px;
  height: 18px;
  background: transparent;
  border: none;
  cursor: pointer;
  padding: 0;
}

.hamburger span {
  width: 100%;
  height: 2px;
  background-color: var(--dark);
  border-radius: 2px;
  transition: all 0.3s ease;
}

.hamburger.active span:nth-child(1) {
  transform: translateY(8px) rotate(45deg);
}

.hamburger.active span:nth-child(2) {
  opacity: 0;
}

.hamburger.active span:nth-child(3) {
  transform: translateY(-8px) rotate(-45deg);
}

/* Hero Section */
.hero {
  padding: 80px 0 60px;
  text-align: center;
  background: radial-gradient(circle at top, #F1F5F9 0%, #FFFFFF 100%);
}

.badge {
  background: #E2E8F0;
  color: var(--dark);
  font-size: 0.85rem;
  font-weight: 700;
  padding: 6px 14px;
  border-radius: 20px;
  text-transform: uppercase;
}

.hero h1 {
  font-size: 2.75rem;
  font-weight: 800;
  color: var(--dark);
  margin: 20px 0;
  line-height: 1.2;
}

.hero p {
  font-size: 1.15rem;
  color: var(--text-muted);
  max-width: 700px;
  margin: 0 auto 30px;
}

.hero-btns {
  display: flex;
  justify-content: center;
  gap: 15px;
}

.btn-primary {
  background: var(--primary-btn);
  color: var(--white);
  padding: 14px 28px;
  border-radius: 8px;
  text-decoration: none;
  font-weight: 600;
  border: none;
  cursor: pointer;
}

.btn-secondary {
  background: transparent;
  color: var(--text-main);
  padding: 14px 28px;
  border-radius: 8px;
  text-decoration: none;
  font-weight: 600;
  border: 1px solid #CBD5E1;
}

/* Servicios */
.services {
  padding: 80px 0;
  background-color: var(--light-bg);
}

.section-title {
  text-align: center;
  font-size: 2rem;
  color: var(--dark);
  margin-bottom: 10px;
}

.section-subtitle {
  text-align: center;
  color: var(--text-muted);
  margin-bottom: 40px;
  font-size: 1rem;
}

.grid-services {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 30px;
}

.card {
  background: var(--white);
  padding: 35px;
  border-radius: 12px;
  border: 1px solid #E2E8F0;
  box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.05);
}

.card .icon {
  font-size: 2rem;
  margin-bottom: 15px;
}

.card h3 {
  font-size: 1.25rem;
  color: var(--dark);
  margin-bottom: 10px;
}

.card p {
  color: var(--text-muted);
  font-size: 0.95rem;
}

/* Portafolio de Trabajos */
.portfolio {
  padding: 80px 0;
  background-color: var(--white);
}

.grid-portfolio {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 25px;
  justify-content: center;
}

.portfolio-card {
  background: var(--white);
  border: 1px solid #E2E8F0;
  border-radius: 12px;
  overflow: hidden;
  text-decoration: none;
  color: inherit;
  transition: transform 0.3s ease, box-shadow 0.3s ease;
  display: flex;
  flex-direction: column;
}

.portfolio-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 12px 24px rgba(0, 0, 0, 0.1);
}

.portfolio-thumb {
  position: relative;
  width: 100%;
  padding-top: 133%; /* Proporción 3:4 vertical de Instagram */
  background: #0F172A;
  overflow: hidden;
}

.portfolio-thumb img {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.4s ease;
}

.portfolio-card:hover .portfolio-thumb img {
  transform: scale(1.05);
}

.play-overlay {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(15, 23, 42, 0.35);
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.3s ease;
}

.portfolio-card:hover .play-overlay {
  background: rgba(15, 23, 42, 0.2);
}

.play-icon {
  width: 50px;
  height: 50px;
  background: #2563EB;
  color: #FFFFFF;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.2rem;
  padding-left: 3px;
  box-shadow: 0 4px 12px rgba(37, 99, 235, 0.4);
  transition: transform 0.3s ease;
}

.portfolio-card:hover .play-icon {
  transform: scale(1.15);
}

.portfolio-info {
  padding: 20px;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.portfolio-tag {
  font-size: 0.75rem;
  font-weight: 700;
  color: #2563EB;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.portfolio-info h3 {
  font-size: 1.05rem;
  color: #0F172A;
  font-weight: 700;
}

.portfolio-link {
  font-size: 0.85rem;
  color: #64748B;
  font-weight: 600;
  margin-top: 4px;
}
/* Metodología */
.features {
  padding: 80px 0;
  background-color: var(--light-bg);
}

.grid-features {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 30px;
}

.feature-item h4 {
  font-size: 1.1rem;
  color: var(--dark);
  margin-bottom: 8px;
}

.feature-item p {
  color: var(--text-muted);
  font-size: 0.95rem;
}

/* CTA */
.cta {
  background: var(--dark);
  color: var(--white);
  padding: 80px 0;
  text-align: center;
}

.cta h2 {
  font-size: 2.25rem;
  margin-bottom: 15px;
}

.cta p {
  color: #94A3B8;
  margin-bottom: 30px;
}

.contact-form {
  display: flex;
  justify-content: center;
  gap: 10px;
  max-width: 600px;
  margin: 0 auto;
  flex-wrap: wrap;
}

.contact-form input {
  padding: 14px;
  border-radius: 8px;
  border: 1px solid #334155;
  background: #1E293B;
  color: var(--white);
  flex: 1;
  min-width: 220px;
}

footer {
  padding: 30px 0;
  text-align: center;
  border-top: 1px solid #E2E8F0;
  font-size: 0.85rem;
  color: var(--text-muted);
}

/* Mobile */
@media (max-width: 768px) {
  .hamburger {
    display: flex;
  }

  .btn-nav {
    padding: 8px 12px;
    font-size: 0.82rem;
  }

  .nav-links {
    position: absolute;
    top: 80px;
    left: 0;
    right: 0;
    background: #FFFFFF;
    flex-direction: column;
    padding: 20px 0;
    gap: 0;
    border-bottom: 1px solid #E2E8F0;
    box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1);
    display: none;
  }

  .nav-links.active {
    display: flex;
  }

  .nav-links li {
    width: 100%;
    text-align: center;
  }

  .nav-links a {
    display: block;
    padding: 14px 0;
    font-size: 1rem;
  }

  .hero h1 { font-size: 1.85rem; }
  .hero-btns { flex-direction: column; }
  .contact-form { flex-direction: column; }
}

/* Ajustes para portadas de Instagram */
.portfolio-item {
  width: 100%;
  max-width: 350px;
  min-height: 480px; /* Evita que el contenedor colapse antes de cargar */
  display: flex;
  justify-content: center;
  align-items: flex-start;
  background: #FAFAFA;
  border-radius: 12px;
  overflow: hidden;
}

.portfolio-item blockquote.instagram-media {
  margin: 0 !important;
  width: 100% !important;
  min-width: 100% !important;
  border: 1px solid #E2E8F0 !important;
  border-radius: 12px !important;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.05) !important;
}

/* ==========================================
   ANIMACIÓN FLUIDA DE FONDO (HERO SECTION)
   ========================================== */

.hero {
  position: relative;
  padding: 100px 0 80px;
  text-align: center;
  background: #0F172A; /* Fondo oscuro elegante */
  color: #FFFFFF;
  overflow: hidden;
}

.hero-content {
  position: relative;
  z-index: 2; /* Mantiene el texto sobre la animación */
}

/* Luces suaves resplandecientes (Glow Orbs) */
.hero-bg-animation {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: 1;
  pointer-events: none;
}

.glow-orb {
  position: absolute;
  border-radius: 50%;
  filter: blur(80px);
  opacity: 0.35;
  animation: floatOrb 10s infinite alternate ease-in-out;
}

.orb-1 {
  width: 320px;
  height: 320px;
  background: #2563EB;
  top: -50px;
  left: 10%;
}

.orb-2 {
  width: 380px;
  height: 380px;
  background: #7C3AED;
  bottom: -80px;
  right: 10%;
  animation-delay: -5s;
}

@keyframes floatOrb {
  0% { transform: translateY(0) scale(1); }
  100% { transform: translateY(40px) scale(1.15); }
}

/* Marcos flotantes estilo Reels/TikTok (9:16) */
.phone-frame {
  position: absolute;
  width: 110px;
  height: 195px;
  border: 2px solid rgba(255, 255, 255, 0.15);
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.03);
  backdrop-filter: blur(5px);
  box-shadow: 0 8px 32px 0 rgba(0, 0, 0, 0.37);
  animation: floatPhone 8s infinite ease-in-out;
}

.frame-1 {
  top: 15%;
  left: 6%;
  animation-delay: 0s;
  transform: rotate(-8deg);
}

.frame-2 {
  bottom: 10%;
  right: 8%;
  animation-delay: -3s;
  transform: rotate(10deg);
}

.frame-3 {
  top: 25%;
  right: 22%;
  opacity: 0.4;
  animation-delay: -5s;
  transform: rotate(-4deg) scale(0.8);
}

.frame-content {
  width: 100%;
  height: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  position: relative;
}

.icon-play {
  font-size: 1.2rem;
  color: rgba(255, 255, 255, 0.8);
  background: rgba(37, 99, 235, 0.6);
  width: 36px;
  height: 36px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  padding-left: 3px;
  box-shadow: 0 0 15px rgba(37, 99, 235, 0.5);
}

@keyframes floatPhone {
  0%, 100% { transform: translateY(0) rotate(-6deg); }
  50% { transform: translateY(-20px) rotate(-2deg); }
}

/* Ajustes de contraste para el texto sobre el fondo oscuro */
.hero h1 {
  color: #FFFFFF !important;
}

.hero p {
  color: #94A3B8 !important;
}

.hero .badge {
  background: rgba(37, 99, 235, 0.2);
  color: #60A5FA;
  border: 1px solid rgba(37, 99, 235, 0.4);
}

/* Adaptación para pantallas pequeñas */
@media (max-width: 768px) {
  .phone-frame {
    width: 80px;
    height: 140px;
  }
  .frame-3 {
    display: none; /* Oculta un marco en móviles para evitar recargar */
  }
}
