/* ============================================
   GREEN GRID - GLOBAL STYLES
   ============================================ */

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Droid Serif', Verdana, sans-serif;
    line-height: 1.6;
    color: #333;
    background-color: #ffffff;
}

img {
    max-width: 100%;
    height: auto;
    display: block;
}

a {
    text-decoration: none;
    color: inherit;
}

button {
    cursor: pointer;
    border: none;
    background: none;
    font-family: inherit;
}

/* ============================================
   HEADER SECTION
   ============================================ */

.greengrid-header {
    background: linear-gradient(90deg, #41AD49 0%, #014994 100%);
    padding: 40px 20px;
    color: white;
}

.greengrid-header-container {
    max-width: 1200px;
    margin: 0 auto;
}

.greengrid-header-title {
    font-size: 2.5rem;
    font-weight: 700;
    margin-bottom: 10px;
    text-align: center;
}

.greengrid-header-subtitle {
    font-size: 1rem;
    margin-bottom: 5px;
    text-align: center;
    opacity: 0.95;
}

.greengrid-header-tagline {
    font-size: 0.95rem;
    margin-bottom: 30px;
    text-align: center;
    opacity: 0.9;
}

/* Search Form */
.greengrid-search-form {
    margin-top: 30px;
}

.greengrid-search-row {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr)) 120px;
    gap: 10px;
    align-items: end;
}

.greengrid-search-field {
    display: flex;
    flex-direction: column;
    min-width: 0;
}

.greengrid-search-field label {
    font-size: 0.75rem;
    margin-bottom: 5px;
    opacity: 0.9;
}

.greengrid-select,
.greengrid-input {
    padding: 12px 15px;
    border: none;
    border-radius: 4px;
    font-size: 0.95rem;
    background-color: white;
    color: #333;
    width: 100%;
    min-width: 0;
}

.greengrid-select {
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath fill='%23333' d='M6 9L1 4h10z'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 15px center;
    padding-right: 40px;
}

.greengrid-input::placeholder {
    color: #999;
}

.greengrid-search-button-wrap {
    display: flex;
    align-items: flex-end;
    min-width: 0;
}

.greengrid-search-button {
    padding: 12px 30px;
    background-color: #FFA726;
    color: white;
    border-radius: 4px;
    font-weight: 600;
    font-size: 1rem;
    transition: background-color 0.3s;
}

.greengrid-search-button:hover {
    background-color: #FF9800;
}

/* ============================================
   PAGE CONTAINER
   ============================================ */

.greengrid-container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 20px;
}

/* ============================================
   SOLUTIONS HEADER ROW
   ============================================ */

.greenlist-section-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px 0 10px 0;
    margin: 0;
}

.greenlist-section-title {
    font-size: 1.8rem;
    font-weight: 700;
    color: #2c3e50;
}

.greenlist-view-controls {
    display: flex;
    gap: 10px;
    align-items: center;
}

.greenlist-sort-dropdown {
    padding: 8px 12px;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 0.9rem;
    cursor: pointer;
}

.greenlist-view-btn {
    padding: 8px 12px;
    background: white;
    border: 1px solid #ddd;
    border-radius: 4px;
    cursor: pointer;
    color: #666;
    transition: all 0.3s;
}

.greenlist-view-btn:hover {
    background: #f8f9fa;
}

.greenlist-view-btn-active {
    background: #2980b9;
    color: white;
    border-color: #2980b9;
}

/* ============================================
   CONTENT WRAPPER — main grid + sidebar
   ============================================ */

.greengrid-content-wrapper {
    display: grid;
    grid-template-columns: 1fr 320px;
    gap: 30px;
    align-items: start;          /* ← sidebar stays at top, no stretch */
    margin-bottom: 50px;
}

/* ============================================
   SOLUTIONS GRID — 3 cards per row, equal height
   ============================================ */

.greengrid-solutions-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 20px;
    align-items: start;
}

/* ── Equal-height cards using flex column ── */
.greengrid-solution-card {
    background-color: white;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 2px 8px rgba(0,0,0,0.08);
    transition: transform 0.3s, box-shadow 0.3s;
    display: flex;
    flex-direction: column;     /* stack image → content vertically */
    height: 100%;   
    padding: 10px;            /* fill grid row height */
}

.greengrid-solution-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 4px 16px rgba(0,0,0,0.12);
}

.greengrid-card-image {
    width: 100%;
    height: 180px;
    overflow: hidden;
    flex-shrink: 0;             /* never squish image */
}

.greengrid-card-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 6px;
}

.greengrid-card-content {
    padding: 18px;
    display: flex;
    flex-direction: column;
    flex: 1;                    /* fills remaining card height */
}

.greengrid-card-title {
    font-size: 1rem;
    font-weight: 700;
    margin-bottom: 8px;
    color: #333;
}

.greengrid-card-description {
    font-size: 0.85rem;
    color: #666;
    line-height: 1.5;
    margin-bottom: 12px;
    flex: 1;                    /* pushes tags + link to bottom */
}

.greengrid-card-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    margin-bottom: 12px;
}

.greengrid-tag {
    padding: 3px 10px;
    border-radius: 15px;
    font-size: 0.72rem;
    font-weight: 500;
}

.greengrid-tag-energy {
    background-color: #E8F5E9;
    color: #2E7D32;
}

.greengrid-tag-initiatives {
    background-color: #E3F2FD;
    color: #1976D2;
}

.greengrid-card-link {
    color: #1976D2;
    font-size: 0.85rem;
    font-weight: 600;
    transition: color 0.3s;
    margin-top: auto;           /* always at card bottom */
}

.greengrid-card-link:hover {
    color: #1565C0;
}

/* Load More — spans all 3 columns */
.greengrid-load-more {
    grid-column: 1 / -1;
    display: flex;
    justify-content: center;
    margin-top: 10px;
}

.greengrid-load-more-btn {
    padding: 12px 40px;
    background-color: #4CAF50;
    color: white;
    border-radius: 6px;
    font-weight: 600;
    font-size: 1rem;
    transition: background-color 0.3s;
    cursor: pointer;
}

.greengrid-load-more-btn:hover {
    background-color: #388E3C;
}

/* ========================================
   SIDEBAR
   ======================================== */
.greenlist-sidebar {
    background: white;
    border-radius: 8px;
    position: sticky;
    top: 20px;                  /* sticks while scrolling */
}

.greenlist-featured-section {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.greenlist-featured-title {
    font-size: 1.4rem;
    font-weight: 700;
    color: #2c3e50;
}

.greenlist-featured-subtitle {
    font-size: 0.85rem;
    color: #666;
    margin-bottom: 5px;
}

/* Featured Large Card */
.greenlist-featured-card {
    border-radius: 8px;
    overflow: hidden;
    position: relative;
}

.greenlist-featured-large {
    height: 340px;
}

.greenlist-featured-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.greenlist-featured-content {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    padding: 20px;
    background: linear-gradient(to top, rgba(0,0,0,0.9), transparent);
    color: white;
}

.greenlist-featured-tags {
    display: flex;
    gap: 6px;
    margin-bottom: 120px;
}

.greenlist-featured-tag {
    padding: 3px 8px;
    background: rgba(255,255,255,0.9);
    color: #2980b9;
    border-radius: 10px;
    font-size: 0.7rem;
    font-weight: 600;
}

.greenlist-featured-card-title {
    font-size: 1.1rem;
    font-weight: 700;
    margin-bottom: 6px;
}

.greenlist-featured-desc {
    font-size: 0.85rem;
    margin-bottom: 10px;
    line-height: 1.4;
}

.greenlist-view-details {
    color: white;
    font-weight: 600;
    font-size: 0.85rem;
    transition: opacity 0.3s;
}

.greenlist-view-details:hover { opacity: 0.8; }
.greenlist-view-details i { margin-left: 4px; }

/* Small Yellow Card */
.greenlist-featured-small {
    display: flex;
}

.greenlist-featured-yellow {
    background: #F2C71D;
}

.greenlist-featured-small .greenlist-featured-content {
    position: relative;
    background: transparent;
    flex: 1;
    padding: 16px;
    color: #2c3e50;
}

.greenlist-featured-img-small {
    width: 130px;
    padding: 8px 12px;
}

.greenlist-featured-small .greenlist-view-details {
    color: #2c3e50;
}

/* Widget shared */
.widget-content { padding: 20px; }

/* Quiz Widget */
.quiz-widget {
    padding: 0;
}

.quiz-widget .widget-content {
    background: linear-gradient(135deg, #014994 0%, #41AD49 100%);
    color: #ffffff;
}

.quiz-badge {
    display: inline-block;
    background-color: #ec4899;
    color: #ffffff;
    font-size: 11px;
    font-weight: 700;
    padding: 5px 10px;
    border-radius: 20px;
    margin-bottom: 10px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.quiz-title {
    font-size: 18px;
    font-weight: 700;
    color: #ffffff;
    margin-bottom: 8px;
}

.quiz-description {
    font-size: 13px;
    color: #ffffff;
    line-height: 1.5;
    margin-bottom: 14px;
    opacity: 0.95;
}

/* Blue Widget */
.blue-widget .widget-content {
    background: linear-gradient(135deg, #004FA1 0%, #023870 100%);
    color: #ffffff;
}

.career-title  { font-size: 18px; font-weight: 700; color: #000000; margin-bottom: 8px; }
.career-description { font-size: 13px; color: #333; margin-bottom: 12px; }
.widget-link   { display: inline-flex; align-items: center; gap: 4px; font-size: 13px; font-weight: 600; }
.white-link    { color: #ffffff !important; }

.event-details {
    background: rgba(255,255,255,0.15);
    padding: 12px;
    border-radius: 6px;
    margin: 12px 0;
}
.event-name { font-size: 13px; font-weight: 600; color: #fff; margin-bottom: 8px; line-height: 1.4; }
.event-meta { display: flex; flex-direction: column; gap: 4px; }
.event-date, .event-location { font-size: 12px; color: #fff; opacity: 0.95; }

/* ==========================================
   THREE COLUMN CARDS
   ========================================== */
.three-column-cards {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 20px;
    width: 100%;
    margin-top: 3rem;
    padding: 0;
    margin-bottom: 40px;
}

.card {
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    overflow: hidden;
    transition: all 0.5s ease;
    background: linear-gradient(120deg, #9bd6e559, transparent);
    padding: 10px;
    display: flex;
    flex-direction: column;
}

.card:hover { box-shadow: 0 4px 12px rgba(0,0,0,0.12); }

.card-label { padding: 2px 12px; }
.card-label h2 { color: black; font-size: 17px; font-weight: bold; transition: color 0.5s ease; }
.card-subtitle { font-size: 11px; color: #666; transition: color 0.5s ease; }

#card1:hover { background: linear-gradient(117deg, #0852a7, #003877); }
#card1:hover .card-label h2, #card1:hover .card-subtitle, #card1:hover .card-date,
#card1:hover .card-title, #card1:hover .card-text, #card1:hover .card-author,
#card1:hover .card-link { color: white !important; }

#card2:hover { background: linear-gradient(119deg, #029528, #159344); }
#card2:hover .card-label h2, #card2:hover .card-subtitle, #card2:hover .card-date,
#card2:hover .card-title, #card2:hover .card-text, #card2:hover .card-author,
#card2:hover .card-link { color: white !important; }

#card3:hover { background: linear-gradient(117deg, #0852a7, #003877); }
#card3:hover .card-label h2, #card3:hover .card-subtitle, #card3:hover .card-date,
#card3:hover .card-title, #card3:hover .card-text, #card3:hover .card-author,
#card3:hover .card-link { color: white !important; }

.card img {
    width: 96%; height: 180px; object-fit: cover;
    margin: 6px auto; display: block; border-radius: 6px;
}

.card-content { padding: 15px; display: flex; flex-direction: column; flex: 1; }
.card-date { font-size: 11px; color: #999; display: block; margin-bottom: 8px; transition: color 0.5s ease; }
.card-title { font-size: 16px; font-weight: bold; margin-bottom: 10px; line-height: 1.3; transition: color 0.5s ease; }
.card-text { font-size: 13px; color: #666; line-height: 1.5; margin-bottom: 10px; transition: color 0.5s ease; flex: 1; }
.card-author { font-size: 12px; color: #666; margin-bottom: 4px; transition: color 0.5s ease; }
.card-link { color: #2563a8; font-size: 13px; font-weight: 600; transition: color 0.5s ease; margin-top: auto; }
.card-link:hover { text-decoration: underline; }

/* ========================================
   PLATFORM SECTION
   ======================================== */
.greenlist-platform-section {
    background: #ecf0f1;
    padding: 50px 20px;
    border-radius: 8px;
    margin-bottom: 30px;
    text-align: center;
}

.greenlist-platform-title { font-size: 2rem; font-weight: 700; color: #2c3e50; margin-bottom: 10px; }
.greenlist-platform-subtitle { font-size: 1rem; color: #555; margin-bottom: 40px; }

.greenlist-platform-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 25px;
    max-width: 1100px;
    margin: 0 auto;
}

.greenlist-platform-card { background: white; padding: 30px 20px; border-radius: 8px; text-align: left; }
.greenlist-platform-card-title { font-size: 1.2rem; font-weight: 700; color: #2c3e50; margin-bottom: 12px; }
.greenlist-platform-card-text { font-size: 0.95rem; color: #555; line-height: 1.5; }

/* ========================================
   CTA SECTION
   ======================================== */
.greenlist-cta-section { display: grid; grid-template-columns: 1fr 1fr; gap: 25px; margin-bottom: 30px; }
.greenlist-cta-card { padding: 40px; border-radius: 8px; color: white; }
.greenlist-cta-blue { background: #2980b9; }
.greenlist-cta-green { background: #27ae60; }
.greenlist-cta-title { font-size: 1.8rem; font-weight: 700; margin-bottom: 15px; line-height: 1.3; }
.greenlist-cta-text { font-size: 1rem; margin-bottom: 25px; opacity: 0.95; }

.greenlist-cta-btn {
    padding: 15px 30px; background: white; color: #2980b9;
    border: none; border-radius: 6px; font-size: 1rem; font-weight: 600;
    cursor: pointer; transition: transform 0.3s;
}
.greenlist-cta-btn:hover { transform: translateY(-2px); }

.greenlist-email-link {
    display: inline-flex; align-items: center; gap: 8px; color: white;
    font-size: 1.1rem; font-weight: 600; padding: 12px 20px;
    background: rgba(255,255,255,0.2); border-radius: 6px; transition: background 0.3s;
}
.greenlist-email-link:hover { background: rgba(255,255,255,0.3); }

/* ========================================
   NEWSLETTER SECTION
   ======================================== */
.greenlist-newsletter-section {
    background: linear-gradient(90deg, #41AD49 0%, #014994 100%);
    padding: 40px; border-radius: 8px;
    display: flex; justify-content: space-between; align-items: center;
    color: white; margin-bottom: 40px;
}
.greenlist-newsletter-content { flex: 1; }
.greenlist-newsletter-title { font-size: 1.6rem; font-weight: 700; margin-bottom: 8px; }
.greenlist-newsletter-text { font-size: 1rem; opacity: 0.95; }
.greenlist-newsletter-form { display: flex; gap: 10px; }
.greenlist-newsletter-input { padding: 12px 20px; border: none; border-radius: 6px; width: 300px; font-size: 0.95rem; }
.greenlist-newsletter-btn {
    padding: 12px 30px; background: #27ae60; color: white;
    border: none; border-radius: 6px; font-size: 1rem; font-weight: 600;
    cursor: pointer; transition: background 0.3s;
}
.greenlist-newsletter-btn:hover { background: #229954; }

/* ========================================
   RESPONSIVE
   ======================================== */
@media (max-width: 1200px) {
    .greengrid-content-wrapper { grid-template-columns: 1fr 280px; }
    .greengrid-solutions-grid { grid-template-columns: repeat(3, 1fr); }
}

@media (max-width: 1024px) {
    .greengrid-content-wrapper { grid-template-columns: 1fr; }
    .greengrid-solutions-grid { grid-template-columns: repeat(2, 1fr); }
    .greenlist-platform-grid { grid-template-columns: repeat(2, 1fr); }
    .greenlist-cta-section { grid-template-columns: 1fr; }
    .greenlist-newsletter-section { flex-direction: column; gap: 20px; text-align: center; }
    .greenlist-newsletter-input { width: auto; flex: 1; }
    .greengrid-search-row { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .greengrid-search-button-wrap { grid-column: 1 / -1; }
    .greengrid-search-button { width: 100%; }
}

@media (max-width: 768px) {
    .greengrid-solutions-grid { grid-template-columns: 1fr; }
    .three-column-cards { grid-template-columns: 1fr; padding: 0; margin-top: 2rem; }
    .greenlist-platform-grid { grid-template-columns: 1fr; }
    .greenlist-cta-card { padding: 30px 20px; }
    .greenlist-newsletter-section { padding: 30px 20px; }
    .greenlist-newsletter-form { flex-direction: column; }
    .greenlist-newsletter-input { width: 100%; }
    .greengrid-search-row { grid-template-columns: 1fr; }
}

@media (max-width: 480px) {
    .greengrid-solutions-grid { grid-template-columns: 1fr; }
    .three-column-cards { grid-template-columns: 1fr; }
}

@media print {
    .greengrid-header, .greengrid-search-form, .greenlist-view-controls,
    .greengrid-load-more-btn, .greenlist-cta-section, .greenlist-newsletter-section { display: none; }
    .greengrid-content-wrapper { grid-template-columns: 1fr; }
}

h1 { font-size: 3rem !important; }
h2 { font-size: 2rem; }
p  { font-size: 16px !important; }

/* ============================================
   FIX: Solutions header inside left column
   ============================================ */

/* Hide old full-width standalone header if still present */
.greenlist-section-header {
    display: none !important;
}

/* Left column wraps header + grid together */
.greengrid-left-column {
    display: flex;
    flex-direction: column;
    min-width: 0;               /* prevents grid blowout */
}

/* Header row: "Solutions" left, controls right — above cards only */
.greengrid-solutions-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px 0 15px 0;
    width: 100%;
}

.greengrid-solutions-header .greenlist-section-title {
    font-size: 1.8rem;
    font-weight: 700;
    color: #2c3e50;
    margin: 0;
}

.greengrid-solutions-header .greenlist-view-controls {
    display: flex;
    gap: 10px;
    align-items: center;
}

/* Sidebar title aligns with cards (same top padding as header) */
.greenlist-sidebar {
    padding-top: 20px;
}