/* =========================================================
   Receitas Saborosas — Estilos Personalizados
   Criado e desenvolvido por Pedro Correia Lopes Filho
   ========================================================= */

/* CSS Custom Properties */
:root {
  --gourmet-black: #0d0d0d;
  --gourmet-charcoal: #1a1a1a;
  --gourmet-gold: #c9a227;
  --gourmet-gold-light: #e5c558;
  --gourmet-wine: #722f37;
  --gourmet-wine-dark: #4a1c22;
  --gourmet-cream: #faf8f3;
  --gourmet-red: #c41e3a;
  --gourmet-yellow: #f4b41b;
  --font-serif: 'Cormorant Garamond', serif;
  --font-sans: 'Montserrat', sans-serif;
}

/* Reset e base */
*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  font-family: var(--font-sans);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-serif);
}

/* Botões premium */
.btn-primary {
  background: linear-gradient(135deg, var(--gourmet-gold) 0%, var(--gourmet-gold-light) 50%, var(--gourmet-gold) 100%);
  background-size: 200% 200%;
  box-shadow: 0 4px 15px rgba(201, 162, 39, 0.3);
  transition: all 0.3s ease;
  position: relative;
  overflow: hidden;
}

.btn-primary:hover {
  background-position: 100% 0;
  transform: translateY(-2px);
  box-shadow: 0 8px 25px rgba(201, 162, 39, 0.4);
}

.btn-primary:active {
  transform: translateY(0);
}

.btn-secondary {
  transition: all 0.3s ease;
}

.btn-secondary:hover {
  background: rgba(201, 162, 39, 0.1);
  transform: translateY(-2px);
}

/* Header scroll effect */
#header.scrolled {
  background: rgba(13, 13, 13, 0.98);
  box-shadow: 0 4px 30px rgba(0, 0, 0, 0.3);
}

/* Navigation underline effect */
.nav-link {
  position: relative;
}

.nav-link::after {
  content: '';
  position: absolute;
  bottom: -4px;
  left: 0;
  width: 0;
  height: 2px;
  background: linear-gradient(90deg, var(--gourmet-gold), var(--gourmet-gold-light));
  transition: width 0.3s ease;
}

.nav-link:hover::after {
  width: 100%;
}

/* Hero parallax fallback */
#home .bg-fixed {
  will-change: transform;
}

/* Service cards shine effect */
.service-card {
  position: relative;
  transition: all 0.3s ease;
}

.service-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.05), transparent);
  transition: left 0.5s ease;
  pointer-events: none;
}

.service-card:hover::before {
  left: 100%;
}

/* Testimonial dots */
.testimonial-dot {
  transition: all 0.3s ease;
}

.testimonial-dot.active {
  background: var(--gourmet-gold) !important;
  width: 24px;
}

/* FAQ accordion */
.faq-question[aria-expanded="true"] .fa-chevron-down {
  transform: rotate(180deg);
}

.faq-question[aria-expanded="true"] {
  color: var(--gourmet-wine);
}

/* Form inputs focus states */
input:focus,
textarea:focus,
select:focus {
  box-shadow: 0 0 0 3px rgba(201, 162, 39, 0.1);
}

/* Range input custom styling */
input[type="range"] {
  -webkit-appearance: none;
  appearance: none;
  height: 8px;
  border-radius: 4px;
  background: rgba(201, 162, 39, 0.2);
  outline: none;
}

input[type="range"]::-webkit-slider-thumb {
  -webkit-appearance: none;
  appearance: none;
  width: 24px;
  height: 24px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--gourmet-gold), var(--gourmet-gold-light));
  cursor: pointer;
  box-shadow: 0 2px 10px rgba(201, 162, 39, 0.4);
  border: 2px solid white;
}

input[type="range"]::-moz-range-thumb {
  width: 24px;
  height: 24px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--gourmet-gold), var(--gourmet-gold-light));
  cursor: pointer;
  border: 2px solid white;
  box-shadow: 0 2px 10px rgba(201, 162, 39, 0.4);
}

/* Radio card selection */
input[type="radio"]:checked + div {
  border-color: var(--gourmet-gold);
  background: rgba(201, 162, 39, 0.05);
}

/* WhatsApp pulse animation */
@keyframes pulse-slow {
  0%, 100% {
    box-shadow: 0 4px 15px rgba(37, 211, 102, 0.4);
  }
  50% {
    box-shadow: 0 4px 30px rgba(37, 211, 102, 0.7);
  }
}

.animate-pulse-slow {
  animation: pulse-slow 2s infinite;
}

/* Toast animation */
#toast {
  transition: all 0.3s ease;
  transform: translateY(20px);
  opacity: 0;
}

#toast.show {
  transform: translateY(0);
  opacity: 1;
}

/* Mobile menu animation */
#mobile-menu {
  transition: all 0.3s ease;
}

#mobile-menu:not(.hidden) {
  animation: slideDown 0.3s ease;
}

@keyframes slideDown {
  from {
    opacity: 0;
    transform: translateY(-10px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* Blog filters */
.blog-filter.active {
  background: var(--gourmet-gold);
  color: var(--gourmet-black);
}

/* Scroll reveal optimization */
[data-aos] {
  pointer-events: none;
}

[data-aos].aos-animate {
  pointer-events: auto;
}

/* Acessibilidade: reduced motion */
@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }

  .animate-pulse-slow,
  .animate-bounce {
    animation: none !important;
  }
}

/* Responsividade extra */
@media (max-width: 640px) {
  .font-serif.text-4xl {
    font-size: 2.25rem;
    line-height: 1.2;
  }

  .font-serif.text-5xl {
    font-size: 2.5rem;
    line-height: 1.2;
  }
}

/* Print styles */
@media print {
  #header,
  #mobile-menu,
  .fixed,
  #video-modal,
  #toast {
    display: none !important;
  }

  body {
    background: white !important;
    color: black !important;
  }

  a {
    text-decoration: none;
    color: black !important;
  }

  section {
    page-break-inside: avoid;
  }
}

/* High contrast mode support */
@media (prefers-contrast: high) {
  .btn-primary,
  .btn-secondary {
    border: 2px solid currentColor;
  }

  .nav-link::after {
    height: 3px;
  }
}

/* Focus visible for keyboard navigation */
:focus-visible {
  outline: 3px solid var(--gourmet-gold);
  outline-offset: 2px;
}

/* Selection color */
::selection {
  background: var(--gourmet-gold);
  color: var(--gourmet-black);
}

/* Scrollbar styling */
::-webkit-scrollbar {
  width: 10px;
}

::-webkit-scrollbar-track {
  background: var(--gourmet-charcoal);
}

::-webkit-scrollbar-thumb {
  background: var(--gourmet-gold);
  border-radius: 5px;
}

::-webkit-scrollbar-thumb:hover {
  background: var(--gourmet-gold-light);
}

/* Lazy load image blur effect */
img[loading="lazy"] {
  transition: opacity 0.3s ease;
}

img[loading="lazy"].loaded {
  opacity: 1;
}

/* Smooth card hover lift */
.service-card,
.case-card,
.blog-card {
  transition: transform 0.3s ease, box-shadow 0.3s ease, border-color 0.3s ease;
}

.service-card:hover,
.case-card:hover,
.blog-card:hover {
  transform: translateY(-8px);
}

/* Gradient text utility */
.text-gradient-gold {
  background: linear-gradient(135deg, var(--gourmet-gold), var(--gourmet-gold-light));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

/* Wine accent cards */
.wine-accent {
  border-left: 4px solid var(--gourmet-wine);
}

/* Gold accent cards */
.gold-accent {
  border-left: 4px solid var(--gourmet-gold);
}

/* Loading state for buttons */
button.is-loading {
  position: relative;
  color: transparent !important;
}

button.is-loading::after {
  content: '';
  position: absolute;
  width: 20px;
  height: 20px;
  top: 50%;
  left: 50%;
  margin-left: -10px;
  margin-top: -10px;
  border: 2px solid transparent;
  border-top-color: currentColor;
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
  color: var(--gourmet-black);
}

@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}

/* Image overlay gradient for text readability */
.image-overlay {
  position: relative;
}

.image-overlay::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(to top, rgba(13, 13, 13, 0.7), transparent);
  pointer-events: none;
}

/* Container improvements */
.container {
  max-width: 1280px;
}

/* Hero subtitle gradient */
.hero-subtitle {
  background: linear-gradient(90deg, var(--gourmet-gold), var(--gourmet-gold-light));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

/* Section divider */
.section-divider {
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--gourmet-gold), transparent);
}

/* Trust badges */
.trust-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.5rem 1rem;
  border-radius: 9999px;
  background: rgba(201, 162, 39, 0.1);
  border: 1px solid rgba(201, 162, 39, 0.3);
}

/* Form validation styles */
input:invalid:not(:placeholder-shown),
textarea:invalid:not(:placeholder-shown) {
  border-color: var(--gourmet-red);
}

input:valid:not(:placeholder-shown),
textarea:valid:not(:placeholder-shown) {
  border-color: #22c55e;
}

/* Accessibility: skip link */
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

/* Smooth fade for modal */
#video-modal {
  transition: opacity 0.3s ease;
  opacity: 0;
}

#video-modal:not(.hidden) {
  opacity: 1;
}

/* Custom video play button */
#play-video-btn {
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

#play-video-btn:hover {
  transform: scale(1.1);
  box-shadow: 0 0 30px rgba(201, 162, 39, 0.5);
}

/* Blog search focus */
#blog-search:focus {
  box-shadow: 0 0 0 3px rgba(201, 162, 39, 0.15);
}

/* Newsletter form mobile */
#newsletter-form {
  display: flex;
  flex-direction: column;
}

@media (min-width: 640px) {
  #newsletter-form {
    flex-direction: row;
  }
}

/* Footer social hover */
footer a[aria-label]:hover {
  transform: translateY(-3px);
}

/* Mobile optimization for hero */
@media (max-width: 768px) {
  #home {
    background-attachment: scroll;
  }

  #home .bg-fixed {
    background-attachment: scroll;
  }
}

/* Calc results highlight */
#calc-total {
  text-shadow: 0 2px 10px rgba(201, 162, 39, 0.3);
}

/* Contact info cards hover */
#contato .bg-gourmet-black a,
#contato .bg-gourmet-black > div > div {
  transition: all 0.3s ease;
}

#contato .bg-gourmet-black > div > div:hover {
  background: rgba(255, 255, 255, 0.08);
}

/* CTA final parallax */
section:has(.bg-cover) {
  background-attachment: fixed;
}
