/**
 * Theme Widgets Styling to Match NGO Design System
 *
 * This stylesheet makes the theme's default widgets (Events, Blog, etc.)
 * look consistent with our custom NGO components
 */

/* ========================================
   EVENTS WIDGET STYLING (wpsection_event)
   ======================================== */

/* Events Section Container */
.wpsection_event {
    font-family: var(--font-primary);
}

/* Event Card Styling */
.wpsection_event .event-card,
.wpsection_event .event-item {
    background: white;
    border-radius: var(--radius-lg);
    overflow: hidden;
    box-shadow: var(--shadow-sm);
    transition: all var(--transition-base);
    border: 1px solid #e5e7eb;
}

.wpsection_event .event-card:hover,
.wpsection_event .event-item:hover {
    box-shadow: var(--shadow-lg);
    transform: translateY(-5px);
}

/* Event Image */
.wpsection_event .event-image,
.wpsection_event .event-thumb {
    position: relative;
    overflow: hidden;
}

.wpsection_event .event-image img,
.wpsection_event .event-thumb img {
    width: 100%;
    height: auto;
    object-fit: cover;
    transition: transform var(--transition-base);
}

.wpsection_event .event-card:hover .event-image img,
.wpsection_event .event-item:hover .event-thumb img {
    transform: scale(1.05);
}

/* Event Date Badge */
.wpsection_event .event-date,
.wpsection_event .date-badge {
    position: absolute;
    top: 20px;
    left: 20px;
    background: var(--primary);
    color: white;
    padding: var(--space-3) var(--space-4);
    border-radius: var(--radius-md);
    font-weight: var(--font-semibold);
    z-index: 2;
    box-shadow: 0 4px 12px rgba(76, 175, 80, 0.3);
}

.wpsection_event .event-date .day,
.wpsection_event .date-badge .day {
    display: block;
    font-size: var(--text-2xl);
    font-weight: var(--font-bold);
    line-height: 1;
}

.wpsection_event .event-date .month,
.wpsection_event .date-badge .month {
    display: block;
    font-size: var(--text-sm);
    text-transform: uppercase;
    margin-top: 4px;
}

/* Event Content */
.wpsection_event .event-content {
    padding: var(--space-6);
}

/* Event Title */
.wpsection_event .event-title,
.wpsection_event h3 {
    font-size: var(--text-xl);
    font-weight: var(--font-semibold);
    color: var(--text-primary);
    margin: 0 0 var(--space-3);
    line-height: 1.4;
}

.wpsection_event .event-title a,
.wpsection_event h3 a {
    color: var(--text-primary);
    text-decoration: none;
    transition: color var(--transition-base);
}

.wpsection_event .event-title a:hover,
.wpsection_event h3 a:hover {
    color: var(--primary);
}

/* Event Meta (Time, Location) */
.wpsection_event .event-meta,
.wpsection_event .meta-info {
    display: flex;
    flex-direction: column;
    gap: var(--space-2);
    margin-bottom: var(--space-4);
}

.wpsection_event .meta-item {
    display: flex;
    align-items: center;
    gap: var(--space-2);
    font-size: var(--text-sm);
    color: var(--text-secondary);
}

.wpsection_event .meta-item i {
    color: var(--primary);
    font-size: 1rem;
}

/* Event Description */
.wpsection_event .event-description,
.wpsection_event .event-excerpt {
    font-size: var(--text-base);
    color: var(--text-secondary);
    line-height: 1.6;
    margin-bottom: var(--space-4);
}

/* Event Button */
.wpsection_event .event-btn,
.wpsection_event .btn,
.wpsection_event a.button {
    display: inline-flex;
    align-items: center;
    gap: var(--space-2);
    padding: var(--space-3) var(--space-6);
    background: transparent;
    color: var(--primary);
    border: 2px solid var(--primary);
    border-radius: var(--radius-lg);
    font-size: var(--text-base);
    font-weight: var(--font-semibold);
    text-decoration: none;
    transition: all var(--transition-base);
}

.wpsection_event .event-btn:hover,
.wpsection_event .btn:hover,
.wpsection_event a.button:hover {
    background: var(--primary);
    color: white;
    transform: translateX(5px);
}

.wpsection_event .event-btn i,
.wpsection_event .btn i {
    transition: transform var(--transition-base);
}

.wpsection_event .event-btn:hover i,
.wpsection_event .btn:hover i {
    transform: translateX(5px);
}

/* ========================================
   BLOG WIDGET STYLING (wpsection_blog)
   ======================================== */

/* Blog Section Container */
.wpsection_blog {
    font-family: var(--font-primary);
}

/* Blog Card Styling */
.wpsection_blog .blog-card,
.wpsection_blog .post-item,
.wpsection_blog article {
    background: white;
    border-radius: var(--radius-lg);
    overflow: hidden;
    box-shadow: var(--shadow-sm);
    transition: all var(--transition-base);
    border: 1px solid #e5e7eb;
}

.wpsection_blog .blog-card:hover,
.wpsection_blog .post-item:hover,
.wpsection_blog article:hover {
    box-shadow: var(--shadow-lg);
    transform: translateY(-5px);
}

/* Blog Image */
.wpsection_blog .blog-image,
.wpsection_blog .post-thumb,
.wpsection_blog .post-thumbnail {
    position: relative;
    overflow: hidden;
}

.wpsection_blog .blog-image img,
.wpsection_blog .post-thumb img,
.wpsection_blog .post-thumbnail img {
    width: 100%;
    height: auto;
    object-fit: cover;
    transition: transform var(--transition-base);
}

.wpsection_blog .blog-card:hover .blog-image img,
.wpsection_blog .post-item:hover .post-thumb img,
.wpsection_blog article:hover .post-thumbnail img {
    transform: scale(1.05);
}

/* Category Badge */
.wpsection_blog .category-badge,
.wpsection_blog .post-category,
.wpsection_blog .cat-links {
    position: absolute;
    top: 20px;
    left: 20px;
    background: var(--primary);
    color: white;
    padding: var(--space-2) var(--space-4);
    border-radius: var(--radius-md);
    font-size: var(--text-sm);
    font-weight: var(--font-semibold);
    text-transform: uppercase;
    z-index: 2;
    text-decoration: none;
    transition: background var(--transition-base);
}

.wpsection_blog .category-badge:hover,
.wpsection_blog .post-category:hover,
.wpsection_blog .cat-links a:hover {
    background: var(--primary-dark);
}

/* Blog Content */
.wpsection_blog .blog-content,
.wpsection_blog .post-content {
    padding: var(--space-6);
}

/* Blog Meta */
.wpsection_blog .blog-meta,
.wpsection_blog .post-meta,
.wpsection_blog .entry-meta {
    display: flex;
    flex-wrap: wrap;
    gap: var(--space-4);
    margin-bottom: var(--space-3);
    font-size: var(--text-sm);
    color: var(--text-secondary);
}

.wpsection_blog .meta-item {
    display: flex;
    align-items: center;
    gap: var(--space-2);
}

.wpsection_blog .meta-item i {
    color: var(--primary);
}

.wpsection_blog .meta-item a {
    color: var(--text-secondary);
    text-decoration: none;
    transition: color var(--transition-base);
}

.wpsection_blog .meta-item a:hover {
    color: var(--primary);
}

/* Blog Title */
.wpsection_blog .blog-title,
.wpsection_blog .post-title,
.wpsection_blog .entry-title,
.wpsection_blog h3 {
    font-size: var(--text-xl);
    font-weight: var(--font-semibold);
    color: var(--text-primary);
    margin: 0 0 var(--space-3);
    line-height: 1.4;
}

.wpsection_blog .blog-title a,
.wpsection_blog .post-title a,
.wpsection_blog .entry-title a,
.wpsection_blog h3 a {
    color: var(--text-primary);
    text-decoration: none;
    transition: color var(--transition-base);
}

.wpsection_blog .blog-title a:hover,
.wpsection_blog .post-title a:hover,
.wpsection_blog .entry-title a:hover,
.wpsection_blog h3 a:hover {
    color: var(--primary);
}

/* Blog Excerpt */
.wpsection_blog .blog-excerpt,
.wpsection_blog .post-excerpt,
.wpsection_blog .entry-summary {
    font-size: var(--text-base);
    color: var(--text-secondary);
    line-height: 1.6;
    margin-bottom: var(--space-4);
}

/* Blog Button */
.wpsection_blog .read-more,
.wpsection_blog .btn,
.wpsection_blog a.button {
    display: inline-flex;
    align-items: center;
    gap: var(--space-2);
    padding: var(--space-3) var(--space-6);
    background: transparent;
    color: var(--primary);
    border: 2px solid var(--primary);
    border-radius: var(--radius-lg);
    font-size: var(--text-base);
    font-weight: var(--font-semibold);
    text-decoration: none;
    transition: all var(--transition-base);
}

.wpsection_blog .read-more:hover,
.wpsection_blog .btn:hover,
.wpsection_blog a.button:hover {
    background: var(--primary);
    color: white;
    transform: translateX(5px);
}

/* ========================================
   CAMPAIGNS/CAUSES WIDGET (causes)
   ======================================== */

/* Campaigns already styled but ensure consistency */
.causes .card {
    background: white;
    border-radius: var(--radius-lg);
    overflow: hidden;
    box-shadow: var(--shadow-sm);
    transition: all var(--transition-base);
}

.causes .card:hover {
    box-shadow: var(--shadow-lg);
    transform: translateY(-5px);
}

.causes .card-image img {
    transition: transform var(--transition-base);
}

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

.causes .progress-bar {
    height: 8px;
    background: #e5e7eb;
    border-radius: 999px;
    overflow: hidden;
    margin: var(--space-4) 0;
}

.causes .progress-fill {
    height: 100%;
    background: linear-gradient(90deg, var(--primary) 0%, var(--primary-dark) 100%);
    border-radius: 999px;
    transition: width 0.6s ease;
}

/* ========================================
   RESPONSIVE ADJUSTMENTS
   ======================================== */

@media (max-width: 768px) {
    .wpsection_event .event-content,
    .wpsection_blog .blog-content {
        padding: var(--space-4);
    }

    .wpsection_event .event-date,
    .wpsection_blog .category-badge {
        top: 15px;
        left: 15px;
        padding: var(--space-2) var(--space-3);
    }

    .wpsection_event .event-title,
    .wpsection_blog .blog-title {
        font-size: var(--text-lg);
    }
}

/* ========================================
   SECTION HEADERS (UNIVERSAL)
   ======================================== */

.section-header {
    text-align: center;
    margin-bottom: var(--space-12);
}

.section-subtitle {
    display: inline-block;
    padding: var(--space-2) var(--space-4);
    background: var(--primary);
    color: white;
    border-radius: var(--radius-full);
    font-size: var(--text-sm);
    font-weight: var(--font-semibold);
    text-transform: uppercase;
    letter-spacing: 0.05em;
    margin-bottom: var(--space-3);
}

.section-title {
    font-size: var(--text-4xl);
    font-weight: var(--font-bold);
    color: var(--text-primary);
    margin: 0 0 var(--space-4);
    line-height: 1.2;
}

@media (max-width: 768px) {
    .section-title {
        font-size: var(--text-2xl);
    }
}

/* ========================================
   GRID LAYOUTS (UNIVERSAL)
   ======================================== */

.row {
    display: flex;
    flex-wrap: wrap;
    margin: 0 -15px;
}

.col-md-4 {
    flex: 0 0 33.333%;
    max-width: 33.333%;
    padding: 0 15px;
    margin-bottom: var(--space-6);
}

@media (max-width: 992px) {
    .col-md-4 {
        flex: 0 0 50%;
        max-width: 50%;
    }
}

@media (max-width: 768px) {
    .col-md-4 {
        flex: 0 0 100%;
        max-width: 100%;
    }
}
