:root{--astro-bg:#05070d;--astro-bg-2:#0b1020;--astro-text:#c9d2e3;--astro-muted:#8d99b1;--astro-heading:#ffffff;--astro-accent:#ff7a3d;--astro-accent-2:#5ad1ff;--astro-line:rgba(255, 255, 255, .10);--astro-card:linear-gradient(180deg, rgba(255,255,255,.06), rgba(255,255,255,.02));--astro-radius:18px;--astro-font-body:"Inter", system-ui, -apple-system, "Segoe UI", Roboto, Arial, sans-serif;--astro-font-display:"Space Grotesk", "Inter", system-ui, -apple-system, "Segoe UI", Roboto, Arial, sans-serif;--astro-ease:cubic-bezier(.2, .7, .2, 1);--astro-grain:url("data:image/svg+xml;utf8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='220' height='220'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.9' numOctaves='2' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(https://gpt.rui-miranda.com/wp-content/themes/cvio-astronaut/%23n)' opacity='.09'/%3E%3C/svg%3E");
}

/* =========================================================
   2. Base: leitura confortável
   ========================================================= */
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body {
	font-family: var(--astro-font-body);
	font-size: 17px;
	line-height: 1.75;
	color: var(--astro-text);
	background-color: var(--astro-bg);
	-webkit-font-smoothing: antialiased;
	text-rendering: optimizeLegibility;
}
h1, h2, h3, h4, h5, h6,
.elementor-heading-title,
.header .logo strong {
	font-family: var(--astro-font-display);
	color: var(--astro-heading);
	line-height: 1.15;
}
img { max-width: 100%; height: auto; }
::selection { background: var(--astro-accent); color: #0a0c12; }
:focus-visible { outline: 2px solid var(--astro-accent-2); outline-offset: 3px; border-radius: 4px; }

.skip-link {
	position: absolute; left: 16px; top: -80px; z-index: 100000;
	padding: 12px 20px; background: var(--astro-accent); color: #0a0c12 !important;
	font-weight: 700; border-radius: 999px; transition: top .2s;
}
.skip-link:focus { top: 16px; }

/* Campo de estrelas (canvas criado por assets/js/astro.js) */
#astro-stars { position: fixed; inset: 0; width: 100%; height: 100%; z-index: 0; pointer-events: none; }
body > .container { position: relative; z-index: 1; }
.lines { opacity: .35; }

/* =========================================================
   3. Cabeçalho e rodapé do tema pai
   ========================================================= */
.header:not(.fixed) { background: linear-gradient(180deg, rgba(5,7,13,.85), rgba(5,7,13,0)); }
.header.fixed,
.header.active {
	background: rgba(5, 7, 13, .8) !important;
	-webkit-backdrop-filter: saturate(1.3) blur(14px);
	backdrop-filter: saturate(1.3) blur(14px);
	border-bottom: 1px solid var(--astro-line);
}
.header .top-menu ul li a { opacity: .8; letter-spacing: .03em; }
.header .top-menu ul li:hover > a,
.header .top-menu ul li.current-menu-item > a { opacity: 1; }
@media (max-width: 1199px) {
	.header { padding: 22px 24px; }
	.header.fixed { padding-top: 16px; padding-bottom: 16px; }
}
.footer { border-top: 1px solid var(--astro-line); }
.footer .copy, .footer .copy p, .follow-label { color: var(--astro-muted); }

/* Preloader mais discreto */
.preloader { background: var(--astro-bg); }

/* =========================================================
   4. Elementor: estrutura (secções, hero, grelhas)
   ========================================================= */
.astro-section { position: relative; }
.astro-section--stats {
	border-block: 1px solid var(--astro-line);
	background: linear-gradient(90deg, transparent, rgba(90, 209, 255, .05), transparent);
}
.astro-section--quotes,
.astro-section--crew { background: linear-gradient(180deg, transparent, rgba(11, 16, 32, .7), transparent); }

/* Hero (home e páginas) */
.astro-hero { position: relative; isolation: isolate; overflow: hidden; background-color: var(--astro-bg); }
.astro-hero::after {
	content: ""; position: absolute; inset: 0; z-index: 0; pointer-events: none;
	background:
		var(--astro-grain),
		linear-gradient(0deg, var(--astro-bg) 0%, rgba(5,7,13,0) 30%),
		linear-gradient(90deg, rgba(5,7,13,.88) 0%, rgba(5,7,13,.55) 45%, rgba(5,7,13,.05) 100%);
}
.astro-hero > .e-con-inner,
.astro-hero > .elementor-widget,
.astro-hero > .e-con { position: relative; z-index: 1; }
.astro-hero--page::after {
	background:
		var(--astro-grain),
		linear-gradient(0deg, var(--astro-bg) 0%, rgba(5,7,13,.2) 45%, rgba(5,7,13,.55) 100%);
}
.astro-btnrow { margin-top: 10px; }
.astro-scrollcue { margin-top: clamp(24px, 6vh, 64px); }
.astro-scrollcue .elementor-heading-title {
	display: inline-flex; align-items: center; gap: 14px;
	font: 500 .72rem/1 var(--astro-font-body); letter-spacing: .3em; text-transform: uppercase;
	color: rgba(255,255,255,.75);
}
.astro-scrollcue .elementor-heading-title::after {
	content: ""; width: 1px; height: 46px;
	background: linear-gradient(var(--astro-accent), transparent);
	animation: astro-cue 2.2s ease-in-out infinite; transform-origin: top;
}
@keyframes astro-cue { 0%,100% { transform: scaleY(.3); opacity: .4; } 50% { transform: scaleY(1); opacity: 1; } }

/* CTA final */
.astro-cta { position: relative; isolation: isolate; text-align: center; }
.astro-cta::after {
	content: ""; position: absolute; inset: 0; z-index: -1; pointer-events: none;
	background: var(--astro-grain), radial-gradient(ellipse at center, rgba(5,7,13,.55), rgba(5,7,13,.92) 80%);
}

/* Grelhas (substituem colunas: responsivas sem esforço) */
.astro-grid { display: grid !important; gap: 24px; grid-template-columns: repeat(var(--cols, 3), minmax(0, 1fr)); align-items: stretch; }
.astro-cols-2 { --cols: 2; } .astro-cols-3 { --cols: 3; } .astro-cols-4 { --cols: 4; }
.astro-grid > .elementor-widget { margin: 0 !important; width: auto !important; max-width: none; }
@media (max-width: 1024px) { .astro-cols-4 { --cols: 2; } }
@media (max-width: 900px)  { .astro-cols-3 { --cols: 1; } .astro-cols-2 { --cols: 1; } }
@media (max-width: 640px)  { .astro-cols-4 { --cols: 1; } .astro-grid { gap: 18px; } .astro-section--stats .astro-cols-4 { --cols: 2; } }

/* Duas colunas texto + imagem */
.astro-split { display: grid !important; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: clamp(32px, 6vw, 90px); align-items: center; width: 100%; }
.astro-split__col { min-width: 0; }
@media (max-width: 1024px) { .astro-split { grid-template-columns: 1fr; gap: 36px; } }

/* Cabeçalhos de secção */
.astro-head { margin-bottom: clamp(18px, 3vw, 36px); }
.astro-head--center { align-items: center; text-align: center; }
.astro-head--center .astro-lead { margin-inline: auto; }

/* =========================================================
   5. Elementor: tipografia
   ========================================================= */
.astro-kicker .elementor-heading-title {
	display: inline-flex; align-items: center; gap: 14px; margin: 0;
	font: 600 .78rem/1.2 var(--astro-font-body); letter-spacing: .28em; text-transform: uppercase;
	color: var(--astro-accent);
}
.astro-kicker .elementor-heading-title::before { content: ""; width: 36px; height: 1px; background: currentColor; }
.astro-head--center .astro-kicker .elementor-heading-title::after { content: ""; width: 36px; height: 1px; background: currentColor; }
.astro-title .elementor-heading-title { font-size: clamp(1.9rem, 4.2vw, 3.2rem); font-weight: 700; letter-spacing: -.01em; margin: 0; }
.astro-title--hero .elementor-heading-title {
	font-size: clamp(2.5rem, 7.2vw, 5.6rem); font-weight: 700; line-height: 1.02;
	text-transform: uppercase; letter-spacing: -.005em; max-width: 14ch;
	text-shadow: 0 6px 40px rgba(0,0,0,.55);
}
.astro-title--page .elementor-heading-title { font-size: clamp(2.3rem, 6vw, 4.4rem); line-height: 1.05; }
.astro-title--cta .elementor-heading-title { font-size: clamp(2rem, 5vw, 3.6rem); }
.astro-lead, .astro-lead p { font-size: clamp(1.05rem, 1.6vw, 1.25rem); line-height: 1.7; color: var(--astro-text); max-width: 60ch; margin: 0; }
.astro-lead--hero, .astro-lead--hero p { color: #e4eaf6; max-width: 52ch; }
.astro-text p { font-size: 1.0625rem; line-height: 1.8; margin: 0 0 1em; max-width: 62ch; }
.astro-text p:last-child { margin-bottom: 0; }
.elementor-widget-text-editor { color: var(--astro-text); }

/* Botões */
.elementor-widget-button.astro-btn .elementor-button {
	font-family: var(--astro-font-body); font-weight: 600; font-size: .8rem; letter-spacing: .12em; text-transform: uppercase;
	padding: 17px 32px; border-radius: 999px; line-height: 1.2;
	transition: transform .4s var(--astro-ease), box-shadow .4s var(--astro-ease), background .3s, color .3s, border-color .3s;
}
.elementor-widget-button.astro-btn--primary .elementor-button { background: var(--astro-accent); color: #0a0c12; border: 1px solid var(--astro-accent); box-shadow: 0 10px 34px -10px rgba(255,122,61,.7); }
.elementor-widget-button.astro-btn--primary .elementor-button:hover { background: #fff; border-color: #fff; color: #0a0c12; transform: translateY(-3px); }
.elementor-widget-button.astro-btn--ghost .elementor-button { background: rgba(255,255,255,.04); color: #fff; border: 1px solid rgba(255,255,255,.35); -webkit-backdrop-filter: blur(6px); backdrop-filter: blur(6px); }
.elementor-widget-button.astro-btn--ghost .elementor-button:hover { border-color: var(--astro-accent); color: var(--astro-accent); transform: translateY(-3px); }
.elementor-widget-button.astro-btn .elementor-button-icon { transition: transform .4s var(--astro-ease); }
.elementor-widget-button.astro-btn .elementor-button:hover .elementor-button-icon { transform: translateX(4px); }

/* Listas com ícone */
.astro-list .elementor-icon-list-item { align-items: flex-start; }
.astro-list .elementor-icon-list-icon i { color: var(--astro-accent); font-size: 1rem; margin-top: .35em; }
.astro-list .elementor-icon-list-text { color: var(--astro-text); font-size: 1.02rem; line-height: 1.6; padding-left: 12px; }
.astro-list--contact .elementor-icon-list-item { padding: 12px 0; border-bottom: 1px solid var(--astro-line); }
.astro-list--contact .elementor-icon-list-text { color: #fff; font-size: 1.1rem; }

/* =========================================================
   6. Elementor: cartões e componentes
   ========================================================= */
.astro-card {
	position: relative; height: 100%;
	background: var(--astro-card); border: 1px solid var(--astro-line); border-radius: var(--astro-radius);
	padding: 32px 28px;
	-webkit-backdrop-filter: blur(10px); backdrop-filter: blur(10px);
	transition: transform .5s var(--astro-ease), border-color .5s, box-shadow .5s;
}
.astro-card:hover { transform: translateY(-6px); border-color: rgba(255,122,61,.5); box-shadow: 0 24px 60px -24px rgba(255,122,61,.35); }
.astro-card .elementor-icon-box-wrapper { text-align: left !important; display: block; }
.astro-card .elementor-icon-box-icon { margin: 0 0 20px !important; display: block; }
.astro-card .elementor-icon-box-icon .elementor-icon {
	display: grid; place-items: center; width: 58px; height: 58px; border-radius: 16px;
	font-size: 1.5rem; color: var(--astro-accent); background: rgba(255,122,61,.1);
}
.astro-card .elementor-icon-box-icon .elementor-icon svg { fill: var(--astro-accent); width: 1em; height: 1em; }
.astro-card .elementor-icon-box-title, .astro-card .elementor-image-box-title { font-size: 1.25rem; font-weight: 600; margin: 0 0 8px; color: #fff; }
.astro-card .elementor-icon-box-description, .astro-card .elementor-image-box-description { color: var(--astro-text); font-size: 1rem; line-height: 1.65; margin: 0; }

/* Tripulação */
.astro-card--crew { padding: 0; overflow: hidden; }
.astro-card--crew .elementor-image-box-wrapper { text-align: left !important; display: block; }
.astro-card--crew .elementor-image-box-img { margin: 0 !important; width: 100% !important; display: block; overflow: hidden; }
.astro-card--crew .elementor-image-box-img img { width: 100%; aspect-ratio: 1 / 1; object-fit: cover; display: block; transition: transform 1s var(--astro-ease); }
.astro-card--crew:hover .elementor-image-box-img img { transform: scale(1.06); }
.astro-card--crew .elementor-image-box-content { padding: 22px 24px 26px; }

/* Números */
.astro-counter { text-align: center; padding: 8px 12px; }
.astro-counter .elementor-counter-number-wrapper { font: 700 clamp(2.6rem, 5vw, 4rem)/1.1 var(--astro-font-display); color: #fff; text-shadow: 0 0 40px rgba(90,209,255,.35); justify-content: center; }
.astro-counter .elementor-counter-title { margin-top: 8px; font: 500 .8rem/1.4 var(--astro-font-body); letter-spacing: .2em; text-transform: uppercase; color: var(--astro-accent-2); text-align: center; }

/* Testemunhos */
.astro-quote { padding: 36px 30px; }
.astro-quote::before { content: "\201C"; position: absolute; top: 14px; right: 26px; font: 700 5.5rem/1 var(--astro-font-display); color: rgba(255,122,61,.25); pointer-events: none; }
.astro-quote .elementor-testimonial-content { font-size: 1.1rem; line-height: 1.7; color: #e6ebf5; margin-bottom: 20px; }
.astro-quote .elementor-testimonial-name { color: #fff; font-weight: 600; }
.astro-quote .elementor-testimonial-job { color: var(--astro-muted); font-size: .9rem; }

/* Fotografias */
.astro-photo img { width: 100%; border-radius: var(--astro-radius); box-shadow: 0 40px 90px -30px rgba(0,0,0,.9), 0 0 0 1px rgba(255,255,255,.08); }
@keyframes astro-float { 0%,100% { transform: translateY(0); } 50% { transform: translateY(-14px); } }
.astro-photo--float { animation: astro-float 9s ease-in-out infinite; }

/* Galeria */
.astro-gallery .elementor-image-gallery .gallery { display: grid; grid-template-columns: repeat(var(--g, 3), minmax(0, 1fr)); gap: 16px; }
.astro-gallery .elementor-image-gallery .gallery-columns-1 { --g: 1; } .astro-gallery .elementor-image-gallery .gallery-columns-2 { --g: 2; }
.astro-gallery .elementor-image-gallery .gallery-columns-3 { --g: 3; } .astro-gallery .elementor-image-gallery .gallery-columns-4 { --g: 4; }
.astro-gallery .elementor-image-gallery .gallery-columns-5 { --g: 5; } .astro-gallery .elementor-image-gallery .gallery-columns-6 { --g: 6; }
.astro-gallery .elementor-image-gallery .gallery-item { max-width: none !important; width: auto !important; margin: 0 !important; padding: 0 !important; float: none !important; }
.astro-gallery .elementor-image-gallery .gallery-icon { margin: 0; }
.astro-gallery .elementor-image-gallery .gallery-icon a { position: relative; display: block; overflow: hidden; border-radius: 14px; border: 1px solid var(--astro-line); }
.astro-gallery .elementor-image-gallery .gallery-icon a::after { content: ""; position: absolute; inset: 0; background: linear-gradient(0deg, rgba(5,7,13,.55), transparent 50%); opacity: 0; transition: opacity .5s; }
.astro-gallery .elementor-image-gallery .gallery-icon a:hover::after { opacity: 1; }
.astro-gallery .elementor-image-gallery .gallery-icon img { width: 100%; aspect-ratio: 3 / 2; object-fit: cover; display: block; transition: transform 1.2s var(--astro-ease); }
.astro-gallery .elementor-image-gallery .gallery-icon a:hover img { transform: scale(1.07); }
@media (max-width: 1024px) { .astro-gallery .elementor-image-gallery .gallery { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 600px)  { .astro-gallery .elementor-image-gallery .gallery { grid-template-columns: 1fr; } }

/* Redes sociais */
.astro-social .elementor-social-icon { background: rgba(255,255,255,.06) !important; border: 1px solid var(--astro-line); transition: background .3s, transform .3s; }
.astro-social .elementor-social-icon:hover { background: var(--astro-accent) !important; transform: translateY(-3px); }
.astro-social .elementor-social-icon:hover i { color: #0a0c12; }

/* Formulário (Contact Form 7) */
.astro-card--form { padding: clamp(24px, 4vw, 44px); }
.astro-card--form:hover { transform: none; border-color: var(--astro-line); box-shadow: none; }
.astro-form .wpcf7 p { margin: 0 0 18px; }
.astro-form .wpcf7 label { display: block; font-size: .78rem; font-weight: 600; letter-spacing: .14em; text-transform: uppercase; color: var(--astro-muted); }
.astro-form .wpcf7 input[type="text"], .astro-form .wpcf7 input[type="email"], .astro-form .wpcf7 input[type="tel"],
.astro-form .wpcf7 select, .astro-form .wpcf7 textarea {
	display: block; width: 100%; margin-top: 8px; padding: 15px 18px; color: #fff; font: 400 1rem/1.5 var(--astro-font-body);
	background: rgba(255,255,255,.04); border: 1px solid rgba(255,255,255,.16); border-radius: 12px;
	transition: border-color .3s, box-shadow .3s, background .3s;
}
.astro-form .wpcf7 textarea { min-height: 160px; resize: vertical; }
.astro-form .wpcf7 input:focus, .astro-form .wpcf7 textarea:focus, .astro-form .wpcf7 select:focus { outline: none; border-color: var(--astro-accent-2); box-shadow: 0 0 0 3px rgba(90,209,255,.2); background: rgba(255,255,255,.07); }
.astro-form .wpcf7 ::placeholder { color: #707b92; }
.astro-form .wpcf7 input[type="submit"], .astro-form .wpcf7-submit {
	cursor: pointer; padding: 17px 36px; border: 0; border-radius: 999px; background: var(--astro-accent); color: #0a0c12;
	font: 700 .8rem/1.2 var(--astro-font-body); letter-spacing: .12em; text-transform: uppercase; transition: transform .4s var(--astro-ease), background .3s;
}
.astro-form .wpcf7 input[type="submit"]:hover { background: #fff; color: #0a0c12; transform: translateY(-3px); }
.astro-form .wpcf7-not-valid-tip { color: #ff9a8a; font-size: .85rem; margin-top: 6px; }
.astro-form .wpcf7 form .wpcf7-response-output { margin: 18px 0 0; padding: 14px 18px; border-radius: 12px; border: 1px solid var(--astro-line); color: #fff; }

/* Artigos do blog (tema pai): leitura confortável */
.single-post-text, .single-post-text p { font-size: 1.0625rem; line-height: 1.85; }
.single-post-text p { max-width: 70ch; }

/* =========================================================
   7. Animações de entrada (JS adiciona .is-in)
   ========================================================= */
.astro-ready .astro-reveal { opacity: 0; transform: translateY(28px); transition: opacity .9s var(--astro-ease), transform .9s var(--astro-ease); transition-delay: var(--d, 0s); }
.astro-ready .astro-reveal.is-in { opacity: 1; transform: none; }
.astro-ready .astro-card.astro-reveal.is-in { transition: transform .5s var(--astro-ease), border-color .5s, box-shadow .5s, opacity .9s var(--astro-ease); transition-delay: 0s; }
/* No editor do Elementor tudo fica visível e estático */
body.elementor-editor-active .astro-reveal,
body.elementor-editor-preview .astro-reveal { opacity: 1 !important; transform: none !important; }
body.elementor-editor-active #astro-stars, body.elementor-editor-active .astro-photo--float { display: none; animation: none; }

@media (prefers-reduced-motion: reduce) {
	html { scroll-behavior: auto; }
	*, *::before, *::after { animation: none !important; transition-duration: .01ms !important; }
	.astro-ready .astro-reveal { opacity: 1; transform: none; }
}

/* =========================================================
   8. Afinações de ecrãs pequenos
   ========================================================= */
@media (max-width: 767px) {
	body { font-size: 16.5px; }
	.astro-btnrow { flex-direction: column; align-items: stretch; }
	.astro-btnrow .elementor-widget-button { width: 100%; }
	.astro-btnrow .elementor-button { width: 100%; justify-content: center; }
	.astro-card { padding: 26px 22px; }
	.astro-title--hero .elementor-heading-title { max-width: 100%; }
}

/* Âncoras (ex.: botão "Explorar a missão") não ficam escondidas debaixo do cabeçalho */ [id].astro-section,[id].astro-hero{scroll-margin-top:70px}.astro-form .wpcf7 label br{display:none}