:root {
    --bg: #1f1f1f;
    --text: #f5f5f5;
    --muted: #cfcfcf;
    --shadow: 0 16px 40px rgba(0, 0, 0, 0.35);
    --radius: 16px;
    --font-title: "Bebas Neue", sans-serif;
    --font-body: "Manrope", sans-serif;
}

@media (min-width: 1200px) {
    /* Large desktop: shift the builder image slightly left so focal point aligns */
    .card-light {
        background-position-x: -70px !important;
    }
    
    /* For English pages, align the builder image differently on large desktops */
    html[lang="en"] .card-light {
        background-position-x: 0px !important;
    }

    /* Desktop: shift overlay for hora-do-construtor group */
    .card-orange-soft.card-hora::before {
        background-position: center;
        background-size: cover;
        background-repeat: no-repeat;
        opacity: 1;
        background-position-x: -250px !important;
    }

    /* Desktop: stack LinkedIn and Portfolio CTA under text and nudge background */
    .card.card-linkedin,
    .card.card-portfolio {
        display: flex !important;
        flex-direction: column !important;
        align-items: flex-start !important;
        gap: 8px !important;
        background-position-x: -210px !important;
    }
}

@media (min-width: 1200px) {
    /* Desktop adjustment for LinkedIn card */
    .card-tan {
        background-position-x: -270px !important;
    }
}

@media (min-width: 1200px) {
    /* Desktop adjustment for YouTube card */
    .card-red {
        background-position-x: 10px !important;
    }
}

* {
    box-sizing: border-box;
}

body {
    margin: 0;
    min-height: 100vh;
    background: #1f1f1f;
    color: var(--text);
    font-family: var(--font-body);
    display: flex;
    justify-content: center;
    padding: 36px 16px 60px;
     -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    text-rendering: optimizeLegibility;
    font-feature-settings: "cv11", "salt", "ss01", "ss03", "cv01", "cv02", "cv03", "cv04", "cv05", "cv06", "cv09", "cv10";
}

.branco {
    color: #fff !important;
}


.preto {
    color: #1f1f1f !important;
}

.page {
    width: 100%;
    max-width: 520px;
    display: flex;
    flex-direction: column;
    gap: 22px;
}

.hero {
    text-align: center;
    padding: 6px 12px 0;
}

.lang-switch {
    display: flex;
    justify-content: center;
    gap: 10px;
    margin: 10px 0 6px;
}

.lang-btn {
    width: 44px;
    height: 30px;
    border-radius: 6px;
    border: 2px solid transparent;
    overflow: hidden;
    padding: 0;
    cursor: pointer;
    background: transparent;
    box-shadow: var(--shadow);
}

.lang-btn.active {
    border-color: #ffffff;
}

.flag-br {
    background: url("../img/br-flag.svg") center/cover no-repeat;
}

.flag-us {
    background: url("../img/us-flag.svg") center/cover no-repeat;
}

.profile-img {
    width: 250px;
    height: 250px;
    border-radius: 50%;
    object-fit: cover;
    display: block;
    margin: 0 auto 12px;
    
}

.hero h1 {
    margin: 0 0 6px;
    font-size: 26px;
    letter-spacing: 0.6px;
    font-weight: 700;
}

.hero .globe {
    font-size: 18px;
}

.hero .city {
    margin: 0 0 16px;
    font-weight: 700;
}

.hero .intro {
    margin: 0;
    font-size: 16px;
    line-height: 1.45;
    color: var(--text);
    font-weight: 600;
}

.cards {
    display: flex;
    flex-direction: column;
    gap: 14px;
}

.card {
    position: relative;
    min-height: 110px;
    border-radius: var(--radius);
    padding: 18px 18px 18px 20px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    text-decoration: none;
    color: #111;
    box-shadow: var(--shadow);
    overflow: hidden;
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
}

.card-grade {
    min-height: 170px !important;
    flex-direction: column;
    align-items: flex-start;
    justify-content: flex-start;
    gap: 12px;
}

.card::before {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(90deg, rgba(0, 0, 0, 0.38) 0%, rgba(0, 0, 0, 0.12) 60%, rgba(0, 0, 0, 0) 100%);
    opacity: var(--overlay-opacity, 0);
}

/* Darken the actual background image for the two cards using their ::before pseudo-element */
.card-orange-soft.card-hora::before {
  background-image: linear-gradient(90deg, rgba(0, 0, 0, 0.38) 0%, rgba(0, 0, 0, 0.12) 60%, rgba(0, 0, 0, 0) 100%), url(../img/bio2/hora-do-construtor-grupo.webp);
    background-position: center;
    background-size: cover;
    background-repeat: no-repeat;
    
    opacity: 1;
    background-position-x: -470px;
}

a.card.card-grade.card-light.card-construtor {
    box-shadow: inset -1.73px 1.73px 1.73px -1.46px rgb(111 111 111) !important;
    border: 1px solid rgb(158 159 160 / 41%);
}


a.card.card-grade.card-orange.card-metodo {
    box-shadow: rgb(217, 167, 2) -1.73px 1.73px 1.73px -1.46px inset !important;
        border: 1px solid rgb(158 159 160 / 41%);
}


a.card.card-grade.card-red.card-youtube {
    box-shadow: rgb(244, 61, 61) -1.73px 1.73px 1.73px -1.46px inset !important;
        border: 1px solid rgb(158 159 160 / 41%);
}

a.card.card-orange-soft.card-hora {
    box-shadow: inset -1.73px 1.73px 1.73px -1.46px rgb(255, 239, 11) !important;
        border: 1px solid rgb(158 159 160 / 41%);
}

a.card.card-tan.card-linkedin {
    box-shadow: inset -1.73px 1.73px 1.73px -1.46px rgb(8, 141, 177) !important;
        border: 1px solid rgb(158 159 160 / 41%);
}

a.card.card-dark.card-portfolio {
    box-shadow: inset -1.73px 1.73px 1.73px -1.46px rgb(39, 39, 39) !important;
        border: 1px solid rgb(158 159 160 / 41%);
}

a.card.hero {
    box-shadow: inset -1.73px 1.73px 1.73px -1.46px rgb(6, 6, 6) !important;
        border: 1px solid rgb(158 159 160 / 41%);
        
}

.card-tan.card-wood-br::before {
    background-image: linear-gradient(90deg, rgba(0, 0, 0, 0.38) 0%, rgba(0, 0, 0, 0.12) 60%, rgba(0, 0, 0, 0) 100%), url("../img/bio2/wood-instagram.webp");
    background-position: right center;
    background-size: cover;
    background-repeat: no-repeat;
  filter: brightness(1.1);
    opacity: 1;
}

/* Add left→right gradient overlay to hero card (keeps original background) */
.card.hero::before {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(90deg, rgba(0,0,0,1) 0%, rgba(0,0,0,0) 100%);
    pointer-events: none;
    opacity: 1;
    z-index: 0;
}

.card.hero > div,
.card.hero .hero-cta,
.card.hero .hero-logo {
    position: relative;
    z-index: 2;
}

.card-text {
    position: relative;
    z-index: 1;
    max-width: 50%;
}

.card-grade .card-text {
    max-width: 55%;
}

.card-grade .card-cta {
    align-self: flex-start;
}

.card-title {
    display: block;
    font-family: var(--font-title);
    font-size: 20px;
    letter-spacing: 0.6px;
    margin-bottom: 6px;
    color: #ffffff;
}

.card-title-small {
   display: inline-block;
    font-size: 15px;
    vertical-align: baseline;
    margin-left: 2px;
    opacity: 0.95;
    color: #C96E15; /* Color WOOD in #C96E15 */
}


.card-title-main,
.card-title-accent {
    display: inline;
    font-size: inherit;
    margin-left: 0;
}

.card-title-accent {
    color: inherit;
}

/* Default color rules for separated title parts */
.card-title-wood {
    color: #C96E15;
}

.card-title-method {
    color: #262626;
}

/* Card-specific overrides for the tan wood card */
.card-tan.card-wood-br .card-title-wood {
    color: #C96E15 !important;
}

.card-tan.card-wood-br .card-title-method {
    color: #262626 !important;
}

.card-tan.card-wood-br .card-title-small {
    color: #ffffff !important; /* Set BRAZIL small to white for card5 */
}

/* Language specific accents for other cards remain valid */
html[lang="en"] .card-title-accent {
    color: #ffffff;
}

html[lang="pt-BR"] .card-title-main {
    color: #ffffff;
}

.card-subtitle {
    display: block;
    font-size: 12px;
    line-height: 1.35;
    color: #ffffff;
}

.card-cta {
    position: relative;
    z-index: 1;
    font-size: 12px;
    font-weight: 800;
    padding: 8px 14px;
    border-radius: 8px;
    background: #1c1c1c;
    color: #fff;
    white-space: nowrap;
}

.card-cta.light {
    background: #f5f5f5;
    color: #111;
}

.card-cta.dark {
    background: #1f1f1f;
    color: #ffffff;
}

/* Individual CTA color override: first card (construtor) */
.card.card-construtor .card-cta {
    background: #969696 !important;
    color: #ffffff !important;
}

/* Individual CTA color override: second card (metodo) */
.card.card-metodo .card-cta {
    background: #b3620d !important;
    color: #ffffff !important;
}

/* Individual CTA color override: third card (youtube) */
.card.card-youtube .card-cta {
    background: #b30301 !important;
    color: #ffffff !important;
}

/* Individual CTA color override: fourth card (hora) */
.card.card-hora .card-cta {
    background: #fcdb3c !important;
    color: #090909 !important;
}

/* Individual CTA color override: fifth card (LinkedIn) */
.card.card-linkedin .card-cta {
    background: #007cca !important;
    color: #ffffff !important;
}

.card-light {
    background: url("../img/bio2/construtor.webp") center/cover no-repeat;
    background-position-x: -180px;
}

/* When the page is set to English, use a different focal point for the builder card */
html[lang="en"] .card-light {
    background: url("../img/bio2/construtor.webp") center/cover no-repeat;
    background-position-x: -120px;
}

.card-orange {
    background: url("../img/bio2/wood.webp") center/cover no-repeat;
    color: #ffffff;
}

/* Ensure the "METHOD" word in the orange 'metodo' card is rendered in dark gray */
.card-orange.card-metodo .card-title-accent {
    color: #b3620d !important;
}

/* For Portuguese: 'MÉTODO' should be dark and 'WOOD' should be white */
html[lang="pt-BR"] .card-orange.card-metodo .card-title-main {
    color: #b3620d !important;
}

html[lang="pt-BR"] .card-orange.card-metodo .card-title-accent {
    color: #ffffff !important;
}

.card-red {
    background: url("../img/bio2/youtube.webp") center/cover no-repeat;
    color: #ffffff;
    background-position-x: -100px;
}

.card-orange-soft {
    background: url("../img/bio2/hora-do-construtor-grupo.webp") center/cover no-repeat;
    color: #1a1a1a;
}

.card-tan {
    background: url("../img/bio2/linkedin-fundo.webp") center/cover no-repeat;
    color: #1a1a1a;
}

/* Hide empty title spans to prevent gaps when a translation leaves a span blank */
.card-title-accent:empty,
.card-title-method:empty,
.card-title-wood:empty {
    display: none !important;
}

/* Position background images to the right for these two cards */
.card-orange-soft.card-hora,
.card-tan.card-wood-br {
    background-position-x: right;
    background-position: right center;
}

/* Stack text and CTA vertically (CTA below text) for these two cards */
.card-orange-soft.card-hora,
.card-tan.card-wood-br {
    flex-direction: column;
    align-items: flex-start;
    justify-content: flex-start;
    gap: 12px;
    background-position-x: -480px;
}

.card-orange-soft.card-hora .card-cta,
.card-tan.card-wood-br .card-cta {
    align-self: flex-start;
}

.card-dark {
    background: url("../img/bio2/portfolio.webp") center/cover no-repeat;
    color: #ffffff;
}

.card-yellow {
    background: url("../img/site.webp") center/cover no-repeat;
    color: #1a1a1a;
    min-height: 300px;
}

.card-yellow {
    flex-direction: column;
    align-items: flex-start;
    justify-content: center;
    gap: 12px;
    text-align: left;
}

.card-yellow .card-text {
    max-width: 50%;
}

/* Make these two specific cards use 75% text width instead of the global 50% */
.card-orange-soft.card-hora .card-text,
.card-tan.card-wood-br .card-text {
    max-width: 90%;
}

.footer {
    text-align: center;
    color: #e6e6e6;
    font-family: "Brush Script MT", cursive;
    font-size: 22px;
    padding: 8px 0 0;
}

@media (max-width: 520px) {
    .card {
        padding: 16px;
    }

    .card-text {
        max-width: 70%;
    }

    .card-orange-soft.card-hora .card-text,
    .card-tan.card-wood-br .card-text {
        max-width: 90%;
    }

    .card-title {
        font-size: 26px;
    }


    .hero h1 {
        font-size: 24px;
    }
}

/* Small phones like S20 (360px wide) — ensure these two cards stack and shift background */
@media (max-width: 360px) {
    .card-orange-soft.card-hora,
    .card-tan.card-wood-br {
        flex-direction: column !important;
        align-items: flex-start !important;
        justify-content: flex-start !important;
        gap: 12px !important;
        background-position-x: -640px !important;
    }

    /* Older/smaller phones: ensure the ::before overlay uses the correct image
       and focal point for the hora card. */
    .card-orange-soft.card-hora::before {
        background-image: linear-gradient(90deg, rgba(0, 0, 0, 0.38) 0%, rgba(0, 0, 0, 0.12) 60%, rgba(0, 0, 0, 0) 100%), url("../img/bio2/hora-do-construtor-grupo.webp") !important;
        background-position: center !important;
        background-size: cover !important;
        background-repeat: no-repeat !important;
        opacity: 1 !important;
        background-position-x: -630px !important;
    }

    /* Small phones: nudge YouTube card background for better framing */
    .card-red {
        background: url("../img/bio2/youtube.webp") center/cover no-repeat !important;
        color: #ffffff !important;
        background-position-x: -150px !important;
    }

    /* When page is English, slightly different focal point for the builder card on small phones */
    html[lang="en"] .card-light {
        background-position-x: -270px !important;
    }
}

/* iPhone SE / largura similar: ajuste dedicado do card construtor */
@media (min-width: 361px) and (max-width: 390px) {
    .card-light {
        background-position-x: -300px !important;
    }

    /* Also apply the same focal point when the page is English */
    html[lang="en"] .card-light {
        background-position-x: -200px !important;
    }

    .card-orange-soft.card-hora::before {
        background-position-x: -550px !important;
    }

    .card-red {
        background: url("../img/bio2/youtube.webp") center/cover no-repeat !important;
        color: #ffffff !important;
        background-position-x: -160px !important;
    }
}

/* Mobile (normal phones) + English: nudge hora card background focal point */
@media (max-width: 520px) {
    html[lang="en"] .card-orange-soft.card-hora::before {
        background-position-x: -500px !important;
    }
}

/* Card entrance animation (subtle fade + lift with stagger) */
.card {
    opacity: 0;
    transform: translateY(8px) scale(0.995);
    transition: opacity 360ms cubic-bezier(0.2, 0.8, 0.2, 1), transform 360ms cubic-bezier(0.2, 0.8, 0.2, 1);
    will-change: opacity, transform;
}

.card.in-view {
    opacity: 1;
    transform: translateY(0) scale(1);
}

/* Reduce motion for users who prefer reduced motion */
@media (prefers-reduced-motion: reduce) {
    .card {
        transition: none;
        transform: none;
        opacity: 1;
    }
}

/* Hero header entrance: animate children one-by-one */
.hero img.profile-img,
.hero .hero-name,
.hero .city,
.hero .lang-switch,
.hero .intro {
    opacity: 0;
    transform: translateY(8px) scale(0.995);
    transition: opacity 360ms cubic-bezier(0.2, 0.8, 0.2, 1), transform 360ms cubic-bezier(0.2, 0.8, 0.2, 1);
    will-change: opacity, transform;
}

.hero img.profile-img.in-view,
.hero .hero-name.in-view,
.hero .city.in-view,
.hero .lang-switch.in-view,
.hero .intro.in-view {
    opacity: 1;
    transform: translateY(0) scale(1);
}

@media (prefers-reduced-motion: reduce) {
    .hero img.profile-img,
    .hero .hero-name,
    .hero .city,
    .hero .lang-switch,
    .hero .intro {
        transition: none;
        transform: none;
        opacity: 1;
    }
}
