/* 
=============================================== 
NYM Roommates — Refined & Compact Collage Version 
=============================================== 
*/
.roommates-section {
    padding: 0;
    color: #1a202c;
    position: relative;
    overflow: hidden;
}

.roommates-container {
    max-width: 1400px;
    margin: 0 auto;
    display: grid;
    grid-template-columns: 1fr 1.15fr;
    gap: 2.5rem;
    align-items: center;
    min-height: 60vh;
    /* compact height */
    padding: 3rem 2rem;
    position: relative;
}

/* ===================== LEFT CONTENT ===================== */
.roommates-content {
    z-index: 2;
    padding-left: 1rem;
}

.roommates-title {
    font-size: clamp(2.2rem, 4.5vw, 3.6rem);
    font-weight: 900;
    line-height: 1;
    margin-bottom: 0.25rem;
    color: #0f172a;
    letter-spacing: -0.02em;
}

.roommates-title-accent {
    color: #3892A6;
    display: block;
    font-size: clamp(2.6rem, 5vw, 4rem);
    font-style: italic;
    font-weight: 300;
    margin-top: 0.15rem;
    transform: translateX(-3px);
}

.roommates-lead {
    font-size: 1.125rem;
    line-height: 1.6;
    color: #374151;
    margin: 1.25rem 0;
    font-weight: 400;
    max-width: 480px;
}

.roommates-highlight {
    color: #73553C;
    font-weight: 700;
    position: relative;
    white-space: nowrap;
}

.roommates-highlight::after {
    content: '';
    position: absolute;
    bottom: 2px;
    left: 0;
    width: 100%;
    height: 3px;
    background: #5EADBF;
    transform: scaleX(0);
    transform-origin: left;
    transition: transform 0.3s ease;
}

.roommates-section:hover .roommates-highlight::after {
    transform: scaleX(1);
}

.roommates-list {
    color: #4b5563;
    font-size: 1rem;
    margin: 1rem 0;
    padding: 0;
    list-style: none;
}

.roommates-list li {
    margin-bottom: 0.75rem;
    padding-left: 1.5rem;
    position: relative;
    font-weight: 500;
}

.roommates-list li::before {
    content: '✓';
    position: absolute;
    left: 0;
    color: #5EADBF;
    font-weight: 700;
    font-size: 1.1rem;
}

.roommates-bold {
    font-weight: 800;
    color: #73553C;
    text-transform: none;
}

/* ===================== CTA BOX ===================== */
.roommates-box {
    background: #ffffff;
    padding: 2.5rem;
    border-radius: 1.5rem;
    box-shadow: 0 10px 40px rgba(56, 146, 166, 0.12);
    margin-top: 3rem;
    position: relative;
    border: 2px solid transparent;
    background-clip: padding-box;
    text-align: center;
    max-width: 500px;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.roommates-box:hover {
    transform: translateY(-5px);
    /*box-shadow: 0 15px 50px rgba(56, 146, 166, 0.18);*/
    cursor: pointer;
}

.roommates-box::before {
    content: '';
    position: absolute;
    top: -2px;
    left: -2px;
    right: -2px;
    bottom: -2px;
    border-radius: 1.5rem;
    z-index: -1;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.roommates-box:hover::before {
    opacity: 1;
}

.roommates-box-title {
    font-size: 1.5rem;
    font-weight: 800;
    background: linear-gradient(135deg, #3892A6 0%, #5EADBF 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    margin-bottom: 1rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.roommates-box-icon {
    font-size: 2rem;
    filter: grayscale(0);
}

.roommates-box p {
    line-height: 1.7;
    font-size: 1.05rem;
    margin-bottom: 1.5rem;
}

.roommates-cta {
    display: inline-block;
    padding: 1rem 2.5rem;
    background: linear-gradient(135deg, #3892A6 0%, #5EADBF 100%);
    color: white;
    text-decoration: none;
    border-radius: 2rem;
    font-weight: 700;
    font-size: 1.1rem;
    transition: all 0.3s ease;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    position: relative;
    overflow: hidden;
}

.roommates-cta::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, #5EADBF 0%, #73553C 100%);
    transition: left 0.3s ease;
}

.roommates-cta span {
    position: relative;
    z-index: 1;
}

.roommates-cta:hover::before {
    left: 0;
}

.roommates-cta:hover {
    transform: scale(1.05);
    box-shadow: 0 10px 30px rgba(56, 146, 166, 0.3);
}

/* Animation */
@keyframes float {

    0%,
    100% {
        transform: translateY(0) rotate(0deg);
    }

    50% {
        transform: translateY(-20px) rotate(10deg);
    }
}

/* ===================== RIGHT VISUAL — COLLAGE ===================== */
.roommates-visual {
    position: relative;
    height: 100%;
    min-height: 540px;
}

.roommates-collage {
    position: absolute;
    inset: 0;
    display: block;
    width: 100%;
    height: 100%;
    max-height: 520px;
    top: 50%;
    transform: translateY(-50%);
}

/* Polaroid-like cards */
.photo-card {
    --z: 1;
    position: absolute;
    width: 62%;
    aspect-ratio: 4 / 3;
    background: #fff;

    padding: 10px;
    box-shadow: 0 18px 55px rgba(15, 23, 42, 0.18);
    z-index: var(--z);
    transition: transform 0.28s ease, box-shadow 0.28s ease, z-index 0.12s linear;
    cursor: pointer;
}

.photo-card img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

/* Initial overlap positions */
.card1 {
    left: 2%;
    top: 10%;
    transform: rotate(-6deg);
}

.card2 {
    left: 22%;
    top: 0;
    transform: rotate(5deg);
}

.card3 {
    left: 42%;
    top: 16%;
    transform: rotate(-2deg);
}

/* Hover / Focus Bring-to-front */
.photo-card:hover,
.photo-card:focus,
.photo-card.is-front {
    transform: rotate(0deg) scale(1.03);
    z-index: 9 !important;
    box-shadow: 0 24px 70px rgba(15, 23, 42, 0.28);
    outline: none;
}

/* Floating accent shape */
.roommates-accent-shape {
    position: absolute;
    width: 180px;
    height: 180px;
    background: linear-gradient(135deg, #BAD3D9 0%, #5EADBF 100%);
    border-radius: 30% 70% 70% 30% / 30% 30% 70% 70%;
    opacity: 0.25;
    top: 8%;
    right: -40px;
    animation: float 6s ease-in-out infinite;
    z-index: 0;
}

@keyframes float {

    0%,
    100% {
        transform: translateY(0) rotate(0deg);
    }

    50% {
        transform: translateY(-20px) rotate(10deg);
    }
}

/* =============================================== Roommates Box — CodePen "Card Blue" Skin (scoped) =============================================== */
/* Base card */
.roommates-box {
    position: relative;
    z-index: 2;
    max-width: 38rem;
    width: 100%;
    padding: 1.5rem 2rem 4rem;
    border-radius: 1rem;
    text-align: left;
    background: radial-gradient(ellipse at right top, rgba(0, 69, 143, 0.56) 0%, #151419 45%, #151419 100%);
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.25);
    opacity: 0.95;
    transition: opacity .25s ease-in, transform .25s ease, box-shadow .25s ease;
    border: none;
    /* sobreescribe el borde previo */
}

/* Glow border estilo CodePen usando máscara (fallback: outline) */
.roommates-box::before {
    content: "";
    position: absolute;
    inset: 0;
    border-radius: 1rem;
    padding: 1px;
    background: radial-gradient(ellipse at right top, #00458f8f 0%, #151419 45%, #151419 100%);
    opacity: 0.95;
    transition: opacity 0.25s ease-in;
    pointer-events: none;
}

@supports not (-webkit-mask: none) {
    .roommates-box::before {
        display: none;
    }

    .roommates-box {
        outline: 1px solid #232228;
    }
}

.roommates-box:hover {
    opacity: 1;
    transform: translateY(-2px);
    /*box-shadow: 0.063em 0.75em 1.563em rgba(0, 0, 0, 0.78);*/
    cursor: pointer;
}

/* Title -> blanco, sin gradient text */
.roommates-box-title {
    margin: 0 0 .5rem 0;
    font-size: 1.2rem;
    font-weight: 600;
    letter-spacing: .035em;
    color: #ffffff;
    display: flex;
    align-items: center;
    gap: .65rem;
    background: none;
    -webkit-text-fill-color: initial;
}

/* Icono -> azul CodePen */
.roommates-box-icon {
    font-size: 1.35rem;
    line-height: 1;
    color: #5a81ff;
    /* $clr-blue */
    filter: none;
}

/* Body copy -> gris claro */
.roommates-box p {
    margin: 0 0 1rem 0;
    color: #cccccc;
    font-size: 1rem;
    letter-spacing: .031rem;
    line-height: 1.6;
}

/* CTA dentro de la card con estilo btn-first */
.roommates-box .roommates-cta {
    border-radius: .25em;
    padding: .625rem 2.2rem;
    display: inline-block;
    font-weight: 600;
    font-size: .9rem;
    text-transform: none;
    letter-spacing: 0;
    box-shadow: none;
    transition: background .2s ease, transform .2s ease;
    position: relative;
    overflow: visible;
}

/* Anula el overlay/gradient anterior de tu CTA global */
.roommates-box .roommates-cta::before {
    content: none !important;
}

.roommates-box .roommates-cta:hover {
    transform: translateY(-1px);
}

/* === OUR-NEW-US Button === */
.btn-our-new-us {
    --clr1: #F24464;
    --clr2: #BD6DF2;
    --clr3: #6F04D9;
    --clr4: #05F258;
    background: linear-gradient(135deg, var(--clr1), var(--clr2), var(--clr3), var(--clr4));
    background-size: 300% 300%;
    color: #fff;
    font-family: 'Poppins', sans-serif;
    font-weight: 600;
    font-size: 1rem;
    letter-spacing: 0.5px;
    padding: 0.9em 2em;
    border: none;
    border-radius: 12px;
    cursor: pointer;
    transition: all 0.4s ease;
    box-shadow: 0 0 8px rgba(255, 255, 255, 0.25) inset;
    text-transform: uppercase;
}

/* Gradient animation on hover */
.btn-our-new-us:hover {
    background-position: 100% 0;
    box-shadow: 0 0 25px rgba(188, 109, 242, 0.8), 0 0 50px rgba(5, 242, 88, 0.4);
    transform: translateY(-2px);
}

/* Optional active click effect */
.btn-our-new-us:active {
    transform: scale(0.97);
    box-shadow: 0 0 10px rgba(242, 67, 99, 0.5);
}

@keyframes gradientFlow {
    0% {
        background-position: 0% 50%;
    }

    50% {
        background-position: 100% 50%;
    }

    100% {
        background-position: 0% 50%;
    }
}

.btn-our-new-us {
    animation: gradientFlow 6s ease infinite;
    position: absolute;
    right: 2rem;
    bottom: 2rem;
}

/* Responsive tweaks */
@media (max-width: 640px) {
    .roommates-box {
        padding: 1rem 1.25rem 4rem;
        text-align: left;
    }

    .roommates-box-title {
        font-size: 1.1rem;
    }
}

/* ===================== RESPONSIVE DESIGN ===================== */
@media (max-width: 1024px) {
    .roommates-container {
        grid-template-columns: 1fr;
        gap: 1rem;
        min-height: auto;
    }

    .roommates-content {
        padding-left: 0;
        text-align: center;
        max-width: 640px;
        margin: 0 auto;
    }

    .roommates-lead,
    .roommates-box {
        margin-left: auto;
        margin-right: auto;
    }

    .roommates-visual {
        min-height: 420px;
        order: -1;
    }

    .roommates-collage {
        position: relative;
        transform: none;
        max-width: 720px;
        margin: 0 auto;
    }

    .card1 {
        left: 5%;
        top: 12%;
    }

    .card2 {
        left: 26%;
        top: 2%;
    }

    .card3 {
        left: 47%;
        top: 18%;
    }

    .roommates-accent-shape {
        display: none;
    }
}

@media (max-width: 640px) {
    .roommates-section {
        padding: 0rem;
    }

    .roommates-title {
        font-size: 1.9rem;
    }

    .roommates-title-accent {
        font-size: 2.3rem;
    }

    .roommates-box {
        padding: 1.25rem;
    }

    .roommates-cta {
        width: 100%;
        text-align: center;
    }

    /* Mobile-friendly: horizontal scroll collage */
    .roommates-collage {
        position: relative;
        display: flex;
        gap: 1rem;
        overflow-x: auto;
        padding: 0.25rem 0.25rem 1rem;
        scroll-snap-type: x mandatory;
    }

    .photo-card {
        position: relative;
        min-width: 82%;
        transform: none !important;
        scroll-snap-align: center;
    }
}

/* ===================== CLEAN MOBILE COLLAGE (REPLACEMENT) ===================== */
@media (max-width: 640px) {
    .roommates-container {
        display: flex;
        flex-direction: column;
        align-items: center;
        text-align: center;
        padding: 1rem;
    }

    /* El collage se vuelve una sola imagen destacada */
    .roommates-visual {
        width: 100%;
        min-height: unset;
    }

    .roommates-collage {
        position: relative;
        display: flex;
        justify-content: center;
        align-items: center;
        overflow: hidden;
        max-width: 420px;
        margin: 0 auto;
        
        box-shadow: 0 10px 30px rgba(15, 23, 42, 0.12);
    }

    /* Oculta el efecto polaroid múltiple */
    .photo-card {
        position: relative !important;
        width: 100% !important;
        min-width: unset !important;
        transform: none !important;
        padding: 0 !important;
        box-shadow: none;
    }

    .photo-card:not(:first-child) {
        display: none !important;
    }

    .photo-card img {
        width: 100%;
        height: auto;
    }

    .roommates-accent-shape {
        display: none !important;
    }

    /* Textos ajustados */
    .roommates-title {
        font-size: 1.75rem;
    }

    .roommates-title-accent {
        font-size: 2.25rem;
    }

    .roommates-lead {
        font-size: 1rem;
        line-height: 1.55;
        color: #475569;
        margin: 1rem 0 1.5rem;
    }

    .roommates-box {
        margin-top: 1.75rem;
        padding: 1.25rem 1.5rem 3.5rem;
    }
}

/* =========================== MOBILE POLISH (≤640px) =========================== */
@media (max-width: 640px) {

    /* Layout compacto y centrado */
    .roommates-section {
        padding: 0;
    }

    .roommates-container {
        display: flex;
        flex-direction: column;
        align-items: center;
        gap: 1rem;
        text-align: left;
        max-width: 420px;
        margin: 0 auto;
    }

    /* Tipografía: jerarquía calmada */
    .roommates-title {
        font-size: 1.65rem;
        line-height: 1.15;
        margin: 0;
    }

    .roommates-title-accent {
        font-size: 2.05rem;
        font-weight: 400;
        margin-top: .15rem;
    }

    .roommates-lead {
        font-size: 1rem;
        line-height: 1.55;
        color: #475569;
        margin: .85rem 0 1.1rem;
    }

    .roommates-list {
        margin: .25rem 0 0;
    }

    .roommates-list li {
        margin-bottom: .5rem;
    }

    /* -------- Visual principal: “card” limpia con doble sombra suave ---------- */
    .roommates-visual {
        order: -1;
        width: 100%;
    }

    .roommates-collage {
        position: relative;
        width: 100%;
        max-width: 420px;
        margin: 0 auto 1.1rem;
        padding: .5rem;
        /* borde blanco alrededor de la imagen */
        
        background: #fff;
        box-shadow: 0 8px 22px rgba(15, 23, 42, .10),
            /* sombra superior suave */
            0 24px 60px rgba(15, 23, 42, .12);
        /* sombra inferior larga */
        overflow: hidden;
    }

    /* sombra “neumórfica” inferior separada del contenedor */
    .roommates-collage::after {
        content: "";
        position: absolute;
        left: 10%;
        right: 10%;
        bottom: -16px;
        height: 26px;
        
        filter: blur(12px);
        background: rgba(15, 23, 42, .10);
        pointer-events: none;
    }

    /* Una sola foto, full-bleed dentro de la “card” */
    .photo-card {
        position: relative !important;
        width: 100% !important;
        padding: 0 !important;
        box-shadow: none !important;
        transform: none !important;
    }

    .photo-card:not(:first-child) {
        display: none !important;
    }

    .photo-card img {
        width: 100%;
        height: auto;
        display: block;
    }

    /* -------- Box/CTA: quitar skin oscuro en mobile y hacerlo aireado ---------- */
    .roommates-box {
        width: 100%;
        max-width: 420px;
        margin: 0 auto;
        padding: 1rem 1rem 1.25rem;
        border-radius: 16px;
        text-align: left;
        margin-top: 2rem;
    }

    .roommates-box::before {
        display: none !important;
    }

    /* sin glow en mobile */
    .roommates-box-title {
        font-size: 1.05rem;
        font-weight: 700;
        gap: .5rem;
    }

    .roommates-box p {
        font-size: .8rem;
        margin: .35rem 0 1rem;
    }

    /* CTA: sin position absolute, ancho completo, sin fuegos artificiales */
    .btn-our-new-us {
        position: static !important;
        display: block;
        width: 100%;
        text-align: center;
        padding: .9rem 1rem;
        border-radius: 12px;
        font-size: .98rem;
        text-transform: none;
        letter-spacing: .2px;
        animation: none;
        /* sin animación de gradiente en mobile */
        box-shadow: 0 6px 16px rgba(56, 146, 166, .18);
    }

    .btn-our-new-us:hover {
        transform: translateY(-1px);
        box-shadow: 0 10px 22px rgba(56, 146, 166, .22);
    }

    /* Accesibilidad: reducir movimiento */
    @media (prefers-reduced-motion: reduce) {

        .btn-our-new-us,
        .roommates-box,
        .roommates-collage {
            transition: none !important;
            animation: none !important;
        }
    }
}

/* Evita conflictos: “float” estaba definido dos veces; conservamos uno solo */
@keyframes float {

    0%,
    100% {
        transform: translateY(0) rotate(0deg);
    }

    50% {
        transform: translateY(-20px) rotate(10deg);
    }
}

/* ===========================
   MOBILE COLLAGE — HARD FIX
   (≤640px)
   =========================== */
@media (max-width: 640px) {
  .roommates-visual { order: -1; width: 100%; }

  /* Card blanca con sombra suave */
  .roommates-collage{
    position: relative !important;
    inset: auto !important;
    top: auto !important;
    transform: none !important;
    width: 100%;
    max-width: 420px;
    margin: 0 auto 1.25rem;
    padding: 12px;                  /* marco blanco */
    
    background: #fff;
    overflow: hidden;
    box-shadow:
      0 8px 22px rgba(15,23,42,.10),
      0 24px 60px rgba(15,23,42,.12);
  }
  .roommates-collage::after{
    content:"";
    position:absolute;
    left:10%; right:10%; bottom:-16px;
    height:26px; border-radius:26px;
    filter: blur(12px);
    background: rgba(15,23,42,.10);
    pointer-events:none;
  }

  /* Una sola foto, con aspect ratio controlado */
  .photo-card{
    position: relative !important;
    left: auto !important;
    top: auto !important;
    width: 100% !important;
    padding: 0 !important;
    box-shadow: none !important;
    transform: none !important;
    aspect-ratio: 16 / 10;          /* evita “aplastado” y saltos */
    overflow: hidden;
  }
  .photo-card:not(:first-child){ display: none !important; }

  /* Imagen rellena el contenedor sin deformarse */
  .photo-card img{
    width: 100%;
    height: 100%;
    display: block;
    object-fit: cover;               /* recorte elegante */
    border-radius: 18px;             /* esquinas alineadas con la card */
  }

  /* Kill adornos que ensucian en móvil */
  .roommates-accent-shape{ display:none !important; }
}
/* ===========================
   Polaroid Analog Skin
   =========================== */

/* 1) Base: convierte cada .photo-card en una polaroid */
.photo-card {
  /* papel marfil, esquinas suaves y “marco” grueso abajo */
  background: #fffdf8;
  padding: 12px 12px 48px;                  /* bottom más grande = zona de firma */
  box-shadow:
    0 8px 18px rgba(15,23,42,.14),
    0 20px 48px rgba(15,23,42,.18);
  position: absolute;                        /* se mantiene tu collage desktop */
  overflow: hidden;
  isolation: isolate;                        /* para capas pseudo sin contaminar */
}

/* 2) Borde fino del papel (doble luz) */
.photo-card::before{
  content:"";
  position:absolute; inset: 0;
  
  box-shadow:
    inset 0 0 0 1px rgba(0,0,0,.06),         /* línea sutil del marco */
    inset 0 1px 0 rgba(255,255,255,.6);      /* highlight superior */
  pointer-events:none;
  z-index: 1;
}

/* 3) Textura ligera de papel (muy sutil, segura en perf) */
.photo-card::after{
  content:"";
  position:absolute; inset: 0;
  
  background-image:
    radial-gradient(60% 60% at 30% 20%, rgba(0,0,0,.035) 0%, transparent 60%),
    repeating-linear-gradient(0deg, rgba(0,0,0,.02) 0 1px, transparent 1px 2px);
  mix-blend-mode: multiply;
  opacity: .6;
  pointer-events:none;
  z-index: 0;
}

/* 4) La foto dentro del papel (con borde suave) */
.photo-card img{
  width: 100%;
  height: 100%;
  object-fit: cover;
  display:block;
  
  /* simula el mini “rebaje” del papel alrededor de la emulsión */
  box-shadow: inset 0 0 0 1px rgba(0,0,0,.04);
}

/* 5) Caption opcional debajo (firma/nota) */
.photo-card figcaption{
  position: absolute;
  left: 12px; right: 12px; bottom: 10px;
  height: 32px;                               /* dentro del marco inferior */
  display:flex; align-items:center; justify-content:center;
  font: 500 12px/1.1 "Inter", system-ui, -apple-system, Segoe UI, Roboto, Arial;
  color: #374151;
  letter-spacing:.01em;
  opacity:.85;
  white-space: nowrap;
  overflow:hidden;
  text-overflow: ellipsis;
}

/* 6) Rotaciones naturales por tarjeta (mantienes tus valores) */
.card1 { transform: rotate(-7deg); }
.card2 { transform: rotate(4.5deg); }
.card3 { transform: rotate(-2deg); }

/* 7) Hover/Focus: levantar, enderezar un toque (desktop) */
.photo-card:hover,
.photo-card:focus,
.photo-card.is-front{
  transform: rotate(-1deg) translateY(-4px) scale(1.02);
  z-index: 9 !important;
  box-shadow:
    0 14px 28px rgba(15,23,42,.18),
    0 34px 72px rgba(15,23,42,.24);
  outline: none;
}

/* 8) “shadow peg” opcional para realismo (como apoyada en mesa) */
.photo-card .peg-shadow{
  position:absolute; left: 14%; right: 14%; bottom: -14px; height: 26px;
  background: rgba(15,23,42,.12);
  filter: blur(10px);
  z-index: -1;
  content:"";
}

/* ---------------------------
   Mobile (≤640px): 1 sola polaroid limpia
----------------------------*/
@media (max-width: 640px){
  .roommates-visual{ order:-1; width:100%; }
  .roommates-collage{
    position: relative !important;
    inset:auto !important; transform:none !important;
    max-width: 420px; width:100%;
    margin: 0 auto 1.1rem;
    background: transparent;                 /* el “papel” ya lo tiene la card */
    padding: 0; box-shadow: none;
  }
  .photo-card{
    position: relative !important;
    left:auto !important; top:auto !important;
    width:100% !important;
    padding: 12px !important;
    box-shadow:
      0 10px 22px rgba(15,23,42,.12),
      0 28px 60px rgba(15,23,42,.16) !important;
    transform: none !important;               /* no rotación en mobile */
    aspect-ratio: 16 / 10;                    /* ajusta si tu foto lo pide */
  }
  .photo-card:not(:first-child){ display:none !important; }
  .roommates-accent-shape{ display:none !important; }
}

/* Respeta usuarios con reduce motion */
@media (prefers-reduced-motion: reduce){
  .photo-card{ transition: none !important; }
}
