:root {
  --primary: #1a3a6c;
  --secondary: #2c5282;
  --accent: #f9a828;
}

/* Scroll Reveal Animation */
.reveal-on-scroll {
  opacity: 0;
  transform: translateY(30px);
  transition: all 0.6s ease-out;
}

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

/* Hero Carousel */
.carousel-slide {
  opacity: 0;
  transition: opacity 0.8s ease-in-out;
}

.carousel-slide.active {
  opacity: 1;
}

.carousel-indicator.active {
  opacity: 1 !important;
}

/* Service Cards Hover Effect */
.service-card:hover {
  transform: translateY(-5px) scale(1.02);
  box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
}

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

.nav-link::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  width: 0;
  height: 2px;
  background-color: var(--primary);
  transition: width 0.3s ease;
}

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

/* Mobile Menu */
.mobile-menu {
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.3s ease-out;
}

.mobile-menu.active {
  max-height: 300px;
}

/* Button Animations */
button, .btn {
  transition: all 0.3s ease;
}

button:hover, .btn:hover {
  transform: translateY(-2px);
}

/* Form Animations */
input:focus, textarea:focus, select:focus {
  transform: scale(1.02);
  box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1);
}

/* Toast Animations */
.toast-enter {
  transform: translateX(100%);
  opacity: 0;
}

.toast-enter-active {
  transform: translateX(0);
  opacity: 1;
  transition: all 0.3s ease-out;
}

.toast-exit {
  transform: translateX(0);
  opacity: 1;
}

.toast-exit-active {
  transform: translateX(100%);
  opacity: 0;
  transition: all 0.3s ease-in;
}

/* Loading Animation */
.loading {
  position: relative;
  overflow: hidden;
}

.loading::after {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.2), transparent);
  animation: loading 1.5s infinite;
}

@keyframes loading {
  0% {
    left: -100%;
  }
  100% {
    left: 100%;
  }
}

/* Responsive Design Enhancements */
@media (max-width: 768px) {
  .service-card {
    margin-bottom: 1rem;
  }
  
  .hero h1 {
    font-size: 2.5rem;
  }
  
  .hero p {
    font-size: 1.1rem;
  }
}

/* Dark Mode Support */
@media (prefers-color-scheme: dark) {
  .bg-gray-50 {
    background-color: #1f2937;
  }
  
  .text-gray-600 {
    color: #d1d5db;
  }
  
  .bg-white {
    background-color: #374151;
  }
}

/* Print Styles */
@media print {
  .no-print {
    display: none !important;
  }
  
  body {
    background: white !important;
    color: black !important;
  }
}

/* Accessibility Improvements */
@media (prefers-reduced-motion: reduce) {
  * {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}

/* Focus Indicators */
*:focus {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}

/* High Contrast Mode */
@media (prefers-contrast: high) {
  .bg-primary {
    background-color: #000000;
  }
  
  .text-primary {
    color: #000000;
  }
  
  .bg-accent {
    background-color: #ff6600;
  }
}

/* New Sections Styles */

/* WhatsApp Button */
.whatsapp-button {
  box-shadow: 0 4px 14px 0 rgba(34, 197, 94, 0.39);
}

.whatsapp-button:hover {
  box-shadow: 0 6px 20px rgba(34, 197, 94, 0.23);
  transform: translateY(-2px);
}

/* Cobertura Nacional - Layout de Colunas */
.cobertura-city-column {
  transition: all 0.3s ease;
}

.cobertura-city-column h3 {
  position: relative;
  padding-bottom: 0.5rem;
}

.cobertura-city-column h3::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 50px;
  height: 3px;
  background: linear-gradient(90deg, var(--primary), var(--accent));
  border-radius: 2px;
}

.cobertura-building-card {
  transition: all 0.3s ease;
  border: 1px solid rgba(0, 0, 0, 0.1);
}

.cobertura-building-card:hover {
  transform: translateY(-5px);
  border-color: var(--primary);
}

.cobertura-building-card img {
  transition: transform 0.3s ease;
}

.cobertura-building-card:hover img {
  transform: scale(1.05);
}

/* Client Carousel */
.client-logo-container {
  transition: all 0.3s ease;
}

.client-logo-container:hover {
  transform: translateY(-5px);
}

.client-logo-item img {
  transition: all 0.3s ease;
}

.progress-bar {
  background: linear-gradient(90deg, var(--accent), #fbbf24);
}

/* Testimonial Cards */
.testimonial-card {
  transition: all 0.3s ease;
  border-left: 4px solid var(--accent);
}

.testimonial-card:hover {
  transform: translateY(-5px);
  border-left-color: var(--primary);
}

/* Director Cards */
.director-card {
  transition: all 0.3s ease;
}

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

.director-card img {
  transition: all 0.3s ease;
}

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

/* Why Eleva Differentials */
.differential-item {
  transition: all 0.3s ease;
}

.differential-item:hover {
  transform: translateX(10px);
}

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

@keyframes slideInLeft {
  from {
    opacity: 0;
    transform: translateX(-30px);
  }
  to {
    opacity: 1;
    transform: translateX(0);
  }
}

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

/* Client Carousel Animation */
@keyframes clientSlide {
  0% {
    transform: translateX(0);
  }
  100% {
    transform: translateX(-100%);
  }
}

/* Hover Effects */
.hover-scale {
  transition: transform 0.3s ease;
}

.hover-scale:hover {
  transform: scale(1.05);
}

.hover-lift {
  transition: all 0.3s ease;
}

.hover-lift:hover {
  transform: translateY(-5px);
  box-shadow: 0 10px 25px rgba(0, 0, 0, 0.15);
}

/* Progress Indicators */
.client-progress-indicator {
  background-color: rgba(26, 58, 108, 0.2);
}

.client-progress-indicator .progress-bar {
  background: linear-gradient(90deg, var(--accent), #fbbf24);
}

/* Responsive Adjustments */
@media (max-width: 768px) {
  .client-logo-item {
    width: 50%;
  }
  
  .testimonial-card {
    margin-bottom: 1.5rem;
  }
  
  .director-card {
    margin-bottom: 2rem;
  }
  
  /* Cobertura Nacional - Mobile */
  .cobertura-city-column {
    margin-bottom: 2rem;
  }
  
  .cobertura-city-column h3 {
    font-size: 1.5rem;
    margin-bottom: 1rem;
  }
  
  .cobertura-building-card {
    margin-bottom: 1rem;
  }
  
  .cobertura-building-card img {
    height: 200px;
  }
}

@media (max-width: 640px) {
  .client-logo-item {
    width: 100%;
  }
  
  .whatsapp-button {
    width: 100%;
    justify-content: center;
  }
}

/* Loading States */
.loading-skeleton {
  background: linear-gradient(90deg, #f0f0f0 25%, #e0e0e0 50%, #f0f0f0 75%);
  background-size: 200% 100%;
  animation: loading 1.5s infinite;
}

@keyframes loading {
  0% {
    background-position: 200% 0;
  }
  100% {
    background-position: -200% 0;
  }
}

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

/* Focus States for Accessibility */
.cobertura-prev:focus,
.cobertura-next:focus,
.cobertura-indicator:focus {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}

/* High Contrast Mode Support */
@media (prefers-contrast: high) {
  .client-logo-container {
    border: 2px solid #000;
  }
  
  .testimonial-card {
    border: 2px solid #000;
  }
  
  .director-card {
    border: 2px solid #000;
  }
}
/* Override navbar background */
#navbar {
  background-color: var(--primary) !important;
}

/* Cobertura Modal Styles */
#coberturaModal {
  backdrop-filter: blur(4px);
  animation: fadeIn 0.3s ease-out;
}

#coberturaModal.hidden {
  animation: fadeOut 0.3s ease-in;
}

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

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

/* Modal Content Animation */
#coberturaModal > div {
  animation: slideInUp 0.4s ease-out;
  transform-origin: center bottom;
}

@keyframes slideInUp {
  from {
    opacity: 0;
    transform: translateY(50px) scale(0.95);
  }
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

/* Cobertura State Cards */
.cobertura-state-card {
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.cobertura-state-card:hover {
  transform: translateY(-8px) scale(1.02);
  box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
}

.cobertura-state-card:active {
  transform: translateY(-4px) scale(1.01);
}

/* Carousel Slides */
.carousel-slide {
  transition: all 0.5s ease-in-out;
}

.carousel-slide.active {
  opacity: 1;
  transform: translateX(0);
}

.carousel-slide.hidden {
  opacity: 0;
  transform: translateX(20px);
}

/* Modal Carousel Controls */
#prevBtn, #nextBtn {
  transition: all 0.3s ease;
  backdrop-filter: blur(8px);
}

#prevBtn:hover, #nextBtn:hover {
  background-color: rgba(0, 0, 0, 0.8);
  transform: scale(1.1);
}

#prevBtn:active, #nextBtn:active {
  transform: scale(0.95);
}

/* Carousel Indicators */
#carouselIndicators button {
  transition: all 0.3s ease;
}

#carouselIndicators button:hover {
  transform: scale(1.2);
  background-color: var(--secondary) !important;
}

/* Current Image Info */
#currentImageInfo {
  border-left: 4px solid var(--accent);
  transition: all 0.3s ease;
}

#currentImageInfo:hover {
  border-left-color: var(--primary);
  background-color: #f8fafc;
}

/* Responsive Modal */
@media (max-width: 768px) {
  #coberturaModal > div {
    margin: 1rem;
    max-height: calc(100vh - 2rem);
  }
  
  #modalCarousel img {
    height: 250px;
  }
  
  .cobertura-state-card {
    margin-bottom: 1rem;
  }
  
  #prevBtn, #nextBtn {
    padding: 0.5rem;
  }
  
  #prevBtn svg, #nextBtn svg {
    width: 1rem;
    height: 1rem;
  }
}

@media (max-width: 640px) {
  #coberturaModal {
    padding: 0.5rem;
  }
  
  #coberturaModal > div {
    margin: 0.5rem;
  }
  
  #modalCarousel img {
    height: 200px;
  }
  
  .grid.xl\\:grid-cols-4 {
    grid-template-columns: repeat(1, minmax(0, 1fr));
  }
}

/* Loading State for Images */
#modalCarousel img {
  transition: opacity 0.3s ease;
}

#modalCarousel img[src=""] {
  opacity: 0;
  background: linear-gradient(90deg, #f0f0f0 25%, #e0e0e0 50%, #f0f0f0 75%);
  background-size: 200% 100%;
  animation: loading 1.5s infinite;
}

/* Accessibility Improvements */
.cobertura-state-card:focus {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}

#prevBtn:focus, #nextBtn:focus, #carouselIndicators button:focus {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}

/* High Contrast Mode */
@media (prefers-contrast: high) {
  .cobertura-state-card {
    border: 2px solid #000;
  }
  
  #coberturaModal > div {
    border: 3px solid #000;
  }
  
  #prevBtn, #nextBtn {
    background-color: #000 !important;
    border: 2px solid #fff;
  }
}

/* Reduced Motion */
@media (prefers-reduced-motion: reduce) {
  .cobertura-state-card,
  .carousel-slide,
  #prevBtn,
  #nextBtn,
  #carouselIndicators button {
    transition: none !important;
    animation: none !important;
  }
  
  #coberturaModal {
    animation: none !important;
  }
}

/* Centralização da seção de cobertura nacional */
#cobertura-section {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
}

#cobertura-section .max-w-7xl {
  width: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
}

/* Centralização dos cards de cobertura */
.grid.xl\\:grid-cols-4,
.grid.lg\\:grid-cols-3,
.grid.md\\:grid-cols-2,
.grid.grid-cols-1 {
  justify-items: center;
  justify-content: center;
  gap: 2rem;
  width: 100%;
  max-width: fit-content;
  margin: 0 auto;
}

/* Ajuste para cards de cobertura ficarem mais centralizados */
.cobertura-state-card {
  width: 100%;
  max-width: 280px;
  margin: 0 auto;
  display: flex;
  justify-content: center;
}

/* Para telas maiores, centralizar o grid quando há poucos itens */
@media (min-width: 1280px) {
  .grid.xl\\:grid-cols-4 {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    justify-content: center;
    max-width: 1200px;
    margin: 0 auto;
  }
}

@media (min-width: 1024px) and (max-width: 1279px) {
  .grid.lg\\:grid-cols-3 {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    justify-content: center;
    max-width: 900px;
    margin: 0 auto;
  }
}

/* WhatsApp Floating Button Styles */
.whatsapp-floating-btn {
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  will-change: transform;
}

.whatsapp-floating-btn:hover {
  transform: scale(1.1) !important;
  filter: brightness(1.1);
}

.whatsapp-floating-btn:active {
  transform: scale(0.95) !important;
}

/* Animações específicas para o botão flutuante */
@keyframes whatsapp-pulse {
  0%, 100% {
    transform: scale(1);
    box-shadow: 0 4px 15px rgba(37, 211, 102, 0.4);
  }
  50% {
    transform: scale(1.05);
    box-shadow: 0 6px 20px rgba(37, 211, 102, 0.6);
  }
}

@keyframes whatsapp-bounce {
  0%, 20%, 50%, 80%, 100% {
    transform: translateY(0);
  }
  40% {
    transform: translateY(-10px);
  }
  60% {
    transform: translateY(-5px);
  }
}

@keyframes whatsapp-shake {
  0%, 100% {
    transform: translateX(0);
  }
  10%, 30%, 50%, 70%, 90% {
    transform: translateX(-3px);
  }
  20%, 40%, 60%, 80% {
    transform: translateX(3px);
  }
}

/* Aplicar animações baseadas no data-attribute */
#whatsapp-floating-button[data-animation="pulse"] {
  animation: whatsapp-pulse 2s infinite ease-in-out;
}

#whatsapp-floating-button[data-animation="bounce"] {
  animation: whatsapp-bounce 2s infinite ease-in-out;
}

#whatsapp-floating-button[data-animation="shake"] {
  animation: whatsapp-shake 3s infinite ease-in-out;
}

/* Tooltip do botão flutuante */
.whatsapp-floating-btn .tooltip {
  visibility: hidden;
  opacity: 0;
  transform: translateX(10px);
  transition: all 0.3s ease;
}

.whatsapp-floating-btn:hover .tooltip {
  visibility: visible;
  opacity: 1;
  transform: translateX(0);
}

/* Responsividade específica para o botão flutuante */
@media (max-width: 768px) {
  #whatsapp-floating-button[data-show-mobile="false"] {
    display: none !important;
  }
  
  .whatsapp-floating-btn {
    bottom: 15px !important;
    right: 15px !important;
  }
  
  .whatsapp-floating-btn .tooltip {
    display: none; /* Esconder tooltip no mobile */
  }
}

@media (min-width: 769px) {
  #whatsapp-floating-button[data-show-desktop="false"] {
    display: none !important;
  }
}

/* Estados de foco para acessibilidade */
#whatsapp-floating-button:focus {
  outline: 3px solid var(--accent);
  outline-offset: 3px;
}

#whatsapp-floating-button:focus-visible {
  outline: 3px solid var(--accent);
  outline-offset: 3px;
}

/* Modo de alto contraste */
@media (prefers-contrast: high) {
  .whatsapp-floating-btn {
    border: 3px solid #000 !important;
  }
  
  .whatsapp-floating-btn .tooltip {
    background-color: #000 !important;
    border: 2px solid #fff;
    color: #fff !important;
  }
}

/* Reduzir movimento para usuários que preferem */
@media (prefers-reduced-motion: reduce) {
  .whatsapp-floating-btn,
  #whatsapp-floating-button[data-animation="pulse"],
  #whatsapp-floating-button[data-animation="bounce"],
  #whatsapp-floating-button[data-animation="shake"] {
    animation: none !important;
    transition: none !important;
  }
  
  .whatsapp-floating-btn:hover {
    transform: none !important;
  }
}

/* Efeito de sombra aprimorado */
.whatsapp-floating-btn > div {
  box-shadow: 0 4px 15px rgba(37, 211, 102, 0.4);
  transition: box-shadow 0.3s ease;
}

.whatsapp-floating-btn:hover > div {
  box-shadow: 0 6px 25px rgba(37, 211, 102, 0.6);
}

/* Z-index alto para garantir que fique acima de outros elementos */
.whatsapp-floating-btn {
  z-index: 9999 !important;
}

/* Suporte para temas escuros */
@media (prefers-color-scheme: dark) {
  .whatsapp-floating-btn .tooltip {
    background-color: #1f2937;
    color: #f9fafb;
    border: 1px solid #374151;
  }
}

@media (min-width: 768px) and (max-width: 1023px) {
  .grid.md\\:grid-cols-2 {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    justify-content: center;
    max-width: 600px;
    margin: 0 auto;
  }
}

@media (max-width: 767px) {
  .grid.grid-cols-1 {
    display: flex;
    flex-direction: column;
    align-items: center;
    max-width: 320px;
    margin: 0 auto;
  }
}

/* Contact Cards Equal Height */
.contact-card {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  min-height: 200px;
  height: 100%;
}

.contact-card h3 {
  margin-bottom: auto;
}

.contact-card p {
  margin-top: auto;
}

/* Ensure flex container for contact cards */
.flex.flex-col.md\\:flex-row {
  align-items: stretch;
}

.flex.flex-col.md\\:flex-row .contact-card {
  flex: 1;
  display: flex;
  flex-direction: column;
}
