/* ============================================================
   1. HERO
   ============================================================ */

.page-index {
    --home-header-height: 76px;
    scroll-snap-type: y mandatory;
}

.page-index main {
    scroll-snap-type: y mandatory;
}

.page-index main > section {
    min-height: calc(100svh - var(--home-header-height));
    scroll-snap-align: start;
    scroll-snap-stop: always;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    gap: 28px;
    padding-top: clamp(34px, 5vw, 64px);
    padding-bottom: clamp(34px, 5vw, 64px);
}

.page-index main > section.hero-home {
    padding-top: 0;
    padding-bottom: 0;
    gap: 0;
}

.page-index main > section > .container {
    width: min(1120px, calc(100% - 32px));
}

.page-index main > section > .hero-grid {
    width: 100%;
}

.hero-home {
    min-height: calc(100svh - var(--home-header-height));
    display: flex;
    align-items: center;
    background: transparent;
    padding: 0;
}

.hero-home::after {
    content: none;
}

.hero-grid {
    position: relative;
    z-index: 1;
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(360px, 1fr);
    align-items: stretch;
    gap: 0;
    padding: 0;
    width: 100%;
    min-height: calc(100svh - var(--home-header-height));
}

.hero-copy-panel {
    display: flex;
    flex-direction: column;
    justify-content: center;
    min-width: 0;
    padding: clamp(48px, 6vw, 76px) clamp(28px, 6vw, 64px);
    background: var(--hero-surface);
}

:root[data-theme="dark"] .hero-copy-panel {
    background: var(--hero-surface-dark);
}

.hero-copy {
    display: flex;
    flex-direction: column;
    gap: 18px;
    min-width: 0;
    color: var(--ink);
}

:root[data-theme="dark"] .hero-copy {
    color: #ffffff;
}

.hero-copy h1 {
    max-width: 15ch;
    font-size: clamp(2.1rem, 3.6vw, 4rem);
    line-height: 1.06;
}

.hero-title-mark {
    color: var(--warm);
    text-shadow: none;
}

.hero-copy .eyebrow {
    color: var(--primary);
    background: transparent;
}

:root[data-theme="dark"] .hero-copy .eyebrow {
    color: #ffffff;
}

.hero-lead {
    max-width: 42ch;
    font-weight: 650;
    color: var(--muted);
    font-size: 1.14rem;
}

:root[data-theme="dark"] .hero-lead {
    color: rgba(255, 255, 255, 0.9);
}

.hero-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 14px;
    margin-top: 8px;
}

.hero-photo {
    position: relative;
    min-height: calc(100svh - var(--home-header-height));
    overflow: hidden;
    border-radius: 0;
    border: 0;
    box-shadow: none;
}

.hero-photo img {
    width: 100%;
    height: 100%;
    min-height: calc(100svh - var(--home-header-height));
    object-fit: cover;
    transition: transform 0.4s ease;
}

.hero-photo::after {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(180deg, transparent 45%, rgba(0, 0, 0, 0.58));
}

.hero-photo figcaption {
    position: absolute;
    left: 18px;
    right: 18px;
    bottom: 18px;
    z-index: 1;
    color: #ffffff;
    font-weight: 800;
    text-shadow: 0 2px 10px rgba(0, 0, 0, 0.65);
}

.hero-photo:hover img {
    transform: scale(1.03);
}

/* ============================================================
   2. SOBRE (CONHEÇA A AMORABI)
   ============================================================ */

.about-home {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
    align-items: center;
    gap: 56px;
}

.home-about-section {
    padding-bottom: 48px;
    background: #ffffff;
}

:root[data-theme="dark"] .home-about-section {
    background: #121017;
}

.about-home-text {
    min-width: 0;
    max-width: 600px;
}

.about-home-text p {
    line-height: 1.7;
    color: var(--ink);
}

.home-mission {
    display: grid;
    gap: 10px;
    margin: 24px 0;
    padding: 18px;
    border: 1px solid rgba(161, 0, 20, 0.1);
    border-left: 4px solid var(--warm);
    border-radius: var(--radius);
    background: var(--white);
    box-shadow: 0 16px 36px rgba(55, 24, 44, 0.08);
}

.home-mission strong {
    color: var(--primary);
    font-size: 0.82rem;
    font-weight: 900;
    text-transform: uppercase;
}

.home-mission p {
    margin: 0;
    color: var(--muted);
    font-size: 1rem;
}

.home-values {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.home-values span {
    display: inline-flex;
    padding: 6px 10px;
    border-radius: 999px;
    background: rgba(31, 122, 130, 0.08);
    color: var(--teal);
    font-size: 0.82rem;
    font-weight: 800;
    transition: transform 0.2s ease, background 0.2s ease, color 0.2s ease;
}

.home-values span:hover {
    transform: translateY(-2px);
    background: var(--teal);
    color: #ffffff;
}

.home-vital-signs {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 10px;
    margin: 0 0 24px;
}

.home-vital-signs div {
    min-width: 0;
    padding: 14px;
    border-radius: var(--radius);
    background: var(--white);
    border: 1px solid rgba(169, 54, 168, 0.12);
    transition: transform 0.2s ease, border-color 0.2s ease, box-shadow 0.2s ease;
}

.home-vital-signs div:nth-child(2) {
    border-color: rgba(246, 178, 75, 0.26);
}

.home-vital-signs div:nth-child(3) {
    border-color: rgba(31, 122, 130, 0.18);
}

.home-vital-signs div:hover {
    transform: translateY(-3px);
    border-color: rgba(161, 0, 20, 0.18);
    box-shadow: 0 18px 34px rgba(55, 24, 44, 0.12);
}

.home-vital-signs strong {
    display: block;
    color: var(--primary);
    font-size: 1.35rem;
    line-height: 1;
}

.home-vital-signs span {
    display: block;
    margin-top: 8px;
    color: var(--muted);
    font-size: 0.9rem;
    font-weight: 750;
    line-height: 1.35;
}

.about-home-image {
    position: relative;
    overflow: hidden;
    border-radius: var(--radius);
    box-shadow: var(--shadow);
}

.about-home-image img {
    width: 100%;
    height: 100%;
    min-height: 360px;
    object-fit: cover;
    transition: transform 0.4s ease;
}

.about-home-image:hover img {
    transform: scale(1.04);
}

/* ============================================================
   3. GALERIA (CARROSSEL)
   ============================================================ */

.photo-section {
    background: var(--white);
}

.home-gallery-section {
    position: relative;
    padding-top: 48px;
    background: #ffffff;
    overflow: hidden;
}

:root[data-theme="dark"] .home-gallery-section {
    background: #121017;
}

.home-gallery-section::before {
    content: none;
}

.page-index main > section + section {
    position: relative;
    border-top: 1px solid rgba(161, 0, 20, 0.08);
}

.page-index main > section + section::before {
    content: none;
}

:root[data-theme="dark"] .page-index main > section + section {
    border-top-color: rgba(255, 255, 255, 0.055);
}

:root[data-theme="dark"] .page-index main > section + section::before {
    content: none;
}

.photo-story {
    display: grid;
    grid-template-columns: minmax(0, 0.85fr) minmax(0, 1.15fr);
    align-items: center;
    gap: 48px;
    min-width: 0;
}

.photo-carousel {
    position: relative;
    border-radius: 16px;
    overflow: hidden;
    box-shadow: var(--shadow);
    background: var(--white);
    touch-action: pan-y pinch-zoom;
    -webkit-user-select: none;
    user-select: none;
}

.photo-carousel:focus-visible {
    outline: 3px solid var(--primary);
    outline-offset: 4px;
}

.carousel-viewport {
    overflow: hidden;
    border-radius: 16px;
}

.carousel-track {
    display: flex;
    list-style: none;
    margin: 0;
    padding: 0;
    transition: transform 0.5s ease;
}

.carousel-track.is-dragging {
    transition: none;
}

.photo-carousel.is-dragging {
    cursor: grabbing;
}

.carousel-slide {
    position: relative;
    flex: 0 0 100%;
    min-height: 430px;
}

.carousel-slide img {
    width: 100%;
    height: 100%;
    min-height: 430px;
    object-fit: cover;
    display: block;
    pointer-events: none;
    -webkit-user-drag: none;
}

.carousel-caption {
    position: absolute;
    left: 18px;
    right: 18px;
    bottom: 18px;
    z-index: 1;
    color: #ffffff;
    font-weight: 800;
    font-size: 0.98rem;
    text-shadow: 0 2px 10px rgba(0, 0, 0, 0.65);
}

.carousel-slide::after {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(180deg, transparent 55%, rgba(0, 0, 0, 0.55));
    pointer-events: none;
}

.carousel-arrow {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    width: 42px;
    height: 42px;
    display: grid;
    place-items: center;
    border: 0;
    border-radius: 999px;
    background: rgba(0, 0, 0, 0.45);
    color: #ffffff;
    font-size: 1.5rem;
    line-height: 1;
    cursor: pointer;
    transition: background 0.2s ease, transform 0.2s ease;
    z-index: 2;
}

.carousel-arrow:hover {
    background: rgba(0, 0, 0, 0.68);
    transform: translateY(-50%) scale(1.05);
}

.carousel-arrow:focus-visible,
.carousel-dots button:focus-visible {
    outline: 3px solid rgba(255, 255, 255, 0.9);
    outline-offset: 3px;
}

.carousel-prev {
    left: 14px;
}

.carousel-next {
    right: 14px;
}

.carousel-dots {
    position: absolute;
    left: 0;
    right: 0;
    bottom: 16px;
    z-index: 2;
    display: flex;
    justify-content: center;
    gap: 8px;
}

.carousel-dots button {
    width: 9px;
    height: 9px;
    padding: 0;
    border: 0;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.55);
    cursor: pointer;
    transition: background 0.2s ease, transform 0.2s ease;
}

.carousel-dots button.active {
    background: #ffffff;
    transform: scale(1.2);
    box-shadow: 0 0 0 2px rgba(0, 0, 0, 0.25);
}

@media (prefers-reduced-motion: reduce) {
    .hero-photo img,
    .about-home-image img,
    .carousel-track,
    .carousel-arrow,
    .carousel-dots button,
    .action-card,
    .action-card::after {
        transition: none;
    }
}

/* ============================================================
   4. INSTAGRAM
   ============================================================ */

.instagram-section {
    padding-top: clamp(34px, 5vw, 64px);
    padding-bottom: clamp(34px, 5vw, 64px);
    background: var(--white);
}

.instagram-section .section-heading {
    max-width: 720px;
    margin: 0 auto;
}

.instagram-widget {
    margin-top: 42px;
    padding: 28px;
    background: var(--white);
    border: 1px solid rgba(31, 122, 130, 0.1);
    border-radius: var(--radius);
    box-shadow: 0 20px 48px rgba(36, 33, 42, 0.1);
}

/* ============================================================
   5. NOTÍCIAS
   ============================================================ */

/* Sem overrides — usa o card-grid/news-card padrão do style.css. */

/* ============================================================
   6. CHAMADA DE CURSOS/PROJETOS
   ============================================================ */

.home-courses-tags {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 10px;
    margin-top: 30px;
}

.home-courses-tags span {
    display: inline-flex;
    align-items: center;
    padding: 9px 16px;
    border-radius: 999px;
    background: rgba(31, 122, 130, 0.08);
    color: var(--teal);
    font-size: 0.92rem;
    font-weight: 800;
    transition: transform 0.2s ease, background 0.2s ease, color 0.2s ease;
}

.home-courses-tags span:nth-child(3n + 1) {
    background: rgba(161, 0, 20, 0.08);
    color: var(--primary);
}

.home-courses-tags span:nth-child(3n + 2) {
    background: rgba(246, 178, 75, 0.18);
    color: #8a4f00;
}

.home-courses-tags span:hover {
    transform: translateY(-2px);
    background: var(--primary);
    color: #ffffff;
}

.home-courses-cta {
    margin-top: 30px;
    text-align: center;
}

/* ============================================================
   7. CARDS DE CONTATO
   ============================================================ */

.action-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 22px;
    margin-top: 34px;
}

.action-card {
    position: relative;
    display: grid;
    gap: 10px;
    min-width: 0;
    min-height: 210px;
    padding: 26px;
    overflow: hidden;
    border: 1px solid var(--line);
    border-radius: var(--radius);
    background: var(--white);
    color: var(--ink);
    text-decoration: none;
    box-shadow: var(--shadow);
    transition: transform 0.25s ease, box-shadow 0.25s ease, border-color 0.25s ease;
}

.action-card .svg-icon {
    width: 34px;
    height: 34px;
    color: var(--primary);
}

.action-card:nth-child(2) .svg-icon {
    color: var(--secondary);
}

.action-card:nth-child(3) .svg-icon {
    color: var(--teal);
}

.action-card strong {
    font-size: 1.28rem;
}

.action-card span {
    color: var(--muted);
    font-size: 1.02rem;
    line-height: 1.6;
}

.action-card::after {
    content: "→";
    position: absolute;
    top: 24px;
    right: 24px;
    width: 32px;
    height: 32px;
    display: grid;
    place-items: center;
    border-radius: 999px;
    background: rgba(31, 122, 130, 0.1);
    color: var(--teal);
    font-size: 1.15rem;
    font-weight: 900;
    transition: transform 0.2s ease, background 0.2s ease, color 0.2s ease;
}

:root[data-theme="dark"] .home-mission,
:root[data-theme="dark"] .home-vital-signs div {
    background: var(--white);
    border-color: rgba(255, 255, 255, 0.12);
}

:root[data-theme="dark"] .home-courses-tags span:nth-child(3n + 2) {
    color: var(--warm);
}

.action-card:hover {
    transform: translateY(-2px);
    border-color: rgba(31, 122, 130, 0.28);
    box-shadow: 0 18px 36px rgba(36, 33, 42, 0.12);
}

.action-card:hover::after {
    transform: translateX(3px);
    background: var(--teal);
    color: #ffffff;
}

/* ============================================================
   8. MEDIA QUERIES
   ============================================================ */

@media (max-width: 980px) {
    .page-index {
        --home-header-height: 76px;
        scroll-snap-type: none;
    }

    .page-index main {
        scroll-snap-type: none;
    }

    .page-index main > section {
        min-height: calc(100svh - var(--home-header-height));
        scroll-snap-align: none;
        scroll-snap-stop: normal;
        padding-top: 28px;
        padding-bottom: 28px;
    }

    .page-index main > section.hero-home {
        min-height: calc(100svh - var(--home-header-height));
        overflow: hidden;
    }

    .hero-grid,
    .photo-story,
    .about-home {
        grid-template-columns: 1fr;
    }

    .about-home-image {
        order: 2;
    }

    .about-home-text {
        order: 1;
        max-width: none;
    }

    .action-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .hero-photo,
    .hero-photo img,
    .carousel-slide,
    .carousel-slide img {
        min-height: 280px;
    }

    .hero-grid {
        min-height: calc(100svh - var(--home-header-height));
    }

    .hero-copy-panel {
        padding: 40px clamp(20px, 6vw, 48px);
    }
}

@media (max-width: 900px) {
    .hero-grid {
        gap: 0;
    }

    .home-about-section {
        padding-top: 44px;
        padding-bottom: 44px;
    }

    .about-home {
        gap: 28px;
    }

    .about-home-text > .eyebrow {
        width: fit-content;
        margin-bottom: 14px;
    }

    .about-home-text > h2 {
        max-width: 24ch;
        font-size: clamp(1.8rem, 5.5vw, 2.45rem);
        line-height: 1.12;
        letter-spacing: -0.025em;
    }

    .about-home-text > h2::after {
        content: "";
        display: block;
        width: 58px;
        height: 4px;
        margin-top: 16px;
        border-radius: 999px;
        background: linear-gradient(90deg, var(--warm), var(--teal));
    }

    .about-home-text > h2 + p {
        max-width: 62ch;
        margin-top: 18px;
        color: var(--muted);
        font-size: 1rem;
        line-height: 1.68;
    }

    .home-mission {
        margin: 24px 0 18px;
        padding: 18px;
        border-left-width: 5px;
        box-shadow: 0 12px 28px rgba(55, 24, 44, 0.07);
    }

    .home-vital-signs {
        grid-template-columns: 1fr;
        gap: 10px;
    }

    .home-vital-signs div {
        display: grid;
        grid-template-columns: minmax(68px, auto) 1fr;
        align-items: center;
        gap: 16px;
        padding: 14px 16px;
    }

    .home-vital-signs strong {
        font-size: 1.2rem;
    }

    .home-vital-signs span {
        margin-top: 0;
        padding-left: 16px;
        border-left: 1px solid var(--line);
    }
}

@media (max-width: 700px) {
    .action-card {
        padding: 20px;
    }
}

@media (max-width: 640px) {
    .page-index {
        --home-header-height: 64px;
    }

    .page-index,
    .page-index main {
        scroll-snap-type: none;
    }

    .page-index main > section {
        min-height: auto;
        scroll-snap-align: none;
        scroll-snap-stop: normal;
    }

    .hero-home {
        min-height: calc(100svh - var(--home-header-height));
    }

    .hero-copy-panel {
        padding: 28px 20px;
    }

    .hero-grid {
        min-height: auto;
    }

    .hero-copy {
        gap: 14px;
    }

    .page-index main > section {
        gap: 18px;
        padding-top: 22px;
        padding-bottom: 22px;
    }

    .page-index .section-heading {
        margin-bottom: 0;
    }

    .page-index .section-heading h2 {
        font-size: clamp(1.42rem, 7vw, 1.78rem);
        line-height: 1.12;
    }

    .page-index .section-heading p {
        font-size: 0.96rem;
        line-height: 1.5;
    }

    .hero-photo,
    .hero-photo img {
        min-height: 0;
        max-height: none;
    }

    .action-grid {
        grid-template-columns: 1fr;
    }

    .home-vital-signs {
        grid-template-columns: 1fr;
    }

    .about-home {
        gap: 20px;
    }

    .about-home-image img {
        min-height: 0;
        aspect-ratio: 16 / 9;
        max-height: 180px;
    }

    .home-mission {
        margin: 16px 0;
        padding: 14px;
    }

    .home-vital-signs {
        gap: 8px;
        margin-bottom: 18px;
    }

    .home-vital-signs div {
        padding: 12px 14px;
    }

    .home-courses-tags {
        gap: 8px;
        margin-top: 8px;
    }

    .home-courses-tags span {
        padding: 7px 10px;
        font-size: 0.84rem;
    }

    .home-courses-cta,
    .instagram-widget,
    .news-section .card-grid,
    .action-grid {
        margin-top: 14px;
    }

    .instagram-widget {
        padding: 14px;
        max-height: none;
        overflow: visible;
    }

    .page-index .card-grid,
    .action-grid {
        gap: 12px;
    }

    .page-index .news-card,
    .action-card {
        min-height: auto;
    }

    .carousel-slide,
    .carousel-slide img {
        min-height: 0;
        max-height: none;
    }

    .carousel-caption {
        left: 14px;
        right: 14px;
        bottom: 42px;
        font-size: 0.9rem;
        line-height: 1.3;
    }

    .carousel-dots {
        bottom: 14px;
        gap: 4px;
    }

    .carousel-dots button {
        position: relative;
        width: 8px;
        height: 8px;
        margin: 0 6px;
    }

    .carousel-dots button::before {
        content: "";
        position: absolute;
        inset: -10px;
    }
}

@media (max-width: 560px) {
    .hero-photo {
        min-height: 0;
        aspect-ratio: 4 / 3;
    }

    .hero-photo img,
    .carousel-slide,
    .carousel-slide img {
        width: 100%;
        height: auto;
        min-height: 0;
        aspect-ratio: 4 / 3;
        object-fit: cover;
    }
}

@media (max-width: 420px) {
    .action-card {
        padding: 14px;
    }

    .action-card::after {
        top: 14px;
        right: 14px;
        width: 28px;
        height: 28px;
    }

    .hero-copy h1 {
        font-size: clamp(1.72rem, 8.8vw, 1.95rem);
        line-height: 1.08;
    }

    .hero-lead,
    .action-card span {
        font-size: 0.96rem;
        line-height: 1.52;
    }

    .carousel-arrow {
        width: 44px;
        height: 44px;
        font-size: 1.25rem;
        background: rgba(0, 0, 0, 0.58);
    }

    .carousel-prev {
        left: 10px;
    }

    .carousel-next {
        right: 10px;
    }
}

@media (max-width: 360px) {
    .hero-photo {
        min-height: 160px;
        border-radius: 0;
        padding: 0;
        overflow: hidden;
    }

    .hero-photo figcaption {
        display: none;
    }

    .hero-copy {
        padding-right: 0;
    }

    .hero-photo img {
        width: 100%;
        height: auto;
        object-fit: cover;
    }
}
