/*
Theme Name: Site Factory Theme
Theme URI: https://example.com/
Author: Site Factory
Description: Tema leve e automático para websites criados pelo Site Factory.
Version: 0.4.2
Requires at least: 6.0
Requires PHP: 7.4
Text Domain: site-factory-theme
*/

:root {
    --sfc-primary: #0f3d5e;
    --sfc-secondary: #16a085;
    --sfc-accent: #f39c12;
    --sfc-dark: #17202a;
    --sfc-text: #263238;
    --sfc-muted: #6b7280;
    --sfc-light: #f5f7f9;
    --sfc-border: #e5e7eb;
    --sfc-white: #ffffff;
    --sfc-radius: 12px;
    --sfc-container: 1180px;
}

* {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    margin: 0;
    font-family:
        -apple-system,
        BlinkMacSystemFont,
        "Segoe UI",
        Roboto,
        Arial,
        sans-serif;
    color: var(--sfc-text);
    background: var(--sfc-light);
    line-height: 1.7;
}

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

a {
    color: var(--sfc-primary);
    text-decoration: none;
}

a:hover {
    color: var(--sfc-secondary);
}

.container {
    width: min(
        calc(100% - 32px),
        var(--sfc-container)
    );

    margin-left: auto;
    margin-right: auto;
}

/*
|--------------------------------------------------------------------------
| HEADER
|--------------------------------------------------------------------------
*/

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

.header-inner {
    min-height: 76px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 30px;
}

.site-branding {
    display: flex;
    align-items: center;
}

.site-title {
    margin: 0;
    font-size: 24px;
    font-weight: 800;
    line-height: 1.2;
}

.site-title a {
    color: var(--sfc-dark);
}

.site-description {
    display: none;
}

/*
|--------------------------------------------------------------------------
| NAVIGATION
|--------------------------------------------------------------------------
*/

.main-navigation ul {
    display: flex;
    align-items: center;
    gap: 22px;
    list-style: none;
    margin: 0;
    padding: 0;
}

.main-navigation a {
    color: var(--sfc-dark);
    font-size: 14px;
    font-weight: 600;
}

.main-navigation a:hover {
    color: var(--sfc-secondary);
}

/*
|--------------------------------------------------------------------------
| MAIN
|--------------------------------------------------------------------------
*/

.site-main {
    padding: 40px 0 70px;
}

/*
|--------------------------------------------------------------------------
| HERO
|--------------------------------------------------------------------------
*/

.sfc-hero {
    background:
        linear-gradient(
            135deg,
            var(--sfc-primary),
            var(--sfc-secondary)
        );

    color: var(--sfc-white);

    padding: 70px 0;
    margin-bottom: 45px;
}

.sfc-hero-content {
    max-width: 760px;
}

.sfc-hero h1 {
    margin: 0 0 15px;
    font-size: clamp(34px, 5vw, 58px);
    line-height: 1.1;
    color: var(--sfc-white);
}

.sfc-hero p {
    margin: 0;
    font-size: 19px;
    opacity: .92;
}

/*
|--------------------------------------------------------------------------
| SECTION
|--------------------------------------------------------------------------
*/

.sfc-section {
    margin-bottom: 50px;
}

.sfc-section-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 20px;
    margin-bottom: 22px;
}

.sfc-section-title {
    margin: 0;
    font-size: 27px;
    line-height: 1.2;
    color: var(--sfc-dark);
}

.sfc-section-link {
    font-size: 14px;
    font-weight: 700;
}

/*
|--------------------------------------------------------------------------
| POSTS GRID
|--------------------------------------------------------------------------
*/

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

    gap: 24px;
}

/*
|--------------------------------------------------------------------------
| POST CARD
|--------------------------------------------------------------------------
*/

.sfc-card {
    background: var(--sfc-white);
    border: 1px solid var(--sfc-border);
    border-radius: var(--sfc-radius);
    overflow: hidden;
    transition:
        transform .2s ease,
        box-shadow .2s ease;
}

.sfc-card:hover {
    transform: translateY(-3px);

    box-shadow:
        0 12px 30px
        rgba(0, 0, 0, .08);
}

.sfc-card-image {
    aspect-ratio: 16 / 9;
    background: #e5e7eb;
    overflow: hidden;
}

.sfc-card-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.sfc-card-content {
    padding: 20px;
}

.sfc-card-category {
    display: inline-block;
    margin-bottom: 8px;
    font-size: 12px;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: .05em;
    color: var(--sfc-secondary);
}

.sfc-card-title {
    margin: 0 0 10px;
    font-size: 20px;
    line-height: 1.3;
}

.sfc-card-title a {
    color: var(--sfc-dark);
}

.sfc-card-excerpt {
    margin: 0 0 15px;
    color: var(--sfc-muted);
    font-size: 14px;
}

.sfc-card-meta {
    color: var(--sfc-muted);
    font-size: 12px;
}

/*
|--------------------------------------------------------------------------
| FEATURED
|--------------------------------------------------------------------------
*/

.sfc-featured {
    display: grid;
    grid-template-columns:
        minmax(0, 1.6fr)
        minmax(280px, 1fr);

    gap: 25px;
}

.sfc-featured-main {
    background: var(--sfc-white);
    border-radius: var(--sfc-radius);
    overflow: hidden;
    border: 1px solid var(--sfc-border);
}

.sfc-featured-image {
    aspect-ratio: 16 / 9;
    overflow: hidden;
}

.sfc-featured-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.sfc-featured-content {
    padding: 25px;
}

.sfc-featured-content h2 {
    margin: 0 0 12px;
    font-size: 30px;
    line-height: 1.2;
}

.sfc-featured-side {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.sfc-mini-card {
    background: var(--sfc-white);
    border: 1px solid var(--sfc-border);
    border-radius: var(--sfc-radius);
    padding: 18px;
}

.sfc-mini-card h3 {
    margin: 0;
    font-size: 17px;
    line-height: 1.35;
}

/*
|--------------------------------------------------------------------------
| CONTENT LAYOUT
|--------------------------------------------------------------------------
*/

.content-with-sidebar {
    display: grid;
    grid-template-columns:
        minmax(0, 1fr)
        320px;

    gap: 40px;
}

.content-area {
    min-width: 0;
}

.sidebar {
    min-width: 0;
}

.sidebar-widget {
    background: var(--sfc-white);
    border: 1px solid var(--sfc-border);
    border-radius: var(--sfc-radius);
    padding: 22px;
    margin-bottom: 25px;
}

.sidebar-widget h2,
.sidebar-widget h3 {
    margin-top: 0;
    color: var(--sfc-dark);
}

/*
|--------------------------------------------------------------------------
| SINGLE POST
|--------------------------------------------------------------------------
*/

.single-post-header {
    max-width: 850px;
    margin: 0 auto 30px;
}

.single-post-title {
    margin: 0 0 15px;
    font-size: clamp(34px, 5vw, 52px);
    line-height: 1.12;
    color: var(--sfc-dark);
}

.single-post-meta {
    color: var(--sfc-muted);
    font-size: 14px;
}

.single-post-featured {
    max-width: 1000px;
    margin: 0 auto 35px;
}

.single-post-featured img {
    width: 100%;
    border-radius: var(--sfc-radius);
}

.entry-content {
    max-width: 850px;
    margin: 0 auto;
    font-size: 18px;
}

.entry-content h2 {
    margin-top: 40px;
    color: var(--sfc-dark);
}

.entry-content h3 {
    margin-top: 30px;
    color: var(--sfc-dark);
}

.entry-content img {
    border-radius: 8px;
}

.entry-content blockquote {
    margin: 30px 0;
    padding: 20px 25px;
    border-left: 4px solid var(--sfc-secondary);
    background: var(--sfc-white);
}

/*
|--------------------------------------------------------------------------
| PAGE / ARCHIVE
|--------------------------------------------------------------------------
*/

.page-header,
.archive-header {
    margin-bottom: 35px;
}

.page-title,
.archive-title {
    margin: 0;
    font-size: 40px;
    color: var(--sfc-dark);
}

/*
|--------------------------------------------------------------------------
| PAGINATION
|--------------------------------------------------------------------------
*/

.navigation.pagination {
    margin-top: 40px;
}

.nav-links {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.page-numbers {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 40px;
    height: 40px;
    padding: 0 12px;
    background: var(--sfc-white);
    border: 1px solid var(--sfc-border);
    border-radius: 8px;
}

.page-numbers.current {
    background: var(--sfc-primary);
    color: var(--sfc-white);
}

/*
|--------------------------------------------------------------------------
| FOOTER
|--------------------------------------------------------------------------
*/

.site-footer {
    background: var(--sfc-dark);
    color: #d1d5db;
    padding: 50px 0 25px;
}

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

    gap: 35px;
}

.footer-widget h2,
.footer-widget h3 {
    color: var(--sfc-white);
    margin-top: 0;
}

.footer-widget a {
    color: #d1d5db;
}

.footer-bottom {
    margin-top: 40px;
    padding-top: 20px;
    border-top: 1px solid rgba(255,255,255,.12);
    font-size: 13px;
}

/*
|--------------------------------------------------------------------------
| MOBILE
|--------------------------------------------------------------------------
*/

@media (max-width: 900px) {

    .main-navigation ul {
        gap: 12px;
    }

    .main-navigation a {
        font-size: 13px;
    }

    .sfc-featured {
        grid-template-columns: 1fr;
    }

    .content-with-sidebar {
        grid-template-columns: 1fr;
    }

    .footer-grid {
        grid-template-columns: 1fr 1fr;
    }
}

@media (max-width: 700px) {

    .header-inner {
        min-height: 65px;
    }

    .site-title {
        font-size: 20px;
    }

    .main-navigation {
        display: none;
    }

    .site-main {
        padding: 25px 0 50px;
    }

    .sfc-hero {
        padding: 45px 0;
    }

    .sfc-hero h1 {
        font-size: 36px;
    }

    .sfc-hero p {
        font-size: 16px;
    }

    .sfc-post-grid {
        grid-template-columns: 1fr;
    }

    .sfc-section-title {
        font-size: 23px;
    }

    .single-post-title {
        font-size: 34px;
    }

    .entry-content {
        font-size: 17px;
    }

    .footer-grid {
        grid-template-columns: 1fr;
    }
}

/*
|--------------------------------------------------------------------------
| HOMEPAGE ENGINE
|--------------------------------------------------------------------------
*/

.sfc-homepage .sfc-hero-kicker,
.sfc-section-kicker {
    display: inline-block;
    margin-bottom: 8px;
    font-size: 12px;
    font-weight: 800;
    letter-spacing: .08em;
    text-transform: uppercase;
    color: var(--sfc-secondary);
}

.sfc-homepage .sfc-hero-kicker {
    color: rgba(255,255,255,.82);
}

.sfc-category-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 14px;
}

.sfc-category-tile {
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    min-height: 92px;
    padding: 18px;
    background: var(--sfc-white);
    border: 1px solid var(--sfc-border);
    border-radius: var(--sfc-radius);
    transition: transform .2s ease, border-color .2s ease, box-shadow .2s ease;
}

.sfc-category-tile:hover {
    transform: translateY(-2px);
    border-color: var(--sfc-secondary);
    box-shadow: 0 8px 24px rgba(0,0,0,.06);
}

.sfc-category-tile strong {
    color: var(--sfc-dark);
    line-height: 1.3;
}

.sfc-category-tile span {
    margin-top: 10px;
    color: var(--sfc-muted);
    font-size: 12px;
}

.sfc-home-card {
    background: var(--sfc-white);
    border: 1px solid var(--sfc-border);
    border-radius: var(--sfc-radius);
    overflow: hidden;
    transition: transform .2s ease, box-shadow .2s ease;
}

.sfc-home-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 12px 30px rgba(0,0,0,.08);
}

.sfc-home-card-image {
    display: block;
    aspect-ratio: 16 / 9;
    background: #e5e7eb;
    overflow: hidden;
}

.sfc-home-card-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.sfc-home-card-content {
    padding: 20px;
}

.sfc-home-card-title {
    margin: 0 0 10px;
    font-size: 20px;
    line-height: 1.3;
}

.sfc-home-card-title a {
    color: var(--sfc-dark);
}

.sfc-home-card-excerpt {
    margin: 0 0 14px;
    color: var(--sfc-muted);
    font-size: 14px;
}

.sfc-home-card-featured {
    min-width: 0;
}

.sfc-home-card-featured .sfc-home-card-content {
    padding: 25px;
}

.sfc-home-card-featured .sfc-home-card-title {
    font-size: 30px;
}

.sfc-empty-state {
    padding: 45px;
    background: var(--sfc-white);
    border: 1px solid var(--sfc-border);
    border-radius: var(--sfc-radius);
    text-align: center;
}

.sfc-empty-state h2 {
    margin: 0 0 10px;
    color: var(--sfc-dark);
}

.sfc-empty-state p {
    max-width: 680px;
    margin: 0 auto;
    color: var(--sfc-muted);
}

.sfc-category-section {
    padding-top: 10px;
}

.sfc-homepage-blog .sfc-category-nav {
    margin-bottom: 35px;
}

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

@media (max-width: 900px) {

    .sfc-category-grid,
    .sfc-homepage-portal .sfc-category-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (max-width: 700px) {

    .sfc-category-grid,
    .sfc-homepage-portal .sfc-category-grid {
        grid-template-columns: 1fr 1fr;
        gap: 10px;
    }

    .sfc-category-tile {
        min-height: 82px;
        padding: 14px;
    }

    .sfc-home-card-featured .sfc-home-card-title {
        font-size: 24px;
    }

    .sfc-empty-state {
        padding: 30px 20px;
    }
}
