/* ═══════════════════════════════════════════
   PROYECTOS Y DISEÑOS — proyectos.css
   Usa las variables de index.css como base
═══════════════════════════════════════════ */

/* ══════════════════════════════════════════
   HERO PROYECTOS (Con fondo difuminado)
══════════════════════════════════════════ */
.proyectos-hero {
  padding: 2.75rem 5%;
  border-bottom: 1px solid var(--border);
  position: relative;
  overflow: hidden;
  z-index: 1;
}

.proyectos-hero::before {
  content: '';
  position: absolute;
  inset: -20px;
  background-image: url(../assets/Banner.webp);
  background-size: cover;
  background-position: center;
  filter: blur(0.5px);
  z-index: -2;
  pointer-events: none;
}

.proyectos-hero::after {
  content: '';
  position: absolute;
  inset: 0;
  background-color: rgba(255, 255, 255, 0.7);
  background-image: radial-gradient(ellipse at 70% 50%, rgba(0, 86, 179, 0.15) 0%, transparent 70%);
  z-index: -1;
  pointer-events: none;
}

body.dark-mode .proyectos-hero::after {
  background-color: rgba(15, 23, 42, 0.75);
  background-image: radial-gradient(ellipse at 70% 50%, rgba(0, 255, 255, 0.1) 0%, transparent 70%);
}

.proyectos-hero-content {
  max-width: 1100px;
  margin: 0 auto;
}

.proyectos-hero-tag {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--accent);
  background: rgba(0, 86, 179, 0.08);
  border: 1px solid rgba(0, 86, 179, 0.2);
  padding: 4px 14px;
  border-radius: 20px;
  margin-bottom: 1rem;
  letter-spacing: 0.5px;
  text-transform: uppercase;
}

body.dark-mode .proyectos-hero-tag {
  background: rgba(0, 255, 255, 0.07);
  border-color: rgba(0, 255, 255, 0.2);
}

.proyectos-hero h1 {
  font-family: 'Poppins', sans-serif;
  font-size: clamp(2rem, 5vw, 3.2rem);
  font-weight: 700;
  color: var(--text-color);
  margin-bottom: 0.8rem;
  line-height: 1.1;
}

.proyectos-hero-highlight {
  color: var(--accent);
  text-shadow: var(--glow);
}

.proyectos-hero-sub {
  font-size: 1rem;
  color: #666;
  max-width: 550px;
}

body.dark-mode .proyectos-hero-sub {
  color: #94a3b8;
}

/* ══════════════════════════════════════════
   MODAL DE VIDEO (YouTube)
══════════════════════════════════════════ */
.video-modal-box {
  max-width: 700px;
  background: transparent;
  border: none;
  box-shadow: none;
}

.video-modal-box #video-modal-content {
  display: flex;
  justify-content: center;
  width: 100%;
}

/* ══════════════════════════════════════════
   MODAL DE DETALLE (proyecto o diseño)
══════════════════════════════════════════ */
.detalle-modal-box {
  max-width: 700px;
}

.detalle-modal-media {
  display: flex;
  flex-wrap: wrap;
  border-radius: 18px 18px 0 0;
  overflow: hidden;
  border-bottom: 1px solid var(--border);
}

.detalle-modal-img-wrap {
  position: relative;
  flex: 1 1 260px;
  height: 280px;
  background: var(--bg-color);
  overflow: hidden;
}

.detalle-modal-media:not(.con-video) .detalle-modal-img-wrap {
  flex-basis: 100%;
}

.detalle-modal-img-bg {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  filter: blur(18px) brightness(0.85) saturate(1.1);
  transform: scale(1.2);
}

.detalle-modal-img {
  position: relative;
  z-index: 1;
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.detalle-modal-body {
  padding: 1.5rem;
}

.detalle-modal-desc {
  font-size: 0.9rem;
  color: #666;
  line-height: 1.6;
  margin: 0.75rem 0 1.25rem;
  padding: 1rem;
  background: var(--bg-color);
  border-radius: 10px;
  border: 1px solid var(--border);
}

body.dark-mode .detalle-modal-desc {
  color: #94a3b8;
}

.detalle-modal-precio-row {
  margin-bottom: 1.25rem;
}

.detalle-modal-video-wrap {
  position: relative;
  flex: 1 1 260px;
  height: 280px;
  overflow: hidden;
  background: #000;
}

.detalle-modal-video-wrap.tiktok,
.detalle-modal-video-wrap.directo {
  display: flex;
  align-items: center;
  justify-content: center;
}

.detalle-modal-video-wrap iframe {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  border: 0;
}

.detalle-modal-video-wrap.directo video {
  width: 100%;
  height: 100%;
  object-fit: contain;
  display: block;
  background: #000;
}

.detalle-modal-video-cargando {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: .6rem;
  color: #fff;
  font-size: .85rem;
  background: var(--card-bg);
}

/* ══════════════════════════════════════════
   GALERÍA DE PROYECTOS
══════════════════════════════════════════ */
.proyectos-section {
  max-width: 1100px;
  margin: 2.5rem auto 0;
  padding: 0 5%;
}

.proyectos-section-header {
  text-align: center;
  margin-bottom: 2rem;
}

.proyectos-section-header h2 {
  font-size: 1.6rem;
  margin-bottom: 0.4rem;
}

.proyectos-section-header p {
  color: #888;
  font-size: 0.95rem;
}

.proyectos-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  align-items: start;
  gap: 1.5rem;
}

/* ── CARD ── */
.proyecto-card {
  background: var(--card-bg);
  border: 1px solid var(--border);
  border-radius: 16px;
  overflow: hidden;
  cursor: pointer;
  transition: transform 0.25s, box-shadow 0.25s, border-color 0.25s;
  display: flex;
  flex-direction: column;
  position: relative;
}

.proyecto-card:hover {
  transform: translateY(-6px);
  border-color: var(--accent);
  box-shadow: 0 12px 28px rgba(0, 86, 179, 0.12);
}

body.dark-mode .proyecto-card:hover {
  box-shadow: 0 12px 28px rgba(0, 255, 255, 0.08);
}

.badge-destacado {
  position: absolute;
  top: 10px;
  left: 10px;
  width: 26px;
  height: 26px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--accent);
  color: #fff;
  font-size: 0.75rem;
  border-radius: 50%;
  box-shadow: 0 3px 8px rgba(0, 0, 0, .2);
  z-index: 2;
}

body.dark-mode .badge-destacado {
  color: #000;
}

.proyecto-card-img-wrap {
  position: relative;
  width: 100%;
  height: 230px;
  overflow: hidden;
  background: var(--bg-color);
  border-bottom: 1px solid var(--border);
}

.proyecto-card-img-bg {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  filter: blur(18px) brightness(0.85) saturate(1.1);
  transform: scale(1.2);
}

.proyecto-card-img {
  position: relative;
  z-index: 1;
  width: 100%;
  height: 100%;
  object-fit: contain;
  transition: transform 0.4s ease;
}

.proyecto-card:hover .proyecto-card-img {
  transform: scale(1.04);
}

.proyecto-card-body {
  padding: 1.1rem;
  display: flex;
  flex-direction: column;
  gap: 6px;
  flex: 1;
}

.proyecto-card-cat {
  font-size: 0.7rem;
  font-weight: 600;
  color: var(--accent);
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.proyecto-card-nombre {
  font-size: 1.05rem;
  font-weight: 700;
  color: var(--text-color);
  line-height: 1.3;
}

.proyecto-card-desc {
  font-size: 0.85rem;
  color: #777;
  line-height: 1.5;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
  margin-bottom: 4px;
}

body.dark-mode .proyecto-card-desc {
  color: #94a3b8;
}

.proyecto-card-footer {
  padding: 0 1.1rem 1.1rem;
}

.diseno-card-precio-row {
  padding: 0 1.1rem;
  margin-bottom: 0.75rem;
}

.diseno-card-precio {
  font-family: 'Oswald', sans-serif;
  font-size: 1.3rem;
  font-weight: 700;
  color: var(--text-color);
}

body.dark-mode .diseno-card-precio {
  color: var(--accent);
}

.diseno-card-cotizar {
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--accent);
}

.btn-cotizar-proyecto {
  width: 100%;
  background: #25D366;
  color: #fff !important;
  border: none;
  border-radius: 10px;
  padding: 0.7rem;
  font-size: 0.85rem;
  font-weight: 700;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  text-decoration: none;
  transition: opacity 0.2s, transform 0.2s;
  font-family: 'Poppins', sans-serif;
}

.btn-cotizar-proyecto:hover {
  opacity: 0.9;
  transform: translateY(-2px);
}

/* ══════════════════════════════════════════
   ESTADO VACÍO
══════════════════════════════════════════ */
.empty-state {
  text-align: center;
  padding: 4rem 2rem;
  color: #999;
}

.empty-state i {
  font-size: 3rem;
  margin-bottom: 1.5rem;
  color: var(--border);
}

.empty-state h3 {
  font-size: 1.2rem;
  margin-bottom: 0.5rem;
  color: var(--text-color);
}

/* ══════════════════════════════════════════
   CTA GENERAL: "¿TE INTERESA CREAR UN PROYECTO?"
══════════════════════════════════════════ */
.proyectos-cta {
  max-width: 640px;
  margin: 3.5rem auto 4rem;
  padding: 2.5rem 2rem;
  text-align: center;
  background: var(--card-bg);
  border: 1px solid var(--border);
  border-radius: 18px;
  box-shadow: var(--shadow);
}

.proyectos-cta-icono {
  width: 56px;
  height: 56px;
  margin: 0 auto 1rem;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  background: rgba(0, 86, 179, 0.08);
  color: var(--accent);
  font-size: 1.4rem;
}

body.dark-mode .proyectos-cta-icono {
  background: rgba(0, 255, 255, 0.08);
}

.proyectos-cta h2 {
  margin-bottom: 0.5rem;
}

.proyectos-cta p {
  color: #666;
  max-width: 460px;
  margin: 0 auto 1.5rem;
}

body.dark-mode .proyectos-cta p {
  color: #94a3b8;
}

.btn-whatsapp-cta {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: #25D366;
  color: #fff !important;
  border: none;
  border-radius: 10px;
  padding: 0.85rem 1.75rem;
  font-size: 0.95rem;
  font-weight: 700;
  text-decoration: none;
  transition: opacity 0.2s, transform 0.2s;
  font-family: 'Poppins', sans-serif;
}

.btn-whatsapp-cta:hover {
  opacity: 0.9;
  transform: translateY(-2px);
}

/* ══════════════════════════════════════════
   SKELETON LOADING
══════════════════════════════════════════ */
.skeleton {
  background: linear-gradient(90deg, var(--border) 25%, var(--card-bg) 50%, var(--border) 75%);
  background-size: 200% 100%;
  animation: shimmer 1.4s infinite;
  border-radius: 8px;
}

@keyframes shimmer {
  0% { background-position: 200% 0; }
  100% { background-position: -200% 0; }
}

.skeleton-card {
  background: var(--card-bg);
  border: 1px solid var(--border);
  border-radius: 16px;
  overflow: hidden;
}

.skeleton-img {
  width: 100%;
  aspect-ratio: 4 / 3;
}

.skeleton-body {
  padding: 1.1rem;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.skeleton-line {
  height: 12px;
  border-radius: 6px;
}

.skeleton-line.w50 { width: 50%; }
.skeleton-line.w90 { width: 90%; }
.skeleton-line.w70 { width: 70%; }

.skeleton-footer {
  padding: 0 1.1rem 1.1rem;
}

.skeleton-btn {
  height: 38px;
  width: 100%;
  border-radius: 10px;
}

/* ══════════════════════════════════════════
   ACCESIBILIDAD (A11Y)
══════════════════════════════════════════ */
button:focus-visible,
a:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 3px;
  border-radius: 4px;
}

/* ══════════════════════════════════════════
   RESPONSIVE
══════════════════════════════════════════ */
@media (max-width: 768px) {
  .proyectos-hero {
    padding: 2.5rem 5%;
  }

  .proyectos-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 1rem;
  }
}

@media (max-width: 480px) {
  .proyectos-grid {
    grid-template-columns: 1fr;
  }

  .proyectos-cta {
    margin: 2.5rem 1rem 3rem;
    padding: 2rem 1.25rem;
  }
}
