/* Contenedor general */
.scrolling-text {
  width: 100%;
  overflow: hidden;
  display: flex;
  justify-content: center;
  align-items: center;
  position: relative;
  background: #f8f8f8;
  padding: 3rem 1rem;
}

/* Ribbon container */
.ribbon {
  width: 100%;
  max-width: 1200px;
  display: flex;
  flex-direction: column;
  gap: 1rem; /* más juntas las cintas */
  padding: 0 1rem;
}

/* Ribbon track animado */
.ribbon-track {
  display: flex;
  gap: 3rem; /* palabras más juntas */
  white-space: nowrap;
  animation: slide-left 20s linear infinite;
}

.ribbon-track.reverse {
  animation: slide-right 25s linear infinite;
}

/* Palabras elegantes */
.ribbon-track span {
  font-family: 'Playfair Display', serif;
  font-size: 3rem;
  font-weight: 700;
  color: #111;
  letter-spacing: 0.03em; /* menos espacio entre letras */
  cursor: default;
  transition: transform 0.3s ease, color 0.3s ease;
}

.ribbon-track span:hover {
  transform: scale(1.15) translateY(-3px);
  color: #0071bc;
}

/* Animaciones */
@keyframes slide-left {
  0% { transform: translateX(0); }
  100% { transform: translateX(-50%); }
}

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

/* Responsive */
@media (max-width: 1024px) {
  .ribbon-track span {
    font-size: 2rem;
    gap: 2rem;
  }
  .ribbon {
    gap: 0.8rem;
  }
}

@media (max-width: 640px) {
  .ribbon-track span {
    font-size: 1.5rem;
    gap: 1.5rem;
  }
}



/* ======  ====== */
.services-section {
  background: #f8f8f8;
  padding: 70px 20px;
  margin-top: 90px;
}

/* ====== AJUSTE PARA MÓVIL ====== */
@media (max-width: 768px) {
  .services-section {
    margin-top: 40px; /* Subido en móvil */
  }
}

/* Opcional para muy pequeños (iPhone SE, etc.) */
@media (max-width: 480px) {
  .services-section {
    margin-top: 20px;
  }
}
.services-container {
  max-width: 1050px;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  gap: 120px;
}

.service-item {
  display: flex;
  flex-direction: row;
  align-items: flex-start;
  gap: 25px;
  position: relative;
  opacity: 0;
  transform: translateX(0);
  transition: all 1s ease-out;
  flex-wrap: nowrap;
}

.service-item:nth-child(even) {
  flex-direction: row-reverse;
}

.img-wrapper {
  flex: 1;
  position: relative;
}

.img-wrapper img {
  width: 100%;
  max-width: 430px;
  border-radius: 18px;
  box-shadow: 0 10px 25px rgba(0,0,0,0.18);
  position: relative;
  z-index: 2;
  transition: transform 0.5s ease, filter 0.5s ease;
}

.rect-shape {
  position: absolute;
  width: 450px; 
  height: 440px;
  border-radius: 18px 40px 18px 40px;
  z-index: 1;
  top: -40px;
  left: -40px;
  transform: rotate(-6deg);
  transition: all 0.5s ease;
  background: #F2BF18;
}

.rect-2 {
  background: #F2BF18;
  left: auto;
  right: -40px;
  top: -25px;
  transform: rotate(6deg);
}

.service-item:nth-child(2) .rect-shape,
.service-item:nth-child(4) .rect-shape {
  height: 280px;
  width: 410px;
  right: 5px;
}

.img-wrapper:hover img {
  transform: scale(1.04);
  filter: brightness(1.07);
}

.img-wrapper:hover .rect-shape {
  transform: scale(1.08) rotate(0deg);
}

.service-text {
  flex: 1;
  text-align: left;
  position: relative;
  z-index: 3;
  width: 100%;
}

@font-face {
  font-family: 'Sorenson';
  src: url('fonts/Sorenson.woff2') format('woff2'),
       url('fonts/Sorenson.woff') format('woff'),
       url('fonts/Sorenson.ttf') format('truetype');
  font-weight: normal;
  font-style: normal;
}

.service-text h3 {
  font-family: 'Sorenson', serif;
  font-size: 2.2rem;
  color: #F2BF18;
}

.service-preview {
  font-size: 1rem;
  color: #555;
  line-height: 1.6;
  margin-bottom: 10px;
  text-align: justify; /* ✅ Justifica párrafos en PC y móvil */
}

.ver-mas-btn {
  display: inline-block;
  font-size: 0.95rem;
  color: #0077ff;
  text-decoration: none;
  font-weight: 600;
  transition: 0.3s;
}
.ver-mas-btn:hover {
  opacity: 0.7;
}

/* 🌐 Responsivo general */
@media (max-width: 991px) {
  .service-item {
    flex-direction: column;
    align-items: center;
  }
  .service-text {
    text-align: center;
  }
}

/* 📱 Diseño móvil */
@media (max-width: 768px) {
  .services-container {
    gap: 70px;
  }

  .service-item {
    flex-direction: column !important;
    align-items: center;
    text-align: center;
    gap: 0;
  }

  .img-wrapper {
    order: 1;
    width: 90%;
    max-width: 360px;
    margin-bottom: 15px;
  }

  .rect-shape {
    top: -25px !important;
    left: -20px !important;
    right: auto !important;
    transform: rotate(-4deg) !important;
    width: 100% !important;
    height: 260px !important;
  }

  .service-item:nth-child(even) .rect-shape {
    left: -20px !important;
    right: auto !important;
    transform: rotate(-4deg) !important;
  }

  .img-wrapper img {
    max-width: 100%;
    position: relative;
    z-index: 2;
  }

  /* Texto con espacio uniforme */
  .service-text {
    order: 2;
    text-align: center;
    max-width: 90%;
    margin-top: 18px;
    padding-bottom: 10px;
  }

  .service-text h3 {
    font-size: 1.8rem;
    margin-bottom: 10px;
  }

  .service-preview {
    font-size: 0.95rem;
    line-height: 1.5;
    margin-bottom: 10px;
    text-align: justify; /* ✅ Justificado también en móvil */
  }

  .ver-mas-btn {
    margin-top: 5px;
  }

  /* 🔹 Fuerza consistencia visual */
  .service-item:nth-child(1) .rect-shape,
  .service-item:nth-child(3) .rect-shape,
  .service-item:nth-child(4) .rect-shape {
    height: 260px !important;
    top: -25px !important;
  }

  /* 🔸 El cuarto (último) baja más */
  .service-item:nth-child(4) .service-text {
    margin-top: 33px !important;
  }
}

/* 🖥️ Centrar texto solo en PC */
@media (min-width: 992px) {
  .service-item {
    align-items: center; /* centra verticalmente */
  }
  .service-text {
    text-align: center;  /* centra el texto */
    margin: 0 auto;      /* centra horizontalmente */
  }
}

/* Animaciones */
.fade-right.show { opacity: 1; transform: translateX(0); }
.fade-left.show { opacity: 1; transform: translateX(0); }
.fade-right { transform: translateX(-40px); }
.fade-left { transform: translateX(40px); }



/* ====== SECCIÓN PRINCIPAL ====== */
.projects-fullscreen {
  display: flex;
  height: 80vh;        
  background: #f8f9fa;
  font-family: 'Inter', sans-serif;
  width: 100%;
  padding: 40px 80px;  
  box-sizing: border-box;
  gap: 10px;
}

/* ====== IZQUIERDA ====== */
.projects-left {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
}

.projects-counters {
  display: flex;
  justify-content: center;
  gap: 30px;
}

.counter-title { font-weight: 600; }
.counter-number {
  font-size: 2rem;
  font-weight: bold;
  color: #04202a;
  margin-top: 5px;
}

/* ====== DERECHA ====== */
.projects-right {
  flex: 1;
  display: flex;
  gap: 15px; 
  overflow: hidden;
  height: 110%;        
  align-items: center;
  padding: 20px 0;
}

/* ====== CINTAS ====== */
.vertical-marquee {
  flex: 1;
  overflow: hidden;
  position: relative;
  height: 100%;
}

.vertical-track {
  display: flex;
  flex-direction: column;
  gap: 15px;
  animation: scrollUp 80s linear infinite;
}

.vertical-marquee.reverse .vertical-track {
  animation: scrollDown 90s linear infinite;
}

.vertical-track img {
  width: 220px;
  height: 245px;
  object-fit: cover;
  border-radius: 8px;
  transition: transform 0.3s ease;
}

.vertical-track img:hover {
  transform: scale(1.05);
}

/* ====== ANIMACIONES CONTINUAS ====== */
@keyframes scrollUp {
  0% { transform: translateY(0); }
  100% { transform: translateY(-50%); }
}

@keyframes scrollDown {
  0% { transform: translateY(-50%); }
  100% { transform: translateY(0); }
}

@media (max-width: 480px) {
  .projects-fullscreen {
    flex-direction: column;
    align-items: center;
    justify-content: flex-start; /* mejor que center para que no empuje todo */
    height: auto;
    min-height: 25vh; /* más compacto */
    padding: 8px 12px;
    gap: 10px; /* separación justa entre contadores y cintas */
  }

  .projects-left {
    margin-bottom: 8px;
  }

 @media (max-width: 480px) {
  .projects-right {
    display: none !important;
  }
}


  /* Solo 2 tiras visibles */
  .projects-right .vertical-marquee:nth-child(n+3) {
    display: none;
  }

  .vertical-track img {
    width: 90px;   /* más pequeño para que no ocupe tanto */
    height: 110px; /* reduce altura de las imágenes */
  }

  .vertical-track {
    gap: 6px;      /* menos espacio entre imágenes */
  }
}
/* ====== GRID DE PROYECTOS ====== */
.projects-grid {
  padding: 60px 80px;
  background: #fff;
}

.grid-container {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 25px;
}

.grid-item img {
  width: 100%;
  object-fit: cover;
  border-radius: 8px;
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.grid-item img:hover {
  transform: scale(1.05);
  box-shadow: 0 10px 20px rgba(0,0,0,0.3);
}

/* ====== RESPONSIVE ====== */
@media (max-width: 1024px) {
  .projects-fullscreen { flex-direction: column; padding: 0 40px; height: auto; }
  .projects-right { height: 50%; }
  .vertical-track img { width: 140px; height: 200px; }
  .grid-container { grid-template-columns: repeat(2, 1fr); gap: 20px; }
  .projects-grid { padding: 60px 40px; }
  .grid-item img { height: 220px; }
}

@media (max-width: 768px) {
  .projects-fullscreen { padding: 0 20px; height: auto; }
  .projects-right { height: 45%; }
  .vertical-track img { width: 120px; height: 180px; }
  .grid-container { grid-template-columns: 1fr; gap: 20px; }
  .grid-item img { height: 200px; }
}


/* ====== fin ====== */


/* ====== Estilos Generales ====== */
.section-title {
  text-align: center;
  font-size: 2.5rem;
  margin-bottom: 40px;
  color: #04202a;
  font-family: 'Sorenson', serif; /* Fuente Sorenson */
}

@font-face {
  font-family: 'Sorenson';
  src: url('fonts/Sorenson.woff2') format('woff2'),
       url('fonts/Sorenson.woff') format('woff'),
       url('fonts/Sorenson.ttf') format('truetype');
  font-weight: normal;
  font-style: normal;
}

/* ====== Contenedor centrado con ancho máximo ====== */
.cbp-wrapper {
  display: grid;
  grid-template-columns: repeat(12, 1fr);
  grid-auto-rows: 160px; /* Tamaño base de filas */
  gap: 20px;
  max-width: 1100px;
  margin: 0 auto;
  padding: 0 20px;
}

/* ====== Distribución de items ====== */
/* Primeros dos grandes un poco más altos */
.cbp-item.large:nth-child(-n+2) {
  grid-column: span 6;
  grid-row: span 2; /* 🔼 un poco más alto */
}

/* Otros grandes (por si hay más después) */
.cbp-item.large:not(:nth-child(-n+2)) {
  grid-column: span 6;
  grid-row: span 2;
}

/* Medianos */
.cbp-item.medium {
  grid-column: span 4;
  grid-row: span 2;
}

/* Pequeños */
.cbp-item.small {
  grid-column: span 4;
  grid-row: span 1;
}

/* ====== Portfolio Item ====== */
.portfolio-item {
  position: relative;
  overflow: hidden;
  border-radius: 12px;
  cursor: pointer;
  width: 100%;
  height: 100%;
}

.portfolio-item img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transition: transform 0.5s ease;
}

.portfolio-item:hover img {
  transform: scale(1.1);
}

/* ====== Overlay ====== */
.portfolio-info {
  position: absolute;
  inset: 0;
  background: rgba(0,0,0,0.6);
  opacity: 0;
  transition: opacity 0.3s ease;
  display: flex;
  justify-content: center;
  align-items: center;
  flex-direction: column;
  text-align: center;
}

.portfolio-item:hover .portfolio-info {
  opacity: 1;
}

.portfolio-info h3 {
  font-size: 1.5rem;
  margin-bottom: 5px;
  color: #fff;
}

.portfolio-info p {
  font-size: 1rem;
  color: #fff;
}

/* ====== Responsivo ====== */
@media(max-width: 1024px){
  .cbp-wrapper { 
    grid-template-columns: repeat(8, 1fr); 
    grid-auto-rows: 140px;
  }

  /* Ajuste para los dos primeros grandes */
  .cbp-item.large:nth-child(-n+2) { grid-row: span 3; }
}

@media(max-width: 768px){
  .cbp-wrapper { 
    grid-template-columns: repeat(6, 1fr); 
    grid-auto-rows: 130px;
  }
  .cbp-item.large { grid-column: span 6; grid-row: span 2; }
  .cbp-item.medium { grid-column: span 3; grid-row: span 2; }
  .cbp-item.small { grid-column: span 3; grid-row: span 1; }
}

@media(max-width: 480px){
  .cbp-wrapper { 
    grid-template-columns: repeat(2, 1fr); 
    grid-auto-rows: 120px;
  }
  .cbp-item { 
    grid-column: span 2 !important; 
    grid-row: span 2 !important; 
  }
}/* ============================
   CONTENIDO WP CON FONDO LIMITADO
============================ */
.contenido-wp {
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 80px 20px 0;
  background: #f8f9fa;
}

.contenido-fondo {
  width: 90%;
  max-width: 1100px;
  background: 
    linear-gradient(rgba(0,0,0,0.55), rgba(0,0,0,0.55)),
    url('/wp-content/themes/grafostudio/images/fondo-home-texto.webp') center/cover no-repeat;
  border-radius: 20px;
  overflow: hidden;
  color: #fff;
  padding: 80px 60px;
  box-shadow: 0 10px 25px rgba(0,0,0,0.15);
  position: relative;
}

.contenido-inner {
  position: relative;
  z-index: 2;
  text-align: justify;
  max-width: 900px;
  margin: 0 auto;
}

/* Títulos */
.contenido-wp h1,
.contenido-wp h2,
.contenido-wp h3 {
  font-family: 'Montserrat', sans-serif;
  color: #fff;
  margin-bottom: 20px;
  line-height: 1.3;
}

.contenido-wp h1 {
  text-align: center;
  font-size: 2.2rem;
  margin-bottom: 30px;
  position: relative;
}

.contenido-wp h1::after {
  content: "";
  width: 80px;
  height: 3px;
  background: linear-gradient(90deg, #00bcd4, #007bff);
  display: block;
  margin: 12px auto 0;
  border-radius: 2px;
}

/* Texto */
.contenido-wp p {
  font-size: 1.125em;
  line-height: 1.7;
  color: #f3f3f3;
  margin-bottom: 1.2em;
}

.contenido-wp a {
  color: #00bcd4;
  text-decoration: none;
  transition: color 0.3s;
}

.contenido-wp a:hover {
  color: #fff;
  text-decoration: underline;
}

/* ============================
   CINTILLA INFERIOR
============================ */
.cintilla-inferior {
  margin-top: 60px;
  height: 6px;
  width: 90%;
  max-width: 1100px;
  border-radius: 3px;
  background: linear-gradient(90deg, #b5b5b5, #e0e0e0, #b5b5b5);
  background-size: 200% 100%;
  animation: moverCintilla 6s linear infinite;
}

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

/* ============================
   RESPONSIVE
============================ */
@media (max-width: 768px) {
  .contenido-fondo {
    padding: 50px 25px;
    border-radius: 15px;
  }
  .contenido-wp h1 {
    font-size: 1.8rem;
  }
  .contenido-wp p {
    font-size: 1em;
  }
}

