/* Importação de fonte moderna */
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700;800&display=swap');

/* ==============================================
   Global Styles & Variáveis Modernizadas
============================================== */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
  font-family: 'Inter', 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
}

:root {
  --primary-color: #8B5A3C;
  --primary-light: #A67C5A;
  --primary-dark: #6D4428;
  --secondary-color: #5D4E37;
  --secondary-light: #7A6B54;
  --accent-color: #B8860B;
  --accent-light: #DAA520;
  --background-color: #F5F0E8;
  --white: #FEFCF7;
  --dark-text: #3E2723;
  --text-color: #4A4A4A;
  --light-text: #8D6E63;
  --border-color: #E7D7C1;
  --success-color: #8BC34A;
  --error-color: #D32F2F;
  --warning-color: #FF9800;
  --info-color: #795548;
  --transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
  --transition-fast: all 0.2s ease;
  --border-radius: 12px;
  --border-radius-lg: 20px;
  --box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
  --box-shadow-lg: 0 10px 40px rgba(0, 0, 0, 0.12);
  --box-shadow-hover: 0 8px 30px rgba(0, 0, 0, 0.15);
  --gradient-primary: linear-gradient(135deg, #8B5A3C, #A67C5A);
  --gradient-secondary: linear-gradient(135deg, #5D4E37, #7A6B54);
  --gradient-bg: linear-gradient(135deg, #B8860B 0%, #8B5A3C 100%);
}

html {
  scroll-behavior: smooth;
  scroll-padding-top: 80px;
}

body {
  background: var(--background-color);
  line-height: 1.7;
  color: var(--dark-text);
  font-family: 'Inter', 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
  font-weight: 400;
  overflow-x: hidden;
}

/* Tipografia melhorada */
h1, h2, h3, h4, h5, h6 {
  font-family: 'Inter', sans-serif;
  font-weight: 600;
  line-height: 1.3;
  color: var(--dark-text);
}

/* Melhoria na legibilidade */
p {
  line-height: 1.7;
  margin-bottom: 1.2rem;
}

/* ==============================================
   Animações Globais
============================================== */
@keyframes fadeIn {
  from { 
    opacity: 0; 
    transform: translateY(30px);
  }
  to { 
    opacity: 1; 
    transform: translateY(0);
  }
}

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

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

@keyframes pulse {
  0%, 100% { 
    transform: scale(1);
    box-shadow: 0 0 0 0 rgba(139, 90, 60, 0.4);
  }
  50% { 
    transform: scale(1.05);
    box-shadow: 0 0 0 10px rgba(139, 90, 60, 0);
  }
}

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

@keyframes gradientShift {
  0% { background-position: 0% 50%; }
  50% { background-position: 100% 50%; }
  100% { background-position: 0% 50%; }
}

@keyframes shimmer {
  0% { transform: translateX(-100%); }
  100% { transform: translateX(100%); }
}

@keyframes float {
  0%, 100% { transform: translateY(0px); }
  50% { transform: translateY(-10px); }
}

@keyframes spin {
  0% { transform: rotate(0deg); }
  100% { transform: rotate(360deg); }
}

/* ==============================================
   Containers & Seções Globais
============================================== */
section {
  opacity: 0;
  animation: fadeIn 1s ease forwards;
  position: relative;
  overflow: hidden;
}

section.visible {
  opacity: 1;
}

.container {
  width: 92%;
  max-width: 1400px;
  margin: 0 auto;
  padding: 0 20px;
}

.section-title {
  text-align: center;
  font-size: clamp(2rem, 4vw, 3rem);
  margin-bottom: 1.5rem;
  color: var(--dark-text);
  position: relative;
  font-weight: 700;
  letter-spacing: -0.02em;
}

.section-title::after {
  content: '';
  display: block;
  width: 80px;
  height: 4px;
  background: var(--gradient-primary);
  margin: 20px auto 0;
  border-radius: 2px;
  animation: shimmer 2s infinite;
  position: relative;
  overflow: hidden;
}

.section-title::before {
  content: '';
  position: absolute;
  top: 100%;
  left: 50%;
  transform: translateX(-50%);
  width: 60px;
  height: 60px;
  background: radial-gradient(circle, rgba(139, 90, 60, 0.1) 0%, transparent 70%);
  border-radius: 50%;
  z-index: -1;
}

.section-subtitle {
  text-align: center;
  font-size: clamp(1rem, 2.5vw, 1.25rem);
  color: var(--light-text);
  margin-bottom: 4rem;
  max-width: 600px;
  margin-left: auto;
  margin-right: auto;
  line-height: 1.6;
  font-weight: 400;
}

/* ==============================================
   Seção CTA Global
============================================== */
.cta {
  background: linear-gradient(
      rgba(0, 0, 0, 0.6),
      rgba(0, 0, 0, 0.6)
    ),
    url("../img/cta-bg.jpg") center/cover no-repeat;
  color: #fff;
  text-align: center;
  padding: 80px 20px;
  position: relative;
  overflow: hidden;
}

.cta::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: 
    radial-gradient(circle at 30% 40%, rgba(255, 255, 255, 0.1) 0%, transparent 50%),
    radial-gradient(circle at 70% 60%, rgba(255, 255, 255, 0.1) 0%, transparent 50%);
  animation: float 8s ease-in-out infinite;
}

.cta h2 {
  font-size: clamp(2rem, 4vw, 3rem);
  margin-bottom: 1.5rem;
  font-weight: 700;
  color: var(--white);
}

.cta p {
  font-size: clamp(1.1rem, 2.5vw, 1.3rem);
  margin-bottom: 2.5rem;
  max-width: 600px;
  margin-left: auto;
  margin-right: auto;
  opacity: 0.95;
}

/* ==============================================
   Botões Globais
============================================== */
.btn,
.btn-service,
.btn-project,
.filter-btn,
.testimonial-prev,
.testimonial-next,
.back-to-top,
button[type="submit"] {
  position: relative;
  overflow: hidden;
  cursor: pointer;
  border: none;
  outline: none;
  transition: var(--transition);
  font-family: inherit;
}

/* Efeito shimmer moderno */
.btn::before,
.btn-service::before,
.btn-project::before {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(
    90deg,
    transparent,
    rgba(255, 255, 255, 0.3),
    transparent
  );
  transition: left 0.6s;
  z-index: 1;
}

.btn:hover::before,
.btn-service:hover::before,
.btn-project:hover::before {
  left: 100%;
}

/* Botão Principal */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 1rem 2.5rem;
  background: var(--gradient-primary);
  color: var(--white);
  text-decoration: none;
  border-radius: var(--border-radius);
  font-weight: 600;
  font-size: 1.1rem;
  letter-spacing: 0.5px;
  text-transform: uppercase;
  box-shadow: var(--box-shadow);
  backdrop-filter: blur(10px);
  border: 1px solid rgba(255, 255, 255, 0.1);
  z-index: 0;
  min-height: 50px;
}

.btn:hover {
  transform: translateY(-3px) scale(1.02);
  box-shadow: var(--box-shadow-hover);
  background: linear-gradient(135deg, #6D4428, #5D4E37);
}

.btn:active {
  transform: translateY(-1px) scale(0.98);
}

/* Botão Secundário */
.btn-secondary {
  background: rgba(255, 255, 255, 0.1);
  color: var(--white);
  border: 2px solid rgba(255, 255, 255, 0.3);
  backdrop-filter: blur(20px);
}

.btn-secondary:hover {
  background: rgba(255, 255, 255, 0.2);
  border-color: rgba(255, 255, 255, 0.5);
  transform: translateY(-3px) scale(1.02);
}

/* Botão Grande */
.btn-large {
  display: inline-block;
  padding: 1.25rem 3rem;
  background-color: var(--primary-color);
  color: #fff;
  text-decoration: none;
  border-radius: var(--border-radius-lg);
  font-size: 1.25rem;
  font-weight: bold;
  text-transform: uppercase;
  transition: var(--transition);
  box-shadow: var(--box-shadow);
  min-height: 60px;
}

.btn-large:hover {
  background-color: #6D4428;
  transform: translateY(-2px);
  box-shadow: var(--box-shadow-hover);
}

/* ==============================================
   Header & Navegação
============================================== */
header {
  background-color: var(--white);
  box-shadow: 0 2px 15px rgba(0, 0, 0, 0.15);
  padding: 20px 0;
  position: fixed;
  width: 100%;
  z-index: 1000;
  transition: var(--transition), transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  transform: translateY(0);
  will-change: transform;
}

header.sticky {
  padding: 10px 0;
  box-shadow: 0 2px 20px rgba(0, 0, 0, 0.2);
}

/* Classes para controlar a visibilidade do header ao rolar */
header.hidden {
  transform: translateY(-100%);
  opacity: 0.95;
}

header.scrolled-up {
  transform: translateY(0);
  opacity: 1;
  box-shadow: 0 4px 25px rgba(0, 0, 0, 0.2);
}

/* Otimização para mobile */
@media (max-width: 768px) {
  header {
    transition: transform 0.25s ease-in-out, opacity 0.25s ease-in-out;
  }
  
  header.hidden {
    transform: translateY(-100%);
    opacity: 0.9;
  }
  
  header.scrolled-up {
    transform: translateY(0);
    opacity: 1;
  }
}

header .container {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

/* Info e Contato do Header */
.header-info {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  flex: 1;
}

.header-contact {
  display: flex;
  margin-bottom: 10px;
}

.header-email,
.header-phone {
  color: var(--dark-text);
  text-decoration: none;
  font-size: 0.95rem;
  margin-left: 20px;
  display: flex;
  align-items: center;
  transition: var(--transition);
}

.header-email:hover,
.header-phone:hover {
  color: var(--primary-color);
}

/* Navegação Desktop */
.main-nav {
  display: flex;
}

.nav-list {
  display: flex;
  list-style: none;
  margin: 0;
  padding: 0;
}

.nav-link {
  color: var(--dark-text);
  text-decoration: none;
  padding: 10px 15px;
  margin: 0 5px;
  font-weight: 500;
  position: relative;
  transition: var(--transition);
  font-size: 1.1rem;
}

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

.nav-link:hover,
.nav-link.active {
  color: var(--primary-color);
}

.nav-link:hover:after,
.nav-link.active:after {
  width: 80%;
  left: 10%;
}

/* Logo */
.logo {
  width: 200px;
  display: block;
}

.logo-img {
  width: 100%;
  height: auto;
  max-height: 150px;
  object-fit: contain;
}

/* ==============================================
   Menu Hamburguer (Mobile)
============================================== */
.menu-toggle {
  display: none;
  flex-direction: column;
  justify-content: space-between;
  width: 30px;
  height: 21px;
  cursor: pointer;
  z-index: 2001;
  position: relative;
  transition: all 0.3s ease;
}

.menu-toggle span {
  display: block;
  height: 3px;
  width: 100%;
  background-color: #333;
  border-radius: 3px;
  transition: all 0.3s ease;
  transform-origin: center;
}

.menu-toggle:hover span {
  background-color: var(--primary-color);
}

.menu-toggle.active span:nth-child(1) {
  transform: translateY(9px) rotate(45deg);
  background-color: var(--primary-color);
}

.menu-toggle.active span:nth-child(2) {
  opacity: 0;
  transform: scaleX(0);
}

.menu-toggle.active span:nth-child(3) {
  transform: translateY(-9px) rotate(-45deg);
  background-color: var(--primary-color);
}

/* ==============================================
   Footer
============================================== */
footer {
  background-color: #333;
  color: var(--white);
  padding: 40px 0;
  text-align: center;
}

.footer-content {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
}

.footer-section {
  flex: 1;
  min-width: 250px;
  margin-bottom: 20px;
  text-align: left;
}

.footer-section h3 {
  margin-bottom: 15px;
  font-size: 1.2rem;
  color: #4a90e2; /* Azul neon igual ao texto "Galaxy Smart" */
  font-weight: 600;
  text-shadow: 0 0 10px rgba(74, 144, 226, 0.3);
  transition: all 0.3s ease;
}

.footer-section h3:hover {
  color: #5ba0f2;
  text-shadow: 0 0 15px rgba(74, 144, 226, 0.5);
}

.footer-section p,
.footer-section a {
  color: rgba(255, 255, 255, 0.7);
  margin-bottom: 10px;
  display: block;
  text-decoration: none;
  transition: var(--transition);
}

.footer-section a:hover {
  color: var(--white);
  padding-left: 5px;
}

.footer-social {
  display: flex;
  gap: 10px;
  margin-top: 15px;
}

.copyright {
  margin-top: 20px;
  padding-top: 20px;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
}

.developer {
  color: #4a90e2;
  font-weight: 600;
  text-decoration: none;
  transition: color 0.3s ease;
}

.developer:hover {
  color: #ffffff;
  text-shadow: 0 0 8px rgba(74, 144, 226, 0.6);
}

/* ==============================================
   Botões Fixos (WhatsApp e Back-to-Top)
============================================== */
.whatsapp-btn {
  position: fixed;
  bottom: 30px;
  right: 30px;
  width: 60px;
  height: 60px;
  background-color: #25D366;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 4px 10px rgba(0,0,0,0.3);
  z-index: 1000;
  transition: transform 0.3s;
}

.whatsapp-btn:hover {
  transform: scale(1.1);
}

.whatsapp-icon {
  width: 50px;
  height: 50px;
}

.back-to-top {
  position: fixed;
  bottom: 30px;
  left: 30px;
  width: 50px;
  height: 50px;
  background-color: var(--primary-color);
  color: var(--white);
  border: none;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 1000;
  opacity: 0;
  visibility: hidden;
  transition: all 0.3s;
  box-shadow: 0 4px 10px rgba(0,0,0,0.2);
  cursor: pointer;
}

.back-to-top.visible {
  opacity: 1;
  visibility: visible;
}

.back-to-top:hover {
  background-color: var(--primary-dark);
  transform: translateY(-3px);
}

/* Ícone da seta para cima - Simples e funcional */
.arrow-up-icon {
  width: 0;
  height: 0;
  border-left: 6px solid transparent;
  border-right: 6px solid transparent;
  border-bottom: 10px solid currentColor;
  margin: 0 auto;
}

/* ==============================================
   Media Queries Globais
============================================== */
@media (max-width: 992px) {
  .logo {
    width: 280px;
  }
  
  .header-info {
    flex: 1;
  }
  
  .header-contact {
    flex-direction: column;
    align-items: flex-end;
  }
  
  .header-email,
  .header-phone {
    margin-left: 0;
    margin-bottom: 5px;
    font-size: 0.85rem;
  }
  
  .nav-link {
    padding: 8px 10px;
    font-size: 1rem;
  }
}

@media (max-width: 768px) {
  .menu-toggle {
    display: flex;
    z-index: 2001;
  }
  
  .main-nav {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100vh;
    background-color: rgba(255, 255, 255, 0.98);
    backdrop-filter: blur(10px);
    z-index: 2000;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
    transform: translateY(-100%);
  }
  
  .main-nav.active {
    display: flex;
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
  }
  
  .nav-list {
    flex-direction: column;
    gap: 30px;
    margin: 0;
    padding: 0;
    list-style: none;
  }
  
  .nav-link {
    font-size: 1.4rem;
    text-align: center;
    color: var(--text-color);
    text-decoration: none;
    padding: 15px 30px;
    border-radius: 8px;
    transition: all 0.3s ease;
    border: 2px solid transparent;
    font-weight: 600;
  }
  
  .nav-link:hover,
  .nav-link.active {
    background-color: var(--primary-color);
    color: var(--white);
    border-color: var(--primary-color);
    transform: scale(1.05);
  }
  
  /* Fechamento com animação suave */
  .main-nav:not(.active) {
    transform: translateY(-100%);
  }
  
  header .container {
    justify-content: space-between;
  }
  
  .logo {
    width: 220px;
  }
  
  .header-contact {
    display: none;
  }
  
  .hero_buttons {
    flex-direction: column;
    gap: 10px;
  }
  
  .cta {
    padding: 60px 20px;
  }
  
  .cta h2 {
    font-size: 2rem;
  }
  
  .cta p {
    font-size: 1rem;
  }
  
  .btn-large {
    font-size: 1rem;
    padding: 15px 30px;
  }
  
  .footer-content {
    flex-direction: column;
    align-items: center;
  }
  
  .footer-section {
    text-align: center;
    margin-bottom: 30px;
  }
  
  .footer-section p,
  .footer-section a {
    text-align: center;
  }
}

@media (max-width: 480px) {
  .section-title {
    font-size: 2rem;
  }
  
  .btn {
    padding: 12px 25px;
    font-size: 1rem;
  }
}

/* ==============================================
   Responsividade adicional para Tablets
============================================== */
@media (max-width: 1024px) {
  .menu-toggle {
    display: flex;
    z-index: 2001;
  }
  
  .main-nav {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100vh;
    background-color: rgba(255, 255, 255, 0.98);
    backdrop-filter: blur(10px);
    z-index: 2000;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
    transform: translateY(-100%);
  }
  
  .main-nav.active {
    display: flex;
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
  }
  
  .nav-list {
    flex-direction: column;
    gap: 25px;
    margin: 0;
    padding: 0;
    list-style: none;
  }
  
  .nav-link {
    font-size: 1.3rem;
    text-align: center;
    color: var(--text-color);
    text-decoration: none;
    padding: 12px 25px;
    border-radius: 8px;
    transition: all 0.3s ease;
    border: 2px solid transparent;
    font-weight: 600;
  }
  
  .nav-link:hover,
  .nav-link.active {
    background-color: var(--primary-color);
    color: var(--white);
    border-color: var(--primary-color);
    transform: scale(1.05);
  }
}

/* Melhorias adicionais para responsividade dos projetos */
@media (max-width: 768px) {
    .container {
        padding-left: 20px;
        padding-right: 20px;
    }
    
    .section-title {
        font-size: 2rem;
        margin-bottom: 15px;
    }
    
    .section-subtitle {
        font-size: 1rem;
        margin-bottom: 30px;
        padding: 0 10px;
    }
}

@media (max-width: 480px) {
    .container {
        padding-left: 15px;
        padding-right: 15px;
    }
    
    .section-title {
        font-size: 1.8rem;
        margin-bottom: 12px;
    }
    
    .section-subtitle {
        font-size: 0.9rem;
        margin-bottom: 25px;
        padding: 0 5px;
        line-height: 1.5;
    }
}

/* Correções específicas para cards de projeto em mobile */
@media (max-width: 768px) {
    .projects .project-card {
        /* Garantir que o card ocupe toda a largura disponível */
        width: 100%;
        max-width: none;
        /* Remover transformações que podem causar problemas em mobile */
        transform: none !important;
    }
    
    .projects .project-card:hover {
        transform: none !important;
        box-shadow: 0 8px 25px rgba(0, 0, 0, 0.1);
    }
    
    .projects .project-overlay {
        /* Garantir que o overlay seja sempre visível em mobile */
        opacity: 1;
        visibility: visible;
        transform: translateY(0) !important;
        position: relative;
        background: white !important;
        color: #333 !important;
    }
    
    .projects .project-overlay h3 {
        color: var(--primary-color) !important;
        text-shadow: none !important;
    }
    
    .projects .project-overlay p {
        color: #666 !important;
        opacity: 1 !important;
    }
}
