/* Modern Professional Design - AI Receptionist Portal */

/* Base Styles */
:root {
    --primary-color: #258cfb;
    --primary-dark: #1a6dc9;
    --primary-light: #e3f2fd;
    --secondary-color: #6c757d;
    --success-color: #10b981;
    --danger-color: #ef4444;
    --warning-color: #f59e0b;
    --text-primary: #1f2937;
    --text-secondary: #6b7280;
    --bg-light: #f9fafb;
    --bg-white: #ffffff;
    --border-color: #e5e7eb;
    --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);
    --shadow-xl: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
    --radius-sm: 0.375rem;
    --radius-md: 0.5rem;
    --radius-lg: 0.75rem;
    --radius-xl: 1rem;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    font-size: 14px;
    scroll-behavior: smooth;
}

@media (min-width: 768px) {
    html {
        font-size: 16px;
    }
}

/************************************
By Jorge
*************************************/
body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    color: var(--text-primary);
    background-color: #f5f5ff;
    line-height: 1.6;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

.btn-outline-primary {
    --bs-btn-color: #387bf9;
    --bs-btn-border-color: #387bf9;
    --bs-btn-hover-bg: #0b57e5 !important;
    --bs-btn-hover-border-color: #0b57e5;
    --bs-btn-active-bg: #0847be;
    --bs-btn-active-border-color: #0847be;
}

.table > :not(caption) > * > * {
    padding: .5rem .5rem;
    color: var(--bs-table-color-state, var(--bs-table-color-type, var(--bs-table-color)));
    background-color: #ffffff;
    border-bottom-width: var(--bs-border-width);
    box-shadow: inset 0 0 0 9999px var(--bs-table-bg-state, var(--bs-table-bg-type, var(--bs-table-accent-bg)));
}

.list-group-item {
    background-color: #f8f9fa;
}

/************************************
*************************************/


/* Header Styles */
.modern-header {
    background: var(--bg-white);
    box-shadow: var(--shadow-sm);
    position: sticky;
    top: 0;
    z-index: 1000;
    border-bottom: 1px solid var(--border-color);
}

    .modern-header .navbar {
        padding: 0.75rem 0;
    }

.navbar-brand {
    font-weight: 600;
    font-size: 1.25rem;
    color: var(--text-primary);
    transition: opacity 0.2s ease;
    text-decoration: none;
}

    .navbar-brand:hover {
        opacity: 0.8;
        color: var(--text-primary);
    }

.brand-icon {
    display: flex;
    align-items: center;
    justify-content: center;
}

.brand-text {
    font-weight: 700;
    letter-spacing: -0.02em;
}

.navbar-toggler {
    padding: 0.5rem;
    border-radius: var(--radius-md);
    transition: background-color 0.2s ease;
}

    .navbar-toggler:focus {
        box-shadow: none;
        background-color: var(--bg-light);
    }

    .navbar-toggler:hover {
        background-color: var(--bg-light);
    }

.navbar-nav {
    gap: 0.25rem;
}

@media (min-width: 992px) {
    .navbar-nav {
        gap: 0.5rem;
    }
}

.nav-link {
    color: var(--text-secondary);
    font-weight: 500;
    font-size: 0.938rem;
    padding: 0.5rem 1rem;
    border-radius: var(--radius-md);
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    text-decoration: none;
}

    .nav-link:hover {
        color: var(--primary-color);
        background-color: var(--primary-light);
    }

    .nav-link svg {
        opacity: 0.7;
        transition: opacity 0.2s ease;
    }

    .nav-link:hover svg {
        opacity: 1;
    }

    .nav-link.active {
        color: var(--primary-color);
        background-color: var(--primary-light);
    }

/* Main Content */
.main-content {
    flex: 1;
    padding: 2rem 0;
}

@media (min-width: 768px) {
    .main-content {
        padding: 0rem 0;
    }
}

/* Footer Styles */
.modern-footer {
    background: var(--bg-white);
    border-top: 1px solid var(--border-color);
    margin-top: auto;
    color: var(--text-secondary);
    font-size: 0.875rem;
}

    .modern-footer p {
        margin-bottom: 0;
    }

.footer-link {
    color: var(--text-secondary);
    text-decoration: none;
    transition: color 0.2s ease;
    font-weight: 500;
}

    .footer-link:hover {
        color: var(--primary-color);
    }

/* Form Styles */
.btn:focus,
.btn:active:focus,
.btn-link.nav-link:focus,
.form-control:focus,
.form-check-input:focus {
    box-shadow: 0 0 0 0.1rem white, 0 0 0 0.25rem var(--primary-color);
}

.btn {
    font-weight: 500;
    border-radius: var(--radius-md);
    padding: 0.625rem 1.25rem;
    transition: all 0.2s ease;
    border: none;
}

.btn-primary {
    background-color: var(--primary-color);
    color: white;
}

    .btn-primary:hover {
        background-color: var(--primary-dark);
        transform: translateY(-1px);
        box-shadow: var(--shadow-md);
    }

.form-control {
    border-radius: var(--radius-md);
    border: 1px solid var(--border-color);
    padding: 0.625rem 0.875rem;
    transition: all 0.2s ease;
}

    .form-control:focus {
        border-color: var(--primary-color);
        box-shadow: 0 0 0 3px var(--primary-light);
    }

.form-floating > .form-control-plaintext::placeholder,
.form-floating > .form-control::placeholder {
    color: var(--text-secondary);
    text-align: end;
}

.form-floating > .form-control-plaintext:focus::placeholder,
.form-floating > .form-control:focus::placeholder {
    text-align: start;
}

/* Card Styles */
.card {
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-sm);
    transition: all 0.3s ease;
    background: #fff;
}

    .card:hover {
        box-shadow: var(--shadow-md);
        transform: translateY(-2px);
    }

.card-header {
    background-color: #e9ecef;
    border-bottom: 1px solid #adb5bd;
    font-weight: 600;
    padding: 1rem 1.25rem;
}

.card-body {
    padding: 1.5rem 1.25rem;
}

/* Alert Styles */
.alert {
    border-radius: var(--radius-md);
    border: none;
    padding: 1rem 1.25rem;
    box-shadow: var(--shadow-sm);
}

.alert-info {
    background-color: #c8e7f7;
    color: var(--primary-dark);
}

.alert-success {
    background-color: #d1fae5;
    color: #065f46;
}

.alert-warning {
    background-color: #fef3c7;
    color: #92400e;
}

.alert-danger {
    background-color: #fee2e2;
    color: #991b1b;
}

/* Badge Styles */
.badge {
    border-radius: var(--radius-sm);
    padding: 0.375rem 0.625rem;
    font-weight: 600;
    font-size: 0.75rem;
}

/* Mobile Responsiveness */
@media (max-width: 991.98px) {
    .navbar-collapse {
        background: var(--bg-white);
        padding: 1rem 0;
        margin-top: 0.5rem;
        border-top: 1px solid var(--border-color);
    }

    .nav-link {
        padding: 0.75rem 1rem;
        margin: 0.125rem 0;
    }

    .main-content {
        padding: 1.5rem 0;
    }

    .container {
        padding-left: 1rem;
        padding-right: 1rem;
    }
}

@media (max-width: 575.98px) {
    .brand-text {
        font-size: 1.125rem;
    }

    .main-content {
        padding: 1rem 0;
    }

    .card-body {
        padding: 1rem;
    }

    .modern-footer .row > div {
        text-align: center !important;
    }

    .modern-footer .col-md-6:last-child {
        margin-top: 0.5rem;
    }
}

/* Utility Classes */
.text-primary {
    color: #2988fa !important;
}

.bg-primary {
    background-color: #1f4070 !important;
}

.shadow-sm {
    box-shadow: var(--shadow-sm) !important;
}

.shadow-md {
    box-shadow: var(--shadow-md) !important;
}

.shadow-lg {
    box-shadow: var(--shadow-lg) !important;
}

.rounded-md {
    border-radius: var(--radius-md) !important;
}

.rounded-lg {
    border-radius: var(--radius-lg) !important;
}

/* ── Legal pages (Terms, Privacy, Cookie Policy) ──────────────────────────── */
.legal-content {
    font-size: 0.9rem;
    line-height: 1.75;
    color: #374151;
    max-width: 860px;
}

    .legal-content h2 {
        font-size: 1.1rem;
        font-weight: 700;
        margin-top: 2rem;
        margin-bottom: 0.5rem;
        color: #1f2937;
        border-bottom: 1px solid #e5e7eb;
        padding-bottom: 0.25rem;
    }

    .legal-content h3 {
        font-size: 0.95rem;
        font-weight: 600;
        margin-top: 1.25rem;
        margin-bottom: 0.375rem;
        color: #374151;
    }

    .legal-content p,
    .legal-content ul,
    .legal-content ol,
    .legal-content table {
        margin-bottom: 0.875rem;
    }

        .legal-content p.lead {
            font-size: 0.9375rem;
            color: #6b7280;
        }

    .legal-content address {
        font-size: 0.875rem;
        line-height: 1.8;
    }

    .legal-content table {
        font-size: 0.8125rem;
    }

    .legal-content code {
        font-size: 0.8rem;
        background: #f3f4f6;
        padding: 0.1em 0.3em;
        border-radius: 0.25rem;
    }

/* Loading Animation */
@keyframes pulse {
    0%, 100% {
        opacity: 1;
    }

    50% {
        opacity: 0.5;
    }
}

.pulse {
    animation: pulse 2s cubic-bezier(0.4, 0, 0.6, 1) infinite;
}

/* Smooth Transitions */
a, button, .btn, .nav-link, .card {
    transition: all 0.2s ease;
}

/* Focus Visible for Accessibility */
*:focus-visible {
    outline: 2px solid var(--primary-color);
    outline-offset: 2px;
}

/* Print Styles */
@media print {
    .modern-header,
    .modern-footer {
        display: none;
    }

    .main-content {
        padding: 0;
    }
}

/* ===== Knowledge Source cards ===== */
.source-card {
    transition: transform 0.15s ease, box-shadow 0.15s ease, border-color 0.15s ease;
    cursor: pointer;
    border: 2px solid transparent;
}

    .source-card:hover {
        transform: translateY(-4px);
        box-shadow: var(--shadow-md);
        border-color: var(--primary-color);
    }

/* ===== Plan cards (Plans page) ===== */
.plan-card {
    transition: transform 0.18s ease, box-shadow 0.18s ease;
    cursor: pointer;
}

    .plan-card:hover {
        transform: translateY(-6px);
        box-shadow: var(--shadow-xl);
    }

    .plan-card.popular,
    .plan-card--popular {
        transform: scale(1.03);
    }

        .plan-card.popular:hover,
        .plan-card--popular:hover {
            transform: scale(1.03) translateY(-6px);
            box-shadow: var(--shadow-xl);
        }
