/* Reset e Estilos Globais */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

:root {
  --color-primary: #0056b3;
  --color-secondary: #28a745;
  --color-dark: #333;
  --color-light: #f8f9fa;
  --color-gray: #6c757d;
  --color-light-gray: #e9ecef;
  --color-white: #fff;
  --font-family: 'Roboto', sans-serif;
}

html {
  scroll-behavior: smooth;
}

body {
  font-family: var(--font-family);
  line-height: 1.6;
  color: var(--color-dark);
  background-color: var(--color-white);
  overflow-x: hidden;
}

.container {
  width: 100%;
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 15px;
}

a {
  text-decoration: none;
  color: var(--color-primary);
  transition: color 0.3s ease;
}

a:hover {
  color: var(--color-secondary);
}

ul {
  list-style: none;
}

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

.btn {
  display: inline-block;
  padding: 12px 24px;
  background-color: var(--color-primary);
  color: var(--color-white);
  border: none;
  border-radius: 4px;
  font-size: 16px;
  font-weight: 500;
  cursor: pointer;
  transition: background-color 0.3s ease;
}

.btn:hover {
  background-color: #0048a0;
  color: var(--color-white);
}

.title {
  font-size: 32px;
  margin-bottom: 30px;
  text-align: center;
  position: relative;
  padding-bottom: 15px;
}

.title::after {
  content: '';
  display: block;
  width: 60px;
  height: 3px;
  background-color: var(--color-primary);
  position: absolute;
  bottom: 0;
  left: 50%;
  transform: translateX(-50%);
}

section {
  padding: 80px 0;
}

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

#header.scrolled {
  background-color: rgba(255, 255, 255, 0.95);
  box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
}

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

.logo h1 {
  font-size: 24px;
  color: var(--color-primary);
}

#nav {
  display: flex;
  align-items: center;
}

#menu {
  display: flex;
  gap: 20px;
}

#menu a {
  color: var(--color-dark);
  font-weight: 500;
  transition: color 0.3s ease;
}

#menu a:hover {
  color: var(--color-primary);
}

#btn-mobile {
  display: none;
}

/* Hero Section */
.hero {
  background: linear-gradient(rgba(0, 0, 0, 0.6), rgba(0, 0, 0, 0.6)), url('https://source.unsplash.com/random/1920x1080/?technology') no-repeat center/cover;
  height: 100vh;
  display: flex;
  align-items: center;
  text-align: center;
  color: var(--color-white);
  margin-top: 0;
  padding-top: 80px;
}

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

.hero h2 {
  font-size: 48px;
  margin-bottom: 20px;
  text-shadow: 2px 2px 5px rgba(0, 0, 0, 0.5);
  animation: fadeInUp 1s ease-out;
}

.hero p {
  font-size: 20px;
  margin-bottom: 30px;
  text-shadow: 1px 1px 3px rgba(0, 0, 0, 0.5);
  animation: fadeInUp 1s ease-out 0.2s both;
}

.hero .btn {
  animation: fadeInUp 1s ease-out 0.4s both;
}

/* Serviços */
.servicos {
  background-color: var(--color-light);
}

.servicos-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
  gap: 30px;
}

.servico-item {
  background-color: var(--color-white);
  border-radius: 8px;
  padding: 30px;
  text-align: center;
  box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

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

.icon {
  font-size: 40px;
  color: var(--color-primary);
  margin-bottom: 20px;
}

.servico-item h3 {
  font-size: 20px;
  margin-bottom: 15px;
}

.servico-item p {
  margin-bottom: 20px;
}

.btn-sm {
  padding: 8px 16px;
  font-size: 14px;
  margin-top: 10px;
}

/* Sobre */
.sobre-content {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
}

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

.sobre-text h2 {
  text-align: left;
}

.sobre-text h2::after {
  left: 0;
  transform: none;
}

.sobre-text p {
  margin-bottom: 15px;
}

/* Portfolio */
.portfolio {
  background-color: var(--color-light);
}

.portfolio-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 30px;
}

.portfolio-item {
  background-color: var(--color-white);
  border-radius: 8px;
  overflow: hidden;
  box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
  transition: transform 0.3s ease;
}

.portfolio-item:hover {
  transform: translateY(-10px);
}

.portfolio-img {
  height: 200px;
  background-color: var(--color-light-gray);
  background: url('https://source.unsplash.com/random/600x400/?tech') no-repeat center/cover;
}

.portfolio-item:nth-child(2) .portfolio-img {
  background-image: url('https://source.unsplash.com/random/600x400/?ecommerce');
}

.portfolio-item:nth-child(3) .portfolio-img {
  background-image: url('https://source.unsplash.com/random/600x400/?factory');
}

.portfolio-item:nth-child(4) .portfolio-img {
  background-image: url('https://source.unsplash.com/random/600x400/?dashboard');
}

.portfolio-info {
  padding: 20px;
}

.portfolio-info h3 {
  font-size: 18px;
  margin-bottom: 10px;
}

/* Contato */
.contato-container {
  display: flex;
  flex-wrap: wrap;
  gap: 40px;
}

.contato-info, .contato-form {
  flex: 1;
  min-width: 300px;
}

.info-item {
  display: flex;
  margin-bottom: 20px;
  align-items: flex-start;
}

.info-item i {
  font-size: 20px;
  color: var(--color-primary);
  margin-right: 15px;
  margin-top: 5px;
}

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

label {
  display: block;
  margin-bottom: 5px;
  font-weight: 500;
}

input, textarea {
  width: 100%;
  padding: 10px;
  border: 1px solid #ddd;
  border-radius: 4px;
  font-family: var(--font-family);
  font-size: 16px;
}

textarea {
  resize: vertical;
}

.btn-submit {
  background-color: var(--color-secondary);
  width: 100%;
}

.btn-submit:hover {
  background-color: #218838;
}

/* Footer */
footer {
  background-color: var(--color-dark);
  color: var(--color-white);
  padding: 60px 0 0;
}

.footer-content {
  display: flex;
  flex-wrap: wrap;
  gap: 30px;
  margin-bottom: 40px;
}

.footer-logo, .footer-links, .footer-services, .footer-social {
  flex: 1;
  min-width: 200px;
}

.footer-logo h3 {
  font-size: 20px;
  margin-bottom: 10px;
}

.footer-links h4, .footer-services h4, .footer-social h4 {
  font-size: 18px;
  margin-bottom: 15px;
  position: relative;
  padding-bottom: 10px;
}

.footer-links h4::after, .footer-services h4::after, .footer-social h4::after {
  content: '';
  display: block;
  width: 40px;
  height: 2px;
  background-color: var(--color-primary);
  position: absolute;
  bottom: 0;
  left: 0;
}

.footer-links ul, .footer-services ul {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.footer-links a {
  color: var(--color-light);
  transition: color 0.3s ease;
}

.footer-links a:hover {
  color: var(--color-primary);
}

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

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

.social-icons a:hover {
  background-color: var(--color-primary);
}

.footer-bottom {
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  padding: 20px 0;
  text-align: center;
  font-size: 14px;
}

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

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

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

/* Responsividade */
@media (max-width: 992px) {
  .hero h2 {
    font-size: 36px;
  }

  .hero p {
    font-size: 18px;
  }

  .title {
    font-size: 28px;
  }
}

@media (max-width: 768px) {
  #btn-mobile {
    display: flex;
    padding: 0.5rem 1rem;
    font-size: 1rem;
    border: none;
    background: none;
    cursor: pointer;
    gap: 0.5rem;
  }

  #hamburger {
    display: block;
    width: 20px;
    border-top: 2px solid;
    color: var(--color-dark);
  }

  #hamburger::after, #hamburger::before {
    content: '';
    display: block;
    width: 20px;
    height: 2px;
    background: currentColor;
    margin-top: 5px;
    transition: 0.3s;
    position: relative;
  }

  #menu {
    display: block;
    position: absolute;
    width: 100%;
    top: 70px;
    right: 0;
    background: var(--color-white);
    height: 0;
    transition: 0.6s;
    visibility: hidden;
    overflow-y: hidden;
    z-index: 1000;
  }

  #nav.active #menu {
    height: calc(100vh - 70px);
    visibility: visible;
    overflow-y: auto;
  }

  #menu a {
    display: block;
    padding: 1rem 0;
    margin: 0 1rem;
    border-bottom: 2px solid rgba(0, 0, 0, 0.05);
  }

  #nav.active #hamburger {
    border-top-color: transparent;
  }

  #nav.active #hamburger::before {
    transform: rotate(135deg);
    top: -7px;
  }

  #nav.active #hamburger::after {
    transform: rotate(-135deg);
    top: -9px;
  }

  .hero h2 {
    font-size: 30px;
  }

  .servicos-grid, .portfolio-grid {
    grid-template-columns: 1fr;
  }

  .contato-container {
    flex-direction: column;
  }

  .footer-content {
    flex-direction: column;
    gap: 40px;
  }
}

@media (max-width: 576px) {
  .hero h2 {
    font-size: 24px;
  }

  .hero p {
    font-size: 16px;
  }

  .title {
    font-size: 24px;
  }

  section {
    padding: 60px 0;
  }
}
