/* =========================
   RESPONSIVIDADE — FUKUIFILM
   Breakpoints:
   - Mobile XS: <= 359px
   - Mobile S:  360px – 479px
   - Mobile L:  480px – 767px
   - Tablet:    768px – 1023px
   - Notebook:  1024px – 1279px
   - Desktop:   >= 1280px (base em styles.css)
========================= */

/* =========================
   UTILITÁRIOS GLOBAIS
========================= */

html,
body {
    max-width: 100%;
    overflow-x: hidden;
}

* {
    min-width: 0;
}

img,
video {
    max-width: 100%;
}

@media (prefers-reduced-motion: reduce) {

    html {
        scroll-behavior: auto;
    }

    .method-slide,
    .service-card img,
    .project-card img,
    .projects-gallery img,
    .btn-secondary,
    .budget-btn,
    .projects-link,
    .film-btn,
    .watch-btn {
        transition: none;
    }
}

/* =========================
   TOQUE = HOVER (MOBILE)
   Classe aplicada via JS (script.js / projetos.js) em
   dispositivos sem mouse, reproduzindo os efeitos de :hover.
========================= */

@media (hover: none),
(pointer: coarse) {

    .service-card .service-overlay p {
        transition: .25s ease;
    }

    .project-card img {
        transition: transform .3s ease;
    }
}

/* =========================
   MENU — HAMBURGUER
========================= */

.menu-toggle {
    display: none;
    background: none;
    border: 1px solid rgba(255, 255, 255, 0.25);
    border-radius: 8px;
    color: #fff;
    font-size: 18px;
    width: 38px;
    height: 38px;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    flex-shrink: 0;
    transition: border-color .2s, background .2s;
    z-index: 1100;
}

.menu-toggle:hover,
.menu-toggle:active {
    border-color: rgba(255, 255, 255, 0.6);
    background: rgba(255, 255, 255, 0.06);
}

/* Garante que o menu nunca suma — o menu e essencial em todos os tamanhos */
.floating-menu {
    display: flex;
    max-width: calc(100% - 16px);
}

/* Estado hide ao rolar: usa transform, nao display */
.floating-menu.hide {
    transform: translateX(-50%) translateY(-120%);
}

/* =========================
   MENU — TABLET (768–1023px)
========================= */

@media (max-width: 1023px) {

    .floating-menu {
        top: 12px;
        width: 92%;
        padding: 14px 20px;
        border-radius: 14px;
    }

    .menu-contents {
        flex-wrap: wrap;
        align-items: center;
    }

    #main-navigation {
        display: none;
        flex-direction: column;
        gap: 0;
        width: 100%;
        padding: 12px 0 4px;
        border-top: 1px solid rgba(255, 255, 255, 0.1);
        margin-top: 12px;
    }

    #main-navigation.open {
        display: flex;
    }

    #main-navigation li {
        border-bottom: 1px solid rgba(255, 255, 255, 0.07);
    }

    #main-navigation li:last-child {
        border-bottom: none;
    }

    #main-navigation a {
        display: block;
        padding: 14px 4px;
        font-size: 15px;
        letter-spacing: .04em;
    }

    /* Instagram vermelho e alinhado com os links no menu mobile */
    #main-navigation li.nav-instagram {
        border-bottom: none;
        padding: 14px 4px;
        display: flex;
        align-items: center;
    }

    #main-navigation li.nav-instagram a {
        border: none !important;
        background: transparent !important;
        box-shadow: none !important;
    }

    /* Esconde o icone do Instagram da barra direita no mobile (ele passa a viver dentro do menu) */
    .menu-instagram {
        display: none;
    }

    .budget-btn {
        display: none;
    }

    .menu-toggle {
        display: flex;
    }

    .menu-right {
        gap: 14px;
    }
}

/* =========================
   MENU — MOBILE (< 768px)
========================= */

@media (max-width: 767px) {

    #main-navigation {
        align-items: flex-end;
        /* joga tudo pra direita */
    }

    #main-navigation li {
        width: 100%;
        display: flex;
        justify-content: flex-end;
        /* conteúdo encosta na direita */
    }

    .floating-menu {
        top: 10px;
        width: 94%;
        padding: 12px 16px;
        border-radius: 12px;
    }

    .menu-logo {
        height: 22px;
    }

    .menu-toggle {
        width: 36px;
        height: 36px;
        font-size: 16px;
    }

    #main-navigation a {
        width: 100%;
        text-align: right;

        padding: 14px 16px;
        margin: 6px 0;

        border: 1px solid rgba(255, 255, 255, 0.25);
        border-radius: 10px;

        background: transparent;
    }
}

@media (max-width: 359px) {

    .floating-menu {
        top: 8px;
        width: 96%;
        padding: 10px 12px;
        border-radius: 10px;
    }

    .menu-logo {
        height: 18px;
    }

    .menu-right {
        gap: 10px;
    }
}

/* =========================
   HERO / INTRO VIDEO
========================= */

.intro-video {
    position: relative;
    width: 100%;
    height: 100dvh;
    min-height: 500px;
    overflow: hidden;
}

/* Garante margem dos dois lados — resolve o corte */
.hero-overlay {
    position: absolute !important;
    bottom: 72px !important;
    left: 6% !important;
    right: 6% !important;
    top: auto !important;
    transform: none !important;
    max-width: 1400px;
}

.hero-overlay h1 {
    font-size: clamp(32px, 6.5vw, 95px);
    white-space: nowrap;
    line-height: .87;
    overflow: hidden;
}

/* Notebook */
@media (max-width: 1279px) {

    .hero-overlay {
        bottom: 60px !important;
    }

    .hero-description {
        font-size: 17px;
    }
}

/* Tablet */
@media (max-width: 1023px) {

    .hero-overlay {
        left: 5% !important;
        right: 5% !important;
        bottom: 56px !important;
    }

    .hero-description {
        font-size: 16px;
        max-width: 100%;
    }
}

/* Mobile (< 768px) — titulo quebra em ate 2 linhas, sem cortar palavras */
@media (max-width: 767px) {

    .intro-video {
        height: 100svh;
        min-height: 520px;
    }

    .hero-overlay {
        left: 5% !important;
        right: 5% !important;
        bottom: 44px !important;
    }

    .hero-overlay h1 {
        font-size: clamp(30px, 11vw, 50px);
        white-space: normal;
        line-height: 1.02;
        word-break: normal;
        overflow-wrap: break-word;
    }

    .hero-kicker {
        font-size: 10px;
        letter-spacing: .14em;
        margin-bottom: 16px;
    }

    .hero-description {
        font-size: 15px;
        margin-top: 14px;
        line-height: 1.6;
    }

    .hero-actions {
        flex-direction: column;
        gap: 10px;
        margin-top: 24px;
    }

    .btn-secondary {
        width: 100%;
        justify-content: space-between;
        padding: 13px 16px;
    }
}

/* Mobile S (< 480px) */
@media (max-width: 479px) {

    .hero-overlay {
        bottom: 36px !important;
    }

    .hero-kicker {
        font-size: 9px;
        letter-spacing: .1em;
    }

    .hero-description {
        font-size: 14px;
    }
}

/* Mobile XS (<= 359px) */
@media (max-width: 359px) {

    .hero-overlay {
        left: 5.5% !important;
        right: 5.5% !important;
        bottom: 28px !important;
    }

    .hero-overlay h1 {
        font-size: clamp(28px, 10.5vw, 40px);
    }

    .hero-kicker {
        font-size: 8.5px;
        letter-spacing: .08em;
        margin-bottom: 12px;
    }
}

/* =========================
   SOBRE
========================= */

@media (max-width: 1279px) {

    .about-section {
        padding: 60px 40px;
        height: auto;
        min-height: auto;
    }

    .about-container {
        grid-template-columns: 1fr;
        min-height: auto;
    }

    .about-left {
        order: 1;
        padding: 40px 30px 0;
    }

    .about-center {
        order: 2;
        display: flex;
        height: 340px;
        padding: 0 30px;
        margin-top: 30px;
    }

    .about-center img {
        height: 100%;
        transform: none;
        border-radius: 8px;
    }

    .about-right {
        order: 3;
        padding: 30px 30px 40px;
        gap: 28px;
    }
}

@media (max-width: 1023px) {

    .about-section {
        padding: 60px 24px;
        height: auto;
    }

    .about-left h2 {
        font-size: clamp(40px, 6vw, 70px);
    }

    .stat-item h3 {
        font-size: 32px;
    }

    .about-center {
        height: 300px;
    }
}

@media (max-width: 767px) {

    #sobre {
        scroll-margin-top: 80px;
    }

    .about-section {
        padding: 50px 16px;
        height: auto;
    }

    .about-container {
        border-radius: 8px;
    }

    .about-left {
        padding: 32px 20px 0;
    }

    .about-left h2 {
        font-size: clamp(38px, 11vw, 60px);
    }

    .about-center {
        height: 240px;
        padding: 0 20px;
        margin-top: 24px;
    }

    .about-right {
        display: grid;
        grid-template-columns: 1fr 1fr;
        padding: 20px;
        gap: 20px;
    }

    .stat-item h3 {
        font-size: 26px;
    }

    .stat-item p {
        font-size: 13px;
    }
}

@media (max-width: 479px) {

    .about-right {
        grid-template-columns: 1fr;
    }

    .about-left h2 {
        font-size: 38px;
    }

    .about-center {
        height: 200px;
    }
}

@media (max-width: 359px) {

    .about-section {
        padding: 40px 12px;
    }

    .about-left {
        padding: 24px 14px 0;
    }

    .about-right {
        padding: 16px;
    }

    .about-left h2 {
        font-size: 32px;
    }

    .about-center {
        height: 170px;
        padding: 0 14px;
        margin-top: 18px;
    }
}

/* =========================
   PROJETOS (index)
========================= */

@media (max-width: 1279px) {

    .featured-projects {
        padding: 60px 40px;
    }

    .projects-gallery img {
        height: 300px;
    }
}

@media (max-width: 1023px) {

    .featured-projects {
        padding: 60px 30px;
        min-height: auto;
    }

    .projects-gallery {
        grid-template-columns: repeat(2, 1fr);
    }

    .projects-gallery img {
        height: 260px;
    }
}

@media (max-width: 767px) {

    .featured-projects {
        padding: 50px 16px 40px;
    }

    .projects-heading {
        font-size: clamp(38px, 11vw, 60px);
        margin-bottom: 30px;
    }

    .projects-gallery {
        grid-template-columns: 1fr 1fr;
        gap: 8px;
    }

    .projects-gallery img {
        height: 190px;
        border-radius: 8px;
    }

    .projects-footer {
        justify-content: center;
        margin-top: 24px;
    }

    .projects-link {
        font-size: 15px;
        padding: 13px 16px;
    }
}

@media (max-width: 479px) {

    .projects-gallery {
        grid-template-columns: 1fr;
    }

    .projects-gallery img {
        height: 250px;
    }
}

@media (max-width: 359px) {

    .featured-projects {
        padding: 40px 12px 32px;
    }

    .projects-link {
        width: 100%;
        justify-content: space-between;
        font-size: 14px;
    }
}

/* =========================
   MÉTODO
========================= */

@media (max-width:1279px) {

    .method-section {

        grid-template-columns: 1fr;
        gap: 40px;

        padding: 100px 30px;

    }

    .method-header {

        width: 100%;
        max-width: 900px;

        height: auto;

        border-radius: 20px;

        padding: 50px;

        margin: auto;

    }

    .method-content {

        width: 100%;

        display: flex;
        flex-direction: column;
        align-items: center;

    }

    .method-slider {

        width: 100%;
        max-width: 900px;

        height: 420px;

    }

}

@media (max-width:1023px) {

    .method-section {

        padding: 80px 24px;

        gap: 35px;

    }

    .method-header {

        padding: 40px;

        text-align: center;

    }

    .method-header h2 {

        font-size: 58px;

    }

    .method-slider {

        height: 360px;

    }

    .method-overlay h3 {

        font-size: 42px;

    }

}

@media (max-width:767px) {

    .method-section {

        padding: 60px 16px;

    }

    .method-header {

        padding: 28px 20px;

    }

    .method-header h2 {

        font-size: 42px;

    }

    .method-header p {

        font-size: 15px;

    }

    .method-slider {

        height: 280px;

        border-radius: 18px;

    }

    .method-slide img {

        border-radius: 18px;

    }

    .method-overlay {

        padding: 20px;

    }

    .method-overlay h3 {

        font-size: 28px;

    }

    .method-overlay p {

        font-size: 14px;

        text-align: center;

        max-width: 100%;

    }

    .method-controls {

        margin-top: 18px;

    }

}

@media (max-width:480px) {

    .method-slider {

        height: 240px;

    }

    .method-header h2 {

        font-size: 34px;

    }

    .method-overlay h3 {

        font-size: 22px;

    }

    .method-overlay p {

        font-size: 13px;

    }

    .method-arrow {

        width: 42px;
        height: 42px;

    }

}

/* =========================
   SERVICOS
========================= */

@media (max-width: 1279px) {

    .services-section {
        padding: 60px 3%;
    }

    .service-card {
        min-width: calc(50% - 10px);
        height: 400px;
    }
}

@media (max-width: 1023px) {

    .services-section {
        padding: 60px 24px;
    }

    .service-card {
        min-width: calc(62% - 10px);
        height: 370px;
    }

    .services-title {
        font-size: clamp(40px, 7vw, 65px);
    }
}

@media (max-width: 767px) {

    #servicos {
        scroll-margin-top: 80px;
    }

    .services-section {
        padding: 50px 16px 80px;
    }

    .services-title {
        font-size: clamp(34px, 10vw, 54px);
        margin-bottom: 28px;
    }

    .service-card {
        min-width: 80vw;
        height: 320px;
        border-radius: 10px;
    }

    /* Em telas de toque a legenda fica sempre visivel, ja que o hover
       nao existe — o JS ainda pode alternar via toque para reforcar. */
    .service-overlay p {
        opacity: 1;
        transform: translateY(0);
    }

    .slider-btn {
        bottom: -54px;
        width: 44px;
        height: 44px;
        font-size: 13px;
    }

    .service-overlay h3 {
        font-size: 22px;
    }

    .service-overlay p {
        font-size: 13px;
    }
}

@media (max-width: 479px) {

    .service-card {
        min-width: 86vw;
        height: 290px;
    }

    .service-overlay {
        padding: 20px;
    }
}

@media (max-width: 359px) {

    .services-section {
        padding: 40px 12px 70px;
    }

    .service-card {
        min-width: 100%;
        height: 260px;
    }

    .services-title {
        font-size: 30px;
        margin-bottom: 20px;
    }

    .slider-btn {
        width: 40px;
        height: 40px;
        font-size: 12px;
        bottom: -50px;
    }
}

/* =========================
   FOOTER
========================= */

@media (max-width: 767px) {

    .site-footer {
        padding: 22px 16px;
        font-size: 12px;
    }
}

/* =========================
   PAGINA PROJETOS
========================= */

@media (max-width: 1279px) {

    .projects-page {
        padding: 120px 40px 60px;
    }

    .projects-grid-custom {
        grid-template-columns: repeat(3, 1fr);
    }

    .project-card img {
        height: 260px;
    }
}

@media (max-width: 1023px) {

    .projects-page {
        padding: 110px 28px 60px;
    }

    .projects-grid-custom {
        grid-template-columns: repeat(2, 1fr);
        gap: 8px;
    }

    .project-card img {
        height: 230px;
    }
}

@media (max-width: 767px) {

    .projects-page {
        padding: 100px 14px 50px;
    }

    .projects-page-title h1 {
        font-size: clamp(40px, 11vw, 70px);
    }

    .projects-grid-custom {
        grid-template-columns: repeat(2, 1fr);
        gap: 6px;
    }

    .project-card img {
        height: 175px;
    }

    .project-name {
        font-size: 11px;
        letter-spacing: .07em;
    }
}

@media (max-width: 479px) {

    .projects-page {
        padding: 88px 10px 40px;
    }

    .projects-grid-custom {
        grid-template-columns: 1fr;
    }

    .project-card img {
        height: 255px;
    }
}

@media (max-width: 359px) {

    .projects-page {
        padding: 80px 8px 36px;
    }

    .projects-page-title h1 {
        font-size: 34px;
    }

    .project-card img {
        height: 220px;
    }

    .project-name {
        font-size: 10px;
        top: 10px;
        left: 10px;
        right: 10px;
    }
}

/* =========================
   FILMES
========================= */

@media (max-width: 1279px) {

    .films-gallery {
        gap: 50px;
        padding: 60px 30px 80px;
    }

    .film-modal-content {
        width: 95vw;
        height: auto;
        grid-template-columns: 1fr;
        padding: 30px;
        gap: 24px;
        overflow-y: auto;
        max-height: 90vh;
    }

    .film-poster img {
        height: auto;
        max-height: 50vw;
        aspect-ratio: 4 / 3;
    }
}

@media (max-width: 1023px) {

    .films-section {
        padding-top: 100px;
        padding-bottom: 60px;
    }

    .films-header {
        padding: 0 24px 28px;
    }

    .films-header h2 {
        font-size: clamp(42px, 7vw, 78px);
        text-align: center;
    }

    .films-gallery {
        flex-direction: column;
        align-items: center;
        gap: 50px;
        padding: 50px 24px 60px;
    }

    .film-block img {
        max-width: 100%;
        width: 100%;
        height: auto;
    }
}

@media (max-width: 767px) {

    .films-header {
        padding: 0 16px 28px;
    }

    .films-header h2 {
        font-size: clamp(36px, 10vw, 58px);
    }

    .films-gallery {
        padding: 36px 14px 48px;
        gap: 36px;
    }

    .film-btn {
        font-size: 14px;
        padding: 12px 24px;
    }

    .film-modal {
        padding: 12px;
    }

    .film-modal-content {
        padding: 18px;
        gap: 14px;
    }

    .film-poster img {
        aspect-ratio: 16 / 10;
        max-height: none;
    }

    .film-close {
        top: 10px;
        right: 12px;
        font-size: 34px;
    }

    .film-tech-grid {
        grid-template-columns: 1fr;
        gap: 14px;
    }

    .film-bottom {
        grid-template-columns: 1fr;
        gap: 18px;
    }

    #film-description {
        font-size: 14px;
        line-height: 1.7;
    }

    .film-meta-bar {
        height: auto;
        padding: 10px 0;
        gap: 8px 14px;
    }
}

@media (max-width: 479px) {

    .films-header h2 {
        font-size: 36px;
    }

    .film-btn {
        width: 100%;
        text-align: center;
    }

    .watch-btn {
        width: 100%;
    }

    .film-modal-content {
        padding: 14px;
    }
}

@media (max-width: 359px) {

    .films-header {
        padding: 0 12px 22px;
    }

    .films-header h2 {
        font-size: 30px;
    }

    .films-gallery {
        padding: 28px 10px 40px;
        gap: 28px;
    }

    .film-modal {
        padding: 8px;
    }

    .film-modal-content {
        padding: 12px;
    }

    .film-section-title {
        font-size: 12px;
        margin-bottom: 14px;
    }

    #film-description {
        font-size: 13px;
    }
}

@media (max-width:1023px) {

    .floating-menu {
        position: fixed;
    }

    .menu-toggle {

        position: absolute;

        right: 18px;
        top: 16px;

        z-index: 9999;
    }

}

@media (max-width: 992px) {

    .menu-instagram {
        display: none;
        border: none;
    }

    .nav-instagram {
        display: block;
    }

    .nav-instagram a {
        display: flex;
        align-items: center;
        gap: 10px;

        color: #e10613 !important;
        font-weight: 600;
    }

}

/* Corrige os botões do slider de serviços */
.services-controls {
    display: flex !important;
    justify-content: center;
    align-items: center;
    flex-direction: row !important;
    gap: 18px;
    width: 100%;
    margin-top: 25px;
}

.services-controls .slider-btn {
    position: static !important;
    transform: none !important;
    flex: 0 0 auto;
}