/* 
 * Referral Code Template CSS
 * Optimized for performance and mobile responsiveness
 */

/* CSS Variables for consistent theming */
:root {
    --primary-hover: #5856eb;
    --primary-light: #e0e7ff;
    --secondary-color: #10b981;
    --background-color: #f8fafc;
    --card-background: #ffffff;
    --border-color: #e2e8f0;
    --text-primary: #0f172a;
    --text-secondary: #64748b;
    --text-muted: #94a3b8;
    --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);
    --radius-sm: 6px;
    --radius-md: 8px;
    --radius-lg: 12px;
    --radius-xl: 16px;
}

/* Base template styles */
.referral-template {
    background-color: var(--background-color);
    min-height: 100vh;
}
.container{
    margin: 0 auto;
    padding: 0 5px;
}
/* Breadcrumb styles - mobile optimized */
.breadcrumb-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 12px 16px 0 16px;
}

.breadcrumb {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 0.8rem;
    color: var(--text-muted);
    margin-bottom: 16px;
    flex-wrap: wrap;
}

.breadcrumb a {
    color: #475569; /* Darker for better contrast */
    text-decoration: underline; /* Ensure links are distinguishable */
    transition: color 0.2s ease;
}

.breadcrumb a:hover {
    color: var(--g-color);
}

.breadcrumb-separator {
    color: var(--text-muted);
    margin: 0 2px;
}

.breadcrumb-current {
    color: var(--text-primary);
    font-weight: 500;
}

/* Hero section - responsive design */
.referral-hero {
    padding: 0;
    margin-bottom: 24px;
}

.referral-hero-content {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 16px;
}

.referral-hero-card {
    background: var(--card-background);
    border-radius: var(--radius-xl);
    padding: 24px;
    display: flex;
    align-items: center;
    gap: 24px;
    box-shadow: var(--shadow-lg);
    position: relative;
    overflow: hidden;
    width: 100%;
}

.referral-hero-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: var(--g-color);
}

.referral-logo {
    width: 80px;
    height: 80px;
    aspect-ratio: 1 / 1; /* Prevent layout shift */
    border-radius: var(--radius-md);
    object-fit: cover;
    border: 2px solid var(--border-color);
    flex-shrink: 0;
    box-shadow: var(--shadow-md);
}

.referral-info {
    flex: 1;
    text-align: left;
}

/* Mobile optimized headings */
.referral-info h1 {
    margin: 0 0 12px 0;
    font-size: 1.8rem;
    font-weight: 700;
    color: var(--text-primary);
    line-height: 1.2;
}

.referral-category {
    display: inline-flex;
    align-items: center;
    color: var(--g-color);
    padding: 6px 12px;
    border-radius: 20px;
    font-size: 0.75rem;
    font-weight: 600;
    margin-bottom: 12px;
    border: 1px solid var(--g-color);
}

.referral-rating {
    display: flex;
    align-items: center;
    gap: 16px;
    margin-bottom: 16px;
    flex-wrap: wrap;
}

.rating-item {
    display: flex;
    align-items: center;
    gap: 6px;
    background: #f8fafc;
    padding: 6px 10px;
    border-radius: var(--radius-md);
    border: 1px solid var(--border-color);
}

.rating-label {
    font-size: 0.75rem;
    color: var(--text-secondary);
    font-weight: 500;
}

.rating-value {
    font-size: 0.75rem;
    color: var(--text-primary);
    font-weight: 700;
}

.stars {
    color: #f59e0b;
    font-size: 0.9rem;
}

/* Action buttons section - mobile optimized */
.referral-actions {
    display: flex;
    flex-direction: column;
    gap: 12px;
    align-items: stretch;
    min-width: 240px;
}

.primary-action-btn {
    background:  var(--g-color);
    color: #ffffff;
    border: none;
    padding: 12px 24px;
    border-radius: var(--radius-lg);
    font-size: 0.9rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: var(--shadow-md);
    position: relative;
    overflow: hidden;
    text-decoration: none;
    text-align: center;
}



.primary-action-btn:hover {
    box-shadow: var(--shadow-lg);
}

.referral-code-display {
    background: var(--card-background);
    border: 2px solid var(--g-color);
    padding: 12px 16px;
    border-radius: var(--radius-lg);
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 1rem;
    font-weight: 600;
    color: var(--text-primary);
    gap: 12px;
    position: relative;
    overflow: hidden;
}


.copy-btn {
    background: var(--g-color);
    color: white;
    border: none;
    padding: 8px;
    border-radius: var(--radius-md);
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    min-width: 40px;
    min-height: 40px;
    position: relative;
    z-index: 1;
    box-shadow: var(--shadow-sm);
}

.copy-btn:before {
    content: '';
    width: 16px;
    height: 16px;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='white' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Crect width='14' height='14' x='8' y='8' rx='2' ry='2'/%3E%3Cpath d='M4 16c-1.1 0-2-.9-2-2V4c0-1.1.9-2 2-2h10c1.1 0 2 .9 2 2'/%3E%3C/svg%3E");
    background-size: contain;
    background-repeat: no-repeat;
    background-position: center;
    transition: all 0.3s ease;
}

.copy-btn:hover {
    background: var(--primary-hover);
    transform: translateY(-1px) scale(1.05);
    box-shadow: var(--shadow-md);
}

.copy-btn.copied {
    background: var(--secondary-color);
}

.copy-btn.copied:before {
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='white' stroke-width='2.5' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m9 12 2 2 4-4'/%3E%3C/svg%3E");
}

.open-link-btn {
    background: var(--g-color);
    color: white;
    border: none;
    padding: 8px;
    border-radius: var(--radius-md);
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    min-width: 40px;
    min-height: 40px;
    position: relative;
    z-index: 1;
    box-shadow: var(--shadow-sm);
}

.open-link-btn:before {
    content: '';
    width: 16px;
    height: 16px;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='currentColor' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M18 13v6a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2V8a2 2 0 0 1 2-2h6'/%3E%3Cpolyline points='15 3 21 3 21 9'/%3E%3Cline x1='10' y1='14' x2='21' y2='3'/%3E%3C/svg%3E");
    background-size: contain;
    background-repeat: no-repeat;
    background-position: center;
    transition: all 0.3s ease;
}

.open-link-btn:hover {
    background: var(--primary-hover);
    transform: translateY(-1px) scale(1.05);
    box-shadow: var(--shadow-md);
}

/* Main container */
.container-with-sidebar {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 16px;
    display: grid;
    grid-template-columns: 1fr 280px;
    gap: 24px;
}

.main-content {
    display: flex;
    flex-direction: column;
    gap: 24px;
}

/* Card sections - mobile optimized */
.card-section {
    background: var(--card-background);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    padding: 20px;
    box-shadow: var(--shadow-md);
    position: relative;
    overflow: hidden;
}

.section-header {
    margin: 0 0 16px 0;
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--text-primary);
    position: relative;
    padding-bottom: 12px;
}

.section-header::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 40px;
    height: 2px;
    background: var(--g-color);
    border-radius: 2px;
}

/* Referral details section */
.referral-details-section {
    position: relative;
}

.referral-details-section::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: var(--g-color);
}

.referral-details-table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 8px;
    font-size: 0.9rem;
}

.referral-details-table th,
.referral-details-table td {
    padding: 12px 8px;
    text-align: left;
    border-bottom: 1px solid var(--border-color);
}

.referral-details-table th {
    background: rgba(99, 102, 241, 0.1);
    font-weight: 600;
    color: #fff; /* Improved contrast */
    font-size: 0.8rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.referral-details-table td {
    color: var(--text-primary);
    font-weight: 500;
}

.referral-details-table tr:last-child th,
.referral-details-table tr:last-child td {
    border-bottom: none;
}

.referral-details-table td a {
   color: blue;
   cursor: pointer;
}





.referral-submit-section::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: var(--g-color);
}

.referral-submit-section h3 {
    margin: 0 0 6px 0;
    color: var(--text-primary);
    font-size: 1.25rem;
    font-weight: 700;
}

.referral-submit-section p {
    color: var(--text-secondary);
    font-size: 0.9rem;
    margin: 0 0 20px 0;
}

.submit-form {
    display: grid;
    gap: 16px;
    max-width: 600px;
    margin: 0 auto;
}

.form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px;
}

.form-group {
    text-align: left;
}

.form-group.full-width {
    grid-column: 1 / -1;
}

.form-group label {
    display: block;
    font-size: 0.8rem;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 6px;
}

.form-group input,
.form-group textarea {
    width: 100%;
    padding: 12px;
    border: 2px solid var(--border-color);
    border-radius: var(--radius-md);
    font-size: 0.9rem;
    transition: all 0.3s ease;
    box-sizing: border-box;
    background: var(--card-background);
}

.form-group input:focus,
.form-group textarea:focus {
    outline: none;
    border-color: var(--g-color);
    box-shadow: 0 0 0 3px var(--primary-light);
    transform: translateY(-1px);
}


/* Tabs - mobile optimized */
.tabs-container {
    background: var(--card-background);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    overflow: hidden;
    box-shadow: var(--shadow-md);
}

.tab-buttons {
    display: flex;
    background: #f8fafc;
    border-bottom: 1px solid var(--border-color);
}

.tab-btn {
    flex: 1;
    background: transparent;
    border: none;
    padding: 16px 20px;
    cursor: pointer;
    font-size: 0.8rem;
    font-weight: 600;
    color: var(--text-secondary);
    transition: all 0.3s ease;
    position: relative;
}

.tab-btn:hover {
    color: var(--text-primary);
    background: #f1f5f9;
}

.tab-btn.active {
    color: var(--g-color);
    background: var(--card-background);
}

.tab-btn.active::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 2px;
    background: var(--g-color);
}

.tab-content {
    padding: 20px;
    display: none;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.tab-content.active {
    display: block;
    opacity: 1;
}

/* User codes styling */
.user-codes-list {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.user-code-item {
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    padding: 16px;
    background: #f8fafc;
    transition: all 0.3s ease;
}



.user-code-item.official-code {
    border: 2px solid var(--g-color);
    background: var(--primary-light);
}

.code-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 12px;
}

.user-name {
    font-weight: 600;
    color: var(--text-primary);
    font-size: 0.9rem;
}

.official-code .user-name {
    color: var(--g-color);
}

.crown-icon {
    margin-right: 6px;
}

.code-date {
    font-size: 0.75rem;
    color: var(--text-muted);
}

.user-referral-display {
    background: var(--card-background);
    border: 1px solid var(--border-color);
    padding: 10px 12px;
    border-radius: var(--radius-md);
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin: 10px 0;
    font-size: 0.8rem;
}

.comment-text {
    margin: 10px 0 0 0;
    font-size: 0.8rem;
    color: var(--text-secondary);
    line-height: 1.5;
}


/* Sidebar styles */
.sidebar {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.sidebar-card {
    background: var(--card-background);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    padding: 20px;
    box-shadow: var(--shadow-md);
}

.sidebar-card h3,
.widget-title {
    margin: 0 0 16px 0;
    color: var(--text-primary);
    font-size: 1.1rem;
    font-weight: 600;
}

/* Accessibility: Improve contrast for sidebar links and text */
.sidebar p, .sidebar li, .sidebar a, .sidebar strong {
    color: #334155; /* Darker text for better contrast */
}

.sidebar a {
    text-decoration: underline;
}

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

.stats-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 12px;
    text-align: center;
}

.stat-item {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.stat-number {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--g-color);
}

.stat-label {
    font-size: 0.75rem;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.features-list {
    list-style: none;
    padding: 0;
    margin: 0;
}

.features-list li {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 8px;
    font-size: 0.9rem;
    color: var(--text-secondary);
}

.check-icon {
    color: var(--secondary-color);
    font-weight: bold;
    font-size: 0.8rem;
}

/* Empty state styling */
.empty-state {
    text-align: center;
    padding: 40px 20px;
    color: var(--text-muted);
}

.empty-icon {
    font-size: 2.5rem;
    margin-bottom: 12px;
    opacity: 0.3;
}

.empty-state h4 {
    margin: 0 0 6px 0;
    color: var(--text-primary);
    font-size: 1rem;
    font-weight: 600;
}

.empty-state p {
    margin: 0;
    color: var(--text-secondary);
    font-size: 0.9rem;
}


/* Performance optimizations */
* {
    box-sizing: border-box;
}

img {
    max-width: 100%;
    height: auto;
    loading: lazy;
}

/* Mobile responsive design */
@media (max-width: 768px) {
    .container-with-sidebar {
        grid-template-columns: 1fr;
        gap: 20px;
        padding: 0 12px;
    }

    .referral-hero-content {
        padding: 0 12px;
    }

    .breadcrumb-container {
        padding: 8px 12px 0 12px;
    }

    .breadcrumb {
        font-size: 0.75rem;
        gap: 4px;
    }

    .referral-hero-card {
        flex-direction: column;
        text-align: center;
        padding: 20px;
        gap: 20px;
    }

    .referral-info h1 {
        font-size: 1.5rem;
    }

    .referral-actions {
        width: 100%;
        min-width: auto;
    }

    .section-header {
        font-size: 1.1rem;
    }

    .card-section {
        padding: 16px;
    }

    .referral-details-table {
        font-size: 0.8rem;
    }

    .referral-details-table th,
    .referral-details-table td {
        padding: 8px 6px;
    }

    .tab-buttons {
        flex-direction: column;
    }

    .tab-btn {
        padding: 12px 16px;
        font-size: 0.85rem;
    }
    .container{
    margin: 0 auto;
    padding: 0 5px;
}

    .form-row {
        grid-template-columns: 1fr;
        gap: 12px;
    }

    .referral-submit-section {
        padding: 20px;
    }

    .referral-submit-section h3 {
        font-size: 1.1rem;
    }

    .faq-question {
        font-size: 0.9rem;
        padding: 12px;
    }

    .faq-question::after {
        right: 12px;
    }

    /* Archive page mobile styles */
    .referral-hero-section {
        padding: 15px 0;
    }

    .referral-hero-content {
        gap: 7px;
    }

    .referral-hero-title {
        font-size: 2rem;
        margin-bottom: 10px;
    }

    .search-box {
        max-width: 100%;
        margin: 5px 0;
    }

    .search-input {
        padding: 12px 45px 12px 16px;
        font-size: 0.95rem;
    }

    .referral-hero-description {
        font-size: 1rem;
        max-width: 100%;
    }

    .featured-categories-section {
        padding: 40px 15px;
    }

    .categories-grid {
        grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
        gap: 15px;
    }

    .category-card {
        padding: 20px 15px;
    }

    .referral-main-content {
        padding: 20px 0;
    }

    .cta-section {
        padding: 40px 0;
    }

    .cta-content h2 {
        font-size: 2rem;
    }

    .cta-content p {
        font-size: 1rem;
    }

    .cta-buttons {
        flex-direction: column;
        align-items: center;
    }

    .cta-btn {
        width: 100%;
        max-width: 300px;
    }

    /* Articles section mobile styles */
    .top-articles-section {
        padding: 40px 15px;
    }

    .articles-grid {
        grid-template-columns: 1fr;
        gap: 20px;
        margin-bottom: 30px;
    }

    .article-card {
        margin: 0 auto;
        max-width: 100%;
    }

    .article-image {
        height: 180px;
    }

    .article-content {
        padding: 16px;
    }

    .article-title {
        font-size: 1rem;
    }
}

@media (max-width: 480px) {
    .referral-code-display {
        flex-direction: row;
        gap: 10px;
        text-align: left;
    }

    .referral-code-display span {
        word-break: break-all;
        font-size: 0.9rem;
        flex-grow: 1;
        text-align: center;
        border: 2px solid var(--g-color);
        padding: 8px;
        border-radius: var(--radius-md);
    }

    .copy-btn {
        width: auto;
        justify-content: center;
    }

    .user-referral-display {
        flex-direction: column;
        gap: 8px;
        align-items: stretch;
        font-size: 0.75rem;
    }

    .rating-item {
        font-size: 0.7rem;
        padding: 4px 8px;
    }

    .stats-grid {
        grid-template-columns: 1fr;
        gap: 8px;
    }

    .stat-number {
        font-size: 1.2rem;
    }

    /* Archive page mobile styles */
    .referral-hero-title {
        margin-top: 15px;
        font-size: 1.8rem;
    }

    .categories-grid {
        grid-template-columns: 1fr;
    }
}

/* High contrast mode support */
@media (prefers-contrast: high) {
    :root {
        --border-color: #000000;
        --text-muted: #333333;
    }

    .referral-hero-section {
        background: #000;
    }

    .category-card,
    .content-controls,
    .referral-codes-section,
    .referral-sidebar {
        border-width: 2px;
    }
}

/* Reduced motion support */
@media (prefers-reduced-motion: reduce) {
    * {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
}

/* FAQ Section Styling */
.faq-section {
    margin-top: 30px;
}

.faq-list {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.faq-item {
    border: 1px solid #eee;
    border-radius: 5px;
    overflow: hidden;
    background-color: #fff;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
}

.faq-question {
    padding: 15px;
    margin: 0;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    position: relative;
    background-color: #f9f9f9;
    border-bottom: 1px solid #eee;
}

.faq-answer {
    padding: 15px;
    border-top: 1px solid #eee;
}

.faq-answer-content {
    line-height: 1.6;
    color: #333;
}

.faq-answer-content p {
    margin-top: 0;
    margin-bottom: 10px;
}

.faq-answer-content p:last-child {
    margin-bottom: 0;
}

/* Archive Template Styles */
.referral-archive-template {
    background-color: var(--background-color, #f8fafc);
    min-height: 100vh;
}

/* Hero Section */
.referral-hero-section {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 30px 0;
    margin-top: -20px;
    position: relative;
    overflow: hidden;
}

.referral-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="grain" width="100" height="100" patternUnits="userSpaceOnUse"><circle cx="25" cy="25" r="1" fill="white" opacity="0.1"/><circle cx="75" cy="75" r="1" fill="white" opacity="0.1"/><circle cx="50" cy="10" r="0.5" fill="white" opacity="0.05"/><circle cx="10" cy="50" r="0.5" fill="white" opacity="0.05"/><circle cx="90" cy="30" r="0.5" fill="white" opacity="0.05"/></pattern></defs><rect width="100" height="100" fill="url(%23grain)"/></svg>');
    pointer-events: none;
}

.referral-hero-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

.referral-hero-content {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    gap: 20px;
    z-index: 2;
}

.referral-hero-title {
    font-size: 2.5rem;
    font-weight: 700;
    margin: 0 0 15px 0;
    line-height: 1.2;
    text-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.search-box {
    position: relative;
    max-width: 500px;
    width: 100%;
    margin: 10px 0;
}

.search-input {
    width: 100%;
    padding: 14px 50px 14px 20px;
    border: 2px solid rgba(255, 255, 255, 0.3);
    border-radius: 25px;
    font-size: 1rem;
    background: rgba(255, 255, 255, 0.1);
    color: white;
    backdrop-filter: blur(10px);
    transition: all 0.3s ease;
}

.search-input::placeholder {
    color: rgba(255, 255, 255, 0.7);
}

.search-input:focus {
    outline: none;
    border-color: rgba(255, 255, 255, 0.8);
    background: rgba(255, 255, 255, 0.15);
    box-shadow: 0 0 0 3px rgba(255, 255, 255, 0.1);
}

.search-btn {
    position: absolute;
    right: 12px;
    top: 50%;
    transform: translateY(-50%);
    background: none;
    border: none;
    color: rgba(255, 255, 255, 0.8);
    cursor: pointer;
    padding: 10px;
    border-radius: 50%;
    transition: all 0.3s ease;
}

.search-btn:hover {
    color: white;
    background: rgba(255, 255, 255, 0.1);
}

/* Search Results Dropdown */
.search-results-dropdown {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(20px);
    border-radius: 12px;
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.1);
    max-height: 300px;
    overflow-y: auto;
    z-index: 1000;
    display: none;
    margin-top: 5px;
}

.search-results-dropdown.show {
    display: block;
}

.search-result-item {
    padding: 12px 16px;
    border-bottom: 1px solid rgba(0, 0, 0, 0.05);
    cursor: pointer;
    transition: background-color 0.2s ease;
    text-decoration: none;
    color: #0f172a;
    display: block;
}

.search-result-item:hover {
    background: rgba(99, 102, 241, 0.05);
}

.search-result-item:last-child {
    border-bottom: none;
}

.search-result-title {
    font-weight: 600;
    font-size: 0.95rem;
    margin-bottom: 4px;
    color: #0f172a;
}

.search-result-type {
    display: inline-block;
    background: #6366f1;
    color: white;
    padding: 2px 8px;
    border-radius: 10px;
    font-size: 0.7rem;
    font-weight: 500;
    margin-bottom: 4px;
}

.search-result-excerpt {
    font-size: 0.85rem;
    color: #64748b;
    line-height: 1.4;
}

.search-no-results {
    padding: 16px;
    text-align: center;
    color: #64748b;
    font-size: 0.9rem;
}

.referral-hero-description {
    font-size: 1.1rem;
    line-height: 1.6;
    margin: 0;
    opacity: 0.9;
    max-width: 600px;
}

/* Featured Categories */
.featured-categories-section {
    padding: 40px 20px;
    background: var(--card-background, #ffffff);
}

.categories-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 20px;
}

.category-card {
    background: var(--card-background, #ffffff);
    border: 1px solid var(--border-color, #e2e8f0);
    border-radius: var(--radius-lg, 12px);
    padding: 30px 20px;
    text-align: center;
    text-decoration: none;
    transition: all 0.3s ease;
    box-shadow: var(--shadow-sm, 0 1px 2px 0 rgb(0 0 0 / 0.05));
}

.category-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-lg, 0 10px 15px -3px rgb(0 0 0 / 0.1));
    border-color: var(--primary-hover, #5856eb);
}

.category-icon {
    font-size: 2.5rem;
    margin-bottom: 15px;
    display: block;
}

.category-card h3 {
    font-size: 1.2rem;
    font-weight: 600;
    color: var(--text-primary, #0f172a);
    margin: 0 0 8px 0;
}

.category-count {
    font-size: 0.9rem;
    color: var(--text-muted, #94a3b8);
}

/* Main Content */
.referral-main-content {
    padding: 60px 0;
    background: var(--background-color, #f8fafc);
}

/* Call to Action Section */
.cta-section {
    background: linear-gradient(135deg, #6366f1 0%, #8b5cf6 100%);
    color: white;
    padding: 60px 0;
    text-align: center;
}

.cta-content h2 {
    font-size: 2.5rem;
    font-weight: 700;
    margin: 0 0 20px 0;
    text-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.cta-content p {
    font-size: 1.2rem;
    margin: 0 0 30px 0;
    opacity: 0.9;
    max-width: 600px;
    margin-left: auto;
    margin-right: auto;
}

.cta-buttons {
    display: flex;
    gap: 20px;
    justify-content: center;
    flex-wrap: wrap;
}

.cta-btn {
    display: inline-block;
    padding: 15px 30px;
    border-radius: var(--radius-lg, 12px);
    text-decoration: none;
    font-weight: 600;
    font-size: 1rem;
    transition: all 0.3s ease;
    box-shadow: 0 4px 6px rgba(0,0,0,0.1);
}

.cta-btn.primary {
    background: white;
    color: #6366f1;
}

.cta-btn.primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 15px rgba(0,0,0,0.2);
}

.cta-btn.secondary {
    background: transparent;
    color: white;
    border: 2px solid white;
}

.cta-btn.secondary:hover {
    background: white;
    color: #6366f1;
    transform: translateY(-2px);
}

/* Top Articles Section */
.top-articles-section {
    padding: 60px 20px;
    background: var(--background-color, #f8fafc);
}

.articles-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 24px;
    margin-bottom: 40px;
}

.article-card {
    background: var(--card-background, #ffffff);
    border: 1px solid var(--border-color, #e2e8f0);
    border-radius: var(--radius-lg, 12px);
    overflow: hidden;
    box-shadow: var(--shadow-sm, 0 1px 2px 0 rgb(0 0 0 / 0.05));
    transition: all 0.3s ease;
}

.article-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-lg, 0 10px 15px -3px rgb(0 0 0 / 0.1));
    border-color: var(--primary-hover, #5856eb);
}

.article-image {
    width: 100%;
    height: 200px;
    overflow: hidden;
}

.article-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s ease;
}

.article-card:hover .article-image img {
    transform: scale(1.05);
}

.article-content {
    padding: 20px;
}

.article-title {
    font-size: 1.1rem;
    font-weight: 600;
    color: var(--text-primary, #0f172a);
    margin: 0 0 12px 0;
    line-height: 1.4;
}

.article-title a {
    color: inherit;
    text-decoration: none;
    transition: color 0.3s ease;
}

.article-title a:hover {
    color: var(--primary-hover, #5856eb);
}

.article-meta {
    margin-bottom: 12px;
}

.article-date {
    font-size: 0.85rem;
    color: var(--text-muted, #94a3b8);
    font-weight: 500;
}

.article-excerpt {
    font-size: 0.9rem;
    color: var(--text-secondary, #64748b);
    line-height: 1.6;
    margin: 0 0 16px 0;
}

.article-read-more {
    display: inline-block;
    font-size: 0.9rem;
    font-weight: 600;
    color: var(--primary-hover, #5856eb);
    text-decoration: none;
    transition: color 0.3s ease;
}

.article-read-more:hover {
    color: var(--g-color, #6366f1);
    text-decoration: underline;
}

.articles-section-footer {
    text-align: center;
}

.show-all-btn {
    display: inline-block;
    padding: 12px 24px;
    background: var(--g-color, #6366f1);
    color: white;
    text-decoration: none;
    border-radius: var(--radius-lg, 12px);
    font-weight: 600;
    font-size: 0.95rem;
    transition: all 0.3s ease;
    box-shadow: var(--shadow-md, 0 4px 6px -1px rgb(0 0 0 / 0.1));
}

.show-all-btn:hover {
    background: var(--primary-hover, #5856eb);
    transform: translateY(-2px);
    box-shadow: var(--shadow-lg, 0 10px 15px -3px rgb(0 0 0 / 0.1));
}
