/* ==========================================================================
   ESTILOS VISTA DE PROYECTOS DETALLADA
   ========================================================================== */
/* Mejora interacción táctil */
button,
a {
    -webkit-tap-highlight-color: transparent;
}

/* Evita zoom raro en inputs */
html {
    touch-action: manipulation;
}

/* Botón Volver */
.volver-btn,
.nav-link,
#btn-home {
    color: var(--primary);
    text-decoration: none;
    font-size: 0.85rem;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 8px;
    transition: 0.3s;
}

.nav-link:hover,
#btn-home:hover {
    opacity: 0.8;
}

/* Nav superior */
.nav-header {
    margin-bottom: 25px;
}

/* TITULOS */
.projects-main-title {
    font-size: 1.9rem;
    font-weight: 800;
    color: var(--primary);
    margin-bottom: 6px;
}

.projects-subtitle {
    font-size: 0.9rem;
    color: var(--text-light);
    margin-bottom: 28px;
    line-height: 1.5;
}

/* LISTA */
.projects-list-container {
    display: flex;
    flex-direction: column;
    gap: 14px;
}

/* Contenedor de proyectos */
.projects-list-container {
    margin-bottom: 20px;
}

/* TARJETAS DE PROYECTO */
/* CARD */
.project-card {
    background: white;
    border: 1px solid #eef2f7;
    padding: 18px;
    border-radius: 16px;
    transition: all 0.25s ease;
    position: relative;
}

/* HOVER PRO */
.project-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 12px 30px rgba(0, 0, 0, 0.08);
    border-color: #dbeafe;
}

/* HEADER */
.project-card-header {
    display: flex;
    align-items: flex-start;
    gap: 14px;
}

/* ICONO */
.project-icon-box {
    background: linear-gradient(135deg, #eef6ff, #f8fbff);
    border-radius: 14px;
    width: 48px;
    height: 48px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.project-main-icon {
    font-size: 1.2rem;
    color: var(--primary-blue);
}

/* INFO */
.project-info {
    flex-grow: 1;
}

.project-title {
    font-size: 1rem;
    font-weight: 700;
    color: var(--primary);
    margin-bottom: 4px;
}

.project-desc {
    font-size: 0.8rem;
    color: var(--text-light);
    line-height: 1.4;
}


/* Flecha de enlace */
/* LINK */
.project-link-arrow {
    color: var(--accent);
    font-size: 1.3rem;
    transition: transform 0.2s ease;
}

.project-link-arrow:hover {
    transform: scale(1.15);
}


/* Badge NUEVO */
.badge-new {
    position: absolute;
    top: -8px;
    right: -6px;
    background: linear-gradient(45deg, #ff3b3b, #ff0000);
    color: white;
    font-size: 0.6rem;
    font-weight: 800;
    padding: 3px 8px;
    border-radius: 8px;
    letter-spacing: 0.5px;
}

/* BUILDING */
.building-notice {
    margin-top: 20px;
    background: linear-gradient(135deg, #fff9db, #fff3bf);
    border-radius: 14px;
    padding: 14px;
    display: flex;
    gap: 12px;
    align-items: center;
}

.building-icon {
    background: white;
    padding: 10px;
    border-radius: 10px;
    color: #f59f00;
}


.building-text strong {
    display: block;
    font-size: 0.9rem;
    color: #444;
}

.building-text p {
    font-size: 0.75rem;
    color: #666;
    margin: 0;
}

/* Sección Explora Más */
/* CTA */
.explore-more-section {
    margin-top: 10px;
    padding: 20px;
    border-radius: 18px;
    background: #f8fafc;
    text-align: center;
}

.explore-label {
    font-size: 0.7rem;
    font-weight: 800;
    letter-spacing: 2px;
    color: var(--accent);
    margin-bottom: 12px;
}

.btn-portfolio-full {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background: linear-gradient(135deg, #0047AB, #002244);
    color: white;
    padding: 12px 22px;
    border-radius: 12px;
    font-size: 0.85rem;
    font-weight: 700;
    text-decoration: none;
    transition: all 0.25s ease;
}

.btn-portfolio-full:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(0, 71, 171, 0.3);
}

/* Footer Proyectos */
.projects-footer {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 10px;
    padding: 20px;
    color: #888;
    font-size: 0.8rem;
    background: #fafafa;
    border-top: 1px solid #edf2f7;
}

.projects-footer a {
    color: var(--primary);
    text-decoration: none;
    transition: 0.3s;
}

.projects-footer a:hover {
    color: var(--accent);
}

/* Asegura que projects-view use el padding correcto */
.projects-view {
    /* height: 100dvh; */
    padding: 10px;
    text-align: left;
}

/* FILTROS */
.filters {
    display: flex;
    gap: 8px;
    margin-bottom: 20px;
}

.filter-btn {
    padding: 6px 12px;
    border: none;
    border-radius: 20px;
    background: #eef2f7;
    font-size: 0.75rem;
    cursor: pointer;
    transition: 0.3s;
}

.filter-btn.active {
    background: var(--primary);
    color: white;
}

.filter-btn:hover {
    transform: translateY(-1px);
}

/* BOTON PREVIEW */
.project-preview-btn {
    background: none;
    border: none;
    font-size: 1.1rem;
    color: var(--accent);
    cursor: pointer;
}

/* MODAL *//* MODAL MEJORADO */
.project-modal {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.85);
  backdrop-filter: blur(8px);
  z-index: 10000;
  align-items: center;
  justify-content: center;
  padding: 2rem;
  box-sizing: border-box;   /* ← CLAVE: evita que el padding sume al ancho */
}

.modal-content {
  background: linear-gradient(145deg, #1a1a2e 0%, #16213e 50%, #0f0f23 100%);
  border-radius: 24px;
  padding: 3rem 2.5rem;
  max-width: 350px;
  width: 90%;
  max-height: 80vh;
  overflow-y: auto;
  box-shadow: 
    0 25px 50px -12px rgba(0, 0, 0, 0.7),
    0 0 0 1px rgba(255, 255, 255, 0.05),
    inset 0 1px 0 rgba(255, 255, 255, 0.1);
  border: 1px solid rgba(255, 255, 255, 0.08);
  position: relative;
  animation: modalSlideIn 0.4s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

@keyframes modalSlideIn {
  from {
    opacity: 0;
    transform: translateY(30px) scale(0.95);
  }
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

/* TÍTULOS MEJORADOS */
#modal-title {
  font-size: 2.2rem;
  font-weight: 800;
  background: linear-gradient(135deg, #fff 0%, #f0f0ff 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  margin-bottom: 1rem;
  line-height: 1.2;
}

#modal-desc {
  color: #b8bcc5;
  font-size: 1.15rem;
  line-height: 1.6;
  margin-bottom: 2rem;
  font-weight: 400;
}

/* BOTONES ESPECTACULARES */
.btn-portfolio-full {
  display: inline-flex;
  align-items: center;
  gap: 0.75rem;
  padding: 1rem 2rem;
  border-radius: 16px;
  font-weight: 700;
  font-size: 1rem;
  text-decoration: none;
  text-align: center;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  margin-bottom: 1rem;
  position: relative;
  overflow: hidden;
  border: 2px solid transparent;
  backdrop-filter: blur(10px);
  width: 100%;
  
}

/* BOTÓN PRINCIPAL (Abrir proyecto) */
#modal-link {
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  color: white;
  box-shadow: 
    0 12px 24px rgba(102, 126, 234, 0.4),
    0 4px 12px rgba(118, 75, 162, 0.3),
    inset 0 1px 0 rgba(255, 255, 255, 0.2);
}

#modal-link:hover {
  transform: translateY(-2px);
  box-shadow: 
    0 20px 40px rgba(102, 126, 234, 0.5),
    0 8px 20px rgba(118, 75, 162, 0.4),
    inset 0 1px 0 rgba(255, 255, 255, 0.3);
  background: linear-gradient(135deg, #5a67d8 0%, #6b46c1 100%);
}

/* ⭐ BOTÓN LANDING DE VENTAS (EL ESTRELLA) ⭐ */
#modal-link2 {
  background: linear-gradient(135deg, #f093fb 0%, #f5576c 50%, #4facfe 100%);
  color: white;
  box-shadow: 
    0 12px 24px rgba(245, 87, 108, 0.4),
    0 8px 20px rgba(240, 147, 251, 0.3),
    inset 0 1px 0 rgba(255, 255, 255, 0.25);
  position: relative;
  animation: pulse-glow 2s ease-in-out infinite alternate;
}

@keyframes pulse-glow {
  0% {
    box-shadow: 
      0 12px 24px rgba(245, 87, 108, 0.4),
      0 8px 20px rgba(240, 147, 251, 0.3),
      inset 0 1px 0 rgba(255, 255, 255, 0.25);
  }
  100% {
    box-shadow: 
      0 20px 40px rgba(245, 87, 108, 0.6),
      0 12px 30px rgba(240, 147, 251, 0.5),
      0 0 30px rgba(79, 172, 254, 0.4),
      inset 0 1px 0 rgba(255, 255, 255, 0.3);
  }
}

#modal-link2:hover {
  transform: translateY(-5px) scale(1.02);
  background: linear-gradient(135deg, #e91e63 0%, #9c27b0 50%, #2196f3 100%);
  box-shadow: 
    0 25px 50px rgba(245, 87, 108, 0.6),
    0 15px 35px rgba(240, 147, 251, 0.5),
    0 0 40px rgba(79, 172, 254, 0.6);
  animation: none;
}

#modal-link2::before {
  content: "💰";
  position: absolute;
  left: 1rem;
  font-size: 1.6rem;
  opacity: 0;
  transform: translateX(-15px);
  transition: all 0.3s ease;
}

#modal-link2:hover::before {
  opacity: 1;
  transform: translateX(0);
}

/* CLOSE BUTTON */
.close-modal {
  position: absolute;
  top: -7px;        /* ✅ Más arriba y centrado */
  right: 0px;      /* ✅ Más adentro */
  font-size: 1.25rem;  /* ✅ Tamaño más elegante */
  color: #a8a8b3;
  cursor: pointer;
  width: 44px;      /* ✅ Tamaño fijo perfecto */
  height: 60px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 12px;  /* ✅ Más suave */
  transition: all 0.25s ease;
  font-weight: 300;     /* ✅ Más delgado */
  line-height: 1;
}

.close-modal:hover {
  color: #ff6b6b;
  background: rgba(255, 107, 107, 0.15);
  transform: scale(1.05);  /* ✅ Solo scale, sin rotación */
}

/* RESPONSIVE */
@media (max-width: 768px) {
  .modal-content {
    padding: 2rem 1.5rem;
    margin: 1rem;
  }
  
  #modal-title {
    font-size: 1.8rem;
  }
  
.btn-portfolio-full {
  display: inline-flex;
  align-items: center;
  gap: 0.75rem;
  padding: 1.1rem 2rem;     /* ✅ Padding uniforme */
  border-radius: 16px;
  font-weight: 700;
  font-size: 1rem;
  text-decoration: none;
  transition: all 0.3s ease;
  margin-bottom: 1rem;
  width: 100%;              /* ✅ ANCHO 100% = SIMETRÍA PERFECTA */
  justify-content: center;  /* ✅ Centrado perfecto */
  box-sizing: border-box;   /* ✅ Incluye padding en el ancho */
}
}

.building-notice {
    margin-top: 10px;
    padding: 18px;
    border-radius: 16px;

    background: linear-gradient(135deg, #f8fafc, #eef5ff);
    border: 1px solid #e2e8f0;

    display: flex;
    flex-direction: column;
    gap: 12px;
}

/* HEADER */
.building-header {
    display: flex;
    align-items: center;
    gap: 8px;
    font-weight: 700;
    font-size: 0.85rem;
    color: var(--primary);
}

/* TEXTO */
.building-text {
    font-size: 0.8rem;
    color: var(--text-light);
    line-height: 1.5;
    text-align: center;
}

/* TAGS */
.building-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
}

.building-tags span {
    background: white;
    border: 1px solid #dbeafe;
    padding: 4px 10px;
    font-size: 0.7rem;
    border-radius: 20px;
    font-weight: 600;
    color: var(--primary-blue);
}

/* =========================
   CONVERSION BLOCK (VENTA)
========================= */

.conversion-block {
    margin-top: 20px;
    padding: 20px;
    border-radius: 18px;
    text-align: center;

    background: linear-gradient(135deg, #f0f7ff, #e6f0ff);
    border: 1px solid #dbeafe;
}

.conversion-title {
    font-size: 0.95rem;
    font-weight: 700;
    color: var(--primary);
    margin-bottom: 6px;
}

.conversion-sub {
    font-size: 0.8rem;
    color: var(--text-light);
    margin-bottom: 15px;
}

/* BOTÓN DE VENTA */
.btn-conversion {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;

    background: linear-gradient(135deg, #0047AB, #002244);
    color: white;
    text-decoration: none;

    padding: 12px 20px;
    border-radius: 12px;

    font-size: 0.85rem;
    font-weight: 700;

    box-shadow: 0 6px 18px rgba(0, 71, 171, 0.25);

    /* transition: all 0.3s ease; */
    animation: heartbeat 3s infinite ease-in-out;
}

.btn-conversion:hover {
    animation-play-state: paused;
    transform: translateY(-3px) scale(1.03);
    box-shadow: 0 10px 25px rgba(0, 71, 171, 0.35);
}

/* 1. Definir la animación */
@keyframes heartbeat {
    0% {
        transform: scale(1);
        box-shadow: 0 4px 6px rgba(0, 0, 0, 0.02);
    }

    50% {
        transform: scale(1.03);
        /* Crece un poco */
        box-shadow: 0 8px 15px rgba(0, 0, 0, 0.1);
        /* Sombra más profunda */
        border-color: var(--accent);
        /* Cambia el borde sutilmente */
    }

    100% {
        transform: scale(1);
        box-shadow: 0 4px 6px rgba(0, 0, 0, 0.02);
    }
}

.mini-badge {
    display: inline-block;
    font-size: 0.8rem;
    font-weight: 800;
    background: #22c55e;
    color: white;
    padding: 8px 12px;
    border-radius: 6px;
    margin-bottom: 30px;
    /* margin-left: 0px; */
    margin-right:50%; 
    width: fit-content;
    animation: heartbeat 1s infinite ease-in-out;
}

/* 1. Definir la animación */
@keyframes heartbeat {
    0% {
        transform: scale(1);
        box-shadow: 0 4px 6px rgba(0, 0, 0, 0.02);
    }

    50% {
        transform: scale(1.03);
        /* Crece un poco */
        box-shadow: 0 8px 15px rgba(0, 0, 0, 0.1);
        /* Sombra más profunda */
        border-color: var(--accent);
        /* Cambia el borde sutilmente */
    }

    100% {
        transform: scale(1);
        box-shadow: 0 4px 6px rgba(0, 0, 0, 0.02);
    }
}


/* BLOQUE DUAL */
.conversion-block-dual {
  margin-top: 24px;
  padding: 24px 5px;
  border-radius: 24px;
  background: linear-gradient(135deg, #f0f7ff, #e6f0ff);
  text-align: center;
  border: 1px solid #dbeafe;
}

.dual-buttons {
  display: flex;
  flex-direction: column;
  gap: 14px;
  margin: 12px;
}

.dual-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 10px;
  font-size: 0.75rem;
  border-radius: 20px;
  animation: heartbeat 2.5s infinite ease-in-out;
  transition: all 0.2s ease;
}

.portfolio-btn {
  background: linear-gradient(135deg, #2c3e50, #1a2632);
  box-shadow: 0 6px 14px rgba(0,0,0,0.15);
}

.shop-btn {
  background: linear-gradient(135deg, #e67e22, #d35400);
  box-shadow: 0 6px 14px rgba(230,126,34,0.3);
}

.dual-btn:hover {
  animation-play-state: paused;
  transform: translateY(-3px) scale(1.02);
}

@media (min-width: 480px) {
  .dual-buttons {
    flex-direction: row;
    justify-content: center;
  }
  .dual-btn {
    flex: 1;
    max-width: 240px;
  }
}

/* Proyectos: layout responsivo */
.projects-grid {
  display: grid;
  gap: 1.5rem;
  grid-template-columns: 1fr; /* móvil: una columna */
}

/* Tablet: 2 columnas */
@media (min-width: 768px) {
  .projects-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 1.8rem;
  }
}

/* PC: 3 columnas (opcional, si hay espacio) */
@media (min-width: 1024px) {
  .projects-grid {
    grid-template-columns: repeat(3, 1fr);
  }
}

/* Mejora visual de cada tarjeta de proyecto */
.project-card {
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.project-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 12px 25px -8px rgba(0,0,0,0.15);
}