/* Tarjetas del portafolio (estilo y hover) */
.project-card {
  position: relative;
  overflow: hidden;
  border-radius: 16px;
  background: rgba(255,255,255,0.03);
  backdrop-filter: blur(2px);
  transition: transform .25s ease, box-shadow .25s ease, background .25s ease;
  box-shadow: 0 0 0 rgba(0,0,0,0);
}

.project-card .project-img img {
  display: block;
  width: 100%;
  height: auto;
  transform: scale(1);
  transition: transform .35s ease;
}

.project-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 12px 28px rgba(0,0,0,0.28);
  background: rgba(255,255,255,0.06);
}

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

.project-card .description {
  padding: 14px 16px 16px;
}

/* Cinta de color por tipo de proyecto (armoniza con el tema deeporange) */
.project-card::before {
  content: "";
  position: absolute;
  inset: 0 0 auto 0;
  height: 4px;
  background: linear-gradient(90deg, #FF7043, #FF8A65);
  opacity: .9;
}

/* Paletas alternativas por categoría (opcional) */
.project-pos::before { background: linear-gradient(90deg, #FF8A65, #FF7043); }
.project-atm::before { background: linear-gradient(90deg, #26C6DA, #00BCD4); }
.project-reloj::before { background: linear-gradient(90deg, #AB47BC, #8E24AA); }
.project-rf::before { background: linear-gradient(90deg, #66BB6A, #43A047); }
.project-voip::before { background: linear-gradient(90deg, #42A5F5, #1E88E5); }
.project-consulta::before { background: linear-gradient(90deg, #FFA726, #FB8C00); }

/* Ocultar contenedores de lightGallery */
.portfolio-gallery.d-none { display: none !important; }

/* Accesibilidad: focus visible en disparadores */
.project-img[tabindex="0"]:focus { outline: 2px solid #FF7043; outline-offset: 2px; }

/* Espaciado consistente entre items del grid */
.grid__item { margin-bottom: 28px; }

/* Ensure hovered card stacks above neighbors (fix overlap on hover) */
.grid__item { position: relative; z-index: 0; }
.grid__item:hover { z-index: 5; }

/* When lightGallery is open, neutralize grid hover effects */
body.lg-on .grid__item { z-index: 0 !important; }
body.lg-on .grid__item:hover {
  transform: none !important;
  box-shadow: none !important;
}

/* Ocultar scroll/scrollbar en Home (SimpleBar) */
body.home-active #wrapper .simplebar-content-wrapper {
  overflow: hidden !important;
}
body.home-active #wrapper .simplebar-track {
  display: none !important;
}

/* SimpleBar: asegurar cero relleno/offset superior en el contenedor */
#wrapper .simplebar-content-wrapper { padding-top: 0 !important; }
#wrapper .simplebar-content { padding-top: 0 !important; margin-top: 0 !important; }
#wrapper .simplebar-content > .section { margin-top: 0 !important; }

/* Contacto: espaciado limpio y consistente */
.contact-section {
  min-height: auto !important;
  margin-top: 0 !important;
  padding-top: 0 !important;
  padding-bottom: 40px !important; /* aire antes de Blog */
  /* Evita colapso de márgenes del primer hijo (heading) */
  overflow: hidden;
}
.contact-section::before { content: none !important; display: none !important; height: 0 !important; }
.contact-section, .contact-section #contact-content, .contact-section .heading, .contact-section h2 { margin-top: 0 !important; padding-top: 0 !important; }
.contact-section #contact-content > *:first-child { margin-top: 0 !important; }
.contact-section #contact-content { padding-top: 6px !important; margin-top: 0 !important; position: static !important; display: block !important; }
.contact-section .heading { display: block !important; }
.contact-section .container { display: block !important; }
.contact-section .heading { margin: 0 !important; padding-top: 0 !important; }
.contact-section .heading h2 { margin: 0 0 20px !important; }

/* Ajuste específico en móviles: reducir separación extra bajo el título */
@media (max-width: 767px) {
  .contact-section .heading h2 { margin: 0 0 32px !important; }
}



/* Portafolio: cierre compacto pero legible */
.work-section #work-content { min-height: auto !important; padding-bottom: 16px !important; margin-bottom: 0 !important; }
.work-section .portfolio-container, .work-section .grid { margin-bottom: 0 !important; padding-bottom: 0 !important; }
.work-section { padding-top: 8px !important; padding-bottom: 0 !important; margin-bottom: 0 !important; }

/* Layout base intacto; no forzar desplazamientos negativos */
/* Reducir separación entre tarjetas del portafolio */
.work-section .grid__item { margin-bottom: 20px !important; }

/* Blog: asegurar aire superior para no pegarse a Contacto */
.blog-section { padding-top: 32px !important; }

/* Home: sin scroll cuando está activa */
html.home-active, body.home-active { overflow: hidden !important; height: 100vh !important; }

/* DEBUG removido */
/* Reducir espacio innecesario en contacto */
#contact .separator {
  display: none; /* o margin: 0 si quieres dejar una línea */
}

#contact .row, 
#contact .container {
  margin-top: 0 !important;
  margin-bottom: 0 !important;
  padding-top: 0 !important;
  padding-bottom: 0 !important;
}

/* Hero logo tilt: smooth transform & perspective */
.logo-container { display: inline-block; perspective: 600px; }
.logo { display: inline-block; will-change: transform; transform-style: preserve-3d; transition: transform .15s ease; }
