/**
 * CSS for child category template
 * Standalone CSS with all necessary styles
 */

/* #region Common Styles */
.category-child-template .text-bold {
    font-family: Inter Bold;
}

.category-child-template .section-p {
    padding: 40px 0;
}

.category-child-template .banner-image {
    width: 100%;
}

@media (min-width: 1200px) {
    .category-child-template .container {
        width: 1200px;
    }
}

@media (max-width: 979px) {
    .category-child-template .section-p {
        padding: 30px 0;
    }
}

@media (max-width: 767px) {
    .category-child-template .section-p {
        padding: 30px 0;
    }
}
/* #endregion */

/* #region Hero & Search */
.category-child-template .hero {
    position: relative;
    margin-bottom: 80px;
}

.category-child-template .hero img {
    width: 100%;
    height: auto;
    display: block;
}

.category-child-template .search-wrapper {
    position: absolute;
    left: 0;
    right: 0;
    top: 100%; 
    transform: translateY(-50%);
    z-index: 10;
    padding: 0 15px;
}

.category-child-template .search-box {
    background: #ffffff;
    border-radius: 16px;
    box-shadow: 0px 0px 8px 0px rgba(0, 0, 0, 0.16);
    display: flex;
    align-items: center;
    padding: 24px;
    gap: 12px;
}

.category-child-template .search-box-input {
    position: relative;
    flex: 1;
}

.category-child-template input.search-input {
    width: 100%;
    border: 1px solid #DFE1E6;
    border-radius: 8px;
    outline: none;
    font-size: 16px;
    padding: 12px 46px 12px 16px;
    color: #1F2629;
    height: auto;
    line-height: 22px;
}

.category-child-template .search-input::placeholder {
    color: #8B9FA7;
}

.category-child-template .search-clear {
    position: absolute;
    right: 12px;
    top: 10px;
    background: none;
    border: none;
    cursor: pointer;
    padding: 4px;
    display: none;
    align-items: center;
    justify-content: center;
    opacity: 0.6;
    transition: opacity 0.3s ease;
}

.category-child-template .search-clear:hover {
    opacity: 1;
}

.category-child-template .search-clear img {
    width: 20px;
    height: 20px;
    display: block;
}

.category-child-template .search-submit {
    font-family: Inter Bold;
    background: #1E9FD8;
    border: none;
    border-radius: 8px;
    padding: 12px 16px;
    display: flex;
    align-items: center;
    gap: 8px;
    cursor: pointer;
    transition: background 0.3s ease;
    color: #ffffff;
    font-size: 16px;
    font-weight: 500;
}

.category-child-template .search-submit:hover {
    background: #1789BF;
}

.category-child-template .search-submit img {
    width: 24px;
    height: 24px;
    display: block;
}

@media (max-width: 768px) {
    .category-child-template .search-box {
        padding: 6px 6px 6px 16px;
        gap: 8px;
    }
    
    .category-child-template .search-input {
        font-size: 14px;
        padding: 10px 0;
    }
    
    .category-child-template .search-submit {
        padding: 10px 16px;
        font-size: 14px;
    }
    
    .category-child-template .search-submit span {
        display: none;
    }
    
    .category-child-template .hero {
        margin-bottom: 60px;
    }
}

@media (max-width: 480px) {
    .category-child-template .hero {
        margin-bottom: 0;
    }

    .category-child-template .search-wrapper {
        padding: 0;
        position: relative;
        margin-top: 16px;
        transform: unset;
    }
    
    .category-child-template .search-box {
        padding: 6px 6px 6px 12px;
    }
}
/* #endregion */

/* #region Search Results */
.category-child-template .search-results {
    display: none;
    margin-top: 40px;
}

.category-child-template .search-header {
    margin-bottom: 20px;
}

.category-child-template .search-message {
    font-size: 24px;
    text-align: center;
    color: #1F2629;
}

@media (max-width: 979px) {
    .category-child-template .search-message {
        font-size: 20px;
    }
}

@media (max-width: 768px) {
    .category-child-template .search-message {
        font-size: 18px;
    }
    
    .category-child-template .search-results {
        margin-top: 30px;
    }
}

@media (max-width: 480px) {
    .category-child-template .search-message {
        font-size: 16px;
    }
    
    .category-child-template .search-results {
        margin-top: 24px;
    }
    
    .category-child-template .search-header {
        margin-bottom: 16px;
    }
}
/* #endregion */

/* #region Section Header */
.category-child-template .section-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
}

.category-child-template .section-title {
    font-family: Inter Bold;
    font-size: 36px;
    margin: 0;
    color: #1F2629;
}

@media (max-width: 979px) {
    .category-child-template .section-title {
        font-size: 28px;
    }
}

@media (max-width: 768px) {
    .category-child-template .section-title {
        font-size: 24px;
    }
}

@media (max-width: 480px) {
    .category-child-template .section-title {
        font-size: 20px;
    }
}
/* #endregion */

/* #region Child Category Template */
.category-child-template {
    padding-top: 60px;
    font-family: Inter, Arial, sans-serif;
    font-size: 16px;
    color: #1F2629;
}

.category-child-template .text-bold {
    font-family: Inter Bold;
}

.category-child-template .section-p {
    padding: 40px 0;
}

@media (min-width: 1200px) {
    .category-child-template .container {
        width: 1200px;
    }
}

@media (max-width: 979px) {
    .category-child-template .section-p {
        padding: 30px 0;
    }
}

@media (max-width: 767px) {
    .category-child-template .section-p {
        padding: 30px 0;
    }
}
/* #endregion */

/* #region Document Grid */
.document-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 30px;
    margin: 32px 0 0;
    transition: opacity 0.3s ease;
}

.document-grid .document-item {
    display: flex;
    flex-direction: column;
    background-color: #FFF;
    box-shadow: 0px 0px 8px 0px rgba(0, 0, 0, 0.16);
    border-radius: 8px;
    padding: 12px;
    height: 100%;
}

.document-grid .document-thumbnail {
    display: inline-block;
    aspect-ratio: 346/194;
    border-radius: 6px;
    overflow: hidden;
}

.document-grid .document-thumbnail img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: all 0.3s ease-in-out;
}

.document-grid .document-item:hover .document-thumbnail img {
    transform: scale(1.1);
}

.document-grid .document-content {
    padding: 20px 4px 4px;
}

.document-grid a.document-category {
    display: inline-block;
    font-family: Inter Medium;
    color: #19ACE1;
    padding: 4px 8px;
    background-color: #E8F7FC;
    border-radius: 20px;
}

.document-grid a.document-title {
    font-family: Inter SemiBold;
    font-size: 18px;
    display: block;
    color: #1F2629;
    margin: 12px 0 16px;
}

.document-grid a.document-title:hover {
    color: #19ACE1;
}

.document-grid .document-excerpt {
    color: #1F2629;
    font-size: 16px;
    line-height: 1.5;
}

.document-grid .no-posts {
    grid-column: 1 / -1;
    text-align: center;
    padding: 40px 20px;
    font-size: 18px;
    color: #8B9FA7;
}

@media (max-width: 979px) {
    .document-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 24px;
    }
}

@media (max-width: 480px) {
    .document-grid {
        grid-template-columns: 1fr;
        gap: 16px;
        margin-top: 24px;
    }

    .document-grid a.document-category {
        font-size: 14px;
    }

    .document-grid a.document-title {
        font-size: 16px;
        margin: 12px 0;
    }

    .document-grid .document-excerpt {
        font-size: 14px;
    }
}
/* #endregion */

/* #region Category Pagination */
.category-pagination {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 24px;
    flex-wrap: wrap;
    margin-top: 40px;
}

.pagination-info {
    font-size: 16px;
    color: #1F2629;
}

.pagination-nav {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    flex-wrap: wrap;
}

.pagination-btn {
    min-width: 40px;
    height: 40px;
    padding: 8px;
    border: 1px solid #E0E0E0;
    background: #ffffff;
    color: #1F2629;
    border-radius: 4px;
    cursor: pointer;
    transition: all 0.3s ease;
    font-size: 14px;
    font-family: Inter, Arial, sans-serif;
}

.pagination-btn img {
    max-width: 100%;
    display: block;
}

.pagination-btn:hover:not(.active):not(.disabled) {
    border-color: #19ACE1;
    color: #19ACE1;
    background: #E8F7FC;
}

.pagination-btn.active {
    background: #19ACE1;
    color: #ffffff;
    border-color: #19ACE1;
    cursor: default;
    font-family: Inter Bold;
}

.pagination-btn.disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.pagination-dots {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    padding: 8px;
    border: 1px solid #E0E0E0;
    background: #ffffff;
    border-radius: 4px;
}

.pagination-dots img {
    display: block;
}

@media (max-width: 768px) {
    .category-pagination {
        justify-content: center;
        gap: 16px;
        margin-top: 30px;
    }

    .pagination-info {
        width: 100%;
        text-align: center;
        font-size: 14px;
    }
}

@media (max-width: 480px) {
    .category-pagination {
        margin-top: 24px;
    }

    .pagination-btn {
        min-width: 36px;
        height: 36px;
        font-size: 13px;
        padding: 6px;
    }

    .pagination-dots {
        width: 36px;
        height: 36px;
        padding: 6px;
    }

    .pagination-dots img,
    .pagination-btn img {
        width: 18px;
        height: 18px;
    }
}
/* #endregion */
