/* ==========================================================================
   Blog & SEO — SANTANA & MARTINS ADVOGADAS
   Unit 3: COMP-08 BlogComponent
   ========================================================================== */

/* --------------------------------------------------------------------------
   Category Navigation
   -------------------------------------------------------------------------- */

.sm-category-nav {
    background: #111;
    border-bottom: 3px solid #f0c040;
    padding: 0.75rem 0;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
}

.sm-category-nav__inner {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 1.5rem;
    display: flex;
    gap: 0.5rem;
    flex-wrap: wrap;
    align-items: center;
}

.sm-category-nav__label {
    color: #888;
    font-size: 0.8rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    margin-right: 0.5rem;
    white-space: nowrap;
}

.sm-category-nav__link {
    color: #ccc;
    font-size: 0.85rem;
    font-weight: 500;
    text-decoration: none;
    padding: 0.35rem 0.85rem;
    border-radius: 2rem;
    border: 1px solid transparent;
    white-space: nowrap;
    transition: color 0.2s, border-color 0.2s, background 0.2s;
}

.sm-category-nav__link:hover,
.sm-category-nav__link.current-cat {
    color: #f0c040;
    border-color: #f0c040;
    background: rgba(240, 192, 64, 0.08);
}

/* --------------------------------------------------------------------------
   Blog Archive Hero
   -------------------------------------------------------------------------- */

.sm-blog-hero {
    background: #111;
    color: #fff;
    padding: 3.5rem 1.5rem 2.5rem;
    text-align: center;
    border-bottom: 3px solid #f0c040;
}

.sm-blog-hero__eyebrow {
    font-size: 0.78rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.12em;
    color: #f0c040;
    margin-bottom: 0.75rem;
}

.sm-blog-hero__title {
    font-size: clamp(1.6rem, 3vw, 2.4rem);
    font-weight: 700;
    margin: 0 0 0.75rem;
    line-height: 1.2;
}

.sm-blog-hero__description {
    color: #bbb;
    font-size: 1rem;
    max-width: 560px;
    margin: 0 auto;
    line-height: 1.6;
}

/* --------------------------------------------------------------------------
   Blog Listing Grid
   -------------------------------------------------------------------------- */

.sm-blog-listing {
    max-width: 1200px;
    margin: 0 auto;
    padding: 3rem 1.5rem 4rem;
}

.sm-blog-listing__grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 2rem;
}

.sm-blog-listing__no-posts {
    text-align: center;
    padding: 4rem 0;
    color: #555;
    font-size: 1.1rem;
}

/* --------------------------------------------------------------------------
   Post Card (COMP-08)
   -------------------------------------------------------------------------- */

.sm-post-card {
    background: #fff;
    border: 1px solid #e8e8e8;
    border-radius: 6px;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    transition: box-shadow 0.25s, transform 0.25s;
}

.sm-post-card:hover {
    box-shadow: 0 6px 24px rgba(0, 0, 0, 0.1);
    transform: translateY(-3px);
}

.sm-post-card__image {
    aspect-ratio: 16 / 9;
    overflow: hidden;
    background: #f0c040;
}

.sm-post-card__image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    transition: transform 0.35s;
}

.sm-post-card:hover .sm-post-card__image img {
    transform: scale(1.04);
}

.sm-post-card__image-placeholder {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, #f0c040 0%, #d4a820 100%);
    font-size: 2.5rem;
}

.sm-post-card__body {
    padding: 1.5rem;
    flex: 1;
    display: flex;
    flex-direction: column;
}

.sm-post-card__category {
    font-size: 0.72rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    color: #f0c040;
    margin-bottom: 0.5rem;
    text-decoration: none;
}

.sm-post-card__category:hover {
    color: #d4a820;
}

.sm-post-card__title {
    font-size: 1.05rem;
    font-weight: 700;
    color: #111;
    margin: 0 0 0.75rem;
    line-height: 1.35;
}

.sm-post-card__title a {
    color: inherit;
    text-decoration: none;
}

.sm-post-card__title a:hover {
    color: #f0c040;
}

.sm-post-card__excerpt {
    color: #555;
    font-size: 0.9rem;
    line-height: 1.65;
    flex: 1;
    margin-bottom: 1.25rem;
}

.sm-post-card__footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.75rem;
    border-top: 1px solid #f0f0f0;
    padding-top: 1rem;
}

.sm-post-card__date {
    font-size: 0.78rem;
    color: #888;
}

.sm-post-card__link {
    font-size: 0.82rem;
    font-weight: 700;
    color: #111;
    text-decoration: none;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    display: flex;
    align-items: center;
    gap: 0.35rem;
    transition: color 0.2s;
}

.sm-post-card__link::after {
    content: '→';
    transition: transform 0.2s;
}

.sm-post-card__link:hover {
    color: #f0c040;
}

.sm-post-card__link:hover::after {
    transform: translateX(3px);
}

/* --------------------------------------------------------------------------
   Pagination
   -------------------------------------------------------------------------- */

.sm-pagination {
    display: flex;
    justify-content: center;
    gap: 0.5rem;
    margin-top: 3rem;
    flex-wrap: wrap;
}

.sm-pagination .page-numbers {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 2.5rem;
    height: 2.5rem;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 0.9rem;
    font-weight: 600;
    color: #333;
    text-decoration: none;
    transition: background 0.2s, border-color 0.2s, color 0.2s;
}

.sm-pagination .page-numbers:hover,
.sm-pagination .page-numbers.current {
    background: #f0c040;
    border-color: #f0c040;
    color: #111;
}

.sm-pagination .page-numbers.dots {
    border: none;
    color: #888;
    cursor: default;
}

/* --------------------------------------------------------------------------
   Single Post
   -------------------------------------------------------------------------- */

.sm-single-hero {
    background: #111;
    color: #fff;
    padding: 4rem 1.5rem 3rem;
}

.sm-single-hero__inner {
    max-width: 800px;
    margin: 0 auto;
}

.sm-single-hero__breadcrumb {
    font-size: 0.82rem;
    color: #888;
    margin-bottom: 1.25rem;
}

.sm-single-hero__breadcrumb a {
    color: #f0c040;
    text-decoration: none;
}

.sm-single-hero__breadcrumb a:hover {
    text-decoration: underline;
}

.sm-single-hero__category {
    font-size: 0.75rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.12em;
    color: #f0c040;
    margin-bottom: 1rem;
    text-decoration: none;
    display: inline-block;
}

.sm-single-hero__title {
    font-size: clamp(1.6rem, 3.5vw, 2.6rem);
    font-weight: 700;
    line-height: 1.2;
    margin: 0 0 1.5rem;
}

.sm-single-hero__meta {
    display: flex;
    align-items: center;
    gap: 1.5rem;
    flex-wrap: wrap;
    font-size: 0.85rem;
    color: #aaa;
}

.sm-single-hero__meta-item {
    display: flex;
    align-items: center;
    gap: 0.4rem;
}

.sm-single-featured-image {
    width: 100%;
    max-width: 900px;
    margin: 0 auto;
    border-radius: 6px;
    overflow: hidden;
    margin-top: -2rem;
    box-shadow: 0 12px 40px rgba(0, 0, 0, 0.2);
}

.sm-single-featured-image img {
    width: 100%;
    height: auto;
    display: block;
}

.sm-single-content {
    max-width: 800px;
    margin: 0 auto;
    padding: 3rem 1.5rem 4rem;
}

.sm-single-content__body {
    font-size: 1.05rem;
    line-height: 1.8;
    color: #333;
}

.sm-single-content__body h2 {
    font-size: 1.5rem;
    font-weight: 700;
    color: #111;
    margin: 2.5rem 0 1rem;
    padding-bottom: 0.5rem;
    border-bottom: 2px solid #f0c040;
}

.sm-single-content__body h3 {
    font-size: 1.2rem;
    font-weight: 700;
    color: #111;
    margin: 2rem 0 0.75rem;
}

.sm-single-content__body p {
    margin-bottom: 1.5rem;
}

.sm-single-content__body a {
    color: #f0c040;
    text-decoration: underline;
}

.sm-single-content__body blockquote {
    border-left: 4px solid #f0c040;
    padding: 1rem 1.5rem;
    margin: 2rem 0;
    background: #fafafa;
    font-style: italic;
    color: #555;
}

.sm-single-content__body ul,
.sm-single-content__body ol {
    padding-left: 1.75rem;
    margin-bottom: 1.5rem;
}

.sm-single-content__body li {
    margin-bottom: 0.5rem;
}

/* --------------------------------------------------------------------------
   Search Results
   -------------------------------------------------------------------------- */

.sm-search-hero {
    background: #111;
    color: #fff;
    padding: 3rem 1.5rem 2.5rem;
    text-align: center;
    border-bottom: 3px solid #f0c040;
}

.sm-search-hero__title {
    font-size: clamp(1.4rem, 2.5vw, 2rem);
    font-weight: 700;
    margin: 0 0 1.25rem;
}

.sm-search-hero__title strong {
    color: #f0c040;
}

.sm-search-form {
    max-width: 520px;
    margin: 0 auto;
    display: flex;
    gap: 0;
}

.sm-search-form .search-field {
    flex: 1;
    padding: 0.75rem 1rem;
    border: 2px solid #f0c040;
    border-right: none;
    border-radius: 4px 0 0 4px;
    font-size: 1rem;
    background: #fff;
    color: #111;
    outline: none;
}

.sm-search-form .search-submit {
    background: #f0c040;
    color: #111;
    border: 2px solid #f0c040;
    border-left: none;
    border-radius: 0 4px 4px 0;
    padding: 0.75rem 1.25rem;
    font-size: 0.9rem;
    font-weight: 700;
    cursor: pointer;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    transition: background 0.2s, color 0.2s;
}

.sm-search-form .search-submit:hover {
    background: #d4a820;
    border-color: #d4a820;
}

.sm-search-results {
    max-width: 1200px;
    margin: 0 auto;
    padding: 3rem 1.5rem 4rem;
}

.sm-search-results__count {
    font-size: 0.9rem;
    color: #666;
    margin-bottom: 2rem;
    padding-bottom: 1rem;
    border-bottom: 1px solid #eee;
}

.sm-search-results__count strong {
    color: #111;
}

.sm-search-no-results {
    text-align: center;
    padding: 4rem 1.5rem;
    max-width: 500px;
    margin: 0 auto;
}

.sm-search-no-results__icon {
    font-size: 3rem;
    margin-bottom: 1.25rem;
}

.sm-search-no-results__title {
    font-size: 1.4rem;
    font-weight: 700;
    color: #111;
    margin-bottom: 0.75rem;
}

.sm-search-no-results__text {
    color: #666;
    line-height: 1.7;
    margin-bottom: 2rem;
}

/* --------------------------------------------------------------------------
   Breadcrumbs (Yoast)
   -------------------------------------------------------------------------- */

.sm-breadcrumb {
    background: #f9f9f9;
    border-bottom: 1px solid #eee;
    padding: 0.65rem 1.5rem;
    font-size: 0.82rem;
}

.sm-breadcrumb .breadcrumb_last {
    color: #888;
}

.sm-breadcrumb a {
    color: #f0c040;
    text-decoration: none;
}

.sm-breadcrumb a:hover {
    text-decoration: underline;
}

/* --------------------------------------------------------------------------
   Responsive
   -------------------------------------------------------------------------- */

@media (max-width: 1024px) {
    .sm-blog-listing__grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 768px) {
    .sm-blog-hero,
    .sm-single-hero {
        padding: 2.5rem 1rem 2rem;
    }

    .sm-blog-listing {
        padding: 2rem 1rem 3rem;
    }

    .sm-blog-listing__grid {
        grid-template-columns: 1fr;
        gap: 1.5rem;
    }

    .sm-search-results {
        padding: 2rem 1rem 3rem;
    }

    .sm-single-featured-image {
        margin-top: 0;
        border-radius: 0;
    }

    .sm-single-content {
        padding: 2rem 1rem 3rem;
    }
}

@media (max-width: 480px) {
    .sm-category-nav__inner {
        flex-wrap: nowrap;
        overflow-x: auto;
        padding: 0 1rem;
    }

    .sm-post-card__footer {
        flex-direction: column;
        align-items: flex-start;
    }

    .sm-search-form {
        flex-direction: column;
    }

    .sm-search-form .search-field {
        border-right: 2px solid #f0c040;
        border-bottom: none;
        border-radius: 4px 4px 0 0;
    }

    .sm-search-form .search-submit {
        border-left: 2px solid #f0c040;
        border-top: none;
        border-radius: 0 0 4px 4px;
    }
}
