/* Import Montserrat font */
@import url('https://fonts.googleapis.com/css2?family=Montserrat:wght@400;500;600;700&display=swap');

/* FIXED: Ultra-specific targeting with maximum specificity to override any conflicts */
body .projects-container,
body .projects-container *,
body .project-card,
body .project-card *,
body .project-image,
body .project-image *,
body .project-content,
body .project-content *,
body .project-title,
body .project-description,
body .project-location,
body .read-more,
body .pagination,
body .pagination *,
body .wp-list-table.widefat.fixed,
body .wp-list-table.widefat.fixed *,
html body .projects-container,
html body .projects-container *,
html body .project-card,
html body .project-card *,
html body .project-image,
html body .project-image *,
html body .project-content,
html body .project-content *,
html body .project-title,
html body .project-description,
html body .project-location,
html body .read-more,
html body .pagination,
html body .pagination * {
    font-family: 'Montserrat', sans-serif !important;
    box-sizing: border-box !important;
}

/* Additional protection against layout interference */
body .projects-container {
    display: flex !important;
    flex-direction: column !important;
    gap: 20px !important;
    padding: 20px !important;
    font-family: 'Montserrat', sans-serif !important;
}

/* Main container holding all project cards - Enhanced protection */
body .projects-container {
    display: flex !important;
    flex-direction: column !important;
    gap: 20px !important;
    padding: 20px !important;
    font-family: 'Montserrat', sans-serif !important;
}

/* Style each project card - Enhanced protection */
body .project-card {
    display: flex !important;
    background-color: #fff !important;
    border: 1px solid #e1e1e1 !important;
    overflow: hidden !important;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1) !important;
    margin-bottom: 20px !important;
    font-family: 'Montserrat', sans-serif !important;
}

/* Project image style - Enhanced protection */
body .project-image {
    position: relative !important;
    width: 200px !important;
    height: 200px !important;
    overflow: hidden !important;
    flex-shrink: 0 !important;
}

body .project-image img {
    width: 100% !important;
    height: 100% !important;
    object-fit: cover !important;
    display: block !important;
}

/* City label as a tag-like element - Enhanced protection */
body .project-location {
    background-color: #fff !important;
    color: #000 !important;
    padding: 5px 10px !important;
    position: absolute !important;
    top: 10px !important;
    left: 10px !important;
    font-weight: 600 !important;
    text-transform: uppercase !important;
    z-index: 2 !important;
    font-size: 12px !important;
    border-radius: 50px !important;
    font-family: 'Montserrat', sans-serif !important;
}

/* Content within each project card - Enhanced protection */
body .project-content {
    padding: 20px !important;
    display: flex !important;
    flex-direction: column !important;
    justify-content: space-between !important;
    flex-grow: 1 !important;
    font-family: 'Montserrat', sans-serif !important;
}

/* Project title style - Enhanced protection */
body .project-title {
    font-size: 24px !important;
    font-weight: 700 !important;
    margin: 0 0 10px 0 !important;
    color: #333 !important;
    font-family: 'Montserrat', sans-serif !important;
}

/* Project description style - Enhanced protection */
body .project-description {
    font-size: 16px !important;
    margin-top: 10px !important;
    color: #555 !important;
    font-family: 'Montserrat', sans-serif !important;
}

/* Read More button style - Enhanced protection */
body .read-more {
    color: #61C585 !important;
    text-decoration: none !important;
    font-weight: 600 !important;
    margin-top: auto !important;
    font-family: 'Montserrat', sans-serif !important;
}

body .read-more:hover {
    text-decoration: underline !important;
}

/* Pagination Container - Enhanced protection */
body .pagination {
    text-align: center !important;
    margin-top: 20px !important;
    font-family: 'Montserrat', sans-serif !important;
}

/* Style for each pagination item - Enhanced protection */
body .pagination li {
    display: inline !important;
    margin: 0 5px !important;
    font-family: 'Montserrat', sans-serif !important;
    list-style: none !important;
}

/* Style for each link - Enhanced protection */
body .pagination a, body .pagination span {
    text-decoration: none !important;
    color: #61C585 !important;
    border: 1px solid #61C585 !important;
    padding: 5px 10px !important;
    border-radius: 5px !important;
    font-family: 'Montserrat', sans-serif !important;
}

/* Styles for the current page number - Enhanced protection */
body .pagination .current {
    background-color: #61C585 !important;
    color: #fff !important;
    border: 1px solid #61C585 !important;
}

/* Hover Styles - Enhanced protection */
body .pagination a:hover {
    background-color: #f0f0f0 !important;
}

/* Styles for the Previous and Next links - Enhanced protection */
body .pagination .prev, body .pagination .next {
    background-color: transparent !important;
}

/* Disabled Previous/Next links - Enhanced protection */
body .pagination .disabled {
    color: #61C585 !important;
    border-color: #61C585 !important;
    pointer-events: none !important;
    background-color: #f9f9f9 !important;
}

/* Remove padding from the UL element - Enhanced protection */
body .pagination ul {
    padding-left: 0 !important;
    font-family: 'Montserrat', sans-serif !important;
}

/* Admin Page Styles - Enhanced protection */
body .wp-list-table.widefat.fixed {
    margin-top: 20px !important;
    font-family: 'Montserrat', sans-serif !important;
}

body .wp-list-table.widefat.fixed .form-table {
    margin-bottom: 20px !important;
    font-family: 'Montserrat', sans-serif !important;
}

@media only screen and (max-width: 767px) {
    body .project-card {
        flex-direction: column !important;
    }

    body .project-image {
        width: 100% !important;
        height: auto !important;
    }

    body .project-image img {
        width: 100% !important;
        height: auto !important;
    }

    body .project-content {
        padding: 15px !important;
    }

    body .project-title {
        font-size: 24px !important;
        margin-bottom: 8px !important;
    }

    body .project-description {
        font-size: 16px !important;
        margin-bottom: 15px !important;
    }

    body .read-more {
        font-size: 16px !important;
        margin-bottom: 15px !important;
    }

    body .pagination {
        margin-top: 20px !important;
    }

    body .pagination a, body .pagination span {
        padding: 8px 12px !important;
        margin-right: 3px !important;
        font-size: 14px !important;
    }

    body .read-more:hover {
        background-color: transparent !important;
    }
}

@media only screen and (max-width: 480px) {
    body .project-card {
        flex-direction: column !important;
    }

    body .project-image {
        width: 100% !important;
        height: auto !important;
    }

    body .project-image img {
        width: 100% !important;
        height: auto !important;
    }

    body .project-title {
        font-size: 20px !important;
        margin-bottom: 6px !important;
    }

    body .project-description {
        font-size: 14px !important;
        margin-bottom: 12px !important;
    }

    body .read-more {
        font-size: 14px !important;
        margin-bottom: 10px !important;
    }

    body .pagination {
        margin-top: 15px !important;
    }

    body .pagination a, body .pagination span {
        padding: 7px 10px !important;
        font-size: 12px !important;
    }

    body .project-location {
        font-size: 9px !important;
        padding: 3px 7px !important;
    }
}
