@import 'global.css';

/* ===== BLOG HERO SECTION ===== */

.blog-hero {
    background: linear-gradient(135deg, var(--color-primary) 0%, var(--color-primary-light) 100%);
    padding: 120px 0 80px;
    text-align: center;
    color: var(--color-white);
    position: relative;
    overflow: hidden;
}

.blog-hero::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: url('../image/sistema/img01.jpg') center/cover;
    opacity: 0.1;
    z-index: 1;
}

.blog-hero-content {
    position: relative;
    z-index: 2;
    max-width: 800px;
    margin: 0 auto;
}

.blog-hero-title {
    font-size: 3.5rem;
    font-weight: 700;
    margin-bottom: 1.5rem;
    color: var(--color-white);
    line-height: 1.2;
}

.blog-hero-subtitle {
    font-size: 1.25rem;
    opacity: 0.9;
    margin-bottom: 3rem;
    line-height: 1.6;
}

.search-input-wrapper {
    position: relative;
    width: 100%;
}

.search-icon {
    position: absolute;
    left: 20px;
    top: 50%;
    transform: translateY(-50%);
    color: var(--color-medium);
    font-size: 1.1rem;
    z-index: 2;
    pointer-events: none;
}

.search-input {
    width: 100%;
    padding: 15px 20px 15px 50px;
    border: 2px solid var(--color-light);
    border-radius: 50px;
    background: var(--color-white);
    color: var(--color-dark);
    font-size: 1rem;
    outline: none;
    transition: all 0.3s ease;
}

.search-input:focus {
    border-color: var(--color-primary);
    box-shadow: 0 0 0 3px rgba(25, 25, 51, 0.1);
}

.search-input:hover {
    border-color: var(--color-primary);
}

.search-input::placeholder {
    color: var(--color-medium);
}


/* ===== BLOG FILTERS ===== */

.blog-filters {
    background: var(--color-white);
    padding: 2rem 0;
    border-bottom: 1px solid var(--color-light);
    position: relative;
    top: 0;
    z-index: 100;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}

.filters-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 1rem;
}

.filters-form {
    width: 100%;
}

.filters-row {
    display: flex;
    align-items: center;
    gap: 1rem;
    flex-wrap: wrap;
}

.search-filter {
    flex: 1;
    min-width: 250px;
}

.category-filter {
    min-width: 200px;
}

.category-select {
    width: 100%;
    padding: 15px 20px;
    border: 2px solid var(--color-light);
    border-radius: 50px;
    background: var(--color-white);
    color: var(--color-dark);
    font-size: 1rem;
    outline: none;
    transition: all 0.3s ease;
    cursor: pointer;
    appearance: none;
    background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 20 20'%3e%3cpath stroke='%236b7280' stroke-linecap='round' stroke-linejoin='round' stroke-width='1.5' d='m6 8 4 4 4-4'/%3e%3c/svg%3e");
    background-position: right 15px center;
    background-repeat: no-repeat;
    background-size: 16px;
    padding-right: 45px;
}

.category-select:focus {
    border-color: var(--color-primary);
    box-shadow: 0 0 0 3px rgba(25, 25, 51, 0.1);
}

.category-select:hover {
    border-color: var(--color-primary);
}

.filter-submit-btn {
    background: var(--color-primary);
    color: var(--color-white);
    border: none;
    border-radius: 50px;
    padding: 15px 25px;
    font-size: 1rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    white-space: nowrap;
}

.filter-submit-btn:hover {
    background: var(--color-primary-dark);
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(25, 25, 51, 0.3);
}

.filter-submit-btn:active {
    transform: translateY(0);
}


/* Responsive adjustments */

@media (max-width: 768px) {
    .filters-row {
        flex-direction: column;
        gap: 1rem;
    }
    .search-filter,
    .category-filter {
        width: 100%;
        min-width: auto;
    }
    .filter-submit-btn {
        width: 100%;
        justify-content: center;
    }
}


/* ===== BLOG MAIN LAYOUT ===== */

.blog-main {
    background: var(--color-ultra-light);
    padding: 4rem 0;
}

.blog-content {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 1rem;
}

.blog-main-content {
    width: 100%;
}


/* ===== BLOG SECTIONS ===== */

.blog-section {
    margin-bottom: 4rem;
}

.section-header {
    margin-bottom: 3rem;
    text-align: center;
}

.section-title {
    font-size: 28px;
    font-weight: 700;
    color: var(--color-dark);
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 1rem;
    margin-bottom: 1rem;
}

.title-icon {
    font-size: 28px;
}


/* ===== FEATURED POSTS ===== */

.featured-posts-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 2rem;
}

.featured-post {
    background: var(--color-white);
    border-radius: 20px;
    overflow: hidden;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
    transition: all 0.4s ease;
    position: relative;
}

.featured-post:hover {
    transform: translateY(-10px);
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.15);
}

.post-image {
    position: relative;
    height: 280px;
    overflow: hidden;
}

.post-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.4s ease;
}

.featured-post:hover .post-image img {
    transform: scale(1.1);
}

.post-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(25, 25, 51, 0.8);
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: all 0.3s ease;
    z-index: 2;
}

.featured-post:hover .post-overlay {
    opacity: 1;
}

.read-more-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 60px;
    height: 60px;
    background: var(--color-white);
    color: var(--color-primary);
    border-radius: 50%;
    text-decoration: none;
    font-size: 1.25rem;
    transition: all 0.3s ease;
    transform: scale(0.8);
}

.featured-post:hover .read-more-btn {
    transform: scale(1);
}

.read-more-btn:hover {
    background: var(--color-primary);
    color: var(--color-white);
    transform: scale(1.1);
}

.post-category {
    position: absolute;
    top: 1rem;
    left: 1rem;
    background: var(--color-primary);
    color: var(--color-white);
    padding: 0.5rem 1rem;
    border-radius: 20px;
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    z-index: 3;
}

.post-content {
    padding: 2rem;
}

.post-meta {
    display: flex;
    gap: 1.5rem;
    margin-bottom: 1rem;
    font-size: 0.875rem;
    color: var(--color-medium);
    flex-wrap: wrap;
}

.post-meta span {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.post-meta i {
    color: var(--color-primary);
}

.post-views {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    color: var(--color-medium);
    font-size: 0.875rem;
}

.post-views i {
    color: var(--color-primary);
}

.post-title {
    margin-bottom: 1rem;
    line-height: 1.3;
    font-size: 1.5rem;
    font-weight: 600;
}

.post-title a {
    color: var(--color-dark);
    text-decoration: none;
    transition: color 0.3s ease;
}

.post-title a:hover {
    color: var(--color-primary);
}

.post-excerpt {
    color: var(--color-medium);
    line-height: 1.6;
    font-size: 1rem;
}


/* ===== POSTS GRID ===== */

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

.post-card {
    background: var(--color-white);
    border-radius: 16px;
    overflow: hidden;
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.1);
    transition: all 0.3s ease;
    position: relative;
}

.post-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 15px 40px rgba(0, 0, 0, 0.15);
}

.post-card .post-image {
    height: 220px;
}

.post-card .post-content {
    padding: 1.5rem;
}

.post-card .post-title {
    font-size: 1.25rem;
    margin-bottom: 0.75rem;
}

.post-card .post-excerpt {
    margin-bottom: 1.5rem;
    font-size: 0.9rem;
}

.post-link {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    color: var(--color-primary);
    font-weight: 500;
    text-decoration: none;
    transition: all 0.3s ease;
}

.post-link:hover {
    color: var(--color-primary-dark);
    transform: translateX(5px);
}

.post-link i {
    transition: transform 0.3s ease;
}

.post-link:hover i {
    transform: translateX(3px);
}


/* ===== NO POSTS STATE ===== */

.no-posts {
    background: var(--color-white);
    border-radius: 20px;
    padding: 4rem 2rem;
    text-align: center;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
}

.no-posts-content {
    max-width: 400px;
    margin: 0 auto;
}

.no-posts-icon {
    font-size: 4rem;
    margin-bottom: 1.5rem;
}

.no-posts h3 {
    color: var(--color-dark);
    margin-bottom: 1rem;
    font-size: 1.5rem;
}

.no-posts p {
    color: var(--color-medium);
    margin-bottom: 2rem;
    line-height: 1.6;
}

.btn-primary {
    display: inline-block;
    background: var(--color-primary);
    color: var(--color-white);
    padding: 1rem 2rem;
    border-radius: 50px;
    text-decoration: none;
    font-weight: 500;
    transition: all 0.3s ease;
    border: none;
    cursor: pointer;
}

.btn-primary:hover {
    background: var(--color-primary-dark);
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(25, 25, 51, 0.3);
    color: var(--color-white);
    text-decoration: none;
}


/* ===== PAGINATION ===== */

.pagination-wrapper {
    margin-top: 3rem;
}

.pagination {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 1rem;
    flex-wrap: wrap;
}

.pagination-btn {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.75rem 1.5rem;
    background: var(--color-white);
    color: var(--color-dark);
    text-decoration: none;
    border-radius: 50px;
    transition: all 0.3s ease;
    border: 2px solid var(--color-light);
    font-weight: 500;
}

.pagination-btn:hover {
    background: var(--color-primary);
    color: var(--color-white);
    border-color: var(--color-primary);
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(25, 25, 51, 0.3);
    text-decoration: none;
}

.pagination-btn.disabled {
    opacity: 0.5;
    cursor: not-allowed;
    pointer-events: none;
}

.pagination-numbers {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.pagination-number {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 45px;
    height: 45px;
    background: var(--color-white);
    color: var(--color-dark);
    text-decoration: none;
    border-radius: 50%;
    transition: all 0.3s ease;
    border: 2px solid var(--color-light);
    font-weight: 500;
}

.pagination-number:hover {
    background: var(--color-primary);
    color: var(--color-white);
    border-color: var(--color-primary);
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(25, 25, 51, 0.3);
    text-decoration: none;
}

.pagination-number.active {
    background: var(--color-primary);
    color: var(--color-white);
    border-color: var(--color-primary);
    box-shadow: 0 8px 25px rgba(25, 25, 51, 0.3);
}

.pagination-dots {
    color: var(--color-medium);
    font-weight: 500;
}


/* ===== RESPONSIVENESS ===== */

@media (max-width: 1200px) {
    .blog-layout {
        grid-template-columns: 1fr 300px;
        gap: 2rem;
    }
}

@media (max-width: 991px) {
    .blog-hero-title {
        font-size: 2.5rem;
    }
    .blog-hero-subtitle {
        font-size: 1.1rem;
    }
    .featured-posts-grid {
        grid-template-columns: 1fr;
    }
    .posts-grid-large {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 767px) {
    .blog-hero {
        padding: 80px 0 60px;
    }
    .blog-hero-title {
        font-size: 2rem;
    }
    .blog-main {
        padding: 2rem 0;
    }
    .section-title {
        font-size: 2rem;
        flex-direction: column;
        gap: 0.5rem;
    }
    .posts-grid-large {
        grid-template-columns: 1fr;
    }
    .post-card .post-image {
        height: 200px;
    }
    .post-content {
        padding: 1.5rem;
    }
    .post-meta {
        flex-direction: column;
        gap: 0.5rem;
    }
    .search-input-wrapper {
        width: 100%;
    }
    .search-input {
        padding: 15px 20px 15px 50px;
    }
    .filter-submit-btn {
        width: 100%;
        justify-content: center;
    }
}

@media (max-width: 576px) {
    .blog-hero-title {
        font-size: 1.75rem;
    }
    .post-image {
        height: 200px;
    }
    .post-content {
        padding: 1rem;
    }
}