/* ============================================================
   PS Servicios Población — Estilos v1.0
   ============================================================ */

/* ----------------------------------------------------------
   GRID
---------------------------------------------------------- */
.ps-srv-grid {
    display: grid;
    gap: 2rem;
    padding: 1rem 0;
}
.ps-srv-cols-2 { grid-template-columns: repeat(2, 1fr); }
.ps-srv-cols-3 { grid-template-columns: repeat(3, 1fr); }
.ps-srv-cols-4 { grid-template-columns: repeat(4, 1fr); }

@media (max-width: 1024px) {
    .ps-srv-cols-3,
    .ps-srv-cols-4 { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 640px) {
    .ps-srv-grid { grid-template-columns: 1fr !important; }
}

/* ----------------------------------------------------------
   CARD
---------------------------------------------------------- */
.ps-srv-card {
    position: relative;
    background: #fff;
    border-radius: 20px;
    overflow: hidden;
    box-shadow: 0 4px 20px rgba(72,126,128,.10);
    display: flex;
    flex-direction: column;
    transition: transform .28s cubic-bezier(.4,0,.2,1),
                box-shadow .28s cubic-bezier(.4,0,.2,1);
}
.ps-srv-card:hover {
    transform: translateY(-6px);
    box-shadow: 0 16px 48px rgba(72,126,128,.18);
}

/* Franja de color lateral izquierda — la firma visual de la población */
.ps-srv-card__accent {
    position: absolute;
    top: 0;
    left: 0;
    width: 6px;
    height: 100%;
    background: var(--srv-color, #487e80);
    border-radius: 20px 0 0 20px;
}

/* ----------------------------------------------------------
   HEADER DE TARJETA
---------------------------------------------------------- */
.ps-srv-card__header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    padding: 1.5rem 1.5rem .75rem 2rem;
}

.ps-srv-card__icon {
    width: 52px;
    height: 52px;
    border-radius: 14px;
    background: color-mix(in srgb, var(--srv-color, #487e80) 15%, transparent);
    color: var(--srv-color, #487e80);
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}
.ps-srv-card__icon svg {
    width: 28px;
    height: 28px;
    stroke: var(--srv-color, #487e80);
}

/* Badge de edad — identificador inmediato de la población */
.ps-srv-card__badge {
    display: inline-flex;
    align-items: center;
    padding: .3rem .85rem;
    background: var(--srv-color, #487e80);
    color: var(--srv-text, #fff);
    border-radius: 9999px;
    font-size: .72rem;
    font-weight: 700;
    letter-spacing: .06em;
    text-transform: uppercase;
    white-space: nowrap;
}

/* ----------------------------------------------------------
   BODY
---------------------------------------------------------- */
.ps-srv-card__body {
    padding: .5rem 1.5rem 1rem 2rem;
    flex: 1;
}

.ps-srv-card__title {
    font-family: 'Cormorant Garamond', Georgia, serif;
    font-size: 1.35rem;
    font-weight: 600;
    line-height: 1.25;
    color: #335a5c;
    margin-bottom: .6rem;
}
.ps-srv-card__title em {
    font-style: italic;
    color: var(--srv-color, #487e80);
}

.ps-srv-card__desc {
    font-size: .9rem;
    color: #62605d;
    line-height: 1.65;
    margin-bottom: 1rem;
}

/* Meta: modalidad, duración, frecuencia */
.ps-srv-card__meta {
    list-style: none;
    margin: 0 0 .75rem;
    padding: 0;
    display: flex;
    flex-wrap: wrap;
    gap: .4rem .75rem;
}
.ps-srv-card__meta li {
    display: flex;
    align-items: center;
    gap: .3rem;
    font-size: .78rem;
    color: #8e8c89;
    font-weight: 500;
}
.ps-srv-card__meta svg { color: var(--srv-color, #487e80); flex-shrink: 0; }

.ps-srv-card__precio {
    font-size: .82rem;
    font-weight: 700;
    color: var(--srv-color, #487e80);
    margin: 0;
}

/* ----------------------------------------------------------
   FOOTER
---------------------------------------------------------- */
.ps-srv-card__footer {
    padding: 1rem 1.5rem 1.5rem 2rem;
    display: flex;
    gap: .75rem;
    flex-wrap: wrap;
    align-items: center;
    border-top: 1px solid #f0ede8;
}

.ps-srv-card__more {
    font-family: 'Inter', sans-serif;
    font-size: .82rem;
    font-weight: 600;
    color: #62605d;
    background: #f5f0e4;
    border: none;
    border-radius: 9999px;
    padding: .55rem 1.2rem;
    cursor: pointer;
    transition: all .22s ease;
}
.ps-srv-card__more:hover {
    background: var(--srv-color, #487e80);
    color: #fff;
}

.ps-srv-card__cta {
    font-size: .82rem;
    padding: .55rem 1.2rem;
    border-radius: 9999px;
    background: var(--srv-color, #487e80);
    color: var(--srv-text, #fff) !important;
    font-weight: 700;
    text-decoration: none;
    transition: all .22s ease;
    border: none;
}
.ps-srv-card__cta:hover {
    filter: brightness(1.08);
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(0,0,0,.15);
}

/* ----------------------------------------------------------
   MODAL
---------------------------------------------------------- */
.ps-srv-modal {
    position: fixed;
    inset: 0;
    z-index: 99999;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 1rem;
}
.ps-srv-modal[hidden] { display: none; }

.ps-srv-modal__backdrop {
    position: absolute;
    inset: 0;
    background: rgba(26,26,24,.6);
    backdrop-filter: blur(4px);
    cursor: pointer;
}

.ps-srv-modal__box {
    position: relative;
    background: #fefaf0;
    border-radius: 24px;
    width: 100%;
    max-width: 600px;
    max-height: 90vh;
    overflow-y: auto;
    box-shadow: 0 32px 80px rgba(0,0,0,.2);
    animation: ps-modal-in .3s cubic-bezier(.34,1.56,.64,1);
}

@keyframes ps-modal-in {
    from { transform: scale(.9) translateY(20px); opacity: 0; }
    to   { transform: scale(1) translateY(0); opacity: 1; }
}

.ps-srv-modal__close {
    position: absolute;
    top: 1rem;
    right: 1rem;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: #e8e2da;
    border: none;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #62605d;
    transition: all .2s ease;
    z-index: 1;
}
.ps-srv-modal__close:hover { background: #487e80; color: #fff; }

.ps-srv-modal__inner { padding: 2rem; }

.ps-srv-modal__header {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin-bottom: 1.25rem;
}

.ps-srv-modal__icon-wrap {
    width: 60px;
    height: 60px;
    border-radius: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    background: color-mix(in srgb, var(--modal-color, #487e80) 15%, transparent);
}
.ps-srv-modal__icon-wrap svg { width: 32px; height: 32px; stroke: var(--modal-color, #487e80); }

.ps-srv-modal__badge {
    display: inline-block;
    padding: .2rem .7rem;
    background: var(--modal-color, #487e80);
    color: var(--modal-text, #fff);
    border-radius: 9999px;
    font-size: .7rem;
    font-weight: 700;
    letter-spacing: .06em;
    text-transform: uppercase;
    margin-bottom: .3rem;
}

.ps-srv-modal__title {
    font-family: 'Cormorant Garamond', Georgia, serif;
    font-size: 1.6rem;
    font-weight: 600;
    color: #335a5c;
    margin: 0;
}

.ps-srv-modal__desc {
    color: #62605d;
    font-size: .95rem;
    line-height: 1.7;
    margin-bottom: 1.25rem;
}

.ps-srv-modal__section {
    background: #fff;
    border-radius: 14px;
    padding: 1.25rem;
    margin-bottom: 1rem;
}
.ps-srv-modal__section h4 {
    font-family: 'Inter', sans-serif;
    font-size: .8rem;
    font-weight: 700;
    letter-spacing: .08em;
    text-transform: uppercase;
    color: #8e8c89;
    margin: 0 0 .75rem;
}
.ps-srv-modal__section p { margin: 0; color: #62605d; font-size: .9rem; line-height: 1.65; }

.ps-srv-modal__senales {
    list-style: none;
    padding: 0;
    margin: 0;
    display: flex;
    flex-direction: column;
    gap: .5rem;
}
.ps-srv-modal__senales li {
    display: flex;
    align-items: center;
    gap: .6rem;
    font-size: .88rem;
    color: #3a3835;
}
.ps-srv-modal__senales li::before {
    content: '';
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: var(--modal-color, #487e80);
    flex-shrink: 0;
}

.ps-srv-modal__cta {
    display: flex;
    gap: .75rem;
    flex-wrap: wrap;
    margin-top: 1.5rem;
}
.ps-srv-modal__cta .ps-btn {
    flex: 1;
    justify-content: center;
    padding: .85rem 1.5rem;
    border-radius: 9999px;
    font-weight: 700;
    font-size: .9rem;
}
.ps-btn-primary {
    background: var(--modal-color, #487e80);
    color: #fff !important;
    border: 2px solid transparent;
    text-decoration: none;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all .22s ease;
}
.ps-btn-primary:hover { filter: brightness(1.08); }
.ps-btn-whatsapp {
    background: #25D366;
    color: #fff !important;
    text-decoration: none;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: .5rem;
    transition: all .22s ease;
}
.ps-btn-whatsapp:hover { background: #1ebe5d; }
