/**
 * Footer Expert Styles
 * 
 * Footer for KASETIDEA - Agricultural Expert
 * 4 Column Layout (Responsive to 1 Column on Mobile)
 * 
 * @package PlantPedia
 * @version 2.2.0
 */

/* ==========================================================================
   Footer Main
   ========================================================================== */

.footer-expert {
    background: #1a4d3e;
    color: #e0e0e0;
    margin-top: 60px;
}

.footer-main {
    padding: 50px 0 30px;
}

/* ==========================================================================
   Footer Columns Layout - NEW STRUCTURE
   ========================================================================== */

/* Brand Section - Full Width */
.footer-brand-section {
    padding-bottom: 20px;
    margin-bottom: 20px;
    border-bottom: 1px solid rgba(255,255,255,0.1);
}

/* Links Grid - 2 Columns 50:50 */
.footer-links-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
    padding-bottom: 20px;
    margin-bottom: 20px;
    border-bottom: 1px solid rgba(255,255,255,0.1);
    background: transparent !important;
    border-radius: 0 !important;
    box-shadow: none !important;
}

.footer-link-column {
    min-width: 0;
    width: 100%;
    background: transparent !important;
    border: none !important;
    border-radius: 0 !important;
    box-shadow: none !important;
    padding: 0 !important;
}

.footer-link-column h4 {
    font-size: 0.875rem;
    font-weight: 600;
    color: #4ade80;
    margin: 0 0 12px 0;
    background: transparent !important;
    border: none !important;
    padding: 0 !important;
}

.footer-link-column ul {
    list-style: none;
    margin: 0;
    padding: 0;
    background: transparent !important;
}

.footer-link-column ul li {
    margin-bottom: 8px;
    background: transparent !important;
}

.footer-link-column ul li a {
    color: #b0bec5;
    font-size: 0.75rem;
    text-decoration: none;
    transition: color 0.3s ease;
    display: block;
    background: transparent !important;
    border: none !important;
    padding: 0 !important;
}

.footer-link-column ul li a:hover {
    color: #4ade80;
}

.footer-link-column ul li a.view-all {
    color: #4ade80;
    font-weight: 500;
}

/* Community Section - Full Width */
.footer-community-section {
    text-align: center;
}

.footer-community-section h4 {
    font-size: 0.875rem;
    font-weight: 600;
    color: #4ade80;
    margin: 0 0 10px 0;
}

.footer-community-section .community-text {
    font-size: 0.75rem;
    color: #b0bec5;
    line-height: 1.5;
    margin-bottom: 12px;
}

.footer-community-section .community-stats {
    margin-top: 10px;
    font-size: 0.75rem;
    color: #b0bec5;
}

/* Desktop Layout */
@media (min-width: 1024px) {
    .footer-brand-section,
    .footer-links-grid,
    .footer-community-section {
        display: none;
    }
    
    /* Show old layout on desktop */
    .footer-columns {
        display: grid;
        grid-template-columns: 1.5fr 1fr 1fr 1.2fr;
        gap: 40px;
    }
}

/* ==========================================================================
   Footer Column Styles
   ========================================================================== */

.footer-column h4 {
    font-size: 16px;
    font-weight: 700;
    color: #fff;
    margin: 0 0 16px;
    letter-spacing: 0.3px;
}

.footer-column ul {
    list-style: none;
    margin: 0;
    padding: 0;
}

.footer-column ul li {
    margin-bottom: 10px;
}

.footer-column ul li a {
    color: #b0bec5;
    font-size: 14px;
    text-decoration: none;
    transition: color 0.3s ease, padding-left 0.3s ease;
    display: inline-block;
}

.footer-column ul li a:hover {
    color: #4caf50;
    padding-left: 4px;
}

/* ==========================================================================
   Column 1: Brand
   ========================================================================== */

.footer-brand .footer-logo {
    margin-bottom: 12px;
}

.footer-logo-link {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    text-decoration: none;
    transition: opacity 0.3s ease;
}

.footer-logo-link:hover {
    opacity: 0.85;
}

.footer-logo-link img,
.footer-logo-link .footer-logo-img {
    height: 40px;
    width: auto;
    display: block;
    filter: brightness(1.1);
}

.footer-logo .logo-icon {
    font-size: 32px;
    line-height: 1;
    display: inline-block;
}

.footer-brand .footer-logo h4 {
    font-size: 22px;
    font-weight: 800;
    color: #4caf50;
    margin: 0;
    letter-spacing: 1px;
    display: inline-block;
}

.footer-description {
    font-size: 13px;
    line-height: 1.6;
    color: #cfd8dc;
    margin: 0 0 20px;
}

.footer-social {
    display: flex;
    gap: 12px;
}

.social-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 50%;
    color: #fff;
    transition: all 0.3s ease;
}

.social-icon:hover {
    background: #4caf50;
    transform: translateY(-2px);
}

/* ==========================================================================
   Column 2: Money Links (สินค้าแนะนำ)
   ========================================================================== */

.footer-money h4 {
    color: #ffd54f;
}

.footer-money ul li a {
    position: relative;
    padding-left: 16px;
}

.footer-money ul li a::before {
    content: '💰';
    position: absolute;
    left: 0;
    font-size: 12px;
    opacity: 0.8;
}

.footer-money ul li:last-child a {
    color: #4caf50;
    font-weight: 600;
}

.footer-money ul li:last-child a::before {
    content: '→';
    color: #4caf50;
}

/* ==========================================================================
   Column 3: Knowledge (ศูนย์ความรู้)
   ========================================================================== */

.footer-knowledge h4 {
    color: #81c784;
}

.footer-knowledge ul li a {
    position: relative;
    padding-left: 18px;
}

.footer-knowledge ul li a::before {
    content: '▸';
    position: absolute;
    left: 0;
    color: #81c784;
    font-size: 14px;
}

/* ==========================================================================
   Column 4: Community
   ========================================================================== */

.footer-community h4 {
    color: #fff;
}

.community-text {
    font-size: 13px;
    line-height: 1.6;
    color: #cfd8dc;
    margin: 0 0 16px;
}

.btn-line-cta {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    max-width: 260px;
    padding: 12px 20px;
    background: linear-gradient(135deg, #00c300, #00b900);
    color: #fff;
    font-size: 14px;
    font-weight: 600;
    border-radius: 25px;
    text-decoration: none;
    transition: all 0.3s ease;
    box-shadow: 0 4px 12px rgba(0, 195, 0, 0.3);
}

.btn-line-cta:hover {
    background: linear-gradient(135deg, #00b900, #00a800);
    transform: translateY(-2px);
    box-shadow: 0 6px 16px rgba(0, 195, 0, 0.4);
}

.community-stats {
    margin-top: 12px;
    font-size: 12px;
    color: #b0bec5;
}

.community-stats span {
    display: inline-block;
    padding: 4px 10px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 12px;
}

/* ==========================================================================
   Footer Bottom
   ========================================================================== */

.footer-bottom {
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    padding: 20px 0;
    margin-top: 30px;
}

.footer-bottom-content {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 12px;
    text-align: center;
}

.footer-copyright {
    font-size: 13px;
    color: #90a4ae;
    margin: 0;
}

.footer-legal {
    display: flex;
    align-items: center;
    gap: 8px;
}

.footer-legal a {
    font-size: 12px;
    color: #b0bec5;
    text-decoration: none;
    transition: color 0.3s ease;
}

.footer-legal a:hover {
    color: #4caf50;
}

.footer-legal .separator {
    color: #546e7a;
}

@media (min-width: 768px) {
    .footer-bottom-content {
        flex-direction: row;
        justify-content: space-between;
    }
}

/* ==========================================================================
   Responsive Adjustments
   ========================================================================== */

@media (max-width: 767px) {
    .footer-main {
        padding: 30px 0 20px;
    }
    
    /* Hide old structure on mobile */
    .footer-columns {
        display: none !important;
    }
    
    /* Brand Section */
    .footer-brand-section {
        text-align: left;
    }
    
    .footer-brand-section .footer-logo {
        margin-bottom: 12px;
    }
    
    .footer-brand-section .footer-description {
        font-size: 0.75rem;
        line-height: 1.6;
        color: #b0bec5;
        margin-bottom: 15px;
    }
    
    .footer-brand-section .footer-social {
        display: flex;
        gap: 12px;
    }
    
    .footer-brand-section .footer-social .social-icon {
        width: 36px;
        height: 36px;
        background: rgba(255,255,255,0.1);
        border-radius: 50%;
        display: flex;
        align-items: center;
        justify-content: center;
        color: #b0bec5;
        transition: all 0.3s;
    }
    
    .footer-brand-section .footer-social .social-icon:hover {
        background: #4ade80;
        color: #1a4d3e;
    }
    
    /* Links Grid - Force 50:50 NO BORDERS */
    .footer-links-grid {
        display: grid !important;
        grid-template-columns: 1fr 1fr !important;
        gap: 16px !important;
        background: transparent !important;
        border-radius: 0 !important;
        box-shadow: none !important;
    }
    
    .footer-link-column {
        min-width: 0 !important;
        width: 100% !important;
        background: transparent !important;
        border: none !important;
        border-radius: 0 !important;
        box-shadow: none !important;
        padding: 0 !important;
    }
    
    .footer-link-column h4 {
        font-size: 0.8125rem;
        margin-bottom: 10px;
        background: transparent !important;
        border: none !important;
        padding: 0 !important;
    }
    
    .footer-link-column ul {
        background: transparent !important;
        padding: 0 !important;
        margin: 0 !important;
    }
    
    .footer-link-column ul li {
        margin-bottom: 6px;
        background: transparent !important;
    }
    
    .footer-link-column ul li a {
        font-size: 0.75rem;
        background: transparent !important;
        border: none !important;
        padding: 0 !important;
    }
    
    /* Community Section */
    .footer-community-section {
        text-align: center;
    }
    
    .footer-community-section .community-text {
        font-size: 0.7rem;
        margin-bottom: 12px;
    }
    
    .btn-line-cta {
        display: inline-flex;
        align-items: center;
        justify-content: center;
        background: #06c755;
        color: white;
        padding: 10px 24px;
        border-radius: 50px;
        text-decoration: none;
        font-size: 0.8125rem;
        font-weight: 600;
    }
    
    .community-stats {
        font-size: 0.7rem;
    }
}

/* ==========================================================================
   Desktop/Tablet Footer (footer-desktop)
   ========================================================================== */

/* Hide desktop footer on mobile */
.footer-desktop {
    display: none !important;
}

/* Hide mobile footer on tablet/desktop */
@media (min-width: 768px) {
    .footer-mobile {
        display: none !important;
    }
    
    .footer-desktop {
        display: block !important;
    }
    
    .footer-desktop .footer-columns {
        display: grid;
        grid-template-columns: repeat(2, 1fr);
        gap: 30px;
    }
    
    .footer-desktop .footer-column {
        text-align: left;
    }
    
    .footer-desktop .footer-column h4 {
        font-size: 1rem;
        font-weight: 600;
        color: #4ade80;
        margin-bottom: 15px;
    }
    
    .footer-desktop .footer-column ul {
        list-style: none;
        margin: 0;
        padding: 0;
    }
    
    .footer-desktop .footer-column ul li {
        margin-bottom: 10px;
    }
    
    .footer-desktop .footer-column ul li a {
        color: #b0bec5;
        font-size: 0.875rem;
        text-decoration: none;
        transition: color 0.3s;
    }
    
    .footer-desktop .footer-column ul li a:hover {
        color: #4ade80;
    }
}

/* Desktop - 4 columns */
@media (min-width: 1024px) {
    .footer-desktop .footer-columns {
        grid-template-columns: 1.5fr 1fr 1fr 1.2fr;
        gap: 40px;
    }
}

/* ==========================================================================
   Dark Mode Support (Optional)
   ========================================================================== */

@media (prefers-color-scheme: dark) {
    .footer-expert {
        background: #0d3025;
    }
}

/* ==========================================================================
   Print Styles
   ========================================================================== */

@media print {
    .footer-expert {
        background: #fff;
        color: #000;
        border-top: 2px solid #1a4d3e;
    }
    
    .footer-social,
    .btn-line-cta,
    .community-stats {
        display: none;
    }
}
