/* ==========================================================================
   LARGAVISTA COMUNICACIONES - COMPONENT STYLES
   ========================================================================== */

/* --------------------------------------------------------------------------
   1. Navegación (Header & Menú)
   -------------------------------------------------------------------------- */
.site-header {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 70px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0 5vw;
  z-index: 1000;
  background: rgba(252, 252, 252, 0.85);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid rgba(8, 8, 8, 0.05);
  transition: transform 0.3s ease, background-color 0.3s ease;
}

.site-header.nav-hidden {
  transform: translateY(-100%);
}

.header-logo a {
  font-family: 'Garnet Capitals Bold', sans-serif;
  font-size: 1.8rem;
  letter-spacing: 6px;
  color: var(--primario);
  text-decoration: none;
}

.nav-links-desktop {
  display: none;
  gap: 2.5rem;
  align-items: center;
}

.nav-links-desktop a {
  font-family: 'Garnet Capitals Regular', sans-serif;
  font-size: 1.05rem;
  letter-spacing: 3px;
  color: var(--primario);
  position: relative;
  padding: 4px 0;
}

.nav-links-desktop a::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  width: 0%;
  height: 2px;
  background-color: var(--terciario);
  transition: width 0.25s ease;
}

.nav-links-desktop a:hover::after {
  width: 100%;
}

.menu-toggle-btn {
  display: flex;
  flex-direction: column;
  justify-content: space-around;
  width: 32px;
  height: 24px;
  background: transparent;
  border: none;
  cursor: pointer;
  padding: 0;
  z-index: 1100;
}

.menu-toggle-btn span {
  width: 100%;
  height: 2px;
  background-color: var(--primario);
  transition: var(--transicion-base);
  transform-origin: 1px;
}

.menu-toggle-btn.is-active span {
  background-color: #ffffff;
}

.menu-toggle-btn.is-active span:nth-child(1) {
  transform: rotate(45deg);
}
.menu-toggle-btn.is-active span:nth-child(2) {
  opacity: 0;
  transform: translateX(10px);
}
.menu-toggle-btn.is-active span:nth-child(3) {
  transform: rotate(-45deg);
}

/* Botón de Cierre explícito dentro del Overlay */
.overlay-close-btn {
  position: absolute;
  top: 20px;
  right: 5vw;
  background: transparent;
  border: 1px solid rgba(255, 255, 255, 0.2);
  color: #ffffff;
  font-size: 2.4rem;
  font-weight: 300;
  line-height: 1;
  width: 44px;
  height: 44px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  z-index: 1200;
  border-radius: 50%;
  transition: transform 0.25s ease, background-color 0.25s ease, color 0.25s ease, border-color 0.25s ease;
}

.overlay-close-btn:hover {
  color: #ffffff;
  background-color: var(--terciario);
  border-color: var(--terciario);
  transform: rotate(90deg) scale(1.1);
}

/* Menú Overlay Pantalla Completa */
.menu-overlay {
  position: fixed;
  inset: 0;
  background: rgba(8, 8, 8, 0.96);
  backdrop-filter: blur(20px);

  -webkit-backdrop-filter: blur(20px);
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  z-index: 1050;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.35s ease, visibility 0.35s ease;
}

.menu-overlay.is-open {
  opacity: 1;
  visibility: visible;
}

.menu-overlay nav ul {
  list-style: none;
  text-align: center;
  display: flex;
  flex-direction: column;
  gap: 2.2rem;
}

.menu-overlay nav a {
  font-family: 'Garnet Capitals Light', sans-serif;
  font-size: 2.5rem;
  letter-spacing: 8px;
  color: var(--secundario);
  position: relative;
  display: inline-block;
  transform: translateY(20px);
  opacity: 0;
  transition: color 0.2s ease, transform 0.3s ease, opacity 0.3s ease;
}

.menu-overlay.is-open nav a {
  transform: translateY(0);
  opacity: 1;
}

.menu-overlay nav a:hover {
  color: var(--terciario);
  letter-spacing: 12px;
}

@media (min-width: 900px) {
  .nav-links-desktop {
    display: flex;
  }
}

/* --------------------------------------------------------------------------
   2. Fondo 3D (Model-Viewer)
   -------------------------------------------------------------------------- */
.canvas-3d-background {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  z-index: 0;
  pointer-events: none;
  opacity: 1;
}

model-viewer.hero-model {
  width: 100%;
  height: 100%;
  --poster-color: transparent;
  outline: none;
}

main {
  position: relative;
  z-index: 1;
}


/* --------------------------------------------------------------------------
   3. Hero Section
   -------------------------------------------------------------------------- */
.hero-section {
  position: relative;
  min-height: 95vh;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  padding: 100px 5vw 40px;
  text-align: center;
}

.brand-letters-title {
  display: flex;
  justify-content: center;
  align-items: center;
  flex-wrap: nowrap;
  font-family: 'Garnet Capitals Light', sans-serif;
  font-size: clamp(2.5rem, 9vw, 7.5rem);
  letter-spacing: clamp(6px, 1.8vw, 24px);
  color: var(--primario);
  margin-bottom: 2rem;
  user-select: none;
}

.brand-letters-title span {
  display: inline-block;
  transition: transform 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275), color 0.3s ease;
}

.brand-letters-title span:hover {
  transform: translateY(-8px) scale(1.1);
  color: var(--terciario);
}

.hero-tagline {
  font-family: 'Garnet Capitals Light', sans-serif;
  font-size: clamp(1.1rem, 2.8vw, 2rem);
  letter-spacing: 6px;
  color: var(--oscuro);
  max-width: 900px;
  margin-bottom: 2.5rem;
  text-transform: uppercase;
}

.hero-cta {
  display: flex;
  gap: 1.5rem;
  flex-wrap: wrap;
  justify-content: center;
}

/* --------------------------------------------------------------------------
   4. Títulos de Sección & Scramble Effect
   -------------------------------------------------------------------------- */
.section-title-wrapper {
  margin: 100px auto 25px;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  color: var(--primario);
  overflow: hidden;
  padding: 0 20px;
}

.section-title {
  font-family: 'Garnet Capitals Light', sans-serif;
  letter-spacing: 15px;
  font-size: clamp(2.5rem, 5vw, 4rem);
  font-weight: 400;
  text-transform: uppercase;
}

.section-subtitle {
  font-family: 'Garnet Capitals Regular', sans-serif;
  letter-spacing: 6px;
  font-size: 1.3rem;
  color: var(--terciario);
  margin-top: 8px;
}

/* --------------------------------------------------------------------------
   5. Nosotros (Dynamic 3x3 Matrix Grid)
   -------------------------------------------------------------------------- */
.nosotros-section {
  padding: 40px 5vw 80px;
  max-width: 1400px;
  margin: 0 auto;
}

.nosotros-description {
  max-width: 950px;
  margin: 0 auto 50px;
  text-align: center;
  font-size: 1.35rem;
  color: var(--oscuro);
  line-height: 1.8;
}

.matrix-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 12px;
  max-width: 950px;
  margin: 0 auto;
  aspect-ratio: 1 / 1;
}

.grid-cell {
  position: relative;
  background-color: #ebeaea80;
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  border: 1px solid rgba(0, 0, 0, 0.06);
  border-radius: 4px;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: var(--sombra-card);
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.grid-cell:hover {
  transform: scale(1.02);
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.12);
}

.grid-cell img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: opacity 0.4s ease-in-out;
}

.grid-cell .text-box {
  padding: 15px;
  text-align: center;
  font-family: 'Garnet Capitals Light', sans-serif;
  font-size: clamp(1rem, 2vw, 1.6rem);
  letter-spacing: 4px;
  color: var(--primario);
  text-transform: uppercase;
  transition: opacity 0.4s ease-in-out;
}

@media (max-width: 600px) {
  .matrix-grid {
    gap: 6px;
  }
}

/* --------------------------------------------------------------------------
   6. Clientes (Slider / Carousel Continuo)
   -------------------------------------------------------------------------- */
.clientes-section {
  position: relative;
  background-color: #ebeaea4d;
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border-top: 1px solid var(--borde-suave);
  border-bottom: 1px solid var(--borde-suave);
  padding: 50px 0;
  overflow: hidden;
  box-shadow: 0 4px 30px rgba(0, 0, 0, 0.05);
}

.slider-track-container {
  width: 100%;
  overflow: hidden;
  display: flex;
  position: relative;
  mask-image: linear-gradient(to right, transparent 0%, black 8%, black 92%, transparent 100%);
  -webkit-mask-image: linear-gradient(to right, transparent 0%, black 8%, black 92%, transparent 100%);
}

.slider-track {
  display: flex;
  gap: 60px;
  width: max-content;
  animation: marquee 120s linear infinite;
  will-change: transform;
}

.slider-track:hover {
  animation-play-state: paused;
}


.client-logo-item {
  width: 150px;
  height: 100px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  filter: grayscale(100%);
  opacity: 0.8;
  transition: filter 0.3s ease, opacity 0.3s ease, transform 0.3s ease;
}

.client-logo-item:hover {
  filter: grayscale(0%);
  opacity: 1;
  transform: scale(1.12);
}

.client-logo-item img {
  max-width: 120px;
  max-height: 80px;
  object-fit: contain;
}

@keyframes marquee {
  0% { transform: translateX(0); }
  100% { transform: translateX(-50%); }
}

/* --------------------------------------------------------------------------
   7. Contacto & Formulario
   -------------------------------------------------------------------------- */
.contacto-section {
  padding: 80px 5vw;
  max-width: 1200px;
  margin: 0 auto;
  min-height: 75vh;
}

.contacto-layout {
  display: grid;
  grid-template-columns: 1fr;
  gap: 50px;
  align-items: start;
  margin-top: 40px;
}

@media (min-width: 850px) {
  .contacto-layout {
    grid-template-columns: 1fr 1.3fr;
    gap: 80px;
  }
}

.contacto-info {
  display: flex;
  flex-direction: column;
  gap: 30px;
}

.contacto-info h3 {
  font-family: 'Garnet Capitals Bold', sans-serif;
  font-size: 2.5rem;
  letter-spacing: 6px;
  color: var(--primario);
}

.contacto-item h4 {
  font-family: 'Garnet Capitals Bold', sans-serif;
  font-size: 1.1rem;
  letter-spacing: 4px;
  color: var(--primario);
  margin-bottom: 6px;
}

.contacto-item a,
.contacto-item p {
  font-family: 'Open Sans', sans-serif;
  font-size: 1.3rem;
  color: var(--oscuro);
  text-decoration: none;
  transition: color 0.2s ease;
}

.contacto-item a:hover {
  color: var(--terciario);
}

/* Estilos de Campos de Formulario */
.form-card {
  background: rgba(255, 255, 255, 0.7);
  backdrop-filter: blur(15px);
  -webkit-backdrop-filter: blur(15px);
  padding: 40px;
  border-radius: 8px;
  border: 1px solid rgba(8, 8, 8, 0.08);
  box-shadow: 0 10px 40px rgba(0, 0, 0, 0.06);
}

.contact-form {
  display: flex;
  flex-direction: column;
  gap: 24px;
}

.input-field-group {
  position: relative;
  display: flex;
  flex-direction: column;
}

.input-field-group input,
.input-field-group textarea {
  width: 100%;
  background: transparent;
  border: none;
  border-bottom: 1px solid var(--primario);
  padding: 12px 14px;
  font-size: 1.25rem;
  color: var(--primario);
  outline: none;
  transition: border-color 0.25s ease, background-color 0.25s ease;
}

.input-field-group textarea {
  border: 1px solid var(--primario);
  border-radius: 4px;
  min-height: 120px;
  resize: vertical;
}

.input-field-group label {
  position: absolute;
  left: 14px;
  top: 14px;
  font-size: 1.15rem;
  color: var(--oscuro);
  opacity: 0.75;
  pointer-events: none;
  transition: 0.25s ease all;
}

.input-field-group textarea ~ label {
  top: 14px;
}

/* Floating label al enfocar o tener contenido */
.input-field-group input:focus ~ label,
.input-field-group input:not(:placeholder-shown) ~ label {
  top: -12px;
  left: 0;
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--terciario);
  opacity: 1;
}

.input-field-group textarea:focus ~ label,
.input-field-group textarea:not(:placeholder-shown) ~ label {
  top: -12px;
  left: 8px;
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--terciario);
  background: var(--secundario);
  padding: 0 6px;
  opacity: 1;
}

.input-field-group input:focus,
.input-field-group textarea:focus {
  border-color: var(--terciario);
}

/* Mensajes de validación */
.error-msg {
  font-size: 0.95rem;
  color: var(--terciario);
  margin-top: 4px;
  display: none;
}

.input-field-group.has-error .error-msg {
  display: block;
}

.input-field-group.has-error input,
.input-field-group.has-error textarea {
  border-color: var(--terciario);
}

.form-feedback {
  padding: 15px;
  border-radius: 4px;
  font-size: 1.1rem;
  display: none;
}

.form-feedback.success {
  display: block;
  background-color: #e8f5e9;
  color: #2e7d32;
  border: 1px solid #c8e6c9;
}

.form-feedback.error {
  display: block;
  background-color: #ffebee;
  color: #c62828;
  border: 1px solid #ffcdd2;
}

/* --------------------------------------------------------------------------
   8. Footer
   -------------------------------------------------------------------------- */
.site-footer {
  background-color: var(--primario);
  color: var(--secundario);
  padding: 80px 5vw 40px;
  position: relative;
}

.footer-top {
  display: flex;
  flex-direction: column;
  gap: 40px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
  padding-bottom: 50px;
}

@media (min-width: 800px) {
  .footer-top {
    flex-direction: row;
    justify-content: space-between;
    align-items: center;
  }
}

.footer-brand h2 {
  font-family: 'Garnet Capitals Bold', sans-serif;
  letter-spacing: 8px;
  font-size: 2.4rem;
  color: var(--secundario);
}

.footer-social-icons {
  display: flex;
  gap: 15px;
  align-items: center;
  flex-wrap: wrap;
}

.social-link {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.15);
  color: var(--secundario);
  transition: var(--transicion-base);
}

.social-link:hover {
  background-color: var(--terciario);
  border-color: var(--terciario);
  transform: translateY(-3px) scale(1.08);
}

.social-link svg {
  width: 18px;
  height: 18px;
  fill: currentColor;
}

.footer-nav-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 40px;
  padding: 50px 0;
}

.footer-nav-col h3 {
  font-family: 'Garnet Capitals Bold', sans-serif;
  font-size: 1.25rem;
  letter-spacing: 4px;
  color: var(--secundario);
  margin-bottom: 20px;
}

.footer-nav-col ul {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.footer-nav-col a {
  font-family: 'Open Sans', sans-serif;
  font-size: 1.15rem;
  color: var(--claro);
  transition: color 0.2s ease, transform 0.2s ease;
  display: inline-block;
}

.footer-nav-col a:hover {
  color: var(--terciario);
  transform: translateX(4px);
}

.footer-bottom {
  text-align: center;
  padding-top: 30px;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  font-size: 1rem;
  color: rgba(255, 255, 255, 0.6);
}

.footer-bottom a {
  color: rgba(255, 255, 255, 0.85);
  font-weight: 600;
}

.footer-bottom a:hover {
  color: var(--terciario);
}

/* --------------------------------------------------------------------------
   9. Proyectos (Video Grid & Modal)
   -------------------------------------------------------------------------- */
.projects-header {
  padding: 120px 5vw 40px;
  text-align: center;
  max-width: 1000px;
  margin: 0 auto;
}

.video-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 20px;
  padding: 20px 5vw 80px;
  max-width: 1400px;
  margin: 0 auto;
}

@media (min-width: 650px) {
  .video-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (min-width: 1024px) {
  .video-grid {
    grid-template-columns: repeat(4, 1fr);
    grid-auto-rows: 240px;
  }
  .video-item:first-child {
    grid-column: span 2;
    grid-row: span 2;
  }
}

.video-item {
  position: relative;
  border-radius: 6px;
  overflow: hidden;
  cursor: pointer;
  background-color: #000;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.15);
  aspect-ratio: 16 / 9;
}

@media (min-width: 1024px) {
  .video-item {
    aspect-ratio: auto;
  }
}

.video-item img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.5s ease, filter 0.5s ease;
}

.video-item:hover img {
  transform: scale(1.06);
  filter: brightness(0.75);
}

.play-badge {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 56px;
  height: 56px;
  border-radius: 50%;
  background: rgba(233, 27, 27, 0.85);
  backdrop-filter: blur(4px);
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  transition: transform 0.3s ease, background-color 0.3s ease;
}

.video-item:hover .play-badge {
  transform: translate(-50%, -50%) scale(1.2);
  background-color: var(--terciario);
}

.play-badge svg {
  width: 22px;
  height: 22px;
  fill: #fff;
  margin-left: 3px;
}

/* Diálogo Modal Nativo */
dialog.video-modal {
  border: none;
  padding: 0;
  border-radius: 8px;
  background: #000;
  max-width: 90vw;
  width: 900px;
  box-shadow: 0 25px 60px rgba(0, 0, 0, 0.5);
  position: fixed;
  inset: 0;
  margin: auto;
  overflow: hidden;
}

dialog.video-modal::backdrop {
  background: rgba(0, 0, 0, 0.85);
  backdrop-filter: blur(10px);
}

.modal-header-bar {
  display: flex;
  justify-content: flex-end;
  padding: 12px 18px;
  background-color: #111;
}

.close-modal-btn {
  background: none;
  border: none;
  color: #fff;
  font-size: 1.5rem;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 8px;
  font-family: 'Garnet Capitals Regular', sans-serif;
  letter-spacing: 2px;
}

.close-modal-btn:hover {
  color: var(--terciario);
}

dialog.video-modal video {
  width: 100%;
  max-height: 80vh;
  display: block;
}

/* --------------------------------------------------------------------------
   10. Miembros (Team Directory)
   -------------------------------------------------------------------------- */
.team-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 30px;
  padding: 40px 5vw 80px;
  max-width: 1400px;
  margin: 0 auto;
}

.team-card {
  background: var(--secundario);
  border: 1px solid rgba(8, 8, 8, 0.08);
  border-radius: 6px;
  overflow: hidden;
  box-shadow: var(--sombra-card);
  transition: transform 0.3s ease, box-shadow 0.3s ease;
  display: flex;
  flex-direction: column;
}

.team-card:hover {
  transform: translateY(-6px);
  box-shadow: 0 12px 35px rgba(0, 0, 0, 0.12);
}

.team-card-image {
  width: 100%;
  aspect-ratio: 1 / 1.15;
  overflow: hidden;
  background-color: #f0f0f0;
}

.team-card-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.4s ease;
}

.team-card:hover .team-card-image img {
  transform: scale(1.05);
}

.team-card-info {
  padding: 20px;
  text-align: center;
}

.team-card-info h3 {
  font-family: 'Garnet Capitals Bold', sans-serif;
  font-size: 1.4rem;
  letter-spacing: 3px;
  color: var(--primario);
  margin-bottom: 6px;
}

.team-card-info p {
  font-family: 'Open Sans', sans-serif;
  font-size: 1.1rem;
  color: var(--terciario);
  text-align: center;
}
