/* ========================================
   AURA LEADGENAI - UX ENHANCEMENTS STYLES
   ======================================== */

/* ========================================
   0. CENTRALIZED LOGO SYSTEM
   ======================================== */

/* Logo Configuration - CHANGE THESE VALUES TO UPDATE LOGO SITE-WIDE */
:root {
    --logo-path: '/images/logo.png';
    --logo-height-desktop: 50px;  /* Appropriate size for 512x512 source */
    --logo-height-mobile: 40px;   /* Mobile size */
    --logo-width: auto; /* auto maintains aspect ratio */
}

/* Logo Image Styling */
.logo-image,
.site-logo,
.nav-logo {
    height: var(--logo-height-desktop);
    width: var(--logo-width);
    object-fit: contain;
    display: inline-block;
    vertical-align: middle;
    transition: transform 0.3s ease, opacity 0.3s ease;
}

.logo-image:hover,
.site-logo:hover,
.nav-logo:hover {
    transform: scale(1.05);
    opacity: 0.9;
}

/* Mobile Logo Sizing */
@media (max-width: 768px) {
    .logo-image,
    .site-logo,
    .nav-logo {
        height: var(--logo-height-mobile);
    }
}

/* Logo Container (for text + image combos) */
.logo-container {
    display: flex;
    align-items: center;
    gap: 12px;
    text-decoration: none;
}

.logo-container:hover {
    text-decoration: none;
}

/* Logo Text (if used alongside image) */
.logo-text {
    font-size: 1.5rem;
    font-weight: 800;
    background: linear-gradient(135deg, #60A5FA 0%, #C4B5FD 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

@media (max-width: 768px) {
    .logo-text {
        font-size: 1.25rem;
    }
}

/* ========================================
   1. MOBILE HAMBURGER MENU
   ======================================== */
.hamburger {
    display: none;
    flex-direction: column;
    gap: 5px;
    background: none;
    border: none;
    cursor: pointer;
    padding: 8px;
    z-index: 1001;
    transition: transform 0.3s ease;
}

.hamburger span {
    width: 25px;
    height: 3px;
    background: var(--text-dark, #0F172A);
    border-radius: 3px;
    transition: all 0.3s ease;
}

.hamburger.active span:nth-child(1) {
    transform: rotate(45deg) translate(8px, 8px);
}

.hamburger.active span:nth-child(2) {
    opacity: 0;
}

.hamburger.active span:nth-child(3) {
    transform: rotate(-45deg) translate(7px, -7px);
}

.mobile-menu {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100vh;
    background: rgba(0, 0, 0, 0.5);
    backdrop-filter: blur(5px);
    z-index: 999;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
}

.mobile-menu.active {
    opacity: 1;
    visibility: visible;
}

.mobile-menu-content {
    position: absolute;
    top: 0;
    right: 0;
    width: 80%;
    max-width: 400px;
    height: 100vh;
    background: white;
    padding: 6rem 2rem 2rem;
    transform: translateX(100%);
    transition: transform 0.3s ease;
    overflow-y: auto;
    box-shadow: -5px 0 20px rgba(0, 0, 0, 0.1);
}

.mobile-menu.active .mobile-menu-content {
    transform: translateX(0);
}

.mobile-menu .nav-links {
    display: flex !important;
    flex-direction: column;
    gap: 1.5rem;
    margin-bottom: 2rem;
}

.mobile-menu .nav-links li {
    list-style: none;
}

.mobile-menu .nav-links a {
    font-size: 1.1rem;
    font-weight: 500;
    color: var(--text-dark, #0F172A);
    text-decoration: none;
    display: block;
    padding: 0.5rem 0;
    transition: color 0.3s;
}

.mobile-menu .nav-links a:hover {
    color: var(--primary, #60A5FA);
}

.mobile-menu .nav-cta {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.mobile-menu .nav-cta .btn {
    width: 100%;
    text-align: center;
}

body.menu-open {
    overflow: hidden;
}

@media (max-width: 768px) {
    .hamburger {
        display: flex;
    }
}

/* ========================================
   2. TOAST NOTIFICATIONS
   ======================================== */
.toast-container {
    position: fixed;
    top: 20px;
    right: 20px;
    z-index: 10000;
    display: flex;
    flex-direction: column;
    gap: 10px;
    pointer-events: none;
}

.toast {
    background: white;
    border-radius: 12px;
    padding: 1rem 1.25rem;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.15);
    display: flex;
    align-items: center;
    gap: 12px;
    min-width: 300px;
    max-width: 400px;
    opacity: 0;
    transform: translateX(400px);
    transition: all 0.3s cubic-bezier(0.68, -0.55, 0.265, 1.55);
    pointer-events: all;
    border-left: 4px solid;
}

.toast.show {
    opacity: 1;
    transform: translateX(0);
}

.toast-icon {
    font-size: 1.5rem;
    flex-shrink: 0;
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    font-weight: bold;
}

.toast-message {
    flex: 1;
    font-size: 0.95rem;
    color: var(--text-dark, #0F172A);
    line-height: 1.4;
}

.toast-close {
    background: none;
    border: none;
    font-size: 1.5rem;
    color: var(--text-light, #64748B);
    cursor: pointer;
    padding: 0;
    width: 24px;
    height: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 4px;
    transition: all 0.2s;
}

.toast-close:hover {
    background: rgba(0, 0, 0, 0.05);
    color: var(--text-dark, #0F172A);
}

.toast-success {
    border-left-color: #34D399;
}

.toast-success .toast-icon {
    background: #D1FAE5;
    color: #059669;
}

.toast-error {
    border-left-color: #F87171;
}

.toast-error .toast-icon {
    background: #FEE2E2;
    color: #DC2626;
}

.toast-info {
    border-left-color: #60A5FA;
}

.toast-info .toast-icon {
    background: #DBEAFE;
    color: #2563EB;
}

.toast-warning {
    border-left-color: #FBBF24;
}

.toast-warning .toast-icon {
    background: #FEF3C7;
    color: #D97706;
}

@media (max-width: 768px) {
    .toast-container {
        top: 10px;
        right: 10px;
        left: 10px;
    }

    .toast {
        min-width: auto;
        max-width: 100%;
    }
}

/* ========================================
   3. FORM LOADING STATES
   ======================================== */
button.loading,
input[type="submit"].loading {
    position: relative;
    color: transparent !important;
    pointer-events: none;
}

.spinner {
    display: inline-block;
    width: 16px;
    height: 16px;
    border: 2px solid rgba(255, 255, 255, 0.3);
    border-top-color: white;
    border-radius: 50%;
    animation: spin 0.6s linear infinite;
    position: absolute;
    left: 50%;
    top: 50%;
    transform: translate(-50%, -50%);
}

@keyframes spin {
    to { transform: translate(-50%, -50%) rotate(360deg); }
}

button.loading span:not(.spinner),
input[type="submit"].loading span:not(.spinner) {
    opacity: 0;
}

/* ========================================
   4. EXIT-INTENT POPUP
   ======================================== */
.exit-intent-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100vh;
    background: rgba(0, 0, 0, 0.6);
    backdrop-filter: blur(5px);
    z-index: 9999;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
    padding: 1rem;
}

.exit-intent-overlay.show {
    opacity: 1;
    visibility: visible;
}

.exit-intent-popup {
    background: white;
    border-radius: 20px;
    padding: 3rem 2.5rem;
    max-width: 500px;
    width: 100%;
    position: relative;
    transform: scale(0.9);
    transition: transform 0.3s cubic-bezier(0.68, -0.55, 0.265, 1.55);
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
}

.exit-intent-overlay.show .exit-intent-popup {
    transform: scale(1);
}

.exit-intent-close {
    position: absolute;
    top: 1rem;
    right: 1rem;
    background: none;
    border: none;
    font-size: 2rem;
    color: var(--text-light, #64748B);
    cursor: pointer;
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    transition: all 0.2s;
}

.exit-intent-close:hover {
    background: rgba(0, 0, 0, 0.05);
    color: var(--text-dark, #0F172A);
}

.exit-intent-content h2 {
    font-size: 2rem;
    margin-bottom: 1rem;
    color: var(--text-dark, #0F172A);
    line-height: 1.2;
}

.exit-intent-content p {
    font-size: 1.1rem;
    color: var(--text-gray, #475569);
    margin-bottom: 1.5rem;
    line-height: 1.6;
}

.exit-intent-benefits {
    list-style: none;
    margin: 1.5rem 0;
    padding: 0;
}

.exit-intent-benefits li {
    padding: 0.75rem 0;
    font-size: 1rem;
    color: var(--text-gray, #475569);
    border-bottom: 1px solid var(--border, #E2E8F0);
}

.exit-intent-benefits li:last-child {
    border-bottom: none;
}

.exit-intent-cta {
    display: block;
    width: 100%;
    background: linear-gradient(135deg, #93C5FD 0%, #C4B5FD 100%);
    color: white;
    text-align: center;
    padding: 1rem 2rem;
    border-radius: 12px;
    text-decoration: none;
    font-weight: 600;
    font-size: 1.1rem;
    transition: all 0.3s;
    box-shadow: 0 4px 15px rgba(147, 197, 253, 0.3);
}

.exit-intent-cta:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 25px rgba(147, 197, 253, 0.4);
}

.exit-intent-footer {
    font-size: 0.9rem !important;
    color: var(--text-light, #64748B) !important;
    text-align: center;
    margin-top: 1rem !important;
    margin-bottom: 0 !important;
}

/* ========================================
   5. SOCIAL PROOF WIDGET
   ======================================== */
.social-proof-widget {
    position: fixed;
    bottom: 20px;
    left: 20px;
    background: white;
    border-radius: 12px;
    padding: 1rem 1.25rem;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.15);
    max-width: 320px;
    z-index: 9998;
    opacity: 0;
    transform: translateY(100px);
    transition: all 0.4s cubic-bezier(0.68, -0.55, 0.265, 1.55);
    border-left: 4px solid #34D399;
}

.social-proof-widget.show {
    opacity: 1;
    transform: translateY(0);
}

.social-proof-content {
    display: flex;
    align-items: center;
    gap: 12px;
}

.social-proof-avatar {
    width: 40px;
    height: 40px;
    background: linear-gradient(135deg, #93C5FD 0%, #C4B5FD 100%);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.25rem;
    flex-shrink: 0;
}

.social-proof-text {
    flex: 1;
    font-size: 0.9rem;
    line-height: 1.4;
    color: var(--text-gray, #475569);
}

.social-proof-text strong {
    color: var(--text-dark, #0F172A);
    font-weight: 600;
    display: block;
}

.social-proof-time {
    font-size: 0.8rem;
    color: var(--text-light, #64748B);
    display: block;
    margin-top: 2px;
}

@media (max-width: 768px) {
    .social-proof-widget {
        bottom: 10px;
        left: 10px;
        right: 10px;
        max-width: calc(100% - 20px);
    }
}

/* ========================================
   6. SCROLL TO TOP BUTTON
   ======================================== */
.scroll-to-top {
    position: fixed;
    bottom: 30px;
    right: 30px;
    width: 50px;
    height: 50px;
    background: linear-gradient(135deg, #93C5FD 0%, #C4B5FD 100%);
    color: white;
    border: none;
    border-radius: 50%;
    font-size: 1.5rem;
    cursor: pointer;
    opacity: 0;
    visibility: hidden;
    transform: scale(0);
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(147, 197, 253, 0.3);
    z-index: 9997;
    display: flex;
    align-items: center;
    justify-content: center;
}

.scroll-to-top.show {
    opacity: 1;
    visibility: visible;
    transform: scale(1);
}

.scroll-to-top:hover {
    transform: scale(1.1);
    box-shadow: 0 6px 25px rgba(147, 197, 253, 0.4);
}

.scroll-to-top:active {
    transform: scale(0.95);
}

@media (max-width: 768px) {
    .scroll-to-top {
        bottom: 80px;
        right: 20px;
        width: 45px;
        height: 45px;
        font-size: 1.25rem;
    }
}

/* ========================================
   7. ACCESSIBILITY IMPROVEMENTS
   ======================================== */
/* Focus indicators for keyboard navigation */
a:focus-visible,
button:focus-visible,
input:focus-visible,
textarea:focus-visible,
select:focus-visible {
    outline: 3px solid var(--primary, #60A5FA);
    outline-offset: 2px;
}

/* Skip to main content link */
.skip-to-main {
    position: absolute;
    top: -100px;
    left: 0;
    background: var(--primary, #60A5FA);
    color: white;
    padding: 0.75rem 1.5rem;
    text-decoration: none;
    z-index: 10001;
    border-radius: 0 0 8px 0;
    font-weight: 600;
    transition: top 0.3s;
}

.skip-to-main:focus {
    top: 0;
}

/* Reduced motion for users who prefer it */
@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
}

