/* Estilos básicos para o corpo */
body {
    font-family: 'Roboto', sans-serif;
    margin: 0;
    padding: 0;
    color: #333;
    transition: background-color 0.3s, color 0.3s;
    line-height: 1.6;
}

/* Modo escuro */
body.dark-mode {
    background-color: #1a1a1a;
    color: #f0f0f0;
}

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

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

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

header nav ul {
    list-style: none;
    display: flex;
    margin: 0;
    padding: 0;
    align-items: center;
}

header nav ul li {
    margin: 0 15px;
}

header nav ul li a {
    text-decoration: none;
    color: #fff;
    font-weight: 500;
    font-size: 14px;
}

/* Modo escuro: Switch */
header .switch {
    position: relative;
    display: inline-block;
    width: 40px;
    height: 20px;
}

header .switch input {
    opacity: 0;
    width: 0;
    height: 0;
}

header .slider {
    position: absolute;
    cursor: pointer;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: #ccc;
    transition: 0.4s;
    border-radius: 20px;
}

header .slider:before {
    position: absolute;
    content: "";
    height: 16px;
    width: 16px;
    left: 2px;
    bottom: 2px;
    background-color: white;
    transition: 0.4s;
    border-radius: 50%;
}

header input:checked + .slider {
    background-color: #2196F3;
}

header input:checked + .slider:before {
    transform: translateX(20px);
}

.logo {
    display: flex;
    align-items: center;
    margin-right: 20px;
}

.logo-image {
    width: 120px;
    height: auto;
}

/* Seção Hero */

.hero {
    position: relative;
    height: 80vh;
    max-height: 90vh; 
    overflow: hidden;
    margin: 0 auto; /* Centraliza a seção hero */
    padding: 0 20px; /* Margem interna dos lados */
    box-sizing: border-box; /* Garante que o padding não afete a largura total */
}

.hero-image {
    position: absolute;
    width: calc(100% - 40px); /* Ajusta a largura para compensar o padding */
    height: 100%;
    background-size: cover;
    background-position: center;
    border-radius: 10px;
    opacity: 0;
    transition: opacity 1s ease-in-out;
    left: 50%; /* Centraliza horizontalmente */
    transform: translateX(-50%); /* Corrige o posicionamento após centralizar */
}

.hero-image {
    object-fit: cover; /* Garante que a imagem se ajuste sem distorção */
}

.hero-image.fade-in {
    opacity: 1;
}

.hero-image.fade-out {
    opacity: 0;
}

.hero-text {
    position: relative;
    z-index: 2;
    color: #fff;
    text-shadow: 0 1px 3px rgba(0, 0, 0, 0.3);
    text-align: center;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    padding: 20px;
    background-color: rgba(0, 0, 0, 0.3); /* Fundo preto transparente */
    border-radius: 10px; /* Bordas arredondadas */
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    max-width: 50%; /* Limita a largura do texto para não ocupar toda a tela */
    box-sizing: border-box;
}

/* Seção Portfólio */
.portfolio {
    padding: 50px 20px;
    text-align: center;
}

.gallery {
    width: 90%;
    margin: 0 auto;
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(25%, 1fr));
    gap: 15px;
    padding: 20px 0;
}

.gallery-item {
    position: relative;
    width: 100%;
    padding-top: 100%;
    overflow: hidden;
    border-radius: 10px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    transition: transform 0.3s;
    cursor: pointer;
}

.gallery-item img {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center;
    border-radius: 10px;
}

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

.pagination {
    text-align: center;
    margin-top: 20px;
}

.pagination a {
    text-decoration: none;
    color: #333;
    margin: 0 5px;
    padding: 5px 10px;
    border-radius: 5px;
    transition: background-color 0.3s;
}

.pagination a.active, .pagination a:hover {
    background-color: #ddd;
}

/* Seção Serviços */
#services {
    padding: 50px 20px;
    text-align: center;
}

.services h2, .services p {
    max-width: 1200px;
    margin: 0 auto 20px auto;
    text-align: center;
    display: block;
}

.services-grid {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    align-items: flex-start; /* Alinha os itens ao topo para evitar desordem */
    gap: 20px;
    max-width: 1200px;
    margin: 0 auto;
}

.service-item i {
    font-size: 50px; /* Aumente esse valor para o tamanho desejado */
    margin-bottom: 10px;
}

.service-item {
    flex: 0 0 45%;
    text-align: center;
    padding: 20px;
    box-sizing: border-box;
}

/* Seção Sobre e Contato */
.about, .contact {
    padding: 50px 20px;
    text-align: center;
}

.contact-link {
    display: inline-block;
    margin: 10px 0;
    padding: 10px 20px;
    background-color: #25D366;
    color: #fff;
    text-decoration: none;
    border-radius: 5px;
    font-size: 18px;
    transition: background-color 0.3s;
}

.contact-link:hover {
    background-color: #1DA851;
}

.qr-code img {
    margin-top: 20px;
    width: 150px;
    height: 150px;
}

/* Rodapé */
footer {
    background-color: #333;
    color: #fff;
    padding: 20px;
    text-align: center;
}

footer .social a {
    color: #fff;
    margin: 0 10px;
    text-decoration: none;
    font-size: 20px;
}

footer .social a:hover {
    color: #ddd;
}

/* Modal (se for utilizado no futuro) */
.close {
    position: absolute;
    top: 10px;
    right: 25px;
    color: #fff;
    font-size: 30px;
    font-weight: bold;
    transition: 0.3s;
    cursor: pointer;
}

.close:hover {
    color: #bbb;
}

/* Responsividade */
@media (max-width: 768px) {
    .container {
        flex-direction: column;
        padding: 10px;
    }

    header nav ul {
        flex-direction: column;
        align-items: center;
    }

    header nav ul li {
        margin: 10px 0;
    }

    .logo-image {
        width: 100px;
    }

    .hero {
        height: 60vh;
    }

    .gallery {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 480px) {
    header {
        padding: 5px 0;
    }

    .gallery {
        grid-template-columns: 1fr;
    }
}
