
/* Global Features - Additional UI Components */

/* ============================================
   BACK TO TOP BUTTON
   ============================================ */
.back-to-top {
    position: fixed;
    bottom: 30px;
    right: 30px;
    width: 50px;
    height: 50px;
    background: linear-gradient(135deg, #8B5CF6, #EC4899);
    border: none;
    border-radius: 50%;
    color: white;
    font-size: 24px;
    cursor: pointer;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
    z-index: 9998;
    box-shadow: 0 4px 20px rgba(139, 92, 246, 0.4);
}

.back-to-top.visible {
    opacity: 1;
    visibility: visible;
}

.back-to-top:hover {
    transform: translateY(-5px);
    box-shadow: 0 6px 30px rgba(139, 92, 246, 0.6);
}

.back-to-top:active {
    transform: translateY(-2px);
}

/* ============================================
   COOKIE CONSENT BANNER
   ============================================ */
.cookie-consent {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    background: rgba(10, 14, 39, 0.98);
    backdrop-filter: blur(20px);
    border-top: 1px solid rgba(139, 92, 246, 0.3);
    padding: 1.5rem;
    z-index: 9999;
    transform: translateY(100%);
    transition: transform 0.4s ease;
}

.cookie-consent.show {
    transform: translateY(0);
}

.cookie-consent-content {
    max-width: 1200px;
    margin: 0 auto;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 2rem;
    flex-wrap: wrap;
}

.cookie-consent-text {
    flex: 1;
    min-width: 300px;
}

.cookie-consent-text h4 {
    margin-bottom: 0.5rem;
    color: var(--phoenix-purple);
}

.cookie-consent-text p {
    margin: 0;
    opacity: 0.9;
    font-size: 0.95rem;
}

.cookie-consent-text a {
    color: var(--phoenix-purple);
    text-decoration: underline;
}

.cookie-consent-buttons {
    display: flex;
    gap: 1rem;
    flex-wrap: wrap;
}

.cookie-consent-buttons .btn {
    padding: 0.75rem 1.5rem;
    white-space: nowrap;
}

/* ============================================
   NEWSLETTER POPUP
   ============================================ */
.newsletter-popup {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%) scale(0.9);
    max-width: 600px;
    width: 90%;
    background: rgba(10, 14, 39, 0.98);
    backdrop-filter: blur(20px);
    border: 1px solid rgba(139, 92, 246, 0.3);
    border-radius: 20px;
    padding: 3rem;
    z-index: 10000;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.5);
}

.newsletter-popup.show {
    opacity: 1;
    visibility: visible;
    transform: translate(-50%, -50%) scale(1);
}

.newsletter-popup-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.7);
    z-index: 9999;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
}

.newsletter-popup-overlay.show {
    opacity: 1;
    visibility: visible;
}

.newsletter-popup-close {
    position: absolute;
    top: 1rem;
    right: 1rem;
    width: 40px;
    height: 40px;
    background: rgba(255, 255, 255, 0.1);
    border: none;
    border-radius: 50%;
    color: white;
    font-size: 24px;
    cursor: pointer;
    transition: all 0.3s ease;
}

.newsletter-popup-close:hover {
    background: rgba(255, 255, 255, 0.2);
    transform: rotate(90deg);
}

.newsletter-popup-icon {
    font-size: 4rem;
    text-align: center;
    margin-bottom: 1rem;
}

.newsletter-popup h3 {
    font-size: 2rem;
    margin-bottom: 0.5rem;
    text-align: center;
    background: linear-gradient(135deg, #8B5CF6, #EC4899);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.newsletter-popup p {
    text-align: center;
    margin-bottom: 2rem;
    opacity: 0.9;
}

.newsletter-popup-form {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.newsletter-popup-form input {
    padding: 1rem;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 10px;
    color: white;
    font-size: 1rem;
}

.newsletter-popup-form input:focus {
    outline: none;
    border-color: var(--phoenix-purple);
    box-shadow: 0 0 0 3px rgba(139, 92, 246, 0.1);
}

.newsletter-popup-form button {
    padding: 1rem;
    background: linear-gradient(135deg, #8B5CF6, #EC4899);
    border: none;
    border-radius: 10px;
    color: white;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
}

.newsletter-popup-form button:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 30px rgba(139, 92, 246, 0.4);
}

.newsletter-popup-benefits {
    margin-top: 1.5rem;
    padding-top: 1.5rem;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
}

.newsletter-popup-benefits ul {
    list-style: none;
    padding: 0;
    margin: 0;
}

.newsletter-popup-benefits li {
    padding: 0.5rem 0;
    padding-left: 2rem;
    position: relative;
    opacity: 0.9;
}

.newsletter-popup-benefits li::before {
    content: '✓';
    position: absolute;
    left: 0;
    color: #22c55e;
    font-weight: bold;
}

/* ============================================
   DARK MODE TOGGLE
   ============================================ */
.theme-toggle {
    position: fixed;
    bottom: 100px;
    right: 30px;
    width: 50px;
    height: 50px;
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 50%;
    color: white;
    font-size: 24px;
    cursor: pointer;
    transition: all 0.3s ease;
    z-index: 9998;
    display: flex;
    align-items: center;
    justify-content: center;
}

.theme-toggle:hover {
    background: rgba(255, 255, 255, 0.2);
    transform: rotate(180deg);
}

/* Dark Mode Styles */
body.dark-mode {
    --bg-dark: #0A0E27;
    --text-primary: #FFFFFF;
}

body.light-mode {
    --bg-dark: #F8F9FA;
    --text-primary: #1A1F3A;
    background: #F8F9FA;
    color: #1A1F3A;
}

body.light-mode .navbar {
    background: rgba(255, 255, 255, 0.95);
    color: #1A1F3A;
}

body.light-mode .card-enhanced,
body.light-mode .service-card,
body.light-mode .pricing-card {
    background: rgba(255, 255, 255, 0.9);
    color: #1A1F3A;
}

/* ============================================
   SOCIAL SHARE BUTTONS
   ============================================ */
.social-share {
    display: flex;
    gap: 0.75rem;
    align-items: center;
}

.social-share-label {
    font-weight: 600;
    opacity: 0.8;
    margin-right: 0.5rem;
}

.social-share-button {
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 50%;
    color: white;
    text-decoration: none;
    transition: all 0.3s ease;
}

.social-share-button:hover {
    transform: translateY(-3px);
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.3);
}

.social-share-button.twitter:hover {
    background: #1DA1F2;
    border-color: #1DA1F2;
}

.social-share-button.facebook:hover {
    background: #4267B2;
    border-color: #4267B2;
}

.social-share-button.linkedin:hover {
    background: #0077B5;
    border-color: #0077B5;
}

.social-share-button.email:hover {
    background: #EA4335;
    border-color: #EA4335;
}

.social-share-button.copy:hover {
    background: #22c55e;
    border-color: #22c55e;
}

/* ============================================
   NOTIFICATION TOAST
   ============================================ */
.toast-container {
    position: fixed;
    top: 100px;
    right: 30px;
    z-index: 10001;
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.toast {
    min-width: 300px;
    max-width: 400px;
    background: rgba(10, 14, 39, 0.98);
    backdrop-filter: blur(20px);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 10px;
    padding: 1rem 1.5rem;
    display: flex;
    align-items: center;
    gap: 1rem;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
    animation: slideInRight 0.3s ease;
    transform-origin: right;
}

.toast.success {
    border-left: 4px solid #22c55e;
}

.toast.error {
    border-left: 4px solid #ef4444;
}

.toast.info {
    border-left: 4px solid #3b82f6;
}

.toast.warning {
    border-left: 4px solid #f59e0b;
}

.toast-icon {
    font-size: 24px;
    flex-shrink: 0;
}

.toast.success .toast-icon {
    color: #22c55e;
}

.toast.error .toast-icon {
    color: #ef4444;
}

.toast.info .toast-icon {
    color: #3b82f6;
}

.toast.warning .toast-icon {
    color: #f59e0b;
}

.toast-content {
    flex: 1;
}

.toast-title {
    font-weight: 600;
    margin-bottom: 0.25rem;
}

.toast-message {
    font-size: 0.9rem;
    opacity: 0.9;
}

.toast-close {
    background: none;
    border: none;
    color: white;
    font-size: 20px;
    cursor: pointer;
    opacity: 0.6;
    transition: opacity 0.3s ease;
    padding: 0;
    width: 24px;
    height: 24px;
    flex-shrink: 0;
}

.toast-close:hover {
    opacity: 1;
}

@keyframes slideInRight {
    from {
        transform: translateX(400px);
        opacity: 0;
    }
    to {
        transform: translateX(0);
        opacity: 1;
    }
}

/* ============================================
   LOADING OVERLAY
   ============================================ */
.loading-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(10, 14, 39, 0.95);
    backdrop-filter: blur(10px);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    z-index: 10002;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
}

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

.loading-spinner {
    width: 60px;
    height: 60px;
    border: 4px solid rgba(139, 92, 246, 0.2);
    border-top-color: #8B5CF6;
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
}

.loading-text {
    margin-top: 1.5rem;
    font-size: 1.1rem;
    opacity: 0.9;
}

/* ============================================
   SEARCH MODAL
   ============================================ */
.search-modal {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(10, 14, 39, 0.98);
    backdrop-filter: blur(20px);
    z-index: 10000;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
    display: flex;
    align-items: flex-start;
    justify-content: center;
    padding-top: 10vh;
}

.search-modal.show {
    opacity: 1;
    visibility: visible;
}

.search-modal-content {
    width: 90%;
    max-width: 700px;
    animation: slideDown 0.3s ease;
}

.search-modal-input {
    width: 100%;
    padding: 1.5rem 2rem;
    background: rgba(255, 255, 255, 0.1);
    border: 2px solid rgba(139, 92, 246, 0.3);
    border-radius: 15px;
    color: white;
    font-size: 1.5rem;
    transition: all 0.3s ease;
}

.search-modal-input:focus {
    outline: none;
    border-color: var(--phoenix-purple);
    box-shadow: 0 0 0 4px rgba(139, 92, 246, 0.1);
}

.search-modal-results {
    margin-top: 2rem;
    max-height: 60vh;
    overflow-y: auto;
}

.search-result-item {
    padding: 1.5rem;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 10px;
    margin-bottom: 1rem;
    cursor: pointer;
    transition: all 0.3s ease;
}

.search-result-item:hover {
    background: rgba(255, 255, 255, 0.1);
    border-color: var(--phoenix-purple);
    transform: translateX(10px);
}

.search-result-title {
    font-size: 1.2rem;
    font-weight: 600;
    margin-bottom: 0.5rem;
    color: var(--phoenix-purple);
}

.search-result-description {
    opacity: 0.8;
    line-height: 1.6;
}

.search-modal-close {
    position: absolute;
    top: 2rem;
    right: 2rem;
    width: 50px;
    height: 50px;
    background: rgba(255, 255, 255, 0.1);
    border: none;
    border-radius: 50%;
    color: white;
    font-size: 24px;
    cursor: pointer;
    transition: all 0.3s ease;
}

.search-modal-close:hover {
    background: rgba(255, 255, 255, 0.2);
    transform: rotate(90deg);
}

@keyframes slideDown {
    from {
        transform: translateY(-50px);
        opacity: 0;
    }
    to {
        transform: translateY(0);
        opacity: 1;
    }
}

/* ============================================
   RESPONSIVE DESIGN
   ============================================ */
@media (max-width: 768px) {
    .back-to-top {
        bottom: 20px;
        right: 20px;
        width: 45px;
        height: 45px;
    }

    .theme-toggle {
        bottom: 80px;
        right: 20px;
        width: 45px;
        height: 45px;
    }

    .cookie-consent-content {
        flex-direction: column;
        text-align: center;
    }

    .cookie-consent-buttons {
        justify-content: center;
        width: 100%;
    }

    .newsletter-popup {
        padding: 2rem;
    }

    .newsletter-popup h3 {
        font-size: 1.5rem;
    }

    .toast-container {
        right: 20px;
        left: 20px;
    }

    .toast {
        min-width: auto;
    }

    .search-modal-content {
        width: 95%;
    }

    .search-modal-input {
        font-size: 1.2rem;
        padding: 1rem 1.5rem;
    }

    .social-share {
        flex-wrap: wrap;
        justify-content: center;
    }
}
