/* ============================================
   CRM Lead Portal - Custom Styles
   Modern, Professional Design
   ============================================ */

/* ============================================
   CSS Variables - Design System
   ============================================ */
:root {
    --primary-color: #2563eb;
    --primary-dark: #1d4ed8;
    --primary-light: #60a5fa;
    --secondary-color: #64748b;
    --success-color: #22c55e;
    --warning-color: #f59e0b;
    --danger-color: #ef4444;
    --info-color: #06b6d4;
    --gradient-primary: linear-gradient(135deg, #2563eb 0%, #7c3aed 100%);
    /*--gradient-dark: linear-gradient(to right, #141e30, #243b55);*/
    --gradient-dark: linear-gradient(135deg, #1e293b 0%, #0f172a 100%);
    --gradient-light: linear-gradient(135deg, #f8fafc 0%, #e2e8f0 100%);
    --yellow-gradient: linear-gradient(to right, #efb343, #FAEB1E);
    --text-primary: #1e293b;
    --text-secondary: #64748b;
    --text-light: #94a3b8;
    --bg-light: #f8fafc;
    --bg-white: #ffffff;
    --border-color: #e2e8f0;
    --shadow-sm: 0 1px 2px 0 rgb(0 0 0 / 0.05);
    --shadow-md: 0 4px 6px -1px rgb(0 0 0 / 0.1), 0 2px 4px -2px rgb(0 0 0 / 0.1);
    --shadow-lg: 0 10px 15px -3px rgb(0 0 0 / 0.1), 0 4px 6px -4px rgb(0 0 0 / 0.1);
    --shadow-xl: 0 20px 25px -5px rgb(0 0 0 / 0.1), 0 8px 10px -6px rgb(0 0 0 / 0.1);
    --radius-sm: 0.375rem;
    --radius-md: 0.5rem;
    --radius-lg: 0.75rem;
    --radius-xl: 1rem;
    --transition-fast: 150ms ease;
    --transition-normal: 300ms ease;
}

/* ============================================
   Base Styles
   ============================================ */
html {
    scroll-behavior: smooth;
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    color: var(--text-primary);
    background-color: var(--bg-light);
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

.main-content {
    flex: 1;
}

/* ============================================
   Navigation
   ============================================ */
.bg-gradient-primary {
    background: var(--gradient-primary) !important;
}

.navbar {
    padding: 1rem 0;
    box-shadow: var(--shadow-md);
}

.navbar-brand {
    font-size: 1.5rem;
    font-weight: 700;
}

.navbar-dark .navbar-nav .nav-link {
    color: rgba(255, 255, 255, 0.85);
    padding: 0.5rem 1rem;
    border-radius: var(--radius-md);
    transition: var(--transition-fast);
    font-weight: 500;
}

    .navbar-dark .navbar-nav .nav-link:hover,
    .navbar-dark .navbar-nav .nav-link:focus {
        color: #ffffff;
        background-color: rgba(255, 255, 255, 0.1);
    }

/* ============================================
   Hero Section
   ============================================ */
.hero-section {
    background: #034E9F;
    /*background: var(--gradient-dark);*/
    /*padding: 5rem 0;*/
    position: relative;
    overflow: hidden;
}

    .hero-section::before {
        content: '';
        position: absolute;
        top: 0;
        left: 0;
        right: 0;
        bottom: 0;
        background: url("data:image/svg+xml,%3Csvg width='60' height='60' viewBox='0 0 60 60' xmlns='http://www.w3.org/2000/svg'%3E%3Cg fill='none' fill-rule='evenodd'%3E%3Cg fill='%23ffffff' fill-opacity='0.03'%3E%3Cpath d='M36 34v-4h-2v4h-4v2h4v4h2v-4h4v-2h-4zm0-30V0h-2v4h-4v2h4v4h2V6h4V4h-4zM6 34v-4H4v4H0v2h4v4h2v-4h4v-2H6zM6 4V0H4v4H0v2h4v4h2V6h4V4H6z'/%3E%3C/g%3E%3C/g%3E%3C/svg%3E");
    }

.min-vh-50 {
    min-height: 50vh;
}

.text-gradient {
    background: linear-gradient(135deg, #60a5fa 0%, #a78bfa 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.hero-image-container {
    display: flex;
    justify-content: center;
    align-items: center;
}

.hero-icon {
    font-size: 15rem;
    color: rgba(255, 255, 255, 0.1);
    animation: float 3s ease-in-out infinite;
}

@keyframes float {

    0%, 100% {
        transform: translateY(0);
    }

    50% {
        transform: translateY(-20px);
    }
}

/* ============================================
   Page Header
   ============================================ */
.page-header {
    background: var(--yellow-gradient);
    padding: 3rem 0;
    margin-bottom: 0;
}

/* ============================================
   Action Cards (Home Page)
   ============================================ */
.action-card {
    background: var(--bg-white);
    border-radius: var(--radius-xl);
    padding: 2.5rem;
    box-shadow: var(--shadow-lg);
    transition: var(--transition-normal);
    height: 100%;
    border: 1px solid var(--border-color);
}

    .action-card:hover {
        transform: translateY(-5px);
        box-shadow: var(--shadow-xl);
    }

.card-icon-wrapper {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    background: var(--gradient-primary);
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 1.5rem;
}

    .card-icon-wrapper.track {
        background: linear-gradient(135deg, #7c3aed 0%, #a855f7 100%);
    }

    .card-icon-wrapper i {
        font-size: 2.5rem;
        color: white;
    }

.action-card h3 {
    font-weight: 700;
    margin-bottom: 1rem;
    color: var(--text-primary);
}

.feature-list {
    list-style: none;
    padding: 0;
    margin: 1.5rem 0;
}

    .feature-list li {
        padding: 0.5rem 0;
        display: flex;
        align-items: center;
        gap: 0.5rem;
    }

/* ============================================
   Feature Cards
   ============================================ */
.feature-card {
    background: var(--bg-white);
    border-radius: var(--radius-lg);
    padding: 1.5rem;
    text-align: center;
    box-shadow: var(--shadow-md);
    transition: var(--transition-normal);
    height: 100%;
    border: 1px solid var(--border-color);
}

    .feature-card:hover {
        transform: translateY(-3px);
        box-shadow: var(--shadow-lg);
        border-color: var(--primary-light);
    }

    .feature-card i {
        font-size: 2.5rem;
        color: var(--primary-color);
        margin-bottom: 1rem;
    }

    .feature-card h5 {
        font-weight: 600;
        margin-bottom: 0.5rem;
    }

    .feature-card p {
        color: var(--text-secondary);
        font-size: 0.875rem;
        margin-bottom: 0;
    }

/* ============================================
   Form Card
   ============================================ */
.form-card {
    background: var(--bg-white);
    border-radius: var(--radius-xl);
    padding: 2.5rem;
    box-shadow: var(--shadow-lg);
    border: 1px solid var(--border-color);
}

.form-section {
    margin-bottom: 2rem;
    padding-bottom: 2rem;
    border-bottom: 1px solid var(--border-color);
}

    .form-section:last-of-type {
        border-bottom: none;
        margin-bottom: 1rem;
        padding-bottom: 0;
    }

.section-title {
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 1.5rem;
    display: flex;
    align-items: center;
}

    .section-title i {
        color: var(--primary-color);
    }

/* ============================================
   Form Controls
   ============================================ */
.form-floating > .form-control,
.form-floating > .form-select {
    border-radius: var(--radius-md);
    border: 2px solid var(--border-color);
    transition: var(--transition-fast);
}

    .form-floating > .form-control:focus,
    .form-floating > .form-select:focus {
        border-color: var(--primary-color);
        box-shadow: 0 0 0 4px rgba(37, 99, 235, 0.1);
    }

.form-floating > label {
    color: var(--text-secondary);
}

.form-control.is-invalid,
.form-select.is-invalid {
    border-color: var(--danger-color);
}

.form-control.is-valid,
.form-select.is-valid {
    border-color: var(--success-color);
}

/* ============================================
   CAPTCHA
   ============================================ */
.captcha-container {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.captcha-display {
    background: linear-gradient(135deg, #f1f5f9 0%, #e2e8f0 100%);
    border: 2px dashed var(--border-color);
    border-radius: var(--radius-md);
    padding: 1rem 1.5rem;
    font-size: 1.25rem;
    font-weight: 600;
    color: var(--text-primary);
    display: flex;
    align-items: center;
    justify-content: center;
    min-width: 200px;
    user-select: none;
}

#refreshCaptcha {
    border-radius: 50%;
    width: 40px;
    height: 40px;
    padding: 0;
    display: flex;
    align-items: center;
    justify-content: center;
}

    #refreshCaptcha:hover {
        transform: rotate(180deg);
        transition: transform 0.3s ease;
    }

/* ============================================
   Buttons
   ============================================ */
.btn {
    font-weight: 500;
    border-radius: var(--radius-md);
    padding: 0.625rem 1.25rem;
    transition: var(--transition-fast);
}

.btn-lg {
    padding: 0.875rem 1.75rem;
    font-size: 1rem;
}

.btn-primary {
    background: var(--gradient-primary);
    border: none;
}

    .btn-primary:hover {
        transform: translateY(-1px);
        box-shadow: 0 4px 12px rgba(37, 99, 235, 0.4);
    }

.btn-outline-primary {
    border: 2px solid var(--primary-color);
    color: var(--primary-color);
}

    .btn-outline-primary:hover {
        background: var(--primary-color);
        border-color: var(--primary-color);
    }

/* ============================================
   Lead Result Card
   ============================================ */
.lead-result-card {
    background: var(--bg-light);
    border-radius: var(--radius-lg);
    padding: 1.5rem;
    border: 1px solid var(--border-color);
}

.detail-item {
    padding: 0.75rem 0;
}

.detail-label {
    display: block;
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    color: var(--text-secondary);
    margin-bottom: 0.25rem;
}

.detail-value {
    font-size: 1rem;
    font-weight: 500;
    color: var(--text-primary);
}

/* ============================================
   Call Centre Form
   ============================================ */
.call-centre-form {
    background: var(--bg-light);
    border-radius: var(--radius-lg);
    padding: 1.5rem;
    margin-top: 1rem;
    border: 1px solid var(--border-color);
}

/* ============================================
   Terms & Conditions
   ============================================ */
.terms-content {
    line-height: 1.8;
}

.terms-section {
    margin-bottom: 2rem;
    padding-bottom: 2rem;
    border-bottom: 1px solid var(--border-color);
}

    .terms-section:last-of-type {
        border-bottom: none;
    }

    .terms-section h3 {
        font-weight: 600;
        margin-bottom: 1rem;
        color: var(--text-primary);
    }

    .terms-section ul {
        margin-left: 1.5rem;
    }

    .terms-section li {
        margin-bottom: 0.5rem;
    }

.contact-info {
    border-left: 4px solid var(--primary-color);
}

/* ============================================
   Footer
   ============================================ */
.footer {
    background: var(--gradient-dark) !important;
}

    .footer h5,
    .footer h6 {
        font-weight: 600;
    }

    .footer a {
        text-decoration: none;
        transition: var(--transition-fast);
    }

        .footer a:hover {
            color: var(--primary-light) !important;
        }

/* ============================================
   Alerts
   ============================================ */
.alert {
    border-radius: var(--radius-md);
    border: none;
}

.alert-success {
    background-color: #dcfce7;
    color: #166534;
}

.alert-danger {
    background-color: #fee2e2;
    color: #991b1b;
}

/* ============================================
   Form Validation
   ============================================ */
.field-validation-error {
    color: var(--danger-color);
    font-size: 0.875rem;
    margin-top: 0.25rem;
}

.input-validation-error {
    border-color: var(--danger-color) !important;
}

/* ============================================
   Textarea Heights (no inline styles needed)
   ============================================ */
.textarea-comments {
    height: 100px;
}

/* ============================================
   Hidden Fields
   ============================================ */
.field-hidden {
    display: none !important;
}

/* ============================================
   Loading States
   ============================================ */
.btn-loading {
    position: relative;
    pointer-events: none;
}

    .btn-loading::after {
        content: '';
        position: absolute;
        width: 1rem;
        height: 1rem;
        border: 2px solid transparent;
        border-top-color: currentColor;
        border-radius: 50%;
        animation: spin 0.8s linear infinite;
        margin-left: 0.5rem;
    }

@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}

/* ============================================
   Responsive Design
   ============================================ */
@media (max-width: 991.98px) {
    .hero-section {
        padding: 3rem 0;
    }

    .hero-icon {
        font-size: 8rem;
    }

    .form-card {
        padding: 1.5rem;
    }
}

@media (max-width: 767.98px) {
    .hero-section {
        padding: 2rem 0;
        text-align: center;
    }

    .hero-image-container {
        margin-top: 2rem;
    }

    .action-card {
        padding: 1.5rem;
    }

    .captcha-container {
        flex-direction: column;
        align-items: stretch;
    }

    .captcha-display {
        min-width: auto;
    }

    .page-header {
        padding: 2rem 0;
    }

        .page-header h1 {
            font-size: 1.75rem;
        }
}

/* ============================================
   Print Styles
   ============================================ */
@media print {

    .navbar,
    .footer,
    .btn,
    .captcha-container {
        display: none !important;
    }

    .form-card {
        box-shadow: none;
        border: 1px solid #ddd;
    }
}
