/**
 * Solea News Widget - Frontend Styles
 * Version: 1.0.0
 */

/* Container */
.solea-news-container {
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 15px;
    box-sizing: border-box;
}

/* Grid Layout */
.solea-news-grid {
    display: grid;
    gap: 30px;
}

.solea-news-cols-1 {
    grid-template-columns: 1fr;
}

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

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

/* Responsive */
@media (max-width: 992px) {
    .solea-news-cols-3 {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 768px) {
    .solea-news-cols-2,
    .solea-news-cols-3 {
        grid-template-columns: 1fr;
    }
}

/* Card */
.solea-news-card {
    background: #ffffff;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 2px 15px rgba(0, 0, 0, 0.08);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    display: flex;
    flex-direction: column;
}

.solea-news-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.12);
}

/* Card Image */
.solea-news-image {
    width: 100%;
    height: 200px;
    overflow: hidden;
}

.solea-news-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s ease;
}

.solea-news-card:hover .solea-news-image img {
    transform: scale(1.05);
}

/* Card Content */
.solea-news-content {
    padding: 20px 25px 25px;
    display: flex;
    flex-direction: column;
    flex-grow: 1;
}

/* Date */
.solea-news-date {
    font-size: 13px;
    color: #58BA2A;
    font-weight: 500;
    margin-bottom: 8px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

/* Title */
.solea-news-title {
    font-size: 20px;
    font-weight: 600;
    color: #1a472a;
    margin: 0 0 12px 0;
    line-height: 1.3;
}

/* Excerpt */
.solea-news-excerpt {
    font-size: 15px;
    color: #666666;
    line-height: 1.6;
    margin: 0 0 20px 0;
    flex-grow: 1;
}

/* Read More Button */
.solea-news-read-more {
    display: inline-block;
    padding: 10px 20px;
    background-color: #58BA2A;
    color: #ffffff;
    border: none;
    border-radius: 5px;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: background-color 0.3s ease, transform 0.2s ease;
    align-self: flex-start;
}

.solea-news-read-more:hover {
    background-color: #4aa824;
    transform: translateX(3px);
}

/* Empty State */
.solea-news-empty {
    text-align: center;
    color: #999;
    padding: 40px;
    font-size: 16px;
}

/* ===================
   Modal Styles
   =================== */
.solea-news-modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 99999;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.solea-news-modal.active {
    display: flex;
    align-items: center;
    justify-content: center;
}

.solea-news-modal.visible {
    opacity: 1;
}

/* Overlay */
.solea-news-modal-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.7);
    backdrop-filter: blur(3px);
}

/* Modal Content Container */
.solea-news-modal-content {
    position: relative;
    background: #ffffff;
    border-radius: 12px;
    width: 90%;
    max-width: 800px;
    max-height: 90vh;
    overflow-y: auto;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
    transform: translateY(20px);
    transition: transform 0.3s ease;
    z-index: 1;
}

.solea-news-modal.visible .solea-news-modal-content {
    transform: translateY(0);
}

/* Modal Header */
.solea-news-modal-header {
    padding: 25px 30px 15px;
    border-bottom: 1px solid #eee;
}

.solea-news-modal-title {
    font-size: 26px;
    font-weight: 700;
    color: #1a472a;
    margin: 0 0 8px 0;
    line-height: 1.3;
}

.solea-news-modal-date {
    font-size: 14px;
    color: #58BA2A;
    font-weight: 500;
}

/* Modal Image */
.solea-news-modal-image {
    width: 100%;
    max-height: 400px;
    overflow: hidden;
}

.solea-news-modal-image img {
    width: 100%;
    height: auto;
    display: block;
}

/* Modal Body */
.solea-news-modal-body {
    padding: 25px 30px;
    font-size: 16px;
    line-height: 1.8;
    color: #444;
}

.solea-news-modal-body p {
    margin: 0 0 15px 0;
}

.solea-news-modal-body p:last-child {
    margin-bottom: 0;
}

.solea-news-modal-body img {
    max-width: 100%;
    height: auto;
    border-radius: 6px;
    margin: 15px 0;
}

.solea-news-modal-body a {
    color: #58BA2A;
    text-decoration: none;
}

.solea-news-modal-body a:hover {
    text-decoration: underline;
}

.solea-news-modal-body h2,
.solea-news-modal-body h3,
.solea-news-modal-body h4 {
    color: #1a472a;
    margin: 20px 0 10px 0;
}

.solea-news-modal-body ul,
.solea-news-modal-body ol {
    margin: 10px 0 15px 20px;
}

.solea-news-modal-body li {
    margin-bottom: 5px;
}

/* Modal Close Button */
.solea-news-modal-close {
    display: block;
    width: calc(100% - 60px);
    margin: 0 30px 25px;
    padding: 14px 20px;
    background-color: #58BA2A;
    color: #ffffff;
    border: none;
    border-radius: 6px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: background-color 0.3s ease;
}

.solea-news-modal-close:hover {
    background-color: #4aa824;
}

/* Prevent body scroll when modal is open */
body.solea-news-modal-open {
    overflow: hidden;
}

/* Animation for cards */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.solea-news-card {
    animation: fadeInUp 0.5s ease forwards;
}

.solea-news-card:nth-child(1) { animation-delay: 0s; }
.solea-news-card:nth-child(2) { animation-delay: 0.1s; }
.solea-news-card:nth-child(3) { animation-delay: 0.2s; }
.solea-news-card:nth-child(4) { animation-delay: 0.3s; }
.solea-news-card:nth-child(5) { animation-delay: 0.4s; }
.solea-news-card:nth-child(6) { animation-delay: 0.5s; }
