/* Base Layouts for Elementor CPT Grids */

/* --- Services Grid --- */
.elementor-cpt-services-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 30px;
}

.cpt-service-item {
    background: #fdf2e9;
    border-radius: 8px;
    padding: 30px;
    text-align: center;
    transition: transform 0.3s ease;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.cpt-service-item:hover {
    transform: translateY(-5px);
}

.cpt-service-image {
    width: 100%;
    max-width: 200px;
    height: auto;
    border-radius: 8px;
    margin-bottom: 20px;
    object-fit: cover;
}

.cpt-service-title {
    color: #e67e22;
    font-size: 1.2rem;
    font-weight: 600;
    margin-bottom: 15px;
}

.cpt-service-excerpt {
    color: #4a5568;
    font-size: 0.95rem;
    line-height: 1.6;
}

/* --- Works Grid --- */
.elementor-cpt-works-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 20px;
}

.cpt-work-item {
    position: relative;
    border-radius: 0px;
    overflow: hidden;
    aspect-ratio: 1 / 1;
}

.cpt-work-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s ease;
    display: block;
}

.cpt-work-item:hover .cpt-work-image {
    transform: scale(1.05);
}

.cpt-work-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(44, 62, 80, 0.85);
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    padding: 20px;
    opacity: 0;
    transition: opacity 0.3s ease;
    text-align: center;
}

.cpt-work-item:hover .cpt-work-overlay {
    opacity: 1;
}

.cpt-work-title {
    color: #e67e22;
    font-size: 1.5rem;
    margin-bottom: 10px;
    transform: translateY(20px);
    transition: transform 0.3s ease;
}

.cpt-work-item:hover .cpt-work-title {
    transform: translateY(0);
}

.cpt-work-excerpt {
    color: #ffffff;
    font-size: 0.9rem;
    margin-bottom: 20px;
    transform: translateY(20px);
    transition: transform 0.3s ease;
}

.cpt-work-item:hover .cpt-work-excerpt {
    transform: translateY(0);
}

.cpt-work-button {
    background-color: #e67e22;
    color: #fff;
    padding: 10px 25px;
    border-radius: 30px;
    text-decoration: none;
    font-weight: 500;
    transition: background-color 0.3s;
    transform: translateY(20px);
}

.cpt-work-item:hover .cpt-work-button {
    transform: translateY(0);
}

.cpt-work-button:hover {
    background-color: #d35400;
}

/* --- Blog Grid --- */
.elementor-cpt-blog-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 30px;
}

.cpt-blog-item {
    background-color: #2c3e50;
    border-radius: 4px;
    padding: 30px;
    position: relative;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    min-height: 250px;
    overflow: hidden;
    text-decoration: none;
    transition: transform 0.3s ease;
}

.cpt-blog-item:hover {
    transform: translateY(-5px);
}

/* If post has a thumbnail, use it as a very subtle background to match the screenshot */
.cpt-blog-item::before {
    content: "";
    position: absolute;
    top: 0; left: 0; right: 0; bottom: 0;
    background-size: cover;
    background-position: center;
    opacity: 0.1;
    z-index: 1;
}

.cpt-blog-item.has-bg::before {
    /* Background image is set inline in the PHP file */
}

.cpt-blog-item-bg {
    position: absolute;
    top: 0; left: 0; right: 0; bottom: 0;
    background-size: cover;
    background-position: center;
    opacity: 0.1;
    z-index: 1;
}

.cpt-blog-content {
    position: relative;
    z-index: 2;
}

.cpt-blog-date {
    color: #ffffff;
    font-size: 0.8rem;
    font-weight: bold;
    text-transform: uppercase;
    margin-bottom: 15px;
}

.cpt-blog-title {
    color: #e67e22;
    font-size: 1.3rem;
    line-height: 1.4;
    margin: 0;
}

.cpt-blog-author {
    color: #e67e22;
    font-size: 0.9rem;
    font-weight: bold;
    margin-top: 30px;
    position: relative;
    z-index: 2;
}

.cpt-blog-author span {
    color: #95a5a6;
    font-weight: normal;
    display: block;
    font-size: 0.8rem;
    margin-top: 5px;
}
