/* ==========================================================================
   Dias Fadel Contabilidade - Custom Styles
   ========================================================================== */

/* Root Variables */
:root {
  --primary: #1e3a5f;
  --secondary: #2c5f8d;
  --accent: #d4af37;
  --neutral: #f8f9fa;
  --transition: all 0.3s ease;
}

/* Base Styles */
* {
  scroll-behavior: smooth;
}

body {
  font-family: 'Inter', sans-serif;
  overflow-x: hidden;
}

/* Custom Scrollbar */
::-webkit-scrollbar {
  width: 12px;
}

::-webkit-scrollbar-track {
  background: #f1f1f1;
}

::-webkit-scrollbar-thumb {
  background: var(--primary);
  border-radius: 6px;
}

::-webkit-scrollbar-thumb:hover {
  background: var(--secondary);
}

/* Header Styles */
#header {
  transition: var(--transition);
}

#header.scrolled {
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
  background: rgba(255, 255, 255, 0.98);
  backdrop-filter: blur(10px);
}

/* Mobile Menu Animation */
#mobile-menu {
  transition: var(--transition);
  max-height: 0;
  overflow: hidden;
}

#mobile-menu.show {
  max-height: 600px;
}

/* Hero Section Animations */
@keyframes float {
  0%, 100% {
    transform: translateY(0);
  }
  50% {
    transform: translateY(-20px);
  }
}

.animate-float {
  animation: float 3s ease-in-out infinite;
}

/* Button Hover Effects */
.btn-primary {
  position: relative;
  overflow: hidden;
  transition: var(--transition);
}

.btn-primary::before {
  content: '';
  position: absolute;
  top: 50%;
  left: 50%;
  width: 0;
  height: 0;
  background: rgba(255, 255, 255, 0.2);
  border-radius: 50%;
  transform: translate(-50%, -50%);
  transition: width 0.6s, height 0.6s;
}

.btn-primary:hover::before {
  width: 300px;
  height: 300px;
}

/* Card Hover Effects */
.card-hover {
  transition: var(--transition);
}

.card-hover:hover {
  transform: translateY(-8px);
}

/* Smooth Section Transitions */
section {
  opacity: 0;
  animation: fadeInUp 0.8s ease forwards;
}

@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(30px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* Form Styles */
input:focus,
textarea:focus,
select:focus {
  outline: none;
  box-shadow: 0 0 0 3px rgba(212, 175, 55, 0.2);
}

input::placeholder,
textarea::placeholder {
  transition: var(--transition);
}

input:focus::placeholder,
textarea:focus::placeholder {
  opacity: 0.5;
}

/* Back to Top Button */
#back-to-top {
  transition: var(--transition);
}

#back-to-top.show {
  opacity: 1 !important;
  visibility: visible !important;
}

/* Loading Animation */
@keyframes pulse {
  0%, 100% {
    opacity: 1;
  }
  50% {
    opacity: 0.5;
  }
}

.animate-pulse {
  animation: pulse 2s cubic-bezier(0.4, 0, 0.6, 1) infinite;
}

/* Gradient Text */
.gradient-text {
  background: linear-gradient(135deg, var(--primary) 0%, var(--accent) 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

/* Custom Divider */
.section-divider {
  height: 4px;
  width: 80px;
  background: linear-gradient(90deg, var(--primary) 0%, var(--accent) 100%);
  margin: 0 auto;
  border-radius: 2px;
}

/* Image Hover Effects */
img {
  transition: var(--transition);
}

img:hover {
  transform: scale(1.02);
}

/* Link Animations */
a {
  transition: var(--transition);
  text-decoration: none;
}

/* Icon Animations */
[data-lucide] {
  transition: var(--transition);
}

/* Form Success/Error Messages */
.form-message {
  padding: 1rem;
  border-radius: 0.5rem;
  margin-bottom: 1rem;
  font-weight: 500;
}

.form-message.success {
  background-color: #d4edda;
  color: #155724;
  border: 1px solid #c3e6cb;
}

.form-message.error {
  background-color: #f8d7da;
  color: #721c24;
  border: 1px solid #f5c6cb;
}

/* Responsive Typography */
@media (max-width: 768px) {
  h1 {
    font-size: 2rem;
  }

  h2 {
    font-size: 1.75rem;
  }

  h3 {
    font-size: 1.5rem;
  }
}

/* Accessibility Focus Styles */
*:focus-visible {
  outline: 3px solid var(--accent);
  outline-offset: 2px;
}

/* Print Styles */
@media print {
  #header,
  #back-to-top,
  footer {
    display: none;
  }

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

/* Performance Optimizations */
.lazy-load {
  opacity: 0;
  transition: opacity 0.5s ease;
}

.lazy-load.loaded {
  opacity: 1;
}

/* Custom Animations for Scroll */
.scroll-reveal {
  opacity: 0;
  transform: translateY(50px);
  transition: opacity 0.6s ease, transform 0.6s ease;
}

.scroll-reveal.active {
  opacity: 1;
  transform: translateY(0);
}

/* Hero Background Pattern Animation */
@keyframes patternMove {
  0% {
    background-position: 0 0;
  }
  100% {
    background-position: 60px 60px;
  }
}

.animated-pattern {
  animation: patternMove 20s linear infinite;
}

/* Custom Selection Color */
::selection {
  background-color: var(--accent);
  color: var(--primary);
}

::-moz-selection {
  background-color: var(--accent);
  color: var(--primary);
}

/* Glass Effect */
.glass-effect {
  background: rgba(255, 255, 255, 0.1);
  backdrop-filter: blur(10px);
  border: 1px solid rgba(255, 255, 255, 0.2);
}

/* Shadow Utilities */
.shadow-soft {
  box-shadow: 0 2px 15px -3px rgba(0, 0, 0, 0.07), 0 10px 20px -2px rgba(0, 0, 0, 0.04);
}

.shadow-strong {
  box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
}

/* Hover Glow Effect */
.hover-glow {
  transition: var(--transition);
}

.hover-glow:hover {
  box-shadow: 0 0 30px rgba(212, 175, 55, 0.3);
}

/* Loading Spinner */
.spinner {
  border: 3px solid rgba(255, 255, 255, 0.3);
  border-top-color: var(--accent);
  border-radius: 50%;
  width: 40px;
  height: 40px;
  animation: spin 1s linear infinite;
}

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

/* Utility Classes */
.text-shadow {
  text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.1);
}

.backdrop-blur {
  backdrop-filter: blur(10px);
}

.transition-slow {
  transition: all 0.5s ease;
}

.transition-fast {
  transition: all 0.15s ease;
}
