/* Custom styles for Linkwire */

html {
    scroll-behavior: smooth;
}

/* Body and general styles */
body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    line-height: 1.6;
    padding-top: 80px; /* Account for fixed navbar */
    background: linear-gradient(135deg, #667eea 0%, #764ba2 25%, #f093fb 50%, #f5576c 75%, #4facfe 100%);
    background-attachment: fixed;
    min-height: 100vh;
    color: #495057;
    overflow-x: hidden;
    position: relative;
}

body::before {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 100 100"><circle cx="20" cy="20" r="1" fill="rgba(255,255,255,0.1)"/><circle cx="80" cy="80" r="1" fill="rgba(255,255,255,0.1)"/><circle cx="40" cy="60" r="1" fill="rgba(255,255,255,0.1)"/><circle cx="60" cy="40" r="1" fill="rgba(255,255,255,0.1)"/><circle cx="50" cy="10" r="1" fill="rgba(255,255,255,0.1)"/></svg>');
    opacity: 0.5;
    animation: twinkle 4s ease-in-out infinite alternate;
    z-index: -1;
}

@keyframes twinkle {
    0% { opacity: 0.3; }
    100% { opacity: 0.7; }
}

/* Floating animations */
@keyframes float {
    0%, 100% { transform: translateY(0px); }
    50% { transform: translateY(-10px); }
}

@keyframes pulse {
    0% { transform: scale(1); }
    50% { transform: scale(1.05); }
    100% { transform: scale(1); }
}

@keyframes rotate {
    from { transform: rotate(0deg); }
    to { transform: rotate(360deg); }
}

.float-animation {
    animation: float 3s ease-in-out infinite;
}

.pulse-animation {
    animation: pulse 2s ease-in-out infinite;
}

.rotate-animation {
    animation: rotate 4s linear infinite;
}

/* Enhanced Typography */
h1, h2, h3, h4, h5, h6 {
    font-weight: 700;
    color: #2c3e50;
    text-shadow: 0 1px 2px rgba(0,0,0,0.1);
}

.display-4 {
    font-size: 3.5rem;
    font-weight: 300;
    line-height: 1.2;
    margin-bottom: 1rem;
    background: linear-gradient(135deg, #007bff 0%, #28a745 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.lead {
    font-size: 1.25rem;
    font-weight: 400;
    color: #6c757d;
    line-height: 1.6;
}

/* Enhanced Sections */
section {
    padding: 5rem 0;
    position: relative;
}

section:nth-child(even) {
    background: rgba(255, 255, 255, 0.8);
    backdrop-filter: blur(10px);
}

section:nth-child(odd) {
    background: rgba(248, 249, 250, 0.8);
    backdrop-filter: blur(10px);
}

/* Hero Section Enhancements */
.hero {
    min-height: 70vh;
    display: flex;
    align-items: center;
    position: relative;
    overflow: hidden;
    background: linear-gradient(135deg, rgba(0, 123, 191, 0.9) 0%, rgba(40, 167, 69, 0.9) 100%) !important;
    color: white !important;
}

.hero .text-white {
    color: white !important;
}

.hero .display-4 {
    -webkit-text-fill-color: white !important;
    background: none !important;
    color: white !important;
}

.hero .lead {
    color: white !important;
}

.hero::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 1000 1000"><defs><pattern id="grain" width="100" height="100" patternUnits="userSpaceOnUse"><circle cx="25" cy="25" r="1" fill="%23ffffff" opacity="0.1"/><circle cx="75" cy="75" r="1" fill="%23ffffff" opacity="0.1"/><circle cx="50" cy="10" r="0.5" fill="%23ffffff" opacity="0.1"/></pattern></defs><rect width="1000" height="1000" fill="url(%23grain)"/></svg>');
    pointer-events: none;
}

/* Enhanced Cards */
.card {
    border: none;
    border-radius: 15px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.1);
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    overflow: hidden;
    position: relative;
}

.card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: linear-gradient(90deg, #007bff, #28a745, #ffc107);
    transform: scaleX(0);
    transition: transform 0.3s ease;
}

.card:hover::before {
    transform: scaleX(1);
}

.card:hover {
    transform: translateY(-15px) scale(1.02);
    box-shadow: 0 20px 40px rgba(0,0,0,0.15);
}

.card-body {
    padding: 2rem;
}

/* Enhanced Buttons */
.btn {
    border-radius: 25px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.btn::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 0;
    height: 0;
    background: rgba(255, 255, 255, 0.2);
    border-radius: 50%;
    transform: translate(-50%, -50%);
    transition: width 0.6s, height 0.6s;
}

.btn:hover::before {
    width: 300px;
    height: 300px;
}

.btn-primary {
    background: linear-gradient(135deg, #007bff 0%, #0056b3 100%);
    border: none;
    box-shadow: 0 4px 15px rgba(0, 123, 191, 0.3);
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(0, 123, 191, 0.4);
}

.btn-success {
    background: linear-gradient(135deg, #28a745 0%, #1e7e34 100%);
    border: none;
    box-shadow: 0 4px 15px rgba(40, 167, 69, 0.3);
}

.btn-success:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(40, 167, 69, 0.4);
}

/* List Enhancements */
.list-unstyled li {
    padding: 0.5rem 0;
    border-bottom: 1px solid rgba(0,0,0,0.05);
    transition: all 0.3s ease;
}

.list-unstyled li:hover {
    padding-left: 1rem;
    background: rgba(0, 123, 191, 0.05);
    border-radius: 8px;
}

/* Image Enhancements */
.img-fluid {
    border-radius: 10px;
    transition: transform 0.3s ease;
}

.img-fluid:hover {
    transform: scale(1.05);
}

/* Container Enhancements */
.container {
    max-width: 1200px;
}

/* Section Headers */
section h2, section h3 {
    position: relative;
    margin-bottom: 2rem;
}

section h2::after, section h3::after {
    content: '';
    position: absolute;
    bottom: -10px;
    left: 50%;
    transform: translateX(-50%);
    width: 80px;
    height: 3px;
    background: linear-gradient(90deg, #007bff, #28a745);
    border-radius: 2px;
}

/* Stats Cards */
.bg-primary, .bg-success, .bg-info, .bg-warning {
    position: relative;
    overflow: hidden;
}

.bg-primary::before {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: linear-gradient(45deg, transparent, rgba(255,255,255,0.1), transparent);
    transform: rotate(45deg);
    transition: all 0.5s ease;
}

.bg-primary h2, .bg-primary p, .bg-primary .btn {
    color: white !important;
}

.bg-primary:hover::before {
    animation: shimmer 1.5s ease-in-out;
}

@keyframes shimmer {
    0% { transform: translateX(-100%) translateY(-100%) rotate(45deg); }
    100% { transform: translateX(100%) translateY(100%) rotate(45deg); }
}

/* Form Enhancements */
.form-control {
    border-radius: 10px;
    border: 2px solid #e9ecef;
    transition: all 0.3s ease;
    background: rgba(255, 255, 255, 0.8);
    backdrop-filter: blur(10px);
}

.form-control:focus {
    border-color: #007bff;
    box-shadow: 0 0 0 0.2rem rgba(0, 123, 191, 0.25);
    background: rgba(255, 255, 255, 1);
}

/* Table Enhancements */
.table {
    background: rgba(255, 255, 255, 0.9);
    backdrop-filter: blur(10px);
    border-radius: 10px;
    overflow: hidden;
}

.table thead th {
    background: linear-gradient(135deg, #007bff 0%, #28a745 100%);
    color: white;
    border: none;
    font-weight: 600;
}

.table tbody tr:hover {
    background: rgba(0, 123, 191, 0.05);
    transform: scale(1.01);
    transition: all 0.2s ease;
}

/* Attractive Navbar Styles */
.navbar-nav .nav-link {
    position: relative;
    overflow: hidden;
}

.navbar-nav .nav-link:hover,
.navbar-nav .nav-link.active {
    background: rgba(255, 255, 255, 0.15) !important;
    transform: translateY(-1px);
    box-shadow: 0 4px 8px rgba(0,0,0,0.15);
    color: #FFD700 !important;
}

.navbar-nav .nav-link:hover .nav-indicator,
.navbar-nav .nav-link.active .nav-indicator {
    width: 100% !important;
}

.navbar-brand:hover {
    transform: scale(1.05);
    transition: transform 0.3s ease;
}

/* Navbar animation */
@keyframes slideInDown {
    from {
        transform: translateY(-100%);
        opacity: 0;
    }
    to {
        transform: translateY(0);
        opacity: 1;
    }
}

.navbar {
    animation: slideInDown 0.8s ease-out;
}

/* Hero section */
.hero {
    min-height: 60vh;
    display: flex;
    align-items: center;
}

/* Cards */
.card {
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 25px rgba(0,0,0,0.15) !important;
}

/* Chat Widget Styles */
.chat-widget {
    position: fixed;
    bottom: 20px;
    right: 20px;
    width: 350px;
    height: 500px;
    background: white;
    border-radius: 10px;
    box-shadow: 0 5px 20px rgba(0,0,0,0.3);
    display: none;
    flex-direction: column;
    z-index: 1050;
    overflow: hidden;
}

.chat-header {
    background: #007bff;
    color: white;
    padding: 15px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-weight: bold;
}

.chat-messages {
    flex: 1;
    padding: 15px;
    overflow-y: auto;
    background: #f8f9fa;
}

.message {
    margin-bottom: 15px;
    display: flex;
}

.message-content {
    padding: 10px 15px;
    border-radius: 18px;
    max-width: 80%;
    word-wrap: break-word;
}

.bot-message {
    justify-content: flex-start;
}

.bot-message .message-content {
    background: white;
    color: #333;
    border: 1px solid #e9ecef;
}

.user-message {
    justify-content: flex-end;
}

.user-message .message-content {
    background: #007bff;
    color: white;
}

.chat-input {
    padding: 15px;
    background: white;
    border-top: 1px solid #e9ecef;
    display: flex;
    gap: 10px;
}

.chat-input .form-control {
    flex: 1;
}

/* Floating chat button */
#floatingChatBtn {
    transition: all 0.3s ease;
}

#floatingChatBtn:hover {
    transform: scale(1.1);
}

/* Responsive adjustments */
@media (max-width: 768px) {
    .chat-widget {
        width: calc(100vw - 40px);
        height: calc(100vh - 100px);
        bottom: 80px;
        right: 20px;
    }

    .hero h1 {
        font-size: 2rem;
    }

    .hero .lead {
        font-size: 1rem;
    }
}

@media (max-width: 576px) {
    .chat-widget {
        width: calc(100vw - 20px);
        right: 10px;
    }

    #floatingChatBtn {
        bottom: 15px;
        right: 15px;
    }
}

/* Font Awesome icons (if not loaded) */
.fas, .fab {
    font-family: "Font Awesome 5 Free", sans-serif;
}

/* Custom button styles */
.btn-outline-primary:hover {
    background-color: #007bff;
    border-color: #007bff;
}

/* Enhanced Sections */
section {
    padding: 5rem 0;
    position: relative;
    background: rgba(255, 255, 255, 0.6);
    backdrop-filter: blur(5px);
    border-radius: 20px;
    margin: 1rem auto;
    box-shadow: 0 5px 20px rgba(0,0,0,0.05);
}

/* Footer enhancements */
footer {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    position: relative;
    overflow: hidden;
}

footer::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 100 100"><polygon points="50,0 61,35 98,35 68,57 79,91 50,70 21,91 32,57 2,35 39,35" fill="rgba(255,255,255,0.1)"/></svg>');
    opacity: 0.1;
}

footer .container {
    position: relative;
    z-index: 1;
}

footer a {
    color: #e9ecef;
    text-decoration: none;
    transition: all 0.3s ease;
}

footer a:hover {
    color: white;
    transform: translateY(-2px);
}

/* CTA Section Enhancement */
section[class*="cta"], .bg-primary {
    position: relative;
}

section[class*="cta"]::before, .bg-primary::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(45deg, rgba(255,255,255,0.1), rgba(255,255,255,0.05), rgba(255,255,255,0.1));
    z-index: 0;
}

section[class*="cta"] .card-body, .bg-primary .card-body {
    position: relative;
    z-index: 1;
}

/* Animation for elements */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.fade-in-up {
    animation: fadeInUp 0.6s ease-out;
}

/* Loading animation for buttons */
.btn-loading {
    position: relative;
    color: transparent !important;
}

.btn-loading::after {
    content: "";
    position: absolute;
    width: 16px;
    height: 16px;
    top: 50%;
    left: 50%;
    margin-left: -8px;
    margin-top: -8px;
    border: 2px solid #ffffff;
    border-radius: 50%;
    border-top-color: transparent;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}
