/**
 * Homepage Sections Styles
 * News Updates, Top Picks, Contributors, GnAi, Mid-banner
 *
 * @package NutraMEA
 * @version 3.5.0
 */

/* ========================================
   NEWS & TRENDS SECTION
   ======================================== */

.news-updates-section {
    padding: 4rem 0 5rem;
    background: linear-gradient(to bottom, #ffffff 0%, hsl(210 20% 98% / 0.5) 100%);
}

.news-grid {
    display: grid;
    grid-template-columns: 2fr 1fr;
    gap: 2.5rem;
    margin-top: 2rem;
}

/* Top Picks (Horizontal Scroll) */
.top-picks-column {
    min-width: 0;
}

.column-title {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--text-dark, #1a1a1a);
    margin-bottom: 1.5rem;
    padding-bottom: 0.75rem;
    border-bottom: 3px solid var(--primary-color, #3AABB8);
    display: inline-block;
}

.top-picks-scroll {
    display: flex;
    gap: 1.5rem;
    overflow-x: auto;
    scroll-behavior: smooth;
    padding-bottom: 1rem;
    -webkit-overflow-scrolling: touch;
}

.top-picks-scroll::-webkit-scrollbar {
    height: 8px;
}

.top-picks-scroll::-webkit-scrollbar-track {
    background: #f1f1f1;
    border-radius: 10px;
}

.top-picks-scroll::-webkit-scrollbar-thumb {
    background: var(--primary-color, #3AABB8);
    border-radius: 10px;
}

.top-picks-scroll::-webkit-scrollbar-thumb:hover {
    background: var(--primary-dark, #2d8a94);
}

.top-pick-card {
    min-width: 280px;
    max-width: 280px;
    background: white;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.08);
    transition: all 0.3s ease;
    flex-shrink: 0;
}

.top-pick-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.15);
}

.pick-image {
    display: block;
    width: 100%;
    height: 180px;
    overflow: hidden;
    position: relative;
}

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

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

.placeholder-image {
    width: 100%;
    height: 180px;
    background: linear-gradient(135deg, var(--primary-color, #3AABB8) 0%, var(--secondary-color, #E8AF3E) 100%);
    display: flex;
    align-items: center;
    justify-content: center;
}

.pick-categories {
    padding: 1rem 1rem 0.5rem;
}

.category-badge {
    display: inline-block;
    padding: 0.25rem 0.75rem;
    background: var(--primary-color, #3AABB8);
    color: white;
    font-size: 0.75rem;
    font-weight: 600;
    border-radius: 20px;
    text-decoration: none;
    transition: background 0.2s ease;
}

.category-badge:hover {
    background: var(--secondary-color, #E8AF3E);
}

.pick-title {
    padding: 0 1rem;
    margin: 0;
}

.pick-title a {
    font-size: 1rem;
    font-weight: 600;
    color: var(--text-dark, #1a1a1a);
    text-decoration: none;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    line-height: 1.4;
    transition: color 0.2s ease;
}

.pick-title a:hover {
    color: var(--primary-color, #3AABB8);
}

.pick-author {
    padding: 0.75rem 1rem 1rem;
    font-size: 0.875rem;
    color: var(--text-muted, #666);
}

/* Updates (Vertical Scroll) */
.updates-column {
    min-width: 0;
}

.updates-list {
    background: white;
    border-radius: 12px;
    padding: 1.5rem;
    max-height: 600px;
    overflow-y: auto;
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.08);
}

.updates-list::-webkit-scrollbar {
    width: 8px;
}

.updates-list::-webkit-scrollbar-track {
    background: #f1f1f1;
    border-radius: 10px;
}

.updates-list::-webkit-scrollbar-thumb {
    background: var(--primary-color, #3AABB8);
    border-radius: 10px;
}

.updates-list::-webkit-scrollbar-thumb:hover {
    background: var(--primary-dark, #2d8a94);
}

.update-item {
    padding: 1rem 0;
    border-bottom: 1px solid #eee;
    transition: all 0.2s ease;
}

.update-item:last-child {
    border-bottom: none;
}

.update-item:hover {
    padding-left: 0.5rem;
    background: hsl(189 65% 44% / 0.05);
    border-radius: 8px;
}

.update-title {
    display: block;
    font-size: 0.9375rem;
    font-weight: 600;
    color: var(--text-dark, #1a1a1a);
    text-decoration: none;
    line-height: 1.5;
    margin-bottom: 0.5rem;
    transition: color 0.2s ease;
}

.update-title:hover {
    color: var(--primary-color, #3AABB8);
}

.update-meta {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.8125rem;
    color: var(--text-muted, #666);
}

.update-meta svg {
    flex-shrink: 0;
}

/* ========================================
   CONTRIBUTORS SECTION
   ======================================== */

.contributors-section {
    padding: 4rem 0 5rem;
    background: white;
}

.contributors-scroll {
    display: flex;
    gap: 2rem;
    overflow-x: auto;
    scroll-behavior: smooth;
    padding: 1rem 0;
    -webkit-overflow-scrolling: touch;
}

.contributors-scroll::-webkit-scrollbar {
    height: 8px;
}

.contributors-scroll::-webkit-scrollbar-track {
    background: #f1f1f1;
    border-radius: 10px;
}

.contributors-scroll::-webkit-scrollbar-thumb {
    background: var(--primary-color, #3AABB8);
    border-radius: 10px;
}

.contributor-card {
    min-width: 280px;
    max-width: 280px;
    background: white;
    border: 2px solid #eee;
    border-radius: 16px;
    padding: 2rem 1.5rem;
    text-align: center;
    cursor: pointer;
    transition: all 0.3s ease;
    flex-shrink: 0;
}

.contributor-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 12px 30px rgba(0, 0, 0, 0.15);
    border-color: var(--primary-color, #3AABB8);
}

.contributor-image {
    width: 120px;
    height: 120px;
    margin: 0 auto 1rem;
    border-radius: 50%;
    overflow: hidden;
    border: 4px solid var(--primary-color, #3AABB8);
    box-shadow: 0 4px 12px rgba(58, 171, 184, 0.2);
}

.contributor-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.placeholder-avatar {
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, var(--primary-color, #3AABB8) 0%, var(--secondary-color, #E8AF3E) 100%);
    display: flex;
    align-items: center;
    justify-content: center;
}

.contributor-name {
    font-size: 1.125rem;
    font-weight: 700;
    color: var(--text-dark, #1a1a1a);
    margin-bottom: 0.75rem;
}

.contributor-bio {
    font-size: 0.875rem;
    color: var(--text-muted, #666);
    line-height: 1.6;
    margin: 0;
}

/* Contributor Popup */
.contributor-popup {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 9999;
    display: flex;
    align-items: center;
    justify-content: center;
    animation: fadeIn 0.3s ease;
}

.popup-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.7);
    backdrop-filter: blur(4px);
}

.popup-content {
    position: relative;
    width: 90%;
    max-width: 500px;
    background: white;
    border-radius: 20px;
    padding: 3rem 2.5rem;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
    max-height: 85vh;
    overflow-y: auto;
    animation: slideUp 0.3s ease;
    z-index: 10000;
}

.popup-close {
    position: absolute;
    top: 1rem;
    right: 1rem;
    background: #f5f5f5;
    border: none;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    font-size: 1.5rem;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s ease;
    color: var(--text-dark, #1a1a1a);
    line-height: 1;
}

.popup-close:hover {
    background: var(--primary-color, #3AABB8);
    color: white;
    transform: rotate(90deg);
}

.popup-inner {
    text-align: center;
}

.popup-image-circle {
    width: 150px;
    height: 150px;
    margin: 0 auto 1.5rem;
    border-radius: 50%;
    overflow: hidden;
    border: 5px solid var(--primary-color, #3AABB8);
    box-shadow: 0 8px 20px rgba(58, 171, 184, 0.3);
}

.popup-image-circle img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.popup-name {
    font-size: 1.75rem;
    font-weight: 800;
    color: var(--text-dark, #1a1a1a);
    margin-bottom: 1rem;
}

.popup-bio {
    font-size: 1rem;
    color: var(--text-muted, #666);
    line-height: 1.7;
    margin-bottom: 1.5rem;
    font-weight: 500;
}

.popup-details {
    font-size: 0.9375rem;
    color: var(--text-dark, #1a1a1a);
    line-height: 1.8;
    margin-bottom: 2rem;
    text-align: left;
    padding: 1.5rem;
    background: hsl(189 65% 44% / 0.05);
    border-radius: 12px;
    border-left: 4px solid var(--primary-color, #3AABB8);
}

.popup-linkedin {
    display: inline-flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.875rem 1.75rem;
    background: var(--primary-color, #3AABB8);
    color: white;
    text-decoration: none;
    border-radius: 50px;
    font-weight: 600;
    font-size: 0.9375rem;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(58, 171, 184, 0.3);
}

.popup-linkedin:hover {
    background: var(--primary-dark, #2d8a94);
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(58, 171, 184, 0.4);
}

/* ========================================
   GNAI SECTION
   ======================================== */

.gnai-section {
    padding: 5rem 0;
    background: linear-gradient(135deg, hsl(189 65% 94% / 0.3) 0%, hsl(44 72% 92% / 0.3) 100%);
    position: relative;
    overflow: hidden;
}

.gnai-section::before {
    content: '';
    position: absolute;
    top: -50%;
    right: -10%;
    width: 500px;
    height: 500px;
    background: radial-gradient(circle, hsl(189 65% 44% / 0.1) 0%, transparent 70%);
    border-radius: 50%;
}

.gnai-content {
    display: grid;
    grid-template-columns: 1.2fr 1fr;
    gap: 4rem;
    align-items: center;
}

.gnai-text .section-title {
    font-size: clamp(2rem, 4vw, 2.5rem);
    font-weight: 800;
    margin-bottom: 1rem;
    background: var(--gradient-primary);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.gnai-description {
    font-size: 1.125rem;
    color: var(--text-muted, #666);
    line-height: 1.7;
    margin-bottom: 2rem;
}

.gnai-cta-btn {
    display: inline-flex;
    align-items: center;
    gap: 1rem;
    padding: 1rem 2rem;
    background: var(--primary-color, #3AABB8);
    color: white;
    text-decoration: none;
    border-radius: 50px;
    font-weight: 700;
    font-size: 1.0625rem;
    transition: all 0.3s ease;
    box-shadow: 0 6px 20px rgba(58, 171, 184, 0.3);
}

.gnai-cta-btn:hover {
    background: var(--secondary-color, #E8AF3E);
    transform: translateY(-3px);
    box-shadow: 0 10px 30px rgba(232, 175, 62, 0.4);
}

.gnai-cta-btn svg:last-child {
    transition: transform 0.3s ease;
}

.gnai-cta-btn:hover svg:last-child {
    transform: translateX(5px);
}

.gnai-image {
    display: flex;
    align-items: center;
    justify-content: center;
}

.gnai-image svg {
    width: 100%;
    height: auto;
    filter: drop-shadow(0 10px 30px rgba(0, 0, 0, 0.1));
}

/* ========================================
   MID-PAGE BANNER
   ======================================== */

.mid-page-banner-section {
    padding: 1.5rem 0;
    background: transparent;
}

.mid-page-banner {
    width: 100%;
    min-height: 60px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.08);
    transition: all 0.3s ease;
}

.mid-page-banner:hover {
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.12);
}

.mid-page-banner a {
    display: block;
    width: 100%;
    height: 100%;
}

.mid-page-banner img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    display: block;
}

/* ========================================
   ANIMATIONS
   ======================================== */

@keyframes fadeIn {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

@keyframes slideUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* ========================================
   RESPONSIVE DESIGN
   ======================================== */

@media (max-width: 968px) {
    .news-grid {
        grid-template-columns: 1fr;
        gap: 2rem;
    }
    
    .top-picks-column {
        order: 2;
    }
    
    .updates-column {
        order: 1;
    }
    
    .gnai-content {
        grid-template-columns: 1fr;
        gap: 2.5rem;
        text-align: center;
    }
    
    .gnai-image {
        order: -1;
    }
    
    .popup-content {
        width: 95%;
        padding: 2.5rem 1.5rem;
    }
}

@media (max-width: 640px) {
    .news-updates-section {
        padding: 3rem 0 4rem;
    }
    
    .column-title {
        font-size: 1.25rem;
    }
    
    .top-pick-card {
        min-width: 240px;
        max-width: 240px;
    }
    
    .contributor-card {
        min-width: 240px;
        max-width: 240px;
    }
    
    .gnai-section {
        padding: 3rem 0;
    }
    
    .gnai-cta-btn {
        width: 100%;
        justify-content: center;
    }
}