/**
 * Aurora Components - Reusable UI Components
 * Enterprise-grade button, card, and navigation components
 */

/* ===== Buttons ===== */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: var(--space-2);
    padding: var(--space-3) var(--space-6);
    border-radius: var(--radius-md);
    font-weight: var(--font-semibold);
    font-size: var(--text-base);
    line-height: 1;
    transition: all var(--transition-base);
    cursor: pointer;
    border: none;
    text-decoration: none;
    white-space: nowrap;
    user-select: none;
}

.btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

/* Primary Button */
.btn-primary {
    background: var(--aurora-primary);
    color: var(--aurora-text-inverse);
    box-shadow: var(--shadow-md);
}

.btn-primary:hover:not(:disabled) {
    background: var(--aurora-primary-dark);
    box-shadow: var(--shadow-lg);
    transform: translateY(-1px);
}

.btn-primary:active:not(:disabled) {
    transform: translateY(0);
    box-shadow: var(--shadow-sm);
}

/* Secondary Button (Glass Gradient) */
.btn-secondary {
    background: rgba(255, 255, 255, 0.03);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    color: #fff;
    border: 2px solid transparent;
    border-radius: var(--radius-md);
    background-image: linear-gradient(rgba(15, 23, 42, 0.4), rgba(15, 23, 42, 0.4)),
        linear-gradient(135deg, var(--aurora-primary), var(--aurora-accent));
    background-origin: border-box;
    background-clip: padding-box, border-box;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.3);
    transition: all var(--transition-base);
}

.btn-secondary:hover:not(:disabled) {
    background-image: linear-gradient(rgba(168, 85, 247, 0.1), rgba(236, 72, 153, 0.1)),
        linear-gradient(135deg, var(--aurora-primary), var(--aurora-accent));
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(168, 85, 247, 0.3);
    filter: brightness(1.1);
}

/* Helper for Gradient Text */
.text-gradient {
    background: linear-gradient(135deg, var(--aurora-primary), var(--aurora-accent));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

/* Accent Button */
.btn-accent {
    background: var(--aurora-gradient-primary);
    color: var(--aurora-text-inverse);
    box-shadow: var(--shadow-md);
}

.btn-accent:hover:not(:disabled) {
    box-shadow: var(--shadow-lg), var(--shadow-glow);
    transform: translateY(-1px);
}

/* Outline Button */
.btn-outline {
    background: transparent;
    color: var(--aurora-text-primary);
    border: 1px solid var(--aurora-border);
    box-shadow: none;
}

.btn-outline:hover:not(:disabled) {
    background: var(--aurora-surface);
    border-color: var(--aurora-primary);
    color: var(--aurora-primary);
}


/* Button Sizes */
.btn-sm {
    padding: var(--space-2) var(--space-4);
    font-size: var(--text-sm);
}

.btn-lg {
    padding: var(--space-4) var(--space-8);
    font-size: var(--text-lg);
}

/* ===== Cards ===== */
.card {
    background: var(--aurora-surface);
    border: 1px solid var(--aurora-border);
    border-radius: var(--radius-lg);
    padding: var(--space-6);
    box-shadow: var(--shadow-sm);
    transition: all var(--transition-base);
}

.card:hover {
    box-shadow: var(--shadow-md);
    border-color: var(--aurora-primary-light);
}

.card-interactive {
    cursor: pointer;
}

.card-interactive:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-lg);
}

.card-header {
    margin-bottom: var(--space-4);
    padding-bottom: var(--space-4);
    border-bottom: 1px solid var(--aurora-border);
}

.card-title {
    font-size: var(--text-xl);
    font-weight: var(--font-bold);
    color: var(--aurora-text-primary);
    margin-bottom: var(--space-2);
}

.card-description {
    font-size: var(--text-sm);
    color: var(--aurora-text-secondary);
}

/* ===== Glassmorphism & Modern Auth ===== */
.glass-panel {
    background: rgba(255, 255, 255, 0.05);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border: 1px solid rgba(255, 255, 255, 0.1);
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.2);
    border-radius: var(--radius-2xl);
    padding: var(--space-8) var(--space-10);
    transition: all var(--transition-base);
}

.glass-panel:hover {
    border-color: rgba(255, 255, 255, 0.2);
    box-shadow: 0 12px 40px rgba(0, 0, 0, 0.3);
}

/* Darker inputs for glass forms */
.glass-panel .form-input,
.glass-panel .form-textarea {
    background: rgba(0, 0, 0, 0.2);
    border-color: rgba(255, 255, 255, 0.1);
    color: white;
}

.glass-panel .form-input:focus,
.glass-panel .form-textarea:focus {
    background: rgba(0, 0, 0, 0.4);
    border-color: var(--aurora-primary);
    box-shadow: 0 0 0 2px rgba(99, 102, 241, 0.25);
}

.glass-panel .form-label {
    color: rgba(255, 255, 255, 0.9);
}

.glass-panel h2,
.glass-panel p,
.glass-panel a {
    color: white;
}

.glass-panel .text-muted {
    color: rgba(255, 255, 255, 0.6) !important;
}

/* ===== Navigation ===== */
/* Moved to css/navbar.css */

/* ===== Footer ===== */
.footer {
    background: rgba(15, 23, 42, 0.95);
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    padding: var(--space-16) 0 var(--space-8);
    margin-top: var(--space-20);
}

.footer-content {
    display: grid;
    grid-template-columns: 2fr 1fr 1fr 1fr;
    gap: var(--space-12);
    margin-bottom: var(--space-12);
}

.footer-section h4 {
    font-size: var(--text-lg);
    font-weight: var(--font-bold);
    color: #FFFFFF !important;
    margin-bottom: var(--space-4);
    text-transform: uppercase;
    letter-spacing: 0.05em;
    text-shadow: 0 2px 10px rgba(168, 85, 247, 0.3);
}

.footer-brand {
    max-width: 350px;
}

.footer-description {
    color: var(--aurora-dark-text-secondary);
    font-size: var(--text-sm);
    line-height: 1.6;
    margin-top: var(--space-3);
    margin-bottom: var(--space-6);
    text-shadow: 0 1px 4px rgba(0, 0, 0, 0.5);
}

.footer-social {
    display: flex;
    gap: var(--space-3);
    flex-wrap: wrap;
}

.social-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    border-radius: var(--radius-md);
    background: rgba(255, 255, 255, 0.05);
    color: var(--aurora-text-secondary);
    font-size: var(--text-lg);
    transition: all var(--transition-fast);
    text-decoration: none;
}

.social-icon:hover {
    background: var(--aurora-primary);
    color: white;
    transform: translateY(-2px);
}

.footer-links {
    display: flex;
    flex-direction: column;
    gap: var(--space-3);
}

.footer-link {
    color: rgba(255, 255, 255, 0.7);
    font-size: var(--text-sm);
    text-decoration: none;
    transition: all var(--transition-fast);
    font-weight: 500;
}

.footer-link:hover {
    color: #FFFFFF;
    transform: translateX(5px);
    text-shadow: 0 0 8px rgba(168, 85, 247, 0.5);
}

.footer-bottom {
    padding-top: var(--space-8);
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    text-align: center;
}

.footer-bottom p {
    color: var(--aurora-text-tertiary);
    font-size: var(--text-sm);
}

/* Footer Responsive */
@media (max-width: 992px) {
    .footer-content {
        grid-template-columns: 1fr 1fr;
        gap: var(--space-8);
    }

    .footer-brand {
        grid-column: 1 / -1;
        max-width: 100%;
    }
}

@media (max-width: 640px) {
    .footer-content {
        grid-template-columns: 1fr;
        gap: var(--space-6);
    }

    .footer {
        padding: var(--space-12) 0 var(--space-6);
    }
}

/* ===== Container & Layout ===== */
.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 var(--space-6);
}

.container-wide {
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 var(--space-6);
}

.section {
    padding: var(--space-20) 0;
}

.section-header {
    text-align: center;
    margin-bottom: var(--space-16);
    position: relative;
    z-index: 2;
    padding: var(--space-12) var(--space-8);
    background: rgba(15, 23, 42, 0.4);
    /* Contrast protection */
    backdrop-filter: blur(10px);
    border-radius: var(--radius-2xl);
    border: 1px solid rgba(255, 255, 255, 0.05);
}

.section-title {
    font-size: var(--text-4xl);
    font-weight: var(--font-bold);
    color: var(--aurora-dark-text-primary);
    margin-bottom: var(--space-4);
    text-shadow: 0 2px 10px rgba(0, 0, 0, 0.5);
}

.section-subtitle,
.section-description {
    font-size: var(--text-lg);
    color: #ffffff;
    /* Forced pure white for maximum legibility */
    max-width: 600px;
    margin: 0 auto;
    text-shadow: 0 1px 5px rgba(0, 0, 0, 0.8);
}

/* ===== Form Elements ===== */
.form-group {
    margin-bottom: var(--space-6);
}

.form-label {
    display: block;
    font-weight: var(--font-medium);
    color: var(--aurora-text-primary);
    margin-bottom: var(--space-2);
    font-size: var(--text-sm);
}

.form-input,
.form-textarea {
    width: 100%;
    padding: var(--space-3) var(--space-4);
    border: 1px solid var(--aurora-border);
    border-radius: var(--radius-md);
    font-size: var(--text-base);
    color: var(--aurora-text-primary);
    background: var(--aurora-surface);
    transition: all var(--transition-base);
}

.form-input:focus,
.form-textarea:focus {
    outline: none;
    border-color: var(--aurora-primary);
    box-shadow: 0 0 0 3px var(--aurora-primary-50);
}

.form-input::placeholder,
.form-textarea::placeholder {
    color: var(--aurora-text-tertiary);
}

/* ===== Badges & Tags ===== */
.badge {
    display: inline-flex;
    align-items: center;
    padding: var(--space-1) var(--space-3);
    border-radius: var(--radius-full);
    font-size: var(--text-xs);
    font-weight: var(--font-semibold);
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.badge-primary {
    background: var(--aurora-primary-50);
    color: var(--aurora-primary-dark);
}

.badge-success {
    background: var(--aurora-success-light);
    color: #065F46;
}

.badge-warning {
    background: var(--aurora-warning-light);
    color: #92400E;
}

.badge-error {
    background: var(--aurora-error-light);
    color: #991B1B;
}

/* ===== Animations ===== */
@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(10px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes slideInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.animate-fade-in {
    animation: fadeIn var(--transition-slow) ease-out;
}

.animate-slide-up {
    animation: slideInUp var(--transition-slow) ease-out;
}

/* ===== Responsive Utilities ===== */
@media (max-width: 992px) {
    /* Navbar responsive styles moved to css/navbar.css */
}

/* Social Media Tooltip Styles */
.social-icon {
    position: relative;
    overflow: visible !important;
}

.social-tooltip {
    position: absolute;
    bottom: 120%;
    left: 50%;
    transform: translateX(-50%) scale(0);
    background: rgba(15, 23, 42, 0.95);
    color: #FFFFFF;
    padding: 8px 12px;
    border-radius: 6px;
    font-size: 12px;
    white-space: nowrap;
    opacity: 0;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    pointer-events: none;
    z-index: 100;
    font-weight: 500;
    border: 1px solid var(--aurora-primary);
}

.social-tooltip::after {
    content: '';
    position: absolute;
    top: 100%;
    left: 50%;
    transform: translateX(-50%);
    border: 6px solid transparent;
    border-top-color: rgba(15, 23, 42, 0.95);
}

.social-icon:hover {
    transform: translateY(-5px) scale(1.1) !important;
}

.social-icon:hover .social-tooltip {
    opacity: 1;
    transform: translateX(-50%) scale(1) translateY(-5px);
}

.social-icon:hover span {
    color: #fff;
    text-shadow: 0px -1px 0px rgba(0, 0, 0, 0.4);
}

/* ===== Visibility Improvements ===== */

/* Section Titles - High Contrast White */
.section-title {
    color: #FFFFFF !important;
    text-shadow: 0 2px 10px rgba(168, 85, 247, 0.3);
}

/* Outline Button - Better Contrast */
.btn-outline {
    background: rgba(15, 23, 42, 0.8) !important;
    color: #FFFFFF !important;
    border: 2px solid var(--aurora-primary) !important;
    backdrop-filter: blur(10px);
}

.btn-outline:hover {
    background: var(--aurora-primary) !important;
    color: #FFFFFF !important;
    transform: translateY(-2px);
}

/* Text Columns for Long Content */
.text-columns {
    padding: var(--spacing-lg);
    max-width: 1200px;
    margin: 0 auto;
}

.column-paragraph {
    columns: 200px 2;
    column-gap: 30px;
    color: rgba(255, 255, 255, 0.9);
    padding: 25px 0;
    line-height: 1.8;
    text-align: justify;
}

.column-title {
    column-span: all;
    display: block;
    color: var(--aurora-primary);
    margin-bottom: var(--spacing-md);
}

@media (max-width: 768px) {
    .column-paragraph {
        columns: 1;
    }
}

/* ===== Toast Notifications ===== */
.toast-container {
    position: fixed;
    top: 80px;
    right: 20px;
    z-index: 10000;
    display: flex;
    flex-direction: column;
    gap: var(--spacing-sm);
    pointer-events: none;
}

.toast {
    display: flex;
    align-items: center;
    gap: var(--spacing-sm);
    padding: var(--spacing-md) var(--spacing-lg);
    background: var(--aurora-bg-card);
    border-radius: var(--radius-lg);
    box-shadow: 0 15px 50px rgba(0, 0, 0, 0.8), 0 0 0 1px rgba(168, 85, 247, 0.4);
    border-left: 6px solid;
    min-width: 320px;
    max-width: 450px;
    transform: translateX(120%);
    opacity: 0;
    transition: all var(--transition-normal);
    pointer-events: auto;
    backdrop-filter: blur(20px);
}

.toast.show {
    transform: translateX(0);
    opacity: 1;
}

.toast-success {
    border-color: #10b981;
    background: linear-gradient(135deg, rgba(16, 185, 129, 0.25), rgba(10, 15, 25, 0.98));
}

.toast-error {
    border-color: #ef4444;
    background: linear-gradient(135deg, rgba(239, 68, 68, 0.25), rgba(10, 15, 25, 0.98));
}

.toast-warning {
    border-color: #f59e0b;
    background: linear-gradient(135deg, rgba(245, 158, 11, 0.25), rgba(10, 15, 25, 0.98));
}

.toast-info {
    border-color: var(--aurora-primary);
    background: linear-gradient(135deg, rgba(168, 85, 247, 0.25), rgba(10, 15, 25, 0.98));
}

.toast i:first-child {
    font-size: 20px;
    flex-shrink: 0;
}

.toast-success i:first-child {
    color: #10b981;
}

.toast-error i:first-child {
    color: #ef4444;
}

.toast-warning i:first-child {
    color: #f59e0b;
}

.toast-info i:first-child {
    color: var(--aurora-primary);
}

.toast span {
    flex: 1;
    color: #FFFFFF !important;
    font-size: 0.95rem;
    font-weight: 500;
    line-height: 1.4;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.5);
}

.toast-close {
    background: transparent;
    border: none;
    color: rgba(255, 255, 255, 0.5);
    cursor: pointer;
    padding: 4px;
    transition: color var(--transition-fast);
    flex-shrink: 0;
    border-radius: var(--radius-sm);
}

.toast-close:hover {
    color: rgba(255, 255, 255, 1);
    background: rgba(255, 255, 255, 0.1);
}

@media (max-width: 768px) {
    .toast-container {
        left: 10px;
        right: 10px;
        top: 70px;
    }

    .toast {
        min-width: auto;
        max-width: 100%;
    }
}

/* ===== Loading States ===== */
.btn.loading {
    position: relative;
    color: transparent !important;
    pointer-events: none;
    cursor: not-allowed;
}

.btn.loading::after {
    content: '';
    position: absolute;
    width: 16px;
    height: 16px;
    top: 50%;
    left: 50%;
    margin-left: -8px;
    margin-top: -8px;
    border: 2px solid rgba(255, 255, 255, 0.3);
    border-top-color: #ffffff;
    border-radius: 50%;
    animation: spin 0.6s linear infinite;
}

@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}

.btn.loading:disabled {
    opacity: 0.8;
}


/* ===== Modal Component ===== */
.modal {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 9999;
    display: none;
    justify-content: center;
    align-items: center;
    padding: var(--spacing-lg);
}

.modal.active {
    display: flex;
}

.modal-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.75);
    backdrop-filter: blur(8px);
    cursor: pointer;
}

.modal-content {
    position: relative;
    background: var(--aurora-bg-card);
    border-radius: var(--radius-lg);
    padding: var(--spacing-2xl);
    max-width: 480px;
    width: 100%;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.5);
    border: 1px solid rgba(168, 85, 247, 0.2);
    z-index: 1;
    animation: modalSlideIn 0.3s ease-out;
}

@keyframes modalSlideIn {
    from {
        opacity: 0;
        transform: translateY(-30px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.modal-close {
    position: absolute;
    top: var(--spacing-md);
    right: var(--spacing-md);
    background: transparent;
    border: none;
    color: rgba(255, 255, 255, 0.6);
    font-size: 20px;
    cursor: pointer;
    padding: 8px;
    transition: all var(--transition-fast);
    border-radius: var(--radius-sm);
}

.modal-close:hover {
    color: rgba(255, 255, 255, 1);
    background: rgba(255, 255, 255, 0.1);
    transform: rotate(90deg);
}

.modal h2 {
    font-size: var(--text-2xl);
    margin-bottom: var(--spacing-md);
    color: var(--aurora-text-primary);
    font-weight: 700;
}

.modal-description {
    color: var(--aurora-text-secondary);
    margin-bottom: var(--spacing-xl);
    line-height: 1.6;
}

@media (max-width: 768px) {
    .modal-content {
        margin: var(--spacing-lg);
        padding: var(--spacing-xl);
    }
}