/**
 * Cosmic Gallery Main Stylesheet
 * Imports design system and adds application-specific styles
 */

/* Import the complete design system */
@import url('./css/design-system.css');

/* Application-specific styles that extend the design system */

/* Starfield background - now using design system utility */
body {
    position: relative;
}

body::before,
body::after {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    pointer-events: none;
    z-index: var(--z-index-background);
}

body::before {
    background: #000 url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" width="300" height="300"><defs><radialGradient id="star"><stop offset="0%" stop-color="white" stop-opacity="1"/><stop offset="100%" stop-color="white" stop-opacity="0"/></radialGradient></defs><circle cx="50" cy="50" r="1" fill="url(%23star)"/><circle cx="150" cy="80" r="0.5" fill="url(%23star)"/><circle cx="250" cy="120" r="1" fill="url(%23star)"/><circle cx="80" cy="180" r="0.5" fill="url(%23star)"/><circle cx="200" cy="200" r="1" fill="url(%23star)"/><circle cx="120" cy="250" r="0.5" fill="url(%23star)"/></svg>') repeat;
}

body::after {
    background: transparent url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" width="200" height="200"><circle cx="20" cy="20" r="1" fill="white" opacity="0.8"/><circle cx="80" cy="60" r="0.5" fill="white" opacity="0.6"/><circle cx="140" cy="100" r="1" fill="white" opacity="0.9"/><circle cx="60" cy="140" r="0.5" fill="white" opacity="0.7"/><circle cx="160" cy="180" r="1" fill="white" opacity="0.8"/></svg>') repeat;
    animation: cosmic-twinkle 200s linear infinite;
}

/* Header - using design system */
.header {
    position: fixed;
    top: 0;
    width: 100%;
    height: var(--header-height);
    background: rgba(0, 0, 0, 0.9);
    backdrop-filter: var(--glass-backdrop-filter);
    z-index: var(--z-index-fixed);
    border-bottom: 1px solid var(--color-border);
}

.nav {
    height: 100%;
    max-width: var(--container-max-width);
    margin: 0 auto;
    padding: 0 var(--container-padding);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo h1 {
    font-size: var(--font-size-xl);
    background: var(--gradient-text);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    margin: 0;
}

.nav-links {
    display: flex;
    list-style: none;
    gap: var(--spacing-xl);
    margin: 0;
    padding: 0;
}

.nav-links a {
    color: var(--color-text-primary);
    text-decoration: none;
    font-weight: var(--font-weight-medium);
    padding: var(--spacing-sm) var(--spacing-md);
    border-radius: var(--border-radius-sm);
    transition: var(--transition-colors);
    min-height: var(--touch-target-min);
    display: flex;
    align-items: center;
}

.nav-links a:hover,
.nav-links a.active {
    color: var(--color-primary);
    background: var(--color-primary-100);
}

/* Hero Section - using design system */
.hero {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    background: radial-gradient(ellipse at center, var(--color-primary-100) 0%, transparent 70%);
    padding: var(--header-height) var(--container-padding) var(--spacing-xl);
    width: 100%;
    box-sizing: border-box;
}

.hero-content {
    max-width: 800px;
    width: 100%;
    padding: 0 var(--container-padding);
    box-sizing: border-box;
}

.hero-content h2 {
    font-size: var(--font-size-5xl);
    font-weight: var(--font-weight-bold);
    margin-bottom: var(--spacing-lg);
    background: var(--gradient-text);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.hero-content p {
    font-size: var(--font-size-xl);
    color: var(--color-text-secondary);
    margin-bottom: var(--spacing-xl);
    line-height: var(--line-height-relaxed);
}

.cta-button {
    padding: var(--spacing-lg) var(--spacing-xl);
    font-size: var(--font-size-lg);
    font-weight: var(--font-weight-medium);
    background: var(--gradient-primary);
    border: none;
    border-radius: var(--border-radius-full);
    color: var(--color-text-primary);
    cursor: pointer;
    transition: var(--transition-transform);
    min-height: var(--touch-target-min);
}

.cta-button:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-glow);
}

.cta-button:focus {
    outline: 2px solid var(--color-primary);
    outline-offset: 2px;
}

/* Gallery Sections - using design system */
.featured-section, 
.gallery-section {
    padding: var(--spacing-section) 0;
    width: 100%;
    box-sizing: border-box;
}

.section-content {
    max-width: var(--container-max-width);
    margin: 0 auto;
    padding: 0 var(--container-padding);
    width: 100%;
    box-sizing: border-box;
}

.featured-section h2, 
.gallery-section h2 {
    text-align: center;
    font-size: var(--font-size-4xl);
    font-weight: var(--font-weight-semibold);
    margin-bottom: var(--spacing-xxl);
    background: var(--gradient-text);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.filter-controls {
    background: var(--color-surface);
    border: 1px solid var(--color-border);
    border-radius: var(--border-radius-lg);
    padding: var(--spacing-lg);
    margin: 0 0 var(--spacing-xl) 0;
    text-align: center;
    width: 100%;
    box-sizing: border-box;
}

.category-filter-container {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: var(--spacing-lg);
    margin-bottom: var(--spacing-md);
    flex-wrap: wrap;
}

.category-filter-container label {
    color: var(--color-primary);
    font-weight: var(--font-weight-semibold);
    font-size: var(--font-size-sm);
}

.filter-controls select {
    padding: var(--spacing-input-padding);
    background: var(--color-surface);
    border: 1px solid var(--color-border-medium);
    border-radius: var(--border-radius-sm);
    color: var(--color-text-primary);
    font-size: var(--font-size-base);
    min-width: 200px;
    max-height: 120px;
    min-height: var(--input-height);
    transition: var(--transition-colors);
}

.filter-controls select:focus {
    outline: none;
    border-color: var(--color-border-focus);
    box-shadow: 0 0 0 2px var(--color-primary-200);
}

.filter-controls select[multiple] {
    border-radius: var(--border-radius-sm);
}

.filter-controls select option {
    background: var(--color-background-light);
    color: var(--color-text-primary);
    padding: var(--spacing-sm);
}

.filter-controls select option:checked {
    background: var(--color-primary);
    color: var(--color-text-primary);
}

#clearFilters {
    padding: 0.5rem 1rem;
    background: rgba(255, 107, 107, 0.2);
    border: 1px solid rgba(255, 107, 107, 0.3);
    border-radius: 8px;
    color: white;
    cursor: pointer;
    transition: all 0.3s;
}

#clearFilters:hover {
    background: rgba(255, 107, 107, 0.4);
}

.active-filters {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 1rem;
    flex-wrap: wrap;
}

.active-filters-label {
    color: #4ecdc4;
    font-weight: bold;
}

.filter-tags {
    display: flex;
    gap: 0.5rem;
    flex-wrap: wrap;
}

.filter-tag {
    background: rgba(78, 205, 196, 0.2);
    padding: 0.3rem 0.8rem;
    border-radius: 15px;
    font-size: 0.8rem;
    border: 1px solid rgba(78, 205, 196, 0.3);
    cursor: pointer;
    transition: all 0.3s;
}

.filter-tag:hover {
    background: rgba(78, 205, 196, 0.4);
}

.photo-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: var(--spacing-xl);
    margin-top: var(--spacing-xl);
    width: 100%;
    box-sizing: border-box;
}

.photo-item {
    position: relative;
    border-radius: var(--border-radius-lg);
    overflow: hidden;
    background: var(--color-surface);
    backdrop-filter: var(--glass-backdrop-filter);
    border: 1px solid var(--color-border);
    transition: var(--transition-transform);
    cursor: pointer;
}

.deep-zoom-badge {
    position: absolute;
    top: var(--spacing-sm);
    right: var(--spacing-sm);
    background: var(--gradient-secondary);
    padding: 0.3rem 0.8rem;
    border-radius: var(--border-radius-xl);
    font-size: var(--font-size-xs);
    font-weight: var(--font-weight-bold);
    z-index: 10;
    box-shadow: var(--shadow-glow);
    color: var(--color-text-primary);
}

.photo-item:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-lg);
}

.photo-item img {
    width: 100%;
    height: 250px;
    object-fit: cover;
    display: block;
}

.photo-info {
    padding: var(--spacing-card-padding);
}

.photo-info h3 {
    font-size: var(--font-size-xl);
    font-weight: var(--font-weight-semibold);
    margin-bottom: var(--spacing-sm);
    color: var(--color-primary);
}

.photo-info p {
    color: var(--color-text-secondary);
    margin-bottom: var(--spacing-md);
    line-height: var(--line-height-normal);
}

.photo-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.photo-categories {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin-bottom: 1rem;
}

.category-badge {
    background: var(--color-badge-secondary-bg);
    padding: 0.3rem 0.8rem;
    border-radius: var(--border-radius-xl);
    font-size: var(--font-size-xs);
    font-weight: var(--font-weight-medium);
    border: 1px solid var(--color-secondary-300);
    cursor: pointer;
    transition: var(--transition-all);
    color: var(--color-badge-secondary-text);
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    text-transform: uppercase;
    letter-spacing: 0.025em;
}

.category-badge:hover {
    background: var(--color-secondary-400);
    transform: translateY(-1px);
    box-shadow: var(--shadow-sm);
    color: var(--color-badge-secondary-text);
}

.category-badge.legacy {
    background: var(--color-surface-light);
    border-color: var(--color-border-medium);
    color: var(--color-text-muted);
}

.category-badge.legacy:hover {
    background: var(--color-surface-medium);
    color: var(--color-text-secondary);
}

.lightbox-categories {
    margin-bottom: 1rem;
}

.lightbox-categories .category-badge {
    margin-right: 0.5rem;
    margin-bottom: 0.5rem;
}

.tag {
    background: var(--color-badge-primary-bg);
    padding: 0.3rem 0.8rem;
    border-radius: var(--border-radius-xl);
    font-size: var(--font-size-xs);
    font-weight: var(--font-weight-medium);
    border: 1px solid var(--color-primary-300);
    color: var(--color-badge-primary-text);
    display: inline-flex;
    align-items: center;
    cursor: pointer;
    transition: var(--transition-all);
}

.tag:hover {
    background: var(--color-primary-300);
    transform: translateY(-1px);
    color: var(--color-badge-primary-text);
}

/* Lightbox */
.lightbox {
    display: none;
    position: fixed;
    z-index: 2000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.9);
    backdrop-filter: blur(5px);
}

.lightbox-content {
    margin: auto;
    display: block;
    max-width: 80%;
    max-height: 70%;
    border-radius: 10px;
    margin-top: 5%;
}

.lightbox-info {
    text-align: center;
    padding: 2rem;
    max-width: 600px;
    margin: 0 auto;
}

.lightbox-info h3 {
    font-size: 2rem;
    color: #4ecdc4;
    margin-bottom: 1rem;
}

.close {
    position: absolute;
    top: 15px;
    right: 35px;
    color: #f1f1f1;
    font-size: 40px;
    font-weight: bold;
    cursor: pointer;
}

.close:hover {
    color: #4ecdc4;
}

/* Responsive - using design system breakpoints */
@media (max-width: 768px) {
    .nav {
        flex-direction: column;
        gap: var(--spacing-md);
        padding: var(--spacing-md) var(--container-padding-mobile);
    }
    
    .nav-links {
        gap: var(--spacing-md);
        flex-wrap: wrap;
        justify-content: center;
    }
    
    .hero {
        padding: var(--header-height) var(--container-padding-mobile) var(--spacing-xl);
    }
    
    .hero-content {
        padding: 0 var(--container-padding-mobile);
    }
    
    .hero-content h2 {
        font-size: var(--font-size-4xl);
    }
    
    .hero-content p {
        font-size: var(--font-size-lg);
    }
    
    .photo-grid {
        grid-template-columns: 1fr;
        gap: var(--spacing-lg);
    }
    
    .section-content {
        padding: 0 var(--container-padding-mobile);
    }
    
    .filter-controls {
        padding: var(--spacing-md);
        margin: 0 0 var(--spacing-xl) 0;
    }
    
    .category-filter-container {
        flex-direction: column;
        gap: var(--spacing-sm);
    }
}
/*
 Enhanced Search and Filtering Styles */
.filter-controls {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.search-container {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 1rem;
    flex-wrap: wrap;
}

.search-input-wrapper {
    position: relative;
    min-width: 300px;
}

.search-container input {
    width: 100%;
    padding: 0.8rem 1rem;
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 25px;
    color: white;
    font-size: 1rem;
    backdrop-filter: blur(10px);
    transition: all 0.3s;
}

.search-container input:focus {
    outline: none;
    border-color: #4ecdc4;
    box-shadow: 0 0 15px rgba(78, 205, 196, 0.3);
}

.search-container input::placeholder {
    color: rgba(255, 255, 255, 0.6);
}

.autocomplete-dropdown {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: rgba(26, 26, 46, 0.95);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 8px;
    backdrop-filter: blur(10px);
    z-index: 1000;
    max-height: 200px;
    overflow-y: auto;
    margin-top: 5px;
}

.autocomplete-item {
    padding: 0.8rem 1rem;
    cursor: pointer;
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    transition: background 0.2s;
}

.autocomplete-item:hover {
    background: rgba(78, 205, 196, 0.2);
}

.autocomplete-item:last-child {
    border-bottom: none;
}

.suggestion-text {
    color: white;
    font-weight: 500;
}

.suggestion-type {
    color: #4ecdc4;
    font-size: 0.8rem;
    text-transform: uppercase;
    background: rgba(78, 205, 196, 0.2);
    padding: 0.2rem 0.5rem;
    border-radius: 10px;
}

.filter-options {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 1rem;
    flex-wrap: wrap;
}

.category-logic-container,
.sort-container {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.search-container label,
.category-logic-container label,
.sort-container label {
    color: #4ecdc4;
    font-weight: bold;
    white-space: nowrap;
}

.filter-controls select:focus {
    outline: none;
    border-color: #4ecdc4;
    box-shadow: 0 0 10px rgba(78, 205, 196, 0.3);
}

.clear-all-filters {
    padding: 0.3rem 0.8rem;
    background: linear-gradient(45deg, #e94560, #f38ba8);
    border: none;
    border-radius: 15px;
    color: white;
    font-size: 0.8rem;
    font-weight: bold;
    cursor: pointer;
    transition: all 0.3s;
}

.clear-all-filters:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(233, 69, 96, 0.3);
}

.filter-tag.search-tag {
    background: rgba(69, 183, 209, 0.2);
    border-color: rgba(69, 183, 209, 0.3);
}

.filter-tag.category-tag {
    background: rgba(78, 205, 196, 0.2);
    border-color: rgba(78, 205, 196, 0.3);
}

/* Recommendations Section */
.recommendations-section {
    margin-top: 2rem;
    padding: 2rem;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 15px;
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.recommendations-section h3 {
    color: #4ecdc4;
    margin-bottom: 1rem;
    text-align: center;
}

.recommendations-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1rem;
}

.recommendation-item {
    background: rgba(255, 255, 255, 0.05);
    border-radius: 10px;
    overflow: hidden;
    cursor: pointer;
    transition: transform 0.3s, box-shadow 0.3s;
}

.recommendation-item:hover {
    transform: translateY(-3px);
    box-shadow: 0 10px 20px rgba(78, 205, 196, 0.2);
}

.recommendation-item img {
    width: 100%;
    height: 120px;
    object-fit: cover;
}

.recommendation-info {
    padding: 1rem;
}

.recommendation-info h4 {
    color: #4ecdc4;
    font-size: 0.9rem;
    margin-bottom: 0.5rem;
}

.recommendation-categories {
    display: flex;
    flex-wrap: wrap;
    gap: 0.3rem;
}

.category-badge.small {
    font-size: 0.7rem;
    padding: 0.2rem 0.5rem;
}

/* Responsive Design for Enhanced Filters */
@media (max-width: 768px) {
    .filter-controls {
        padding: 0 1rem;
    }
    
    .search-input-wrapper {
        min-width: 250px;
    }
    
    .filter-options {
        flex-direction: column;
        gap: 0.5rem;
    }
    
    .category-logic-container,
    .sort-container {
        width: 100%;
        justify-content: center;
    }
    
    .recommendations-grid {
        grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    }
}

/* Enhanced Search Features */
.search-facets-section {
    margin: 1rem 0;
    padding: 1rem;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 12px;
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.search-facets h4 {
    color: #4ecdc4;
    margin-bottom: 1rem;
    font-size: 1.1rem;
}

.facet-group {
    margin-bottom: 1.5rem;
}

.facet-group h5 {
    color: #ffffff;
    margin-bottom: 0.5rem;
    font-size: 0.9rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.facet-items {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.facet-item {
    display: flex;
    align-items: center;
    gap: 0.3rem;
    padding: 0.3rem 0.8rem;
    background: rgba(78, 205, 196, 0.1);
    border: 1px solid rgba(78, 205, 196, 0.2);
    border-radius: 20px;
    cursor: pointer;
    transition: all 0.3s;
    font-size: 0.85rem;
}

.facet-item:hover {
    background: rgba(78, 205, 196, 0.2);
    border-color: rgba(78, 205, 196, 0.4);
    transform: translateY(-1px);
}

.facet-name {
    color: #ffffff;
}

.facet-count {
    color: rgba(255, 255, 255, 0.7);
    font-size: 0.8rem;
}

.search-suggestions-section {
    margin-top: 0.5rem;
}

.search-suggestions h5 {
    color: #4ecdc4;
    margin-bottom: 0.5rem;
    font-size: 0.9rem;
}

.suggestion-items {
    display: flex;
    flex-wrap: wrap;
    gap: 0.3rem;
}

.suggestion-item {
    padding: 0.2rem 0.6rem;
    background: rgba(69, 183, 209, 0.1);
    border: 1px solid rgba(69, 183, 209, 0.2);
    border-radius: 15px;
    cursor: pointer;
    transition: all 0.3s;
    font-size: 0.8rem;
    color: #45b7d1;
}

.suggestion-item:hover {
    background: rgba(69, 183, 209, 0.2);
    border-color: rgba(69, 183, 209, 0.4);
}

.suggestion-item.category {
    background: rgba(78, 205, 196, 0.1);
    border-color: rgba(78, 205, 196, 0.2);
    color: #4ecdc4;
}

.suggestion-item.equipment {
    background: rgba(255, 107, 107, 0.1);
    border-color: rgba(255, 107, 107, 0.2);
    color: #ff6b6b;
}

/* Category Grouped Results */
.category-group {
    margin-bottom: 2rem;
    background: rgba(255, 255, 255, 0.05) !important;
    border-radius: 15px;
    padding: 1.5rem;
    border: 1px solid rgba(255, 255, 255, 0.2) !important;
    color: #ffffff !important;
}

.category-group-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 1rem;
    padding-bottom: 0.5rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.2) !important;
    color: #ffffff !important;
}

.category-group-header h3 {
    margin: 0;
    font-size: 1.3rem;
    color: #ffffff !important;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.5);
}

.photo-count {
    color: rgba(255, 255, 255, 0.8) !important;
    font-size: 0.9rem;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.5);
}

.view-all-link {
    color: #4ecdc4;
    text-decoration: none;
    font-size: 0.9rem;
    padding: 0.3rem 0.8rem;
    border: 1px solid rgba(78, 205, 196, 0.3);
    border-radius: 15px;
    transition: all 0.3s;
}

.view-all-link:hover {
    background: rgba(78, 205, 196, 0.1);
    border-color: rgba(78, 205, 196, 0.5);
}

.category-group-photos {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 1rem;
}

.photo-item.grouped {
    max-width: none;
}

.photo-item.grouped .photo-info h4 {
    font-size: 0.9rem;
    margin-bottom: 0.3rem;
}

/* View Options */
.view-options {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

#search-view-toggle {
    padding: 0.5rem 1rem;
    background: linear-gradient(45deg, #4ecdc4, #45b7d1);
    border: none;
    border-radius: 8px;
    color: white;
    cursor: pointer;
    transition: all 0.3s;
    font-size: 0.9rem;
}

#search-view-toggle:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(78, 205, 196, 0.3);
}

/* Enhanced Sort Options */
.sort-container select {
    min-width: 150px;
}

/* Responsive enhancements for new features */
@media (max-width: 768px) {
    .search-facets-section {
        padding: 0.8rem;
    }
    
    .facet-items {
        gap: 0.3rem;
    }
    
    .facet-item {
        font-size: 0.8rem;
        padding: 0.25rem 0.6rem;
    }
    
    .category-group {
        padding: 1rem;
    }
    
    .category-group-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 0.5rem;
    }
    
    .category-group-photos {
        grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
        gap: 0.8rem;
    }
    
    .view-options {
        width: 100%;
        justify-content: center;
    }
    
    #search-view-toggle {
        width: 100%;
    }
}
/* EMER
GENCY CONTRAST FIXES - Prevent white-on-white issues */
/* These rules ensure no text is ever invisible */

/* Global text visibility fixes */
* {
    /* Ensure all text has minimum contrast */
    color: inherit;
}

/* Category and grouping fixes */
.category-group,
.category-group *,
.category-item,
.category-item *,
.tag-item,
.tag-item *,
.category-list,
.category-list *,
.tag-list,
.tag-list * {
    color: #ffffff !important;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.5) !important;
}

/* Ensure category groups have proper background */
.category-group {
    background: rgba(255, 255, 255, 0.05) !important;
    border: 1px solid rgba(255, 255, 255, 0.2) !important;
}

/* Fix any potential white backgrounds */
.white-bg,
.light-bg,
[style*="background: white"],
[style*="background: #fff"],
[style*="background-color: white"],
[style*="background-color: #fff"] {
    color: #000000 !important;
    text-shadow: none !important;
}

/* Ensure headers and text are always visible */
h1, h2, h3, h4, h5, h6,
p, span, div, label, a {
    color: inherit;
}

/* Category group specific fixes */
.category-group h3,
.category-group-header h3,
.category-group .photo-count,
.category-group .view-all-link {
    color: #ffffff !important;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.5);
}

/* Navigation and menu fixes - made less aggressive */
.nav, .navigation, .menu {
    color: #ffffff;
}

.nav a, .navigation a, .menu a {
    color: inherit;
}

/* Form element fixes */
input, select, textarea, button {
    color: inherit;
}

/* Button contrast fixes - removed overly aggressive styling */

/* Card and panel fixes */
.card, .panel, .section {
    color: #ffffff !important;
}

.card *, .panel *, .section * {
    color: inherit !important;
}

/* Table fixes */
table, .table {
    color: #ffffff !important;
}

table *, .table * {
    color: inherit !important;
}

/* Modal and overlay fixes */
.modal, .overlay, .popup {
    color: #ffffff !important;
}

.modal *, .overlay *, .popup * {
    color: inherit !important;
}

/* Search and filter fixes */
.search-container,
.filter-container,
.category-filter-container {
    color: #ffffff !important;
}

.search-container *,
.filter-container *,
.category-filter-container * {
    color: inherit !important;
}

/* Photo grid and item fixes */
.photo-grid,
.photo-item,
.photo-card {
    color: #ffffff !important;
}

.photo-grid *,
.photo-item *,
.photo-card * {
    color: inherit !important;
}

/* Sidebar and aside fixes */
.sidebar, aside {
    color: #ffffff !important;
}

.sidebar *, aside * {
    color: inherit !important;
}

/* Footer fixes */
footer, .footer {
    color: #ffffff !important;
}

footer *, .footer * {
    color: inherit !important;
}

/* Loading and status fixes */
.loading, .status, .message {
    color: #ffffff !important;
}

.loading *, .status *, .message * {
    color: inherit !important;
}

/* Dropdown fixes */
.dropdown, .select-dropdown {
    color: #ffffff !important;
}

.dropdown *, .select-dropdown * {
    color: inherit !important;
}

/* Breadcrumb fixes */
.breadcrumb, .breadcrumbs {
    color: #ffffff !important;
}

.breadcrumb *, .breadcrumbs * {
    color: inherit !important;
}

/* Pagination fixes */
.pagination {
    color: #ffffff !important;
}

.pagination * {
    color: inherit !important;
}

/* Alert and notification fixes */
.alert, .notification {
    color: #ffffff !important;
}

.alert *, .notification * {
    color: inherit !important;
}

/* Tab fixes */
.tabs, .tab-content {
    color: #ffffff !important;
}

.tabs *, .tab-content * {
    color: inherit !important;
}

/* Accordion fixes */
.accordion, .accordion-content {
    color: #ffffff !important;
}

.accordion *, .accordion-content * {
    color: inherit !important;
}

/* Tooltip fixes */
.tooltip {
    color: #ffffff !important;
    background: rgba(0, 0, 0, 0.9) !important;
}

.tooltip * {
    color: inherit !important;
}

/* Progress bar fixes */
.progress, .progress-bar {
    color: #ffffff !important;
}

.progress *, .progress-bar * {
    color: inherit !important;
}

/* Badge fixes */
.badge {
    color: #ffffff !important;
}

.badge * {
    color: inherit !important;
}

/* List fixes */
ul, ol, li {
    color: inherit;
}

/* Definition list fixes */
dl, dt, dd {
    color: inherit;
}

/* Code and pre fixes */
code, pre {
    color: #ffffff !important;
    background: rgba(0, 0, 0, 0.5) !important;
}

/* Blockquote fixes */
blockquote {
    color: #ffffff !important;
}

blockquote * {
    color: inherit !important;
}

/* Figure and caption fixes */
figure, figcaption {
    color: #ffffff !important;
}

figure *, figcaption * {
    color: inherit !important;
}

/* Summary and details fixes */
summary, details {
    color: #ffffff !important;
}

summary *, details * {
    color: inherit !important;
}

/* Mark and highlight fixes */
mark, .highlight {
    background: rgba(255, 255, 0, 0.3) !important;
    color: #000000 !important;
}

/* Selection fixes */
::selection {
    background: rgba(78, 205, 196, 0.3) !important;
    color: #ffffff !important;
}

::-moz-selection {
    background: rgba(78, 205, 196, 0.3) !important;
    color: #ffffff !important;
}

/* Placeholder fixes */
::placeholder {
    color: rgba(255, 255, 255, 0.6) !important;
}

::-webkit-input-placeholder {
    color: rgba(255, 255, 255, 0.6) !important;
}

::-moz-placeholder {
    color: rgba(255, 255, 255, 0.6) !important;
}

:-ms-input-placeholder {
    color: rgba(255, 255, 255, 0.6) !important;
}

/* Focus fixes */
:focus {
    outline: 2px solid #4ecdc4 !important;
    outline-offset: 2px !important;
}

/* Visited link fixes - removed overly aggressive link coloring */

/* Active and hover fixes - removed overly aggressive link coloring */

/* Disabled element fixes */
:disabled, .disabled {
    color: rgba(255, 255, 255, 0.5) !important;
}

/* Error and success state fixes */
.error, .danger {
    color: #ff6b6b !important;
}

.success {
    color: #4ecdc4 !important;
}

.warning {
    color: #ffc107 !important;
}

.info {
    color: #17a2b8 !important;
}

/* END EMERGENCY CONTRAST FIXES */