/* Modal de Zoom */
.modal {
  display: none;
  position: fixed;
  z-index: 9999;
  left: 0;
  top: 0;
  width: 100%;
  height: 100%;
  overflow: auto;
  background-color: rgba(0, 0, 0, 0.9);
}

.modal-content {
  margin: auto;
  display: block;
  max-width: 90%;
  max-height: 90%;
  margin-top: 2%;
}

.close {
  position: absolute;
  top: 20px;
  right: 35px;
  color: #fff;
  font-size: 40px;
  font-weight: bold;
  cursor: pointer;
}

.close:hover,
.close:focus {
  color: #bbb;
}

.prev,
.next {
  cursor: pointer;
  position: absolute;
  top: 50%;
  width: auto;
  padding: 16px;
  margin-top: -50px;
  color: white;
  font-weight: bold;
  font-size: 20px;
  transition: 0.6s ease;
  border-radius: 0 3px 3px 0;
  user-select: none;
}

.next {
  right: 0;
  border-radius: 3px 0 0 3px;
}

.prev:hover,
.next:hover {
  background-color: rgba(0, 0, 0, 0.8);
}

/* Carrossel */
.carousel {
  position: relative;
  max-width: 800px;
  margin: auto;
  text-align: center;
  display: flex;
  justify-content: center;
  align-items: center;
}

.carousel img {
  width: 100%;
  height: 400px; /* altura fixa */
  object-fit: cover;
  border-radius: 8px;
  cursor: zoom-in;
}

.carousel-btn {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  background-color: rgba(0, 0, 0, 0.5);
  color: white;
  border: none;
  padding: 12px 18px;
  font-size: 24px;
  cursor: pointer;
  border-radius: 4px;
  z-index: 10;
}

.carousel-btn.prev {
  left: 10px;
}

.carousel-btn.next {
  right: 10px;
}

.carousel-thumbs {
  display: flex;
  justify-content: center;
  gap: 10px;
  margin-top: 15px;
  flex-wrap: wrap;
}

.carousel-thumbs img {
  width: 80px;
  height: 60px;
  object-fit: cover;
  border-radius: 4px;
  cursor: pointer;
  opacity: 0.7;
  transition: opacity 0.3s;
}

.carousel-thumbs img:hover,
.carousel-thumbs img.active {
  opacity: 1;
  border: 2px solid #4d9eff;
}

/* Centralizar seção de projetos */
#conteudo .container {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
}

/* Centralizar botão de orçamento */
.banner-content .btn-primary {
  margin: 20px auto 0;
  display: block;
}

/* Menu Mobile */
.menu-toggle {
  display: none;
  background: none;
  border: none;
  font-size: 28px;
  color: #fff;
  cursor: pointer;
  margin-left: auto;
  margin-right: 20px;
}

.gallery {
    grid-template-columns: repeat(2, 1fr);
    display: grid;
    gap: 1.5rem;
    margin-top: 2rem;
}

@media (max-width: 768px) {
  /* Header mais baixo no mobile */
  header {
    padding: 6px 12px;
  }
    .gallery {
        display: grid;
        gap: 1.5rem;
        margin-top: 2rem;
        grid-template-columns: repeat(1, 1fr);
    }

  .menu-toggle {
      display: block;
  }

    /* Rodapé com margens laterais */
    footer {
        padding-left: 20px;
        padding-right: 20px;
        text-align: left;
    }

  /* Reduzir altura do logo */
  .logo img {
    height: 36px;
    width: auto;
  }

  /* Menu mobile ocupando largura total logo abaixo do header */
  nav { position: relative; }
  .menu {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    width: 100%;
    background: #222;
    padding: 8px 0;
  }

  .menu.active { display: block; }

  .menu ul {
    display: flex;
    flex-direction: column;
    gap: 0;
    width: 100%;
    margin: 0;
    padding: 0;
    text-align: center;
  }

  .menu ul li { width: 100%; }
  .menu ul li a {
    display: block;
    width: 100%;
    padding: 12px 16px;
    text-align: center;
  }

  /* Centralizar galeria em 1 coluna */
  #conteudo .container {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
  }

  .carousel {
    width: 100%;
    max-width: 100%;
    margin: 0 auto;
  }

  .carousel img {
    height: 300px;
    width: 100%;
    object-fit: cover;
  }

  /* Galeria mobile: só imagem grande */
  .carousel-thumbs {
    display: none;
  }
}

/* Estilos gerais */
html {
    scroll-behavior: smooth;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

/* Header fixo com flexbox */
header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 10px 20px;
  background-color: #111;
  position: sticky;
  top: 0;
  z-index: 1000;
  width: 100%;
}

.logo img {
  height: 50px; /* padrão desktop */
  width: auto;
}

/* Estilos para mensagem de sucesso do formulário */
.success-message {
    text-align: center;
    padding: 30px;
    background-color: rgba(77, 158, 255, 0.1);
    border-radius: 8px;
    margin: 20px 0;
}

.success-message i {
    font-size: 48px;
    color: #4d9eff;
    margin-bottom: 15px;
}

.success-message h3 {
    color: #ffffff;
    margin-bottom: 10px;
}

.success-message p {
    color: #cccccc;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    line-height: 1.6;
    color: #e0e0e0;
    background-color: #222;
}

.section-description {
    text-align: center;
    max-width: 800px;
    margin: 0 auto 2rem;
    color: #aaaaaa;
    font-size: 1.1rem;
    line-height: 1.6;
}

/* Estilos do cabeçalho */
header {
    background-color: rgba(0, 0, 0, 0.8);
    position: fixed;
    width: 100%;
    top: 0;
    z-index: 1000;
    padding: 15px 0;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.2);
}

nav {
    display: flex;
    justify-content: space-between;
    align-items: center;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

.logo img {
    height: 40px;
}

.menu ul {
    display: flex;
    list-style: none;
}

.menu li {
    margin-left: 2rem;
}

.menu a {
    text-decoration: none;
    color: #e0e0e0;
    font-weight: 500;
    font-size: 1.1rem;
    transition: color 0.3s ease;
}

.menu a:hover {
    color: #4d9eff;
}

/* Banner */
.banner {
    background-color: #1a1a1a;
    color: #ffffff;
    padding: 6rem 5%;
    text-align: center;
    margin-top: 70px;
    width: 100%;
    background-image: linear-gradient(rgba(0, 0, 0, 0.7), rgba(0, 0, 0, 0.7)), url('https://source.unsplash.com/1600x400/?technology');
    background-size: cover;
    background-position: center;
    position: relative;
}

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

.banner h1 {
    font-size: 3rem;
    margin-bottom: 1rem;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.5);
}

.banner p {
    font-size: 1.5rem;
    margin-bottom: 2rem;
    opacity: 0.9;
}

.btn-primary {
    background-color: #0066cc;
    color: white;
    border: none;
    padding: 0.8rem 2rem;
    font-size: 1.1rem;
    border-radius: 4px;
    cursor: pointer;
    transition: background-color 0.3s ease;
}

.btn-primary:hover {
    background-color: #0055aa;
}

/* Conteúdo principal */
main {
    padding: 0;
    max-width: 100%;
    margin-left: auto;
    margin-right: auto;
}

/* Seções */
.section {
    padding: 5rem 5%;
    width: 100%;
}

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

/* Seção Sobre */
.about-features {
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    margin-top: 3rem;
}

.feature {
    flex: 1;
    min-width: 250px;
    text-align: center;
    margin: 1rem;
    padding: 1.5rem;
    background-color: #333;
    border-radius: 8px;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.3);
    transition: transform 0.3s, box-shadow 0.3s;
}

.feature:hover {
    transform: translateY(-5px);
    box-shadow: 0 6px 12px rgba(0, 0, 0, 0.4);
}

.feature i {
    font-size: 2.5rem;
    color: #4d9eff;
    margin-bottom: 1rem;
}

.feature h4 {
    color: #ffffff;
    margin-bottom: 0.5rem;
}

.feature p {
    color: #aaaaaa;
    font-size: 0.9rem;
}

.section h2 {
    font-size: 2.5rem;
    margin-bottom: 2rem;
    text-align: center;
    color: #4d9eff;
}

/* Serviços */
.services-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
    margin-top: 3rem;
}

.service-card {
    background-color: #333;
    padding: 2rem;
    border-radius: 8px;
    text-align: center;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.3);
    transition: transform 0.3s ease;
}

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

.service-card i {
    font-size: 3rem;
    color: #4d9eff;
    margin-bottom: 1.5rem;
}

.service-card h3 {
    font-size: 1.5rem;
    margin-bottom: 1rem;
    color: #ffffff;
}

.service-card p {
    color: #cccccc;
}

/* Formulário de contato */
.contact-form {
    max-width: 600px;
    margin: 0 auto;
    background-color: #333;
    padding: 2rem;
    border-radius: 8px;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.3);
}

.form-group {
    margin-bottom: 1.5rem;
}

.form-group label {
    display: block;
    margin-bottom: 0.5rem;
    color: #e0e0e0;
}

.form-group input,
.form-group textarea {
    width: 100%;
    padding: 0.8rem;
    border: 1px solid #444;
    border-radius: 4px;
    background-color: #222;
    color: #e0e0e0;
    font-family: inherit;
}

.form-group input:focus,
.form-group textarea:focus {
    outline: none;
    border-color: #4d9eff;
    box-shadow: 0 0 0 2px rgba(77, 158, 255, 0.2);
}

.contact-form .btn-primary {
    width: 100%;
    margin-top: 1rem;
}

.content-container {
    position: relative;
    min-height: 50vh;
    padding: 3rem 5%;
    background-color: #1a1a1a;
}

.grid-container {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1.5rem;
    margin-top: 2rem;
}

.project-card {
    position: relative;
    overflow: hidden;
    border-radius: 8px;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.3);
    transition: transform 0.3s ease;
}

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

.project-image {
    width: 100%;
    height: 250px;
    object-fit: cover;
    display: block;
}

.card {
    background-color: #333;
    border-radius: 8px;
    overflow: hidden;
    margin-bottom: 1.5rem;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.3);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    display: flex;
    flex-direction: column;
}

.card:hover {
    transform: translateY(-5px);
    box-shadow: 0 6px 12px rgba(0, 0, 0, 0.4);
}

.card-image {
    width: 100%;
    height: 200px;
    overflow: hidden;
}

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

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

.card-content {
    padding: 1.5rem;
    flex: 1;
    display: flex;
    flex-direction: column;
}

.card h3 {
    color: #ffffff;
    margin-top: 0;
    margin-bottom: 1rem;
    font-size: 1.2rem;
}

.card p {
    color: #cccccc;
    margin-bottom: 1rem;
    flex: 1;
}

.card .client {
    color: #4d9eff;
    font-size: 0.95rem;
    margin-bottom: 0.5rem;
}

.card .date {
    color: #aaaaaa;
    font-size: 0.9rem;
    text-align: right;
    margin-top: auto;
}

/* Loading spinner */
.loading {
    display: flex;
    justify-content: center;
    padding: 2rem 0;
    width: 100%;
}

.spinner {
    width: 40px;
    height: 40px;
    border: 4px solid rgba(0, 0, 0, 0.1);
    border-radius: 50%;
    border-top-color: #0066cc;
    animation: spin 1s ease-in-out infinite;
}

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

/* Footer */
footer {
    background-color: #111;
    color: #e0e0e0;
    padding: 3rem 0 1rem;
    margin-top: 2rem;
}

.footer-content {
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    margin-bottom: 2rem;
}

.footer-logo {
    flex: 1;
    min-width: 200px;
    margin-bottom: 1.5rem;
}

.footer-logo p {
    margin-top: 0.5rem;
    font-size: 0.9rem;
    color: #aaaaaa;
}

.footer-links, .footer-services, .footer-contact {
    flex: 1;
    min-width: 200px;
    margin-bottom: 1.5rem;
}

footer h4 {
    color: #ffffff;
    margin-bottom: 1rem;
    font-size: 1.2rem;
}

footer ul {
    list-style: none;
    padding: 0;
    margin: 0;
}

footer ul li {
    margin-bottom: 0.5rem;
}

footer ul li a {
    color: #aaaaaa;
    text-decoration: none;
    transition: color 0.3s;
}

footer ul li a:hover {
    color: #4d9eff;
}

.footer-contact p {
    margin: 0.5rem 0;
    color: #aaaaaa;
}

/* Links do WhatsApp no footer e na área de contato */
.contact-info a,
.footer-contact a {
    color: #4d9eff;
    text-decoration: none;
    font-weight: 600;
}

.contact-info a:hover,
.footer-contact a:hover {
    text-decoration: underline;
}

.contact-container {
    text-align: center;
}

.footer-contact i {
    margin-right: 0.5rem;
    color: #4d9eff;
}

.footer-bottom {
    border-top: 1px solid #333;
    padding-top: 1.5rem;
    text-align: center;
}

.footer-bottom p {
    margin: 0.5rem 0;
    font-size: 0.9rem;
    color: #777777;
}

/* Responsividade */
@media (max-width: 768px) {
    .banner {
        padding: 4rem 1rem;
        margin-top: 140px;
    }

    .footer-content {
        padding-left: 2rem;
        padding-right: 2rem;
    }
    
    .banner h1 {
        font-size: 2rem;
    }
    
    .banner p {
        font-size: 1.2rem;
    }
    
    nav {
        display: flex;
        flex-direction: row;
        align-items: center;
        justify-content: space-between;
        padding: 1rem;
        width: 100%;
    }

    /* Menu mobile: ocupa 100% quando aberto e links centralizados */
    .menu {
        display: none;
        background-color: #222;
        position: absolute;
        top: 60px;
        left: 0;
        right: 0;
        width: 100%;
        padding: 8px 0;
    }

    .menu.active { display: block; }
    
    .menu ul {
        flex-direction: column;
        width: 100%;
        text-align: center;
        margin-bottom: 1rem;
        gap: 0;
        padding: 0;
    }

    .menu ul li { width: 100%; }
    .menu ul li a {
        display: block;
        width: 100%;
        padding: 12px 16px;
        text-align: center;
    }

    /* Garantir logo à esquerda e botão à direita */
    .logo { margin-top: 0; }
    .menu-toggle { margin-left: auto; }
    
    .menu li {
        margin-right: 0;
        margin-bottom: 0.5rem;
    }
    
    .logo {
        margin-top: 1rem;
    }
    
    main {
        margin-top: 140px;
    }
    
    #infinite-content {
        grid-template-columns: 1fr;
    }
    /* Forçar galeria a 1 coluna 100% */
    #grid-container, .gallery { display: block !important; width: 100%; }
    .carousel { width: 100%; max-width: 100%; margin: 0 auto; }
}

@media (min-width: 769px) and (max-width: 1024px) {
    #infinite-content {
        grid-template-columns: repeat(2, 1fr);
    }
}