/* Custom Styles for InsightHub - Enhanced Professional Version */

:root {
    --primary-color: #004A75;
    --primary-dark: #004A75;
    --primary-light: #F5DFB3;
    --secondary-color: #4cc9f0;
    --success-color: #06d6a0;
    --warning-color: #ffd166;
    --danger-color: #ef476f;
    --dark-bg: #1e1e2f;
    --darker-bg: #151522;
    --light-bg: #f8f9fa;
    --text-light: #ffffff;
    --text-dark: #2b2d42;
    --text-muted: #6c757d;
    --card-bg: #ffffff;
    --gradient-1: linear-gradient(135deg, #4361ee 0%, #3a0ca3 100%);
    --gradient-2: linear-gradient(135deg, #4cc9f0 0%, #4361ee 100%);
    --gradient-3: linear-gradient(135deg, #004A75 0%, #3a56d4 100%);
    --box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
    --box-shadow-hover: 0 20px 40px rgba(0, 0, 0, 0.15);
    --footer-bg: linear-gradient(135deg, #1a1a2e 0%, #16213e 100%);
    --footer-text: #ffffff;
    --footer-text-muted: rgba(255, 255, 255, 0.7);
    --footer-text-dark: rgba(255, 255, 255, 0.5);
    --footer-link: rgba(255, 255, 255, 0.8);
    --footer-link-hover: #ffffff;
    --footer-border: rgba(255, 255, 255, 0.1);
    --footer-icon: #004A75;
}

/* General Styles */
body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    line-height: 1.7;
    color: var(--text-dark);
    overflow-x: hidden;
    background-color: #ffffff;
}

/* Typography */
h1, h2, h3, h4, h5, h6 {
    font-weight: 700;
    letter-spacing: -0.02em;
}

.display-1, .display-2, .display-3, .display-4 {
    font-weight: 800;
    letter-spacing: -0.03em;
}

/* Hero Section - Enhanced */
.hero-section {
    position: relative;
    background: var(--gradient-1);
    color: var(--text-light);
    padding: 120px 0;
    overflow: hidden;
    min-height: 90vh;
    display: flex;
    align-items: center;
}

.hero-section::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 100 100" opacity="0.1"><path d="M10 50 L50 10 L90 50 L50 90 Z" fill="white"/></svg>') repeat;
    animation: moveBackground 60s linear infinite;
}

@keyframes moveBackground {
    0% { transform: translate(0, 0) rotate(0deg); }
    100% { transform: translate(50px, 50px) rotate(10deg); }
}

.hero-content {
    position: relative;
    z-index: 10;
}

.hero-title {
    font-size: 4rem;
    font-weight: 800;
    margin-bottom: 1.5rem;
    line-height: 1.2;
    text-shadow: 2px 2px 20px rgba(0,0,0,0.2);
    animation: fadeInUp 1s ease;
}

.hero-title span {
    background: linear-gradient(135deg, #ffd166, #ffb347);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    display: inline-block;
}

.hero-subtitle {
    font-size: 1.35rem;
    margin-bottom: 2.5rem;
    opacity: 0.95;
    animation: fadeInUp 1s ease 0.2s both;
    max-width: 600px;
}

.hero-buttons {
    animation: fadeInUp 1s ease 0.4s both;
}

.hero-buttons .btn {
    padding: 15px 35px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 1px;
    border-radius: 50px;
    transition: all 0.3s ease;
}

.hero-buttons .btn-primary {
    background: white;
    color: var(--primary-color);
    border: none;
    box-shadow: 0 10px 20px rgba(0,0,0,0.1);
}

.hero-buttons .btn-primary:hover {
    transform: translateY(-3px);
    box-shadow: 0 15px 30px rgba(0,0,0,0.2);
    background: white;
    color: var(--primary-dark);
}

.hero-buttons .btn-outline-light {
    border: 2px solid rgba(255,255,255,0.5);
    backdrop-filter: blur(10px);
}

.hero-buttons .btn-outline-light:hover {
    background: white;
    color: var(--primary-color);
    border-color: white;
}

/* D3.js Container */
#d3-container {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 1;
    opacity: 0.15;
}

/* Section Styling */
section {
    padding: 100px 0;
    position: relative;
}

.section-title {
    font-size: 2.8rem;
    font-weight: 800;
    margin-bottom: 1rem;
    background: var(--gradient-1);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.section-subtitle {
    font-size: 1.2rem;
    color: var(--text-muted);
    margin-bottom: 3rem;
    position: relative;
    display: inline-block;
}

.section-subtitle::after {
    content: '';
    position: absolute;
    bottom: -15px;
    left: 50%;
    transform: translateX(-50%);
    width: 80px;
    height: 4px;
    background: var(--gradient-2);
    border-radius: 2px;
}

/* About Section */
#about {
    background: white;
}

.about-text {
    font-size: 1.1rem;
    color: var(--text-muted);
    margin-bottom: 2rem;
}

.about-feature {
    background: var(--light-bg);
    padding: 20px;
    border-radius: 15px;
    transition: all 0.3s ease;
}

.about-feature:hover {
    transform: translateY(-5px);
    box-shadow: var(--box-shadow);
}

.about-feature i {
    font-size: 2.5rem;
    background: var(--gradient-1);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.about-stats {
    background: var(--gradient-1);
    padding: 40px;
    border-radius: 20px;
    color: white;
    position: relative;
    overflow: hidden;
}

.about-stats::before {
    content: '';
    position: absolute;
    top: -50px;
    right: -50px;
    width: 200px;
    height: 200px;
    background: rgba(255,255,255,0.1);
    border-radius: 50%;
}

.stat-item {
    text-align: center;
    position: relative;
    z-index: 1;
}

.stat-number {
    font-size: 3.5rem;
    font-weight: 800;
    line-height: 1;
    margin-bottom: 10px;
}

.stat-label {
    font-size: 1rem;
    opacity: 0.9;
    text-transform: uppercase;
    letter-spacing: 1px;
}

/* Service Cards - Enhanced */
.service-card {
    background: var(--card-bg);
    border-radius: 20px;
    padding: 2.5rem 2rem;
    box-shadow: var(--box-shadow);
    transition: all 0.4s cubic-bezier(0.165, 0.84, 0.44, 1);
    height: 100%;
    position: relative;
    overflow: hidden;
    border: 1px solid rgba(0,0,0,0.05);
}

.service-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 5px;
    background: var(--gradient-2);
    transform: scaleX(0);
    transition: transform 0.4s ease;
}

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

.service-card:hover {
    transform: translateY(-15px) scale(1.02);
    box-shadow: var(--box-shadow-hover);
}

.service-icon {
    font-size: 3.5rem;
    background: var(--gradient-1);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    margin-bottom: 1.8rem;
    display: inline-block;
    transition: transform 0.3s ease;
}

.service-card:hover .service-icon {
    transform: scale(1.1) rotate(5deg);
}

.service-title {
    font-size: 1.5rem;
    margin-bottom: 1rem;
    color: var(--text-dark);
    font-weight: 700;
}

.service-description {
    color: var(--text-muted);
    margin-bottom: 1.5rem;
    line-height: 1.7;
}

.service-link {
    color: var(--primary-color);
    text-decoration: none;
    font-weight: 600;
    display: inline-flex;
    align-items: center;
    gap: 5px;
    transition: gap 0.3s ease;
}

.service-link:hover {
    gap: 10px;
    color: var(--primary-dark);
}

/* Portfolio Cards - Enhanced */
.portfolio-card {
    background: white;
    border-radius: 20px;
    overflow: hidden;
    box-shadow: var(--box-shadow);
    transition: all 0.4s ease;
    height: 100%;
    position: relative;
}

.portfolio-card:hover {
    transform: translateY(-15px);
    box-shadow: var(--box-shadow-hover);
}

.portfolio-image-wrapper {
    position: relative;
    overflow: hidden;
    height: 280px;
}

.portfolio-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.8s ease;
}

.portfolio-card:hover .portfolio-image {
    transform: scale(1.1);
}

.portfolio-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(to top, rgba(0,0,0,0.8), transparent);
    opacity: 0;
    transition: opacity 0.4s ease;
    display: flex;
    align-items: flex-end;
    padding: 20px;
}

.portfolio-card:hover .portfolio-overlay {
    opacity: 1;
}

.portfolio-content {
    padding: 1.8rem;
}

.portfolio-title {
    font-size: 1.4rem;
    font-weight: 700;
    margin-bottom: 0.8rem;
    color: var(--text-dark);
}

.portfolio-category {
    color: var(--primary-color);
    font-size: 0.9rem;
    text-transform: uppercase;
    letter-spacing: 1px;
    font-weight: 600;
}

.portfolio-description {
    color: var(--text-muted);
    margin-bottom: 1.2rem;
    line-height: 1.6;
}

/* CTA Section */
.cta-section {
    background: var(--gradient-3);
    color: white;
    position: relative;
    overflow: hidden;
    padding: 80px 0;
}

.cta-section::before {
    content: '';
    position: absolute;
    top: -50%;
    right: -50%;
    width: 200%;
    height: 200%;
    background: radial-gradient(circle, rgba(255,255,255,0.1) 0%, transparent 50%);
    animation: rotate 30s linear infinite;
}

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

.cta-title {
    font-size: 2.8rem;
    font-weight: 800;
    margin-bottom: 1.5rem;
    position: relative;
    z-index: 2;
}

.cta-text {
    font-size: 1.2rem;
    opacity: 0.95;
    margin-bottom: 2rem;
    position: relative;
    z-index: 2;
}

.cta-button {
    background: white;
    color: var(--danger-color);
    padding: 16px 45px;
    border-radius: 50px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1px;
    text-decoration: none;
    display: inline-block;
    transition: all 0.3s ease;
    position: relative;
    z-index: 2;
    border: none;
    box-shadow: 0 10px 30px rgba(0,0,0,0.2);
}

.cta-button:hover {
    transform: translateY(-5px);
    box-shadow: 0 15px 40px rgba(0,0,0,0.3);
    color: var(--danger-color);
    background: white;
}

/* Footer - Enhanced with better contrast */
.footer {
    background: linear-gradient(135deg, #1a1a2e 0%, #16213e 100%);
    color: #ffffff;
    padding: 80px 0 30px;
    position: relative;
    overflow: hidden;
}

.footer::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 1px;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.2), transparent);
}

.footer h5 {
    color: #ffffff;
    font-weight: 700;
    margin-bottom: 25px;
    font-size: 1.3rem;
    position: relative;
    padding-bottom: 12px;
}

.footer h5::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 50px;
    height: 3px;
    background: var(--gradient-2);
    border-radius: 2px;
}

.footer p {
    color: rgba(255, 255, 255, 0.8);
    line-height: 1.8;
    margin-bottom: 20px;
}

.footer .text-muted {
    color: rgba(255, 255, 255, 0.7) !important;
}

.footer-links {
    list-style: none;
    padding: 0;
    margin: 0;
}

.footer-links li {
    margin-bottom: 12px;
}

.footer-links a {
    color: rgba(255, 255, 255, 0.8);
    text-decoration: none;
    transition: all 0.3s ease;
    display: inline-flex;
    align-items: center;
    gap: 8px;
}

.footer-links a:hover {
    color: #ffffff;
    transform: translateX(5px);
}

.footer-links a i {
    color: var(--secondary-color);
    font-size: 0.9rem;
}

.footer-contact-info {
    list-style: none;
    padding: 0;
    margin: 0;
}

.footer-contact-info li {
    display: flex;
    align-items: flex-start;
    gap: 15px;
    margin-bottom: 20px;
    color: rgba(255, 255, 255, 0.8);
}

.footer-contact-info li i {
    color: var(--secondary-color);
    font-size: 1.2rem;
    margin-top: 3px;
}

.footer-contact-info li span {
    line-height: 1.6;
}

.social-links {
    display: flex;
    gap: 15px;
    margin-top: 20px;
}

.social-links a {
    width: 45px;
    height: 45px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #ffffff;
    text-decoration: none;
    transition: all 0.3s ease;
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.social-links a:hover {
    background: var(--gradient-2);
    transform: translateY(-5px);
    border-color: transparent;
}

.footer-bottom {
    margin-top: 50px;
    padding-top: 30px;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    text-align: center;
    color: rgba(255, 255, 255, 0.7);
}

.footer-bottom a {
    color: rgba(255, 255, 255, 0.9);
    text-decoration: none;
    transition: color 0.3s ease;
}

.footer-bottom a:hover {
    color: var(--secondary-color);
}

.footer-bottom .small {
    color: rgba(255, 255, 255, 0.6) !important;
}

/* Newsletter Form in Footer */
.footer-newsletter .input-group {
    background: rgba(255, 255, 255, 0.1);
    border-radius: 50px;
    padding: 5px;
    margin-top: 20px;
}

.footer-newsletter .form-control {
    background: transparent;
    border: none;
    color: #ffffff;
    padding: 12px 20px;
}

.footer-newsletter .form-control::placeholder {
    color: rgba(255, 255, 255, 0.6);
}

.footer-newsletter .btn {
    background: var(--gradient-2);
    color: #ffffff;
    border: none;
    border-radius: 50px;
    padding: 10px 25px;
    font-weight: 600;
    transition: all 0.3s ease;
}

.footer-newsletter .btn:hover {
    transform: translateX(-3px);
    box-shadow: 0 5px 15px rgba(76, 201, 240, 0.3);
}

/* Buttons */
.btn {
    padding: 12px 30px;
    font-weight: 600;
    border-radius: 10px;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

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

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

.btn-primary {
    background: var(--gradient-1);
    border: none;
    color: white;
}

.btn-primary:hover {
    background: var(--gradient-1);
    transform: translateY(-3px);
    box-shadow: 0 10px 25px rgba(67, 97, 238, 0.3);
}

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

@keyframes float {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-20px); }
}

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

/* Responsive Design */
@media (max-width: 1200px) {
    .hero-title {
        font-size: 3.5rem;
    }
}

@media (max-width: 992px) {
    .hero-title {
        font-size: 3rem;
    }
    
    section {
        padding: 70px 0;
    }
    
    .section-title {
        font-size: 2.2rem;
    }
}

@media (max-width: 768px) {
    .hero-title {
        font-size: 2.5rem;
    }
    
    .hero-subtitle {
        font-size: 1.1rem;
    }
    
    .hero-buttons .btn {
        padding: 12px 25px;
        font-size: 0.9rem;
    }
    
    .service-card,
    .portfolio-card {
        margin-bottom: 1.5rem;
    }
    
    .section-title {
        font-size: 2rem;
    }
    
    .footer {
        padding: 50px 0 20px;
    }
    
    .footer h5 {
        margin-top: 20px;
    }
}

@media (max-width: 576px) {
    .hero-title {
        font-size: 2rem;
    }
    
    .hero-buttons .btn {
        display: block;
        width: 100%;
        margin: 10px 0;
    }
    
    .hero-buttons .btn.me-3 {
        margin-right: 0 !important;
    }
}

/* Loading Spinner */
.spinner-container {
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 200px;
}

.spinner {
    width: 50px;
    height: 50px;
    border: 4px solid rgba(67, 97, 238, 0.1);
    border-top: 4px solid var(--primary-color);
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* Back to Top Button */
.back-to-top {
    position: fixed;
    bottom: 30px;
    right: 30px;
    width: 50px;
    height: 50px;
    background: var(--gradient-1);
    color: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    text-decoration: none;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
    z-index: 1000;
    box-shadow: 0 5px 20px rgba(67, 97, 238, 0.3);
}

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

.back-to-top:hover {
    transform: translateY(-5px);
    color: white;
    box-shadow: 0 10px 30px rgba(67, 97, 238, 0.4);
}

/* Invoice Styles */
.invoice-header {
    background: white;
    padding: 2rem;
    border-radius: 10px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
    margin-bottom: 2rem;
}

.invoice-details {
    background: white;
    padding: 2rem;
    border-radius: 10px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
}

.invoice-table {
    width: 100%;
    border-collapse: collapse;
}

.invoice-table th,
.invoice-table td {
    padding: 1rem;
    border-bottom: 1px solid #dee2e6;
}

.invoice-table th {
    background: var(--light-bg);
    font-weight: 600;
}

.status-badge {
    padding: 0.25rem 0.5rem;
    border-radius: 4px;
    font-size: 0.875rem;
    font-weight: 600;
}

.status-paid {
    background: #d4edda;
    color: #155724;
}

.status-unpaid {
    background: #f8d7da;
    color: #721c24;
}

.status-pending {
    background: #fff3cd;
    color: #856404;
}

/* Alerts and Notifications */
.alert {
    border-radius: 8px;
    padding: 1rem;
    margin-bottom: 1rem;
    animation: slideInDown 0.5s ease;
}

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

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

/* Responsive Design */
@media (max-width: 768px) {
    .hero-title {
        font-size: 2.5rem;
    }
    
    .hero-subtitle {
        font-size: 1rem;
    }
    
    .service-card,
    .portfolio-card {
        margin-bottom: 1.5rem;
    }
    
    .admin-sidebar {
        min-height: auto;
    }
}

/* Loading Spinner */
.spinner-container {
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 200px;
}

.spinner {
    width: 40px;
    height: 40px;
    border: 4px solid #f3f3f3;
    border-top: 4px solid var(--primary-color);
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* Print Styles for Invoice */
@media print {
    .no-print {
        display: none !important;
    }
    
    .invoice-details {
        box-shadow: none;
        padding: 0;
    }
}