/* ═══════════════════════════════════════════════════════════════════════
   MODERN ENHANCEMENTS - Cải thiện giao diện toàn trang
   Tác giả: Kiro AI
   Ngày: 2026-06-23
══════════════════════════════════════════════════════════════════════ */

/* ────────────────────────────────────────────────────────────────────
   1. GLOBAL IMPROVEMENTS
──────────────────────────────────────────────────────────────────── */

/* Smooth scroll behavior */
html {
    scroll-behavior: smooth;
}

/* Container improvements */
@media (max-width: 768px) {
    .container {
        padding-left: 15px !important;
        padding-right: 15px !important;
    }
}

/* Section spacing consistency */
.section-content {
    min-height: 400px;
    background: #fafbfc;
}

/* ────────────────────────────────────────────────────────────────────
   2. LOADING ANIMATION
──────────────────────────────────────────────────────────────────── */

.page-loader {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 99999;
    transition: opacity 0.5s ease, visibility 0.5s ease;
}

.page-loader.hide {
    opacity: 0;
    visibility: hidden;
}

.loader-content {
    text-align: center;
}

.loader-icon {
    font-size: 4rem;
    animation: leafRotate 2s ease-in-out infinite;
}

@keyframes leafRotate {
    0%, 100% { transform: rotate(0deg) scale(1); }
    25% { transform: rotate(-15deg) scale(1.1); }
    50% { transform: rotate(15deg) scale(1.2); }
    75% { transform: rotate(-10deg) scale(1.1); }
}

.loader-text {
    margin-top: 15px;
    font-size: 16px;
    font-weight: 600;
    color: #2e7d32;
    letter-spacing: 0.5px;
}

.loader-bar {
    width: 200px;
    height: 4px;
    background: #e8f5e9;
    border-radius: 4px;
    margin: 15px auto 0;
    overflow: hidden;
}

.loader-bar-fill {
    height: 100%;
    width: 0;
    background: linear-gradient(90deg, #4CAF50, #8BC34A);
    border-radius: 4px;
    animation: loadProgress 1.5s cubic-bezier(0.4, 0, 0.2, 1) infinite;
}

@keyframes loadProgress {
    0% { width: 0; margin-left: 0; }
    50% { width: 70%; margin-left: 0; }
    100% { width: 0; margin-left: 100%; }
}

/* ────────────────────────────────────────────────────────────────────
   3. FOOTER MODERNIZATION
──────────────────────────────────────────────────────────────────── */

.footer {
    background: linear-gradient(135deg, #1b5e20 0%, #2e7d32 50%, #1a4d2e 100%) !important;
    position: relative;
    padding-top: 80px !important;
}

.site-footer {
    padding: 40px 0;
}

.footer .detail-footer img {
    border-radius: 12px;
    border: 3px solid rgba(255, 255, 255, 0.2);
    padding: 10px;
    background: rgba(255, 255, 255, 0.1);
    transition: transform 0.3s ease;
}

.footer .detail-footer img:hover {
    transform: scale(1.05);
}

.footer-widget h3 {
    color: #fff !important;
    font-size: 16px !important;
    font-weight: 700 !important;
    margin-bottom: 20px !important;
    padding-bottom: 12px;
    position: relative;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.footer-widget h3::after {
    content: "";
    position: absolute;
    bottom: 0;
    left: 0;
    height: 3px;
    width: 50px;
    background: linear-gradient(90deg, #8BC34A, #4CAF50);
    border-radius: 2px;
}

.ul-footer-contact li,
.ul-footer-contact1 li {
    padding: 8px 0;
    color: rgba(255, 255, 255, 0.85);
    font-size: 14px;
    transition: padding-left 0.3s ease;
}

.ul-footer-contact li:hover,
.ul-footer-contact1 li:hover {
    padding-left: 5px;
}

.ul-footer-contact1 li a {
    color: rgba(255, 255, 255, 0.85) !important;
    text-decoration: none;
    transition: color 0.3s ease;
}

.ul-footer-contact1 li a:hover {
    color: #8BC34A !important;
}

.contact-footer {
    display: flex;
    align-items: center;
    gap: 15px;
    background: rgba(255, 255, 255, 0.08);
    padding: 15px;
    border-radius: 12px;
    margin-bottom: 15px;
    transition: background 0.3s ease, transform 0.3s ease;
}

.contact-footer:hover {
    background: rgba(255, 255, 255, 0.12);
    transform: translateX(5px);
}

.images-footer img {
    border-radius: 8px;
    filter: brightness(1.1);
}

.icon-kn {
    font-size: 28px !important;
    margin-right: 8px;
    transition: transform 0.3s ease, color 0.3s ease;
}

.icon-kn:hover {
    transform: scale(1.2) rotate(5deg);
    color: #8BC34A !important;
}

.footer-copyright {
    background: rgba(0, 0, 0, 0.2);
    padding: 20px 0;
    text-align: center;
    color: rgba(255, 255, 255, 0.7);
    font-size: 14px;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
}

/* ────────────────────────────────────────────────────────────────────
   4. BACK TO TOP BUTTON
──────────────────────────────────────────────────────────────────── */

.back-to-top {
    background: linear-gradient(135deg, #4CAF50, #66BB6A) !important;
    width: 45px !important;
    height: 45px !important;
    box-shadow: 0 4px 15px rgba(76, 175, 80, 0.4);
    transition: all 0.3s ease;
    border: 2px solid rgba(255, 255, 255, 0.3);
}

.back-to-top:hover {
    background: linear-gradient(135deg, #388e3c, #4CAF50) !important;
    transform: translateY(-5px);
    box-shadow: 0 6px 20px rgba(76, 175, 80, 0.6);
}

.back-to-top i {
    animation: bounceUp 1.5s ease-in-out infinite;
}

@keyframes bounceUp {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-5px); }
}

/* ────────────────────────────────────────────────────────────────────
   5. ZALO CHAT BUTTON IMPROVEMENTS
──────────────────────────────────────────────────────────────────── */

.fcta-zalo-vi-tri-nut {
    bottom: 90px !important; /* Tránh chồng lên back-to-top */
}

.fcta-zalo-nen-nut {
    box-shadow: 0 4px 15px rgba(0, 104, 255, 0.4) !important;
    transition: transform 0.3s ease;
}

.fcta-zalo-nen-nut:hover {
    transform: translateY(-5px);
    box-shadow: 0 6px 20px rgba(0, 104, 255, 0.6) !important;
}

/* ────────────────────────────────────────────────────────────────────
   6. MOBILE RESPONSIVE IMPROVEMENTS
──────────────────────────────────────────────────────────────────── */

@media (max-width: 768px) {
    .section-content {
        padding-top: 10px !important;
    }
    
    .nnv-section {
        padding: 40px 0;
    }
    
    .nnv-section-title {
        font-size: 18px;
    }
    
    .footer {
        padding-top: 60px !important;
    }
    
    .site-footer {
        padding: 30px 0;
    }
    
    .footer-widget h3 {
        font-size: 14px !important;
        margin-bottom: 15px !important;
    }
    
    .back-to-top {
        width: 40px !important;
        height: 40px !important;
        left: 15px !important;
        bottom: 15px !important;
    }
    
    .fcta-zalo-vi-tri-nut {
        left: 15px !important;
        bottom: 70px !important;
    }
    
    .fcta-zalo-nen-nut {
        width: 45px;
        height: 45px;
    }
    
    div.fcta-zalo-mess {
        left: 60px;
        font-size: 13px;
    }
}

/* ────────────────────────────────────────────────────────────────────
   7. SMOOTH TRANSITIONS FOR ALL LINKS
──────────────────────────────────────────────────────────────────── */

a {
    transition: color 0.3s ease, transform 0.2s ease;
}

img {
    transition: transform 0.3s ease, filter 0.3s ease;
}

/* ────────────────────────────────────────────────────────────────────
   8. CARD HOVER EFFECTS ENHANCEMENT
──────────────────────────────────────────────────────────────────── */

.pcard, .fcard, .news-card {
    position: relative;
    overflow: hidden;
}

.pcard::before, .fcard::before, .news-card::before {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: radial-gradient(circle, rgba(139, 195, 74, 0.1) 0%, transparent 70%);
    transform: scale(0);
    transition: transform 0.6s ease;
    pointer-events: none;
}

.pcard:hover::before, .fcard:hover::before, .news-card:hover::before {
    transform: scale(1);
}

/* ────────────────────────────────────────────────────────────────────
   9. FEATURE CARDS PULSE ANIMATION
──────────────────────────────────────────────────────────────────── */

.feature-icon {
    animation: iconPulse 2s ease-in-out infinite;
}

@keyframes iconPulse {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.1); }
}

/* ────────────────────────────────────────────────────────────────────
   10. ACCESSIBILITY IMPROVEMENTS
──────────────────────────────────────────────────────────────────── */

/* Focus states for keyboard navigation */
a:focus, button:focus, input:focus {
    outline: 2px solid #4CAF50;
    outline-offset: 2px;
}

/* Skip to main content link (for accessibility) */
.skip-to-main {
    position: absolute;
    left: -9999px;
    z-index: 999;
    padding: 10px;
    background: #4CAF50;
    color: white;
    text-decoration: none;
}

.skip-to-main:focus {
    left: 50%;
    transform: translateX(-50%);
    top: 10px;
}

/* ────────────────────────────────────────────────────────────────────
   11. PRINT STYLES
──────────────────────────────────────────────────────────────────── */

@media print {
    .navigation-menu,
    .back-to-top,
    .fcta-zalo-vi-tri-nut,
    .fb-left,
    .feature-strip {
        display: none !important;
    }
    
    .site-header-full {
        page-break-after: avoid;
    }
    
    .pcard, .fcard, .news-card {
        page-break-inside: avoid;
    }
}

/* ────────────────────────────────────────────────────────────────────
   12. PERFORMANCE: REDUCE MOTION FOR ACCESSIBILITY
──────────────────────────────────────────────────────────────────── */

@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
        scroll-behavior: auto !important;
    }
}
