/* Consultant Authority Page - Modern Premium Design */

:root {
    --primary-red: #c0392b;
    /* Startkey Red */
    --primary-dark: #1a1a1a;
    --text-grey: #4a4a4a;
    --bg-soft: #f4f6f8;
    --glass-bg: rgba(255, 255, 255, 0.95);
    --glass-border: rgba(255, 255, 255, 0.5);
    --shadow-soft: 0 10px 40px -10px rgba(0, 0, 0, 0.08);
    --shadow-hover: 0 20px 40px -10px rgba(0, 0, 0, 0.15);
}

/* --- SUPER AGGRESSIVE SCROLL FIX --- */
/* This overrides any legacy SPA styles blocking scrolling */
html,
body {
    height: auto !important;
    min-height: 100vh !important;
    overflow-y: auto !important;
    overflow-x: hidden !important;
}

#view-profile.active-profile {
    display: block !important;
    height: auto !important;
    min-height: 100vh !important;
    overflow: visible !important;
    position: relative !important;
}

main {
    overflow: visible !important;
    height: auto !important;
}

/* Ensure container scrolls */
.consultant-page-wrapper {
    background-color: var(--bg-soft);
    min-height: 100vh;
    padding-bottom: 4rem;
    font-family: 'Outfit', sans-serif;
    position: relative;
    z-index: 100;
}

/* HERO SECTION */
.consultant-hero-banner {
    background: linear-gradient(135deg, #1a1a1a, #2c3e50);
    /* Fallback */
    background-image: linear-gradient(to bottom, rgba(0, 0, 0, 0.3), rgba(0, 0, 0, 0.6)), url('https://images.unsplash.com/photo-1486406146926-c627a92ad1ab?auto=format&fit=crop&w=1920&q=80');
    background-size: cover;
    background-position: center;
    height: 350px;
    /* Increased slightly */
    width: 100%;
    margin-bottom: -100px;
    /* Overlap effect */
}

.profile-card-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
    position: relative;
    z-index: 10;
    display: flex;
    gap: 30px;
    align-items: flex-start;
    /* Ensure items align top */
}

@media (max-width: 900px) {
    .profile-card-container {
        flex-direction: column;
        margin-top: -50px;
    }
}

/* MAIN PROFILE CARD */
.profile-main-card {
    flex: 2;
    background: var(--glass-bg);
    backdrop-filter: blur(10px);
    border: 1px solid var(--glass-border);
    border-radius: 20px;
    padding: 40px;
    box-shadow: var(--shadow-soft);
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.profile-header-row {
    display: flex;
    align-items: center;
    gap: 30px;
}

.profile-avatar-lg {
    width: 160px;
    height: 160px;
    border-radius: 50%;
    object-fit: cover;
    border: 5px solid white;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
}

.profile-info h1 {
    font-size: 2.5rem;
    font-weight: 700;
    color: var(--primary-dark);
    margin: 0;
    letter-spacing: -0.5px;
}

.profile-info .role-badge {
    display: inline-block;
    background: rgba(192, 57, 43, 0.1);
    /* Red tint */
    color: var(--primary-red);
    padding: 6px 14px;
    border-radius: 50px;
    font-weight: 600;
    font-size: 0.9rem;
    margin-top: 10px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.profile-bio {
    color: var(--text-grey);
    line-height: 1.7;
    font-size: 1.05rem;
    margin-top: 15px;
}

.contact-pill-row {
    display: flex;
    gap: 15px;
    margin-top: 15px;
    flex-wrap: wrap;
}

.contact-pill {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    padding: 12px 24px;
    border-radius: 12px;
    text-decoration: none;
    font-weight: 600;
    transition: all 0.3s ease;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.05);
}

.btn-whatsapp {
    background-color: #25D366;
    color: white;
}

.btn-whatsapp:hover {
    background-color: #1ebc59;
    transform: translateY(-2px);
}

.btn-phone {
    background-color: var(--primary-dark);
    color: white;
}

.btn-phone:hover {
    background-color: #000;
    transform: translateY(-2px);
}

.btn-instagram {
    background: linear-gradient(45deg, #f09433 0%, #e6683c 25%, #dc2743 50%, #cc2366 75%, #bc1888 100%);
    color: white;
}

.btn-instagram:hover {
    filter: brightness(1.1);
    transform: translateY(-2px);
}

/* LEAD FORM SIDEBAR */
.profile-sidebar {
    flex: 1;
    min-width: 320px;
}

.lead-sticky-card {
    background: white;
    border-radius: 20px;
    padding: 30px;
    box-shadow: var(--shadow-soft);
    position: sticky;
    top: 20px;
    /* Sticky effect works now because container overflows */
    border-top: 5px solid var(--primary-red);
    /* Red accent line */
}

.lead-form-header h3 {
    margin: 0;
    font-size: 1.4rem;
    color: var(--primary-dark);
}

.lead-form-header p {
    margin: 5px 0 20px 0;
    color: #888;
    font-size: 0.9rem;
}

.modern-input {
    width: 100%;
    padding: 14px 18px;
    margin-bottom: 15px;
    border: 1px solid #e0e0e0;
    border-radius: 12px;
    font-size: 1rem;
    font-family: inherit;
    transition: border-color 0.3s, box-shadow 0.3s;
    background: #fdfdfd;
}

.modern-input:focus {
    outline: none;
    border-color: var(--primary-red);
    box-shadow: 0 0 0 4px rgba(192, 57, 43, 0.1);
}

textarea.modern-input {
    min-height: 100px;
    resize: vertical;
}

.btn-submit-lead {
    width: 100%;
    padding: 16px;
    background: var(--primary-red);
    color: white;
    border: none;
    border-radius: 12px;
    font-size: 1.1rem;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.3s;
}

.btn-submit-lead:hover {
    background: #a93226;
    box-shadow: 0 5px 15px rgba(192, 57, 43, 0.3);
}

/* CONTENT SECTION */
.content-section-title {
    max-width: 1200px;
    margin: 60px auto 30px auto;
    padding: 0 20px;
    font-size: 1.8rem;
    font-weight: 700;
    color: var(--primary-dark);
    display: flex;
    align-items: center;
    gap: 15px;
}

.content-section-title::before {
    content: '';
    display: block;
    width: 5px;
    height: 30px;
    background: var(--primary-red);
    border-radius: 4px;
}

.modern-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(340px, 1fr));
    gap: 30px;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
    padding-bottom: 100px;
    /* Extra space for scrolling */
}

.article-card {
    background: white;
    border-radius: 16px;
    overflow: hidden;
    box-shadow: var(--shadow-soft);
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    border: 1px solid transparent;
    cursor: pointer;
}

.article-card:hover {
    transform: translateY(-10px);
    box-shadow: var(--shadow-hover);
    border-color: rgba(192, 57, 43, 0.2);
}

.article-thumb {
    height: 220px;
    width: 100%;
    object-fit: cover;
}

.article-content {
    padding: 24px;
}

.article-tag {
    font-size: 0.75rem;
    text-transform: uppercase;
    color: var(--primary-red);
    font-weight: 700;
    letter-spacing: 0.5px;
    margin-bottom: 10px;
    display: block;
}

.article-title {
    font-size: 1.35rem;
    margin: 0 0 10px 0;
    font-weight: 700;
    color: var(--primary-dark);
    line-height: 1.4;
}

.article-desc {
    color: #666;
    font-size: 0.95rem;
    line-height: 1.6;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.article-meta {
    margin-top: 20px;
    padding-top: 15px;
    border-top: 1px solid #eee;
    font-size: 0.85rem;
    color: #999;
    display: flex;
    justify-content: space-between;
}

/* RESPONSIVE */
@media (max-width: 768px) {
    .profile-header-row {
        flex-direction: column;
        text-align: center;
    }

    .profile-avatar-lg {
        margin: 0 auto;
    }

    .contact-pill-row {
        justify-content: center;
    }

    .modern-grid {
        grid-template-columns: 1fr;
    }
}