/* =========================
   VARIÁVEIS (cores & sombras)
========================= */
:root {
    --bg: #f5f5f5;
    --text: #222;
    --muted: #444;
    --header-bg: #1b1b1b;
    --primary: #e63946;
    --primary-dark: #d62828;
    --accent: #a92c2c;
    --card-bg: #fff;
    --shadow-sm: 0 2px 6px rgba(0, 0, 0, 0.1);
    --shadow-md: 0 6px 12px rgba(0, 0, 0, 0.15);
    --shadow-lg: 0 12px 20px rgba(0, 0, 0, 0.2);
    --hover-bg: #121212;
}

/* =========================
   RESET E BASE
========================= */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Arial', sans-serif;
}

body, html {
    height: 100%;
    margin: 0;
    background-color: var(--bg);
    color: var(--text);
    line-height: 1.6;
    transition: background-color 0.3s, color 0.3s;
}

a {
    text-decoration: none;
    color: inherit;
    text-align: center;
}

ul {
    list-style: none;
}

img,
svg {
    display: block;
    max-width: 100%;
}

.icon {
    width: 36px;
    height: 36px;
    transition: transform 0.3s ease;
}

.icon:hover {
    transform: translateY(-2px) scale(1.05);
}

/* Foco acessível */
a:focus-visible,
button:focus-visible,
[role="button"]:focus-visible {
    outline: 3px solid var(--primary);
    outline-offset: 3px;
}

#page-container {
    display: flex;
    flex-direction: column;
    min-height: 100vh;
}

#content-wrap {
    flex: 1;
}

/* =========================
   ANIMAÇÕES GLOBAIS
========================= */
@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes slideInLeft {
    from {
        opacity: 0;
        transform: translateX(-40px);
    }

    to {
        opacity: 1;
        transform: translateX(0);
    }
}

@keyframes slideInRight {
    from {
        opacity: 0;
        transform: translateX(40px);
    }

    to {
        opacity: 1;
        transform: translateX(0);
    }
}

@keyframes zoomIn {
    from {
        transform: scale(0.94);
        opacity: 0;
    }

    to {
        transform: scale(1);
        opacity: 1;
    }
}

/* Aplica fade-in em seções ao carregar com delays suaves */
section,
.about,
.courses,
.history,
footer {
    animation: fadeIn 0.9s ease forwards;
    opacity: 0;
}

.about {
    animation-delay: 0.1s;
}

.services-list {
    animation-delay: 0.2s;
}

.courses {
    animation-delay: 0.3s;
}

.history {
    animation-delay: 0.4s;
}

footer {
    animation-delay: 0.5s;
}

/* Respeita preferência do usuário por menos movimento */
@media (prefers-reduced-motion: reduce) {
    * {
        animation: none !important;
        transition: none !important;
        scroll-behavior: auto !important;
    }
}

/* =========================
   HEADINGS & TEXT
========================= */
h2,
h3,
h4 {
    margin-top: 2rem;
    text-align: center;
}

.about p {
    margin: 1rem 2.5rem 0 2.5rem;
}

/* =========================
   DIVIDER
========================= */
.category-divider {
    border-top: 2px solid var(--hover-bg);
    margin: 2rem auto;
    width: 80%;
}

/* =========================
   NAVBAR
========================= */
header {
    background-color: var(--header-bg);
    padding: 0.5rem 1rem;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.3);
    position: sticky;
    top: 0;
    z-index: 100;
    transition: background-color 0.3s, box-shadow 0.3s;
}

header nav {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
}

header .logo {
    display: flex;
    align-items: center;
    gap: 0.6rem;
    color: #fff;
    /* garante branco */
}

header .logo img.logo-img {
    height: 45px;
    border-radius: 5px;
    transition: transform 0.3s ease, filter 0.3s ease;
}

header .logo img.logo-img:hover {
    transform: scale(1.05);
    filter: brightness(1.1);
}

header .logo span {
    font-weight: bold;
    font-size: 1rem;
    color: #fff;
    /* força cor branca */
}

/* === NAV LAYOUT (logo left, brand center, links right) === */
.main-nav {
    display: grid;
    grid-template-columns: 1fr auto 1fr;
    align-items: center;
    gap: 1rem;
    padding: 0.8rem 1rem;
    background: var(--header-bg);
    position: sticky;
    top: 0;
    z-index: 50;
}

.nav-left {
    justify-self: start;
}

.nav-center {
    justify-self: center;
}

.nav-right {
    justify-self: end;
}

.logo-img {
    height: 52px;
    border-radius: 8px;
}

.brand-name {
    font-size: 1.4rem;
    font-weight: 800;
    letter-spacing: 1px;
    text-transform: uppercase;
    color: #fff;
}

.nav-links {
    display: flex;
    gap: 1.2rem;
    align-items: center;
    flex-wrap: wrap; /* Adicionado para permitir o layout de coluna no mobile */
    justify-content: flex-end;
}

.nav-links li {
    list-style: none;
}

.nav-links a {
    color: #fff;
    padding: 0.5rem 1rem;
    border-radius: 5px;
    font-weight: 500;
    position: relative;
    overflow: hidden;
    transition: color 0.3s ease, background 0.3s ease;
}

/* hover e active */
.nav-links a.active,
.nav-links a:hover {
    background-color: var(--accent);
}

/* underline animado */
.nav-links a::after {
    content: "";
    position: absolute;
    left: 0;
    bottom: 0;
    width: 0%;
    height: 3px;
    background: var(--primary);
    transition: width 0.3s ease;
}

.nav-links a:hover::after {
    width: 100%;
}

/* Reviews */
.reviews {
    margin: 2rem 0;
}

.reviews-summary {
    text-align: center;
    margin-bottom: 1rem;
}

.reviews-list {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 1rem;
}

.review-item {
    background: var(--card-bg);
    border-radius: 12px;
    padding: 1rem;
    box-shadow: var(--shadow-sm);
}

.review-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 0.5rem;
}

.review-comment {
    color: var(--muted);
}

/* Map responsive */
.map {
    margin: 2rem 0;
}

.map-responsive {
    position: relative;
    padding-bottom: 40%;
    max-height: 320px;
    height: 0;
    overflow: hidden;
    border-radius: 12px;
    box-shadow: var(--shadow-sm);
}

.map-responsive iframe {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    border: 0;
}

/* =========================
   HERO
========================= */
.hero {
    position: relative;
    text-align: center;
    padding: 4rem 2rem;
    background: url('../images/hero.png') center/cover no-repeat;
    color: #fff;
    height: 80vh;
    min-height: 420px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    isolation: isolate;
    /* garante overlay por cima do bg */
}

/* overlay para legibilidade */
.hero::before {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(180deg, rgba(0, 0, 0, 0.55), rgba(0, 0, 0, 0.35));
    z-index: -1;
}

.hero h1 {
    font-size: 2.5rem;
    margin-bottom: 1rem;
    text-shadow: 2px 3px 4px #000;
    animation: slideInLeft 1.1s ease forwards;
    opacity: 0;
}

.hero p {
    font-size: 1.2rem;
    margin-bottom: 2rem;
    text-shadow: 1px 1.5px 2px #000;
    animation: slideInRight 1.1s ease forwards;
    animation-delay: 0.2s;
    opacity: 0;
}

.btn-primary {
    padding: 0.8rem 1.5rem;
    background-color: var(--primary);
    color: #fff;
    border-radius: 5px;
    width: 200px;
    max-width: 80%;
    margin: 0 auto;
    display: inline-block;
    transition: background 0.4s ease, transform 0.3s ease, box-shadow 0.3s ease;
    animation: zoomIn 0.9s ease forwards;
    animation-delay: 0.4s;
    opacity: 0;
}

.btn-primary:hover {
    background-color: var(--primary-dark);
    transform: translateY(-3px) scale(1.05);
    box-shadow: 0 6px 15px rgba(0, 0, 0, 0.2);
}

/* =========================
   CARDS / SERVIÇOS & ABOUT
========================= */
.services-list {
    display: grid;
    gap: 1.5rem;
    margin: 2rem 0;
    padding: 0 2rem;
    grid-template-columns: repeat(3, 1fr);
}

.services-list .card {
    padding: 0.8rem;
}

.services-list .card img {
    height: 300px;
    border-radius: 8px;
    object-fit: cover;
    margin-bottom: 0.5rem;
}

.about {
    text-align: center;
    padding: 2rem 1rem;
}

.about h2 {
    font-size: 1.8rem;
    margin-bottom: 2rem;
    font-weight: bold;
}

.about-card {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    max-width: 280px;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    animation: fadeIn 0.9s ease forwards;
    opacity: 0;
}

.about-card img {
    width: 180px;
    height: 180px;
    object-fit: cover;
    border-radius: 50%;
    margin-bottom: 1rem;
    transition: transform 0.4s ease, filter 0.4s ease;
}

.about-card:hover img {
    transform: scale(1.1);
    filter: brightness(1.1);
}

.card {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: flex-start;
    background: var(--card-bg);
    padding: 1rem;
    border-radius: 10px;
    box-shadow: var(--shadow-sm);
    transition: transform 0.4s ease, box-shadow 0.4s ease;
    animation: fadeIn 0.9s ease forwards;
    opacity: 0;
}

.card:hover {
    transform: translateY(-8px) scale(1.02);
    box-shadow: var(--shadow-lg);
}

.card img {
    width: 80%;
    height: 90%;
    object-fit: cover;
    border-radius: 8px;
    margin-bottom: 0.75rem;
    transition: transform 0.4s ease;
}

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

.card h3 {
    margin-bottom: 0.5rem;
    font-size: 1.2rem;
}

.card p {
    margin-bottom: 1rem;
    font-weight: bold;
    color: var(--muted);
}

.card button {
    background: #8ac996;
    color: #fff;
    border: none;
    padding: 0.6rem 1.2rem;
    border-radius: 6px;
    cursor: pointer;
    transition: background 0.3s ease, transform 0.2s ease, box-shadow 0.3s ease;
}

.card button:hover {
    background: #90c38b;
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
}

/* =========================
   TEAM
========================= */
.team {
    text-align: center;
    padding: 60px 20px;
    background-color: #f9f9f9;
}

.team h2 {
    font-size: 2.2rem;
    margin-bottom: 10px;
}

.team p {
    font-size: 1rem;
    color: #555;
    max-width: 700px;
    margin: 0 auto 40px auto;
}

.team h3 {
    margin-bottom: 40px;
    font-size: 1.5rem;
    color: #333;
}

.team-cards {
    display: flex;
    justify-content: center;
    gap: 40px;
    flex-wrap: wrap;
}

.team-card {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    background-color: #fff;
    padding: 1.5rem;
    border-radius: 10px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.team-card:hover {
    transform: translateY(-10px);
    box-shadow: 0 12px 30px rgba(0, 0, 0, 0.15);
}

.team-card img {
    width: 200px;
    height: 200px;
    object-fit: cover;
    border-radius: 50%;
    margin-bottom: 15px;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.team-card img:hover {
    transform: translateY(-10px);
    box-shadow: 0 12px 30px rgba(0, 0, 0, 0.15);
}

.team-card h4 {
    margin: 10px 0 5px 0;
    font-size: 1.1rem;
    color: #222;
}

.team-card p {
    font-size: 0.9rem;
    color: #666;
}

/* =========================
   COURSES SECTION
========================= */
.courses {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 2rem;
    padding: 3rem 2rem;
    background: #fff;
    border-radius: 12px;
    box-shadow: var(--shadow-sm);
}

.courses-content {
    flex: 1;
}

.courses-content h2 {
    font-size: 2rem;
    margin-bottom: 1rem;
    /* Ajuste para responsividade */
    text-align: center; 
    margin-left: 0;
}

.courses-content p {
    font-size: 1rem;
    margin-bottom: 1.5rem;
    /* Ajuste para responsividade */
    margin-left: 0; 
    text-align: center;
}

.courses-content .btn-primary {
    /* Ajuste para responsividade */
    margin: 1.5rem auto 0 auto; 
    display: block;
    opacity: 1;
    animation: none;
}

.courses-image {
    flex: 1;
    display: flex;
    justify-content: center;
    perspective: 1000px;
}

.courses-image img {
    width: 100%;
    max-width: 500px;
    height: 250px;
    border-radius: 10px;
    object-fit: cover;
    box-shadow: var(--shadow-sm);
    transition: transform 0.6s ease, box-shadow 0.4s ease;
    transform: rotateY(0deg);
}

.courses-image img:hover {
    transform: rotateY(-6deg) translateY(-4px) scale(1.01);
    box-shadow: var(--shadow-md);
}

/* =========================
   HISTORY
========================= */
.history {
    background-color: #fff;
    padding: 2rem;
    border-radius: 10px;
    max-width: 800px;
    margin: 2rem auto;
    line-height: 1.7;
    color: #222;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.history h4 {
    text-align: center;
    margin-bottom: 2rem;
    font-size: 1.6rem;
    color: #a92c2c;
}

.history p {
    margin-bottom: 1.5rem;
    text-align: justify;
    font-size: 1rem;
    position: relative;
    padding-left: 2rem;
    /* espaço para o ícone */
}

.history p .icon {
    position: absolute;
    left: 0;
    top: 0;
    font-size: 1.3rem;
}

.history .signature {
    text-align: center;
    font-weight: bold;
    color: #e63946;
    font-size: 1.1rem;
    margin-top: 2rem;
}

/* =========================
   LOGIN & FORMS
========================= */
.login-form,
form {
    background-color: #fff;
    padding: 2.5rem;
    border-radius: 10px;
    max-width: 450px;
    /* Ajuste para mobile */
    width: 95%; 
    margin: 2rem auto;
    box-shadow: 0 6px 12px rgba(0, 0, 0, 0.15);
}

.login-container h2,
.appointment h2 {
    margin-bottom: 0.5rem;
    text-align: center;
}

.login-options {
    display: flex;
    justify-content: space-between;
    margin: 1rem 0;
    font-size: 0.9rem;
}

.login-options a {
    color: #e63946;
    text-decoration: none;
    transition: color 0.3s;
}

.login-options a:hover {
    color: #d62828;
}

.login-form button.btn-primary {
    display: block;
    margin: 1.5rem auto 0 auto;
}

form label {
    display: block;
    margin-bottom: 0.3rem;
    font-weight: bold;
}

form input,
form select {
    width: 100%;
    padding: 0.8rem;
    margin-bottom: 1rem;
    border: 1px solid #ccc;
    border-radius: 5px;
    transition: border-color 0.25s ease, box-shadow 0.25s ease;
}

form input:focus,
form select:focus {
    border-color: var(--primary);
    box-shadow: 0 0 0 4px rgba(230, 57, 70, 0.15);
    outline: none;
}

form button {
    width: 100%;
    padding: 0.8rem;
    background-color: var(--primary);
    color: #fff;
    border: none;
    border-radius: 5px;
    cursor: pointer;
    font-size: 1rem;
    transition: background 0.3s ease, transform 0.2s ease;
}

form button:hover {
    background-color: var(--primary-dark);
    transform: translateY(-2px);
}

/* =========================
   FOOTER
========================= */
footer {
    background-color: #222;
    color: #fff;
    text-align: center;
    padding: 1rem;
}

footer .social {
    display: flex;
    justify-content: center;
    gap: 1rem;
    margin-top: 1rem;
}

footer .social img {
    width: 24px;
    height: 24px;
    filter: brightness(0) invert(1);
    transition: transform 0.2s ease, filter 0.2s ease;
}

footer .social img:hover {
    transform: scale(1.2) translateY(-2px);
    filter: brightness(1.2) invert(0.95);
}

/* =========================
   RESPONSIVO (MELHORIAS)
========================= */

@media (max-width: 992px) {
    .services-list {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 768px) {
        .main-nav {
        grid-template-columns: auto 1fr; 
        gap: 0.5rem 1rem;
        padding-bottom: 0.5rem;
    }
    
    .nav-left {
        grid-row: 1;
        grid-column: 1;
    }

    .nav-center {
        grid-row: 1;
        grid-column: 2;
        justify-self: end;
    }
    
    .nav-right {
        grid-row: 2; 
        grid-column: 1 / span 2; 
        justify-self: start;
        width: 100%;
    }

    .nav-links {
        justify-content: space-around; 
        gap: 0.5rem;
        padding-top: 0.5rem;
        border-top: 1px solid #333; 
    }

    .nav-links a {
        padding: 0.4rem 0.6rem;
        font-size: 0.9rem;
    }
    
    /* === HERO === */
    .hero {
        height: 50vh; 
        padding: 3rem 1.25rem;
    }

    .hero h1 {
        font-size: 2rem;
    }

    .hero p {
        font-size: 1rem;
    }
    
    /* === COURSES === */
    .courses {
        flex-direction: column;
        padding: 2rem 1rem;
    }
    
    .courses-image img {
        height: auto;
        max-height: 200px;
    }

    /* === TEAM === */
    .team-cards {
        gap: 20px;
    }
    
    .team-card img {
        width: 150px;
        height: 150px;
    }

    /* === REVIEWS/MAP === */
    .reviews-list {
        grid-template-columns: 1fr; 
        padding: 0 1rem;
    }
    
    .map-responsive {
        padding-bottom: 50%; 
    }

    .login-options {
        flex-direction: column;
        gap: 0.5rem;
        align-items: flex-start;
    }
}

@media (max-width: 600px) {
    .services-list {
        grid-template-columns: 1fr;
        padding: 0 1rem;
    }

    .card img {
        height: 320px;
    }

    .about p {
        margin: 1rem 1rem 0 1rem;
    }
    
    /* Ajustes específicos para smartphones */
    .nav-links {
        justify-content: space-between; 
    }
    
    .brand-name {
        font-size: 1.2rem;
    }

    .hero h1 {
        font-size: 1.8rem;
    }

    .btn-primary {
        width: 100%;
        max-width: 220px;
    }
}