/* Reset e estilos gerais */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
  font-family: "Segoe UI", Tahoma, Geneva, Verdana, sans-serif;
}

html {
  scroll-behavior: smooth;
}

body {
  overflow-x: hidden;
  color: #333;
  background-color: #f9f9f9;
}

.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 20px;
}

h1,
h2,
h3,
h4 {
  font-weight: 700;
  margin-bottom: 20px;
}

p {
  line-height: 1.6;
  margin-bottom: 15px;
}

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

a {
  text-decoration: none;
  color: #0078d4;
  transition: color 0.3s;
}

a:hover {
  color: #005a9e;
}

section {
  padding: 80px 0;
}

.btn {
  display: inline-block;
  padding: 12px 24px;
  background-color: #0078d4;
  color: white;
  border-radius: 30px;
  font-weight: 600;
  transition: all 0.3s ease;
  border: none;
  cursor: pointer;
}

.btn:hover {
  background-color: #005a9e;
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(0, 120, 212, 0.3);
  color: white;
}

.btn-outline {
  background-color: transparent;
  border: 2px solid #0078d4;
  color: #0078d4;
}

.btn-outline:hover {
  background-color: #0078d4;
  color: white;
}

/* Cabeçalho */
header {
  background-color: #fff;
  position: fixed;
  width: 100%;
  top: 0;
  z-index: 1000;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
  transition: all 0.3s ease;
}

header.scrolled {
  padding: 10px 0;
  background-color: rgba(255, 255, 255, 0.95);
}

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

.logo {
  font-size: 24px;
  font-weight: 700;
  color: #0078d4;
  display: flex;
  align-items: center;
}

.logo img {
  height: 80px;
  margin-right: 5px;
}

nav ul {
  display: flex;
  list-style: none;
}

nav ul li {
  margin-left: 30px;
}

nav ul li a {
  color: #333;
  font-weight: 600;
  position: relative;
  padding: 5px 0;
}

nav ul li a:before {
  content: "";
  position: absolute;
  width: 0;
  height: 2px;
  bottom: 0;
  left: 0;
  background-color: #0078d4;
  transition: width 0.3s;
}

nav ul li a:hover:before {
  width: 100%;
}

.mobile-menu-btn {
  display: none;
  background: none;
  border: none;
  font-size: 24px;
  cursor: pointer;
  color: #333;
}

/* Hero Section */
.hero {
  height: 100vh;
  background: linear-gradient(rgba(0, 0, 0, 0.5), rgba(0, 0, 0, 0.5)),
    url("images/velha.jpg") no-repeat center center;
  background-size: cover;
  display: flex;
  align-items: center;
  color: white;
  text-align: center;
  padding-top: 70px;
}

.hero-content {
  max-width: 800px;
  margin: 0 auto;
}

.hero h1 {
  font-size: 3.5rem;
  margin-bottom: 20px;
  animation: fadeInUp 1s ease;
}

.hero p {
  font-size: 1.2rem;
  margin-bottom: 30px;
  animation: fadeInUp 1s ease 0.2s;
  animation-fill-mode: both;
}

.hero-buttons {
  animation: fadeInUp 1s ease 0.4s;
  animation-fill-mode: both;
}

.hero-buttons .btn {
  margin: 0 10px;
}

/* Sobre nós */
.about {
  background-color: white;
}

.about-flex {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 40px;
}

.about-text {
  flex: 1;
  min-width: 300px;
}

.about-image {
  flex: 1;
  min-width: 300px;
  position: relative;
  overflow: hidden;
  border-radius: 10px;
  box-shadow: 0 15px 30px rgba(0, 0, 0, 0.1);
}

.about-image img {
  transition: transform 0.5s ease;
  width: 100%;
}

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

/* O que fazemos */
.what-we-do {
  background-color: #f9f9f9;
  text-align: center;
}

.services-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 30px;
  margin-top: 50px;
}

.service-item {
  background-color: white;
  border-radius: 10px;
  padding: 30px;
  box-shadow: 0 5px 15px rgba(0, 0, 0, 0.05);
  transition: transform 0.3s ease, box-shadow 0.3s ease;
  position: relative;
  overflow: hidden;
  text-align: left;
}

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

.service-item::before {
  content: "";
  position: absolute;
  width: 100%;
  height: 5px;
  background: linear-gradient(90deg, #0078d4, #00a5ff);
  top: 0;
  left: 0;
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 0.3s ease;
}

.service-item:hover::before {
  transform: scaleX(1);
}

.service-icon {
  width: 60px;
  height: 60px;
  background-color: #0078d41a;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 20px;
  color: #0078d4;
  font-size: 24px;
}

/* Projetos */
.projects {
  background-color: white;
}

.projects-header {
  text-align: center;
  margin-bottom: 50px;
}

.projects-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 30px;
}

.project-card {
  border-radius: 10px;
  overflow: hidden;
  box-shadow: 0 5px 15px rgba(0, 0, 0, 0.05);
  transition: transform 0.3s ease;
  background-color: white;
}

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

.project-image {
  height: 200px;
  overflow: hidden;
}

.project-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.5s ease;
}

.project-card:hover .project-image img {
  transform: scale(1.1);
}

.project-content {
  padding: 20px;
}

.project-title {
  font-size: 1.2rem;
  margin-bottom: 10px;
}

.project-description {
  color: #666;
  margin-bottom: 20px;
}

/* Formulários */
.forms {
  background-color: #f9f9f9;
}

.form-container {
  max-width: 800px;
  margin: 0 auto;
  background-color: white;
  padding: 40px;
  border-radius: 10px;
  box-shadow: 0 5px 15px rgba(0, 0, 0, 0.05);
}

.form-group {
  margin-bottom: 20px;
}

.form-group label {
  display: block;
  margin-bottom: 8px;
  font-weight: 600;
}

.form-group input,
.form-group textarea,
.form-group select {
  width: 100%;
  padding: 12px;
  border: 1px solid #ddd;
  border-radius: 5px;
  font-size: 16px;
  transition: border-color 0.3s;
}

.form-group input:focus,
.form-group textarea:focus,
.form-group select:focus {
  outline: none;
  border-color: #0078d4;
}

/* Limitar altura do textarea */
.form-group textarea {
  resize: vertical;
  max-height: 200px;
  min-height: 120px;
}

.form-row {
  display: flex;
  gap: 20px;
}

.form-row .form-group {
  flex: 1;
}

/* Contato */
.contact {
  background-color: white;
}

.contact-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 40px;
  align-items: start;
}

.contact-info {
  display: flex;
  flex-direction: column;
}

.contact-item {
  display: flex;
  align-items: center;
  margin-bottom: 20px;
}

.contact-icon {
  width: 50px;
  height: 50px;
  background-color: rgba(0, 120, 212, 0.1);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-right: 15px;
  color: #0078d4;
  font-size: 20px;
}

.contact-details h4 {
  margin-bottom: 5px;
}

.contact-map {
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.map-container-contact {
  height: 400px;
  border-radius: 10px;
  overflow: hidden;
  box-shadow: 0 8px 25px rgba(0, 0, 0, 0.15);
}

.map-container-contact iframe {
  width: 100%;
  height: 100%;
  border: none;
}

.map-info {
  padding: 20px;
  background-color: #f8f9fa;
  border-radius: 10px;
  text-align: center;
}

.map-info h4 {
  color: #333;
  margin-bottom: 15px;
  font-size: 1.2rem;
}

.map-info p {
  color: #666;
  margin-bottom: 20px;
  line-height: 1.6;
}

/* Footer */
footer {
  background-color: #333;
  color: white;
  padding: 60px 0 20px;
}

.footer-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 40px;
  margin-bottom: 40px;
}

.footer-item h3 {
  color: white;
  position: relative;
  padding-bottom: 10px;
  margin-bottom: 20px;
}

.footer-item h3:after {
  content: "";
  position: absolute;
  width: 50px;
  height: 2px;
  background-color: #0078d4;
  bottom: 0;
  left: 0;
}

.footer-links li {
  margin-bottom: 10px;
  list-style: none;
}

.footer-links a {
  color: #ccc;
  transition: color 0.3s, padding-left 0.3s;
  display: inline-block;
}

.footer-links a:hover {
  color: white;
  padding-left: 5px;
}

.social-links {
  display: flex;
  gap: 15px;
}

.social-link {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  background-color: rgba(255, 255, 255, 0.1);
  border-radius: 50%;
  color: white;
  transition: all 0.3s ease;
}

.social-link:hover {
  background-color: #0078d4;
  transform: translateY(-3px);
}

/* Estilos do mapa no footer */
.map-container {
  margin-top: 15px;
  border-radius: 8px;
  overflow: hidden;
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
}

.map-container iframe {
  width: 100%;
  height: 150px;
  border: none;
  filter: grayscale(20%);
  transition: filter 0.3s ease;
}

.map-container:hover iframe {
  filter: grayscale(0%);
}

/* Link para abrir o mapa */
.map-link {
  display: inline-block;
  margin-top: 10px;
  color: #0078d4;
  font-size: 14px;
  transition: color 0.3s ease;
}

.map-link:hover {
  color: #ffffff;
  text-decoration: underline;
}

.copyright {
  text-align: center;
  padding-top: 20px;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  color: #999;
  font-size: 14px;
}

/* Animações */
@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.fade-in {
  opacity: 0;
  transform: translateY(20px);
  transition: opacity 0.6s ease, transform 0.6s ease;
}

.fade-in.visible {
  opacity: 1;
  transform: translateY(0);
}

/* Acessibilidade */
.skip-link {
  position: absolute;
  top: -40px;
  left: 0;
  padding: 8px;
  background-color: #0078d4;
  color: white;
  z-index: 1001;
  transition: top 0.3s;
}

.skip-link:focus {
  position: absolute;
  top: 10px;
  left: 10px;
  background: #0078d4;
  color: white;
  padding: 10px 15px;
  border-radius: 4px;
  text-decoration: none;
  z-index: 1001;
}

/* Responsividade */
@media (max-width: 768px) {
  .header-container {
    padding: 15px 0;
  }

  nav {
    position: fixed;
    top: 80px;
    left: 0;
    width: 100%;
    background-color: white;
    box-shadow: 0 5px 10px rgba(0, 0, 0, 0.1);
    clip-path: polygon(0 0, 100% 0, 100% 0, 0 0);
    transition: clip-path 0.4s ease;
  }

  nav.active {
    clip-path: polygon(0 0, 100% 0, 100% 100%, 0 100%);
  }

  nav ul {
    flex-direction: column;
    padding: 20px 0;
  }

  nav ul li {
    margin: 0;
    width: 100%;
    text-align: center;
  }

  nav ul li a {
    display: block;
    padding: 15px;
  }

  .mobile-menu-btn {
    display: block;
  }

  .hero h1 {
    font-size: 2.5rem;
  }

  .about-flex {
    flex-direction: column;
  }

  .form-row {
    flex-direction: column;
    gap: 0;
  }

  .contact-grid {
    grid-template-columns: 1fr;
    gap: 30px;
  }

  .map-container-contact {
    height: 300px;
  }

  .footer-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 30px;
  }
}

@media (max-width: 480px) {
  .map-container-contact {
    height: 250px;
  }

  .footer-grid {
    grid-template-columns: 1fr;
    gap: 25px;
  }
}

/* Modal personalizado */
.modal {
  display: none;
  position: fixed;
  z-index: 1000;
  left: 0;
  top: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(0, 0, 0, 0.5);
  animation: fadeIn 0.3s ease-out;
}

.modal.show {
  display: flex;
  align-items: center;
  justify-content: center;
}

.modal-content {
  background-color: #fff;
  margin: 15% auto;
  padding: 30px;
  border-radius: 12px;
  width: 90%;
  max-width: 500px;
  text-align: center;
  position: relative;
  animation: slideIn 0.3s ease-out;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
}

.modal-close {
  position: absolute;
  top: 15px;
  right: 20px;
  color: #aaa;
  font-size: 28px;
  font-weight: bold;
  cursor: pointer;
  transition: color 0.3s;
}

.modal-close:hover,
.modal-close:focus {
  color: #333;
}

.modal-icon {
  margin-bottom: 20px;
}

.modal-icon i {
  font-size: 48px;
  display: none;
}

.modal-icon i.show {
  display: inline-block;
}

#modal-success-icon {
  color: #28a745;
}

#modal-email-icon {
  color: #0078d4;
}

#modal-title {
  color: #333;
  margin-bottom: 15px;
  font-size: 1.5rem;
}

#modal-message {
  color: #666;
  margin-bottom: 25px;
  line-height: 1.6;
}

.modal-buttons {
  display: flex;
  justify-content: center;
  gap: 15px;
}

.modal-buttons .btn {
  min-width: 100px;
}

/* Animações */
@keyframes fadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

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

/* Smooth scrolling melhorado */
.smooth-scroll {
  scroll-behavior: smooth;
}

/* Loading state para botões */
.btn.loading {
  position: relative;
  color: transparent;
}

.btn.loading::after {
  content: '';
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 20px;
  height: 20px;
  border: 2px solid #fff;
  border-top: 2px solid transparent;
  border-radius: 50%;
  animation: spin 1s linear infinite;
}

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

/* Efeitos de hover melhorados */
.service-item,
.project-card,
.contact-item {
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

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

/* Melhorias de acessibilidade para navegação por teclado */
.keyboard-nav *:focus {
  outline: 3px solid #0078d4;
  outline-offset: 2px;
}
