:root {
  --blue: #001892;
  --yellow: #fff000;
  --muted: #595959;
  --footer-bg: #001050;
}

* { box-sizing: border-box; margin: 0; padding: 0; }
body {
  font-family: "Heebo", sans-serif;
  font-size: 16px;
  color: var(--muted);
  background: #fff;
  line-height: 1.6;
}

.container {
  width: 92%;
  max-width: 1200px;
  margin: 0 auto;
}

/* ========== TOP BAR ========== */
.topbar {
  background: var(--blue);
  color: #fff;
  font-size: 14px;
}
.topbar-inner {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 6px 0;
}
.top-right span { margin-right: 16px; }
.social-inline {
  display: inline-flex;
  list-style: none;
}
/* Estilo crucial para que los íconos de Font Awesome se muestren correctamente */
.social-inline li a.fa { 
  font-family: 'Font Awesome 6 Free'; 
  font-weight: 900; 
  text-decoration: none; 
}
.social-inline li a {
  color: #fff;
  margin-left: 8px;
  transition: color .3s;
}
.social-inline li a:hover { color: var(--yellow); }

/* ========== HEADER / NAV ========== */
.header {
  border-bottom: 1px solid #eee;
  background: #fff;
  /* Alto z-index para que la barra de navegación y sus menús estén sobre el hero slider */
  position: relative;
  z-index: 1000; 
}
.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 0;
}
.logo img { height: 40px; }
.logo-fallback {
  font-family: "Overlock", cursive;
  font-size: 22px;
  font-weight: 700;
  color: var(--blue);
}
.nav ul {
  display: flex;
  gap: 18px;
  list-style: none;
}
.nav ul li { position: relative; cursor: pointer; }
.nav ul li a { color: var(--muted); text-decoration: none; }
.nav ul li:hover > a { color: var(--blue); }
.nav ul .sub {
  display: none;
  position: absolute;
  top: 100%;
  left: 0;
  background: #fff;
  border: 1px solid #eee;
  padding: 8px 0;
  list-style: none;
  /* z-index más alto para estar sobre el hero y su contenido */
  z-index: 1010; 
  min-width: 150px;
}
.nav ul li:hover .sub { display: block; }
.nav ul .sub li { padding: 6px 16px; }
.header-right { display: flex; align-items: center; gap: 12px; }
.phone { font-weight: 600; color: var(--blue); }
.menu-toggle {
  display: none;
  background: none;
  border: 0;
  font-size: 20px;
}

/* ========== HERO / SLIDER ========== */
.hero { position: relative; height: 70vh; min-height: 500px; overflow: hidden; }
.slide {
  position: absolute;
  inset: 0;
  background-size: cover;
  background-position: center;
  display: flex;
  align-items: center;
  opacity: 0;
  transition: opacity 0.8s;
}
.slide.active { opacity: 1; }
.hero-overlay {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.55);
}

/* CORRECCIÓN Z-INDEX: EL TEXTO VA POR ENCIMA Y A LA IZQUIERDA */
.hero-content {
  position: relative;
  z-index: 4; /* Ahora más alto que todas las figuras */
  color: #fff;
  max-width: 600px;
  padding: 40px;
  text-align: left; /* Asegura alineación a la izquierda */
  margin-left: 0; /* Asegura que no está centrado */
}
.hero-pre { font-weight: 600; margin-bottom: 8px; }
.hero-title {
  font-family: "Overlock", cursive;
  font-size: 56px;
  margin-bottom: 12px;
  text-shadow: 0 3px 10px rgba(0,0,0,.7);
}
.hero-desc {
  font-size: 18px;
  margin-bottom: 20px;
  text-shadow: 0 2px 6px rgba(0,0,0,.5);
}

/* Estilos para las figuras deslizantes */
.hero-figure.slide-figure {
  position: absolute;
  right: 10%; 
  bottom: 0;
  z-index: 3; /* Menor que el texto (4) */
  max-height: 85%;
  width: auto;
  opacity: 0; 
  transition: opacity 0.8s ease-in-out;
}
.hero-figure.slide-figure.active-figure {
  opacity: 1; 
}
/* Estilo para el círculo decorativo */
.hero-circle {
  position: absolute;
  right: 5%; 
  bottom: 5%;
  z-index: 1; /* El más bajo */
  transition: transform 0.3s ease-out; 
}
/* Keyframe Animation para el Círculo */
@keyframes circle-pulse {
    0% { transform: scale(1) rotate(0deg); }
    50% { transform: scale(1.1) rotate(5deg); }
    100% { transform: scale(1) rotate(0deg); }
}
.hero-circle.animate {
    animation: circle-pulse 0.6s ease-out;
}

/* ========== BUTTONS ========== */
.btn {
  display: inline-block;
  padding: 12px 20px;
  border-radius: 8px;
  font-weight: 700;
  text-decoration: none;
  transition: .3s;
}
.btn-primary {
  background: var(--yellow);
  color: var(--blue);
}
.btn-primary:hover { background: #ffe933; }
.btn-outline {
  background: transparent;
  border: 2px solid #fff;
  color: #fff;
}
.btn-outline:hover { background: #fff; color: var(--blue); }
.btn-ghost {
  background: transparent;
  border: 2px solid var(--blue);
  color: var(--blue);
}
.btn-ghost:hover { background: var(--blue); color: #fff; }
.btn-sm {
  display: inline-block;
  padding: 8px 12px;
  background: var(--blue);
  color: #fff;
  border-radius: 8px;
  text-decoration: none;
  font-size: 14px;
}

/* ========== ABOUT ========== */
.about { padding: 64px 0; }
.about-inner { display: flex; gap: 36px; align-items: center; }
.about-media img { width: 360px; border-radius: 12px; }
.about-content h2 {
  font-family: "Overlock", cursive;
  font-size: 32px;
  margin-bottom: 12px;
}
.stat-box {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  background: #fff;
  border-left: 6px solid var(--yellow);
  padding: 12px 16px;
  border-radius: 8px;
}
.stat-number { font-size: 40px; font-weight: 900; color: var(--blue); }

/* ========== SERVICES ========== */
.services { padding: 64px 0; }
.section-head h2 {
  font-family: "Overlock", cursive;
  font-size: 30px;
  margin-bottom: 8px;
}
.services-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 22px;
  margin-top: 18px;
}
.service-card {
  background: #fff;
  border-radius: 12px;
  padding: 20px;
  box-shadow: 0 8px 20px rgba(0,0,0,.05);
  transition: transform .25s, box-shadow .25s;
}
.service-card:hover {
  transform: translateY(-6px);
  box-shadow: 0 12px 28px rgba(0,0,0,.1);
}
.service-icon { 
  font-size: 28px; 
  color: var(--blue); 
  margin-bottom: 10px; 
  /* Asegura que si el fallback de JS agrega un <i> se vea bien */
}
.read-more { color: var(--blue); font-weight: 600; text-decoration: none; }
.read-more:hover { text-decoration: underline; }

/* ========== FEATURES ========== */
.features {
  background: var(--blue);
  color: #fff;
  padding: 48px 0;
}
.features .section-title {
  font-family: "Overlock", cursive;
  margin-bottom: 16px;
}
.features-grid {
  display: grid;
  grid-template-columns: repeat(4,1fr);
  gap: 18px;
}
.feature {
  text-align: center;
  background: rgba(255,255,255,.06);
  padding: 18px;
  border-radius: 10px;
}
.ficon { font-size: 28px; margin-bottom: 8px; color: var(--yellow); }

/* ========== STATS ========== */
.stats { padding: 48px 0; }
.stats-grid {
  display: flex;
  gap: 18px;
  flex-wrap: wrap;
}
.stat {
  flex: 1;
  min-width: 160px;
  background: #fff;
  border-radius: 10px;
  padding: 20px;
  text-align: center;
  box-shadow: 0 6px 16px rgba(0,0,0,.05);
}
.stat .num { font-size: 26px; font-weight: 900; color: var(--blue); }

/* ========== PROCESS ========== */
.process { padding: 48px 0; }
.process-steps {
  display: flex;
  gap: 18px;
  flex-wrap: wrap;
}
.step {
  flex: 1;
  min-width: 220px;
  background: #fff;
  border-radius: 12px;
  padding: 20px;
  text-align: center;
  box-shadow: 0 6px 16px rgba(0,0,0,.05);
}
.circle {
  width: 60px; height: 60px;
  border-radius: 50%;
  background: var(--yellow);
  display: inline-flex;
  align-items: center; justify-content: center;
  font-weight: 900; color: var(--blue);
  margin-bottom: 12px;
}

/* ========== PROJECTS ========== */
.projects { padding: 48px 0; }
.projects-carousel {
  position: relative;
  /* Cambio: Ahora usará grid en media queries para evitar que se vean desproporcionados */
  display: grid; 
  grid-template-columns: repeat(3, 1fr);
  gap: 14px;
  align-items: center;
}
.proj {
  /* flex: 1; REMOVIDO */
  background: #fff;
  border-radius: 10px;
  overflow: hidden;
  box-shadow: 0 8px 20px rgba(0,0,0,.05);
  opacity: 1; 
  transform: scale(1); 
  transition: all .4s;
}

.proj img { 
  width: 100%; 
  height: 200px; 
  object-fit: cover; 
}
.proj-caption { padding: 12px; }

/* ========== TEAM ========== */
.team { padding: 48px 0; }
.team-grid { display: flex; gap: 18px; flex-wrap: wrap; }
.member {
  flex: 1;
  min-width: 220px;
  text-align: center;
  background: #fff;
  padding: 16px;
  border-radius: 12px;
  box-shadow: 0 6px 16px rgba(0,0,0,.05);
}
.member img { width: 100%; height: 240px; object-fit: cover; border-radius: 8px; }

/* ========== TESTIMONIAL (CARRUSEL) ========== */
.testimonial { 
  padding: 64px 0; 
  background: #f8f8f8; 
  overflow: hidden; /* Oculta los cards fuera de la vista */
}
.testimonial-carousel {
    display: flex;
    transition: transform 0.5s ease-in-out;
    width: 100%; 
}
.testimonial-card {
    /* Ocupa el 100% del ancho del contenedor del carrusel (que es 100% del contenedor padre) */
    flex: 0 0 100%; 
    min-width: 100%;
    
    max-width: 700px; /* Mantiene el ancho máximo para el contenido */
    margin: 0 auto;
    background: #fff;
    border-radius: 12px;
    padding: 28px;
    text-align: center;
    box-shadow: 0 6px 18px rgba(0,0,0,.05);
}
.client-photo {
  width: 80px; height: 80px;
  border-radius: 50%;
  object-fit: cover;
  margin-bottom: 12px;
}
blockquote { margin: 10px 0; font-size: 18px; }
.testimonial-dots {
    text-align: center;
    margin-top: 20px;
}
.testimonial-dots span {
    display: inline-block;
    width: 10px;
    height: 10px;
    background: #ccc;
    border-radius: 50%;
    margin: 0 5px;
    cursor: pointer;
    transition: background 0.3s;
}
.testimonial-dots span.active {
    background: var(--blue);
}

/* ========== BLOG ========== */
.blog { padding: 48px 0; }
.blog-grid {
  display: grid;
  grid-template-columns: repeat(3,1fr);
  gap: 18px;
}
.post {
  background: #fff;
  border-radius: 12px;
  padding: 12px;
  box-shadow: 0 6px 18px rgba(0,0,0,.05);
}
.post-img img {
  width: 100%;
  height: 160px;
  object-fit: cover;
  border-radius: 8px;
}
/* style.css */
/* ... al final, antes de @media (max-width: 980px) */

/* ========== CONTACT FORM (ESTILOS ORIGINALES) ========== */
.contact {
    padding: 64px 0;
    background: #f8f8f8;
}
.contact-inner {
    display: flex;
    gap: 36px;
    align-items: center;
}
.contact-info {
    flex: 1;
    max-width: 450px;
}
.contact-info h2 {
    font-family: "Overlock", cursive;
    font-size: 32px;
    margin-bottom: 12px;
    color: var(--blue);
}
.contact-info ul {
    list-style: none;
    margin-top: 20px;
}
.contact-info ul li {
    margin-bottom: 10px;
    font-weight: 600;
}
.contact-info ul li i {
    color: var(--yellow);
    margin-right: 8px;
}
.contact-form {
    flex: 2;
    background: #fff;
    padding: 30px;
    border-radius: 12px;
    box-shadow: 0 8px 20px rgba(0,0,0,.1);
}
.contact-form h3 {
    font-family: "Overlock", cursive;
    margin-bottom: 20px;
    font-size: 24px;
    color: var(--blue);
}
.form-group {
    margin-bottom: 15px;
}
.contact-form input[type="text"],
.contact-form input[type="email"],
.contact-form input[type="tel"],
.contact-form textarea {
    width: 100%;
    padding: 12px;
    border: 1px solid #ddd;
    border-radius: 8px;
    font-size: 16px;
    transition: border-color 0.3s;
}
.contact-form input:focus,
.contact-form textarea:focus {
    border-color: var(--yellow);
    outline: none;
}
.contact-form textarea {
    resize: vertical;
}


/* Adaptación Responsive para Contacto */
@media (max-width: 720px) {
    .contact-inner {
        flex-direction: column;
        gap: 20px;
    }
    .contact-info {
        max-width: 100%; /* Ocupa todo el ancho */
        text-align: center;
    }
    .contact-info h2 {
        font-size: 28px;
    }
    .contact-info p {
        margin-bottom: 10px;
    }
    .contact-info ul {
        margin-top: 10px;
        text-align: left;
        padding-left: 20px;
    }
    .contact-form {
        padding: 20px;
    }
}


/* ========== FOOTER ========== */
.footer {
  background: var(--footer-bg);
  color: #fff;
  padding: 36px 0;
}
.footer-grid {
  display: grid;
  grid-template-columns: repeat(4,1fr);
  gap: 18px;
}
.footer h4 {
  color: var(--yellow);
  margin-bottom: 12px;
}
.footer a {
  color: #fff;
  text-decoration: none;
}
.footer a:hover { color: var(--yellow); }
.footer input[type="email"] {
  padding: 10px;
  border-radius: 8px;
  border: 0;
  margin-right: 8px;
  width: 70%;
}
.footer .btn {
  background: var(--yellow);
  color: var(--blue);
  font-weight: 700;
}

/* Estilos de Copyright actualizados para 1440 Arte Gráfico */
.copyright {
  margin-top: 20px;
  color: #ccc;
  font-size: 14px;
  /* NEW: Flexbox para alinear el copyright de MundoLimpio con 1440 Arte Gráfico */
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap; 
  gap: 10px;
}
.copyright-right {
    display: flex;
    align-items: center;
    gap: 15px;
}
.copyright-right p {
  margin: 0;
  white-space: nowrap; 
}
.social-links {
    display: flex;
    gap: 10px;
}
.social-links a {
    color: #fff;
    transition: color 0.3s;
    font-size: 18px; /* Ajuste de tamaño para los íconos sociales */
}
.social-links a:hover {
    color: var(--yellow);
}


/* ================================== */
/* ========== ANIMATIONS ========== */
/* ================================== */

/* Base class for elements to be animated when visible */
.anim-element {
  opacity: 0;
  transition: opacity 0.8s, transform 0.8s;
  will-change: opacity, transform;
}

/* Class added by JS when element is in viewport */
.anim-element.visible {
  opacity: 1;
  transform: none !important; 
}

/* Delay modifiers for sequential animations */
.delay-1 { transition-delay: 0.1s, 0.1s; }
.delay-2 { transition-delay: 0.2s, 0.2s; }
.delay-3 { transition-delay: 0.3s, 0.3s; }
.delay-4 { transition-delay: 0.4s, 0.4s; }
.delay-5 { transition-delay: 0.5s, 0.5s; }

/* Specific Animation Styles (Initial State) */
.fade-in-up { transform: translateY(20px); }
.fade-in-left { transform: translateX(-30px); }
.fade-in-right { transform: translateX(30px); }
.fade-in { opacity: 0; }
.bounce-up {
  transform: translateY(15px);
  transition: opacity 0.6s, transform 0.6s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}
.flip-in {
  transform: rotateY(90deg) scale(0.8);
  opacity: 0;
}
.flip-in.visible {
  transform: rotateY(0deg) scale(1) !important;
}
.pop-in {
  transform: scale(0.8);
}


/* ================================== */
/* ========== RESPONSIVE & MOBILE MENU ========== */
/* ================================== */
@media (max-width: 980px) {
  /* Tablet / Pantallas medianas */
  .services-grid { grid-template-columns: repeat(2,1fr); }
  .features-grid { grid-template-columns: repeat(2,1fr); }
  .blog-grid { grid-template-columns: repeat(2,1fr); }
  .about-media img { width: 300px; }
  
  /* PROYECTOS: 2 columnas en Tablet */
  .projects-carousel {
    grid-template-columns: repeat(2, 1fr);
  }
  .proj {
    min-width: unset;
  }
}

@media (max-width: 720px) {
  /* Teléfono / Pantallas pequeñas */
  
  /* TOP BAR SIMPLIFICADO */
  .topbar-inner { flex-direction: column; align-items: flex-start; gap: 4px; }
  .top-right { display: none; } /* Se oculta el contenido secundario */
  .top-left { font-size: 13px; }

  /* HEADER Y MENÚ (NO INVASIVO) */
  .header-inner { flex-wrap: wrap; }
  .menu-toggle { display: inline-block; }
  .header-right { margin-left: auto; }
  
  .nav { 
    /* NEW: Menú de Deslizamiento Lateral de 250px */
    display: block; 
    position: fixed; 
    top: 0;
    left: 0;
    height: 100vh;
    width: 250px; 
    background: #fff;
    box-shadow: 2px 0 10px rgba(0,0,0,.15);
    transform: translateX(-100%); /* Oculto por defecto */
    transition: transform 0.3s ease-out;
    padding-top: 60px; 
    z-index: 999; 
    overflow-y: auto;
  }
  .nav.open {
    transform: translateX(0); /* Desliza hacia adentro */
  }
  .nav ul { flex-direction: column; gap: 0; }
  .nav ul li { padding: 10px 15px; border-bottom: 1px solid #eee; width: 100%; }
  .nav ul li:last-child { border-bottom: none; }
  .nav ul .sub { 
      position: static; 
      box-shadow: none; 
      border: none; 
      padding: 0 0 0 15px;
      display: block; /* Muestra los submenús al abrir el menú principal */
      background: #f8f8f8;
  }
  .nav ul li a { display: block; }
  
  /* HERO SECTION (Legibilidad) */
  .hero { min-height: 400px; height: 50vh; }
  .hero-figure { display: none; } /* Ocultar figuras para liberar espacio */
  .hero-circle { display: none; } 
  .hero-content { max-width: 100%; padding: 30px; }
  .hero-title { font-size: 36px; }
  
  /* SECCIONES GENERALES */
  .about-inner { flex-direction: column; }
  .about-media img { width: 100%; max-width: 360px; }
  .about-content h2, .section-head h2 { font-size: 28px; }
  .services-grid, .features-grid, .blog-grid { grid-template-columns: 1fr; }
  .team-grid { flex-direction: column; }
  .footer-grid { grid-template-columns: 1fr; }
  
  /* PROYECTOS: 1 columna en Móvil */
  .projects-carousel {
    grid-template-columns: 1fr;
    gap: 20px;
  }
  .proj img {
    height: auto; /* Altura automática para evitar deformación */
  }

  /* FOOTER RESPONSIVE */
  .copyright {
        flex-direction: column;
        text-align: center;
    }
    .copyright-right {
        flex-direction: column;
        text-align: center;
        gap: 5px;
    }
    .copyright-left {
        order: 2; /* Move main copyright below 1440 */
        margin-top: 10px;
    }
}
/* =========================================
   ESTILOS: CRÉDITO DEL PROYECTO (FOOTER)
   ========================================= */

/* Aseguramos que el contenedor derecho del copyright maneje el nuevo contenido */
.copyright-right {
    display: flex;
    align-items: center;
    gap: 15px; /* Espacio entre el texto de crédito y los íconos */
}

/* Estilo para la línea de atribución de Nexento */
.project-credit {
    font-size: 0.85rem; /* Tamaño discreto */
    color: #fff; /* Texto blanco en fondo oscuro del footer */
    opacity: 0.8;
    line-height: 1.5;
}

/* Enlace de texto a Nexento */
.project-credit a {
    color: var(--blue); /* Color de acento: Azul fuerte */
    text-decoration: none;
    font-weight: 700;
    transition: color 0.3s;
    opacity: 1;
}

.project-credit a:hover {
    color: var(--yellow); /* Color de acento secundario/hover (amarillo) */
}

/* Contenedor de los iconos sociales de Nexento (dentro de .project-credit) */
.nexento-social-credit {
    display: inline-flex;
    align-items: center;
    gap: 10px;
}

/* Iconos sociales */
.nexento-social-credit a {
    color: #fff; /* Iconos blancos */
    font-size: 1rem;
    opacity: 0.7;
    transition: opacity 0.3s, color 0.3s;
}

.nexento-social-credit a:hover {
    color: var(--yellow); /* Color de acento al pasar el ratón */
    opacity: 1;
}

/* Ajuste Responsivo para la sección de Copyright */
@media (max-width: 600px) {
    .copyright {
        flex-direction: column;
        text-align: center;
        gap: 10px;
        padding: 10px 0;
    }

    .copyright-left,
    .copyright-right {
        width: 100%;
        justify-content: center; /* Centra el contenido en móvil */
        flex-wrap: wrap; /* Asegura que no se desborden si el texto es largo */
    }
}