/* ======================= */
/* FOOTER - COMPACT MOBILE */
/* ======================= */

/* Clean Gradient Background */
footer {
    background: linear-gradient(135deg, 
        var(--ahda-teal) 0%, 
        #0d5a75 40%, 
        #10685e 70%, 
        #0B4F66 100%
    );
    color: var(--ahda-white);
    margin-top: 0;
    position: relative;
    z-index: 2;
    overflow: hidden;
}

/* Subtle pattern overlay for texture */
footer::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: 
        radial-gradient(
            circle at 20% 30%,
            rgba(255, 255, 255, 0.03) 1px,
            transparent 2px
        ),
        radial-gradient(
            circle at 80% 70%,
            rgba(255, 255, 255, 0.03) 1px,
            transparent 2px
        );
    background-size: 
        100px 100px,
        120px 120px;
    opacity: 0.3;
    pointer-events: none;
    z-index: 1;
}

/* Top accent line */
footer > .container::before {
    content: '';
    position: absolute;
    top: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 80%;
    height: 3px;
    background: linear-gradient(
        90deg,
        transparent,
        var(--ahda-orange) 30%,
        var(--ahda-maroon) 50%,
        var(--ahda-orange) 70%,
        transparent
    );
    border-radius: 0 0 2px 2px;
    box-shadow: 0 2px 8px rgba(245, 123, 44, 0.4);
}

/* ======================= */
/* LOGO SECTION - CLEAN */
/* ======================= */

.footer-logo-container {
    display: inline-block;
    max-width: 200px;
    margin-bottom: 15px;
}

.footer-logo {
    width: 100%;
    height: auto;
    display: block;
    background: transparent !important;
    filter: 
        drop-shadow(0 2px 4px rgba(0, 0, 0, 0.3))
        brightness(1.1)
        contrast(1.1);
    transition: all 0.3s ease;
}

.footer-logo-container:hover .footer-logo {
    filter: 
        drop-shadow(0 4px 8px rgba(0, 0, 0, 0.4))
        brightness(1.2)
        contrast(1.2);
    transform: scale(1.05);
}

/* ======================= */
/* TYPOGRAPHY - BETTER READABILITY */
/* ======================= */

.footer-text {
    color: rgba(255, 255, 255, 0.95);
    line-height: 1.6;
    font-size: 0.95rem;
    font-weight: 400;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.2);
    margin-bottom: 15px;
}

.footer-heading {
    color: var(--ahda-white);
    font-size: 1.1rem;
    font-weight: 600;
    margin-bottom: 15px;
    text-shadow: 0 2px 3px rgba(0, 0, 0, 0.3);
    display: flex;
    align-items: center;
}

.footer-heading i {
    color: var(--ahda-orange);
}

.footer-small {
    color: rgba(255, 255, 255, 0.7) !important;
    font-size: 0.8rem;
    display: block;
    margin-top: 8px;
}

.footer-link {
    color: rgba(255, 255, 255, 0.8) !important;
    text-decoration: none;
    font-size: 0.9rem;
    transition: all 0.2s ease;
}

.footer-link:hover {
    color: var(--ahda-white) !important;
}

.footer-link i {
    color: var(--ahda-orange);
}

/* ======================= */
/* QUICK LINKS - COMPACT */
/* ======================= */

.footer-links-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 8px;
}

.quick-link-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 12px 8px;
    background: rgba(255, 255, 255, 0.08);
    border-radius: 10px;
    color: rgba(255, 255, 255, 0.9);
    text-decoration: none;
    transition: all 0.3s ease;
    position: relative;
    height: 100%;
}

.quick-link-item i {
    font-size: 1.3rem;
    color: rgba(255, 255, 255, 0.9);
    margin-bottom: 6px;
    transition: all 0.3s ease;
}

.quick-link-item .link-text {
    font-size: 0.8rem;
    font-weight: 500;
    text-align: center;
    line-height: 1.2;
}

/* Tooltip for mobile touch */
.link-tooltip {
    position: absolute;
    top: -35px;
    left: 50%;
    transform: translateX(-50%) scale(0.9);
    background: rgba(11, 79, 102, 0.95);
    color: var(--ahda-white);
    padding: 6px 12px;
    border-radius: 6px;
    font-size: 0.85rem;
    font-weight: 600;
    white-space: nowrap;
    opacity: 0;
    visibility: hidden;
    transition: all 0.2s ease;
    z-index: 100;
    pointer-events: none;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
    border: 1px solid rgba(255, 255, 255, 0.15);
    backdrop-filter: blur(10px);
}

.link-tooltip::after {
    content: '';
    position: absolute;
    top: 100%;
    left: 50%;
    transform: translateX(-50%);
    border-width: 5px;
    border-style: solid;
    border-color: rgba(11, 79, 102, 0.95) transparent transparent transparent;
}

.link-tooltip.visible {
    opacity: 1;
    visibility: visible;
    transform: translateX(-50%) scale(1);
    top: -40px;
}

.quick-link-item:hover {
    background: rgba(255, 255, 255, 0.15);
    transform: translateY(-2px);
    color: var(--ahda-white);
}

.quick-link-item:hover i {
    color: var(--ahda-orange);
    transform: scale(1.1);
}

/* ======================= */
/* SUPPORT SECTION - COMPACT */
/* ======================= */

.support-section {
    background: linear-gradient(
        135deg,
        rgba(245, 123, 44, 0.15),
        rgba(172, 26, 44, 0.1)
    );
    padding: 20px;
    border-radius: 12px;
    border: 1px solid rgba(255, 255, 255, 0.15);
    text-align: center;
    transition: all 0.3s ease;
}

.support-section:hover {
    transform: translateY(-3px);
    box-shadow: 0 6px 20px rgba(245, 123, 44, 0.2);
    border-color: rgba(245, 123, 44, 0.3);
}

.support-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 50px;
    height: 50px;
    background: linear-gradient(
        135deg,
        var(--ahda-orange),
        var(--ahda-maroon)
    );
    border-radius: 50%;
    color: var(--ahda-white);
    font-size: 1.5rem;
    box-shadow: 0 4px 12px rgba(245, 123, 44, 0.4);
    transition: all 0.3s ease;
}

.support-section:hover .support-icon {
    transform: scale(1.1);
}

.btn-support {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(
        135deg,
        var(--ahda-orange),
        var(--ahda-maroon)
    );
    border: none;
    color: var(--ahda-white);
    font-weight: 600;
    font-size: 0.95rem;
    padding: 10px 20px;
    border-radius: 25px;
    transition: all 0.3s ease;
    text-decoration: none;
    width: 100%;
    margin-top: 10px;
    box-shadow: 0 4px 12px rgba(245, 123, 44, 0.3);
}

.btn-support:hover {
    background: linear-gradient(
        135deg,
        #ff8b3d,
        #c31e34
    );
    transform: translateY(-2px);
    box-shadow: 0 6px 16px rgba(245, 123, 44, 0.4);
    color: var(--ahda-white);
}

.btn-support i {
    font-size: 1.1rem;
}

/* ======================= */
/* NEWSLETTER - COMPACT */
/* ======================= */

.footer-newsletter .input-group {
    border-radius: 25px;
    overflow: hidden;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
    border: 1px solid rgba(255, 255, 255, 0.2);
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(5px);
}

.footer-newsletter .form-control {
    border: none;
    padding: 10px 15px;
    background: transparent;
    color: var(--ahda-white);
    font-size: 0.9rem;
    height: 44px;
}

.footer-newsletter .form-control::placeholder {
    color: rgba(255, 255, 255, 0.6);
}

.footer-newsletter .form-control:focus {
    background: rgba(255, 255, 255, 0.15);
    color: var(--ahda-white);
    box-shadow: none;
    border-color: var(--ahda-orange);
}

.btn-newsletter {
    border: none;
    padding: 0 20px;
    background: linear-gradient(
        135deg,
        var(--ahda-orange),
        var(--ahda-maroon)
    );
    color: var(--ahda-white);
    font-weight: 600;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    min-width: 44px;
}

.btn-newsletter:hover {
    background: linear-gradient(
        135deg,
        #ff8b3d,
        #c31e34
    );
    transform: translateX(2px);
}

/* ======================= */
/* COPYRIGHT - COMPACT */
/* ======================= */

.border-white-10 {
    border-color: rgba(255, 255, 255, 0.15) !important;
}

.footer-links-small {
    font-size: 0.85rem;
}

/* ======================= */
/* BACK TO TOP */
/* ======================= */

.back-to-top {
    position: fixed;
    bottom: 20px;
    right: 20px;
    background-color: var(--ahda-orange);
    color: var(--ahda-white);
    width: 45px;
    height: 45px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.3rem;
    cursor: pointer;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
    z-index: 1000;
    box-shadow: 0 4px 15px rgba(245, 123, 44, 0.4);
    border: 2px solid rgba(255, 255, 255, 0.9);
}

.back-to-top.visible {
    opacity: 1;
    visibility: visible;
}

.back-to-top:hover {
    background-color: #e06a1f;
    transform: translateY(-3px);
    box-shadow: 0 6px 20px rgba(245, 123, 44, 0.5);
}

/* ======================= */
/* RESPONSIVE DESIGN - COMPACT MOBILE */
/* ======================= */

@media (min-width: 768px) {
    footer {
        padding-top: 2.5rem !important;
        padding-bottom: 2.5rem !important;
    }
    
    .footer-logo-container {
        max-width: 220px;
    }
    
    .footer-links-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 10px;
    }
    
    .quick-link-item .link-text {
        display: block;
    }
    
    .support-section {
        padding: 25px;
    }
    
    .support-icon {
        width: 60px;
        height: 60px;
        font-size: 1.8rem;
    }
    
    .btn-support {
        font-size: 1rem;
        padding: 12px 25px;
    }
}

@media (max-width: 767px) {
    /* Remove gaps and make compact */
    footer {
        padding-top: 1.5rem !important;
        padding-bottom: 1.5rem !important;
    }
    
    .row.g-3 > [class*="col-"] {
        margin-bottom: 0.5rem !important;
    }
    
    .footer-logo-container {
        max-width: 160px;
        margin: 0 auto 1rem auto;
    }
    
    .footer-heading {
        font-size: 1rem;
        margin-bottom: 12px;
    }
    
    .footer-text {
        font-size: 0.9rem;
        line-height: 1.5;
        margin-bottom: 12px;
    }
    
    /* Stack columns on mobile */
    .col-lg-8 .row > [class*="col-"] {
        margin-bottom: 1.5rem !important;
    }
    
    /* Quick links adjustments */
    .footer-links-grid {
        grid-template-columns: repeat(3, 1fr);
        gap: 6px;
    }
    
    .quick-link-item {
        padding: 10px 6px;
        min-height: 70px;
    }
    
    .quick-link-item i {
        font-size: 1.2rem;
        margin-bottom: 4px;
    }
    
    .quick-link-item .link-text {
        font-size: 0.75rem;
    }
    
    /* Support section mobile */
    .support-section {
        padding: 15px;
        margin-top: 0.5rem;
    }
    
    .support-icon {
        width: 45px;
        height: 45px;
        font-size: 1.3rem;
        margin-bottom: 10px;
    }
    
    .btn-support {
        padding: 8px 16px;
        font-size: 0.9rem;
    }
    
    /* Newsletter mobile */
    .footer-newsletter .form-control {
        font-size: 0.85rem;
        height: 40px;
        padding: 8px 12px;
    }
    
    .btn-newsletter {
        min-width: 40px;
        padding: 0 15px;
    }
    
    /* Copyright mobile */
    .footer-links-small {
        font-size: 0.8rem;
        gap: 10px !important;
    }
    
    .footer-links-small span {
        display: none;
    }
    
    .back-to-top {
        width: 40px;
        height: 40px;
        font-size: 1.2rem;
        bottom: 15px;
        right: 15px;
    }
}

@media (max-width: 480px) {
    .footer-links-grid {
        grid-template-columns: repeat(3, 1fr);
        gap: 4px;
    }
    
    .quick-link-item {
        padding: 8px 4px;
        min-height: 65px;
    }
    
    .quick-link-item i {
        font-size: 1.1rem;
    }
    
    .quick-link-item .link-text {
        font-size: 0.7rem;
    }
    
    .footer-logo-container {
        max-width: 140px;
    }
    
    .support-section {
        padding: 12px;
    }
    
    .support-icon {
        width: 40px;
        height: 40px;
        font-size: 1.2rem;
    }
    
    .btn-support {
        font-size: 0.85rem;
        padding: 7px 14px;
    }
    
    .footer-heading {
        font-size: 0.95rem;
    }
    
    .footer-text {
        font-size: 0.85rem;
    }
}

@media (max-width: 360px) {
    .footer-links-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .quick-link-item {
        min-height: 60px;
    }
    
    .footer-logo-container {
        max-width: 120px;
    }
    
    .support-icon {
        width: 35px;
        height: 35px;
        font-size: 1.1rem;
    }
    
    .footer-heading {
        font-size: 0.9rem;
    }
}

/* Performance Optimizations */
@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        transition-duration: 0.01ms !important;
        animation-duration: 0.01ms !important;
    }
}