/* ==========================================
   FOOTER STYLES - BALANCED 2 COLUMNS
   ========================================== */

/* Hide old footer */
.footer {
    display: none;
}

/* ===== FIXED FOOTER BAR ===== */
.footer-fixed-bar {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    z-index: 10000;
    background: linear-gradient(135deg, #1e5ba8 0%, #2a5298 100%);
    backdrop-filter: blur(10px);
    box-shadow: 0 -2px 12px rgba(0, 0, 0, 0.08);
    height: 42px;
    cursor: pointer;
    transition: all 0.3s ease;
    border-top: 1px solid rgba(30, 91, 168, 0.1);
    display: block !important;
    visibility: visible !important;
}

.footer-fixed-bar:hover {
    background: white;
    box-shadow: 0 -3px 18px rgba(0, 0, 0, 0.12);
    border-top-color: #1e5ba8;
}

.footer-fixed-bar:hover .footer-fixed-hint span {
    color: #1e5ba8;
}

.footer-fixed-bar:hover .footer-fixed-hint i {
    color: #1e5ba8;
}

.footer-fixed-bar.hidden {
    transform: translateY(100%);
    opacity: 0;
    pointer-events: none;
}

.footer-fixed-content {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: flex-end;
}

.footer-fixed-hint {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 13px;
    font-weight: 400;
}

.footer-fixed-hint span {
    color: white;
    transition: color 0.3s ease;
}

.footer-fixed-hint i {
    color: #28a745;
    font-size: 12px;
    animation: bounceUpDown 2s infinite;
    transition: color 0.3s ease;
}

/* ===== MODERN FOOTER ===== */
.modern-footer {
    background: linear-gradient(135deg, #1e3c72 0%, #1e5ba8 50%, #2a5298 100%);
    color: white;
    padding: 42px 0 14px;
    position: relative;
    margin-top: 56px;
}

.modern-footer .container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

.footer-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 28px;
    margin-bottom: 28px;
}

.footer-column h4 {
    font-size: 1.3rem;
    margin-bottom: 14px;
    font-weight: 700;
    color: #fff;
    border-bottom: 3px solid rgba(255, 255, 255, 0.3);
    padding-bottom: 7px;
}

/* ===== LOGO SECTION ===== */
.footer-logo-section {
    display: flex;
    align-items: center;
    gap: 15px;
    margin-bottom: 21px;
}

.footer-logo-section img {
    width: 60px;
    height: 60px;
    object-fit: contain;
    background: white;
    border-radius: 8px;
    padding: 5px;
    flex-shrink: 0;
}

.footer-logo-section > div {
    flex: 1;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.footer-logo-section h3 {
    font-size: 1.2rem;
    margin: 0 0 3px 0;
    font-weight: 700;
    line-height: 1.3;
    color: #fff;
}

.footer-description {
    font-size: 0.95rem;
    line-height: 1.6;
    color: rgba(255, 255, 255, 0.85);
    margin: 0;
}

/* ===== SOCIAL LINKS ===== */
.footer-social {
    margin-top: 20px;
}

.footer-social h4 {
    margin-bottom: 20px;
}

.social-links-grid {
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    gap: 10px;
    margin-top: 20px;
}

.social-link {
    width: 45px;
    height: 45px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    transition: all 0.3s ease;
    text-decoration: none;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.social-link:hover {
    transform: translateY(-5px) scale(1.08);
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.3);
}

/* Màu nền mặc định cho từng icon */
.social-link.facebook {
    background: linear-gradient(135deg, #1877f2, #0d5dbf);
}

.social-link.youtube {
    background: linear-gradient(135deg, #ff0000, #cc0000);
}

.social-link.tiktok {
    background: linear-gradient(135deg, #000000, #333333);
}

.social-link.messenger {
    background: linear-gradient(135deg, #00b2ff, #0084ff);
}

.social-link.zalo {
    background: transparent;
    padding: 0;
}

.social-link.zalo img {
    width: 100%;
    height: 100%;
    object-fit: contain;
}

.social-link i {
    font-size: 1.2rem;
}

.social-link img {
    width: 100%;
    height: 100%;
    object-fit: contain;
}

/* ===== CONTACT INFO ===== */
.contact-info {
    display: flex;
    flex-direction: column;
    gap: 14px;
}

.contact-item {
    display: flex;
    gap: 15px;
    align-items: flex-start;
    padding: 10px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 10px;
    backdrop-filter: blur(10px);
    transition: all 0.3s ease;
}

.contact-item:hover {
    background: rgba(255, 255, 255, 0.15);
    transform: translateX(5px);
}

.contact-item i {
    font-size: 1.3rem;
    color: #ffd700;
    width: 25px;
    flex-shrink: 0;
    margin-top: 3px;
}

.contact-item strong {
    display: block;
    margin-bottom: 5px;
    font-size: 0.95rem;
    color: #ffd700;
}

.contact-item p {
    margin: 0;
    line-height: 1.6;
    color: rgba(255, 255, 255, 0.9);
    font-size: 0.95rem;
}

.contact-item a {
    color: white;
    text-decoration: none;
    transition: color 0.3s;
}

.contact-item a:hover {
    color: #ffd700;
    text-decoration: underline;
}

/* ===== FOOTER BOTTOM ===== */
.footer-bottom {
    text-align: center;
    padding-top: 21px;
    border-top: 1px solid rgba(255, 255, 255, 0.2);
}

.footer-bottom p {
    margin: 0;
    font-size: 0.9rem;
    color: rgba(255, 255, 255, 0.8);
}

/* ==========================================
   MOBILE FLOATING ICONS
   ========================================== */

.mobile-social-icons {
    position: fixed;
    bottom: 60px;
    right: 16px;
    z-index: 9998;
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.mobile-social-icon {
    width: 56px;
    height: 56px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 26px;
    text-decoration: none;
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.3);
    transition: all 0.3s ease;
    position: relative;
    animation: floatUpDown 3s ease-in-out infinite;
    cursor: pointer;
}

.mobile-social-icon::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 100%;
    height: 100%;
    border-radius: 50%;
    background: inherit;
    opacity: 0;
    animation: pulseRing 2s ease-out infinite;
    pointer-events: none;
    z-index: -1;
}

.mobile-social-icon::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 100%;
    height: 100%;
    border-radius: 50%;
    box-shadow: 0 0 30px rgba(0, 178, 255, 0.8);
    opacity: 0;
    animation: glowPulse 2s ease-in-out infinite;
    pointer-events: none;
    z-index: -1;
}

.mobile-social-icon:hover {
    transform: scale(1.12) rotate(5deg);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5);
}

.mobile-social-icon:active {
    transform: scale(1.02);
}

.mobile-social-icon.phone {
    background: linear-gradient(135deg, #28a745, #20c997);
}

.mobile-social-icon.phone {
    background: linear-gradient(135deg, #28a745, #20c997);
}

.mobile-social-icon.phone i {
    font-size: 26px;
}

.mobile-social-icon.messenger {
    background: linear-gradient(135deg, #00b2ff, #0084ff);
    animation-delay: 0s;
}

.mobile-social-icon.messenger::after {
    box-shadow: 0 0 30px rgba(0, 178, 255, 0.9);
}

.mobile-social-icon.zalo {
    background: linear-gradient(135deg, #0068ff, #00bcd4);
    animation-delay: 0.5s;
    box-shadow: 0 6px 20px rgba(0, 188, 212, 0.4);
}

.mobile-social-icon.zalo::before {
    background: rgba(0, 188, 212, 0.4);
}

.mobile-social-icon.zalo::after {
    box-shadow: 0 0 30px rgba(0, 188, 212, 0.9);
}

.mobile-social-icon.zalo img {
    width: 46px;
    height: 46px;
    object-fit: contain;
    filter: drop-shadow(0 3px 6px rgba(0, 0, 0, 0.3));
    position: relative;
    z-index: 2;
}

.mobile-social-icon img {
    width: 70%;
    height: 70%;
    object-fit: contain;
}

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

@keyframes floatUpDown {
    0%, 100% {
        transform: translateY(0);
    }
    50% {
        transform: translateY(-12px);
    }
}

@keyframes pulseRing {
    0% {
        transform: translate(-50%, -50%) scale(1);
        opacity: 0.7;
    }
    100% {
        transform: translate(-50%, -50%) scale(1.8);
        opacity: 0;
    }
}

@keyframes glowPulse {
    0%, 100% {
        opacity: 0;
    }
    50% {
        opacity: 1;
    }
}

@keyframes bounceUpDown {
    0%, 100% { 
        transform: translateY(0); 
    }
    50% { 
        transform: translateY(3px); 
    }
}

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

/* Tablet (768px - 1024px) */
@media (max-width: 1024px) and (min-width: 769px) {
    .footer-grid {
        gap: 30px;
    }

    .social-links-grid {
        grid-template-columns: repeat(5, 1fr);
        gap: 10px;
    }

    .social-link {
        width: 42px;
        height: 42px;
    }

    /* Desktop: Cả chữ và mũi tên căn phải */
    .footer-fixed-content {
        justify-content: flex-end;
        padding-right: 20px;
    }

    .footer-fixed-hint {
        justify-content: flex-start;
        gap: 8px;
        width: auto;
    }
}

/* Desktop lớn (>1024px) */
@media (min-width: 1025px) {
    /* Desktop: Cả chữ và mũi tên căn phải */
    .footer-fixed-content {
        justify-content: flex-end;
        padding-right: 20px;
    }

    .footer-fixed-hint {
        justify-content: flex-start;
        gap: 8px;
        width: auto;
    }
}

/* Mobile (<768px) */
@media (max-width: 768px) {
    .modern-footer {
        padding: 40px 0 20px;
        margin-top: 40px;
        margin-bottom: 70px;
    }

    .footer-grid {
        grid-template-columns: 1fr;
        gap: 30px;
    }

    .footer-column h4 {
        font-size: 1.15rem;
        margin-bottom: 15px;
    }

    .footer-logo-section {
        flex-direction: column;
        align-items: center;
        text-align: center;
        gap: 12px;
    }

    .footer-logo-section img {
        width: 70px;
        height: 70px;
    }

    .footer-logo-section h3 {
        font-size: 1.1rem;
    }

    .footer-description {
        font-size: 0.9rem;
    }

    .social-links-grid {
        grid-template-columns: repeat(5, 1fr);
        gap: 10px;
        justify-items: center;
    }

    .social-link {
        width: 50px;
        height: 50px;
    }

    .contact-item {
        padding: 12px;
        font-size: 0.9rem;
    }

    .contact-item i {
        font-size: 1.1rem;
        width: 22px;
    }

    .contact-item strong {
        font-size: 0.9rem;
    }

    .contact-item p {
        font-size: 0.85rem;
    }

    .footer-bottom {
        padding-top: 20px;
    }

    .footer-bottom p {
        font-size: 0.8rem;
        line-height: 1.5;
    }

    /* Fixed Footer Bar - Mobile */
    .footer-fixed-bar {
        height: 38px;
        padding: 0;
    }

    /* Mobile: Chữ trái sát viền, mũi tên phải sát viền */
    .footer-fixed-content {
        justify-content: space-between;
        padding: 0 15px;
    }

    .footer-fixed-hint {
        justify-content: space-between;
        width: 100%;
        gap: 0;
    }

    .footer-fixed-hint span {
        font-size: 11px;
    }

    .footer-fixed-hint i {
        font-size: 12px;
    }

    /* Mobile Social Icons */
    .mobile-social-icons {
        bottom: 50px;
        right: 14px;
        gap: 11px;
    }
    
    .mobile-social-icon {
        width: 52px;
        height: 52px;
        font-size: 24px;
    }
    
    .mobile-social-icon.zalo img {
        width: 42px;
        height: 42px;
    }
}

/* Small Mobile (<480px) */
@media (max-width: 480px) {
    .modern-footer {
        padding: 30px 0 15px;
    }

    .footer-logo-section img {
        width: 60px;
        height: 60px;
    }

    .footer-logo-section h3 {
        font-size: 1rem;
    }

    .social-links-grid {
        grid-template-columns: repeat(5, 1fr);
        gap: 8px;
    }

    .social-link {
        width: 45px;
        height: 45px;
    }

    .social-link i {
        font-size: 1.1rem;
    }

    .contact-item {
        padding: 10px;
        gap: 12px;
    }

    .footer-fixed-bar {
        height: 36px !important;
    }
    
    .footer-fixed-content {
        padding: 0 15px;
    }
    
    .footer-fixed-hint span {
        font-size: 11px;
    }

    .footer-fixed-hint i {
        font-size: 11px;
    }

    .mobile-social-icon {
        width: 48px;
        height: 48px;
        font-size: 22px;
    }
    
    .mobile-social-icon.zalo img {
        width: 38px;
        height: 38px;
    }

    .mobile-social-icons {
        bottom: 48px;
        right: 12px;
        gap: 10px;
    }
}

/* Extra Small Mobile (<360px) */
@media (max-width: 360px) {
    .footer-fixed-bar {
        padding: 0 10px;
    }

    .footer-fixed-hint {
        font-size: 10px;
    }

    .social-links-grid {
        grid-template-columns: repeat(5, 1fr);
        gap: 6px;
    }

    .social-link {
        width: 40px;
        height: 40px;
    }

    .mobile-social-icon {
        width: 45px;
        height: 45px;
    }
}

/* Landscape Mode (Mobile) */
@media (max-height: 500px) and (orientation: landscape) {
    .modern-footer {
        padding: 30px 0 15px;
    }

    .footer-grid {
        gap: 20px;
    }

    .contact-item {
        padding: 8px;
    }

    .mobile-social-icons {
        bottom: 60px;
        gap: 8px;
    }

    .mobile-social-icon {
        width: 45px;
        height: 45px;
    }
}