/* =============================================
   FOOTER STYLES - Mixed Color Scheme
   Maroon/Red (Home.css) + Teal/Green (Header)
   ============================================= */

.footer {
    background: linear-gradient(135deg, 
        #2d0a0a 0%, 
        #4a0a0a 25%, 
        #0B4F66 50%,
        #14776D 75%, 
        #2d0a0a 100%);
    background-size: 200% 200%;
    animation: footerGradientShift 15s ease infinite;
    color: #ffffff;
    padding: 2rem 0 1rem;
    margin-top: auto;
    position: relative;
    border-top: 3px solid rgba(255, 215, 0, 0.3);
}

@keyframes footerGradientShift {
    0% { background-position: 0% 50%; }
    50% { background-position: 100% 50%; }
    100% { background-position: 0% 50%; }
}

/* Animated Gradient Overlay - Mixed colors */
.footer::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: radial-gradient(circle at 20% 50%, rgba(255, 215, 0, 0.08), transparent 50%),
                radial-gradient(circle at 80% 80%, rgba(139, 0, 0, 0.2), transparent 50%),
                radial-gradient(circle at 40% 20%, rgba(20, 119, 109, 0.15), transparent 50%);
    pointer-events: none;
}

/* Subtle Pattern Overlay */
.footer::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-image: radial-gradient(circle at 20% 50%, rgba(255, 215, 0, 0.04) 1px, transparent 1px);
    background-size: 30px 30px;
    pointer-events: none;
}

/* Animated Gradient Top Border - Full spectrum */
.footer-top-border {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: linear-gradient(90deg, 
        #F57B2C 0%, 
        #AC1A2C 20%, 
        #14776D 40%, 
        #0B4F66 60%, 
        #AC1A2C 80%, 
        #F57B2C 100%);
    background-size: 200% 100%;
    animation: footerBorderShine 4s ease infinite;
}

@keyframes footerBorderShine {
    0% { background-position: 0% 50%; }
    50% { background-position: 100% 50%; }
    100% { background-position: 0% 50%; }
}

.footer-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 1rem;
    position: relative;
    z-index: 1;
}

/* Footer Content Grid */
.footer-content {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 2rem;
    margin-bottom: 1.5rem;
}

/* Brand Section with Logo */
.footer-brand {
    text-align: left;
}

/* Logo wrapper - Mixed gradient */
.footer-logo-wrapper {
    display: inline-block;
    margin-bottom: 0.75rem;
    background: linear-gradient(135deg, 
        rgba(245, 123, 44, 0.2),
        rgba(139, 0, 0, 0.15),
        rgba(20, 119, 109, 0.1));
    padding: 0.5rem 1rem;
    border-radius: 16px;
    border-left: 3px solid #F57B2C;
    transition: all 0.3s ease;
}

.footer-logo-wrapper:hover {
    transform: scale(1.02);
    background: linear-gradient(135deg, 
        rgba(245, 123, 44, 0.3),
        rgba(139, 0, 0, 0.2),
        rgba(20, 119, 109, 0.15));
}

.footer-logo-img {
    height: 48px;
    width: auto;
    max-width: 140px;
    object-fit: contain;
    display: block;
    filter: drop-shadow(0 2px 6px rgba(0, 0, 0, 0.2));
    transition: all 0.3s ease;
}

.footer-logo-img:hover {
    filter: drop-shadow(0 2px 10px rgba(245, 123, 44, 0.3));
}

.footer-brand p {
    font-size: 0.85rem;
    color: #F57B2C;
    opacity: 0.9;
    margin-bottom: 0.8rem;
    font-weight: 500;
}

.footer-brand span {
    font-size: 0.8rem;
    color: rgba(255, 255, 255, 0.8);
    line-height: 1.5;
    display: block;
}

/* Links Section */
.footer-links h4,
.footer-support h4 {
    font-size: 1rem;
    font-weight: 600;
    color: #F57B2C;
    margin-bottom: 1rem;
    position: relative;
    display: inline-block;
}

.footer-links h4::after,
.footer-support h4::after {
    content: '';
    position: absolute;
    bottom: -6px;
    left: 0;
    width: 35px;
    height: 2px;
    background: linear-gradient(90deg, #F57B2C, #14776D);
    border-radius: 2px;
}

/* Quick Links Grid - Desktop 2 columns */
.footer-links-grid {
    list-style: none;
    padding: 0;
    margin: 0;
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 0.6rem 1rem;
}

.footer-links-grid li {
    margin: 0;
}

.footer-links-grid a {
    color: rgba(255, 255, 255, 0.8);
    text-decoration: none;
    font-size: 0.85rem;
    transition: all 0.3s ease;
    display: inline-flex;
    align-items: center;
    gap: 8px;
}

.footer-links-grid a i {
    width: 18px;
    font-size: 0.85rem;
    color: #F57B2C;
    transition: all 0.3s ease;
}

.footer-links-grid a span {
    display: inline;
}

.footer-links-grid a:hover {
    color: #F57B2C;
    transform: translateX(5px);
}

.footer-links-grid a:hover i {
    transform: translateX(2px);
}

/* Support Section */
.footer-support p {
    font-size: 0.8rem;
    color: rgba(255, 255, 255, 0.75);
    line-height: 1.5;
    margin-bottom: 1rem;
}

.btn-support {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background: linear-gradient(135deg, 
        rgba(245, 123, 44, 0.15),
        rgba(139, 0, 0, 0.1),
        rgba(20, 119, 109, 0.08));
    border: 1.5px solid #F57B2C;
    color: #F57B2C;
    padding: 0.5rem 1.2rem;
    border-radius: 50px;
    text-decoration: none;
    font-size: 0.8rem;
    font-weight: 500;
    transition: all 0.3s ease;
}

.btn-support i {
    font-size: 0.8rem;
}

.btn-support:hover {
    background: linear-gradient(135deg, #F57B2C, #AC1A2C, #14776D);
    color: #1a0808;
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(245, 123, 44, 0.3);
}

/* Footer Bottom */
.footer-bottom {
    text-align: center;
    padding-top: 1rem;
    border-top: 1px solid rgba(245, 123, 44, 0.2);
    font-size: 0.7rem;
    color: rgba(255, 255, 255, 0.6);
}

/* Back to Top Button - Mixed colors */
.back-to-top {
    position: fixed;
    bottom: 20px;
    right: 20px;
    width: 40px;
    height: 40px;
    background: linear-gradient(135deg, #8B0000, #0B4F66);
    border: none;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    cursor: pointer;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
    z-index: 1000;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.3);
}

.back-to-top.show {
    opacity: 1;
    visibility: visible;
}

.back-to-top:hover {
    background: linear-gradient(135deg, #F57B2C, #AC1A2C, #14776D);
    transform: translateY(-3px);
    box-shadow: 0 5px 15px rgba(245, 123, 44, 0.4);
}

/* ============================================
   RESPONSIVE
   ============================================ */

/* Tablet (768px - 1023px) */
@media (max-width: 1023px) and (min-width: 768px) {
    .footer-content {
        grid-template-columns: repeat(2, 1fr);
        gap: 1.5rem;
    }
    
    .footer-brand {
        grid-column: span 2;
        text-align: center;
    }
    
    .footer-logo-wrapper {
        display: inline-block;
    }
    
    .footer-brand span {
        max-width: 80%;
        margin-left: auto;
        margin-right: auto;
    }
    
    .footer-links,
    .footer-support {
        text-align: center;
    }
    
    .footer-links h4::after,
    .footer-support h4::after {
        left: 50%;
        transform: translateX(-50%);
    }
    
    .footer-links-grid {
        max-width: 300px;
        margin-left: auto;
        margin-right: auto;
    }
    
    .footer-links-grid a {
        justify-content: center;
    }
}

/* Mobile (max 767px) - 3x2 Grid */
@media (max-width: 767px) {
    .footer {
        padding: 1.5rem 0 1rem;
    }
    
    .footer-container {
        padding: 0 0.75rem;
    }
    
    .footer-content {
        grid-template-columns: 1fr;
        gap: 1.5rem;
        margin-bottom: 1rem;
    }
    
    /* All sections centered */
    .footer-brand,
    .footer-links,
    .footer-support {
        text-align: center;
    }
    
    /* Logo wrapper on mobile */
    .footer-logo-wrapper {
        display: inline-block;
        margin: 0 auto 0.75rem;
        padding: 0.4rem 0.8rem;
    }
    
    .footer-logo-img {
        height: 40px;
        margin: 0 auto;
    }
    
    .footer-brand p {
        font-size: 0.75rem;
    }
    
    .footer-brand span {
        font-size: 0.7rem;
        max-width: 100%;
    }
    
    /* Center heading underlines */
    .footer-links h4::after,
    .footer-support h4::after {
        left: 50%;
        transform: translateX(-50%);
    }
    
    /* Quick Links - 3x2 Grid: 3 per row, 2 rows */
    .footer-links-grid {
        display: grid;
        grid-template-columns: repeat(3, 1fr);
        gap: 1rem 0.8rem;
        max-width: 100%;
        margin: 0 auto;
    }
    
    .footer-links-grid li {
        margin: 0;
    }
    
    .footer-links-grid a {
        display: flex;
        flex-direction: column;
        align-items: center;
        justify-content: center;
        gap: 6px;
        padding: 0.5rem 0;
        font-size: 0.7rem;
        text-align: center;
    }
    
    .footer-links-grid a i {
        width: auto;
        font-size: 1.2rem;
        margin: 0 auto;
        display: block;
    }
    
    .footer-links-grid a span {
        display: block;
    }
    
    .footer-links-grid a:hover {
        transform: translateY(-3px);
    }
    
    /* Links heading */
    .footer-links h4 {
        font-size: 0.9rem;
        margin-bottom: 0.8rem;
    }
    
    /* Support section */
    .footer-support h4 {
        font-size: 0.9rem;
        margin-bottom: 0.6rem;
    }
    
    .footer-support p {
        font-size: 0.7rem;
        margin-bottom: 0.6rem;
        max-width: 90%;
        margin-left: auto;
        margin-right: auto;
    }
    
    .btn-support {
        padding: 0.4rem 1rem;
        font-size: 0.7rem;
    }
    
    .footer-bottom {
        font-size: 0.6rem;
        padding-top: 0.8rem;
    }
    
    .back-to-top {
        bottom: 15px;
        right: 15px;
        width: 35px;
        height: 35px;
    }
}

/* Small Mobile (max 480px) */
@media (max-width: 480px) {
    .footer-container {
        padding: 0 0.5rem;
    }
    
    .footer-logo-wrapper {
        padding: 0.3rem 0.6rem;
    }
    
    .footer-logo-img {
        height: 35px;
    }
    
    .footer-links-grid {
        gap: 0.8rem 0.5rem;
    }
    
    .footer-links-grid a {
        font-size: 0.6rem;
        padding: 0.4rem 0;
    }
    
    .footer-links-grid a i {
        font-size: 1rem;
    }
    
    .btn-support {
        padding: 0.35rem 0.9rem;
        font-size: 0.65rem;
    }
}

/* Landscape mode on mobile */
@media (max-width: 767px) and (orientation: landscape) {
    .footer {
        padding: 1rem 0 0.8rem;
    }
    
    .footer-content {
        gap: 1rem;
    }
    
    .footer-links-grid {
        grid-template-columns: repeat(6, 1fr);
        gap: 0.5rem;
    }
    
    .footer-links-grid a {
        flex-direction: column;
        font-size: 0.65rem;
    }
    
    .footer-links-grid a i {
        font-size: 1rem;
    }
    
    .footer-logo-img {
        height: 35px;
    }
}