/* SECCIÓN PROYECTOS */
.proyectos-section{
  padding: 20px 0 20px 0;
  background: var(--azul-10);
  overflow: visible; /* ✅ importante */
}
.proyectos-container{
  max-width: 1440px;
  margin: 0 auto;
  padding: 0 24px;
  overflow: visible; /* ✅ importante */
}

/* Título */
.proyectos-title{
  text-align: center;
  margin-bottom: 40px;
  color: var(--azul2-100);
}

/* Swiper wrapper: NO cortar hover */
.proyectos-swiper{
  width: 100%;
  overflow: visible !important;     /* ✅ deja subir las cards */
  padding: 18px 0 56px;             /* ✅ espacio arriba para hover + abajo para flechas */
}

/* Swiper base (Swiper mete overflow hidden; lo sobreescribimos) */
.proyectos-swiper.swiper{
  overflow: visible !important;
}

.proyectos-swiper .swiper-wrapper{
  overflow: visible !important;
}


/* Slide */
.proyectos-swiper .swiper-slide{
  width: 412px;
  display: flex;
  justify-content: center;
  overflow: visible; /* ✅ */
}

/* CARD */
.proyecto-card{
  position: relative;
  width: 412px;
  height: 370px;
  border-radius: 24px;
  overflow: hidden;
  color: #fff;
  display: flex;
  align-items: flex-end;
  padding: 24px 24px 32px;
  box-shadow: 0 18px 40px rgba(0,0,0,0.20);
  background: #000;
  transition: transform .3s ease, box-shadow .3s ease;
  will-change: transform;
}

.proyecto-media{
  position: absolute;
  inset: 0;
  z-index: 0;
}

.proyecto-media img{
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transition: transform .3s ease;
}

/* Overlay degradado desde abajo */
.proyecto-overlay{
  position: absolute;
  inset: 0;
  background: linear-gradient(
    to top,
    var(--azul2-100) 0%,
    rgba(0,0,0,0.0) 55%
  );
  z-index: 1;
}

.proyecto-content{
  position: relative;
  z-index: 2;
}

/* Título dentro de la card */
.proyecto-heading{
  font-size: 1rem;
  font-weight: 600;
  margin: 0 0 8px;
}

.proyecto-text{
  font-size: 0.9rem;
  line-height: 1.6;
  margin: 0 0 18px;
}

.proyecto-btn{
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 10px 26px;
  border-radius: 999px;
  background: var(--verde-100, #43b02a);
  color: #fff;
  font-size: 0.8rem;
  font-weight: 600;
  text-decoration: none;
  letter-spacing: .02em;
  transition: background .2s ease, transform .2s ease;
}
.proyecto-btn:hover{
  background: var(--verde-120, #2f8b1d);
  transform: translateY(-1px);
}

.proyecto-card:hover{
  transform: translateY(-10px);
  box-shadow: 0 26px 60px rgba(0,0,0,0.35);
}

.proyecto-card:hover .proyecto-media img{
  transform: scale(1.05);
}
/* Flechas */
.proyectos-nav{
  display: flex;
  justify-content: center;
  gap: 16px;
  margin-top: 8px;
  position: relative;
  z-index: 5;
}

.proyectos-arrow{
  width: 40px;
  height: 40px;
  border-radius: 999px;
  border: 2px solid var(--verde-100, #43b02a);
  background: #fff;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: background .2s ease, transform .2s ease;
}

/* Aquí luego metes tus SVGs de flechas */
.proyectos-arrow::before{
  content: "‹";
  font-size: 18px;
  line-height: 1;
  color: var(--verde-100, #43b02a);
}

.proyectos-next::before{ content: "›"; }

.proyectos-arrow:hover{
  background: var(--verde-100, #43b02a);
  transform: translateY(-2px);
}

.proyectos-arrow:hover::before{ color: #fff; }



/* Responsive */
@media (max-width: 1024px){
  .proyectos-swiper .swiper-slide{ width: 320px; }
  .proyecto-card{ width: 320px; height: 320px; }
}

@media (max-width: 640px){
  .proyectos-section{ padding: 56px 0; }
  .proyectos-title{ margin-bottom: 24px; }
  .proyectos-swiper{ padding: 10px 0 48px; }
  .proyectos-swiper .swiper-slide{ width: 82vw; }
  .proyecto-card{ width: 82vw; height: 320px; }
}

.swiper-wrapper {
  display: flex;
}

.swiper {
  width: 100%;
  overflow: visible;
}

.proyectos-swiper{
  width: 100%;
  overflow: visible;        /* ← deja que la card suba sin cortarse */
  padding: 20px 0 56px;     /* espacio arriba y abajo para hover + flechas */
}

.proyectos-swiper .swiper-wrapper {
  display: flex;
}


.proyectos-nav{
  display: flex;
  justify-content: center;
  gap: 16px;
  margin-top: 8px;
  position: relative;
  z-index: 5;       /* por encima del carrusel */
}

.proyectos-arrow{
  width: 40px;
  height: 40px;
  border-radius: 999px;
  border: 2px solid #7ac143;     /* verde fuerte directo */
  background: #ffffff;           /* BLANCO para que se vea bien */
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: background .2s ease, transform .2s ease;
}

/* Iconitos con pseudo-elementos */
.proyectos-arrow::before{
  content: "‹";
  font-size: 18px;
  line-height: 1;
  color: #7ac143;
}

.proyectos-next::before{
  content: "›";
}

.proyectos-arrow:hover{
  background: #7ac143;
  transform: translateY(-2px);
}

.proyectos-arrow:hover::before{
  color: #ffffff;
}



/* Evita scroll horizontal por slides fuera del viewport */
.proyectos-section{
  overflow-x: clip;   /* mejor que hidden, no crea scrollbars */
  overflow-y: visible;
}

/* El carrusel solo recorta hacia los lados, NO arriba/abajo (hover) */
.proyectos-swiper.swiper{
  overflow-x: clip !important;
  overflow-y: visible !important;
}

/* Swiper wrapper también */
.proyectos-swiper .swiper-wrapper{
  overflow: visible !important; /* deja hover */
}



/* =====================================
   PROYECTOS – MODO GRID (1 o 2 ITEMS)
   ===================================== */

/* Contenedor cuando NO hay swiper */
.proyectos-swiper.is-grid {
  overflow: visible;
  padding-bottom: 0;
}

/* Quitamos comportamiento swiper */
.proyectos-swiper.is-grid .swiper-wrapper {
  display: grid;
  justify-content: center;
  align-items: stretch;
  transform: none !important;
}

/* ----- 1 ITEM ----- */
.proyectos-swiper.is-grid.has-1 .swiper-wrapper {
  grid-template-columns: repeat(1, 412px);
  gap: 24px;
}

/* ----- 2 ITEMS ----- */
.proyectos-swiper.is-grid.has-2 .swiper-wrapper {
  grid-template-columns: repeat(2, 412px);
  gap: 24px;
}

/* Slides en modo grid */
.proyectos-swiper.is-grid .swiper-slide {
  width: 412px;
  margin: 0;
}

/* Ocultamos flechas cuando no hay carrusel */
.proyectos-swiper.is-grid + .proyectos-nav {
  display: none;
}

/* Responsive */
@media (max-width: 920px) {
  .proyectos-swiper.is-grid.has-2 .swiper-wrapper {
    grid-template-columns: 1fr;
  }

  .proyectos-swiper.is-grid .swiper-slide {
    width: 100%;
  }
}


/* Cuando NO hay carrusel */
.proyectos-swiper.is-grid .swiper-wrapper{
  display: grid;
  justify-content: center;
  gap: 24px;
}

.proyectos-swiper.is-grid.has-1 .swiper-wrapper{
  grid-template-columns: repeat(1, 412px);
}

.proyectos-swiper.is-grid.has-2 .swiper-wrapper{
  grid-template-columns: repeat(2, 412px);
}

.proyectos-swiper.is-grid.has-3 .swiper-wrapper{
  grid-template-columns: repeat(3, 412px);
}

/* En grid, los slides ya no necesitan width fijo */
.proyectos-swiper.is-grid .swiper-slide{
  width: auto;
}
