/*
Theme Name: FisioVital Blog
Theme URI: https://loja.fisiovital.com.br
Author: Anderson Luiz
Author URI: https://www.instagram.com/eusouandersonluiz/
Description: Tema WordPress para o blog da FisioVital — Conhecimento que cuida de você. Layout responsivo com animações de scroll, cards de posts, sidebar com índice e compartilhamento social.
Version: 1.0.0
License: GNU General Public License v2 or later
License URI: http://www.gnu.org/licenses/gpl-2.0.html
Text Domain: fisiovital
Tags: blog, one-column, custom-menu, featured-images, translation-ready
Requires at least: 6.0
Tested up to: 6.7
Requires PHP: 7.4
*/

/* ===========================
   CSS Custom Properties
   =========================== */
:root {
  --fv-primary: #008AC8;
  --fv-dark: #004B87;
  --fv-accent: #00A9E0;
  --fv-text-dark: #0D0D0D;
  --fv-text-gray: #787878;
  --fv-text-light: #5E5E5E;
  --fv-bg-gradient: rgba(0, 169, 224, 0.08);
  --fv-shadow-card: 0px 1px 35px rgba(0, 75, 135, 0.06);
  --fv-shadow-button: 0px 20px 44px -4px rgba(0, 75, 135, 0.09);
  --fv-radius-card: 28px;
  --fv-radius-regular: 17px;
  --fv-heading-color: #002C54;
}

/* ===========================
   Reset / Base
   =========================== */
*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

body {
  margin: 0;
  padding: 0;
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  color: var(--fv-text-dark);
  background: #fff;
  overflow-x: hidden;
}

a {
  text-decoration: none;
  color: inherit;
}

img {
  max-width: 100%;
  height: auto;
}

/* ===========================
   Animations
   =========================== */
@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes fadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

@keyframes scaleIn {
  from {
    opacity: 0;
    transform: scale(0.95);
  }
  to {
    opacity: 1;
    transform: scale(1);
  }
}

@keyframes slideInLeft {
  from { transform: translateX(-100%); }
  to { transform: translateX(0); }
}

@keyframes slideOutLeft {
  from { transform: translateX(0); }
  to { transform: translateX(-100%); }
}

@keyframes fadeInOverlay {
  from { opacity: 0; }
  to { opacity: 1; }
}

/* Scroll Animation Classes */
.animate-on-scroll {
  opacity: 0;
  transform: translateY(20px);
  transition: opacity 0.6s ease, transform 0.6s ease;
}

.animate-on-scroll.is-visible {
  opacity: 1;
  transform: translateY(0);
}

.animate-scale-on-scroll {
  opacity: 0;
  transform: scale(0.95);
  transition: opacity 0.5s ease, transform 0.5s ease;
}

.animate-scale-on-scroll.is-visible {
  opacity: 1;
  transform: scale(1);
}

/* Hero initial animations */
.hero-animate-tag {
  animation: fadeInUp 0.5s ease forwards;
}

.hero-animate-title {
  animation: fadeInUp 0.5s ease 0.1s forwards;
  opacity: 0;
}

.hero-animate-subtitle {
  animation: fadeInUp 0.5s ease 0.2s forwards;
  opacity: 0;
}

.hero-animate-cta {
  animation: scaleIn 0.5s ease 0.3s forwards;
  opacity: 0;
}

.hero-single-animate {
  animation: fadeInUp 0.6s ease 0.2s forwards;
  opacity: 0;
}

/* ===========================
   Hover Effects
   =========================== */
.card-image-zoom {
  overflow: hidden;
}

.card-image-zoom img {
  transition: transform 0.5s ease;
}

.card-image-zoom:hover img {
  transform: scale(1.05);
}

/* Nav underline hover */
.nav-link-underline {
  position: relative;
}

.nav-link-underline::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  width: 100%;
  height: 1px;
  background: var(--fv-primary);
  transform: scaleX(0);
  transition: transform 0.3s ease;
  transform-origin: left;
}

.nav-link-underline:hover::after {
  transform: scaleX(1);
}

/* ===========================
   WordPress Content (Prose)
   =========================== */
.fv-prose h2 {
  font-size: 1.875rem;
  font-weight: 700;
  color: var(--fv-dark);
  margin-bottom: 1.5rem;
  margin-top: 2.5rem;
  letter-spacing: -0.025em;
  scroll-margin-top: 6rem;
}

.fv-prose h3 {
  font-size: 1.5rem;
  font-weight: 600;
  color: var(--fv-dark);
  margin-bottom: 1.25rem;
  margin-top: 2rem;
  letter-spacing: -0.025em;
  scroll-margin-top: 6rem;
}

.fv-prose h4 {
  font-size: 1.125rem;
  font-weight: 600;
  color: var(--fv-dark);
  margin-bottom: 0.75rem;
  margin-top: 1.5rem;
}

.fv-prose p {
  font-size: 1.125rem;
  line-height: 1.75;
  color: #475569;
  margin-bottom: 1.5rem;
}

.fv-prose ul,
.fv-prose ol {
  margin-bottom: 1.5rem;
  padding-left: 1.5rem;
}

.fv-prose li {
  font-size: 1.125rem;
  line-height: 1.75;
  color: #475569;
  margin-bottom: 0.5rem;
}

.fv-prose blockquote {
  margin: 3rem 0;
  border-left: 4px solid var(--fv-primary);
  background: rgba(0, 138, 200, 0.04);
  padding: 1.5rem 2rem 1.5rem 2rem;
  border-radius: 0 1rem 1rem 0;
}

.fv-prose blockquote p {
  font-size: 1.5rem;
  font-weight: 500;
  color: var(--fv-dark);
  font-style: italic;
  line-height: 1.6;
  margin-bottom: 0;
}

.fv-prose a {
  color: var(--fv-primary);
  text-decoration: underline;
  transition: color 0.2s ease;
}

.fv-prose a:hover {
  color: var(--fv-accent);
}

.fv-prose img {
  border-radius: 1rem;
  margin: 2rem 0;
}

.fv-prose figure {
  margin: 2rem 0;
}

.fv-prose figcaption {
  text-align: center;
  font-size: 0.875rem;
  color: var(--fv-text-gray);
  margin-top: 0.5rem;
}

.fv-prose .wp-block-image {
  margin: 2rem 0;
}

.fv-prose .wp-block-image img {
  border-radius: 1rem;
}

.fv-prose .wp-block-quote {
  margin: 3rem 0;
  border-left: 4px solid var(--fv-primary);
  background: rgba(0, 138, 200, 0.04);
  padding: 1.5rem 2rem;
  border-radius: 0 1rem 1rem 0;
}

/* Info box style - for use with custom classes in editor */
.fv-info-box {
  background: rgba(0, 138, 200, 0.04);
  border-left: 4px solid var(--fv-primary);
  padding: 1.5rem;
  border-radius: 0 0.75rem 0.75rem 0;
  margin: 2rem 0;
}

.fv-info-box p {
  font-size: 1rem;
  font-weight: 500;
  color: var(--fv-dark);
  margin-bottom: 0;
}

/* Application grid cards in content */
.fv-app-card {
  background: #fff;
  border: 1px solid #dbeafe;
  border-radius: 1rem;
  padding: 1.5rem;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.05);
}

.fv-app-card h4 {
  font-size: 1.125rem;
  font-weight: 600;
  color: var(--fv-dark);
  margin-bottom: 0.75rem;
  margin-top: 0;
}

.fv-app-card p {
  color: #475569;
  font-size: 1rem;
  margin-bottom: 0;
}

/* Tip/step cards */
.fv-step-card {
  background: linear-gradient(to bottom right, #eff6ff, #fff);
  border: 1px solid #dbeafe;
  border-radius: 1rem;
  padding: 1.5rem;
}

.fv-step-card h4 {
  font-size: 1.25rem;
  font-weight: 600;
  color: var(--fv-dark);
  margin-bottom: 0.75rem;
  margin-top: 0;
}

.fv-step-card p {
  color: #475569;
  line-height: 1.75;
  margin-bottom: 0;
}

/* ===========================
   Broken Image Fallback
   =========================== */
img.broken-image-fallback {
  position: relative;
  display: inline-block;
  background: #f9fafb;
  border: 1px solid #e5e7eb;
  object-fit: none;
  object-position: center;
  animation: fadeIn 0.3s ease-in-out;
}

/* ===========================
   Mobile Menu
   =========================== */
.mobile-menu-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.3);
  z-index: 60;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s ease;
}

.mobile-menu-overlay.is-open {
  opacity: 1;
  pointer-events: all;
}

.mobile-menu-drawer {
  position: fixed;
  top: 0;
  left: 0;
  bottom: 0;
  width: 80%;
  max-width: 300px;
  background: #fff;
  z-index: 70;
  transform: translateX(-100%);
  transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  overflow-y: auto;
  box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.25);
}

.mobile-menu-drawer.is-open {
  transform: translateX(0);
}

body.mobile-menu-locked {
  overflow: hidden;
}

/* ===========================
   TOC Sidebar
   =========================== */
.toc-link {
  display: block;
  font-size: 0.875rem;
  color: #475569;
  transition: all 0.2s ease;
  padding: 0.25rem 0;
}

.toc-link:hover {
  color: var(--fv-primary);
}

.toc-link.is-active {
  color: var(--fv-primary);
  font-weight: 600;
}

.toc-link-level-2 {
  padding-left: 1rem;
}

/* ===========================
   Social Share Buttons
   =========================== */
.social-share-btn {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.625rem 1rem;
  background: #eff6ff;
  border-radius: 0.5rem;
  transition: background 0.2s ease;
  border: none;
  cursor: pointer;
  width: 100%;
  font-size: 0.875rem;
  font-weight: 500;
  color: var(--fv-dark);
}

.social-share-btn:hover {
  background: #dbeafe;
}

.social-share-btn svg {
  transition: transform 0.2s ease;
}

.social-share-btn:hover svg {
  transform: scale(1.1);
}

/* ===========================
   Pagination
   =========================== */
.fv-pagination {
  display: flex;
  justify-content: center;
  padding: 2rem 0;
}

.fv-pagination .nav-links {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.fv-pagination .page-numbers {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 2.5rem;
  height: 2.5rem;
  border-radius: 9999px;
  font-size: 0.875rem;
  font-weight: 500;
  color: var(--fv-text-light);
  transition: all 0.2s ease;
}

.fv-pagination .page-numbers:hover {
  background: #eff6ff;
  color: var(--fv-primary);
}

.fv-pagination .page-numbers.current {
  background: var(--fv-primary);
  color: #fff;
}

.fv-pagination .prev,
.fv-pagination .next {
  width: auto;
  padding: 0 1rem;
  color: var(--fv-primary);
  font-weight: 600;
}

/* ===========================
   WordPress Specific
   =========================== */
.screen-reader-text {
  clip: rect(1px, 1px, 1px, 1px);
  position: absolute !important;
  height: 1px;
  width: 1px;
  overflow: hidden;
  word-wrap: normal !important;
}

.alignleft {
  float: left;
  margin: 0 1.5rem 1.5rem 0;
}

.alignright {
  float: right;
  margin: 0 0 1.5rem 1.5rem;
}

.aligncenter {
  display: block;
  margin-left: auto;
  margin-right: auto;
}

.wp-caption {
  max-width: 100%;
}

.wp-caption-text {
  text-align: center;
  font-size: 0.875rem;
  color: var(--fv-text-gray);
  padding-top: 0.5rem;
}
