/* Business Legal Search - Custom Styles */

:root {
    --primary-color: #0f1f43;
    --primary-light: #1a3a6e;
    --secondary-color: #10b981;
    --accent-color: #f59e0b;
    --text-color: #1f2937;
    --text-muted: #6b7280;
    --bg-light: #f8fafc;
    --border-color: #e5e7eb;
    --success-color: #22c55e;
    --warning-color: #f59e0b;
    --danger-color: #ef4444;
    --gradient-primary: linear-gradient(135deg, #0f1f43 0%, #1a3a6e 100%);
    --gradient-secondary: linear-gradient(135deg, #10b981 0%, #059669 100%);
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    color: var(--text-color);
    background-color: #ffffff;
    line-height: 1.6;
}

/* Navbar Styles */
.bg-primary-gradient {
    background: var(--gradient-primary);
}

.navbar {
    padding: 1rem 0;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}

.navbar-brand {
    font-size: 1.5rem;
    font-weight: 700;
    color: #fff !important;
}

.navbar-brand i {
    color: var(--secondary-color);
}

.nav-link {
    color: rgba(255, 255, 255, 0.9) !important;
    font-weight: 500;
    padding: 0.5rem 1rem !important;
    transition: all 0.3s ease;
}

.nav-link:hover {
    color: var(--secondary-color) !important;
}

/* Hero Section */
.hero-section {
    background: var(--gradient-primary);
    position: relative;
    padding: 6rem 0;
    overflow: hidden;
}

.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"><defs><pattern id="grid" width="10" height="10" patternUnits="userSpaceOnUse"><path d="M 10 0 L 0 0 0 10" fill="none" stroke="rgba(255,255,255,0.05)" stroke-width="0.5"/></pattern></defs><rect width="100" height="100" fill="url(%23grid)"/></svg>');
    opacity: 0.3;
}

.hero-section .container {
    position: relative;
    z-index: 1;
}

.hero-title {
    font-size: 3.5rem;
    font-weight: 800;
    color: #fff;
    margin-bottom: 1.5rem;
}

.hero-title span {
    color: var(--secondary-color);
}

.hero-subtitle {
    font-size: 1.25rem;
    color: rgba(255, 255, 255, 0.85);
    max-width: 700px;
    margin: 0 auto 2rem;
}

/* Search Box */
.search-container {
    background: #fff;
    border-radius: 16px;
    padding: 2rem;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
    max-width: 800px;
    margin: 0 auto;
}

.search-tabs {
    display: flex;
    gap: 1rem;
    margin-bottom: 1.5rem;
    border-bottom: 2px solid var(--border-color);
    padding-bottom: 1rem;
}

.search-tab {
    padding: 0.5rem 1.5rem;
    background: none;
    border: none;
    font-weight: 600;
    color: var(--text-muted);
    cursor: pointer;
    transition: all 0.3s ease;
    border-radius: 8px;
}

.search-tab.active,
.search-tab:hover {
    background: var(--bg-light);
    color: var(--primary-color);
}

.search-input-group {
    display: flex;
    gap: 1rem;
}

.search-input {
    flex: 1;
    padding: 1rem 1.5rem;
    font-size: 1rem;
    border: 2px solid var(--border-color);
    border-radius: 12px;
    transition: all 0.3s ease;
}

.search-input:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 4px rgba(15, 31, 67, 0.1);
}

.search-btn {
    padding: 1rem 2rem;
    background: var(--gradient-secondary);
    color: #fff;
    border: none;
    border-radius: 12px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.search-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 30px rgba(16, 185, 129, 0.4);
}

/* Stats Section */
.stats-section {
    padding: 4rem 0;
    background: var(--bg-light);
}

.stat-card {
    text-align: center;
    padding: 2rem;
    background: #fff;
    border-radius: 16px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.05);
    transition: all 0.3s ease;
}

.stat-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.1);
}

.stat-icon {
    width: 60px;
    height: 60px;
    background: var(--gradient-primary);
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 1rem;
}

.stat-icon i {
    font-size: 1.5rem;
    color: #fff;
}

.stat-number {
    font-size: 2.5rem;
    font-weight: 800;
    color: var(--primary-color);
    margin-bottom: 0.5rem;
}

.stat-label {
    color: var(--text-muted);
    font-weight: 500;
}

/* Features Section */
.features-section {
    padding: 5rem 0;
}

.section-title {
    font-size: 2.5rem;
    font-weight: 800;
    color: var(--primary-color);
    margin-bottom: 1rem;
}

.section-subtitle {
    color: var(--text-muted);
    font-size: 1.1rem;
    max-width: 600px;
    margin: 0 auto 3rem;
}

.feature-card {
    padding: 2rem;
    background: #fff;
    border-radius: 16px;
    border: 1px solid var(--border-color);
    height: 100%;
    transition: all 0.3s ease;
}

.feature-card:hover {
    border-color: var(--secondary-color);
    box-shadow: 0 10px 40px rgba(16, 185, 129, 0.1);
}

.feature-icon {
    width: 50px;
    height: 50px;
    background: rgba(16, 185, 129, 0.1);
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 1rem;
}

.feature-icon i {
    font-size: 1.5rem;
    color: var(--secondary-color);
}

.feature-title {
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--primary-color);
    margin-bottom: 0.5rem;
}

.feature-description {
    color: var(--text-muted);
    font-size: 0.95rem;
}

/* Company Card */
.company-card {
    background: #fff;
    border-radius: 16px;
    border: 1px solid var(--border-color);
    padding: 1.5rem;
    margin-bottom: 1rem;
    transition: all 0.3s ease;
}

.company-card:hover {
    border-color: var(--primary-color);
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.08);
}

.company-code {
    display: inline-block;
    background: var(--bg-light);
    padding: 0.5rem 1rem;
    border-radius: 8px;
    font-family: 'Monaco', 'Consolas', monospace;
    font-size: 0.9rem;
    font-weight: 600;
    color: var(--primary-color);
    margin-bottom: 1rem;
}

.company-code i {
    cursor: pointer;
    margin-left: 0.5rem;
    color: var(--text-muted);
}

.company-code i:hover {
    color: var(--secondary-color);
}

.company-name {
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--primary-color);
    margin-bottom: 0.5rem;
}

.company-name a {
    color: inherit;
    text-decoration: none;
}

.company-name a:hover {
    color: var(--secondary-color);
}

.company-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 1rem;
    margin-top: 1rem;
}

.company-meta-item {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.9rem;
    color: var(--text-muted);
}

.company-meta-item i {
    color: var(--secondary-color);
}

.status-badge {
    display: inline-block;
    padding: 0.25rem 0.75rem;
    border-radius: 20px;
    font-size: 0.8rem;
    font-weight: 600;
}

.status-active {
    background: rgba(34, 197, 94, 0.1);
    color: var(--success-color);
}

.status-inactive {
    background: rgba(245, 158, 11, 0.1);
    color: var(--warning-color);
}

.status-dissolved {
    background: rgba(239, 68, 68, 0.1);
    color: var(--danger-color);
}

.verified-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.25rem;
    color: var(--success-color);
    font-size: 0.85rem;
    font-weight: 600;
}

/* Company Detail Page */
.company-detail-header {
    background: var(--gradient-primary);
    padding: 4rem 0;
    color: #fff;
}

.company-detail-code {
    display: inline-block;
    background: rgba(255, 255, 255, 0.15);
    padding: 0.75rem 1.5rem;
    border-radius: 10px;
    font-family: 'Monaco', 'Consolas', monospace;
    font-size: 1.1rem;
    margin-bottom: 1rem;
}

.company-detail-name {
    font-size: 2.5rem;
    font-weight: 800;
    margin-bottom: 0.5rem;
}

.company-detail-legal {
    font-size: 1.1rem;
    opacity: 0.9;
}

.info-card {
    background: #fff;
    border-radius: 16px;
    border: 1px solid var(--border-color);
    padding: 1.5rem;
    margin-bottom: 1.5rem;
}

.info-card-title {
    font-size: 1rem;
    font-weight: 700;
    color: var(--primary-color);
    margin-bottom: 1rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.info-card-title i {
    color: var(--secondary-color);
}

.info-row {
    display: flex;
    justify-content: space-between;
    padding: 0.75rem 0;
    border-bottom: 1px solid var(--border-color);
}

.info-row:last-child {
    border-bottom: none;
}

.info-label {
    color: var(--text-muted);
    font-weight: 500;
}

.info-value {
    color: var(--text-color);
    font-weight: 600;
    text-align: right;
}

/* Form Styles */
.form-container {
    background: #fff;
    border-radius: 16px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.1);
    padding: 2.5rem;
}

.form-title {
    font-size: 1.75rem;
    font-weight: 700;
    color: var(--primary-color);
    margin-bottom: 0.5rem;
}

.form-subtitle {
    color: var(--text-muted);
    margin-bottom: 2rem;
}

.form-label {
    font-weight: 600;
    color: var(--text-color);
    margin-bottom: 0.5rem;
}

.form-control {
    padding: 0.875rem 1rem;
    border: 2px solid var(--border-color);
    border-radius: 10px;
    transition: all 0.3s ease;
}

.form-control:focus {
    border-color: var(--primary-color);
    box-shadow: 0 0 0 4px rgba(15, 31, 67, 0.1);
}

.form-select {
    padding: 0.875rem 1rem;
    border: 2px solid var(--border-color);
    border-radius: 10px;
}

.btn-primary-custom {
    background: var(--gradient-primary);
    border: none;
    padding: 1rem 2rem;
    font-weight: 600;
    border-radius: 10px;
    color: #fff;
    transition: all 0.3s ease;
}

.btn-primary-custom:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 30px rgba(15, 31, 67, 0.3);
    color: #fff;
}

.btn-secondary-custom {
    background: var(--gradient-secondary);
    border: none;
    padding: 1rem 2rem;
    font-weight: 600;
    border-radius: 10px;
    color: #fff;
    transition: all 0.3s ease;
}

.btn-secondary-custom:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 30px rgba(16, 185, 129, 0.3);
    color: #fff;
}

/* Footer */
.footer-section {
    background: var(--gradient-primary);
    color: #fff;
}

.footer-links li {
    margin-bottom: 0.75rem;
}

.footer-links a {
    color: rgba(255, 255, 255, 0.75);
    text-decoration: none;
    transition: all 0.3s ease;
}

.footer-links a:hover {
    color: var(--secondary-color);
}

.footer-links li:not(:has(a)) {
    color: rgba(255, 255, 255, 0.75);
    font-size: 0.9rem;
}

.social-links a {
    display: inline-flex;
    width: 40px;
    height: 40px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 10px;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
}

.social-links a:hover {
    background: var(--secondary-color);
}

/* Pagination */
.pagination-custom {
    display: flex;
    gap: 0.5rem;
    justify-content: center;
    margin-top: 2rem;
}

.pagination-custom .page-link {
    padding: 0.75rem 1rem;
    border-radius: 10px;
    border: 1px solid var(--border-color);
    color: var(--text-color);
    font-weight: 500;
}

.pagination-custom .page-link:hover,
.pagination-custom .page-item.active .page-link {
    background: var(--primary-color);
    border-color: var(--primary-color);
    color: #fff;
}

/* Alert Messages */
.alert-custom {
    border-radius: 12px;
    border: none;
    padding: 1rem 1.5rem;
}

.alert-success-custom {
    background: rgba(34, 197, 94, 0.1);
    color: var(--success-color);
}

.alert-error-custom {
    background: rgba(239, 68, 68, 0.1);
    color: var(--danger-color);
}

/* Breadcrumb */
.breadcrumb-section {
    background: var(--bg-light);
    padding: 1rem 0;
}

.breadcrumb {
    margin-bottom: 0;
}

.breadcrumb-item a {
    color: var(--primary-color);
    text-decoration: none;
}

.breadcrumb-item.active {
    color: var(--text-muted);
}

/* LEI Code Anatomy */
.code-anatomy {
    background: var(--primary-color);
    padding: 3rem 0;
    color: #fff;
}

.code-display {
    font-family: 'Monaco', 'Consolas', monospace;
    font-size: 1.75rem;
    letter-spacing: 3px;
    background: rgba(255, 255, 255, 0.1);
    padding: 1.5rem 2rem;
    border-radius: 12px;
    display: inline-block;
}

.code-segment {
    padding: 0.5rem;
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.3s ease;
}

.code-segment:hover {
    background: var(--secondary-color);
}

/* Responsive */
@media (max-width: 768px) {
    .hero-title {
        font-size: 2.25rem;
    }

    .hero-subtitle {
        font-size: 1rem;
    }

    .search-input-group {
        flex-direction: column;
    }

    .search-container {
        padding: 1.5rem;
    }

    .stat-card {
        margin-bottom: 1rem;
    }

    .company-detail-name {
        font-size: 1.75rem;
    }

    .code-display {
        font-size: 1rem;
        letter-spacing: 1px;
    }
}

/* Loading spinner */
.loading-spinner {
    display: inline-block;
    width: 20px;
    height: 20px;
    border: 2px solid rgba(255, 255, 255, 0.3);
    border-radius: 50%;
    border-top-color: #fff;
    animation: spin 0.8s ease-in-out infinite;
}

@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}

/* Toast notifications */
.toast-container {
    position: fixed;
    top: 20px;
    right: 20px;
    z-index: 9999;
}

.toast-custom {
    background: var(--primary-color);
    color: #fff;
    border-radius: 12px;
    padding: 1rem 1.5rem;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.2);
}

/* Print styles */
@media print {
    .navbar,
    .footer-section,
    .no-print {
        display: none !important;
    }

    .company-card,
    .info-card {
        break-inside: avoid;
    }
}
