/*
Theme Name: ASFEM
Theme URI: https://asfem-ma.com.br/
Author: Alitec
Description: Custom theme for the ASFEM WordPress portal.
Version: 0.1.0
Requires at least: 6.5
Tested up to: 6.9
Requires PHP: 8.3
Text Domain: asfem
*/

:root {
    --asfem-blue: #0f4c81;
    --asfem-blue-dark: #0a3155;
    --asfem-green: #21855b;
    --asfem-gold: #d8a12f;
    --asfem-ink: #1f2933;
    --asfem-muted: #5d6875;
    --asfem-line: #d9e1ea;
    --asfem-soft: #f4f7fa;
    --asfem-white: #ffffff;
    --asfem-radius: 8px;
    --asfem-shadow: 0 12px 30px rgba(15, 76, 129, 0.12);
}

* {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    margin: 0;
    background: var(--asfem-white);
    color: var(--asfem-ink);
    font-family: Arial, Helvetica, sans-serif;
    font-size: 16px;
    line-height: 1.6;
}

a {
    color: var(--asfem-blue);
}

a:hover,
a:focus {
    color: var(--asfem-blue-dark);
}

img {
    display: block;
    height: auto;
    max-width: 100%;
}

.skip-link {
    background: var(--asfem-blue-dark);
    color: var(--asfem-white);
    left: 1rem;
    padding: 0.75rem 1rem;
    position: absolute;
    top: -4rem;
    z-index: 100;
}

.skip-link:focus {
    top: 1rem;
}

.site-header {
    background: var(--asfem-white);
    border-bottom: 1px solid var(--asfem-line);
    position: sticky;
    top: 0;
    z-index: 20;
}

.site-header__inner,
.site-footer__inner,
.section__inner,
.content-layout,
.archive-header {
    margin: 0 auto;
    max-width: 1180px;
    padding: 0 1.25rem;
}

.site-header__inner {
    align-items: center;
    display: flex;
    gap: 1.5rem;
    justify-content: space-between;
    min-height: 78px;
}

.brand {
    align-items: center;
    color: var(--asfem-ink);
    display: inline-flex;
    gap: 0.75rem;
    text-decoration: none;
}

.brand a {
    text-decoration: none;
}

.brand__text {
    color: var(--asfem-ink);
}

.brand__mark,
.brand__logo,
.custom-logo {
    align-items: center;
    border-radius: 50%;
    display: inline-flex;
    flex: 0 0 auto;
    height: 56px;
    justify-content: center;
    object-fit: contain;
    width: 56px;
}

.brand__mark {
    background: var(--asfem-blue);
    color: var(--asfem-white);
    font-weight: 700;
}

.brand__name {
    display: block;
    font-size: 1.25rem;
    font-weight: 700;
    line-height: 1.1;
}

.brand__tagline {
    color: var(--asfem-muted);
    display: block;
    font-size: 0.8rem;
}

.site-nav ul {
    align-items: center;
    display: flex;
    gap: 0.25rem;
    list-style: none;
    margin: 0;
    padding: 0;
}

.site-nav a {
    border-radius: var(--asfem-radius);
    color: var(--asfem-ink);
    display: inline-block;
    font-weight: 700;
    padding: 0.65rem 0.8rem;
    text-decoration: none;
}

.site-nav a:hover,
.site-nav .current-menu-item > a {
    background: var(--asfem-soft);
    color: var(--asfem-blue);
}

.hero {
    background: linear-gradient(135deg, var(--asfem-blue-dark), var(--asfem-blue));
    color: var(--asfem-white);
}

.hero__inner {
    align-items: center;
    display: grid;
    gap: 2.5rem;
    grid-template-columns: minmax(0, 1.15fr) minmax(260px, 0.85fr);
    margin: 0 auto;
    max-width: 1180px;
    min-height: 520px;
    padding: 5rem 1.25rem;
}

.hero__eyebrow,
.section__eyebrow {
    color: var(--asfem-gold);
    font-weight: 700;
    margin: 0 0 0.75rem;
    text-transform: uppercase;
}

.hero h1 {
    font-size: clamp(2.4rem, 5vw, 4.8rem);
    line-height: 1;
    margin: 0;
    max-width: 760px;
}

.hero__copy {
    font-size: 1.2rem;
    margin: 1.25rem 0 0;
    max-width: 650px;
}

.hero__actions,
.section__actions {
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
    margin-top: 1.75rem;
}

.button,
.wp-block-button__link,
button,
input[type="submit"] {
    background: var(--asfem-blue);
    border: 0;
    border-radius: var(--asfem-radius);
    color: var(--asfem-white);
    cursor: pointer;
    display: inline-flex;
    font-weight: 700;
    justify-content: center;
    padding: 0.8rem 1rem;
    text-decoration: none;
}

.button:hover,
.button:focus,
.wp-block-button__link:hover,
.wp-block-button__link:focus {
    background: var(--asfem-blue-dark);
    color: var(--asfem-white);
}

.button--light {
    background: var(--asfem-white);
    color: var(--asfem-blue-dark);
}

.button--outline {
    background: transparent;
    border: 1px solid rgba(255, 255, 255, 0.7);
    color: var(--asfem-white);
}

.hero__visual {
    align-self: stretch;
    border-radius: var(--asfem-radius);
    display: grid;
    margin: 0;
    min-height: 320px;
    overflow: hidden;
    place-items: center;
    position: relative;
}

.hero__visual::before {
    content: "";
    inset: 0;
    position: absolute;
}

.hero__visual img {
    max-width: min(560px, 120%);
    position: relative;
    z-index: 1;
}

.hero__visual figcaption {
    background: rgba(10, 49, 85, 0.82);
    bottom: 0;
    color: var(--asfem-white);
    font-size: 0.95rem;
    left: 0;
    margin: 0;
    padding: 1rem;
    position: absolute;
    right: 0;
    z-index: 1;
}

.section {
    padding: 4rem 0;
}

.section--soft {
    background: var(--asfem-soft);
}

.section__header {
    display: flex;
    gap: 2rem;
    justify-content: space-between;
    margin-bottom: 2rem;
}

.section__header h2,
.archive-header h1,
.entry-title {
    font-size: clamp(1.8rem, 3vw, 2.8rem);
    line-height: 1.12;
    margin: 0;
}

.section__header p {
    color: var(--asfem-muted);
    margin: 0;
    max-width: 520px;
}

.grid {
    display: grid;
    gap: 1rem;
}

.grid--3 {
    grid-template-columns: repeat(3, minmax(0, 1fr));
}

.grid--4 {
    grid-template-columns: repeat(4, minmax(0, 1fr));
}

.card,
.post-card,
.document-card,
.person-card {
    background: var(--asfem-white);
    border: 1px solid var(--asfem-line);
    border-radius: var(--asfem-radius);
    padding: 1.25rem;
}

.post-card,
.document-card {
    box-shadow: var(--asfem-shadow);
}

.card h3,
.post-card h3,
.document-card h3,
.person-card h3 {
    font-size: 1.15rem;
    line-height: 1.25;
    margin: 0 0 0.7rem;
}

.meta,
.document-meta,
.entry-meta {
    color: var(--asfem-muted);
    font-size: 0.88rem;
}

.document-card {
    display: flex;
    flex-direction: column;
    gap: 0.85rem;
}

.document-card .button {
    margin-top: auto;
}

.person-card strong {
    display: block;
    font-size: 1.05rem;
}

.person-card span {
    color: var(--asfem-muted);
}

.content-layout {
    display: grid;
    gap: 2.5rem;
    grid-template-columns: minmax(0, 1fr) 300px;
    padding-bottom: 4rem;
    padding-top: 3rem;
}

.entry-content,
.sidebar-card {
    background: var(--asfem-white);
    border: 1px solid var(--asfem-line);
    border-radius: var(--asfem-radius);
    padding: 1.5rem;
}

.entry-content > *:first-child {
    margin-top: 0;
}

.entry-content > *:last-child {
    margin-bottom: 0;
}

.sidebar-card {
    margin-bottom: 1rem;
}

.sidebar-card h2,
.sidebar-card h3 {
    margin-top: 0;
}

.archive-header {
    padding-bottom: 2rem;
    padding-top: 3rem;
}

.pagination {
    margin-top: 2rem;
}

.site-footer {
    background: var(--asfem-blue-dark);
    color: var(--asfem-white);
    padding: 2.5rem 0;
}

.site-footer a {
    color: var(--asfem-white);
}

.site-footer__inner {
    display: grid;
    gap: 2rem;
    grid-template-columns: 1fr auto;
}

.site-footer p {
    margin: 0;
}

@media (max-width: 860px) {
    .site-header__inner,
    .section__header,
    .site-footer__inner {
        align-items: flex-start;
        flex-direction: column;
    }

    .site-nav ul {
        align-items: flex-start;
        flex-wrap: wrap;
    }

    .hero__inner,
    .content-layout {
        grid-template-columns: 1fr;
    }

    .grid--3,
    .grid--4 {
        grid-template-columns: 1fr;
    }

    .hero__inner {
        min-height: auto;
        padding-bottom: 3rem;
        padding-top: 3rem;
    }

    .hero__visual {
        display: none;
    }
}
