@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700&display=swap');

/* ==========================================================================
   Variables & Theme
   ========================================================================== */
:root {
    /* Brand Colors */
    --primary-color: #2563eb;
    --primary-hover: #1d4ed8;
    --secondary-color: #64748b;

    /* Backgrounds */
    --body-bg: #f8fafc;
    --card-bg: #ffffff;
    --header-bg: #ffffff;
    --footer-bg: #f8fafc;

    /* Text */
    --text-main: #1e293b;
    --text-muted: #64748b;
    --text-light: #94a3b8;

    /* Borders & Shadows */
    --border-color: #e2e8f0;
    --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
    --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
    --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);

    /* Navbar specific */
    --navbar-height: 70px;
    --navbar-bg: #ffffff;
    --navbar-border: #e2e8f0;
}

/* ==========================================================================
   Global Styles
   ========================================================================== */
html {
    position: relative;
    min-height: 100%;
    font-size: 14px;
}

@media (min-width: 768px) {
    html {
        font-size: 16px;
    }
}

body {
    background-color: var(--body-bg);
    font-family: 'Inter', system-ui, -apple-system, sans-serif;
    color: var(--text-main);
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    overflow-x: hidden;
}

a {
    text-decoration: none;
    color: var(--primary-color);
    transition: color 0.2s;
}

a:hover {
    color: var(--primary-hover);
}

/* ==========================================================================
   Typography
   ========================================================================== */
h1,
h2,
h3,
h4,
h5,
h6 {
    color: var(--text-main);
    font-weight: 600;
    letter-spacing: -0.025em;
}

.text-muted {
    color: var(--text-muted) !important;
}

.font-weight-bold {
    font-weight: 600 !important;
}

/* ==========================================================================
   Layout Components
   ========================================================================== */

/* Navbar Customization */
.navbar {
    background-color: #0f172a !important;
    /* Dark Slate 900 */
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
    padding-top: 1rem;
    padding-bottom: 1rem;
}

.navbar-brand {
    font-weight: 700;
    color: #f8fafc !important;
    /* Slate 50 */
    font-size: 1.5rem;
    letter-spacing: -0.02em;
}

.nav-link {
    color: #cbd5e1 !important;
    /* Slate 300 */
    font-weight: 500;
    margin-left: 1rem;
    transition: color 0.2s ease;
}

.nav-link:hover,
.nav-link:focus {
    color: #ffffff !important;
}

.navbar-toggler {
    border-color: rgba(255, 255, 255, 0.1);
}

.navbar-toggler-icon {
    background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 30 30'%3e%3cpath stroke='rgba(255, 255, 255, 0.7)' stroke-linecap='round' stroke-miterlimit='10' stroke-width='2' d='M4 7h22M4 15h22M4 23h22'/%3e%3c/svg%3e") !important;
}

/* Button overrides for dark navbar */
.navbar .btn-primary {
    background: linear-gradient(135deg, #3b82f6 0%, #2563eb 100%);
    border: none;
    color: white;
    transition: all 0.2s ease;
}

.navbar .btn-primary:hover {
    background: linear-gradient(135deg, #2563eb 0%, #1d4ed8 100%);
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(37, 99, 235, 0.3);
}

.navbar .btn-link {
    color: #cbd5e1 !important;
    /* Slate 300 */
    transition: color 0.2s ease;
}

.navbar .btn-link:hover {
    color: #ffffff !important;
}

/* Footer */
.footer {
    margin-top: auto;
    /* Pushes footer to bottom */
    width: 100%;
    background-color: var(--footer-bg);
    border-top: 1px solid var(--border-color);
    color: var(--text-muted);
    padding: 1.5rem 0;
}

/* ==========================================================================
   UI Components
   ========================================================================== */

/* Cards */
.card {
    background-color: var(--card-bg);
    border: 1px solid var(--border-color);
    border-radius: 0.75rem;
    box-shadow: var(--shadow-sm);
    transition: box-shadow 0.2s, transform 0.2s;
    margin-bottom: 1.5rem;
}

.card:hover {
    box-shadow: var(--shadow-md);
    /* transform: translateY(-2px); Optional hover effect */
}

.card-header {
    background-color: transparent;
    border-bottom: 1px solid var(--border-color);
    padding: 1.25rem 1.5rem;
}

.card-title {
    font-weight: 600;
    color: var(--text-main);
    font-size: 1.1rem;
    margin-bottom: 0;
}

.card-body {
    padding: 1.5rem;
}

/* Buttons */
.btn {
    font-weight: 500;
    padding: 0.6rem 1.2rem;
    border-radius: 0.5rem;
    transition: all 0.2s;
}

.btn-primary {
    background-color: var(--primary-color);
    border-color: var(--primary-color);
    box-shadow: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
}

.btn-primary:hover {
    background-color: var(--primary-hover);
    border-color: var(--primary-hover);
    transform: translateY(-1px);
    box-shadow: 0 4px 6px -1px rgba(37, 99, 235, 0.2);
}

.btn-outline-primary {
    color: var(--primary-color);
    border-color: var(--primary-color);
}

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

.btn:focus,
.btn:active:focus {
    box-shadow: 0 0 0 0.25rem rgba(37, 99, 235, 0.25);
}

/* Forms */
.form-control {
    border-radius: 0.5rem;
    border: 1px solid var(--border-color);
    padding: 0.6rem 1rem;
    font-size: 0.95rem;
    background-color: #f8fafc;
    transition: all 0.2s;
}

.form-control:focus {
    background-color: #fff;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.1);
}

/* Dropdowns */
.dropdown-menu {
    border: 1px solid var(--border-color);
    box-shadow: var(--shadow-lg);
    border-radius: 0.5rem;
    padding: 0.5rem;
    margin-top: 0.5rem !important;
}

.dropdown-item {
    border-radius: 0.375rem;
    padding: 0.5rem 1rem;
    color: var(--text-main);
    font-weight: 500;
}

.dropdown-item:hover,
.dropdown-item:focus {
    background-color: #f1f5f9;
    color: var(--primary-color);
}

/* Utilities */
.box-shadow {
    box-shadow: var(--shadow-sm);
}

/* Page Specific Styles */
.hero-section {
    background: radial-gradient(circle at top right, rgba(37, 99, 235, 0.05), transparent 40%),
        radial-gradient(circle at bottom left, rgba(37, 99, 235, 0.05), transparent 40%);
}

.home-card {
    background-color: var(--card-bg);
    border: 1px solid rgba(226, 232, 240, 0.8);
    border-radius: 1rem;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.02), 0 2px 4px -1px rgba(0, 0, 0, 0.02);
    padding: 2.5rem;
    margin-bottom: 2rem;
    transition: all 0.3s ease;
}

.home-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.05), 0 10px 10px -5px rgba(0, 0, 0, 0.02);
    border-color: rgba(37, 99, 235, 0.2);
}

.search-header-section {
    padding: 4rem 0;
    background: linear-gradient(to bottom, #ffffff, #f8fafc);
    border-bottom: 1px solid var(--border-color);
    margin-bottom: 3rem;
}

/* Premium Button Overrides */
.btn-primary {
    background: linear-gradient(135deg, #2563eb 0%, #1d4ed8 100%);
    border: none;
    box-shadow: 0 4px 6px -1px rgba(37, 99, 235, 0.3);
}

.btn-primary:hover {
    background: linear-gradient(135deg, #1d4ed8 0%, #1e40af 100%);
    box-shadow: 0 10px 15px -3px rgba(37, 99, 235, 0.4);
    transform: translateY(-1px);
}

/* State Pills */
.state-pill {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0.5rem 1rem;
    background-color: #fff;
    border: 1px solid var(--border-color);
    border-radius: 999px;
    color: var(--text-main);
    font-size: 0.9rem;
    transition: all 0.2s ease;
    text-decoration: none;
    min-width: 60px;
}

.state-pill:hover {
    background-color: var(--primary-color);
    border-color: var(--primary-color);
    color: #fff;
    transform: translateY(-2px);
    box-shadow: 0 4px 6px -1px rgba(37, 99, 235, 0.2);
}

/* Step Cards */
.step-card {
    transition: all 0.3s ease;
    border-color: rgba(226, 232, 240, 0.8) !important;
}

.step-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-lg);
    border-color: rgba(37, 99, 235, 0.3) !important;
}

.step-number {
    position: absolute;
    top: -15px;
    right: -15px;
    font-size: 5rem;
    font-weight: 800;
    color: rgba(37, 99, 235, 0.05);
    line-height: 1;
    z-index: 0;
}

.step-card .icon-box,
.step-card h4,
.step-card p {
    position: relative;
    z-index: 1;
}

/* Modern Cookie Consent */
.cookie-consent-modern {
    position: fixed;
    bottom: 20px;
    right: 20px;
    max-width: 400px;
    background-color: #fff;
    border-radius: 1rem;
    box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
    padding: 1.5rem;
    z-index: 1050;
    border: 1px solid rgba(226, 232, 240, 0.8);
    display: none;
    /* Hidden by default */
    animation: slideInUp 0.5s ease-out;
}

@keyframes slideInUp {
    from {
        transform: translateY(100%);
        opacity: 0;
    }

    to {
        transform: translateY(0);
        opacity: 1;
    }
}

/* Premium Footer */
.footer-premium {
    background-color: #0f172a;
    /* Dark Slate 900 */
    color: #94a3b8;
    /* Slate 400 */
    font-size: 0.9rem;
}

.footer-premium h5,
.footer-premium h6 {
    letter-spacing: 0.05em;
}

.footer-premium .text-muted {
    color: #94a3b8 !important;
}

.footer-premium .hover-white {
    transition: color 0.2s ease;
}

.footer-premium .hover-white:hover {
    color: #f8fafc !important;
    /* Slate 50 */
}

.footer-premium hr {
    border-color: #334155 !important;
    /* Slate 700 */
    opacity: 0.5;
}

.tracking-wider {
    letter-spacing: 0.05em;
}

/* ==========================================================================
   Search Result Cards
   ========================================================================== */

.company-result-card {
    display: block;
    background-color: #ffffff;
    border: 1px solid var(--border-color);
    border-radius: 1rem;
    padding: 1.5rem;
    margin-bottom: 1rem;
    transition: all 0.2s ease-in-out;
    text-decoration: none;
    position: relative;
    overflow: hidden;
}

.company-result-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-md);
    border-color: var(--primary-color);
    text-decoration: none;
}

.company-result-card .card-icon {
    width: 48px;
    height: 48px;
    background-color: #f1f5f9;
    color: var(--primary-color);
    border-radius: 0.75rem;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    flex-shrink: 0;
}

.company-result-card:hover .card-icon {
    background-color: var(--primary-color);
    color: #ffffff;
}

.company-result-card .company-name {
    color: var(--text-main);
    font-weight: 600;
    font-size: 1.1rem;
    line-height: 1.4;
    margin-bottom: 0.25rem;
}

.company-result-card .company-subtext {
    color: var(--text-muted);
    font-size: 0.9rem;
}

.company-result-card .info-item {
    display: flex;
    align-items: center;
    color: var(--text-secondary);
    font-size: 0.9rem;
    margin-top: 0.5rem;
}

.company-result-card .info-item i {
    margin-right: 0.5rem;
    color: var(--text-light);
}

.company-result-card .status-badge {
    font-size: 0.75rem;
    font-weight: 600;
    padding: 0.35em 0.8em;
    border-radius: 999px;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.socios-js .company-list-container:not(.socios-skeleton) {
    display: none;
}

.socios-js .company-list-container.socios-results-visible {
    display: block;
}

.socios-skeleton {
    display: none;
    gap: 1rem;
}

.socios-js .socios-skeleton {
    display: flex;
    flex-direction: column;
}

.socios-header {
    background:
        radial-gradient(circle at top right, rgba(59, 130, 246, 0.06), transparent 28%),
        linear-gradient(180deg, #ffffff 0%, #f8fafc 100%);
}

.socios-header__identity {
    gap: 0.25rem;
}

.socios-header__icon {
    width: 88px;
    height: 88px;
    border-radius: 999px;
    background: linear-gradient(135deg, #dbeafe 0%, #bfdbfe 100%);
    color: #2563eb;
}

.socios-header__meta {
    font-size: 1.15rem;
    line-height: 1.5;
}

.socios-header__name {
    display: inline-block;
    color: #1e3a8a;
    font-weight: 800;
    letter-spacing: -0.01em;
    text-transform: uppercase;
}

.socios-header__summary {
    padding: 1rem 1.1rem;
    border-radius: 1.25rem;
    background: rgba(255, 255, 255, 0.92);
    border: 1px solid rgba(203, 213, 225, 0.9);
    box-shadow: 0 14px 28px rgba(15, 23, 42, 0.04);
    color: #475569;
}

.socios-header__summary-label {
    display: inline-block;
    margin-bottom: 0.45rem;
    font-size: 0.78rem;
    font-weight: 700;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    color: #64748b;
}

.company-result-card-skeleton {
    pointer-events: none;
}

.socios-gate-stack {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.socios-gated-card {
    position: relative;
    overflow: hidden;
    min-height: 260px;
    background: linear-gradient(180deg, #ffffff 0%, #f8fafc 100%);
}

.socios-gated-card__content {
    filter: blur(5px);
    opacity: 0.9;
    user-select: none;
    pointer-events: none;
}

.socios-gated-card--primary .socios-gated-card__content {
    filter: blur(7px);
}

.socios-gated-card__overlay {
    position: absolute;
    inset: 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    padding: 2rem;
    background: linear-gradient(180deg, rgba(255, 255, 255, 0.72) 0%, rgba(255, 255, 255, 0.94) 40%, rgba(255, 255, 255, 0.98) 100%);
}

.socios-skeleton__icon,
.socios-skeleton__line,
.socios-skeleton__badge {
    background: linear-gradient(90deg, #eef2f7 0%, #f8fafc 50%, #eef2f7 100%);
    background-size: 200% 100%;
    animation: socios-skeleton-loading 1.3s ease-in-out infinite;
}

.socios-skeleton__icon {
    border-radius: 0.75rem;
    width: 48px;
    height: 48px;
    flex-shrink: 0;
}

.socios-skeleton__line {
    height: 14px;
    border-radius: 999px;
    margin-bottom: 0.65rem;
}

.socios-skeleton__line--title {
    width: 38%;
    height: 18px;
}

.socios-skeleton__line--subtitle {
    width: 28%;
}

.socios-skeleton__line--cnpj {
    width: 22%;
}

.socios-skeleton__line--info {
    width: 78%;
    margin-bottom: 0;
}

.socios-skeleton__badge {
    width: 82px;
    height: 34px;
    border-radius: 999px;
    flex-shrink: 0;
}

@keyframes socios-skeleton-loading {
    0% {
        background-position: 200% 0;
    }

    100% {
        background-position: -200% 0;
    }
}

@media (max-width: 991.98px) {
    .socios-header__icon {
        width: 72px;
        height: 72px;
    }

    .socios-header__meta {
        font-size: 1rem;
    }

    .socios-header__summary {
        margin-top: 0.25rem;
    }
}

/* Card Specific Hover Borders */
.hover-border-primary {
    transition: box-shadow 0.3s ease, border-color 0.3s ease;
}
.hover-border-primary:hover {
    border-color: var(--primary-color) !important;
    box-shadow: 0 0 0 1px var(--primary-color);
}

.hover-border-success {
    transition: box-shadow 0.3s ease, border-color 0.3s ease;
}
.hover-border-success:hover {
    border-color: #198754 !important; /* Bootstrap success */
    box-shadow: 0 0 0 1px #198754;
}

/* ==========================================================================
   NextAPI Promo
   ========================================================================== */

.nextapi-promo {
    position: relative;
    overflow: hidden;
    background:
        radial-gradient(circle at top right, rgba(255, 255, 255, 0.12), transparent 35%),
        linear-gradient(135deg, #f8fbff 0%, #edf4ff 52%, #e6f4f7 100%);
    color: #f8fafc;
    border: 1px solid rgba(29, 78, 216, 0.12);
    box-shadow: 0 16px 38px rgba(15, 23, 42, 0.08);
}

.nextapi-promo-compact {
    box-shadow: 0 10px 24px rgba(15, 23, 42, 0.06);
}

.nextapi-promo-ultracompact {
    box-shadow: 0 8px 20px rgba(15, 23, 42, 0.05);
}

.nextapi-promo__glow {
    position: absolute;
    inset: auto auto -80px -40px;
    width: 220px;
    height: 220px;
    border-radius: 999px;
    background: rgba(59, 130, 246, 0.08);
    filter: blur(18px);
    pointer-events: none;
}

.nextapi-promo__eyebrow {
    background: rgba(29, 78, 216, 0.08);
    border: 1px solid rgba(29, 78, 216, 0.12);
    color: #1d4ed8;
    font-size: 0.72rem;
    letter-spacing: 0.04em;
    text-transform: uppercase;
}

.nextapi-promo__title {
    font-size: clamp(1.25rem, 2vw, 1.65rem);
    font-weight: 700;
    line-height: 1.2;
    color: #0f172a;
    letter-spacing: -0.03em;
}

.nextapi-promo__description,
.nextapi-promo__supporting {
    max-width: 44rem;
    color: #475569;
    font-size: 0.96rem;
}

.nextapi-promo__chip {
    display: inline-flex;
    align-items: center;
    padding: 0.38rem 0.7rem;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.72);
    border: 1px solid rgba(148, 163, 184, 0.22);
    color: #334155;
    font-size: 0.82rem;
}

.nextapi-promo__code {
    display: inline-flex;
    flex-direction: column;
    gap: 0.35rem;
    padding: 0.75rem 0.9rem;
    border-radius: 1rem;
    background: rgba(255, 255, 255, 0.68);
    border: 1px solid rgba(148, 163, 184, 0.22);
}

.nextapi-promo__code-label {
    font-size: 0.68rem;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: #0f766e;
}

.nextapi-promo__code code {
    color: #0f172a;
    font-size: 0.86rem;
}

.nextapi-promo__cta {
    background: #1d4ed8;
    color: #ffffff;
    font-weight: 700;
    padding: 0.72rem 1.05rem;
    border-radius: 999px;
    border: 0;
    box-shadow: 0 8px 22px rgba(29, 78, 216, 0.22);
}

.nextapi-promo__cta:hover,
.nextapi-promo__cta:focus {
    background: #1e40af;
    color: #ffffff;
    transform: translateY(-1px);
}

.nextapi-promo__icon-shell {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 116px;
    height: 116px;
    border-radius: 2rem;
    background: rgba(255, 255, 255, 0.72);
    border: 1px solid rgba(148, 163, 184, 0.18);
    backdrop-filter: blur(10px);
    color: #1d4ed8;
    font-size: 2.8rem;
}

.nextapi-promo-ultracompact .nextapi-promo__title {
    font-size: clamp(1.12rem, 1.6vw, 1.4rem);
    margin-bottom: 0.45rem !important;
}

.nextapi-promo-ultracompact .nextapi-promo__description {
    margin-bottom: 0.55rem !important;
    font-size: 0.9rem;
}

.nextapi-promo-ultracompact .nextapi-promo__supporting {
    margin-bottom: 0.75rem !important;
    font-size: 0.88rem;
}

.nextapi-promo-ultracompact .nextapi-promo__chip {
    padding: 0.32rem 0.62rem;
    font-size: 0.78rem;
}

.nextapi-promo-ultracompact .nextapi-promo__icon-shell {
    width: 92px;
    height: 92px;
    font-size: 2.2rem;
}

.nextapi-promo-ultracompact .nextapi-promo__cta {
    padding: 0.64rem 0.96rem;
    font-size: 0.95rem;
}

@media (max-width: 991.98px) {
    .nextapi-promo__title {
        font-size: 1.35rem;
    }

    .nextapi-promo__description,
    .nextapi-promo__supporting {
        max-width: none;
    }
}
