/* ============================================
   UQ HUB - ORGANIZED CSS STRUCTURE
   ============================================ */

/* ============================================
   1. RESET AND BASE STYLES
   ============================================ */

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
    background-color: #f5f5f5;
    color: #333;
    line-height: 1.6;
    width: 100%;
    overflow-x: hidden;
    margin: 0;
    padding: 0;
    display: flex;
    flex-direction: column;
    min-height: 100vh;
}

/* ============================================
   2. HEADER AND NAVIGATION
   ============================================ */

/* Header containing navigation */
header {
    position: sticky;
    top: 0;
    z-index: 1000;
    background: linear-gradient(135deg, #6b46c1, #9333ea);
    box-shadow: 0 4px 20px rgba(107, 70, 193, 0.3);
    color: white;
    display: flex;
    flex-direction: column;
    flex-shrink: 0;
    padding-bottom: 8px;
}

.nav-bar {
    display: flex;
    justify-content: space-around;
    align-items: center;
    padding: 8px 0 12px 0;
}

.nav-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    color: white;
    text-decoration: none;
    cursor: pointer;
    padding: 8px;
    border-radius: 12px;
    transition: all 0.3s ease;
    min-width: 60px;
    position: relative;
    overflow: hidden;
}

.nav-item:hover,
.nav-item.active {
    background: rgba(255, 255, 255, 0.2);
    transform: translateY(-2px);
}

.nav-item i {
    font-size: 20px;
    margin-bottom: 4px;
}

.nav-item span {
    font-size: 12px;
    font-weight: 500;
}

/* Navigation animations */
.nav-item::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.2), transparent);
    transition: left 0.5s ease;
}

.nav-item:hover::before {
    left: 100%;
}

/* Back button */
.back-to-categories {
    display: flex;
    align-items: center;
    background: none;
    border: none;
    color: #6b46c1;
    font-size: 15px;
    font-weight: 500;
    padding: 16px;
    width: 100%;
    text-align: left;
    cursor: pointer;
}

/* Back button in header */
.header-top .back-to-categories {
    width: auto;
    padding: 8px;
    margin-right: 16px;
    margin-left: -8px;
    border-radius: 8px;
    font-size: 18px;
}

.header-top .back-to-categories:hover {
    background: #f3f4f6;
}

.back-to-categories i {
    margin-right: 8px;
}

/* Remove margin from back button icon when in header */
.header-top .back-to-categories i {
    margin-right: 0;
}

/* ============================================
   3. SEARCH COMPONENTS
   ============================================ */

/* Search Containers */
.search-container {
    position: relative;
    display: flex;
    align-items: center;
    background: white;
    border-radius: 25px;
    padding: 12px 20px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
    margin: 16px;
}

.search-icon {
    color: #9ca3af;
    margin-right: 12px;
    font-size: 16px;
}

.search-input {
    flex: 1;
    border: none;
    outline: none;
    font-size: 16px;
    color: #374151;
    background: transparent;
}

.search-input::placeholder {
    color: #9ca3af;
}

/* Location-specific search adjustments */
#location-search-container {
    /* Override main search container for location pages */
    border-radius: 12px;
    border: 1px solid #e5e7eb;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
    transition: all 0.2s ease;
}

#location-search-container .search-input {
    font-size: 14px;
}

#location-search-container .search-icon {
    margin-right: 0;
    margin-left: 12px;
    font-size: 14px;
    order: 2;
}

/* ============================================
   4. MAIN LAYOUT AND CONTENT SECTIONS
   ============================================ */

/* Main layout for all devices */
.main-content {
    background: #f5f5f5;
    flex: 1;
    padding: 16px;
    width: 100%;
    max-width: 100%;
    box-sizing: border-box;
    overflow-x: hidden;
}

/* Tab content visibility */
.tab-content {
    display: none;
    visibility: hidden;
    opacity: 0;
    padding: 8px;
    animation: fadeIn 0.3s ease-in-out;
    width: 100%;
    max-width: 100%;
    box-sizing: border-box;
    overflow-x: hidden;
}

.tab-content.active {
    display: block;
    visibility: visible;
    opacity: 1;
    position: relative;
}

/* Use flexbox for all content grids */
.content-grid {
    display: flex;
    flex-direction: column;
    gap: 16px;
    max-width: 1400px;
    margin: 16px auto 0;
    width: 100%;
    padding-top: 10px;
    box-sizing: border-box;
}

/* Animation for tab switching */
@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* ============================================
   5. CALENDAR TAB STYLES
   ============================================ */

/* Calendar Header and Filter Styles */
.calendar-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
    padding: 0 16px;
    gap: 20px;
    flex-wrap: wrap;
}

/* Calendar Switcher Components */
.calendar-switcher {
    display: flex;
    justify-content: center;
}

.switcher-container {
    background: linear-gradient(180deg, #6b46c1, #9333ea);
    border-radius: 100px;
    padding: 4px;
    display: inline-flex;
    gap: 4px;
    min-width: 300px;
    justify-content: center;
    box-sizing: border-box;
    max-width: 100%;
}

.switcher-segment {
    background: none;
    border: none;
    padding: 8px 16px;
    border-radius: 100px;
    cursor: pointer;
    font-size: 15px;
    font-weight: 500;
    color: rgba(255, 255, 255, 0.8);
    transition: all 0.3s ease;
    white-space: nowrap;
    flex: 1;
    text-align: center;
    max-width: 160px;
}

.switcher-segment:hover {
    color: rgba(255, 255, 255, 0.9);
}

.switcher-segment.active {
    background: white;
    color: #000;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
}

/* Calendar Filter Components */
.calendar-filters {
    display: flex;
    gap: 12px;
    align-items: center;
    justify-content: center;
    width: 100%;
    margin-bottom: 16px;
}

/* Base Filter Styles */
.filter-select,
.filter-button {
    padding: 8px 12px;
    border: 1px solid #e5e7eb;
    border-radius: 10px;
    background: white;
    font-size: 14px;
    font-weight: 500;
    color: #374151;
    cursor: pointer;
    outline: none;
    transition: all 0.2s ease;
    display: inline-flex;
    align-items: center;
    gap: 8px;
}

/* Calendar Filter Select - Purple theme */
.filter-select {
    border: 2px solid #e5e7eb;
    border-radius: 12px;
    min-width: 150px;
    font-weight: 500;
}

.filter-select:hover {
    border-color: #9333ea;
}



/* Places Filter Button - Gray theme */
.filter-button {
    background: #f3f4f6;
    color: #111827;
    font-weight: 600;
}

.filter-button:hover {
    background: #e5e7eb;
}

/* Calendar Section Components */
.calendar-section {
    display: none;
    width: 100%;
}

.calendar-section.active {
    display: block;
}

/* Calendar cards use enhanced styling matching other tabs */
#calendar .card {
    display: flex;
    flex-direction: column;
    background: white;
    border-radius: 16px;
    padding: 24px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    border: 4px solid #e5e7eb;
    transition: all 0.2s ease;
}

/* Calendar expandable card styles */
.date-item,
.event-item {
    margin-bottom: 12px;
}

.event-location-brief {
    color: #059669;
    font-size: 13px;
    margin-top: 2px;
    font-weight: 500;
}

/* ============================================
   6. PLACES TAB STYLES
   ============================================ */

#places-grid {
    gap: 16px;
}

/* ============================================
   7. DYNAMIC CONTENT TABS STYLES (CALENDAR, CLUBS, LINKS, SUPPORT)
   ============================================ */

#dynamic-clubs,
#dynamic-links,
#dynamic-support,
#dynamic-calendar {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.club-category-card,
.link-category-card,
.support-category-card {
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    border: 4px solid #e5e7eb;
}

/* ============================================
   8. PLACES TAB CATEGORY STYLES
   ============================================ */

/* ============================================
   8. PLACES TAB CATEGORY STYLES
   ============================================ */

/* Category Components */
.categories-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
    padding: 16px 0;
}

.category-card {
    display: flex;
    align-items: center;
    background: white;
    border-radius: 12px;
    padding: 16px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    transition: all 0.2s ease;
    width: 100%;
    box-sizing: border-box;
    margin: 10px 0px;
}

.category-card:active {
    transform: scale(0.98);
}

.category-card .fa-chevron-right {
    color: #9ca3af;
    font-size: 14px;
    margin-left: 8px;
}

.category-icon {
    width: 48px;
    height: 48px;
    border-radius: 50%;
    background: #f3f0ff;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-right: 16px;
    flex-shrink: 0;
}

.category-icon i {
    font-size: 20px;
    color: #6b46c1;
}

.category-details {
    flex: 1;
}

.category-details h3 {
    margin: 0 0 4px 0;
    font-size: 16px;
    color: #1f2937;
}

.category-details p {
    margin: 0;
    font-size: 14px;
    color: #6b7280;
}

/* Location Components */
.location-icon {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: #f0f9ff;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-right: 12px;
    flex-shrink: 0;
}

.location-icon i {
    color: #0ea5e9;
    font-size: 16px;
}

/* Category Header Components */
.category-header {
    margin-bottom: 12px;
    padding: 0;
    position: relative;
}

.category-header h2 {
    margin: 0 0 8px 0;
    color: #1f2937;
    font-size: 24px;
}

.category-header p {
    margin: 0;
    color: #6b7280;
    font-size: 14px;
}

.category-header .header-top {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 0 16px;
}

.category-header .header-top h2 {
    flex: 1;
    margin: 0;
    font-size: 20px;
    font-weight: 600;
}

/* Filter Popover and Options (Places tab) */
.filter-popover {
    position: absolute;
    right: 16px;
    margin-top: 8px;
    background: white;
    border: 1px solid #e5e7eb;
    border-radius: 12px;
    box-shadow: 0 8px 20px rgba(0,0,0,0.12);
    padding: 8px;
    z-index: 50;
}

.filter-options {
    list-style: none;
    margin: 0;
    padding: 0;
    min-width: 200px;
    max-height: 280px;
    overflow: auto;
}

.filter-options li {
    padding: 10px 12px;
    border-radius: 8px;
    cursor: pointer;
}

.filter-options li:hover {
    background: #f3f4f6;
}

/* Support-specific styles - now uses unified .item-subtitle */

/* ============================================
   9. SHARED COMPONENTS
   ============================================ */

/* Base Card Components */
.card {
    display: flex;
    flex-direction: column;
    padding: 24px;
    border-radius: 16px;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.08);
}

.card h3 {
    display: flex;
    align-items: center;
    font-size: 20px;
    margin-bottom: 12px;
}

.card h3 i {
    margin-right: 12px;
    color: #6b46c1;
    font-size: 22px;
}

.card p {
    color: #6b7280;
    margin-bottom: 20px;
    font-size: 14px;
}

/* Expandable Card Components */
.expandable-card {
    border: 1px solid #e5e7eb;
    border-radius: 12px;
    background: #ffffff;
    transition: all 0.3s ease;
    overflow: hidden;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}

.expandable-card:hover {
    box-shadow: 0 4px 12px rgba(59, 130, 246, 0.15);
}

.card-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 16px 20px;
    cursor: pointer;
    transition: background-color 0.2s ease;
    user-select: none;
}

.card-header:hover {
    background-color: #f8fafc;
}

.card-info {
    flex: 1;
}

.card-content {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.3s ease;
    border-top: 1px solid #f3f4f6;
}

.expandable-card.expanded .card-content {
    border-top-color: #e5e7eb;
}

.expand-icon {
    margin-left: 16px;
    color: #6b7280;
    transition: transform 0.3s ease;
}

.expandable-card.expanded .expand-icon {
    transform: rotate(180deg);
}

.card-description {
    padding: 20px;
    background-color: #f9fafb;
}

.card-description p {
    color: #4b5563;
    line-height: 1.6;
    margin: 0;
    font-size: 14px;
}

/* Button and Action Components */
.card-actions {
    display: flex;
    gap: 12px;
    padding: 20px;
    background-color: #ffffff;
    border-top: 1px solid #f3f4f6;
}

.action-btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 10px 16px;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 500;
    text-decoration: none;
    border: none;
    cursor: pointer;
    transition: all 0.2s ease;
    white-space: nowrap;
}

.action-btn.primary {
    background-color: #3b82f6;
    color: white;
}

.action-btn.primary:hover {
    background-color: #2563eb;
    transform: translateY(-1px);
}

.action-btn.secondary {
    background-color: #f3f4f6;
    color: #374151;
    border: 1px solid #d1d5db;
}

.action-btn.secondary:hover {
    background-color: #e5e7eb;
    border-color: #9ca3af;
}

.action-btn i {
    font-size: 14px;
}

.action-btn.full-width {
    width: 100%;
    justify-content: center;
}

/* Text and Typography Components */
.item-name {
    font-size: 18px;
    font-weight: 600;
    color: #1f2937;
    margin: 0 0 8px 0;
    line-height: 1.3;
}

.item-subtitle {
    font-size: 13px;
    color: #6b7280;
    margin: 0;
    line-height: 1.4;
}

/* Chip and Badge Components */
.chip {
    display: inline-flex;
    align-items: center;
    padding: 8px 14px;
    border-radius: 999px;
    border: 1px solid rgba(59,130,246,0.35);
    background: rgba(59,130,246,0.08);
    color: #1e40af;
    font-weight: 700;
    font-size: 14px;
    white-space: nowrap;
    cursor: pointer;
    transition: background .15s ease, border-color .15s ease;
}

.chip:hover { 
    background: rgba(59,130,246,0.14); 
}

.chip.active { 
    background: #60a5fa; 
    color: white; 
    border-color: #60a5fa; 
}

.chip-bar {
    display: flex;
    gap: 10px;
    overflow-x: auto;
    padding: 10px 12px 6px;
    margin: 0 auto 8px;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
    -ms-overflow-style: none;
}

.chip-bar::-webkit-scrollbar { 
    display: none; 
}

/* Tag Components */
.item-tags {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
}

.item-tag {
    display: inline-flex;
    align-items: center;
    padding: 4px 8px;
    border-radius: 6px;
    font-size: 12px;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.item-tag.members {
    background-color: #ecfdf5;
    color: #059669;
    border: 1px solid #a7f3d0;
}

.item-tag.date {
    background-color: #f3f0ff;
    color: #6b46c1;
    border: 1px solid #c4b5fd;
}

.item-tag.type {
    background-color: #fef3c7;
    color: #d97706;
    border: 1px solid #fde68a;
}

/* Specific colors for different event types */
.item-tag.type[data-type="academic"] {
    background-color: #e0f2fe;
    color: #0369a1;
    border: 1px solid #7dd3fc;
}

.item-tag.type[data-type="events"] {
    background-color: #ecfdf5;
    color: #059669;
    border: 1px solid #a7f3d0;
}

.item-tag.type[data-type="orientation"] {
    background-color: #fef3c7;
    color: #d97706;
    border: 1px solid #fde68a;
}

/* List and Container Components */
.list-expandable {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.list-links {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.location-list,
.date-list,
.event-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.categories-list {
    display: block;
    width: 100%;
    padding: 0;
}

.category-card {
    display: flex;
    width: 100%;
}

/* Link Components */
.item-link {
    display: block;
    padding: 14px 16px;
    border-radius: 14px;
    background: #f8fafc;
    color: #1f2937;
    text-decoration: none;
    border: 1px solid #e5e7eb;
    box-shadow: 0 1px 2px rgba(0,0,0,0.04);
    transition: background-color 0.2s ease;
}

.item-link:hover { 
    background: #f1f5f9; 
}

/* Detail Item Components */
.detail-item {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    margin-bottom: 0;
    font-size: 14px;
    line-height: 1.4;
    padding: 12px 0;
    gap: 4px;
}

.detail-item:not(:last-child) {
    border-bottom: 1px solid #e2e8f0;
}

.detail-item strong {
    color: #64748b;
    font-weight: 600;
    font-size: 13px;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.detail-item span {
    color: #1f2937;
    font-weight: 500;
    font-size: 15px;
}

.detail-item:last-child {
    margin-bottom: 0;
    border-bottom: none;
    padding-bottom: 0;
}

/* Detail Container Components */
.location-details,
.academic-details,
.event-details,
.orientation-details {
    padding: 0;
    margin: 0;
}

/* Legacy Header Spacing for Category Cards */
.category-card h3,
.club-category-card h3,
.link-category-card h3,
.support-category-card h3 {
    margin-bottom: 8px;
}

/* ============================================
   10. MODALS AND OVERLAYS
   ============================================ */

/* Location Modal Styles */
.location-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 10000;
    animation: fadeIn 0.3s ease;
}

.location-modal-content {
    background: white;
    border-radius: 12px;
    padding: 24px;
    max-width: 400px;
    width: 90%;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
    animation: slideUp 0.3s ease;
}

.location-modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 16px;
    padding-bottom: 12px;
    border-bottom: 1px solid #e5e7eb;
}

.location-modal-header h3 {
    margin: 0;
    color: #6b46c1;
    font-size: 18px;
}

.close-modal {
    background: none;
    border: none;
    font-size: 24px;
    cursor: pointer;
    color: #6b7280;
    padding: 0;
    width: 30px;
    height: 30px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
}

.close-modal:hover {
    background: #f3f4f6;
    color: #374151;
}

.location-modal-body p {
    margin: 8px 0;
    color: #374151;
}

.location-actions {
    display: flex;
    gap: 12px;
    margin-top: 20px;
}

.maps-button, 
.copy-button {
    flex: 1;
    background: #6b46c1;
    color: white;
    border: none;
    padding: 10px 16px;
    border-radius: 8px;
    cursor: pointer;
    font-size: 14px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    transition: all 0.3s ease;
}

.maps-button:hover, 
.copy-button:hover {
    background: #553c9a;
    transform: translateY(-2px);
}

.copy-button {
    background: #6b7280;
}

.copy-button:hover {
    background: #4b5563;
}

@keyframes slideUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* ============================================
   11. LOADING AND ERROR STATES
   ============================================ */

.loading-message, 
.error-message {
    text-align: center;
    padding: 60px 20px;
    color: #6b7280;
}

.loading-message i, 
.error-message i {
    font-size: 48px;
    margin-bottom: 16px;
    color: #6b46c1;
}

.loading-message h3, 
.error-message h3 {
    font-size: 24px;
    margin-bottom: 12px;
    color: #374151;
}

.loading-message p, 
.error-message p {
    font-size: 16px;
    margin-bottom: 20px;
}

.retry-button {
    background: #6b46c1;
    color: white;
    border: none;
    padding: 12px 24px;
    border-radius: 8px;
    font-size: 16px;
    cursor: pointer;
    transition: all 0.3s ease;
}

.retry-button:hover {
    background: #553c9a;
    transform: translateY(-2px);
}

.retry-button i {
    margin-right: 8px;
    font-size: 14px;
}

/* ============================================
   12. FOOTER
   ============================================ */

.site-footer {
    width: 100%;
    text-align: center;
    padding: 1rem;
    color: #888;
    font-size: 1rem;
    background: #f9f9f9;
    box-sizing: border-box;
    flex-shrink: 0;
    margin-top: auto;
}

/* ============================================
   13. ACCESSIBILITY AND FOCUS STATES
   ============================================ */



/* Disable hover tooltip on location items */
.location-item[data-coordinates]:hover::after {
    content: none !important;
    display: none !important;
}

/* ============================================
   14. RESPONSIVE DESIGN - MEDIA QUERIES
   ============================================ */

/* Mobile and Tablet (768px and below) */
@media (max-width: 768px) {
    /* Calendar Header - stack vertically on mobile */
    .calendar-header {
        flex-direction: column;
        gap: 12px;
        align-items: stretch;
    }
    
    /* Reduce main content padding on mobile */
    .main-content {
        padding: 8px;
    }
    
    /* Action buttons stack vertically on mobile */
    .card-actions {
        flex-direction: column;
    }
    
    /* Location Modal adjustments */
    .location-modal {
        padding: 16px;
    }
    
    .location-modal-content {
        width: 95%;
        max-width: 400px;
        padding: 20px;
    }
}

/* Calendar Date Cards */
.date-card {
    background: white;
    border-radius: 12px;
    padding: 16px;
    border: 1px solid #e5e7eb;
    transition: all 0.15s ease;
}

.date-card:hover {
    border-color: #3b82f6;
    box-shadow: 0 4px 12px rgba(59, 130, 246, 0.15);
}

.date-card.academic {
    border-left: 4px solid #3b82f6;
}

.date-card.events {
    border-left: 4px solid #10b981;
}

.date-card.orientation {
    border-left: 4px solid #f59e0b;
}

.date-info {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.date-display {
    display: flex;
    align-items: center;
    gap: 8px;
    font-weight: 600;
    font-size: 16px;
    color: #1f2937;
}

.date-icon {
    font-size: 18px;
}

.date-text {
    color: #1f2937;
}

.date-year {
    color: #6b7280;
    font-size: 14px;
    font-weight: 500;
}

.date-description {
    color: #4b5563;
    font-size: 14px;
    line-height: 1.5;
}

.date-semester {
    display: inline-block;
    background: rgba(59, 130, 246, 0.1);
    color: #3b82f6;
    font-size: 12px;
    font-weight: 500;
    padding: 4px 8px;
    border-radius: 6px;
    width: fit-content;
}

.date-type {
    display: inline-block;
    background: rgba(107, 114, 128, 0.1);
    color: #4b5563;
    font-size: 12px;
    font-weight: 500;
    padding: 4px 8px;
    border-radius: 6px;
    width: fit-content;
    text-transform: capitalize;
}

.no-results {
    text-align: center;
    color: #6b7280;
    font-style: italic;
    padding: 32px;
}

/* ============================================
   FAVORITES SYSTEM STYLES
   ============================================ */

/* Favorite Button */
.favorite-btn {
    background: none;
    border: none;
    color: #9ca3af;
    font-size: 18px;
    cursor: pointer;
    padding: 8px;
    transition: all 0.3s ease;
    margin-left: auto;
    margin-right: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    width: 36px;
    height: 36px;
}

.favorite-btn:hover {
    background-color: rgba(251, 191, 36, 0.1);
    color: #fbbf24;
    transform: scale(1.1);
}

.favorite-btn.favorited {
    color: #fbbf24;
    animation: pulse 0.3s ease;
}

.favorite-btn.favorited:hover {
    color: #f59e0b;
}

@keyframes pulse {
    0%, 100% {
        transform: scale(1);
    }
    50% {
        transform: scale(1.2);
    }
}

/* Home Tab Specific Styles */
.home-header {
    text-align: center;
    padding: 30px 20px;
    background: linear-gradient(135deg, #6b46c1, #9333ea);
    color: white;
    border-radius: 12px;
    margin-bottom: 30px;
    box-shadow: 0 4px 20px rgba(107, 70, 193, 0.2);
}

.home-header h1 {
    font-size: 28px;
    margin-bottom: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
}

.home-header h1 i {
    color: #fbbf24;
}

.home-subtitle {
    font-size: 16px;
    opacity: 0.9;
    margin: 0;
}

.empty-favorites {
    text-align: center;
    padding: 80px 20px;
    color: #6b7280;
}

.empty-favorites i {
    font-size: 64px;
    color: #d1d5db;
    margin-bottom: 20px;
}

.empty-favorites h3 {
    font-size: 24px;
    color: #374151;
    margin-bottom: 10px;
}

.empty-favorites p {
    font-size: 16px;
    max-width: 500px;
    margin: 0 auto;
    line-height: 1.6;
}

/* Favorite Category Cards */
.favorite-category-card {
    background: white;
    border-radius: 12px;
    padding: 24px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    margin-bottom: 24px;
}

.favorite-category-card h3 {
    color: #6b46c1;
    font-size: 20px;
    margin-bottom: 8px;
    display: flex;
    align-items: center;
    gap: 10px;
}

.favorite-count {
    color: #6b7280;
    font-size: 14px;
    margin-bottom: 16px;
}

.favorite-items-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 16px;
}

/* Individual Favorite Cards */
.favorite-card {
    background: #f9fafb;
    border: 1px solid #e5e7eb;
    border-radius: 12px;
    padding: 16px;
    transition: all 0.3s ease;
    cursor: pointer;
}

.favorite-card:hover {
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
    transform: translateY(-2px);
    border-color: #6b46c1;
    background: #ffffff;
}

.favorite-card-header {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 12px;
    position: relative;
}

.favorite-icon {
    width: 40px;
    height: 40px;
    background: linear-gradient(135deg, #6b46c1, #9333ea);
    color: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 16px;
    flex-shrink: 0;
}

.favorite-card-header h4 {
    font-size: 16px;
    color: #1f2937;
    margin: 0;
    flex: 1;
    line-height: 1.4;
}

.favorite-card-header .favorite-btn {
    position: relative;
    margin-left: 0;
    margin-right: 0;
    width: 32px;
    height: 32px;
    font-size: 16px;
}

.favorite-card-body {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.favorite-subtitle,
.favorite-date,
.favorite-contact {
    font-size: 14px;
    color: #6b7280;
    margin: 0;
}

.favorite-badge {
    display: inline-block;
    background: rgba(107, 70, 193, 0.1);
    color: #6b46c1;
    font-size: 12px;
    font-weight: 500;
    padding: 4px 10px;
    border-radius: 6px;
    width: fit-content;
}

.favorite-link {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    color: #6b46c1;
    text-decoration: none;
    font-size: 14px;
    font-weight: 500;
    transition: color 0.2s ease;
}

.favorite-link:hover {
    color: #9333ea;
}

.favorite-navigate-btn {
    margin-top: 8px;
    background: #6b46c1;
    color: white;
    border: none;
    padding: 8px 16px;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    gap: 6px;
    width: 100%;
    justify-content: center;
}

.favorite-navigate-btn:hover {
    background: #9333ea;
    transform: translateY(-1px);
    box-shadow: 0 2px 8px rgba(107, 70, 193, 0.3);
}

.favorite-navigate-btn i {
    font-size: 14px;
}

/* Responsive adjustments for favorites */
@media (max-width: 768px) {
    .home-header {
        padding: 20px 16px;
    }
    
    .home-header h1 {
        font-size: 24px;
    }
    
    .home-subtitle {
        font-size: 14px;
    }
    
    .favorite-items-grid {
        grid-template-columns: 1fr;
    }
    
    .empty-favorites {
        padding: 60px 20px;
    }
    
    .empty-favorites i {
        font-size: 48px;
    }
    
    .empty-favorites h3 {
        font-size: 20px;
    }
}

/* Adjust card-header to accommodate favorite button */
.expandable-card .card-header {
    display: flex;
    align-items: center;
    gap: 12px;
}

.expandable-card .card-info {
    flex: 1;
    min-width: 0;
}
