/*
Theme Name: tur360
Theme URI: https://tur360.com.br/
Author: tur360
Description: Tema de blocos (FSE) do tur360: tours virtuais 360° com demo interativa, planos com preço, formulário que abre o WhatsApp, SEO on-page e schema LocalBusiness/Service. Leve, sem construtor e sem jQuery.
Requires at least: 6.4
Tested up to: 6.8
Requires PHP: 7.4
Version: 1.0.0
License: GPL-2.0-or-later
License URI: https://www.gnu.org/licenses/gpl-2.0.html
Text Domain: tur360
Tags: full-site-editing, block-patterns, one-column, custom-colors, translation-ready
*/

/* ---------- Base ---------- */
html { scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }
:where(h1, h2, h3) { text-wrap: balance; }
:where(p, li) { text-wrap: pretty; }
img { height: auto; }
:focus-visible { outline: 3px solid var(--wp--preset--color--sol); outline-offset: 2px; }

/* ---------- Header ---------- */
.tur360-header { position: sticky; top: 0; z-index: 50; backdrop-filter: saturate(1.4) blur(8px); background: color-mix(in srgb, var(--wp--preset--color--papel) 88%, transparent); border-bottom: 1px solid var(--wp--preset--color--nevoa); }
.admin-bar .tur360-header { top: 32px; }
@media (max-width: 782px) { .admin-bar .tur360-header { top: 0; } }
.tur360-logo a { text-decoration: none; font-weight: 800; letter-spacing: -0.03em; }
.tur360-logo a::after { content: "°"; color: var(--wp--preset--color--sol); }

@media (max-width: 600px) { .tur360-header-cta { display: none; } }

/* ---------- Seções e cartões ---------- */
.tur360-section { padding-top: var(--wp--preset--spacing--60); padding-bottom: var(--wp--preset--spacing--60); }
.wp-site-blocks > main, .wp-site-blocks > footer { margin-block-start: 0; }
main > .wp-block-post-content > .tur360-section { margin-block-start: 0; }
[id] { scroll-margin-top: 5rem; }
.tur360-eyebrow { text-transform: uppercase; letter-spacing: 0.14em; font-weight: 700; font-size: var(--wp--preset--font-size--x-small); color: var(--wp--preset--color--lagoa-escuro); }
.has-tinta-background-color .tur360-eyebrow { color: var(--wp--preset--color--sol-claro); }
.tur360-card { background: var(--wp--preset--color--branco); border: 1px solid var(--wp--preset--color--nevoa); border-radius: 18px; padding: clamp(1.25rem, 3vw, 2rem); height: 100%; box-sizing: border-box; transition: transform .2s ease, box-shadow .2s ease; }
.tur360-card:hover { transform: translateY(-2px); box-shadow: 0 14px 34px -18px rgba(15, 26, 43, .35); }
.tur360-card > :first-child { margin-top: 0; }
.tur360-icon { font-size: 1.75rem; line-height: 1; margin: 0 0 .5rem; }
.tur360-num { display: inline-grid; place-items: center; width: 2.4rem; height: 2.4rem; border-radius: 50%; background: var(--wp--preset--color--sol); color: var(--wp--preset--color--tinta); font-weight: 800; margin: 0 0 .75rem; }
.tur360-check { list-style: none; padding-left: 0; }
.tur360-check li { padding-left: 1.6rem; position: relative; margin: .45rem 0; }
.tur360-check li::before { content: "✓"; position: absolute; left: 0; color: var(--wp--preset--color--lagoa); font-weight: 800; }
.has-tinta-background-color .tur360-card { background: var(--wp--preset--color--tinta-2); border-color: #2E405C; }

/* ---------- Planos ---------- */
.tur360-plan { position: relative; display: flex; flex-direction: column; }
.tur360-plan .tur360-price { font-size: clamp(2rem, 4vw, 2.6rem); font-weight: 800; letter-spacing: -0.03em; margin: .25rem 0; line-height: 1.1; }
.tur360-plan .tur360-price small { font-size: .9rem; font-weight: 500; color: var(--wp--preset--color--tinta-suave); }
.tur360-plan.is-featured { border: 2px solid var(--wp--preset--color--sol); box-shadow: 0 18px 40px -22px rgba(255, 107, 53, .6); }
.tur360-plan.is-featured::before { content: "Mais escolhido"; position: absolute; top: -0.85rem; left: 1.5rem; background: var(--wp--preset--color--sol); color: var(--wp--preset--color--tinta); font-size: .75rem; font-weight: 800; padding: .25rem .7rem; border-radius: 99px; }
.tur360-plan .wp-block-buttons { margin-top: auto; padding-top: 1rem; }

/* ---------- Viewer 360 ---------- */
.tur360-viewer { position: relative; aspect-ratio: 16 / 10; width: 100%; border-radius: 20px; overflow: hidden; background: var(--wp--preset--color--tinta) center / cover no-repeat; touch-action: none; user-select: none; -webkit-user-select: none; cursor: grab; box-shadow: 0 24px 60px -30px rgba(15, 26, 43, .6); }
.tur360-viewer.is-tall { aspect-ratio: 4 / 3; }
.tur360-viewer:active { cursor: grabbing; }
.tur360-viewer canvas { position: absolute; inset: 0; width: 100%; height: 100%; display: block; }
.tur360-viewer__hint { position: absolute; left: 50%; bottom: 1rem; transform: translateX(-50%); z-index: 2; background: rgba(15, 26, 43, .8); color: #fff; font-size: .85rem; font-weight: 600; padding: .45rem .9rem; border-radius: 99px; pointer-events: none; white-space: nowrap; transition: opacity .4s ease; }
.tur360-viewer.is-touched .tur360-viewer__hint { opacity: 0; }
.tur360-viewer__label { position: absolute; top: .9rem; left: .9rem; z-index: 2; background: rgba(250, 247, 242, .92); color: var(--wp--preset--color--tinta); font-size: .75rem; font-weight: 700; padding: .3rem .65rem; border-radius: 99px; pointer-events: none; }
.tur360-viewer__fs { position: absolute; top: .7rem; right: .7rem; z-index: 2; border: 0; border-radius: 10px; background: rgba(15, 26, 43, .75); color: #fff; width: 2.4rem; height: 2.4rem; font-size: 1.1rem; cursor: pointer; }
.tur360-viewer:fullscreen { border-radius: 0; aspect-ratio: auto; }

/* Embed com fachada: o iframe só carrega no clique */
.tur360-embed { position: relative; aspect-ratio: 16 / 10; border-radius: 20px; overflow: hidden; background: var(--wp--preset--color--tinta) center / cover no-repeat; }
.tur360-embed iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }
.tur360-embed__btn { position: absolute; inset: 0; width: 100%; border: 0; cursor: pointer; background: linear-gradient(180deg, rgba(15,26,43,.15), rgba(15,26,43,.72)); color: #fff; font: inherit; font-weight: 700; font-size: 1.05rem; display: grid; place-items: center; }

/* ---------- Formulário de orçamento ---------- */
.tur360-form { display: grid; gap: 1rem; position: relative; }
.tur360-form .row { display: grid; gap: 1rem; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); }
.tur360-form label { display: grid; gap: .35rem; font-weight: 600; font-size: .95rem; }
.tur360-form input, .tur360-form select, .tur360-form textarea { font: inherit; padding: .8rem .9rem; border: 1.5px solid #C9D2DE; border-radius: 12px; background: #fff; color: var(--wp--preset--color--tinta); width: 100%; box-sizing: border-box; }
.tur360-form input:focus, .tur360-form select:focus, .tur360-form textarea:focus { border-color: var(--wp--preset--color--lagoa); outline: 2px solid color-mix(in srgb, var(--wp--preset--color--lagoa) 35%, transparent); }
.tur360-form .check { display: flex; gap: .6rem; align-items: flex-start; font-weight: 500; }
.tur360-form .check input { width: auto; margin-top: .3rem; }
.tur360-form .hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }
.tur360-form button { justify-self: start; font: inherit; font-weight: 800; border: 0; border-radius: 999px; padding: .95rem 1.6rem; background: var(--wp--preset--color--sol); color: var(--wp--preset--color--tinta); cursor: pointer; }
.tur360-form button:hover { background: var(--wp--preset--color--sol-claro); }
.tur360-form small { color: var(--wp--preset--color--tinta-suave); }
.tur360-notice { padding: 1rem 1.2rem; border-radius: 12px; background: #E6F6F3; border: 1px solid var(--wp--preset--color--lagoa); margin-bottom: 1rem; }
.tur360-notice.is-error { background: #FDECE6; border-color: #D9481A; }

/* ---------- WhatsApp flutuante ---------- */
.tur360-wa { position: fixed; right: 1rem; bottom: 1rem; z-index: 60; display: inline-flex; align-items: center; gap: .5rem; background: #1A8F4A; color: #fff; text-decoration: none; font-weight: 700; padding: .8rem 1.05rem; border-radius: 999px; box-shadow: 0 10px 30px -10px rgba(0, 0, 0, .45); }
.tur360-wa:hover, .tur360-wa:focus { background: #146F39; color: #fff; }
.tur360-wa svg { width: 22px; height: 22px; fill: currentColor; }
@media (max-width: 600px) { .tur360-wa span { display: none; } .tur360-wa { padding: .85rem; } }

/* ---------- FAQ ---------- */
.wp-block-details { border-bottom: 1px solid var(--wp--preset--color--nevoa); padding: 1rem 0; }
.wp-block-details summary { font-weight: 700; cursor: pointer; }
.wp-block-details[open] summary { color: var(--wp--preset--color--lagoa-escuro); }

/* ---------- Blog ---------- */
.tur360-post-card { background: var(--wp--preset--color--branco); border-radius: 18px; overflow: hidden; border: 1px solid var(--wp--preset--color--nevoa); height: 100%; }
.tur360-post-card .wp-block-post-featured-image { margin: 0; }
.tur360-post-card__body { padding: 1.25rem 1.4rem 1.5rem; }
