body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    margin: 0;
    padding: 0;
    background: #f3f4f6;
    color: #333;
}

main {
    padding: 20px;
    max-width: 1400px;
    margin: 0 auto;
}

section {
    padding: 30px 20px;
    margin: 20px auto;
    max-width: 1300px;
}

main h2,
main h3 {
    color: #1e3a8a;
    font-size: 2em;
    font-weight: bold;
    margin: 0 0 20px;
    padding: 0;
    text-align: left;
}

p {
    font-size: 1.1em;
    line-height: 1.7;
    text-align: justify;
    margin-bottom: 1em;
    padding: 0;
}

header {
    background: #1e3a8a;
    color: white;
    padding: 15px 30px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.3);
    position: sticky;
    top: 0;
    z-index: 100;
}

header h1 {
    margin: 0;
    font-size: 2em;
    text-transform: uppercase;
}

nav ul {
    list-style: none;
    display: flex;
    gap: 20px;
    padding: 0;
    margin: 0;
}

nav ul li a {
    color: white;
    text-decoration: none;
    font-weight: bold;
    padding: 8px 12px;
    border-radius: 8px;
    transition: 0.3s;
}

nav ul li a:hover {
    background: #facc15;
    color: #1e3a8a;
}

footer {
    background: #1e3a8a;
    color: white;
    text-align: center;
    padding: 20px;
    margin-top: 30px;
    font-size: 1em;
    font-weight: bold;
}

/* BANNER - PARENT FLEXBOX */
.banner {
    background: white;
    height: 180px;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.05);
    border-bottom: 3px solid #1e3a8a;
    position: relative;
    overflow: hidden;
}

.banner img {
    max-height: 100%;
    width: auto;
    object-fit: contain;
    padding: 10px;
}

/* NOVO CONTÊINER: GARANTE QUE H2 E P FIQUEM EM COLUNA */
.banner-content {
    display: flex;
    flex-direction: column; /* CRÍTICO: Coloca H2 e P um abaixo do outro */
    align-items: flex-start; /* Alinha o texto à esquerda dentro do content */
    flex-grow: 1;
    height: 100%; /* Ocupa a altura do banner */
    justify-content: center; /* Centraliza o bloco de texto verticalmente */
    padding: 0 20px;
}

.banner h2 {
    font-size: 3em;
    color: #1e3a8a;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1px;
    padding: 0;
    margin: 0;
    text-align: left; /* Garante que o H2 se alinhe ao novo contêiner */
}

/* Ajustes para os parágrafos */
.banner p {
    font-size: 1.2em;
    color: #333;
    margin: 3px 0; /* Margem menor para os parágrafos */
    text-align: left; /* Garante que os parágrafos se alinhem ao novo contêiner */
    line-height: 1.4;
    padding: 0;
    width: 100%;
}

.cursos-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 20px;
    margin-top: 20px;
    padding: 0 10px;
}

.curso-card {
    background: white;
    padding: 25px;
    border-radius: 12px;
    box-shadow: 0 5px 12px rgba(0,0,0,0.1);
    transition: 0.3s;
    text-align: center;
    text-decoration: none;
    color: inherit;
    display: block;
}

.curso-card:hover {
    transform: translateY(-6px) scale(1.03);
    box-shadow: 0 8px 18px rgba(0,0,0,0.2);
    color: #1e3a8a;
}

.curso-card h4 {
    margin: 0 0 15px;
    color: #2563eb;
    font-size: 1.4em;
    font-weight: bold;
}

.curso-card p {
    font-size: 1em;
    font-weight: normal;
    padding: 0;
}

table {
    width: 100%;
    max-width: 600px;
    margin: 20px auto 40px auto;
    border-collapse: collapse;
}

th, td {
    text-align: left;
    padding: 15px;
    border-bottom: 1px solid #ddd;
    font-size: 1.1em;
}

th {
    background-color: #e0e7ff;
    font-weight: bold;
    width: 30%;
}

.mapa-contato {
    text-align: center;
    margin: 40px auto;
    padding: 0;
    max-width: 100%;
}

.mapa-contato iframe {
    width: 100%;
    max-width: 100%;
    height: 400px;
    border-radius: 8px;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.1);
}

.endereco-colegio {
    text-align: center;
    padding-bottom: 20px;
    margin-top: 0;
}

.hero-cursos {
    background: url("bannercursos.png") center center / cover no-repeat;
    height: 300px;
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 40px auto;
    border-radius: 12px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.3);
    overflow: hidden;
    max-width: 1100px;
}

.hero-cursos::before {
    content: "";
    position: absolute;
    inset: 0;
    background: rgba(30, 58, 138, 0.5);
    border-radius: 12px;
    z-index: 0;
}

.hero-content {
    position: relative;
    z-index: 1;
    text-align: center;
}

.hero-cursos h2 {
    color: white;
    font-size: 3em;
    margin: 0;
    text-shadow: 2px 2px 5px rgba(0,0,0,0.8);
}

.cursos-item {
    margin: 20px 0;
    padding: 25px;
    background: #e0e7ff;
    border-radius: 12px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
    min-height: 250px;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
}
.cursos-item h2 {
    margin-bottom: 10px;
    font-size: 1.8em;
    padding: 0;
    text-align: center;
}

.categoria-videos {
    display: flex;
    overflow-x: auto;
    gap: 15px;
    margin: 30px 10px;
    padding-bottom: 15px;
}
.categoria-videos img {
    min-width: 280px;
    width: 280px;
    height: 200px;
    object-fit: cover;
    border-radius: 10px;
    transition: transform 0.3s;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    display: block;
    margin: 0;
}
.categoria-videos img:hover {
    transform: scale(1.03);
}

.noticias-article {
    display: flex;
    align-items: flex-start;
    margin: 30px 0;
    padding: 0 10px;
    gap: 20px;
    background: white;
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
}

.noticias-article h2 {
    font-size: 1.5em;
    color: #2563eb;
    margin-top: 15px;
    margin-bottom: 10px;
    padding: 0;
}

.noticias-article img {
    flex-shrink: 0;
    width: 250px;
    height: 180px;
    object-fit: cover;
    border-radius: 8px;
    margin: 20px 0 0 0;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
}

.noticias-content {
    padding: 20px 0;
}
.noticias-content p {
    padding: 0;
    font-size: 1em;
}

#menu-turmas {
    padding: 15px;
    background: #eef2ff;
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
    margin-bottom: 30px;
}

#menu-turmas h2 {
    color: #1e3a8a;
    font-size: 1.5em;
    text-align: left;
    margin-bottom: 15px;
    padding-bottom: 5px;
}

.turmas-container {
    display: flex;
    flex-wrap: wrap;
    gap: 25px;
    list-style: none;
    padding: 0;
    margin: 0;
}

.grupo-turmas {
    flex-basis: auto;
}

.grupo-turmas strong {
    display: block;
    margin-bottom: 5px;
    font-size: 1.1em;
    color: #2563eb;
    border-bottom: 1px dashed #a5b4fc;
}

#menu-turmas ul {
    list-style: none;
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    padding: 0;
    margin-top: 5px;
}

#menu-turmas ul li {
    margin: 0;
    font-weight: normal;
}
#menu-turmas hr {
    border-color: #a5b4fc;
    margin: 15px 0;
}

nav ul li a.tab-link {
    display: inline-block;
    padding: 6px 10px;
    text-decoration: none;
    color: #333;
    background-color: #f7f9ff;
    border-radius: 4px;
    transition: background-color 0.3s, color 0.3s, box-shadow 0.3s;
    font-size: 0.9em;
    font-weight: normal;
    white-space: nowrap;
    box-shadow: 0 1px 3px rgba(0,0,0,0.1);
}

nav ul li a.tab-link:hover {
    background-color: #dbeafe;
    color: #1e3a8a;
}

nav ul li a.tab-link.active {
    background-color: #1e3a8a;
    color: white;
    font-weight: bold;
    box-shadow: 0 3px 6px rgba(0,0,0,0.3);
}

#conteudo {
    margin-top: 0;
    padding: 0;
    background-color: transparent;
    border-radius: 0;
    box-shadow: none;
    overflow-x: auto;
}

.tabela-horario h2 {
    color: #1e3a8a;
    font-size: 1.8em;
    border-bottom: 2px solid #a5b4fc;
    padding-bottom: 10px;
    margin-bottom: 20px;
    text-align: center;
}

.tabela-horario table {
    width: 100%;
    border-collapse: collapse;
    margin: 0;
    font-size: 0.9em;
    min-width: 650px;
}

.tabela-horario th, .tabela-horario td {
    border: 1px solid #c9d2f7;
    padding: 12px 8px;
    text-align: center;
}

.tabela-horario th {
    background-color: #2563eb;
    color: white;
    font-weight: bold;
    white-space: nowrap;
    text-transform: uppercase;
}

.tabela-horario tr td:first-child {
    background-color: #f0f4ff;
    font-weight: bold;
    color: #1e3a8a;
}

/* MEDIA QUERIES */

@media screen and (max-width: 900px) {
    
    header {
        justify-content: center;
        text-align: center;
    }
    header h1 {
        font-size: 1.8em;
    }
    nav ul {
        margin-top: 10px;
        justify-content: center;
        flex-wrap: wrap;
        gap: 10px;
    }

    /* BANNER MOBILE - Todos os itens empilhados e centralizados */
    .banner {
        height: auto;
        flex-direction: column;
        padding: 15px 0;
        justify-content: center;
    }
    
    /* Faz o bloco de texto (banner-content) ocupar a largura total no mobile */
    .banner-content {
        align-items: center; /* Centraliza tudo (h2 e p) */
        padding: 0 10px;
        text-align: center;
    }

    .banner img {
        max-height: 80px;
        margin-bottom: 5px;
    }

    .banner h2 {
        font-size: 2em;
        text-align: center; /* Centraliza o H2 no mobile */
    }

    .banner p {
        font-size: 1em; 
        margin: 3px 0;
        text-align: center; /* Centraliza os parágrafos no mobile */
    }
    
    .turmas-container {
        flex-direction: column;
        gap: 15px;
    }
    .grupo-turmas strong {
        border-bottom: none;
        font-size: 1.2em;
        text-align: center;
        background-color: #dbeafe;
        padding: 5px 0;
        border-radius: 4px;
    }
    #menu-turmas ul {
        justify-content: center;
        margin-top: 5px;
    }

    .noticias-article {
        flex-direction: column;
        gap: 0;
    }

    .noticias-article img {
        width: 100%;
        height: auto;
        max-height: 250px;
        margin: 10px auto 20px auto;
    }

    .noticias-content {
        padding: 10px 0 20px 0;
    }
}

@media screen and (max-width: 600px) {
    
    .banner h2 {
        font-size: 1.5em;
    }
    
    .tabela-horario table {
        min-width: 550px;
    }
}

@media screen and (max-width: 500px) {
    
    .tabela-contato,
    .tabela-contato tbody,
    .tabela-contato tr,
    .tabela-contato th,
    .tabela-contato td {
        display: block;
    }

    .tabela-contato tr {
        margin-bottom: 15px;
    }
    .tabela-contato th {
        text-align: center;
        background-color: #e0e7ff;
        border: 1px solid #ddd;
    }
    .tabela-contato td {
        text-align: center;
        border: none;
        padding-top: 5px;
        padding-bottom: 15px;
    }
}