.side-nav {
    position: fixed;
    top: 0;
    left: 0;
    height: 100vh;
    width: 180px;
    background: #003366;
    display: flex;
    flex-direction: column;
    align-items: stretch;
    justify-content: flex-start;
    z-index: 200;
}
.side-nav .side-logo {
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #003366;
    padding: 18px 0 12px 0;
    border-bottom: 1px solid #004080;
}
.side-nav .side-logo img {
    max-width: 90px;
    height: auto;
    display: block;
    z-index: 100;
    box-shadow: 2px 0 8px rgba(0,0,0,0.07);
}

.side-nav ul {
    list-style: none;
    padding: 0;
    margin: 0;
    width: 100%;
    display: flex;
    flex-direction: column;
    align-items: stretch;
    gap: 0;
    margin-top: 30px;
}
.side-nav li {
    width: 100%;
}
.side-nav a {
    display: block;
    width: 100%;
    min-width: 140px;
    box-sizing: border-box;
    padding: 18px 0 18px 0;
    color: #fff;
    text-decoration: none;
    font-weight: bold;
    text-align: center;
    border-bottom: 1px solid #004080;
    border-left: 4px solid transparent;
    background: #003366;
    font-size: 1.13em;
    letter-spacing: 1px;
    transition: background 0.2s, border-left 0.2s, color 0.2s;
}
.side-nav a:hover {
    background: #0055a5;
    border-left: 4px solid #fff;
    color: #fff;
}
.side-nav .active, .side-nav a.active {
    background: #fff;
    color: #003366 !important;
    border-left: 4px solid #0055a5;
    font-weight: bold;
    cursor: default;
    /* pointer-events: none; removido para evitar bug visual */
}
.header-flex {
    display: flex;
    align-items: center;
    justify-content: space-between;
    position: relative;
    width: 100%;
    padding: 0 30px;
    max-width: calc(100vw - 180px);
}
.header-flex h1 {
    text-align: left;
    margin: 0;
    font-size: 2em;
}
.admin-btn {
    background: #fff;
    color: #003366 !important;
    padding: 8px 24px;
    border-radius: 6px;
    border: 2px solid #fff;
    font-weight: bold;
    font-size: 0.95em;
    transition: all 0.3s ease;
    text-decoration: none;
    flex-shrink: 0;
    margin-left: auto;
    margin-right: 20px;
    box-shadow: 0 2px 6px rgba(0,0,0,0.15);

}
.admin-btn:hover {
    background: #0055a5;
    color: #fff !important;
    border-color: #fff;
    transform: translateY(-2px);
    box-shadow: 0 4px 10px rgba(0,0,0,0.25);
}
.site-logo {
    max-width: 90px;
    height: auto;
    margin-bottom: 0;
    margin-right: 24px;
    margin-left: 0;
    display: block;
    position: absolute;
    left: 0;
    top: 0;
}
/* Barra de rolagem personalizada */
html {
    scrollbar-width: thin;
    scrollbar-color: #003366 #e0e6ed;
}
::-webkit-scrollbar {
    width: 12px;
    background: #e0e6ed;
}
::-webkit-scrollbar-thumb {
    background: #003366;
    border-radius: 8px;
    border: 2px solid #e0e6ed;
}
::-webkit-scrollbar-thumb:hover {
    background: #0055a5;
}
::-webkit-scrollbar-corner {
    background: #e0e6ed;
}
/* Estilo para tela de login admin */
.admin-login {
    max-width: 350px;
    margin: 60px auto 0 auto;
    background: #fff;
    padding: 30px 24px 24px 24px;
    border-radius: 8px;
    box-shadow: 0 2px 12px rgba(0,0,0,0.12);
    display: flex;
    flex-direction: column;
    gap: 14px;
}
.admin-login label {
    font-weight: bold;
    margin-bottom: 4px;
}
.admin-login input {
    padding: 8px;
    border: 1px solid #ccc;
    border-radius: 4px;
    font-size: 1em;
}
.admin-login button {
    background: #003366;
    color: #fff;
    border: none;
    padding: 10px;
    border-radius: 4px;
    cursor: pointer;
    font-size: 1em;
    margin-top: 10px;
    font-weight: bold;
    transition: background 0.2s;
}
.admin-login button:hover {
    background: #0055a5;
}
/* Centralizar main na tela de login admin */
body.admin-page > main {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    min-height: 80vh;
}
body {
    font-family: Arial, Helvetica, sans-serif;
    margin: 0;
    padding: 0;
    background: #f4f4f4;
    color: #222;
    overflow-x: hidden;
}
html {
    overflow-x: hidden;
}
header {
    background: #003366;
    color: #fff;
    padding: 28px 0 18px 0;
    text-align: left;
    position: relative;
    min-height: 90px;
    margin-left: 180px;
    max-width: calc(100vw - 180px);
    overflow-x: hidden;
}

nav ul {
    list-style: none;
    padding: 0;
    margin: 0;
    display: flex;
    justify-content: center;
    gap: 20px;
}
nav a {
    color: #fff;
    text-decoration: none;
    font-weight: bold;
}
nav a:hover {
    text-decoration: underline;
}

main {
    margin: 0 0 60px 180px;
    min-height: calc(100vh - 180px);
    width: calc(100vw - 180px);
    max-width: calc(100vw - 180px);
    background: #fff;
    padding: 40px;
    box-sizing: border-box;
    border-radius: 0;
    box-shadow: none;
    position: relative;
    z-index: 1;
    overflow-x: hidden;
    /* Background com imagem AI.webp */
    background-image: url('../img/AI01.jpg');
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
}
.intro {
    max-width: 900px;
    margin: 0;
    padding: 20px;
    background: rgba(255, 255, 255, 0.9);
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
}
.intro h2 {
    color: #003366;
    margin-top: 0;
    margin-bottom: 15px;
    font-size: 1.8em;
}
.intro p {
    font-size: 1.1em;
    line-height: 1.6;
    color: #444;
}
.projects-list, .contact-form {
    margin-bottom: 30px;
}
.projects-list {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 20px;
    align-items: start;
}
.projects-list h2 {
    grid-column: 1 / -1;
    margin-bottom: 20px;
}
.projects-list .project {
    border: 1px solid #ddd;
    padding: 15px;
    border-radius: 8px;
    background: rgba(255, 255, 255, 0.95);
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}
.projects-list .project:hover {
    transform: translateY(-5px);
    box-shadow: 0 4px 15px rgba(0,0,0,0.2);
}
.projects-list img {
    max-width: 100%;
    width: 100%;
    height: auto;
    display: block;
    margin: 10px 0;
    border-radius: 4px;
}
.watch-btn {
    background: #003366;
    color: #fff;
    border: none;
    padding: 10px 20px;
    border-radius: 6px;
    cursor: pointer;
    font-size: 1em;
    font-weight: bold;
    margin: 15px 0;
    transition: all 0.3s ease;
    box-shadow: 0 2px 6px rgba(0,0,0,0.15);
}
.watch-btn:hover {
    background: #0055a5;
    transform: translateY(-2px);
    box-shadow: 0 4px 10px rgba(0,0,0,0.25);
}
.contact-form form {
    display: flex;
    flex-direction: column;
    gap: 10px;
}
.contact-form input, .contact-form textarea {
    padding: 8px;
    border: 1px solid #ccc;
    border-radius: 4px;
}
.contact-form button {
    background: #003366;
    color: #fff;
    border: none;
    padding: 10px;
    border-radius: 4px;
    cursor: pointer;
    font-size: 1em;
}
.contact-form button:hover {
    background: #0055a5;
}

.contact-info {
    max-width: 800px;
    margin: 0;
}
.contact-info h2, .contact-info h3 {
    margin-left: 0;
    text-align: left;
}
.contact-info ul {
    list-style: none;
    padding: 0;
    margin: 0 0 20px 0;
    font-size: 1.1em;
    text-align: left;
}
.contact-info li {
    margin-bottom: 10px;
}
.contact-info a {
    color: #003366;
    text-decoration: underline;
}
.contact-info a:hover {
    color: #0055a5;
}
.map-container {
    width: 100%;
    max-width: 600px;
    margin: 0;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
}
footer {
    background: #003366;
    color: #fff;
    text-align: center;
    padding: 15px 0;
    position: fixed;
    width: 100%;
    bottom: 0;
}
@media (max-width: 600px) {
    .side-nav {
        position: static;
        width: 100%;
        height: auto;
        flex-direction: row;
        padding-top: 0;
        box-shadow: none;
    }
    .side-nav .side-logo {
        display: none;
    }
    .side-nav ul {
        display: flex;
        flex-direction: row;
        width: 100%;
    }
    .side-nav li {
        width: auto;
    }
    .side-nav a {
        padding: 12px 10px;
        border-bottom: none;
        border-right: 1px solid #004080;
    }
    .side-nav a:last-child {
        border-right: none;
    }
    header, .header-flex, main {
        margin-left: 0;
        width: 100vw;
    }
    main {
        min-height: fixed;
        padding: 10px;
    }
    .projects-list {
        grid-template-columns: 1fr;
    }
    .projects-list img {
        max-width: 100%;
    }
}

@media (min-width: 601px) and (max-width: 900px) {
    .projects-list {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (min-width: 901px) and (max-width: 1200px) {
    .projects-list {
        grid-template-columns: repeat(3, 1fr);
    }
}
