/*
 Theme Name: Divi Child
 Theme URI: https://www.elegantthemes.com/gallery/divi/
 Description: Divi Child Theme
 Author: Elegant Themes
 Author URI: https://www.elegantthemes.com
 Template: Divi
 Version: 1.0.0
*/
 

.gallery {
    display: flex; 
    flex-wrap: wrap; 
    gap: 5px; 
}

.gallery a {
    display: inline-block; 
}

.gallery__image {
    width: 100px; 
    height: auto; 
    border-radius: 4px; 
    transition: transform 0.3s linear; 
}

.gallery__image:hover {
    transform: scale(1.1); 
}

/* Main Grid */
.custom-acf-posts-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr); 
    gap: 10px;
    width: 100%;
    max-width: 100%;
}
/* For tablet devices */
@media only screen and (max-width: 980px) {
    .custom-acf-posts-grid {
        grid-template-columns: repeat(2, 1fr); /* 2 columns on tablets */
    }
}
/* For mobile devices */
@media only screen and (max-width: 767px) {
    .custom-acf-posts-grid {
        grid-template-columns: 1fr; /* 1 column on mobile */
    }
}
.custom-acf-posts-grid-4 {
    display: grid;
    grid-template-columns: repeat(4, 1fr); 
    gap: 10px;
    width: 100%;
    max-width: 100%;
}
/* For tablet devices */
@media only screen and (max-width: 980px) {
    .custom-acf-posts-grid-4 {
        grid-template-columns: repeat(2, 1fr); /* 2 columns on tablets */
    }
}
/* For mobile devices */
@media only screen and (max-width: 767px) {
    .custom-acf-posts-grid-4 {
        grid-template-columns: 1fr; /* 1 column on mobile */
    }
}
/* Individual post styling */
.custom-post-item {
    border: 1px solid #eee;
    border-radius: 5px;
    overflow: hidden;
    transition: all 0.3s ease;
    width: 100%;
    display: flex;
    flex-direction: column;
    height: 100%; /* Make all items the same height */
}

.custom-post-item:hover {
    box-shadow: 0 5px 15px rgba(0,0,0,0.1);
}

/* Image styling */
.custom-post-image img {
    width: 100%;
    height: 200px;
    object-fit: cover;
}

/* Content area styling */
.custom-post-content {
    padding: 5px;
    flex-grow: 1; /* Allow content area to expand */
    display: flex;
    flex-direction: column;
}

.custom-post-title {
    font-size: 20px;
    /* margin-bottom: 10px; */
}

.custom-post-title a {
    color: #333;
    text-decoration: none;
}

.custom-field-1, .custom-field-2 {
    margin-bottom: 10px;
    color: #666;
}

.custom-post-excerpt {
    margin-bottom: 15px;
    flex-grow: 1; /* Push the read more button to the bottom */
}

.custom-read-more {
    display: inline-block;
    padding: 8px 16px;
    background-color: #2ea3f2; /* Divi blue */
    color: white;
    text-decoration: none;
    border-radius: 3px;
    transition: background 0.3s ease;
    margin-top: auto; /* Push to bottom */
    align-self: flex-start; /* Align to left */
}

.custom-read-more:hover {
    background-color: #0c71c3;
}

/* Force container to full width if needed */
.et_pb_text_inner {
    width: 100%;
}