/*
Theme Name: ESG-in Challenge Blog
Theme URI: https://www.esg-in.net
Author: ESG-in Team
Author URI: https://www.esg-in.net
Description: ESG-in Challenge Platform - Share your daily eco-actions, participate in environmental challenges, and make a real impact. Photo-rich design for challenge documentation.
Version: 2.0
License: GNU General Public License v2 or later
License URI: http://www.gnu.org/licenses/gpl-2.0.html
Text Domain: esgin-challenge
Tags: blog, environmental, green, responsive, photography, gallery, challenges
*/

/* ==========================================================================
   Reset & Base Styles
   ========================================================================== */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    --primary-green: #2ecc71;
    --secondary-green: #27ae60;
    --dark-green: #1e8449;
    --light-green: #a9dfbf;
    --primary-blue: #3498db;
    --dark-blue: #2874a6;
    --accent-orange: #f39c12;
    --accent-purple: #9b59b6;
    --text-dark: #2c3e50;
    --text-light: #7f8c8d;
    --background-light: #f8f9fa;
    --white: #ffffff;
    --border-color: #e0e0e0;
    --shadow: 0 2px 10px rgba(0,0,0,0.1);
    --shadow-hover: 0 8px 25px rgba(0,0,0,0.15);
    --font-main: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
}

body {
    font-family: var(--font-main);
    line-height: 1.6;
    color: var(--text-dark);
    background-color: var(--background-light);
}

/* ==========================================================================
   Typography
   ========================================================================== */
h1, h2, h3, h4, h5, h6 {
    font-weight: 700;
    line-height: 1.3;
    margin-bottom: 1rem;
    color: var(--text-dark);
}

h1 { font-size: 2.5rem; }
h2 { font-size: 2rem; }
h3 { font-size: 1.75rem; }
h4 { font-size: 1.5rem; }
h5 { font-size: 1.25rem; }
h6 { font-size: 1rem; }

p {
    margin-bottom: 1rem;
    color: var(--text-light);
}

a {
    color: var(--primary-green);
    text-decoration: none;
    transition: all 0.3s ease;
}

a:hover {
    color: var(--secondary-green);
}

/* ==========================================================================
   Header & Navigation
   ========================================================================== */
.site-header {
    background: var(--white);
    box-shadow: var(--shadow);
    position: sticky;
    top: 0;
    z-index: 1000;
}

.header-container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 1rem 2rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.site-logo {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--primary-green);
    text-decoration: none;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.site-logo span {
    color: var(--primary-blue);
}

.logo-icon {
    font-size: 1.8rem;
}

.main-navigation ul {
    list-style: none;
    display: flex;
    gap: 2rem;
}

.main-navigation a {
    color: var(--text-dark);
    font-weight: 500;
    padding: 0.5rem 0;
    border-bottom: 2px solid transparent;
    transition: all 0.3s ease;
}

.main-navigation a:hover,
.main-navigation .current-menu-item a {
    color: var(--primary-green);
    border-bottom-color: var(--primary-green);
}

.menu-toggle {
    display: none;
    background: none;
    border: none;
    font-size: 1.5rem;
    color: var(--text-dark);
    cursor: pointer;
}

/* ==========================================================================
   Hero Section - Challenge Focused
   ========================================================================== */
.hero-section {
    background: linear-gradient(135deg, var(--primary-green) 0%, var(--primary-blue) 100%);
    color: var(--white);
    padding: 4rem 2rem;
    text-align: center;
    position: relative;
    overflow: hidden;
}

.hero-section::before {
    content: '🌱';
    position: absolute;
    font-size: 15rem;
    opacity: 0.1;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
}

.hero-content {
    max-width: 900px;
    margin: 0 auto;
    position: relative;
    z-index: 1;
}

.hero-section h1 {
    color: var(--white);
    font-size: 3rem;
    margin-bottom: 1rem;
}

.hero-section p {
    color: rgba(255,255,255,0.95);
    font-size: 1.3rem;
    margin-bottom: 2rem;
    line-height: 1.8;
}

.hero-stats {
    display: flex;
    justify-content: center;
    gap: 3rem;
    margin-top: 2rem;
    flex-wrap: wrap;
}

.hero-stat {
    text-align: center;
}

.hero-stat-number {
    font-size: 2.5rem;
    font-weight: 700;
    display: block;
}

.hero-stat-label {
    font-size: 0.9rem;
    opacity: 0.9;
}

.btn {
    display: inline-block;
    padding: 1rem 2.5rem;
    background: var(--white);
    color: var(--primary-green);
    border-radius: 50px;
    font-weight: 600;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(0,0,0,0.2);
}

.btn:hover {
    background: var(--background-light);
    transform: translateY(-3px);
    box-shadow: 0 6px 20px rgba(0,0,0,0.3);
}

/* ==========================================================================
   Main Content - Pinterest/Instagram Style Grid
   ========================================================================== */
.site-content {
    max-width: 1400px;
    margin: 3rem auto;
    padding: 0 2rem;
}

.content-wrapper {
    display: grid;
    grid-template-columns: 1fr 320px;
    gap: 3rem;
}

/* ==========================================================================
   Challenge Posts - Masonry Grid Style
   ========================================================================== */
.posts-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
    gap: 1.5rem;
    margin-bottom: 3rem;
}

.post-card {
    background: var(--white);
    border-radius: 15px;
    overflow: hidden;
    box-shadow: var(--shadow);
    transition: all 0.3s ease;
    position: relative;
}

.post-card:hover {
    transform: translateY(-8px);
    box-shadow: var(--shadow-hover);
}

.post-thumbnail {
    width: 100%;
    height: 280px;
    position: relative;
    overflow: hidden;
    background: var(--background-light);
}

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

.post-card:hover .post-thumbnail img {
    transform: scale(1.1);
}

.challenge-badge {
    position: absolute;
    top: 1rem;
    right: 1rem;
    background: var(--primary-green);
    color: var(--white);
    padding: 0.5rem 1rem;
    border-radius: 25px;
    font-size: 0.75rem;
    font-weight: 700;
    text-transform: uppercase;
    box-shadow: 0 2px 10px rgba(0,0,0,0.2);
}

.post-content {
    padding: 1.5rem;
}

.post-meta {
    display: flex;
    gap: 1rem;
    margin-bottom: 1rem;
    font-size: 0.875rem;
    color: var(--text-light);
    align-items: center;
}

.post-category {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.25rem 0.75rem;
    background: var(--light-green);
    color: var(--dark-green);
    border-radius: 20px;
    font-size: 0.75rem;
    font-weight: 600;
}

.post-title {
    font-size: 1.25rem;
    margin-bottom: 0.75rem;
    line-height: 1.4;
}

.post-title a {
    color: var(--text-dark);
}

.post-title a:hover {
    color: var(--primary-green);
}

.post-excerpt {
    color: var(--text-light);
    margin-bottom: 1rem;
    line-height: 1.6;
}

.post-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding-top: 1rem;
    border-top: 1px solid var(--border-color);
}

.read-more {
    color: var(--primary-green);
    font-weight: 600;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
}

.read-more:hover {
    gap: 0.75rem;
}

.post-engagement {
    display: flex;
    gap: 1rem;
    font-size: 0.875rem;
    color: var(--text-light);
}

.post-engagement span {
    display: flex;
    align-items: center;
    gap: 0.25rem;
}

/* ==========================================================================
   Single Post - Challenge Detail View
   ========================================================================== */
.single-post {
    background: var(--white);
    border-radius: 15px;
    padding: 3rem;
    box-shadow: var(--shadow);
}

.post-header {
    margin-bottom: 2rem;
}

.post-header h1 {
    font-size: 2.5rem;
    margin-bottom: 1rem;
    line-height: 1.3;
}

.entry-content {
    font-size: 1.1rem;
    line-height: 1.8;
}

.entry-content img {
    max-width: 100%;
    height: auto;
    border-radius: 15px;
    margin: 2rem 0;
    box-shadow: var(--shadow);
}

.entry-content h2 {
    margin-top: 2.5rem;
    margin-bottom: 1rem;
    color: var(--primary-green);
    font-size: 1.8rem;
}

.entry-content h3 {
    margin-top: 2rem;
    color: var(--text-dark);
    font-size: 1.5rem;
}

.entry-content ul,
.entry-content ol {
    margin: 1.5rem 0;
    padding-left: 2rem;
}

.entry-content li {
    margin-bottom: 0.75rem;
    color: var(--text-light);
}

/* Challenge Steps */
.challenge-steps {
    background: var(--background-light);
    padding: 2rem;
    border-radius: 15px;
    margin: 2rem 0;
}

.challenge-steps h3 {
    color: var(--primary-green);
    margin-bottom: 1.5rem;
}

/* ==========================================================================
   Sidebar - Challenge Widget Style
   ========================================================================== */
.sidebar {
    position: sticky;
    top: 100px;
}

.widget {
    background: var(--white);
    padding: 2rem;
    border-radius: 15px;
    margin-bottom: 2rem;
    box-shadow: var(--shadow);
}

.widget-title {
    font-size: 1.25rem;
    margin-bottom: 1.5rem;
    color: var(--text-dark);
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.widget-title::before {
    content: '🏆';
    font-size: 1.5rem;
}

.widget ul {
    list-style: none;
}

.widget li {
    padding: 0.75rem 0;
    border-bottom: 1px solid var(--border-color);
    transition: padding-left 0.3s ease;
}

.widget li:hover {
    padding-left: 0.5rem;
}

.widget li:last-child {
    border-bottom: none;
}

.widget a {
    color: var(--text-dark);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.widget a:hover {
    color: var(--primary-green);
}

/* Challenge Widget */
.challenge-widget {
    background: linear-gradient(135deg, var(--primary-green) 0%, var(--primary-blue) 100%);
    color: var(--white);
}

.challenge-widget .widget-title {
    color: var(--white);
}

.challenge-widget .widget-title::before {
    content: '🌟';
}

.challenge-cta {
    background: var(--white);
    color: var(--primary-green);
    padding: 1rem;
    border-radius: 10px;
    text-align: center;
    font-weight: 600;
    margin-top: 1rem;
    display: block;
}

.challenge-cta:hover {
    background: var(--background-light);
}

/* ==========================================================================
   Categories - Challenge Types
   ========================================================================== */
.categories-section {
    margin: 4rem 0;
}

.categories-header {
    text-align: center;
    margin-bottom: 3rem;
}

.categories-header h2 {
    font-size: 2.5rem;
    color: var(--text-dark);
    margin-bottom: 1rem;
}

.categories-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 2rem;
    margin: 3rem 0;
}

.category-card {
    background: var(--white);
    padding: 2.5rem;
    border-radius: 15px;
    text-align: center;
    box-shadow: var(--shadow);
    transition: all 0.3s ease;
    border: 2px solid transparent;
}

.category-card:hover {
    transform: translateY(-8px);
    box-shadow: var(--shadow-hover);
    border-color: var(--primary-green);
}

.category-icon {
    font-size: 4rem;
    margin-bottom: 1rem;
    display: block;
}

.category-card h3 {
    color: var(--primary-green);
    margin-bottom: 0.75rem;
    font-size: 1.5rem;
}

.category-card p {
    color: var(--text-light);
    margin-bottom: 1rem;
}

.category-count {
    display: inline-block;
    background: var(--background-light);
    padding: 0.5rem 1rem;
    border-radius: 20px;
    font-size: 0.875rem;
    color: var(--text-dark);
    font-weight: 600;
}

/* ==========================================================================
   Footer
   ========================================================================== */
.site-footer {
    background: var(--text-dark);
    color: var(--white);
    padding: 3rem 2rem 1rem;
    margin-top: 5rem;
}

.footer-content {
    max-width: 1400px;
    margin: 0 auto;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 3rem;
    margin-bottom: 2rem;
}

.footer-widget h3 {
    color: var(--white);
    margin-bottom: 1.5rem;
    font-size: 1.25rem;
}

.footer-widget p,
.footer-widget li {
    color: rgba(255,255,255,0.7);
    line-height: 1.8;
}

.footer-widget ul {
    list-style: none;
}

.footer-widget li {
    padding: 0.5rem 0;
}

.footer-widget a {
    color: rgba(255,255,255,0.7);
}

.footer-widget a:hover {
    color: var(--primary-green);
}

.footer-bottom {
    text-align: center;
    padding-top: 2rem;
    border-top: 1px solid rgba(255,255,255,0.1);
    color: rgba(255,255,255,0.5);
}

/* ==========================================================================
   Responsive Design
   ========================================================================== */
@media (max-width: 1024px) {
    .content-wrapper {
        grid-template-columns: 1fr;
    }
    
    .sidebar {
        position: static;
    }
}

@media (max-width: 768px) {
    .menu-toggle {
        display: block;
    }
    
    .main-navigation {
        display: none;
        position: absolute;
        top: 100%;
        left: 0;
        right: 0;
        background: var(--white);
        box-shadow: var(--shadow);
    }
    
    .main-navigation.active {
        display: block;
    }
    
    .main-navigation ul {
        flex-direction: column;
        gap: 0;
    }
    
    .main-navigation li {
        border-bottom: 1px solid var(--border-color);
    }
    
    .main-navigation a {
        display: block;
        padding: 1rem 2rem;
    }
    
    .posts-grid {
        grid-template-columns: 1fr;
    }
    
    .hero-section h1 {
        font-size: 2rem;
    }
    
    .hero-stats {
        gap: 1.5rem;
    }
    
    .single-post {
        padding: 1.5rem;
    }
    
    h1 { font-size: 2rem; }
    h2 { font-size: 1.75rem; }
    h3 { font-size: 1.5rem; }
}

/* ==========================================================================
   WordPress Specific
   ========================================================================== */
.alignleft {
    float: left;
    margin-right: 1.5rem;
    margin-bottom: 1rem;
}

.alignright {
    float: right;
    margin-left: 1.5rem;
    margin-bottom: 1rem;
}

.aligncenter {
    display: block;
    margin-left: auto;
    margin-right: auto;
}

.wp-caption {
    max-width: 100%;
}

.wp-caption-text {
    text-align: center;
    font-size: 0.875rem;
    color: var(--text-light);
    margin-top: 0.5rem;
}

.screen-reader-text {
    clip: rect(1px, 1px, 1px, 1px);
    position: absolute !important;
    height: 1px;
    width: 1px;
    overflow: hidden;
}

/* Gallery Support */
.gallery {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 1rem;
    margin: 2rem 0;
}

.gallery-item img {
    width: 100%;
    height: 200px;
    object-fit: cover;
    border-radius: 10px;
}
