/**
 * Kegiatan Desa - Frontend Styles
 * Version: 1.0.0
 */

/* ========================
   Wrapper & Container
   ======================== */
.kegiatan-desa-wrapper {
    width: 100%;
    margin: 30px auto;
    padding: 0 15px;
}

/* ========================
   Grid Layout
   ======================== */
.kegiatan-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
    gap: 30px;
    margin: 0;
    padding: 0;
    list-style: none;
}

/* ========================
   Kegiatan Card
   ======================== */
.kegiatan-card {
    background: #ffffff;
    border-radius: 10px;
    overflow: hidden;
    box-shadow: 0 2px 15px rgba(0, 0, 0, 0.1);
    transition: all 0.3s ease;
    display: flex;
    flex-direction: column;
    height: 100%;
}

.kegiatan-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 8px 25px rgba(23, 142, 121, 0.2);
}

/* ========================
   Image Section
   ======================== */
.kegiatan-image {
    width: 100%;
    height: 250px;
    overflow: hidden;
    position: relative;
    background: #f5f5f5;
}

.kegiatan-image a {
    display: block;
    width: 100%;
    height: 100%;
}

.kegiatan-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s ease;
}

.kegiatan-card:hover .kegiatan-image img {
    transform: scale(1.1);
}

/* ========================
   Content Section
   ======================== */
.kegiatan-content {
    padding: 25px;
    display: flex;
    flex-direction: column;
    flex: 1;
}

.kegiatan-title {
    font-size: 20px;
    font-weight: 700;
    margin: 0 0 15px 0;
    line-height: 1.4;
    color: #333;
}

.kegiatan-title a {
    color: #333;
    text-decoration: none;
    transition: color 0.3s ease;
}

.kegiatan-title a:hover {
    color: #178e79;
}

/* ========================
   Meta Information
   ======================== */
.kegiatan-meta {
    display: flex;
    align-items: center;
    gap: 15px;
    margin-bottom: 15px;
    font-size: 14px;
    color: #666;
}

.kegiatan-date {
    display: flex;
    align-items: center;
    gap: 5px;
}

.kegiatan-date .dashicons {
    font-size: 16px;
    width: 16px;
    height: 16px;
}

/* ========================
   Excerpt
   ======================== */
.kegiatan-excerpt {
    font-size: 15px;
    line-height: 1.7;
    color: #555;
    margin-bottom: 20px;
    flex: 1;
}

/* ========================
   Button
   ======================== */
.kegiatan-button {
    display: inline-block;
    background: #178e79;
    color: #ffffff !important;
    padding: 12px 30px;
    border-radius: 25px;
    text-decoration: none;
    font-size: 14px;
    font-weight: 600;
    text-align: center;
    transition: all 0.3s ease;
    border: 2px solid #178e79;
    align-self: flex-start;
}

.kegiatan-button:hover {
    background: #146b5f;
    border-color: #146b5f;
    transform: translateX(5px);
    color: #ffffff !important;
}

/* ========================
   Empty State
   ======================== */
.kegiatan-not-found {
    text-align: center;
    padding: 60px 20px;
    background: #f9f9f9;
    border-radius: 10px;
    border: 2px dashed #ddd;
}

.kegiatan-not-found p {
    font-size: 16px;
    color: #666;
    margin: 0;
}

/* ========================
   Responsive Design
   ======================== */

/* Tablet */
@media (max-width: 1024px) {
    .kegiatan-grid {
        grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
        gap: 25px;
    }
    
    .kegiatan-image {
        height: 220px;
    }
    
    .kegiatan-content {
        padding: 20px;
    }
    
    .kegiatan-title {
        font-size: 18px;
    }
}

/* Mobile */
@media (max-width: 768px) {
    .kegiatan-desa-wrapper {
        margin: 20px auto;
    }
    
    .kegiatan-grid {
        grid-template-columns: 1fr;
        gap: 20px;
    }
    
    .kegiatan-image {
        height: 200px;
    }
    
    .kegiatan-content {
        padding: 18px;
    }
    
    .kegiatan-title {
        font-size: 17px;
        margin-bottom: 12px;
    }
    
    .kegiatan-excerpt {
        font-size: 14px;
        margin-bottom: 18px;
    }
    
    .kegiatan-button {
        padding: 10px 25px;
        font-size: 13px;
    }
    
    .kegiatan-card:hover {
        transform: translateY(-5px);
    }
}

/* Small Mobile */
@media (max-width: 480px) {
    .kegiatan-desa-wrapper {
        padding: 0 10px;
    }
    
    .kegiatan-card {
        border-radius: 8px;
    }
    
    .kegiatan-image {
        height: 180px;
    }
    
    .kegiatan-content {
        padding: 15px;
    }
    
    .kegiatan-title {
        font-size: 16px;
    }
    
    .kegiatan-excerpt {
        font-size: 13px;
    }
    
    .kegiatan-button {
        width: 100%;
        padding: 12px 20px;
    }
}

/* ========================
   Print Styles
   ======================== */
@media print {
    .kegiatan-button {
        display: none;
    }
    
    .kegiatan-card {
        break-inside: avoid;
        box-shadow: none;
        border: 1px solid #ddd;
    }
    
    .kegiatan-card:hover {
        transform: none;
    }
}

/* ========================
   Accessibility
   ======================== */
.kegiatan-button:focus,
.kegiatan-title a:focus {
    outline: 2px solid #178e79;
    outline-offset: 2px;
}

/* High Contrast Mode Support */
@media (prefers-contrast: high) {
    .kegiatan-card {
        border: 2px solid #000;
    }
    
    .kegiatan-button {
        border-width: 3px;
    }
}

/* Reduced Motion Support */
@media (prefers-reduced-motion: reduce) {
    .kegiatan-card,
    .kegiatan-image img,
    .kegiatan-button,
    .kegiatan-title a {
        transition: none;
    }
    
    .kegiatan-card:hover {
        transform: none;
    }
}

/* ========================
   Alternative Grid Layouts
   ======================== */

/* 2 Column Layout */
.kegiatan-grid.kegiatan-grid-2 {
    grid-template-columns: repeat(2, 1fr);
}

/* 3 Column Layout */
.kegiatan-grid.kegiatan-grid-3 {
    grid-template-columns: repeat(3, 1fr);
}

/* 4 Column Layout */
.kegiatan-grid.kegiatan-grid-4 {
    grid-template-columns: repeat(4, 1fr);
}

/* List Layout */
.kegiatan-grid.kegiatan-list {
    grid-template-columns: 1fr;
}

.kegiatan-list .kegiatan-card {
    display: grid;
    grid-template-columns: 300px 1fr;
    height: auto;
}

.kegiatan-list .kegiatan-image {
    height: 100%;
    min-height: 250px;
}

@media (max-width: 768px) {
    .kegiatan-grid.kegiatan-grid-2,
    .kegiatan-grid.kegiatan-grid-3,
    .kegiatan-grid.kegiatan-grid-4,
    .kegiatan-list .kegiatan-card {
        grid-template-columns: 1fr;
    }
    
    .kegiatan-list .kegiatan-image {
        height: 200px;
        min-height: auto;
    }
}
