/*
Theme Name: Cognoscere Ad Amandum
Theme URI: https://example.com/
Author: Cognoscere Ad Amandum
Description: Tema editorial católico clássico, elegante e responsivo para o blog Cognoscere Ad Amandum.
Version: 1.0.0
Requires at least: 6.0
Requires PHP: 7.4
Text Domain: cognoscere-ad-amandum
*/

/* =========================================================
   VARIÁVEIS
   ========================================================= */

:root {
    --navy: #061C2B;
    --deep-blue: #092638;
    --gold: #C9A45C;
    --cream: #F5F1E8;
    --white: #FFFFFF;
    --text: #18212A;
    --muted: #65717A;
    --line: rgba(201, 164, 92, 0.42);

    --shadow: 0 14px 40px rgba(6, 28, 43, 0.10);

    --serif: Georgia, "Times New Roman", serif;
    --sans: Inter, "Helvetica Neue", Arial, sans-serif;

    --container: 1200px;
}


/* =========================================================
   RESET
   ========================================================= */

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

html {
    scroll-behavior: smooth;
}

body {
    background: var(--cream);
    color: var(--text);
    font-family: var(--sans);
    line-height: 1.7;
}

img {
    max-width: 100%;
    height: auto;
    display: block;
}

a {
    color: inherit;
    text-decoration: none;
}

button,
input,
textarea,
select {
    font: inherit;
}

button {
    cursor: pointer;
}


/* =========================================================
   CONTAINER
   ========================================================= */

.container {
    width: min(92%, var(--container));
    margin-left: auto;
    margin-right: auto;
}


/* =========================================================
   HEADER
   ========================================================= */

.site-header {
    background: var(--navy);
    color: var(--white);
    min-height: 90px;
    display: flex;
    align-items: center;
    position: relative;
    z-index: 1000;
    border-bottom: 1px solid rgba(201, 164, 92, 0.25);
}

.header-inner {
    width: min(92%, var(--container));
    margin: 0 auto;
    min-height: 90px;

    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 40px;
}

.site-brand {
    display: flex;
    align-items: center;
    gap: 14px;
    flex-shrink: 0;
}

.site-brand-mark {
    width: 46px;
    height: 46px;

    border: 1px solid var(--gold);
    color: var(--gold);

    display: flex;
    align-items: center;
    justify-content: center;

    font-family: var(--serif);
    font-size: 18px;
    letter-spacing: 1px;
}

.site-brand-text {
    display: flex;
    flex-direction: column;
}

.site-brand-title {
    font-family: var(--serif);
    font-size: 18px;
    letter-spacing: 2px;
    line-height: 1.2;
}

.site-brand-tagline {
    color: var(--gold);
    font-family: var(--serif);
    font-style: italic;
    font-size: 13px;
    margin-top: 3px;
}


/* =========================================================
   MENU
   ========================================================= */

.main-navigation {
    display: flex;
    align-items: center;
}

.main-navigation ul {
    list-style: none;
    display: flex;
    align-items: center;
    gap: 30px;
}

.main-navigation li {
    position: relative;
}

.main-navigation a {
    color: var(--white);
    font-size: 13px;
    font-weight: 600;
    letter-spacing: 0.8px;
    text-transform: uppercase;

    transition: color 0.25s ease;
}

.main-navigation a:hover {
    color: var(--gold);
}


/* Dropdown */

.main-navigation .menu-item-has-children > .sub-menu {
    position: absolute;
    top: calc(100% + 18px);
    left: 50%;
    transform: translateX(-50%);

    min-width: 210px;

    background: var(--navy);
    border: 1px solid var(--line);

    padding: 10px 0;

    display: none;

    box-shadow: var(--shadow);
}

.main-navigation .menu-item-has-children:hover > .sub-menu {
    display: block;
}

.main-navigation .sub-menu li {
    width: 100%;
}

.main-navigation .sub-menu a {
    display: block;
    padding: 10px 18px;
}


/* =========================================================
   MOBILE MENU BUTTON
   ========================================================= */

.mobile-menu-toggle {
    display: none;

    width: 42px;
    height: 42px;

    border: 1px solid var(--gold);
    background: transparent;
    color: var(--gold);

    font-size: 20px;
}


/* =========================================================
   HERO
   ========================================================= */

.hero {
    min-height: 500px;

    background-color: var(--navy);

    background-image:
        linear-gradient(
            90deg,
            rgba(6, 28, 43, 0.97) 0%,
            rgba(6, 28, 43, 0.88) 38%,
            rgba(6, 28, 43, 0.40) 72%,
            rgba(6, 28, 43, 0.18) 100%
        ),
        url("../images/hero-rome.jpg");

    background-size: cover;
    background-position: center;

    display: flex;
    align-items: center;
}

.hero-inner {
    width: min(92%, var(--container));
    margin: 0 auto;
    padding: 90px 0;
}

.hero-content {
    max-width: 700px;
}

.hero-kicker {
    color: var(--gold);
    font-size: 13px;
    font-weight: 700;
    letter-spacing: 2px;
    text-transform: uppercase;
    margin-bottom: 16px;
}

.hero-title {
    color: var(--white);
    font-family: var(--serif);
    font-size: clamp(40px, 6vw, 72px);
    font-weight: 400;
    line-height: 1.05;
    letter-spacing: 1px;
    margin-bottom: 14px;
}

.hero-tagline {
    color: var(--gold);
    font-family: var(--serif);
    font-size: clamp(22px, 3vw, 32px);
    font-style: italic;
    margin-bottom: 25px;
}

.hero-description {
    max-width: 620px;

    color: rgba(255, 255, 255, 0.88);

    font-size: 17px;
    line-height: 1.8;

    margin-bottom: 32px;
}

.hero-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;

    padding: 13px 22px;

    border: 1px solid var(--gold);

    color: var(--white);
    background: transparent;

    font-size: 12px;
    font-weight: 700;
    letter-spacing: 1.3px;

    transition:
        background 0.25s ease,
        color 0.25s ease;
}

.hero-button:hover {
    background: var(--gold);
    color: var(--navy);
}


/* =========================================================
   SECTION
   ========================================================= */

.section {
    padding: 85px 0;
}

.section-heading {
    text-align: center;
    margin-bottom: 48px;
}

.section-kicker {
    color: var(--gold);
    font-size: 12px;
    font-weight: 700;
    letter-spacing: 2px;
    text-transform: uppercase;
    margin-bottom: 10px;
}

.section-title {
    color: var(--navy);
    font-family: var(--serif);
    font-size: clamp(30px, 4vw, 44px);
    font-weight: 400;
    line-height: 1.2;
}

.section-description {
    max-width: 680px;
    margin: 15px auto 0;
    color: var(--muted);
}


/* =========================================================
   FEATURED POSTS
   ========================================================= */

.featured-posts {
    background: var(--cream);
}

.posts-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 24px;
}

.post-card {
    background: var(--white);
    border: 1px solid rgba(6, 28, 43, 0.08);

    box-shadow: 0 8px 30px rgba(6, 28, 43, 0.06);

    transition:
        transform 0.25s ease,
        box-shadow 0.25s ease;
}

.post-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow);
}

.post-card-image {
    aspect-ratio: 4 / 3;
    overflow: hidden;
    background: var(--deep-blue);
}

.post-card-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;

    transition: transform 0.4s ease;
}

.post-card:hover .post-card-image img {
    transform: scale(1.04);
}

.post-card-placeholder {
    width: 100%;
    height: 100%;

    display: flex;
    align-items: center;
    justify-content: center;

    color: var(--gold);
    background: var(--deep-blue);

    font-family: var(--serif);
    font-size: 28px;
}

.post-card-content {
    padding: 25px;
}

.post-card-category {
    color: var(--gold);
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 1.4px;
    text-transform: uppercase;
    margin-bottom: 9px;
}

.post-card-title {
    color: var(--navy);
    font-family: var(--serif);
    font-size: 24px;
    line-height: 1.25;
    font-weight: 400;
    margin-bottom: 13px;
}

.post-card-excerpt {
    color: var(--muted);
    font-size: 14px;
    line-height: 1.7;
}


/* =========================================================
   QUOTE
   ========================================================= */

.quote-section {
    background: var(--navy);
    color: var(--white);

    padding: 85px 0;

    position: relative;
    overflow: hidden;
}

.quote-section::before {
    content: "";

    position: absolute;
    inset: 0;

    background:
        linear-gradient(
            rgba(6, 28, 43, 0.92),
            rgba(6, 28, 43, 0.92)
        ),
        url("../images/quote-texture.jpg");

    background-size: cover;
    background-position: center;

    opacity: 0.75;
}

.quote-inner {
    width: min(92%, 850px);
    margin: 0 auto;

    position: relative;
    z-index: 1;

    text-align: center;
}

.quote-mark {
    color: var(--gold);
    font-family: var(--serif);
    font-size: 70px;
    line-height: 0.6;
    margin-bottom: 30px;
}

.quote-text {
    color: var(--white);
    font-family: var(--serif);
    font-size: clamp(25px, 4vw, 40px);
    font-style: italic;
    line-height: 1.35;
}

.quote-author {
    color: var(--gold);
    font-size: 13px;
    letter-spacing: 1px;
    margin-top: 25px;
}


/* =========================================================
   CATEGORIES
   ========================================================= */

.categories-section {
    background: var(--cream);
}

.categories-grid {
    display: grid;
    grid-template-columns: repeat(5, 1fr);

    border-top: 1px solid var(--line);
    border-bottom: 1px solid var(--line);
}

.category-item {
    min-height: 200px;

    padding: 35px 25px;

    text-align: center;

    border-right: 1px solid var(--line);

    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;

    transition: background 0.25s ease;
}

.category-item:last-child {
    border-right: 0;
}

.category-item:hover {
    background: rgba(201, 164, 92, 0.06);
}

.category-icon {
    width: 45px;
    height: 45px;

    border: 1px solid var(--gold);

    color: var(--gold);

    display: flex;
    align-items: center;
    justify-content: center;

    font-family: var(--serif);
    font-size: 20px;

    margin-bottom: 18px;
}

.category-title {
    color: var(--navy);
    font-family: var(--serif);
    font-size: 22px;
    font-weight: 400;

    margin-bottom: 9px;
}

.category-description {
    color: var(--muted);
    font-size: 13px;
    line-height: 1.6;
}


/* =========================================================
   FOOTER
   ========================================================= */

.site-footer {
    background: var(--navy);
    color: var(--white);

    padding: 70px 0 25px;
}

.footer-grid {
    display: grid;
    grid-template-columns: 1.4fr 1fr 1.4fr;
    gap: 60px;

    padding-bottom: 50px;
}

.footer-brand-title {
    font-family: var(--serif);
    font-size: 22px;
    letter-spacing: 1.5px;
}

.footer-brand-tagline {
    color: var(--gold);
    font-family: var(--serif);
    font-style: italic;
    margin-top: 5px;
}

.footer-description {
    color: rgba(255, 255, 255, 0.7);
    font-size: 14px;
    max-width: 330px;
    margin-top: 18px;
}

.footer-heading {
    color: var(--gold);
    font-size: 12px;
    font-weight: 700;
    letter-spacing: 1.5px;
    text-transform: uppercase;

    margin-bottom: 18px;
}

.footer-menu ul {
    list-style: none;
}

.footer-menu li {
    margin-bottom: 9px;
}

.footer-menu a {
    color: rgba(255, 255, 255, 0.78);
    font-size: 14px;

    transition: color 0.25s ease;
}

.footer-menu a:hover {
    color: var(--gold);
}

.newsletter-description {
    color: rgba(255, 255, 255, 0.7);
    font-size: 14px;
    margin-bottom: 15px;
}

.newsletter-form {
    display: flex;
    border: 1px solid rgba(201, 164, 92, 0.45);
}

.newsletter-form input {
    flex: 1;

    min-width: 0;

    padding: 12px 14px;

    background: transparent;
    border: 0;

    color: var(--white);
    outline: none;
}

.newsletter-form input::placeholder {
    color: rgba(255, 255, 255, 0.5);
}

.newsletter-form button {
    width: 50px;

    background: var(--gold);
    border: 0;

    color: var(--navy);
    font-size: 18px;
    font-weight: 700;
}

.footer-bottom {
    border-top: 1px solid rgba(201, 164, 92, 0.25);

    padding-top: 20px;

    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
}

.footer-copyright {
    color: rgba(255, 255, 255, 0.55);
    font-size: 12px;
}


/* =========================================================
   POSTS / ARTIGOS
   ========================================================= */

.article-header {
    background: var(--navy);
    color: var(--white);

    padding: 90px 0 75px;
}

.article-header-inner {
    width: min(92%, 900px);
    margin: 0 auto;
}

.article-category {
    color: var(--gold);

    font-size: 12px;
    font-weight: 700;
    letter-spacing: 1.5px;
    text-transform: uppercase;

    margin-bottom: 15px;
}

.article-title {
    font-family: var(--serif);
    font-size: clamp(38px, 6vw, 64px);
    font-weight: 400;
    line-height: 1.1;
}

.article-meta {
    color: rgba(255, 255, 255, 0.65);
    font-size: 13px;
    margin-top: 20px;
}

.article-featured-image {
    width: min(92%, 1100px);
    margin: -35px auto 60px;

    position: relative;
    z-index: 2;
}

.article-featured-image img {
    width: 100%;
    max-height: 600px;
    object-fit: cover;

    box-shadow: var(--shadow);
}

.article-content {
    width: min(92%, 820px);
    margin: 0 auto;

    padding-bottom: 80px;
}

.article-content p {
    margin-bottom: 22px;
}

.article-content h2 {
    color: var(--navy);
    font-family: var(--serif);
    font-size: 34px;
    font-weight: 400;
    margin: 45px 0 15px;
}

.article-content h3 {
    color: var(--navy);
    font-family: var(--serif);
    font-size: 26px;
    font-weight: 400;
    margin: 35px 0 12px;
}

.article-content blockquote {
    border-left: 2px solid var(--gold);

    margin: 35px 0;
    padding: 15px 25px;

    color: var(--navy);
    font-family: var(--serif);
    font-size: 23px;
    font-style: italic;
}


/* =========================================================
   ARCHIVES
   ========================================================= */

.archive-header,
.search-header {
    background: var(--navy);
    color: var(--white);

    padding: 75px 0;
}

.archive-header-inner,
.search-header-inner {
    width: min(92%, var(--container));
    margin: 0 auto;
}

.archive-title,
.search-title {
    font-family: var(--serif);
    font-size: clamp(36px, 5vw, 58px);
    font-weight: 400;
}

.archive-description {
    color: rgba(255, 255, 255, 0.7);
    max-width: 700px;
    margin-top: 15px;
}


/* =========================================================
   PAGINAÇÃO
   ========================================================= */

.pagination {
    margin-top: 50px;

    display: flex;
    justify-content: center;
    gap: 8px;
}

.pagination a,
.pagination span {
    min-width: 40px;
    height: 40px;

    display: inline-flex;
    align-items: center;
    justify-content: center;

    border: 1px solid var(--line);

    color: var(--navy);

    font-size: 13px;
}

.pagination .current {
    background: var(--navy);
    color: var(--white);
}


/* =========================================================
   RESPONSIVIDADE
   ========================================================= */

@media (max-width: 1050px) {

    .posts-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .categories-grid {
        grid-template-columns: repeat(3, 1fr);
    }

    .category-item:nth-child(3) {
        border-right: 0;
    }

    .category-item:nth-child(n + 4) {
        border-top: 1px solid var(--line);
    }

    .footer-grid {
        grid-template-columns: 1fr 1fr;
    }
}


@media (max-width: 800px) {

    .site-header,
    .header-inner {
        min-height: 76px;
    }

    .header-inner {
        gap: 20px;
    }

    .site-brand-title {
        font-size: 15px;
    }

    .site-brand-tagline {
        font-size: 11px;
    }

    .site-brand-mark {
        width: 40px;
        height: 40px;
    }

    .mobile-menu-toggle {
        display: flex;
        align-items: center;
        justify-content: center;
    }

    .main-navigation {
        display: none;

        position: absolute;

        top: 76px;
        left: 0;
        right: 0;

        background: var(--navy);

        border-top: 1px solid rgba(201, 164, 92, 0.25);
    }

    .main-navigation.is-open {
        display: block;
    }

    .main-navigation ul {
        flex-direction: column;
        align-items: stretch;
        gap: 0;

        padding: 15px 0;
    }

    .main-navigation li {
        width: 100%;
    }

    .main-navigation a {
        display: block;
        padding: 12px 25px;
    }

    .main-navigation .menu-item-has-children > .sub-menu {
        position: static;

        transform: none;

        display: block;

        min-width: 0;

        box-shadow: none;

        border: 0;

        padding: 0 0 8px;
    }

    .main-navigation .sub-menu a {
        padding-left: 45px;
        font-size: 12px;
    }

    .hero {
        min-height: 600px;

        background-image:
            linear-gradient(
                rgba(6, 28, 43, 0.84),
                rgba(6, 28, 43, 0.95)
            ),
            url("../images/hero-rome.jpg");

        background-position: center;
    }

    .hero-inner {
        padding: 70px 0;
    }

    .hero-content {
        max-width: 100%;
    }

    .categories-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .category-item:nth-child(3) {
        border-right: 1px solid var(--line);
    }

    .category-item:nth-child(even) {
        border-right: 0;
    }

    .category-item:nth-child(n + 3) {
        border-top: 1px solid var(--line);
    }
}


@media (max-width: 600px) {

    .section {
        padding: 65px 0;
    }

    .posts-grid {
        grid-template-columns: 1fr;
    }

    .categories-grid {
        grid-template-columns: 1fr;
    }

    .category-item,
    .category-item:nth-child(3),
    .category-item:nth-child(even) {
        border-right: 0;
        border-bottom: 1px solid var(--line);
    }

    .category-item:last-child {
        border-bottom: 0;
    }

    .footer-grid {
        grid-template-columns: 1fr;
        gap: 40px;
    }

    .footer-bottom {
        flex-direction: column;
        align-items: flex-start;
    }

    .article-header {
        padding: 65px 0 55px;
    }

    .article-featured-image {
        margin-top: -20px;
        margin-bottom: 40px;
    }

    .article-content blockquote {
        font-size: 20px;
    }
}