/* 
 * ACF Key Content Repeater Styles
 * Combined styles for staff and projects display with flexible column layouts
 */

/* Shared Grid Styles */
.key-content-grid {
    display: grid;
    gap: 20px;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
}

.key-staff-grid {
    display: grid;
    gap: 20px;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
}

.key-projects-grid {
    display: grid;
    gap: 20px;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
}

.key-services-grid {
    display: grid;
    gap: 2px;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
}

.key-sectors-grid {
    display: grid;
    gap: 20px;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
}

.key-articles-grid {
    display: grid;
    gap: 20px;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
}

/* Column Layout Classes */
.columns-1 {
    grid-template-columns: 1fr;
}

.columns-2 {
    grid-template-columns: repeat(2, 1fr);
}

.columns-3 {
    grid-template-columns: repeat(3, 1fr);
}

.columns-4 {
    grid-template-columns: repeat(4, 1fr);
}

.columns-5 {
    grid-template-columns: repeat(5, 1fr);
}

.columns-6 {
    grid-template-columns: repeat(6, 1fr);
}

/* Remove individual width settings as grid handles this */
.columns-1 .content-card,
.columns-1 .people-card,
.columns-1 .project-card,
.columns-1 .service-card,
.columns-1 .sector-item,
.columns-1 .article-card,
.columns-2 .content-card,
.columns-2 .people-card,
.columns-2 .project-card,
.columns-2 .service-card,
.columns-2 .sector-item,
.columns-2 .article-card,
.columns-3 .content-card,
.columns-3 .people-card,
.columns-3 .project-card,
.columns-3 .service-card,
.columns-3 .sector-item,
.columns-3 .article-card,
.columns-4 .content-card,
.columns-4 .people-card,
.columns-4 .project-card,
.columns-4 .service-card,
.columns-4 .sector-item,
.columns-4 .article-card,
.columns-5 .content-card,
.columns-5 .people-card,
.columns-5 .project-card,
.columns-5 .service-card,
.columns-5 .sector-item,
.columns-5 .article-card,
.columns-6 .content-card,
.columns-6 .people-card,
.columns-6 .project-card,
.columns-6 .service-card,
.columns-6 .sector-item,
.columns-6 .article-card {
    width: auto;
}

/* Shared Card Styles */
.content-card {
    background: #fff;
    border: 1px solid #ddd;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    text-decoration: none;
    color: inherit;
    background: #ebebeb;
    height: 100%;
}

/* Staff Card Specific Styles */
.people-card {
    background: #fff;
    border: 1px solid #ddd;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    text-decoration: none;
    color: inherit;
    background: #ebebeb;
    height: 100%;
}

.people-card img {
    width: 100%;
    height: 330px;
    object-fit: cover;
    display: block;
}

.post-details {
    padding: 20px 10px;
    flex: 1;
    display: flex;
    flex-direction: column;
}

.post__header {
    flex-grow: 1;
}

.post__meta {
    margin-top: auto;
}

h3.post-title {
    font-size: 17px;
    font-weight: 600;
}

.post-meta-item {
    margin-top: 15px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.post-meta-item a {
    text-decoration: none;
    font-size: 12px;
}

/* Project Card Specific Styles */
.project-card {
    background: #fff;
    border: 1px solid #ddd;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    text-decoration: none;
    color: inherit;
    background: #ebebeb;
    height: 100%;
}

.project-card img {
    width: 100%;
    height: 200px;
    object-fit: cover;
    display: block;
}

.project-card-content {
    padding: 15px;
    flex: 1;
    display: flex;
    flex-direction: column;
}

.project-card-content h5 {
    margin-top: 0;
    flex-grow: 1;
}

.project-meta-text {
    margin-top: auto;
}

.project-meta-text p {
    font-size: 80%;
    line-height: 15px;
}

/* Shared Content Details */
.content-details {
    padding: 15px;
    flex: 1;
    display: flex;
    flex-direction: column;
}

.content-details h5 {
    margin-top: 0;
    flex-grow: 1;
}

/* Services Card Specific Styles */
.service-card {
    background: #fff;
    border: 1px solid #ddd;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    background: #ebebeb;
    height: auto;
    min-height: auto;
}

.service-accordion-btn {
    background: #016970;
    border: none;
    width: 100%;
    text-align: left;
    padding: 15px 15px;
    font-weight: 600;
    font-size: 17px;
    cursor: pointer;
    transition: background-color 0.3s ease;
    color: white;
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-family: "Work Sans";
}

.service-accordion-btn:hover {
    background: #1f5a56;
}

.service-accordion-btn:focus {
    outline: none;
    background: #1f5a56;
}

.accordion-icon {
    font-size: 14px;
    transition: transform 0.3s ease;
}

.accordion-icon svg {
    display: block;
    transition: transform 0.3s ease;
}

.service-content {
    max-height: 500px;
    overflow: hidden;
    transition: max-height 0.3s ease;
}

.service-content.collapsed {
    max-height: 0;
}

.service-body {
    padding: 20px 15px;
    background: #f9f9f9;
    border-top: 1px solid #ddd;
}

.service-body p {
    margin-bottom: 10px;
    line-height: 1.6;
    color: #333;
    font-size: 14px;
}

.service-body li {
    font-size: 14px;
}

/* Sectors Card Specific Styles */
.sector-item {
    background: #fff;
    border: 1px solid #ddd;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    background: #ebebeb;
    height: 100%;
    position: relative;
}

.sector-item img {
    width: 100%;
    height: 200px;
    object-fit: cover;
    display: block;
}

.sector-link,
.sector-no-link {
    display: block;
    text-decoration: none;
    color: inherit;
    height: 100%;
    position: relative;
}

.sector-bg-img-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.3);
    z-index: 1;
    transition: background 0.3s ease;
}

.sector-link:hover .sector-bg-img-overlay {
    background: rgba(0, 0, 0, 0.5);
}

/* Article Card Specific Styles */
.article-card {
    background: #fff;
    border: 1px solid #ddd;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    background: #ebebeb;
    height: 100%;
}

.article-card .article-link {
    display: flex;
    flex-direction: column;
    height: 100%;
    text-decoration: none;
    color: inherit;
}

.article-card img {
    width: 100%;
    height: 200px;
    object-fit: cover;
    display: block;
}

.article-card-content {
    padding: 15px;
    flex: 1;
    display: flex;
    flex-direction: column;
}

.article-card-content h5 {
    margin-top: 0;
    margin-bottom: 10px;
    font-size: 16px;
    line-height: 1.3;
    font-weight: 500;
}

/* Responsive Design */
@media (max-width: 1200px) {
    /* 5 and 6 column layouts become 4 columns on smaller screens */
    .columns-5,
    .columns-6 {
        grid-template-columns: repeat(4, 1fr);
    }
}

@media (max-width: 900px) {
    /* 3+ column layouts become 2 columns on tablets */
    .columns-3,
    .columns-4,
    .columns-5,
    .columns-6 {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 600px) {
    /* All layouts become single column on mobile */
    .columns-1,
    .columns-2,
    .columns-3,
    .columns-4,
    .columns-5,
    .columns-6 {
        grid-template-columns: 1fr;
    }
    
    .people-card img {
        height: 250px;
    }
    
    .project-card img {
        height: 150px;
    }
    
    .article-card img {
        height: 150px;
    }
} 