/**
 * Frost — Ideias e Desafios
 * Custom CSS for animations and special components
 */

/* Google Font for stats display numbers */
@import url('https://fonts.googleapis.com/css2?family=DM+Serif+Display&display=swap');

/* ============================================
   Hero Cinematic Styles
   ============================================ */
.hero-cinematic {
	position: relative;
	overflow: hidden;
	min-height: 560px;
}
.hero-cinematic::before {
	content: '';
	position: absolute;
	top: 0; right: 0; bottom: 0;
	width: 55%;
	background: url('https://images.unsplash.com/photo-1552664730-d307ca884978?w=1200&h=800&fit=crop') center/cover no-repeat;
	opacity: 0.18;
	mask-image: linear-gradient(to left, rgba(0,0,0,0.7), transparent 85%);
	-webkit-mask-image: linear-gradient(to left, rgba(0,0,0,0.7), transparent 85%);
}
.hero-cinematic::after {
	content: '';
	position: absolute;
	bottom: -2px;
	left: 0; right: 0;
	height: 80px;
	background: linear-gradient(to top, var(--wp--preset--color--base, #fff), transparent);
	pointer-events: none;
}

.hero-badge {
	display: inline-flex;
	align-items: center;
	gap: 6px;
	background: rgba(0,143,194,0.15);
	color: #7DD3FC;
	padding: 6px 16px;
	border-radius: 50px;
	font-weight: 500;
	border: 1px solid rgba(0,143,194,0.25);
	margin: 0;
}

.hero-author-image figure,
.hero-author-image img {
	border-radius: 16px !important;
	box-shadow: 0 20px 60px rgba(0,0,0,0.3);
}

.hero-author-card {
	background: rgba(255,255,255,0.08);
	backdrop-filter: blur(10px);
	-webkit-backdrop-filter: blur(10px);
	border: 1px solid rgba(255,255,255,0.1);
	margin-top: calc(-1 * var(--wp--preset--spacing--30, 1rem));
	position: relative;
	z-index: 2;
}

/* Accent hero button hover */
.btn-accent-hero .wp-block-button__link:hover {
	background-color: #E8900A !important;
	transform: translateY(-2px);
	box-shadow: 0 8px 24px rgba(245,158,11,0.35);
}
.btn-outline-hero .wp-block-button__link {
	border-color: rgba(255,255,255,0.3) !important;
}
.btn-outline-hero .wp-block-button__link:hover {
	border-color: rgba(255,255,255,0.6) !important;
	background: rgba(255,255,255,0.06) !important;
}

/* ============================================
   Client Logo Marquee Animation
   ============================================ */
.logo-marquee-wrapper {
	overflow: hidden;
	position: relative;
}
.logo-marquee-wrapper::before,
.logo-marquee-wrapper::after {
	content: '';
	position: absolute;
	top: 0;
	bottom: 0;
	width: 100px;
	z-index: 2;
	pointer-events: none;
}
.logo-marquee-wrapper::before {
	left: 0;
	background: linear-gradient(to right, var(--wp--preset--color--base, #fff), transparent);
}
.logo-marquee-wrapper::after {
	right: 0;
	background: linear-gradient(to left, var(--wp--preset--color--base, #fff), transparent);
}

@keyframes marquee-scroll {
	0% { transform: translateX(0); }
	100% { transform: translateX(-50%); }
}
.logo-marquee-track {
	display: flex;
	gap: 3rem;
	align-items: center;
	animation: marquee-scroll 30s linear infinite;
	width: max-content;
}
.logo-marquee-track:hover {
	animation-play-state: paused;
}
.logo-marquee-track img {
	height: 45px;
	width: auto;
	object-fit: contain;
	filter: grayscale(100%);
	opacity: 0.6;
	transition: all 0.3s ease;
}
.logo-marquee-track img:hover {
	filter: grayscale(0%);
	opacity: 1;
}

/* ============================================
   Service Cards
   ============================================ */
.service-card {
	transition: transform 0.3s ease, box-shadow 0.3s ease;
	border: 1px solid rgba(0,0,0,0.06);
}
.service-card:hover {
	transform: translateY(-5px);
	box-shadow: 0 12px 32px rgba(0,0,0,0.1);
}
.service-card a {
	text-decoration: none;
}

/* ============================================
   Testimonial Cards
   ============================================ */
.testimonial-card {
	transition: transform 0.3s ease, box-shadow 0.3s ease;
	box-shadow: 0 2px 12px rgba(0,0,0,0.06);
}
.testimonial-card:hover {
	transform: translateY(-3px);
	box-shadow: 0 8px 24px rgba(0,0,0,0.1);
}
.testimonial-stars {
	color: #f39c12;
	letter-spacing: 2px;
}

/* ============================================
   Blog Post Cards
   ============================================ */
.wp-block-post-template .wp-block-post {
	transition: transform 0.2s ease, box-shadow 0.2s ease;
	border-radius: 12px;
	overflow: hidden;
}
.wp-block-post-template .wp-block-post:hover {
	transform: translateY(-3px);
	box-shadow: 0 8px 24px rgba(0,0,0,0.08);
}
.wp-block-post-featured-image img {
	transition: transform 0.3s ease;
}
.wp-block-post:hover .wp-block-post-featured-image img {
	transform: scale(1.03);
}

/* ============================================
   Course Cards
   ============================================ */
.course-card {
	position: relative;
	overflow: hidden;
	border-radius: 12px;
	transition: transform 0.3s ease, box-shadow 0.3s ease;
	border: 1px solid rgba(0,0,0,0.06);
}
.course-card:hover {
	transform: translateY(-5px);
	box-shadow: 0 12px 32px rgba(0,0,0,0.1);
}
.course-card .badge {
	position: absolute;
	top: 1rem;
	left: 1rem;
	background: var(--wp--preset--color--primary);
	color: var(--wp--preset--color--base);
	padding: 0.25rem 0.75rem;
	border-radius: 4px;
	font-size: 0.75rem;
	font-weight: 600;
	z-index: 1;
}

/* ============================================
   Header Styles
   ============================================ */
.site-header {
	position: sticky;
	top: 0;
	z-index: 100;
	backdrop-filter: blur(10px);
	-webkit-backdrop-filter: blur(10px);
	background: rgba(255, 255, 255, 0.95) !important;
	border-bottom: 1px solid rgba(0,0,0,0.06);
	box-shadow: 0 1px 4px rgba(0,0,0,0.04);
}

/* Logo size — bigger */
.wp-block-site-logo {
	flex-shrink: 0;
}
.wp-block-site-logo a {
	display: inline-block;
}
.wp-block-site-logo img,
.site-header .custom-logo {
	width: 260px !important;
	height: auto !important;
	max-height: 78px !important;
	display: block !important;
}

/* ============================================
   Top Bar
   ============================================ */
.top-bar {
	font-size: 0.8rem;
}
.top-bar a {
	text-decoration: none;
	color: #fff !important;
	opacity: 0.9;
	transition: opacity 0.2s ease;
}
.top-bar a:hover {
	opacity: 1;
	color: var(--wp--preset--color--accent, #F59E0B) !important;
}

/* ============================================
   Navigation
   ============================================ */
.wp-block-navigation a {
	font-weight: 500 !important;
	transition: color 0.3s ease;
}
.wp-block-navigation a:hover {
	color: var(--wp--preset--color--primary, #008FC2) !important;
}

/* ============================================
   CTA Sections (dark gradient backgrounds)
   ============================================ */
.cta-section {
	position: relative;
	overflow: hidden;
}
.cta-section::before {
	content: '';
	position: absolute;
	top: -50%;
	right: -20%;
	width: 400px;
	height: 400px;
	border-radius: 50%;
	background: rgba(255,255,255,0.05);
	pointer-events: none;
}

/* ============================================
   Stats Row Enhancement
   ============================================ */
.wp-block-group.alignfull .wp-block-heading.has-primary-color {
	font-variant-numeric: tabular-nums;
}

/* ============================================
   General Button Enhancements
   ============================================ */
.wp-block-button__link {
	transition: all 0.3s ease !important;
}
.wp-block-button__link:hover {
	transform: translateY(-1px);
	box-shadow: 0 4px 12px rgba(0,0,0,0.15);
}

/* ============================================
   Responsive Adjustments
   ============================================ */
@media (max-width: 768px) {
	.logo-marquee-track img {
		height: 30px;
	}
	.logo-marquee-track {
		gap: 2rem;
	}
	.hero-cinematic {
		min-height: auto;
	}
	.hero-cinematic::before {
		width: 100%;
		opacity: 0.1;
	}
	.hero-cinematic h1 {
		font-size: 2rem !important;
	}
	.hero-author-image {
		display: none;
	}
	.hero-author-card {
		display: none;
	}
}

/* ============================================
   Smooth Scroll
   ============================================ */
html {
	scroll-behavior: smooth;
}

/* ============================================
   Focus Styles (Accessibility)
   ============================================ */
a:focus-visible,
button:focus-visible,
.wp-block-button__link:focus-visible {
	outline: 2px solid var(--wp--preset--color--primary);
	outline-offset: 2px;
}

/* ============================================
   Footer Links
   ============================================ */
.has-contrast-background-color a {
	color: rgba(255,255,255,0.75);
	text-decoration: none;
	transition: color 0.3s ease;
}
.has-contrast-background-color a:hover {
	color: var(--wp--preset--color--accent, #F59E0B);
}

/* ============================================
   Header Search Button (main nav — legacy)
   ============================================ */
.header-search-btn {
	background: none;
	border: 1px solid #E5E7EB;
	border-radius: 8px;
	padding: 8px 10px;
	cursor: pointer;
	color: var(--wp--preset--color--contrast, #1A2332);
	transition: all 0.3s ease;
	display: flex;
	align-items: center;
	justify-content: center;
	flex-shrink: 0;
}
.header-search-btn:hover {
	background: var(--wp--preset--color--primary, #008FC2);
	color: #fff;
	border-color: var(--wp--preset--color--primary, #008FC2);
}

/* ============================================
   Header CTA Link
   ============================================ */
.header-cta-link {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	background: var(--wp--preset--color--primary, #008FC2);
	color: #fff !important;
	padding: 7px 18px;
	border-radius: 6px;
	font-size: 0.8rem;
	font-weight: 600;
	text-decoration: none !important;
	white-space: nowrap;
	transition: all 0.3s ease;
	flex-shrink: 0;
}
.header-cta-link:hover {
	background: var(--wp--preset--color--secondary, #006D94);
	transform: translateY(-1px);
	box-shadow: 0 4px 12px rgba(0,143,194,0.3);
}

/* ============================================
   Newsletter Form Vertical
   ============================================ */
.id-newsletter-form {
	max-width: 400px !important;
	margin: 0 auto;
}
.id-newsletter-form .id-form-submit {
	width: 100%;
	margin-top: 4px;
}

/* ============================================
   Navigation Menu Styling
   ============================================ */
.wp-block-navigation .wp-block-navigation-item {
	position: relative;
}
.wp-block-navigation .wp-block-navigation-item__content {
	padding: 6px 10px !important;
	border-radius: 6px;
	transition: all 0.2s ease;
}
.wp-block-navigation .wp-block-navigation-item__content:hover {
	background: var(--wp--preset--color--light, #E8F4F8);
	color: var(--wp--preset--color--primary, #008FC2) !important;
}
.wp-block-navigation .wp-block-navigation-item + .wp-block-navigation-item::before {
	content: "";
	position: absolute;
	left: -2px;
	top: 50%;
	transform: translateY(-50%);
	height: 16px;
	width: 1px;
	background: #E5E7EB;
}

/* ============================================
   Top Bar Navigation (Artigos | Guias | Livros | Ferramentas)
   ============================================ */
.topbar-nav {
	display: inline-flex;
	align-items: center;
	gap: 0;
	font-size: 0.78rem;
	margin-right: 10px;
}
.topbar-nav a {
	color: #fff !important;
	text-decoration: none;
	padding: 2px 8px;
	opacity: 0.9;
	transition: opacity 0.2s ease;
}
.topbar-nav a:hover {
	opacity: 1;
	color: var(--wp--preset--color--accent, #F59E0B) !important;
}
.topbar-sep {
	color: rgba(255,255,255,0.35);
	font-size: 0.7rem;
	user-select: none;
}

/* Top bar search button */
.topbar-search-btn {
	background: none;
	border: 1px solid rgba(255,255,255,0.3);
	border-radius: 6px;
	padding: 4px 8px;
	cursor: pointer;
	color: #fff;
	transition: all 0.2s ease;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	vertical-align: middle;
	line-height: 1;
}
.topbar-search-btn:hover {
	background: rgba(255,255,255,0.15);
	border-color: rgba(255,255,255,0.5);
}

/* ============================================
   Header CTA Stack (Calendário on top, Fale Connosco below)
   ============================================ */
.header-cta-stack {
	display: flex;
	flex-direction: column;
	align-items: stretch;
	gap: 5px;
	flex-shrink: 0;
	min-width: 130px;
}
.header-cal-link {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	gap: 5px;
	color: var(--wp--preset--color--primary, #008FC2) !important;
	text-decoration: none !important;
	font-size: 0.78rem;
	font-weight: 600;
	padding: 5px 14px;
	border: 1.5px solid var(--wp--preset--color--primary, #008FC2);
	border-radius: 6px;
	white-space: nowrap;
	transition: all 0.3s ease;
}
.header-cal-link:hover {
	background: var(--wp--preset--color--light, #E8F4F8);
	transform: translateY(-1px);
}
.header-cal-link svg {
	flex-shrink: 0;
}

/* ============================================
   Stats Section (custom display font)
   ============================================ */
.stats-section .stat-number {
	font-family: 'DM Serif Display', Georgia, 'Times New Roman', serif;
	font-size: 2.8rem;
	font-weight: 400;
	color: var(--wp--preset--color--primary, #008FC2);
	line-height: 1.1;
	letter-spacing: -0.02em;
}

/* ============================================
   Mobile Responsive — Header & CTA
   ============================================ */
@media (max-width: 782px) {
	.topbar-nav { display: none; }
	.header-cal-link span { display: none; }
	.header-cal-link { padding: 5px 8px; justify-content: center; }
	.header-cta-stack { min-width: auto; gap: 4px; }
	.header-cta-link { padding: 5px 12px; font-size: 0.75rem; }
	.wp-block-site-logo img,
	.site-header .custom-logo {
		width: 180px !important;
		max-height: 56px !important;
	}
}

@media (max-width: 600px) {
	.stats-section .stat-number { font-size: 2.2rem; }
}

/* ============================================
   Blog Card Grid Spacing & Pagination
   ============================================ */
.wp-block-post-template.is-layout-grid {
	gap: 1.8rem !important;
}
.wp-block-query-pagination {
	margin-top: 2.5rem !important;
	gap: 6px;
}
.wp-block-query-pagination .page-numbers {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	min-width: 40px;
	height: 40px;
	padding: 0 10px;
	border-radius: 8px;
	font-weight: 600;
	font-size: 0.9rem;
	text-decoration: none;
	transition: all 0.2s ease;
	color: var(--wp--preset--color--contrast, #1A2332);
	border: 1px solid #E5E7EB;
}
.wp-block-query-pagination .page-numbers.current,
.wp-block-query-pagination .page-numbers:hover {
	background: var(--wp--preset--color--primary, #008FC2);
	color: #fff;
	border-color: var(--wp--preset--color--primary, #008FC2);
}
.wp-block-query-pagination-previous a,
.wp-block-query-pagination-next a {
	display: inline-flex;
	align-items: center;
	height: 40px;
	padding: 0 16px;
	border-radius: 8px;
	font-weight: 600;
	font-size: 0.85rem;
	text-decoration: none;
	border: 1px solid #E5E7EB;
	transition: all 0.2s ease;
}
.wp-block-query-pagination-previous a:hover,
.wp-block-query-pagination-next a:hover {
	background: var(--wp--preset--color--light, #E8F4F8);
	border-color: var(--wp--preset--color--primary, #008FC2);
}
