/**
 * Links,Buttons and Footer UX Fixes - HIPAA Auditors
 * Comprehensive fixes for visibility and user experience
 * Version: 1.0
 */

/* ===========================================
   BUTTON VISIBILITY FIXES - CRITICAL
   =========================================== */

/* All primary buttons - ensure always visible */
.btn-primary,
.btn-primary-enterprise,
button.btn-primary,
a.btn-primary {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%) !important;
    color: #ffffff !important;
    border: none !important;
    font-weight: 600 !important;
    box-shadow: 0 4px 16px rgba(102, 126, 234, 0.4) !important;
}

.btn-primary:hover,
.btn-primary-enterprise:hover,
button.btn-primary:hover,
a.btn-primary:hover {
    background: linear-gradient(135deg, #5568d3 0%, #653a8b 100%) !important;
    transform: translateY(-2px) !important;
    box-shadow: 0 6px 20px rgba(102, 126, 234, 0.5) !important;
}

/* Secondary/Outline buttons */
.btn-secondary,
.btn-secondary-enterprise,
.btn-outline,
button.btn-secondary,
a.btn-secondary,
button.btn-outline,
a.btn-outline {
    background: rgba(255, 255, 255, 0.1) !important;
    color: var(--theme-text-primary) !important;
    border: 2px solid var(--theme-border-accent) !important;
    font-weight: 600 !important;
    backdrop-filter: blur(10px) !important;
}

.btn-secondary:hover,
.btn-secondary-enterprise:hover,
.btn-outline:hover,
button.btn-secondary:hover,
a.btn-secondary:hover,
button.btn-outline:hover,
a.btn-outline:hover {
    background: rgba(102, 126, 234, 0.15) !important;
    border-color: var(--theme-text-accent) !important;
    transform: translateY(-2px) !important;
}

/* Dark mode button adjustments */
[data-theme="dark"] .btn-outline,
[data-theme="dark"] .btn-secondary {
    color: #f8fafc !important;
    border-color: #818cf8 !important;
    background: rgba(129, 140, 248, 0.1) !important;
}

[data-theme="dark"] .btn-outline:hover,
[data-theme="dark"] .btn-secondary:hover {
    background: rgba(129, 140, 248, 0.2) !important;
    border-color: #a5b4fc !important;
}

/* CTA sections - white outline buttons on gradient backgrounds */
.cta-section .btn-outline,
.gradient-section .btn-outline,
.hero-enterprise .btn-outline {
    color: #ffffff !important;
    border-color: #ffffff !important;
    background: rgba(255, 255, 255, 0.1) !important;
}

.cta-section .btn-outline:hover,
.gradient-section .btn-outline:hover,
.hero-enterprise .btn-outline:hover {
    background: rgba(255, 255, 255, 0.2) !important;
}

/* ===========================================
   LINK VISIBILITY & HOVER STATES
   =========================================== */

/* Navigation links */
.navbar-nav .nav-link,
.nav-link,
header a,
.header-nav a {
    color: var(--theme-text-primary) !important;
    font-weight: 500 !important;
    position: relative !important;
    transition: color 0.3s ease !important;
}

.navbar-nav .nav-link:hover,
.nav-link:hover,
header a:hover,
.header-nav a:hover {
    color: var(--theme-text-accent) !important;
}

/* Add underline hover effect */
.navbar-nav .nav-link::after,
.nav-link::after {
    content: '';
    position: absolute;
    bottom: -2px;
    left: 0;
    width: 0;
    height: 2px;
    background: var(--theme-text-accent);
    transition: width 0.3s ease;
}

.navbar-nav .nav-link:hover::after,
.nav-link:hover::after {
    width: 100%;
}

/* Active nav link */
.navbar-nav .nav-link.active,
.nav-link.active {
    color: var(--theme-text-accent) !important;
    font-weight: 600 !important;
}

/* Dark mode navigation */
[data-theme="dark"] .navbar-nav .nav-link,
[data-theme="dark"] .nav-link,
[data-theme="dark"] header a,
[data-theme="dark"] .header-nav a {
    color: #f8fafc !important;
}

[data-theme="dark"] .navbar-nav .nav-link:hover,
[data-theme="dark"] .nav-link:hover,
[data-theme="dark"] header a:hover,
[data-theme="dark"] .header-nav a:hover {
    color: #818cf8 !important;
}

/* General links in content */
a:not(.btn):not(.nav-link):not(.footer-link):not(.social-link) {
    color: var(--theme-text-accent) !important;
    text-decoration: underline;
    text-decoration-color: transparent;
    transition: all 0.3s ease;
}

a:not(.btn):not(.nav-link):not(.footer-link):not(.social-link):hover {
    color: var(--premium-purple) !important;
    text-decoration-color: currentColor;
}

/* ===========================================
   FOOTER UX IMPROVEMENTS
   =========================================== */

/* Footer always dark with proper text visibility */
.footer-modern,
footer {
    background: #0f172a !important;
    color: #f8fafc !important;
    padding: 4rem 0 0 !important;
}

/* Better footer content layout */
.footer-content {
    display: grid !important;
    grid-template-columns: 2.5fr repeat(3, 1fr) 1.5fr !important;
    gap: 3rem !important;
    padding: 3rem 0 2.5rem !important;
    max-width: 1400px !important;
    margin: 0 auto !important;
}

/* Company section - more prominent */
.footer-company {
    max-width: 350px !important;
}

.footer-logo .logo-text {
    color: #f8fafc !important;
    font-size: 1.375rem !important;
    font-weight: 700 !important;
}

.footer-description {
    color: #cbd5e1 !important;
    line-height: 1.7 !important;
    margin-bottom: 1.5rem !important;
    font-size: 0.9375rem !important;
}

/* Footer titles - always visible */
.footer-title {
    color: #f8fafc !important;
    font-size: 1.125rem !important;
    font-weight: 600 !important;
    margin-bottom: 1.25rem !important;
    letter-spacing: 0.01em !important;
}

/* Footer links - better spacing and visibility */
.footer-links {
    display: flex !important;
    flex-direction: column !important;
    gap: 0.75rem !important;
}

.footer-link {
    color: #cbd5e1 !important;
    text-decoration: none !important;
    transition: all 0.3s ease !important;
    font-size: 0.9375rem !important;
    display: inline-flex !important;
    align-items: center !important;
    position: relative !important;
    padding-left: 0 !important;
}

.footer-link::before {
    content: '→';
    position: absolute;
    left: -20px;
    opacity: 0;
    transition: all 0.3s ease;
}

.footer-link:hover {
    color: #ffffff !important;
    padding-left: 20px !important;
    transform: translateX(4px) !important;
}

.footer-link:hover::before {
    opacity: 1;
    left: 0;
}

/* Social links - enhanced */
.social-link {
    background: rgba(255, 255, 255, 0.05) !important;
    color: #cbd5e1 !important;
    border: 1px solid rgba(255, 255, 255, 0.1) !important;
    transition: all 0.3s ease !important;
}

.social-link:hover {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%) !important;
    color: #ffffff !important;
    border-color: transparent !important;
    transform: translateY(-4px) scale(1.05) !important;
    box-shadow: 0 8px 16px rgba(102, 126, 234, 0.4) !important;
}

/* Contact info */
.contact-link {
    color: #cbd5e1 !important;
    transition: color 0.3s ease !important;
}

.contact-link:hover {
    color: #ffffff !important;
}

.contact-text {
    color: #cbd5e1 !important;
    line-height: 1.6 !important;
}

.contact-icon {
    color: #818cf8 !important;
}

/* Footer bottom - better balanced */
.footer-bottom {
    border-top: 1px solid rgba(255, 255, 255, 0.1) !important;
    padding: 1.75rem 0 !important;
    margin-top: 2rem !important;
}

.footer-bottom-content {
    display: flex !important;
    justify-content: space-between !important;
    align-items: center !important;
    flex-wrap: wrap !important;
    gap: 1.5rem !important;
    max-width: 1400px !important;
    margin: 0 auto !important;
}

.footer-copyright p {
    color: #94a3b8 !important;
    font-size: 0.875rem !important;
    margin: 0 !important;
}

.footer-legal {
    display: flex !important;
    gap: 2rem !important;
    flex-wrap: wrap !important;
}

.legal-link {
    color: #94a3b8 !important;
    text-decoration: none !important;
    font-size: 0.875rem !important;
    transition: color 0.3s ease !important;
}

.legal-link:hover {
    color: #f8fafc !important;
    text-decoration: underline !important;
}

/* ===========================================
   RESPONSIVE FOOTER IMPROVEMENTS
   =========================================== */

@media (max-width: 1200px) {
    .footer-content {
        grid-template-columns: 2fr 1fr 1fr 1fr !important;
        gap: 2.5rem !important;
    }

    .footer-contact {
        grid-column: 1 / -1 !important;
        max-width: none !important;
        margin-top: 1rem !important;
    }
}

@media (max-width: 1024px) {
    .footer-content {
        grid-template-columns: 1fr 1fr 1fr !important;
        gap: 2rem !important;
    }

    .footer-company {
        grid-column: 1 / -1 !important;
        max-width: 100% !important;
        margin-bottom: 1.5rem !important;
        text-align: center !important;
    }

    .footer-social {
        justify-content: center !important;
    }

    .footer-contact {
        grid-column: 1 / -1 !important;
    }
}

@media (max-width: 768px) {
    .footer-content {
        grid-template-columns: 1fr 1fr !important;
        gap: 2.5rem !important;
        padding: 2.5rem 0 2rem !important;
    }

    .footer-bottom-content {
        flex-direction: column !important;
        text-align: center !important;
        gap: 1rem !important;
    }

    .footer-legal {
        justify-content: center !important;
        gap: 1.5rem !important;
    }
}

@media (max-width: 480px) {
    .footer-content {
        grid-template-columns: 1fr !important;
        gap: 2rem !important;
        padding: 2rem 0 1.5rem !important;
    }

    .footer-section {
        text-align: center !important;
    }

    .footer-link {
        justify-content: center !important;
    }

    .footer-legal {
        flex-direction: column !important;
        gap: 0.75rem !important;
    }

    .footer-link::before {
        display: none !important;
    }

    .footer-link:hover {
        padding-left: 0 !important;
    }
}

/* ===========================================
   BUTTON SIZE & PADDING IMPROVEMENTS
   =========================================== */

.btn,
.btn-enterprise,
button,
a.button,
a.btn {
    padding: 0.875rem 2rem !important;
    font-size: 1rem !important;
    font-weight: 600 !important;
    border-radius: 12px !important;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1) !important;
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    gap: 0.5rem !important;
    text-decoration: none !important;
    cursor: pointer !important;
    border: none !important;
}

.btn-lg,
.btn-enterprise.btn-lg {
    padding: 1.125rem 2.5rem !important;
    font-size: 1.125rem !important;
}

.btn-sm,
.btn-enterprise.btn-sm {
    padding: 0.625rem 1.5rem !important;
    font-size: 0.875rem !important;
}

/* ===========================================
   FOCUS STATES FOR ACCESSIBILITY
   =========================================== */

.btn:focus,
.nav-link:focus,
.footer-link:focus,
.social-link:focus,
.legal-link:focus,
.contact-link:focus,
a:focus {
    outline: 2px solid var(--theme-text-accent) !important;
    outline-offset: 2px !important;
    box-shadow: 0 0 0 4px rgba(102, 126, 234, 0.2) !important;
}

[data-theme="dark"] .btn:focus,
[data-theme="dark"] .nav-link:focus,
[data-theme="dark"] a:focus {
    outline-color: #818cf8 !important;
    box-shadow: 0 0 0 4px rgba(129, 140, 248, 0.2) !important;
}

/* ===========================================
   LINK ICON ENHANCEMENTS
   =========================================== */

/* Add subtle icon indicators for external links */
a[href^="http"]:not([href*="hipaaauditors.com"])::after {
    content: '↗';
    display: inline-block;
    margin-left: 0.25rem;
    font-size: 0.875em;
    opacity: 0.7;
}

/* Footer contact icons enhanced */
.contact-item {
    transition: transform 0.3s ease !important;
}

.contact-item:hover {
    transform: translateX(4px) !important;
}

.contact-item:hover .contact-icon {
    color: #a5b4fc !important;
}

/* ===========================================
   COOKIE BANNER FIXES (if present)
   =========================================== */

.cookie-banner button,
.cookie-consent button {
    min-width: 120px !important;
}

.cookie-banner .btn-primary,
.cookie-consent .btn-primary {
    background: linear-gradient(135deg, #10b981 0%, #059669 100%) !important;
}

.cookie-banner .btn-secondary,
.cookie-consent .btn-secondary {
    background: rgba(0, 0, 0, 0.05) !important;
    color: #0f172a !important;
    border: 1px solid #e2e8f0 !important;
}

[data-theme="dark"] .cookie-banner .btn-secondary,
[data-theme="dark"] .cookie-consent .btn-secondary {
    background: rgba(255, 255, 255, 0.05) !important;
    color: #f8fafc !important;
    border: 1px solid rgba(255, 255, 255, 0.2) !important;
}

/* ===========================================
   PRINT STYLES
   =========================================== */

@media print {
    .footer-modern {
        background: white !important;
        color: black !important;
        border-top: 2px solid black !important;
    }

    .footer-link,
    .legal-link,
    .contact-link {
        color: black !important;
    }

    .social-link {
        display: none !important;
    }
}