/* =========================
   REPOSIÇÃO GERAL
========================= */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    --background: #1A1D2B;
    --cards: #24283B;
    --sidebar: #171B2B;
    --accent: #00C853;
    --text-primary: #FFFFFF;
    --text-secondary: #94A3B8;
    --border: rgba(255, 255, 255, 0.08);
    --shadow: 0 12px 32px rgba(0, 0, 0, 0.28);
    --radius: 16px;
    --container: 1200px;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: "Inter", sans-serif;
    font-size: 16px;
    font-weight: 400;
    line-height: 1.6;
    background: var(--background);
    color: var(--text-primary);
}

img {
    max-width: 100%;
    display: block;
}

a {
    text-decoration: none;
    color: inherit;
}

ul {
    list-style: none;
}

/* =========================
   TIPOGRAFIA
========================= */
h1,
h2,
h3 {
    font-family: "Montserrat", sans-serif;
    color: var(--text-primary);
}

h1 {
    font-size: 32px;
    font-weight: 700;
    line-height: 1.2;
}

h2 {
    font-size: 24px;
    font-weight: 600;
    line-height: 1.25;
}

h3 {
    font-size: 20px;
    font-weight: 600;
    line-height: 1.3;
}

p {
    font-family: "Inter", sans-serif;
    font-size: 16px;
    font-weight: 400;
    color: var(--text-secondary);
}

small {
    font-size: 12px;
    font-weight: 300;
    color: var(--text-secondary);
}

/* =========================
   CLASSES UTILITÁRIAS
========================= */
.container {
    width: min(90%, var(--container));
    margin: 0 auto;
}

.section {
    padding: 90px 0;
}

.center {
    text-align: center;
}

.section-tag {
    display: inline-block;
    margin-bottom: 12px;
    font-family: "Inter", sans-serif;
    font-size: 14px;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: var(--accent);
}

.section-heading {
    max-width: 720px;
    margin: 0 auto 50px;
}

.section-heading h2 {
    margin-bottom: 14px;
}

.section-heading p {
    color: var(--text-secondary);
}

/* =========================
   BOTÕES
========================= */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 12px 22px;
    border-radius: 999px;
    border: 1px solid transparent;
    cursor: pointer;
    transition: 0.25s ease;
    font-family: "Inter", sans-serif;
    font-size: 14px;
    font-weight: 500;
    text-transform: uppercase;
}

.btn-primary {
    background: var(--accent);
    color: #FFFFFF;
}

.btn-primary:hover {
    transform: translateY(-2px);
    filter: brightness(1.05);
}

.btn-secondary {
    background: transparent;
    border-color: rgba(255, 255, 255, 0.18);
    color: var(--text-primary);
}

.btn-secondary:hover {
    border-color: var(--accent);
    color: var(--accent);
}

.btn-outline {
    background: transparent;
    border-color: var(--accent);
    color: var(--accent);
}

.btn-outline:hover {
    background: var(--accent);
    color: #FFFFFF;
}

/* =========================
   CABEÇALHO
========================= */
.header {
    position: sticky;
    top: 0;
    z-index: 1000;
    background: rgba(26, 29, 43, 0.96);
    border-bottom: 1px solid var(--border);
    backdrop-filter: blur(10px);
}

.nav {
    min-height: 82px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
}

.logo {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    font-family: "Montserrat", sans-serif;
    font-size: 24px;
    font-weight: 700;
    color: var(--text-primary);
    white-space: nowrap;
}

.logo-img {
    width: 48px;
    height: 48px;
    object-fit: contain;
    flex-shrink: 0;
}

.logo span {
    color: var(--accent);
}

.navbar {
    display: flex;
    align-items: center;
    gap: 24px;
}

.navbar a {
    font-family: "Inter", sans-serif;
    font-size: 14px;
    font-weight: 500;
    text-transform: uppercase;
    color: var(--text-primary);
    transition: 0.25s ease;
}

.navbar a:hover,
.navbar a.active {
    color: var(--accent);
}

.menu-toggle {
    display: none;
    background: transparent;
    border: none;
    color: var(--text-primary);
    font-size: 28px;
    cursor: pointer;
}

/* =========================
   HERO DA PÁGINA INICIAL
========================= */
.hero {
    min-height: calc(100vh - 82px);
    display: flex;
    align-items: center;
    background:
        linear-gradient(rgba(26, 29, 43, 0.70), rgba(26, 29, 43, 0.82)),
        url("../img/cavalos/hero.jpg") center/cover no-repeat;
}

.hero-content {
    max-width: 760px;
}

.hero-kicker {
    margin-bottom: 14px;
    font-family: "Inter", sans-serif;
    font-size: 14px;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: var(--accent);
}

.hero h1 {
    margin-bottom: 18px;
}

.hero-text {
    max-width: 640px;
    margin-bottom: 30px;
    color: var(--text-secondary);
}

.hero-buttons {
    display: flex;
    gap: 14px;
    flex-wrap: wrap;
}

/* =========================
   HERO DAS PÁGINAS INTERNAS
========================= */
.page-hero {
    padding: 110px 0 70px;
    background: linear-gradient(180deg, rgba(36, 40, 59, 0.85), rgba(26, 29, 43, 1));
    border-bottom: 1px solid var(--border);
}

.page-hero-content {
    max-width: 760px;
}

.page-hero-content h1 {
    margin-bottom: 16px;
}

.page-hero-content p {
    max-width: 680px;
}

/* =========================
   SECÇÃO SOBRE
========================= */
.about-grid {
    display: grid;
    grid-template-columns: 1.2fr 1fr;
    gap: 28px;
    align-items: start;
}

.about-text h2 {
    margin-bottom: 18px;
}

.about-text p {
    margin-bottom: 14px;
    color: var(--text-secondary);
}

.about-card {
    display: grid;
    gap: 18px;
}

.info-box {
    background: var(--cards);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 24px;
    box-shadow: var(--shadow);
}

.info-box h3 {
    margin-bottom: 10px;
}

.info-box p {
    color: var(--text-secondary);
}

/* =========================
   SERVIÇOS
========================= */
.cards-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 22px;
}

.card {
    background: var(--cards);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 28px;
    box-shadow: var(--shadow);
    transition: transform 0.25s ease, border-color 0.25s ease;
}

.card:hover {
    transform: translateY(-4px);
    border-color: rgba(0, 200, 83, 0.35);
}

.card h3 {
    margin-bottom: 12px;
}

.card p {
    color: var(--text-secondary);
}

.service-layout {
    display: grid;
    grid-template-columns: 1.3fr 0.9fr;
    gap: 24px;
    align-items: start;
}

.service-detail,
.service-list-box {
    background: var(--cards);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 30px;
    box-shadow: var(--shadow);
}

.service-detail h2,
.service-list-box h3 {
    margin-bottom: 16px;
}

.service-detail p {
    margin-bottom: 14px;
}

.service-list {
    display: grid;
    gap: 12px;
}

.service-list li {
    color: var(--text-secondary);
    position: relative;
    padding-left: 18px;
}

.service-list li::before {
    content: "";
    width: 8px;
    height: 8px;
    background: var(--accent);
    border-radius: 50%;
    position: absolute;
    left: 0;
    top: 9px;
}

/* =========================
   LINHA TEMPORAL
========================= */
.timeline {
    max-width: 900px;
    margin: 0 auto;
    display: grid;
    gap: 24px;
}

.timeline-item {
    display: grid;
    grid-template-columns: 24px 1fr;
    gap: 18px;
    align-items: start;
}

.timeline-marker {
    width: 14px;
    height: 14px;
    background: var(--accent);
    border-radius: 50%;
    margin-top: 18px;
    box-shadow: 0 0 0 6px rgba(0, 200, 83, 0.12);
}

.timeline-card {
    background: var(--cards);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 24px;
    box-shadow: var(--shadow);
}

.timeline-card h3 {
    margin-bottom: 10px;
}

/* =========================
   CONTACTOS
========================= */
.contact-modern-grid {
    display: grid;
    grid-template-columns: 0.9fr 1.1fr;
    gap: 28px;
    align-items: stretch;
}

.contact-panel,
.contact-form-panel {
    background: var(--cards);
    border: 1px solid var(--border);
    border-radius: 24px;
    padding: 34px;
    box-shadow: var(--shadow);
}

.contact-panel h2,
.contact-form-panel h2 {
    margin-bottom: 14px;
}

.contact-panel > p {
    margin-bottom: 28px;
}

.contact-item-list {
    display: grid;
    gap: 16px;
}

.contact-item {
    display: flex;
    gap: 16px;
    align-items: flex-start;
    padding: 18px;
    border-radius: 16px;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid var(--border);
}

.contact-icon {
    width: 44px;
    height: 44px;
    border-radius: 50%;
    background: rgba(0, 200, 83, 0.12);
    color: var(--accent);
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.contact-item h3 {
    margin-bottom: 4px;
    font-size: 17px;
}

.contact-item a {
    color: var(--text-secondary);
}

.contact-item a:hover {
    color: var(--accent);
}

.contact-form-panel .contact-form {
    display: grid;
    gap: 18px;
}

.contact-form-panel .form-group {
    display: grid;
    gap: 8px;
}

.contact-form-panel .form-group label {
    font-family: "Inter", sans-serif;
    font-size: 14px;
    font-weight: 500;
    color: var(--text-primary);
}

.contact-form-panel .form-group input,
.contact-form-panel .form-group textarea {
    width: 100%;
    padding: 14px 16px;
    border-radius: 12px;
    border: 1px solid var(--border);
    background: var(--background);
    color: var(--text-primary);
    font-family: "Inter", sans-serif;
    font-size: 16px;
    outline: none;
}

.contact-form-panel .form-group input::placeholder,
.contact-form-panel .form-group textarea::placeholder {
    color: var(--text-secondary);
}

.contact-form-panel .form-group input:focus,
.contact-form-panel .form-group textarea:focus {
    border-color: rgba(0, 200, 83, 0.5);
}

.contact-form-panel .btn {
    width: fit-content;
}

/* =========================
   MAPA
========================= */
.map-section {
    padding-top: 0;
}

.map-box-modern {
    background: var(--cards);
    border: 1px solid var(--border);
    border-radius: 24px;
    padding: 30px;
    box-shadow: var(--shadow);
}

.map-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 24px;
    margin-bottom: 22px;
}

.map-embed {
    border-radius: 18px;
    overflow: hidden;
    border: 1px solid var(--border);
    background: var(--background);
}

.map-embed iframe {
    display: block;
}

/* =========================
   CAVALOS
========================= */
.horse-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 22px;
}

.horse-card {
    background: var(--cards);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    overflow: hidden;
    box-shadow: var(--shadow);
    transition: transform 0.25s ease, border-color 0.25s ease;
    display: flex;
    flex-direction: column;
    height: 100%;
}

.horse-card:hover {
    transform: translateY(-4px);
    border-color: rgba(0, 200, 83, 0.35);
}

.horse-image {
    width: 100%;
    height: 260px;
    overflow: hidden;
    background: var(--sidebar);
    position: relative;
}

.horse-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center;
    display: block;
}

.horse-content {
    padding: 22px;
    display: flex;
    flex-direction: column;
    flex: 1;
}

.horse-content h3 {
    margin-bottom: 12px;
}

.horse-content p {
    margin-bottom: 8px;
    color: var(--text-secondary);
}

.horse-content .btn {
    margin-top: auto;
    align-self: flex-start;
}

/* =========================
   FILTROS DOS CAVALOS
========================= */
.horse-filters {
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    gap: 12px;
    margin-bottom: 32px;
}

.horse-filter-btn {
    padding: 10px 18px;
    border-radius: 999px;
    border: 1px solid var(--border);
    background: var(--cards);
    color: var(--text-primary);
    font-family: "Inter", sans-serif;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: 0.25s ease;
}

.horse-filter-btn:hover,
.horse-filter-btn.active {
    background: var(--accent);
    border-color: var(--accent);
    color: #FFFFFF;
}

/* =========================
   MENSAGEM DO FORMULÁRIO DE CONTACTO
========================= */
.mensagem-contacto {
    margin-top: 6px;
    font-size: 14px;
    font-weight: 500;
    min-height: 22px;
}

.mensagem-contacto.sucesso {
    color: #22c55e;
}

.mensagem-contacto.erro {
    color: #ef4444;
}

/* =========================
   CAIXAS DE ESTADO
========================= */
.status-box {
    background: var(--cards);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 22px;
    margin-bottom: 24px;
    text-align: center;
    box-shadow: var(--shadow);
}

.status-error {
    border-color: rgba(255, 82, 82, 0.35);
}

/* =========================
   CHAMADA À ACÇÃO
========================= */
.cta {
    padding: 0 0 90px;
}

.cta-box {
    background: var(--cards);
    border: 1px solid var(--border);
    border-radius: 20px;
    padding: 36px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
    box-shadow: var(--shadow);
}

.cta-box h2 {
    margin: 10px 0 12px;
}

.cta-box p {
    max-width: 640px;
    color: var(--text-secondary);
}

/* =========================
   RODAPÉ
========================= */
.footer {
    background: var(--background);
    padding: 48px 0;
}

.footer-box {
    background: var(--sidebar);
    border: 1px solid var(--border);
    border-radius: 8px;
    min-height: 350px;
    padding: 58px 24px 36px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 26px;
    text-align: center;
    box-shadow: var(--shadow);
}

.footer-brand-center h3 {
    margin-bottom: 8px;
    font-size: 26px;
}

.footer-brand-center p {
    color: var(--text-secondary);
}

.footer-social {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 14px;
}

.footer-social a {
    width: 52px;
    height: 52px;
    border-radius: 50%;
    background: var(--text-primary);
    color: var(--sidebar);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 22px;
    transition: 0.25s ease;
}

.footer-social a:hover {
    background: var(--accent);
    color: #FFFFFF;
    transform: translateY(-3px);
}

.footer-bottom {
    border-top: none;
    padding: 0;
}

.footer-bottom p {
    margin-bottom: 8px;
    font-size: 14px;
    font-weight: 500;
    color: var(--text-primary);
}

.footer-bottom p:last-child {
    margin-bottom: 0;
    color: var(--text-secondary);
}

.footer-extra {
    margin-top: 8px;
    display: flex;
    flex-direction: column;
    gap: 6px;
    align-items: center;
}

.admin-link {
    font-size: 12px;
    color: var(--text-secondary);
    opacity: 0.6;
    transition: 0.3s ease;
}

.admin-link:hover {
    color: var(--accent);
    opacity: 1;
}

/* =========================
   DESTAQUE DA PÁGINA HISTÓRIA
========================= */
.history-feature-grid {
    display: grid;
    grid-template-columns: 0.95fr 1.05fr;
    gap: 36px;
    align-items: center;
}

.history-feature-image {
    height: 480px;
    border-radius: 24px;
    overflow: hidden;
    border: 1px solid var(--border);
    box-shadow: var(--shadow);
    background: var(--cards);
}

.history-feature-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.history-feature-content {
    background: var(--cards);
    border: 1px solid var(--border);
    border-radius: 24px;
    padding: 40px;
    box-shadow: var(--shadow);
}

.history-feature-content h2 {
    margin-bottom: 18px;
}

.history-feature-content p {
    margin-bottom: 14px;
}

.history-highlight {
    margin-top: 26px;
    padding: 22px;
    border-radius: 18px;
    background: rgba(0, 200, 83, 0.08);
    border: 1px solid rgba(0, 200, 83, 0.18);
}

.history-highlight h3 {
    margin-bottom: 10px;
}

.history-highlight p {
    margin-bottom: 0;
}

/* =========================
   DESTAQUE DA PÁGINA SERVIÇOS
========================= */
.service-feature-grid {
    display: grid;
    grid-template-columns: 1.05fr 0.95fr;
    gap: 36px;
    align-items: center;
}

.service-feature-content {
    background: var(--cards);
    border: 1px solid var(--border);
    border-radius: 24px;
    padding: 40px;
    box-shadow: var(--shadow);
}

.service-feature-content h2 {
    margin-bottom: 18px;
}

.service-feature-content p {
    margin-bottom: 14px;
}

.service-feature-list {
    margin-top: 26px;
    box-shadow: none;
}

.service-feature-image {
    height: 480px;
    border-radius: 24px;
    overflow: hidden;
    border: 1px solid var(--border);
    box-shadow: var(--shadow);
    background: var(--cards);
}

.service-feature-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center;
}

/* =========================
   RESPONSIVIDADE
========================= */
@media (max-width: 992px) {
    .about-grid,
    .footer-grid,
    .cta-box,
    .service-layout,
    .contact-grid,
    .contact-modern-grid,
    .history-feature-grid,
    .service-feature-grid {
        grid-template-columns: 1fr;
    }

    .cards-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .horse-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .cta-box {
        align-items: flex-start;
    }

    .history-feature-image,
    .service-feature-image {
        height: 420px;
    }

    .map-header {
        align-items: flex-start;
        flex-direction: column;
    }
}

@media (max-width: 768px) {
    .navbar {
        position: absolute;
        top: 82px;
        right: 5%;
        display: none;
        flex-direction: column;
        align-items: flex-start;
        min-width: 220px;
        padding: 20px;
        background: var(--cards);
        border: 1px solid var(--border);
        border-radius: 16px;
        box-shadow: var(--shadow);
    }

    .navbar.show {
        display: flex;
    }

    .menu-toggle {
        display: block;
    }

    .nav .btn {
        display: none;
    }

    .logo {
        font-size: 19px;
    }

    .logo-img {
        width: 30px;
        height: 30px;
    }

    .cards-grid,
    .horse-grid {
        grid-template-columns: 1fr;
    }

    .section {
        padding: 70px 0;
    }

    h1 {
        font-size: 32px;
    }

    .page-hero {
        padding: 90px 0 60px;
    }

    .timeline-item {
        grid-template-columns: 1fr;
    }

    .timeline-marker {
        display: none;
    }

    .contact-panel,
    .contact-form-panel,
    .map-box-modern,
    .history-feature-content,
    .service-feature-content {
        padding: 24px;
    }

    .contact-item {
        padding: 16px;
    }

    .history-feature-image,
    .service-feature-image {
        height: 320px;
    }

    .horse-image {
        height: 240px;
    }
}