/*
 * Página Nossa História — Grupo Gallo.
 * Base visual herdada do Deck, com adaptações específicas
 * para a narrativa institucional e familiar.
 */

.history-page .unit-hero__image { object-position: center 56%; }
.history-page .unit-hero__content { max-width: 820px; }

.institutional-immersive .immersive-slide {
    --slide-bg: var(--cacao-deep);
    --slide-fade: rgba(36, 24, 19, .48);
}

.institutional-immersive .immersive-slide__content { padding-bottom: clamp(58px, 7vh, 76px); }

.institutional-cards-section {
    position: relative;
    padding: clamp(92px, 10vw, 145px) 0;
    background: var(--paper);
}

.institutional-cards-section--sand { background: var(--sand); }
.institutional-cards-section--blue { background: #315f78; }
.institutional-cards-section--blue .section-heading h2,
.institutional-cards-section--blue .section-heading > p:not(.eyebrow) { color: #fff; }
.institutional-cards-section--blue .eyebrow { color: #f2b34c; }
.institutional-cards-section--blue .title-scribble { opacity: .78; }

.institutional-card-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 20px;
    margin-top: 46px;
}

.institutional-card {
    min-height: 100%;
    padding: 34px;
    border: 1px solid rgba(76, 49, 34, .12);
    border-radius: 16px;
    background: rgba(255, 253, 248, .94);
    box-shadow: 0 18px 45px rgba(46, 29, 20, .08);
}

.institutional-card__label {
    display: block;
    margin-bottom: 18px;
    color: var(--orange-dark);
    font-size: 10px;
    font-weight: 700;
    letter-spacing: .16em;
    text-transform: uppercase;
}

.institutional-card h3 {
    margin: 0 0 14px;
    color: var(--cacao);
    font-family: var(--serif);
    font-size: clamp(1.55rem, 2.2vw, 2rem);
    font-weight: 500;
    line-height: 1.08;
}

.institutional-card p { margin: 0; line-height: 1.75; }

.location-cards {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 22px;
    margin-top: 46px;
}

.location-card {
    overflow: hidden;
    border: 1px solid rgba(76, 49, 34, .12);
    border-radius: 18px;
    background: var(--paper);
    box-shadow: 0 20px 50px rgba(46, 29, 20, .1);
}

.location-card img { width: 100%; height: 330px; object-fit: cover; }
.location-card__copy { padding: 28px 30px 32px; }
.location-card h3 { margin: 0 0 10px; color: var(--cacao); font-family: var(--serif); font-size: 2rem; font-weight: 500; }
.location-card p { margin: 0; line-height: 1.7; }

.institutional-note {
    margin: 34px auto 0;
    color: rgba(255, 255, 255, .75);
    font-size: 13px;
    line-height: 1.7;
    text-align: center;
}

/* ---------------------------------------------
 * Chamada final — "Conheça nossas unidades"
 * --------------------------------------------- */

.units-cta {
    position: relative;
    padding: clamp(92px, 10vw, 145px) 0;
    background: #315f78;
    text-align: center;
}

.units-cta .section-heading h2,
.units-cta .section-heading > p:not(.eyebrow) { color: #fff; }

.units-cta .eyebrow { color: #f2b34c; }
.units-cta .title-scribble { opacity: .78; }

.units-cta .section-heading p:not(.eyebrow) {
    max-width: 560px;
    margin: 18px auto 0;
    line-height: 1.75;
}

.units-cta__shell {
    display: flex;
    flex-direction: column;
    align-items: center;
}

.units-cta__button {
    display: inline-block;
    margin-top: 8px;
    padding: 16px 36px;
    border-radius: 999px;
    background: var(--orange-dark, #934218);
    color: #fff;
    font-weight: 600;
    letter-spacing: .02em;
    text-decoration: none;
    box-shadow: 0 18px 40px rgba(0, 0, 0, .25);
    transition: transform .2s ease, box-shadow .2s ease;
}

.units-cta__button:hover {
    transform: translateY(-2px);
    box-shadow: 0 22px 48px rgba(0, 0, 0, .3);
}

@media (max-width: 640px) {
    .units-cta { padding: 80px 0; }
}

/* ---------------------------------------------
 * Linha do tempo — "Uma história em capítulos"
 * --------------------------------------------- */

.timeline-section {
    position: relative;
    padding: clamp(92px, 10vw, 145px) 0;
    background: var(--sand, #f2eadc);
    overflow: hidden;
}

.timeline-heading {
    max-width: 640px;
    margin: 0 auto clamp(56px, 7vw, 84px);
    text-align: center;
}

.timeline-heading p:not(.eyebrow) {
    margin: 18px auto 0;
    line-height: 1.75;
}

.timeline {
    position: relative;
    margin: 0;
    padding: 0;
    list-style: none;
}

.timeline::before {
    content: "";
    position: absolute;
    top: 6px;
    bottom: 6px;
    left: 27px;
    width: 2px;
    background: linear-gradient(to bottom, var(--gold, #e4aa47), rgba(228, 170, 71, .25));
}

.timeline-item {
    position: relative;
    padding-left: 84px;
    padding-bottom: clamp(48px, 6vw, 72px);
}

.timeline-item:last-child { padding-bottom: 0; }

.timeline-card {
    position: relative;
    background: var(--paper, #fffdf8);
    border: 1px solid rgba(76, 49, 34, .1);
    border-radius: 22px;
    padding: clamp(26px, 3.2vw, 40px);
    box-shadow: 0 18px 45px rgba(46, 29, 20, .08);
}

.timeline-marker {
    position: absolute;
    top: 0;
    left: 0;
    z-index: 2;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 56px;
    height: 56px;
    border-radius: 50%;
    background: var(--cacao, #3b281e);
    box-shadow: 0 0 0 6px var(--sand, #f2eadc);
    color: var(--paper, #fffdf8);
    font-family: var(--serif);
    font-size: 1.3rem;
    font-weight: 500;
}

.timeline-row {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: clamp(28px, 4vw, 52px);
    align-items: center;
}

.timeline-item--illustration .timeline-copy { order: 1; }
.timeline-item--illustration .timeline-media { order: 2; }

.timeline-media {
    margin: 0;
    border-radius: 20px;
    overflow: hidden;
    box-shadow: 0 20px 50px rgba(46, 29, 20, .14);
}

.timeline-media img {
    display: block;
    width: 100%;
    height: clamp(220px, 26vw, 300px);
    object-fit: cover;
}

.timeline-media .timeline-media__image--praia {
    object-position: center 76%;
}

.timeline-item--photo .timeline-media {
    position: relative;
    z-index: 1;
    overflow: visible;
    border-radius: 0;
    box-shadow: none;
}

.timeline-item--photo .timeline-media__spacer {
    display: block;
    width: 100%;
    height: clamp(150px, 16vw, 190px);
    visibility: hidden;
}

.timeline-item--photo .timeline-media__photo {
    position: absolute;
    top: 50%;
    left: 50%;
    z-index: 5;
    width: calc(100% + 96px);
    height: calc(clamp(150px, 16vw, 190px) + 96px);
    object-fit: cover;
    border: 4px solid #edcf94;
    border-radius: 20px;
    transform: translate(-50%, -50%) rotate(-4deg);
    box-shadow: 0 28px 60px rgba(46, 29, 20, .3);
}

.timeline-media__photo--chapter-one { object-position: center 34%; }
.timeline-media__photo--chapter-two { object-position: center top; }

.timeline-item--photo-opposite .timeline-media {
    position: relative;
    z-index: 1;
    overflow: visible;
    border-radius: 0;
    box-shadow: none;
}

.timeline-item--photo-opposite .timeline-media__spacer {
    display: block;
    width: 100%;
    height: clamp(150px, 16vw, 190px);
    visibility: hidden;
}

.timeline-item--photo-opposite .timeline-media__photo {
    position: absolute;
    top: 50%;
    left: 50%;
    z-index: 5;
    width: calc(100% + 96px);
    height: calc(clamp(150px, 16vw, 190px) + 96px);
    object-fit: cover;
    border: 4px solid #edcf94;
    border-radius: 20px;
    transform: translate(-50%, -50%) rotate(4deg);
    box-shadow: 0 28px 60px rgba(46, 29, 20, .3);
}

.timeline-media--illustration {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    background: transparent;
    box-shadow: none;
}

.timeline-media--illustration-photo {
    height: auto;
    padding: 12px;
}

.timeline-media .timeline-illustration-photo {
    display: block;
    width: 100%;
    height: auto;
    object-fit: contain;
}

.timeline-copy h3 {
    margin: 0 0 12px;
    color: var(--cacao, #3b281e);
    font-family: var(--serif);
    font-size: clamp(1.3rem, 1.9vw, 1.6rem);
    font-weight: 500;
    line-height: 1.2;
}

.timeline-copy p { margin: 0; line-height: 1.75; }

@media (max-width: 900px) {
    .timeline-media__photo--chapter-one { object-position: center; }
    .timeline::before { left: 21px; }
    .timeline-item { padding-left: 62px; }
    .timeline-marker { width: 44px; height: 44px; font-size: 1.05rem; }
    .timeline-row { grid-template-columns: 1fr; gap: 20px; }
    .timeline-item--illustration .timeline-copy,
    .timeline-item--illustration .timeline-media { order: initial; }
    .timeline-media img:not(.timeline-illustration-photo),
    .timeline-media--illustration:not(.timeline-media--illustration-photo) { height: 220px; }
    .timeline-item--photo .timeline-media {
        overflow: hidden;
        border-radius: 20px;
        box-shadow: 0 20px 50px rgba(46, 29, 20, .14);
    }
    .timeline-item--photo-opposite .timeline-media {
        overflow: hidden;
        border-radius: 20px;
        box-shadow: 0 20px 50px rgba(46, 29, 20, .14);
    }
    .timeline-item--photo .timeline-media__spacer { display: none; }
    .timeline-item--photo-opposite .timeline-media__spacer { display: none; }
    .timeline-item--photo .timeline-media__photo {
        position: static;
        width: 100%;
        height: 220px;
        transform: none;
        border-radius: 20px;
        box-shadow: none;
    }
    .timeline-item--photo-opposite .timeline-media__photo {
        position: static;
        width: 100%;
        height: 220px;
        transform: none;
        border-radius: 20px;
        box-shadow: none;
    }
}

@media (max-width: 640px) {
    .timeline-section { padding: 80px 0; }
    .timeline-heading { margin-bottom: 44px; }
    .timeline-card { padding: 22px; border-radius: 18px; }
}

/* ---------------------------------------------
 * Seção da família — adaptada ao mesmo sistema
 * visual da linha do tempo
 * --------------------------------------------- */

.family-section {
    position: relative;
    padding: clamp(92px, 10vw, 145px) 0;
    background: var(--paper, #fffdf8);
    overflow: hidden;
}

.family-section .section-heading p:not(.eyebrow) { margin-top: 18px; max-width: 620px; line-height: 1.75; }

@media (min-width: 1101px) {
    .family-section .section-shell {
        width: min(1580px, calc(100% - 72px));
    }
}

.family-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 20px;
    margin-top: 46px;
}

.family-card {
    position: relative;
    aspect-ratio: 3 / 4;
    overflow: hidden;
    border-radius: 18px;
    box-shadow: 0 18px 45px rgba(46, 29, 20, .16);
    transition: transform .25s ease, box-shadow .25s ease;
}

.family-card:hover { transform: translateY(-4px); box-shadow: 0 26px 55px rgba(46, 29, 20, .22); }

.family-card__photo {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: top center;
}

.family-card__veil {
    position: absolute;
    inset: 0;
    background: linear-gradient(to top, rgba(36, 24, 19, .92) 0%, rgba(36, 24, 19, .72) 26%, rgba(36, 24, 19, .18) 58%, rgba(36, 24, 19, 0) 78%);
}

.family-card__copy {
    position: absolute;
    right: 0;
    bottom: 0;
    left: 0;
    padding: 60px 26px 26px;
}

.family-card__label {
    display: block;
    margin-bottom: 10px;
    color: var(--gold, #e4aa47);
    font-size: 10px;
    font-weight: 700;
    letter-spacing: .16em;
    text-transform: uppercase;
}

.family-card h3 {
    margin: 0 0 10px;
    color: var(--paper, #fffdf8);
    font-family: var(--serif);
    font-size: clamp(1.4rem, 2vw, 1.75rem);
    font-weight: 500;
    line-height: 1.08;
}

.family-card p {
    margin: 0;
    color: rgba(255, 253, 248, .88);
    line-height: 1.6;
    font-size: .95rem;
}

@media (max-width: 1100px) {
    .family-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); width: min(760px, 100%); margin-inline: auto; }
}

@media (max-width: 640px) {
    .family-section { padding: 80px 0; }
    .family-grid { grid-template-columns: 1fr; width: min(400px, 100%); margin-top: 34px; }
    .family-card { aspect-ratio: 4 / 5; }
    .family-card__copy { padding: 48px 22px 22px; }
}

@media (max-width: 900px) {
    .institutional-card-grid { grid-template-columns: 1fr; width: min(680px, 100%); margin-inline: auto; }
    .location-cards { grid-template-columns: 1fr; }
    .location-card img { height: 300px; }
}

@media (max-width: 640px) {
    .history-page .unit-hero__image { object-position: 54% center; }
    .institutional-cards-section { padding: 80px 0; }
    .institutional-card-grid, .location-cards { margin-top: 34px; }
    .institutional-card { padding: 28px 24px; }
    .location-card img { height: 250px; }
    .location-card__copy { padding: 24px; }
}

/* ═══════ CHAMADA CTA — padrao home ═══════ */
.chamada-section {
  position: relative;
  padding: clamp(72px, 7vw, 104px) 48px;
  background: #b95820 !important;
  color: #FDFBF7;
  overflow: hidden;
  isolation: isolate;
}

.chamada-section::before {
  content: "";
  position: absolute;
  z-index: 0;
  inset: 0;
  background: url("../../Images/home/textura-canvas.jpg") center / 620px auto repeat;
  opacity: .72;
  mix-blend-mode: screen;
  filter: grayscale(1) invert(1) brightness(3.2);
  pointer-events: none;
}

.chamada-layout {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: minmax(320px, .9fr) minmax(360px, 1.1fr);
  gap: clamp(56px, 7vw, 104px);
  width: min(1160px, 100%);
  margin: 0 auto;
  align-items: center;
}

.chamada-layout--text-only {
  grid-template-columns: 1fr;
  max-width: 700px;
  text-align: center;
}

.chamada-copy {
  position: relative;
  text-align: left;
}

.chamada-layout--text-only .chamada-copy {
  text-align: center;
}

.chamada-layout--text-only .chamada-copy h2,
.chamada-layout--text-only .chamada-copy p {
  margin-left: auto;
  margin-right: auto;
}

.chamada-layout--text-only .chamada-copy a {
  margin: 0 auto;
}

.chamada-copy h2 {
  color: #fff;
  font-family: var(--serif);
  font-size: clamp(1.8rem, 3vw, 2.6rem);
  line-height: 1.18;
  margin: 0 0 20px;
}

.chamada-section p {
  color: rgba(253,251,247,.8);
  font-size: clamp(.95rem, 1.4vw, 1.12rem);
  line-height: 1.7;
  max-width: 520px;
  margin: 0 0 32px;
}

.chamada-section a {
  display: inline-block;
  background: #B5835A;
  color: #fff;
  padding: 14px 36px;
  border-radius: 999px;
  font-weight: 600;
  font-size: .95rem;
  text-decoration: none;
  transition: background .3s ease, transform .2s ease;
}

.chamada-section a:hover {
  background: #D4752B;
  transform: translateY(-2px);
}

@media (max-width: 900px) {
  .chamada-layout { grid-template-columns: 1fr; gap: 40px; }
}

@media (max-width: 640px) {
  .chamada-section { padding: 56px 24px; }
  .chamada-copy { text-align: center; }
  .chamada-section a { margin: 0 auto; }
}
