/* ================================
   Hero Sections
   ================================ */
.hero {
    background: linear-gradient(135deg, #005a73 0%, #0077a0 100%);
    color: white;
    padding: 4rem 0;
    text-align: center;
}

.hero h1 {
    font-size: 2.5rem;
    margin-bottom: 1rem;
}

.hero .subtitle {
    font-size: 1.2rem;
    opacity: 0.9;
}

/* Small Hero (for secondary pages) */
.hero-small {
    padding: 4rem 0;
}

.hero-small h1 {
    font-size: 2.5rem;
    margin-bottom: 1rem;
}

.hero-small .subtitle {
    font-size: 1.2rem;
    opacity: 0.9;
}

@media (max-width: 768px) {
    .hero {
        padding: 3rem 0;
    }
    
    .hero-small {
        padding: 1.5rem 0;
    }
    
    .hero h1,
    .hero-small h1 {
        font-size: 1.75rem;
    }
}

/* ================================
   Button Component
   ================================ */
.btn {
    display: inline-block;
    padding: 0.75rem 1.5rem;
    border-radius: 5px;
    text-decoration: none;
    font-weight: 600;
    transition: all 0.3s ease;
    cursor: pointer;
    border: none;
    text-align: center;
    line-height: 1.5;
}

.btn-primary {
    background-color: var(--primary-color, #005a73);
    color: white;
}

.btn-primary:hover {
    background-color: var(--secondary-color, #004455);
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(0,0,0,0.15);
}

.btn-secondary {
    background-color: transparent;
    color: var(--primary-color, #005a73);
    border: 2px solid var(--primary-color, #005a73);
}

.btn-secondary:hover {
    background-color: var(--primary-color, #005a73);
    color: white;
}

.btn-accent {
    background-color: var(--accent-color, #d7a74f);
    color: var(--secondary-color, #004455);
}

.btn-accent:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(215, 167, 79, 0.3);
}

/* Button sizes */
.btn-sm {
    padding: 0.5rem 1rem;
    font-size: 0.875rem;
}

.btn-lg {
    padding: 1rem 2rem;
    font-size: 1.125rem;
}

/* Button states */
.btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

/* ================================
   CRM Card Component
   ================================ */
.crm-card {
    background: white;
    border-radius: 15px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
    overflow: hidden;
    transition: all 0.3s ease;
    position: relative;
    padding: 1.5rem;
    height: 100%;
    display: flex;
    flex-direction: column;
}

.crm-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 5px 20px rgba(0,0,0,0.15);
}

/* Rating with separator line */
.crm-card .rating {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin-bottom: 1rem;
    padding-bottom: 1rem;
    border-bottom: 1px solid #e9ecef;
}

/* Badges */
.featured-badge {
    position: absolute;
    top: 1rem;
    right: 1rem;
    background: #ff6b6b;
    color: white;
    padding: 0.25rem 0.75rem;
    border-radius: 15px;
    font-size: 0.8rem;
    font-weight: bold;
}

.partner-badge {
    position: absolute;
    top: 1rem;
    left: 1rem;
    background: #4CAF50;
    color: white;
    padding: 0.25rem 0.75rem;
    border-radius: 15px;
    font-size: 0.8rem;
    font-weight: bold;
    display: flex;
    align-items: center;
    gap: 0.25rem;
}

.custom-badge {
    position: absolute;
    top: -10px;
    right: -10px;
    color: #333;
    border-radius: 50%;
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: bold;
    box-shadow: 0 2px 8px rgba(0,0,0,0.2);
}

/* Logo */
.crm-logo-container {
    width: 80px;
    height: 80px;
    margin-bottom: 1.5rem;
}

.crm-logo {
    width: 100%;
    height: 100%;
    object-fit: contain;
}

.crm-logo-fallback {
    width: 100%;
    height: 100%;
    background-color: #f0f8fa;
    border-radius: 15px;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 2px solid #005a73;
    font-size: 1.5rem;
    font-weight: bold;
    color: #005a73;
}

/* Info Section */
.crm-info {
    flex: 1;
    display: flex;
    flex-direction: column;
}

.crm-info h3 {
    margin: 0 0 0.5rem 0;
    font-size: 1.25rem;
    color: #333;
}

.crm-vendor {
    color: #666;
    font-size: 0.9rem;
    margin-bottom: 0.5rem;
}

.crm-description {
    color: #666;
    margin: 1rem 0;
    line-height: 1.6;
    flex: 1;
}

/* Rating */
.rating {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin: 0.5rem 0;
}

.rating .stars {
    color: #ffd700;
    font-size: 1.1rem;
}

.rating .rating-value {
    color: #666;
    font-size: 0.9rem;
}

.rating .rating-count {
    color: #999;
    font-size: 0.85rem;
}

/* Features */
.feature-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin: 1rem 0;
}

.feature-tag {
    background: #e3f2fd;
    color: #1976d2;
    padding: 0.25rem 0.75rem;
    border-radius: 15px;
    font-size: 0.85rem;
}

.feature-tag.more {
    background: #f5f5f5;
    color: #666;
}

/* Price */
.crm-price-info {
    margin: 1rem 0;
    font-size: 0.9rem;
}

.price-free {
    color: #28a745;
    font-weight: 500;
}

.price-from {
    color: #005a73;
    font-weight: bold;
}

.price-quote {
    color: #666;
}

/* Actions */
.crm-actions {
    display: flex;
    gap: 0.5rem;
    margin-top: auto;
}

.crm-actions .btn {
    flex: 1;
    text-align: center;
    padding: 0.5rem 1rem;
    font-size: 0.9rem;
    white-space: nowrap;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

/* Ensure arrow stays on same line */
.crm-actions .btn-primary {
    white-space: nowrap;
}

/* ================================
   Breadcrumb Component
   ================================ */
.breadcrumb {
    padding: 1rem 0;
}

.breadcrumb ol {
    display: flex;
    align-items: center;
    list-style: none;
    margin: 0;
    padding: 0;
}

.breadcrumb li {
    display: flex;
    align-items: center;
}

.breadcrumb a {
    color: #666;
    text-decoration: none;
    transition: color 0.2s ease;
}

.breadcrumb a:hover {
    color: #005a73;
}

.breadcrumb .separator {
    margin: 0 0.5rem;
    color: #999;
}

.breadcrumb [aria-current="page"] {
    color: #333;
    font-weight: 500;
}

/* ================================
   Pagination Component
   ================================ */
.pagination {
    margin: 2rem 0;
}

.pagination ul {
    display: flex;
    justify-content: center;
    align-items: center;
    list-style: none;
    gap: 0.5rem;
    margin: 0;
    padding: 0;
}

.pagination li {
    display: flex;
}

.pagination a,
.pagination span {
    display: block;
    padding: 0.5rem 1rem;
    border: 1px solid #ddd;
    border-radius: 5px;
    text-decoration: none;
    color: #333;
    transition: all 0.2s ease;
}

.pagination a:hover {
    background: #005a73;
    color: white;
    border-color: #005a73;
}

.pagination .active span {
    background: #005a73;
    color: white;
    border-color: #005a73;
}

.pagination .ellipsis {
    padding: 0.5rem;
    color: #999;
}

/* ================================
   Alert Component
   ================================ */
.alert {
    padding: 1rem 1.5rem;
    border-radius: 8px;
    margin: 1rem 0;
    display: flex;
    align-items: center;
    gap: 1rem;
    position: relative;
}

.alert-success {
    background: #d4edda;
    color: #155724;
    border: 1px solid #c3e6cb;
}

.alert-error {
    background: #f8d7da;
    color: #721c24;
    border: 1px solid #f5c6cb;
}

.alert-warning {
    background: #fff3cd;
    color: #856404;
    border: 1px solid #ffeeba;
}

.alert-info {
    background: #d1ecf1;
    color: #0c5460;
    border: 1px solid #bee5eb;
}

.alert-icon {
    font-size: 1.25rem;
    font-weight: bold;
}

.alert-message {
    flex: 1;
}

.alert-close {
    position: absolute;
    top: 0.5rem;
    right: 0.5rem;
    background: none;
    border: none;
    font-size: 1.5rem;
    line-height: 1;
    color: inherit;
    opacity: 0.5;
    cursor: pointer;
    padding: 0.25rem;
}

.alert-close:hover {
    opacity: 0.8;
}

/* ================================
   Responsive Design
   ================================ */
@media (max-width: 768px) {
    .crm-card {
        padding: 1rem;
    }
    
    .crm-logo-container {
        width: 60px;
        height: 60px;
    }
    
    .crm-actions {
        flex-direction: column;
    }
    
    .crm-actions .btn {
        width: 100%;
    }
    
    .pagination ul {
        flex-wrap: wrap;
    }
    
    .pagination a,
    .pagination span {
        padding: 0.4rem 0.8rem;
        font-size: 0.9rem;
    }
}