/* ===========================================
   PORTFOLIO.CSS - Estilos específicos de Portfolio
   =========================================== */



/* === VARIABLES ESPECÍFICAS === */
:root {
  --color-primary: #ff6b35;
  --color-dark: #1a1a2e;
  --color-purple: #4a1942;
  --color-text: #333;
  --color-text-light: #666;
  --color-bg: #fff;
  --color-bg-light: #f8f9fa;
  --color-border: #e0e0e0;
  --font-code: 'Source Code Pro', monospace;
  --transition: all 0.3s ease;
}

/* Evita el "brinco" por aparición/desaparición del scrollbar */
html{
  overflow-y: scroll;
  scrollbar-gutter: stable;
}

/* Para que el footer quede pegado al final sin huecos */
html, body { 
  height: 100%; 
}

body{
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

html, body{
  overflow-x: hidden;
  width: 100%;
}

/* === PORTFOLIO HERO === */
.portfolio-hero {
  display: grid;
  grid-template-columns: 0.9fr 1.1fr;
  gap: 4rem;
  padding: 3rem 0px 4rem;
  max-width: 1400px;
  margin: 0 auto;
  align-items: flex-start;
  width: 100%;
}

.portfolio-hero,
.portfolio-hero *{
  max-width: 100%;
}

/* === HELP CARD === */
.help-card {
  background: transparent;
  padding: 0;
  margin-top: 98px;
}

.help-card h2 {
  font-family: 'Source Code Pro', monospace;
  font-size: 1.75rem;
  color: #600446;
  margin: 0 0 14px 0;
  display: flex;
  align-items: center;
  gap: 12px;
  font-style: italic;
  font-weight: 400;
  line-height: 1.15;
}

.dot {
  width: 10px;
  height: 10px;
  background: #4a1942;
  border-radius: 50%;
  display: inline-block;
  flex: 0 0 10px;
  margin: 0;
}

.help-card p {
  font-family: 'Source Sans 3', sans-serif;
  max-width: 460px;
  margin: 0 0 22px 0;
  line-height: 1.6;
  font-size: 0.95rem;
  color: #111111;
  font-weight: 500;
}

/* === HELP FILTERS === */
.help-filters {
  display: flex;
  flex-direction: column;
  gap: 18px;
  max-width: 440px;
}

.select-wrap {
  position: relative;
  display: block;
}

/* Oculta el select real */
.select-wrap select{
  position: absolute;
  opacity: 0;
  pointer-events: none;
  width: 0;
  height: 0;
}

/* Botón fake */
.fake-select{
  width: 100%;
  height: 52px;
  border: 1px solid var(--color-border);
  border-radius: 6px;
  background: #fff;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 18px;
  cursor: pointer;
  transition: var(--transition);
}

.fake-text{
  font-family: 'Source Sans 3', sans-serif;
  font-size: .95rem;
  color: #111;
}

.fake-icon{
  width: 18px;
  height: 18px;
  display: block;
  filter: invert(50%) sepia(90%) saturate(2000%) hue-rotate(345deg) brightness(105%) contrast(101%);
}

/* Estado naranja */
.select-wrap.is-selected .fake-select{
  background: #ff6b35;
  border-color: #ff6b35;
}

.select-wrap.is-selected .fake-text{
  color: #fff;
}

.select-wrap.is-selected .fake-icon{
  filter: brightness(0) invert(1);
}

.hero-image{
  justify-self: end;
  margin-left: auto;
  transform: translateX(2px);
}

.hero-base {
  width: 100%;
  height: auto;
  object-fit: cover;
  display: block;
}

/* === SERVICES BLOCK === */
.services-block {
  padding: 5rem 0px 6rem;
  max-width: 1400px;
  margin: 0 auto;
  flex: 0 0 auto;
  display: none;
}

/* Cuando activamos el filtro, mostramos Services */
body.show-services .services-block{
  display: block;
}

.services-title {
  font-family: 'Source Sans 3', sans-serif;
  font-size: 2.25rem;
  color: #42012C;
  margin-bottom: 3.5rem;
  font-weight: 400;
}

.orange-mark {
  color: var(--color-primary);
  font-weight: 400;
}

/* === SERVICES GRID === */
.services-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 2rem;
  column-gap: 3.5rem;
}

.services-col {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}

/* SOLUTIONS: 1 columna (Innovation & Technology va aquí) */
body.mode-solutions .services-grid{
  grid-template-columns: 1fr;
  max-width: 720px;
}

/* SERVICES: 2 columnas (Payments, Audit, etc van aquí) */
body.mode-services .services-grid{
  grid-template-columns: 1fr 1fr;
  max-width: 1400px;
}

/* === SERVICE ROW === */
.svc-row{
  display: flex;
  align-items: center;
  gap: 14px;
  opacity: 1;
  transform: none;
}

/* estado inicial (antes de entrar) */
.svc-row.is-enter{
  opacity: 0;
  transform: translateY(10px);
}

/* transición suave */
.svc-row.is-anim{
  transition: opacity .45s ease, transform .45s ease;
}

/* Icono externo */
.svc-side-icon{
  width: 28px;
  height: 28px;
  flex: 0 0 28px;
  object-fit: contain;
  display: block;
}

/* === SERVICE ITEM (ACORDEÓN) === */
.svc-item {
  flex: 1;
  background: #fff1e7;
  border: 1px solid rgba(255,107,53,.18);
  border-radius: 10px;
  overflow: visible;
  transition: var(--transition);
}

.svc-item:hover {
  border-color: rgba(255,107,53,.35);
}

.svc-item[data-expanded="true"] {
  border-color: var(--color-primary);
}

/* === SERVICE HEAD (BOTÓN) === */
.svc-head {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 16px;
  background: none;
  border: none;
  text-align: left;
  transition: var(--transition);
  cursor: pointer;
  gap: 1rem;
}

.svc-head:hover {
  background: transparent;
}

.svc-left {
  display: flex;
  align-items: center;
  gap: 1rem;
  flex: 1;
}

.svc-name {
  font-family: 'Source Code Pro', monospace;
  font-size: 1rem;
  font-weight: 700;
  color: var(--color-dark);
  font-style: italic;
  line-height: 1.4;
}

.svc-plus {
  font-size: 2rem;
  font-weight: 300;
  transition: var(--transition);
  line-height: 1;
  flex-shrink: 0;
}

.svc-item[data-expanded="true"] .svc-plus {
  transform: rotate(45deg);
}

/* === SERVICE BODY (CONTENIDO EXPANDIBLE) === */
.svc-body {
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.4s ease, padding 0.4s ease;
}

.svc-item[data-expanded="true"] .svc-body {
  max-height: 500px;
  padding: 0 16px 14px;
}

.svc-body p {
  color: var(--color-text-light);
  line-height: 1.7;
  margin: 0;
  font-size: 0.9rem;
  padding-left: 0;
}

/* === FILTRADO === */
.svc-item[data-filtered="hidden"] {
  display: none;
}

.site-footer{
  margin-top: auto;
}

/* ===========================
   CUSTOM DROPDOWNS (opcional)
   =========================== */
.dd{
  width: 100%;
  max-width: 440px;
  position: relative;
}

.dd-btn{
  width: 100%;
  height: 52px;
  border: 1px solid var(--color-border);
  border-radius: 6px;
  background: #fff;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 14px 0 18px;
  cursor: pointer;
  transition: .2s ease;
  gap: 10px;
}

.dd-label{
  font-family: 'Source Sans 3', sans-serif;
  font-size: .95rem;
  color: #111;
}

.dd-arrow{
  width: 18px;
  height: 18px;
  flex: 0 0 18px;
  filter: invert(50%) sepia(90%) saturate(2000%) hue-rotate(345deg) brightness(105%) contrast(101%);
}

.dd-clear{
  display: none;
  font-size: 18px;
  color: #fff;
  line-height: 1;
  margin-left: 4px;
}

.dd.is-open .dd-btn{
  border-color: rgba(255,107,53,.45);
}

.dd-menu{
  position: absolute;
  left: 0;
  right: 0;
  top: calc(100% + 8px);
  background: #fff;
  border: 1px solid rgba(15,23,42,.12);
  border-radius: 10px;
  box-shadow: 0 18px 40px rgba(15,23,42,.12);
  padding: 6px;
  display: none;
  z-index: 50;
}

.dd.is-open .dd-menu{ 
  display: block; 
}

.dd-item{
  width: 100%;
  border: 0;
  background: transparent;
  text-align: left;
  padding: 12px 12px;
  border-radius: 8px;
  cursor: pointer;
  font-family: 'Source Sans 3', sans-serif;
  font-size: .93rem;
  color: #111;
}

.dd-item:hover{
  background: rgba(255,107,53,.10);
}

.dd.has-value .dd-btn{
  background: var(--color-primary);
  border-color: var(--color-primary);
}

.dd.has-value .dd-label{ 
  color: #fff; 
}

.dd.has-value .dd-arrow{ 
  display: none; 
}

.dd.has-value .dd-clear{ 
  display: inline-block; 
}

/* === RESPONSIVE === */

/* Tablets grandes */
@media (max-width: 1200px) {
  .portfolio-hero {
    grid-template-columns: 400px 1fr;
    gap: 3rem;
  }
  
  .services-block {
    max-width: 1100px;
  }
  
  .services-grid {
    column-gap: 2.5rem;
  }
}

/* Tablets */
@media (max-width: 968px) {
  .portfolio-hero {
    grid-template-columns: 1fr;
    gap: 2.5rem;
    padding: 2.5rem 20px;
  }

  .help-card {
    padding-top: 0;
    margin-top: 0;
  }

  .help-filters {
    max-width: 100%;
  }

  .services-grid {
    grid-template-columns: 1fr;
    gap: 1.5rem;
  }

  .services-title {
    font-size: 2rem;
  }

  .services-block {
    padding: 3rem 20px 5rem;
  }
}

/* ===========================
   MOBILE FIX - IMAGEN SIEMPRE AL FINAL
   =========================== */
@media (max-width: 768px){

  /* 1) Hero en columna */
  .portfolio-hero{
    display: flex !important;
    flex-direction: column !important;
    gap: 24px !important;
    padding: 24px 0 32px 0 !important;
    max-width: 100% !important;
  }

  /* 2) Help card arriba CON padding lateral */
  .help-card{
    order: 1;
    margin-top: 0 !important;
    padding: 0 20px !important;
  }

  .help-card h2{
    font-size: 1.4rem !important;
    margin-bottom: 12px !important;
  }

  .help-card p{
    font-size: 0.9rem !important;
    margin-bottom: 20px !important;
    max-width: 100% !important;
  }

  /* 3) Filtros CON padding lateral */
  .help-filters{
    max-width: 100% !important;
    width: 100% !important;
    gap: 14px !important;
    padding: 0 !important;
  }

  .select-wrap{
    max-width: 100% !important;
    width: 100% !important;
  }

  .fake-select{
    width: 100% !important;
    height: 48px !important;
    padding: 0 14px !important;
  }

  .fake-text{
    font-size: 0.9rem !important;
  }

  .fake-icon{
    width: 16px !important;
    height: 16px !important;
  }

  /* 4) ⚡ IMAGEN AL FINAL, FULL WIDTH SIN PADDING */
  .hero-image{
    order: 999 !important;
    width: 100vw !important;
    max-width: 100vw !important;
    margin-left: calc(-50vw + 50%) !important;
    margin-right: calc(-50vw + 50%) !important;
    padding: 0 !important;
    transform: none !important;
    justify-self: stretch !important;
  }

  .hero-base{
    width: 100% !important;
    height: 240px !important;
    object-fit: cover;
    display: block;
    border-radius: 0 !important;
  }

  /* 5) Services: 1 columna en móvil CON padding lateral */
  .services-block{
    padding: 32px 20px 48px 20px !important;
    max-width: 100% !important;
  }

  .services-title{
    font-size: 1.75rem !important;
    margin-bottom: 24px !important;
  }

  .services-grid{
    display: block !important;
    width: 100% !important;
  }

  .services-col{
    display: flex !important;
    flex-direction: column !important;
    gap: 14px !important;
    width: 100% !important;
  }

  /* 6) Cards ocupan 100% sin overflow */
  .svc-row{
    width: 100% !important;
    gap: 10px !important;
    display: flex !important;
  }

  .svc-side-icon{
    width: 24px !important;
    height: 24px !important;
    flex: 0 0 24px !important;
  }

  .svc-row .svc-item{
    flex: 1 !important;
    width: auto !important;
    min-width: 0 !important;
    border-radius: 10px !important;
  }

  .svc-row .svc-head{
    padding: 12px 14px !important;
    gap: 8px !important;
  }

  .svc-name{
    font-size: 0.9rem !important;
  }

  .svc-row .svc-plus{
    font-size: 1.6rem !important;
  }

  .svc-item[data-expanded="true"] .svc-body{
    padding: 0 14px 12px !important;
  }

  .svc-body p{
    font-size: 0.85rem !important;
  }

  /* Dropdowns en móvil */
  .dd{ 
    max-width: 100% !important; 
  }
  
  .dd-btn{ 
    height: 48px !important; 
    padding: 0 14px !important; 
  }
  
  .dd-label{ 
    font-size: .9rem !important; 
  }
  
  .dd-arrow{ 
    width: 16px !important; 
    height: 16px !important; 
  }
  
  .dd-item{ 
    padding: 10px 10px !important; 
    font-size: .86rem !important; 
  }
}

/* Mobile muy pequeño */
@media (max-width: 480px){
  .portfolio-hero{
    padding: 20px 0 68px 0 !important;
  }

  .help-card{
    padding: 35px 1px !important;
  }

  .hero-base{ 
    height: 350px !important; 
  }

  .services-block{ 
    padding: 28px 16px 44px 16px !important; 
  }

  .help-card h2{
    font-size: 1.3rem !important;
  }

  .help-card p{
    font-size: 0.875rem !important;
  }

  .services-title{
    font-size: 1.6rem !important;
  }

  .fake-select{
    height: 44px !important;
  }
}

/* ✅ Desktop: NO mostrar la imagen mobile */
.hero-image--mobile { display: none !important; }

/* ✅ Mobile: ocultar la desktop y mostrar la mobile */
@media (max-width: 768px){
  .hero-image--desktop { display: none !important; }
  .hero-image--mobile  { display: block !important; }
}

@media (max-width: 768px){

  /* 1) SUBIR TODO EL BLOQUE (sin cambiar tamaños) */
  .services-block{
    transform: translateY(-68px); /* 🔼 sube todo (ajusta -12 / -24 si quieres) */
  }

  /* 2) Más aire entre filas SIN engordar tarjetas */
  .svc-row{
    margin-bottom: 18px;   /* separación vertical real */
    gap: 12px;             /* separación icono ↔ tarjeta */
  }

  /* 3) Asegura que el bloque interno no meta márgenes raros */
  .svc-item{
    padding: 0 !important;          /* ⚠️ evita que se vuelva “gorda” si alguien lo cambió */
    background: transparent;
  }

  /* 4) La tarjeta real (tu botón) mantiene su tamaño, solo le damos espacio abajo */
  .svc-head{
    margin: 0;
  }

  /* 5) EXTRA: específicamente entre Procurement y Customer (por si el margin no aplica ahí) */
  .svc-row[data-category="procurement"]{
    margin-bottom: 22px;
  }
}
@media (max-width: 768px){

  /* =========================
     1) SERVICES: separar Procurement ↔ Customer
     (sin tocar padding ni altura)
     ========================= */
  .services-block .svc-row[data-category="procurement"]{
    margin-bottom: 22px !important; /* más aire debajo de Procurement */
  }

  /* Por si tu layout usa gap en columnas y margin no aplica bien */
  .services-block .services-col{
    row-gap: 18px;
  }


  /* =========================
     2) SOLUTIONS: dar aire entre la card de Innovation y la imagen
     ========================= */
  .solutions-block{
    padding-bottom: 22px;           /* espacio interno abajo del bloque */
    margin-bottom: 10px;            /* separa el bloque del siguiente elemento (imagen) */
  }

  /* Si tu imagen móvil abajo es .hero-image--mobile */
  .hero-image--mobile{
    margin-top: 18px;               /* espacio arriba de la imagen */
  }

  /* (Extra por si la imagen está "subiendo" por transform/margins de otros) */
  .solutions-block + .hero-image--mobile{
    margin-top: 22px !important;
  }
}
/* =========================================
   PATCH MOCKUP (usa aria-expanded, NO is-open)
   ========================================= */

/* La tarjeta/pill se ve como mockup */
.svc-item{
  background:#fff1e7 !important;
  border:1px solid rgba(255,107,53,.18) !important;
  border-radius:10px !important;
  overflow:visible !important;
}

/* El header (pill) */
.svc-head{
  background:transparent !important;
  padding:14px 16px !important;
}

/* Body cerrado (tu sistema original) */
.svc-body{
  max-height:0 !important;
  overflow:hidden !important;
  padding:0 16px 0 !important;
  transition:max-height .4s ease, padding .4s ease !important;
  display:block !important; /* IMPORTANTE: no lo escondas con display none */
}

/* ✅ ABIERTO usando aria-expanded del botón */
.svc-head[aria-expanded="true"]{
  /* opcional: si quieres borde más marcado cuando abre */
}

.svc-head[aria-expanded="true"] + .svc-body{
  max-height:600px !important;
  padding:0 16px 14px !important;
}

/* Texto del body */
.svc-body p{
  margin:0 !important;
  color: var(--color-text-light) !important;
  font-size:.9rem !important;
  line-height:1.7 !important;
}

/* Bullets (Innovation) */
.svc-body .bullets{
  margin:8px 0 0 0 !important;
  padding-left:18px !important;
  list-style:disc !important;
}
.svc-body .bullets li{
  margin:4px 0 !important;
  color: var(--color-text-light) !important;
}
/* =========================================
   MOCKUP: contenido FUERA de la card
   ========================================= */

/* La card solo para el header */
.svc-item{
  background: transparent !important; /* quita el beige del contenedor */
  border: 0 !important;               /* quitamos borde del contenedor */
  padding: 0 !important;
}

/* El pill (beige) es el botón */
.svc-head{
  background:#fff1e7 !important;
  border:1px solid rgba(255,107,53,.22) !important;
  border-radius:10px !important;
  padding:14px 16px !important;
}

/* El body ya NO tiene fondo ni borde (va fuera) */
.svc-body{
  background: transparent !important;
  border: 0 !important;

  /* que salga alineado debajo del pill (sin la columna del icono) */
  padding: 10px 0 0 16px !important;
  max-height: 0 !important;
  overflow: hidden !important;
}

/* abrir usando aria-expanded */
.svc-head[aria-expanded="true"] + .svc-body{
  max-height: 700px !important;
  padding: 10px 0 0 16px !important;
}

/* ====== LISTA CON "RAYAS" (como mockup) ====== */
.svc-body .bullets{
  list-style: none !important;
  margin: 6px 0 0 0 !important;
  padding: 0 !important;
}

.svc-body .bullets li{
  margin: 6px 0 !important;
  padding-left: 14px !important;
  position: relative;
  color: #4b5563 !important;
  font-size: .92rem;
}

.svc-body .bullets li::before{
  content: "–";
  position: absolute;
  left: 0;
  top: 0;
  color: #4b5563;
}

/* Para los <p> de Services, que se vea igual (como texto fuera) */
.svc-body p{
  margin: 6px 0 0 0 !important;
  color:#4b5563 !important;
  font-size:.92rem !important;
  line-height:1.6 !important;
}
/* Icono SIEMPRE fijo arriba, no centrado cuando abre */
.svc-row{
  align-items: flex-start !important;
}

/* Opcional: baja 2px para que quede alineado perfecto con el pill */
.svc-side-icon{
  margin-top: 12px; /* ajusta 10-14 según tu pill */
}

/* =========================
   DESKTOP: más aire debajo de Solutions
   ========================= */
@media (min-width: 769px){

  .solutions-block{
    padding-bottom: 120px;  /* aire interno */
  }

  /* opcional: separa del footer */
  .solutions-block{
    margin-bottom: 40px;
  }

  /* si aún lo sientes pegado, sube este valor */
  /* .solutions-block{ padding-bottom: 160px; } */
}


/* ===========================
   iPhone 16 específico (430px)
   =========================== */
@media (max-width: 430px) and (min-width: 390px){
  
  /* HERO: mover todo hacia la izquierda */
  .portfolio-hero{
    padding-left: 16px !important;
    padding-right: 16px !important;
  }
  
  .help-card{
    padding: 0 !important;
    margin-left: -13px;
  }
  
  /* Reducir altura Y ancho de las pills */
  .svc-head{
    padding: 9px 12px !important;
    min-height: auto !important;
    max-width: 90% !important;
  }
  
  /* La tarjeta completa más estrecha */
  .svc-item{
    max-width: 100% !important;
  }
  
  .svc-name{
    font-size: 0.82rem !important;
    line-height: 1.25 !important;
    font-weight: 600 !important;
  }
  
  .svc-plus{
    font-size: 1.3rem !important;
  }
  
  /* Más compactos los iconos laterales */
  .svc-side-icon{
    width: 20px !important;
    height: 20px !important;
    margin-top: 7px !important;
    flex: 0 0 20px !important;
  }
  
  /* Menos espacio entre tarjetas y gap más pequeño */
  .svc-row{
    margin-bottom: 10px !important;
    gap: 8px !important;
  }
  
  /* Padding lateral del services block */
  .services-block{
    padding-left: -6px !important;
    padding-right: 16px !important;
  }
  
  /* Filtros más compactos */
  .fake-select{
    height: 40px !important;
    padding: 0 12px !important;
  }
  
  .help-filters{
    gap: 10px !important;
    padding: 0 !important;
  }
     .select-wrap {
        max-width: 95% !important;
        width: 100% !important;
    }
}
