/* ============================================================================
   IMPROVED FOOTER STYLES - TakniX Solution
   Better spacing, visual hierarchy and modern layout
   ============================================================================ */

/* CSS Variables for Footer */
:root {
    --footer-bg: #1f2937;
    --footer-text: #d1d5db;
    --footer-text-light: #9ca3af;
    --footer-heading: #ffffff;
    --footer-accent: #2563eb;
    --footer-accent-hover: #1d4ed8;
    --footer-border: #374151;
    --footer-card-bg: #374151;
    --newsletter-bg: linear-gradient(135deg, #2563eb 0%, #1d4ed8 100%);
    --emergency-bg: linear-gradient(135deg, #dc2626, #b91c1c);
    --social-facebook: #4267B2;
    --social-twitter: #1DA1F2;
    --social-instagram: linear-gradient(45deg, #f09433, #e6683c, #dc2743, #cc2366, #bc1888);
    --social-linkedin: #0077B5;
    --social-whatsapp: #25D366;
}

/* Newsletter Section - Improved */
.newsletter-section {
    background: var(--newsletter-bg);
    color: white;
    padding: 3rem 0;
    position: relative;
    overflow: hidden;
    margin-top: 4rem;
}

.newsletter-section::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-image: radial-gradient(circle at 25px 25px, rgba(255,255,255,0.08) 2px, transparent 2px);
    background-size: 50px 50px;
    animation: backgroundMove 20s ease-in-out infinite;
}

@keyframes backgroundMove {
    0%, 100% { transform: translateX(0) translateY(0); }
    50% { transform: translateX(25px) translateY(25px); }
}

.newsletter-content {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 2.5rem;
    align-items: center;
    position: relative;
    z-index: 2;
    max-width: 1000px;
    margin: 0 auto;
}

.newsletter-info h3 {
    font-size: 1.875rem;
    font-weight: 700;
    color: white;
    margin-bottom: 1rem;
    line-height: 1.2;
}

.newsletter-info p {
    font-size: 1rem;
    color: rgba(255, 255, 255, 0.9);
    margin-bottom: 1.5rem;
    line-height: 1.6;
}

.newsletter-stats {
    display: flex;
    gap: 1.5rem;
    margin-top: 1rem;
}

.stat-item {
    text-align: center;
    flex: 1;
}

.stat-number {
    display: block;
    font-size: 1.25rem;
    font-weight: 700;
    color: #fbbf24;
    margin-bottom: 0.25rem;
}

.stat-label {
    font-size: 0.75rem;
    color: rgba(255, 255, 255, 0.8);
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.newsletter-form {
    max-width: 400px;
}

.input-group {
    display: flex;
    gap: 0.75rem;
    margin-bottom: 0.75rem;
}

.newsletter-input {
    flex: 1;
    padding: 0.875rem 1rem;
    border: 2px solid rgba(255, 255, 255, 0.2);
    border-radius: 0.5rem;
    background: rgba(255, 255, 255, 0.1);
    color: white;
    font-size: 0.9rem;
    backdrop-filter: blur(10px);
    transition: all 0.3s ease;
}

.newsletter-input::placeholder {
    color: rgba(255, 255, 255, 0.7);
}

.newsletter-input:focus {
    outline: none;
    border-color: rgba(255, 255, 255, 0.5);
    background: rgba(255, 255, 255, 0.15);
    box-shadow: 0 0 0 3px rgba(255, 255, 255, 0.1);
}

.newsletter-btn {
    background: white;
    color: var(--footer-accent);
    border: 2px solid white;
    padding: 0.875rem 1.5rem;
    border-radius: 0.5rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    white-space: nowrap;
    font-size: 0.9rem;
}

.newsletter-btn:hover {
    background: transparent;
    color: white;
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.2);
}

.newsletter-disclaimer {
    font-size: 0.75rem;
    color: rgba(255, 255, 255, 0.7);
    margin: 0;
    text-align: left;
}

/* Main Footer - Improved Spacing */
.footer {
    background: var(--footer-bg);
    color: var(--footer-text);
    padding: 1.5rem 0 0;
    margin-top: 0;
}

.footer-content {
    display: grid;
    grid-template-columns: 1.8fr repeat(3, 1fr) 1.3fr;
    gap: 2.5rem;
    margin-bottom: 2.5rem;
    max-width: 1200px;
    margin-left: auto;
    margin-right: auto;
}

/* Company Info Section - Better Spacing */
.company-info {
    padding-right: 1rem;
}

.footer-logo {
    display: flex;
    align-items: center;
    gap: 0.875rem;
    margin-bottom: 1.25rem;
}

.footer-logo .logo-icon {
    width: 44px;
    height: 44px;
    background: linear-gradient(135deg, var(--footer-accent), #3b82f6);
    border-radius: 0.625rem;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 1.125rem;
    box-shadow: 0 4px 12px rgba(37, 99, 235, 0.25);
}

.footer-logo h3 {
    color: white;
    font-size: 1.375rem;
    font-weight: 700;
    margin-bottom: 0;
    font-family: 'Poppins', sans-serif;
}

.footer-logo h3::after {
    display: none;
}

.company-description {
    color: var(--footer-text-light);
    line-height: 1.6;
    margin-bottom: 1.25rem;
    font-size: 0.9rem;
}

/* Footer Features - Condensed */
.footer-features {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
    margin-bottom: 1.5rem;
    padding: 1.25rem;
    background: rgba(37, 99, 235, 0.05);
    border-radius: 0.625rem;
    border: 1px solid rgba(37, 99, 235, 0.1);
}

.footer-feature {
    display: flex;
    align-items: center;
    gap: 0.875rem;
    color: var(--footer-text);
    font-size: 0.8rem;
    font-weight: 500;
}

.footer-feature i {
    color: var(--footer-accent);
    font-size: 1rem;
    width: 18px;
    text-align: center;
    flex-shrink: 0;
}

/* Footer Section Headers - Improved */
.footer-section h3 {
    color: var(--footer-heading);
    font-size: 1.125rem;
    font-weight: 600;
    margin-bottom: 1.25rem;
    position: relative;
    padding-bottom: 0.5rem;
}

.footer-section h3::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 30px;
    height: 2px;
    background: linear-gradient(90deg, var(--footer-accent), #10b981);
    border-radius: 1px;
}

/* Footer Links - Better Spacing */
.footer-links {
    list-style: none;
    padding: 0;
    margin: 0;
    display: flex;
    flex-direction: column;
    gap: 0.625rem;
}

.footer-links li a {
    display: flex;
    align-items: center;
    gap: 0.625rem;
    color: var(--footer-text-light);
    text-decoration: none;
    padding: 0.375rem 0.5rem;
    border-radius: 0.375rem;
    transition: all 0.3s ease;
    font-size: 0.825rem;
    font-weight: 500;
}

.footer-links li a:hover {
    color: white;
    background: rgba(37, 99, 235, 0.1);
    transform: translateX(4px);
}

.footer-links li a i {
    width: 14px;
    text-align: center;
    color: var(--footer-accent);
    opacity: 0.8;
    font-size: 0.875rem;
    flex-shrink: 0;
}

/* Contact Section - Improved Layout */
.contact-section {
    grid-column: span 1;
}

.contact-info {
    display: flex;
    flex-direction: column;
    gap: 1.25rem;
    margin-bottom: 1.5rem;
}

.contact-item {
    display: flex;
    gap: 0.875rem;
    align-items: flex-start;
}

.contact-icon {
    width: 36px;
    height: 36px;
    background: rgba(37, 99, 235, 0.1);
    border: 1px solid rgba(37, 99, 235, 0.2);
    border-radius: 0.5rem;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--footer-accent);
    font-size: 0.9rem;
    flex-shrink: 0;
}

.contact-details strong {
    color: white;
    display: block;
    margin-bottom: 0.375rem;
    font-size: 0.8rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.025em;
}

.contact-details p {
    color: var(--footer-text-light);
    margin-bottom: 0.25rem;
    font-size: 0.8rem;
    line-height: 1.4;
}

.contact-details p:last-child {
    margin-bottom: 0;
}

.contact-details a {
    color: var(--footer-text-light);
    text-decoration: none;
    transition: color 0.3s ease;
}

.contact-details a:hover {
    color: var(--footer-accent);
}

/* Emergency Support - Condensed */
.emergency-support {
    background: var(--emergency-bg);
    padding: 1.25rem;
    border-radius: 0.625rem;
    text-align: center;
    box-shadow: 0 4px 12px rgba(220, 38, 38, 0.2);
    margin-top: 1rem;
}

.emergency-support h4 {
    color: white;
    font-size: 0.9rem;
    font-weight: 600;
    margin-bottom: 0.75rem;
}

.emergency-number {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    color: white;
    text-decoration: none;
    font-size: 1rem;
    font-weight: 700;
    margin-bottom: 0.375rem;
    transition: all 0.3s ease;
}

.emergency-number:hover {
    transform: scale(1.03);
}

.emergency-support p {
    color: rgba(255, 255, 255, 0.9);
    font-size: 0.7rem;
    margin: 0;
}

/* Social Links - Improved */
.social-links {
    display: flex;
    gap: 0.875rem;
    margin-top: 1.25rem;      /* spacing between icons */
    align-items:center;
}

.social-link {
    width: 42px;
    height: 42px;
    background: var(--footer-card-bg);
    border-radius: 0.625rem;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--footer-text-light);
    text-decoration: none;
    transition: all 0.3s ease;
    border: 1px solid var(--footer-border);
    position: relative;
    overflow: hidden;
}

.social-link::before {
    content: '';
    position: absolute;
    top: 100%;
    left: 0;
    width: 100%;
    height: 100%;
    transition: top 0.3s ease;
    z-index: 1;
}

.social-link i {
    position: relative;
    z-index: 2;
    font-size: 1rem;
}

.social-link:hover {
    color: white;
    border-color: transparent;
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.25);
}

.social-link:hover::before {
    top: 0;
}

.social-link.facebook::before { background: var(--social-facebook); }
.social-link.twitter::before { background: var(--social-twitter); }
.social-link.instagram::before { background: var(--social-instagram); }
.social-link.linkedin::before { background: var(--social-linkedin); }
.social-link.whatsapp::before { background: var(--social-whatsapp); }

/* Footer Extras - Removed to reduce clutter */
.footer-extras {
    display: none;
}

/* Footer Bottom - Simplified */
.footer-bottom {
    background: #111827;
    margin: 0 -2rem -2rem -2rem;
    padding: 1.5rem 2rem;
    border-top: 1px solid var(--footer-border);
}

.footer-bottom-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 0.75rem;
    max-width: 1200px;
    margin-left: auto;
    margin-right: auto;
}

.copyright {
    color: var(--footer-text-light);
}

.copyright p {
    margin-bottom: 0.25rem;
    font-size: 0.8rem;
}

.legal-note {
    font-size: 0.7rem;
    color: #6b7280;
}

.footer-bottom-links {
    display: flex;
    align-items: center;
    gap: 0.875rem;
    flex-wrap: wrap;
}

.footer-bottom-links a {
    color: var(--footer-text-light);
    text-decoration: none;
    font-size: 0.8rem;
    transition: color 0.3s ease;
    padding: 0.25rem 0;
}

.footer-bottom-links a:hover {
    color: var(--footer-accent);
}

.separator {
    color: #6b7280;
}

/* Developer Credit */
.developer-credit {
    text-align: center;
    padding-top: 0.875rem;
    border-top: 1px solid #374151;
}

.developer-credit p {
    color: #6b7280;
    font-size: 0.8rem;
    margin: 0;
}

.developer-credit i {
    color: #ef4444;
    animation: heartbeat 1.5s ease-in-out infinite;
}

@keyframes heartbeat {
    0%, 50%, 100% { transform: scale(1); }
    25%, 75% { transform: scale(1.05); }
}

/* Back to Top Button */
.back-to-top {
    position: fixed;
    bottom: 1.5rem;
    right: 1.5rem;
    width: 50px;
    height: 50px;
    background: linear-gradient(135deg, var(--footer-accent), #1d4ed8);
    color: white;
    border: none;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    box-shadow: 0 4px 16px rgba(37, 99, 235, 0.3);
    transition: all 0.3s ease;
    z-index: 1000;
    opacity: 0;
    visibility: hidden;
    transform: translateY(100px);
}

.back-to-top.visible {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.back-to-top:hover {
    transform: translateY(-2px) scale(1.05);
    box-shadow: 0 6px 24px rgba(37, 99, 235, 0.4);
}

.back-to-top i {
    font-size: 1rem;
}

/* Notification Styles */
.notification {
    position: fixed;
    top: 2rem;
    right: 2rem;
    max-width: 380px;
    background: white;
    border-radius: 0.75rem;
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.15);
    border: 1px solid #e5e7eb;
    overflow: hidden;
    z-index: 1100;
    transform: translateX(100%);
    transition: transform 0.3s ease;
}

.notification.show {
    transform: translateX(0);
}

.notification-content {
    display: flex;
    align-items: center;
    gap: 0.875rem;
    padding: 1rem 1.25rem;
}

.notification-success {
    border-left: 4px solid #10b981;
}

.notification-success .notification-content i {
    color: #10b981;
}

.notification-close {
    position: absolute;
    top: 0.875rem;
    right: 0.875rem;
    background: none;
    border: none;
    color: #6b7280;
    cursor: pointer;
    padding: 0.25rem;
    border-radius: 0.25rem;
    transition: color 0.3s ease;
}

.notification-close:hover {
    color: #374151;
}

/* Responsive Design - Improved */
@media (max-width: 1200px) {
    .footer-content {
        grid-template-columns: 1.5fr repeat(3, 1fr) 1.2fr;
        gap: 2rem;
    }
    
    /* .footer-section:nth-child(3) {
        grid-column: span 2;
        display: grid;
        grid-template-columns: 1fr 1fr;
        gap: 2rem;
    } */
}

@media (max-width: 1024px) {
    .newsletter-content {
        grid-template-columns: 1fr;
        gap: 2rem;
        text-align: center;
    }
    
    .newsletter-stats {
        justify-content: center;
    }
    
    .footer-content {
        grid-template-columns: repeat(2, 1fr);
        gap: 2rem;
    }
    
    .contact-section {
        grid-column: span 2;
        display: grid;
        grid-template-columns: 1fr 1fr;
        gap: 2rem;
    }
}

@media (max-width: 768px) {
    .newsletter-section {
        padding: 2.5rem 0;
    }
    
    .newsletter-info h3 {
        font-size: 1.5rem;
    }
    
    .newsletter-stats {
        flex-direction: column;
        gap: 1rem;
        margin-top: 1.5rem;
    }
    
    .input-group {
        flex-direction: column;
        gap: 0.875rem;
    }
    
    .newsletter-btn {
        justify-content: center;
    }
    
    .footer {
        padding: 2.5rem 0 0;
    }
    
    .footer-content {
        grid-template-columns: 1fr;
        gap: 2rem;
    }
    
    .company-info {
        padding-right: 0;
        text-align: center;
    }
    
    .footer-features {
        padding: 1rem;
    }
    
    .social-links {
        justify-content: center;
        
    }
    
    .contact-section {
        grid-column: span 1;
        display: block;
    }
    
    .contact-info {
        gap: 1rem;
    }
    
    .contact-item {
        text-align: center;
        flex-direction: column;
        align-items: center;
    }
    
    .footer-bottom {
        margin: 0 -1rem -1rem -1rem;
        padding: 1.5rem 1rem;
    }
    
    .footer-bottom-content {
        flex-direction: column;
        gap: 1rem;
        text-align: center;
    }
    
    .footer-bottom-links {
        justify-content: center;
        flex-wrap: wrap;
    }
    
    .back-to-top {
        width: 46px;
        height: 46px;
        bottom: 1rem;
        right: 1rem;
    }
    
    .notification {
        right: 1rem;
        left: 1rem;
        max-width: none;
    }
}

@media (max-width: 480px) {
    .newsletter-section {
        padding: 2rem 0;
    }
    
    .newsletter-info h3 {
        font-size: 1.375rem;
    }
    
    .footer {
        padding: 2rem 0 0;
    }
    
    .footer-content {
        gap: 1.75rem;
    }
    
    .footer-features {
        padding: 0.875rem;
    }
    
    .footer-feature {
        gap: 0.625rem;
        font-size: 0.75rem;
    }
    
    .emergency-support {
        padding: 1rem;
    }
    
    .contact-item {
        gap: 0.75rem;
    }
    
    .contact-icon {
        width: 32px;
        height: 32px;
    }
    
    .footer-bottom {
        margin: 0 -0.875rem -0.875rem -0.875rem;
        padding: 1.25rem 0.875rem;
    }
    
    .social-links {
        gap: 0.75rem;
    }
    
    .social-link {
        width: 38px;
        height: 38px;
    }
}

/* Print Styles */
@media print {
    .newsletter-section,
    .social-links,
    .back-to-top,
    .emergency-support {
        display: none !important;
    }
    
    .footer {
        background: white !important;
        color: black !important;
        box-shadow: none !important;
        padding: 1rem 0 !important;
    }
    
    .footer-section h3,
    .footer-logo h3,
    .contact-details strong {
        color: black !important;
    }
    
    .footer-links li a,
    .contact-details p,
    .company-description {
        color: #333 !important;
    }
    
    /* .footer-content {
        grid-template-columns: repeat(3, 1fr);
        gap: 1rem;
    } */
}

/* High Contrast Mode */
@media (prefers-contrast: high) {
    .footer {
        background: #000;
        color: #fff;
    }
    
    .footer-section h3,
    .footer-logo h3 {
        color: #fff;
    }
    
    .footer-links li a:hover {
        background: #fff;
        color: #000;
    }
    
    .newsletter-input {
        border-color: rgba(255, 255, 255, 0.5);
    }
}

/* Reduced Motion */
@media (prefers-reduced-motion: reduce) {
    .newsletter-section::before,
    .back-to-top,
    .social-link,
    .footer-links li a,
    .notification {
        animation: none;
        transition: none;
    }
}

/* Focus States for Accessibility */
.newsletter-input:focus,
.newsletter-btn:focus,
.footer-links li a:focus,
.social-link:focus,
.back-to-top:focus,
.contact-details a:focus {
    outline: 2px solid var(--footer-accent);
    outline-offset: 2px;
}

/* Loading States */
.newsletter-btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    pointer-events: none;
}

.newsletter-btn.loading {
    pointer-events: none;
}

.newsletter-btn.loading i {
    animation: spin 1s linear infinite;
}

@keyframes spin {
    from { transform: rotate(0deg); }
    to { transform: rotate(360deg); }
}