/* Categoria de tratamiento page: /tratamiento-categoria/{category} */

/* Page wrapper: cancels any theme styles on .entry-content.
   Side padding uses --gutter, defined in header.css so it always matches the header. */
.treatmentPage {
    margin: 0;
    padding: 0;
    max-width: none;
    width: 100%;
    overflow-x: clip; /* slide-in animations (autoAnims) can't cause sideways scrolling */
}

/* ---------- Hero ---------- */

.categoryHero {
    position: relative;
    height: 90vh;
    background-color: black;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
}

.categoryHeroImg {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    filter: brightness(0.45);
}

.categoryHeroText {
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    padding: 0 var(--gutter);
}

.categoryHeroText h1 {
    font-family: 'Baskervville';
    font-weight: 600;
    color: #caab77;
    font-size: 4.6em;
    line-height: 1.1;
    text-align: center;
    margin: 0;
}

.categoryHeroText p {
    font-family: 'Baskervville';
    font-style: italic;
    color: white;
    font-size: 2.3em;
    margin: 10px 0 0;
}

.categoryHeroArrow {
    position: absolute;
    bottom: 40px;
    left: 50%;
    transform: translateX(-50%);
    width: 28px;
    display: block;
    transition: all 0.25s ease-in-out;
}

.categoryHeroArrow:hover {
    transform: translateX(-50%) translateY(4px);
}

.categoryHeroArrow svg {
    width: 100%;
    height: auto;
    display: block;
}


/* ---------- Intro ---------- */

.categoryIntro {
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 100px var(--gutter) 0;
}

.categoryIntro h2 {
    font-family: 'Calibri';
    font-weight: 300;
    color: #caab77;
    letter-spacing: 3px;
    font-size: 2em;
    text-align: center;
    margin: 0 0 25px;
}

.categoryIntro p {
    font-family: 'Baskervville';
    color: black;
    font-size: 1.4em;
    line-height: 1.3;
    text-align: center;
    max-width: 1100px;
    margin: 0;
}


/* ---------- Cards ---------- */

/* Flex + wrap so an incomplete last row stays centered */
.categoryCards {
    --cardsPerRow: 4;
    --cardGap: 22px;
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    column-gap: var(--cardGap);
    row-gap: 60px;
    padding: 120px var(--gutter) 150px;
}

.categoryCard {
    width: calc((100% - (var(--cardsPerRow) - 1) * var(--cardGap)) / var(--cardsPerRow));
}

.categoryCardImg {
    position: relative;
    display: block;
    aspect-ratio: 378 / 534;
    border-radius: 22px 22px 22px 0; /* bottom-left square: the number tab covers it (a rounded clip left a faint dark arc under the tab) */
    overflow: hidden;
    background-color: #2b2b2b; /* visible while the image is a placeholder */
    text-decoration: none;
}

.categoryCardImg img {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    filter: brightness(0.7);
    transition: all 0.45s ease-in-out;
}

.categoryCardImg:hover img {
    filter: brightness(0.5);
    transform: scale(1.03);
}

/* Soft dark shade along the top of the photo, behind the gold title, so it reads on any photo
   (a white one was tested: it lowers the contrast of the gold).
   A layer over the image: an inset shadow on the card itself would be painted under the <img> */
.categoryCardImg::after {
    content: '';
    position: absolute;
    inset: 0;
    box-shadow: inset 0 150px 90px -70px rgba(0, 0, 0, 0.45);
    pointer-events: none;
}

.categoryCardImg h3 {
    z-index: 1; /* above the glow */
}

.categoryCardImg h3 {
    position: absolute;
    top: 28px;
    left: 28px;
    right: 28px;
    font-family: 'Baskervville';
    font-weight: 700;
    color: #caab77;
    font-size: 1.9em;
    line-height: 1.15;
    margin: 0;
}

/* White tab in the bottom-left corner with the number */
.categoryCardNumber {
    position: absolute;
    left: 0;
    bottom: 0;
    background-color: white;
    border-top-right-radius: 22px;
    padding: 10px 16px 10px 0;
    font-family: 'Baskervville';
    font-variant-numeric: lining-nums; /* Baskervville's default figures hang below the line (the 3 in "03" got cut off) */
    color: #caab77;
    font-size: 2.8em;
    line-height: 1;
}

/* Inverted corners where the tab meets the image */
.categoryCardNumber::before,
.categoryCardNumber::after {
    content: '';
    position: absolute;
    width: 22px;
    height: 22px;
    background: radial-gradient(circle at top right, transparent 21.5px, white 22px);
}

.categoryCardNumber::before {
    left: 0;
    bottom: 100%;
}

.categoryCardNumber::after {
    left: 100%;
    bottom: 0;
}

.categoryCardButton {
    position: absolute;
    left: 37%;
    right: 15%;
    bottom: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 9px 0;
    background-color: #caab77;
    border-radius: 3px;
    font-family: 'Calibri';
    font-weight: 700;
    color: white;
    font-size: 0.9em;
    transition: all 0.25s ease-in-out;
}

.categoryCardImg:hover .categoryCardButton {
    background-color: white;
    color: #caab77;
}

.categoryCard>p {
    font-family: 'Baskervville';
    font-style: italic;
    color: black;
    font-size: 1.3em;
    line-height: 1.3;
    margin: 18px 0 0;
}


@media (max-width:1600px){

.categoryHeroText h1 {
    font-size: 3.6em;
}

.categoryHeroText p {
    font-size: 1.9em;
}

.categoryIntro h2 {
    font-size: 1.6em;
}

.categoryIntro p {
    font-size: 1.15em;
}

.categoryCards {
    padding: 80px var(--gutter) 110px;
}

.categoryCardImg h3 {
    top: 20px;
    left: 20px;
    right: 20px;
    font-size: 1.5em;
}

.categoryCardNumber {
    font-size: 2.3em;
}

.categoryCardButton {
    font-size: 0.8em;
    bottom: 16px;
}

.categoryCard>p {
    font-size: 1.1em;
}

}


@media (max-width:1150px){

.categoryHeroText h1 {
    font-size: 3em;
}

.categoryHeroText p {
    font-size: 1.5em;
}

.categoryIntro {
    padding-top: 60px;
}

.categoryCards {
    --cardsPerRow: 2;
    row-gap: 45px;
    padding: 60px var(--gutter) 90px;
}

}


@media (max-width:600px){

.categoryHero {
    height: calc(100svh - 10vh);
}

.categoryHeroText h1 {
    font-size: 1.8em;
}

.categoryHeroText p {
    font-size: 1.05em;
    margin-top: 6px;
}

.categoryHeroArrow {
    width: 22px;
    bottom: 25px;
}

.categoryIntro {
    padding: 40px var(--gutter) 0;
}

.categoryIntro h2 {
    font-size: 1.15em;
    letter-spacing: 2px;
    margin-bottom: 15px;
}

.categoryIntro p {
    font-size: 1em;
}

.categoryCards {
    --cardGap: 12px;
    row-gap: 30px;
    padding: 35px var(--gutter) 60px;
}

.categoryCardImg {
    border-radius: 12px 12px 12px 0;
}

.categoryCardImg::after {
    box-shadow: inset 0 70px 45px -35px rgba(0, 0, 0, 0.45); /* smaller cards: smaller shade */
}

.categoryCardImg h3 {
    top: 12px;
    left: 12px;
    right: 12px;
    font-size: 1em;
}

.categoryCardNumber {
    font-size: 1.35em;
    border-top-right-radius: 12px;
    padding: 6px 9px 6px 0;
}

.categoryCardNumber::before,
.categoryCardNumber::after {
    width: 12px;
    height: 12px;
    background: radial-gradient(circle at top right, transparent 11.5px, white 12px);
}

.categoryCardButton {
    left: 42%;
    right: 8%;
    bottom: 10px;
    padding: 5px 0;
    font-size: 0.6em;
}

.categoryCard>p {
    font-size: 0.85em;
    margin-top: 10px;
}

}
