/* Import Design System Variables */
@import url('./variables.css');

/* Basic Link Styles - Essential for proper link rendering */
a {
    color: var(--color-brass);
    text-decoration: none;
    transition: all var(--transition-normal);
}

a:hover {
    color: var(--color-copper);
    text-decoration: underline;
}

a:focus {
    outline: 2px solid var(--color-brass);
    outline-offset: 2px;
}

/* SIDEBAR CSS REMOVED - Replaced by new top navigation system */



/* Reset and Base Styles */

* {
    box-sizing: border-box;
}

body {
    font-family: var(--font-family);
    line-height: 1.6;
    color: var(--text-primary);
    background-color: var(--bg-secondary);
    min-height: 100vh;
    font-size: var(--text-base); /* Base font size for better readability */
    overflow-x: hidden; /* Prevent horizontal scrollbars */
}

/* Responsive Typography System */
h1 {
    font-size: clamp(var(--text-2xl), 5vw, var(--text-4xl));
    line-height: 1.2;
    font-weight: 700;
}

h2 {
    font-size: clamp(var(--text-xl), 4vw, var(--text-3xl));
    line-height: 1.3;
    font-weight: 600;
}

h3 {
    font-size: clamp(var(--text-lg), 3vw, var(--text-2xl));
    line-height: 1.4;
    font-weight: 600;
}

h4 {
    font-size: clamp(var(--text-base), 2.5vw, var(--text-lg));
    line-height: 1.4;
    font-weight: 500;
}

p {
    font-size: clamp(var(--text-base), 2vw, var(--text-lg));
    line-height: 1.6;
}

/* Small text for meta information */
.small-text {
    font-size: clamp(var(--text-sm), 1.5vw, var(--text-base));
}

/* Large text for emphasis */
.large-text {
    font-size: clamp(var(--text-lg), 2.5vw, var(--text-xl));
}

/* Modern Container System */
.container {
    width: 100%;
    max-width: none;
    margin: 0;
    padding: 0;
}

/* Fluid Layout System */
.content-wrapper {
    width: 100%;
    max-width: 100%;
    margin: 0;
    padding: 0;
    line-height: 1.6;
    color: var(--color-charcoal);
}

/* Main Content - Updated for top navigation layout */
.main-content {
    min-height: 60vh;
    width: 100%;
    max-width: none;
    margin-left: 0;
    padding: var(--space-6);
    background: var(--color-porcelain);
}

/* Main Content - Top Navigation Layout Override */
.main-content-with-top-nav {
    margin-left: 0 !important;
    width: 100% !important;
    max-width: none !important;
    padding: 0 !important;
    background: transparent !important;
}

/* Content Wrapper for non-gallery pages */
.content-wrapper {
    max-width: 1200px;
    margin: 0 auto;
    background: var(--color-white);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-xl);
    overflow: hidden;
}

/* Content page specific styles */
.content-wrapper .about-content,
.content-wrapper .news-content,
.content-wrapper .newsletter-content {
    padding: clamp(1.5rem, 3vw, 3rem);
}

/* News page specific styles */
.content-wrapper .news-content .featured-news {
    background: #f8f9fa;
    color: #333;
    padding: 30px;
    border: 1px solid #e9ecef;
    margin-bottom: 40px;
    text-align: center;
    border-radius: 8px;
}

.content-wrapper .news-content .featured-news h2 {
    color: #2c3e50;
    border-bottom: 2px solid #e9ecef;
    padding-bottom: 15px;
    margin-bottom: 15px;
}

.content-wrapper .news-content .featured-news p {
    color: #6c757d;
    font-size: var(--text-lg);
    margin: 0;
}

.content-wrapper .news-content .news-section h2 {
    color: #333;
    margin-bottom: 20px;
    font-size: var(--text-3xl);
}

.content-wrapper .news-content .news-item {
    background: white;
    border-radius: 10px;
    padding: 25px;
    margin-bottom: 25px;
    box-shadow: 0 4px 6px rgba(0,0,0,0.1);
    border-left: 4px solid #007bff;
}

.content-wrapper .news-content .news-item h3 {
    color: #2c3e50;
    margin-bottom: 10px;
    font-size: var(--text-xl);
}

.content-wrapper .news-content .news-item .date {
    color: #666;
    font-size: var(--text-sm);
    margin-bottom: 15px;
    font-style: italic;
}

.content-wrapper .news-content .news-item p {
    line-height: 1.7;
    color: #555;
    margin-bottom: 15px;
}

.content-wrapper .news-content .news-item .source {
    color: var(--color-copper);
    font-weight: 500;
    text-decoration: none;
}

.content-wrapper .news-content .news-item .source:hover {
    text-decoration: underline;
}

.content-wrapper .news-content .video-container {
    margin: 20px 0;
    text-align: center;
}

.content-wrapper .news-content .video-container video {
    max-width: 100%;
    height: auto;
    border-radius: 8px;
    box-shadow: 0 4px 8px rgba(0,0,0,0.1);
}

/* About page specific styles */
.content-wrapper .about-content .hero-section {
    background: #f8f9fa;
    color: #333;
    padding: 40px;
    border: 1px solid #e9ecef;
    margin-bottom: 40px;
    text-align: center;
    border-radius: 8px;
}

.content-wrapper .about-content .hero-section h1 {
    font-size: var(--text-4xl);
    margin-bottom: 20px;
    color: #2c3e50;
}

.content-wrapper .about-content .hero-section p {
    font-size: var(--text-lg);
    opacity: 0.9;
    max-width: 600px;
    margin: 0 auto;
}

.content-wrapper .about-content .about-section {
    margin-bottom: 40px;
}

.content-wrapper .about-content .about-section h2 {
    color: var(--color-charcoal);
    margin: var(--space-8) 0 var(--space-4) 0;
    font-size: clamp(var(--text-2xl), 3vw, var(--text-3xl));
    font-weight: 600;
    border-bottom: 2px solid var(--color-brass);
    padding-bottom: var(--space-2);
    position: relative;
}

.content-wrapper .about-content .about-section h2::after {
    content: '';
    position: absolute;
    bottom: -2px;
    left: 0;
    width: 60px;
    height: 2px;
    background: var(--color-copper);
}

.content-wrapper .about-content .about-section p {
    line-height: 1.6;
    margin-bottom: 15px;
}

.content-wrapper .about-content .about-section img {
    max-width: 100%;
    height: auto;
    display: block;
    margin: 20px auto;
    border-radius: 8px;
    box-shadow: 0 4px 8px rgba(0,0,0,0.1);
}

.content-wrapper .about-content .image-caption {
    text-align: center;
    font-style: italic;
    color: #6c757d;
    margin-top: -10px;
    margin-bottom: 20px;
}

/* Newsletter page specific styles */
.content-wrapper .newsletter-content .newsletter-hero {
    background: #f8f9fa;
    color: #333;
    padding: 40px;
    border: 1px solid #e9ecef;
    margin-bottom: 40px;
    text-align: center;
    border-radius: 8px;
}

.content-wrapper .newsletter-content .newsletter-hero h1 {
    font-size: var(--text-4xl);
    margin-bottom: 20px;
    color: #2c3e50;
}

.content-wrapper .newsletter-content .newsletter-hero p {
    font-size: var(--text-lg);
    color: #6c757d;
    max-width: 600px;
    margin: 0 auto;
}

.content-wrapper .newsletter-content .substack-widget {
    margin: 40px 0;
    display: flex;
    justify-content: center;
}

.content-wrapper .newsletter-content .substack-widget iframe {
    border: 1px solid #EEE;
    background: white;
    border-radius: 8px;
    box-shadow: 0 4px 8px rgba(0,0,0,0.1);
}

.content-wrapper .clock-view {
    padding: clamp(1.5rem, 3vw, 3rem);
}

/* Ensure content pages have proper spacing */
.content-wrapper h1,
.content-wrapper h2,
.content-wrapper h3 {
    margin-top: 0;
    margin-bottom: 1rem;
}

.content-wrapper p {
    margin-bottom: 1rem;
    line-height: 1.6;
}

.content-wrapper img {
    max-width: 100%;
    height: auto;
    border-radius: 8px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.1);
}

.content-wrapper .image-caption {
    text-align: center;
    font-style: italic;
    color: #6c757d;
    margin-top: 0.5rem;
    margin-bottom: 1.5rem;
    font-size: 0.9rem;
}

/* Clock navigation styles */
.clock-navigation {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1.5rem 0;
    border-top: 1px solid #e9ecef;
    margin-top: 2rem;
}

.clock-actions {
    display: flex;
    gap: 1rem;
}

/* Clock Actions Button Styles - REMOVED: Now handled by enhanced-components.css */

/* Loading state styles */
.loading {
    text-align: center;
    padding: 3rem;
    color: #6c757d;
    font-size: 1.1rem;
}

/* Clock view specific styles */
.clock-header {
    margin-bottom: 2rem;
    padding-bottom: 1.5rem;
    border-bottom: 1px solid #e9ecef;
}

.clock-title {
    font-size: clamp(var(--text-2xl), 4vw, var(--text-3xl));
    color: #2c3e50;
    margin-bottom: 1rem;
}

.clock-meta {
    display: flex;
    gap: 2rem;
    color: #6c757d;
    font-size: 0.9rem;
    flex-wrap: wrap;
}

.clock-image-container {
    position: relative;
    margin-bottom: 2rem;
    text-align: center;
}

.clock-image {
    max-width: 100%;
    height: auto;
    border-radius: 12px;
    box-shadow: 0 8px 25px rgba(0,0,0,0.15);
}

.image-overlay {
    position: absolute;
    top: 1rem;
    right: 1rem;
}

.zoom-btn {
    background: rgba(0,0,0,0.7);
    color: white;
    border: none;
    padding: 10px 15px;
    border-radius: 6px;
    cursor: pointer;
    font-size: 0.9rem;
    transition: all 0.3s ease;
}

.zoom-btn:hover {
    background: rgba(0,0,0,0.9);
    transform: scale(1.05);
}

.clock-details {
    display: grid;
    gap: 2rem;
}

.clock-details h3 {
    color: #2c3e50;
    margin-bottom: 1rem;
    font-size: 1.3rem;
}

/* Tags container - OLD TAG CSS REMOVED - Replaced by new enhanced tag system */

.map-link {
    display: inline-block;
    background: #28a745;
    color: white;
    padding: 10px 20px;
    border-radius: 6px;
    text-decoration: none;
    margin-top: 1rem;
    transition: all 0.3s ease;
}

.map-link:hover {
    background: #218838;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(40, 167, 69, 0.3);
}

/* Image modal styles */
.image-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0,0,0,0.9);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 10000;
    padding: 2rem;
}

.modal-content {
    position: relative;
    max-width: 90vw;
    max-height: 90vh;
    background: white;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 20px 60px rgba(0,0,0,0.3);
}

.close-modal {
    position: absolute;
    top: 1rem;
    right: 1rem;
    background: rgba(0,0,0,0.7);
    color: white;
    border: none;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    cursor: pointer;
    font-size: 1.5rem;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 10001;
    transition: all 0.3s ease;
}

.close-modal:hover {
    background: rgba(0,0,0,0.9);
    transform: scale(1.1);
}

.modal-image {
    width: 100%;
    height: auto;
    max-height: 70vh;
    object-fit: contain;
}

.modal-caption {
    padding: 1.5rem;
    background: white;
}

.modal-caption h3 {
    margin: 0 0 0.5rem 0;
    color: #2c3e50;
    font-size: 1.5rem;
}

.modal-caption p {
    margin: 0;
    color: #6c757d;
    line-height: 1.5;
}

/* Gallery Header - OLD FEATURED SECTION CSS REMOVED - Replaced by new enhanced system */

/* Featured Actions Button Styles - REMOVED: Now handled by enhanced-components.css */

/* Enhanced Mobile Responsiveness for Featured Section - OLD FEATURED SECTION CSS REMOVED - Replaced by new enhanced system */

/* Enhanced Clock Card Mobile Responsiveness - REMOVED: Now handled by enhanced-clock-cards.css */

/* Enhanced Button Mobile Responsiveness - REMOVED: Now handled by enhanced-components.css */

/* Gallery Grid - Responsive Grid - REMOVED: Now handled by enhanced-clock-cards.css */

/* Tag system - OLD TAG SYSTEM CSS REMOVED - Replaced by new enhanced tag system */

/* Location Indicator */
.location-indicator {
    background: linear-gradient(135deg, #e8f5e8, #c8e6c9);
    border: 1px solid #4caf50;
    border-radius: 8px;
    padding: 10px 15px;
    margin: 15px 0;
    display: flex;
    align-items: center;
    gap: 10px;
    color: #388e3c;
    font-size: 0.9em;
    font-weight: 500;
}

.location-icon {
    font-size: var(--text-lg);
}

.location-text {
    flex: 1;
}

/* Enhanced Tag Hover Effects */
.tag.tag-architectural:hover {
    background: linear-gradient(135deg, #e1bee7, #ce93d8);
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(156, 39, 176, 0.3);
}

.tag.tag-functional:hover {
    background: linear-gradient(135deg, #c8e6c9, #a5d6a7);
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(76, 175, 80, 0.3);
}

.tag.tag-location:hover {
    background: linear-gradient(135deg, #ffe0b2, #ffcc80);
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(255, 152, 0, 0.3);
}

.tag.tag-material:hover {
    background: linear-gradient(135deg, #f8bbd9, #f48fb1);
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(233, 30, 99, 0.3);
}

.tag.tag-era:hover {
    background: linear-gradient(135deg, #b2dfdb, #80cbc4);
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(0, 150, 136, 0.3);
}

.tag.tag-cultural:hover {
    background: linear-gradient(135deg, #dcedc8, #c5e1a5);
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(139, 195, 74, 0.3);
}

.tag.tag-general:hover {
    background: linear-gradient(135deg, #eeeeee, #e0e0e0);
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(158, 158, 158, 0.3);
}

/* Tag Filter Indicator */
.tag-filter-indicator {
    background: var(--color-porcelain);
    border: 1px solid var(--color-pewter);
    border-radius: 8px;
    padding: 15px 20px;
    margin: 20px 0;
    display: flex;
    justify-content: space-between;
    align-items: center;
    color: var(--color-brass);
    font-size: clamp(var(--text-sm), 2vw, var(--text-base));
}

.tag-filter-indicator strong {
    color: var(--color-brass);
    font-weight: 600;
}

.clear-filter-btn {
    background: #2196f3;
    color: white;
    border: none;
    border-radius: 50%;
    width: 30px;
    height: 30px;
    font-size: var(--text-lg);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
}

.clear-filter-btn:hover {
    background: #1976d2;
    transform: scale(1.1);
}

/* Admin Controls - OLD ADMIN CSS REMOVED - Replaced by new enhanced admin system */

/* Admin Button Styles - REMOVED: Now handled by enhanced-components.css */

.clock-actions {
    display: flex;
    gap: 10px;
}

/* Main Button Styles - REMOVED: Now handled by enhanced-components.css */

/* Footer - OLD FOOTER CSS REMOVED - Replaced by new enhanced footer system */

/* Map Section */
.map-section {
    margin: 2rem 0;
    padding: 1.5rem;
    background: white;
    border-radius: 12px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
    box-sizing: border-box;
}

.map-section h3 {
    color: #2c3e50;
    margin-bottom: 1rem;
    font-size: 1.3rem;
}

.map-container {
    width: 100%;
    height: 500px;
    background: #f8f9fa;
    border-radius: 8px;
    margin-bottom: 1.5rem;
    border: 1px solid #e9ecef;
}

/* Map Placeholder */
.map-placeholder {
    display: flex;
    align-items: center;
    justify-content: center;
    height: 100%;
    background: #f8f9fa;
    border-radius: 8px;
}

.placeholder-content {
    text-align: center;
    padding: 2rem;
}

.placeholder-content h4 {
    color: #6c757d;
    margin-bottom: 0.5rem;
    font-size: 1.1rem;
}

.placeholder-content p {
    color: #6c757d;
    font-size: 0.9rem;
    margin: 0;
}

/* Location Permission Section */
.location-permission {
    background: #e8f4fd;
    border: 1px solid #b3d9ff;
    border-radius: 8px;
    padding: 1.5rem;
    margin-bottom: 1.5rem;
}

.permission-content h4 {
    color: var(--color-brass);
    margin-bottom: 0.75rem;
    font-size: 1.1rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.permission-content p {
    color: #495057;
    margin-bottom: 1rem;
    line-height: 1.5;
    font-size: 0.95rem;
}

.location-btn {
    background: var(--color-brass);
    color: var(--color-white);
    border: none;
    padding: 10px 20px;
    border-radius: 6px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s ease;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
}

.location-btn:hover {
    background: var(--color-copper);
    transform: translateY(-1px);
    box-shadow: var(--shadow-md);
}

.permission-note {
    font-size: 0.85rem;
    color: #6c757d;
    font-style: italic;
    margin-top: 0.75rem;
    margin-bottom: 0;
}

/* Nearby Clocks Section */
.nearby-clocks {
    background: #f8f9fa;
    border: 1px solid #e9ecef;
    border-radius: 8px;
    padding: 1.5rem;
}

.nearby-clocks h4 {
    color: #28a745;
    margin-bottom: 1rem;
    font-size: 1.1rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.nearby-clocks-list {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 1rem;
}

.nearby-clock-item {
    background: white;
    border-radius: 8px;
    padding: 1rem;
    border: 1px solid #e9ecef;
    transition: all 0.3s ease;
    cursor: pointer;
}

.nearby-clock-item:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0,0,0,0.1);
    border-color: #007bff;
}

.nearby-clock-item h5 {
    color: #2c3e50;
    margin-bottom: 0.5rem;
    font-size: 1rem;
}

.nearby-clock-item p {
    color: #6c757d;
    font-size: 0.9rem;
    margin-bottom: 0.5rem;
    line-height: 1.4;
}

.nearby-clock-item .distance {
    color: #28a745;
    font-weight: 500;
    font-size: 0.85rem;
}

.hidden {
    display: none;
}

/* Map Info Window Styles */
.map-info-window {
    max-width: 300px;
    padding: 0;
}

.map-info-window h3 {
    color: #333;
    margin-bottom: 10px;
    font-size: 1.2em;
    border-bottom: 2px solid #007bff;
    padding-bottom: 8px;
}

.map-info-window p {
    margin-bottom: 15px;
    line-height: 1.4;
    color: #555;
}

.info-window-actions {
    display: flex;
    gap: 10px;
    margin-top: 15px;
}

/* Info Window Button Styles - REMOVED: Now handled by enhanced-components.css */

/* Map Error Styles */
.map-error {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    height: 100%;
    text-align: center;
    padding: 2rem;
}

.map-error p {
    margin-bottom: 1rem;
    color: #666;
}

/* Load More Button */
.load-more {
    text-align: center;
    margin: 3rem auto;
    padding: 0 clamp(1rem, 2vw, 2rem);
    display: flex;
    justify-content: center;
    width: 100%;
    max-width: 100%;
    box-sizing: border-box;
}

/* Load More Button Styles - REMOVED: Now handled by enhanced-components.css */

/* Back to Top Button */
.back-to-top {
    position: fixed;
    bottom: 30px;
    right: 30px;
    width: 50px;
    height: 50px;
    background: var(--color-brass);
    color: var(--color-white);
    border: none;
    border-radius: 50%;
    font-size: var(--text-xl);
    cursor: pointer;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
    z-index: 1000;
}

.back-to-top.visible {
    opacity: 1;
    visibility: visible;
}

.back-to-top:hover {
    background: #0056b3;
    transform: translateY(-3px);
    box-shadow: 0 6px 20px rgba(0, 123, 255, 0.4);
}

/* Responsive Design - Modern Breakpoint System - OLD GALLERY CSS REMOVED - Replaced by new enhanced system */

/* SIDEBAR RESPONSIVE CSS REMOVED - Replaced by new top navigation system */

/* Responsive Design - Consolidated Media Queries */
@media (max-width: 1200px) {
    .featured-image {
        height: clamp(200px, 30vh, 350px);
    }
    
    .container {
        max-width: 100%;
        padding: 0 var(--space-4);
    }
}

@media (max-width: 992px) {
    .featured-image {
        height: clamp(200px, 30vh, 350px);
    }
}

@media (max-width: 768px) {
    .back-to-top {
        bottom: 20px;
        right: 20px;
        width: 45px;
        height: 45px;
        font-size: var(--text-lg);
    }
    
    .container {
        padding: 0 var(--space-3);
    }
    
    /* Ensure mobile animations are optimized */
    .animate-fade-in-up,
    .animate-fade-in-scale,
    .animate-slide-in-left,
    .animate-slide-in-right {
        animation-duration: 0.4s;
    }
    
    /* Street View Modal */
    .street-view-modal {
        padding: 1rem;
    }
    
    .street-view-content {
        max-width: 95vw;
        height: 95vh;
    }
    
    .street-view-header {
        padding: 0.75rem 1rem;
    }
    
    .street-view-header h3 {
        font-size: 1.1rem;
    }
    
    .close-street-view {
        width: 30px;
        height: 30px;
        font-size: 1.3rem;
    }
    
    /* Policy pages */
    .policy-content {
        padding: 0 1rem;
    }
    
    .page-header h1 {
        font-size: var(--text-2xl);
    }
    
    .policy-section h2 {
        font-size: var(--text-lg);
    }
    
    .policy-section h3 {
        font-size: var(--text-base);
    }
    
    .cookie-table {
        font-size: var(--text-xs);
    }
    
    .cookie-table th,
    .cookie-table td {
        padding: 0.75rem 0.5rem;
    }
    
    /* Enhanced Mobile Navigation */
    .navbar {
        padding: var(--space-3) 0;
    }
    
    .navbar-brand {
        font-size: var(--text-xl);
    }
    
    .navbar-nav .nav-link {
        padding: var(--space-4);
        text-align: center;
        border-radius: 0;
        border-bottom: 1px solid var(--color-ash);
    }
    
    .navbar-nav .nav-link:last-child {
        border-bottom: none;
    }
    
    .content-section {
        margin: var(--space-8) 0;
        padding: var(--space-8) 0;
    }
    
    .section-title {
        font-size: var(--text-2xl);
    }
    
    .section-subtitle {
        font-size: var(--text-base);
        padding: 0 var(--space-4);
    }
    
    .form-control {
        padding: var(--space-4);
        font-size: var(--text-base);
    }
    
    /* Enhanced Mobile Interactions */
    .btn:active {
        transform: scale(0.95);
        transition: transform 0.1s ease;
    }
    
    .tag:hover {
        transform: none;
    }
    
    /* Dashboard responsive design */
    .dashboard-tabs {
        flex-direction: column;
    }
    
    .tab-btn {
        border-bottom: 1px solid #e0e0e0;
        border-right: none;
    }
    
    .tab-btn.active {
        border-bottom-color: #667eea;
        border-right: none;
    }
    
    .patterns-grid {
        grid-template-columns: repeat(4, 1fr);
    }
    
    .stats-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .hotspots-grid {
        grid-template-columns: 1fr;
    }
    
    .combination-grid {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 480px) {
    .container {
        padding: 0 var(--space-2);
    }
    
    /* Street View Modal */
    .street-view-modal {
        padding: 0.5rem;
    }
    
    .street-view-content {
        max-width: 100vw;
        height: 100vh;
        border-radius: 0;
    }
    
    .street-view-header {
        padding: 0.5rem 0.75rem;
    }
    
    .street-view-header h3 {
        font-size: 1rem;
    }
    
    /* Info window responsive design */
    .map-info-window {
        max-width: 320px;
        min-width: 280px;
    }
    
    .info-window-header {
        flex-direction: column;
        gap: 0.75rem;
    }
    
    .info-window-thumbnail {
        width: 100%;
        height: 100px;
    }
    
    .info-window-actions {
        flex-direction: column;
        gap: 0.5rem;
    }
}

/* Browser-specific fixes */
@media screen and (-webkit-min-device-pixel-ratio: 0) {
    .form-control {
        -webkit-appearance: none;
        border-radius: var(--radius-md);
    }
}

@media all and (-ms-high-contrast: none), (-ms-high-contrast: active) {
    /* IE11 specific fixes if needed */
}

/* Accessibility and preferences */
@media (prefers-reduced-motion: reduce) {
    * {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
}

@media (prefers-contrast: high) {
    .form-control {
        border: 2px solid currentColor;
    }
    
    .tag {
        border: 1px solid currentColor;
    }
}

@media print {
    .navbar,
    .btn,
    .form-control {
        display: none !important;
    }
    
    .content-section::after {
        display: none;
    }
    
    .animate-fade-in-up,
    .animate-fade-in-scale,
    .animate-slide-in-left,
    .animate-slide-in-right,
    .animate-pulse,
    .animate-stagger > * {
        animation: none !important;
        opacity: 1 !important;
        transform: none !important;
    }
    
    .btn::before,
    .navbar-nav .nav-link::before,
    .tag::before {
        display: none !important;
    }
}

/* Ultra-wide Screen Optimizations - OLD GALLERY/FEATURED/FOOTER CSS REMOVED - Replaced by new enhanced system */



/* Enhanced Map Info Window */
.map-info-window {
    max-width: 420px;
    min-width: 300px;
    padding: 0;
    font-family: inherit;
    /* Remove fixed height to allow content to determine size */
}

/* Override Google Maps default info window styles */
.gm-style .gm-style-iw-c {
    padding: 0 !important;
    border-radius: 8px !important;
    box-shadow: 0 4px 20px rgba(0,0,0,0.15) !important;
    max-height: none !important;
    min-height: auto !important;
}

.gm-style .gm-style-iw-d {
    overflow: visible !important;
    border-radius: 8px !important;
    max-height: none !important;
    min-height: auto !important;
}

.gm-style .gm-style-iw-t::after {
    background: linear-gradient(45deg, rgba(255,255,255,1) 50%, rgba(255,255,255,0) 51%, rgba(255,255,255,0) 100%) !important;
}

/* Ensure info window content is fully visible */
.gm-style .gm-style-iw-c > div {
    max-height: none !important;
    overflow: visible !important;
}

.info-window-header {
    padding: 1rem 1rem 0.75rem 1rem;
    border-bottom: 1px solid #e9ecef;
    display: flex;
    gap: 1rem;
    align-items: flex-start;
}

.info-window-title-section {
    flex: 1;
    min-width: 0; /* Allow text to wrap properly */
}

.info-window-header h3 {
    color: #2c3e50;
    margin: 0 0 0.5rem 0;
    font-size: 1.1rem;
    font-weight: 600;
    line-height: 1.3;
    word-wrap: break-word;
}

.info-window-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
    font-size: 0.8rem;
    color: #6c757d;
}

.info-window-meta .date,
.info-window-meta .location {
    display: flex;
    align-items: center;
    gap: 0.25rem;
}

.info-window-thumbnail {
    flex-shrink: 0;
    width: 100px;
    height: 70px;
    border-radius: 6px;
    overflow: hidden;
    border: 1px solid #e9ecef;
    background: #f8f9fa;
}

.info-window-thumbnail img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.info-window-content {
    padding: 0.75rem 1rem;
}

.info-window-content .description {
    margin: 0 0 0.75rem 0;
    line-height: 1.4;
    color: #495057;
    font-size: 0.9rem;
}

.marker-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin-bottom: 0.5rem;
}

.marker-tag {
    background: #e8f4fd;
    color: #007bff;
    padding: 0.25rem 0.5rem;
    border-radius: 12px;
    font-size: 0.75rem;
    border: 1px solid #b3d9ff;
}

.info-window-actions {
    display: flex;
    gap: 0.5rem;
    padding: 0.75rem 1rem;
    border-top: 1px solid #e9ecef;
    background: #f8f9fa;
}

/* Info Window Button Styles - REMOVED: Now handled by enhanced-components.css */

/* Info window responsive design - consolidated above */

/* Street View Modal */
.street-view-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.9);
    display: none;
    align-items: center;
    justify-content: center;
    z-index: 10000;
    padding: 2rem;
    box-sizing: border-box;
}

.street-view-modal.active {
    display: flex;
}

.street-view-content {
    position: relative;
    width: 100%;
    max-width: 90vw;
    height: 90vh;
    background: white;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
    display: flex;
    flex-direction: column;
}

.street-view-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem 1.5rem;
    background: #f8f9fa;
    border-bottom: 1px solid #e9ecef;
    flex-shrink: 0;
}

.street-view-header h3 {
    margin: 0;
    color: #2c3e50;
    font-size: 1.3rem;
    font-weight: 600;
}

.close-street-view {
    background: #dc3545;
    color: white;
    border: none;
    border-radius: 50%;
    width: 35px;
    height: 35px;
    font-size: 1.5rem;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
    -webkit-tap-highlight-color: transparent;
    touch-action: manipulation;
}

.close-street-view:hover,
.close-street-view:active {
    background: #c82333;
    transform: scale(1.1);
}

.street-view-container {
    flex: 1;
    position: relative;
    background: #f8f9fa;
    overflow: hidden;
}

.street-view-placeholder {
    display: flex;
    align-items: center;
    justify-content: center;
    height: 100%;
    color: #6c757d;
    font-size: 1.1rem;
}

/* Street View Modal - Responsive styles consolidated above */

/* MOBILE SIDEBAR CSS REMOVED - Replaced by new top navigation system */

/* EXTRA SMALL MOBILE SIDEBAR CSS REMOVED - Replaced by new top navigation system */

/* MOBILE MENU HIDING CSS REMOVED - Replaced by new top navigation system */

/* Admin navigation styling - OLD ADMIN NAV CSS REMOVED - Replaced by new enhanced admin system */

/* User navigation styling */
.user-nav-item {
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    margin: 0.5rem 0;
    padding: 1rem 0;
}

.user-info {
    margin-bottom: 1rem;
    padding-bottom: 0.75rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.2);
}

.user-name {
    color: white;
    font-weight: 600;
    font-size: 0.9rem;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.3);
}

.user-nav-item .nav-link {
    display: block;
    margin-bottom: 0.5rem;
    padding: 0.5rem 0;
}

.auth-nav-item {
    margin-top: 0.5rem;
}

.auth-nav-item .nav-link {
    display: block;
    margin-bottom: 0.5rem;
    padding: 0.5rem 0;
}

/* Mobile user navigation styling */
/* Mobile user navigation styling - consolidated above */

/* Tag Dashboard Styles - OLD TAG DASHBOARD CSS REMOVED - Replaced by new enhanced tag system */

/* OLD TAG DASHBOARD CSS REMOVED - Replaced by new enhanced tag system */

/* OLD TAG COMBINATION CSS REMOVED - Replaced by new enhanced tag system */

/* Stats Grid - OLD STATS CSS REMOVED - Replaced by new enhanced stats system */

/* Hotspots Grid - OLD HOTSPOTS CSS REMOVED - Replaced by new enhanced hotspots system */

/* Patterns Grid - OLD PATTERNS CSS REMOVED - Replaced by new enhanced patterns system */

/* OLD PATTERN STYLES REMOVED - Replaced by new enhanced pattern system */

/* Filter Controls - OLD FILTER CSS REMOVED - Replaced by new enhanced filter system */

.apply-filter-btn:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(102, 126, 234, 0.3);
}

/* Selected Tags */
.selected-tags h5 {
    margin: 0 0 10px 0;
    font-size: 0.9rem;
    color: #495057;
}

.selected-tags-display {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.selected-tag {
    display: inline-flex;
    align-items: center;
    background: #e3f2fd;
    color: #1565c0;
    padding: 6px 12px;
    border-radius: 20px;
    font-size: 0.8rem;
    border: 1px solid #bbdefb;
}

.remove-tag {
    background: #1565c0;
    color: white;
    border: none;
    width: 18px;
    height: 18px;
    border-radius: 50%;
    margin-left: 8px;
    cursor: pointer;
    font-size: var(--text-xs);
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s ease;
}

.remove-tag:hover {
    background: #0d47a1;
    transform: scale(1.1);
}

/* Favourite Tags */
.favourite-tags-grid {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.favourite-tag {
    display: inline-block;
    background: linear-gradient(135deg, #fce4ec, #f8bbd9);
    color: #c2185b;
    padding: 6px 12px;
    border: 1px solid #e91e63;
    border-radius: 20px;
    font-size: 0.8rem;
    cursor: pointer;
    transition: all 0.3s ease;
}

.favourite-tag:hover {
    background: linear-gradient(135deg, #f8bbd9, #f48fb1);
    transform: translateY(-1px);
    box-shadow: 0 2px 6px rgba(233, 30, 99, 0.3);
}

.no-favourites {
    color: #6c757d;
    font-style: italic;
    text-align: center;
    padding: 20px;
}

/* Location Context Message */
.location-context {
    background: #e3f2fd;
    border: 1px solid #bbdefb;
    border-radius: 8px;
    padding: 12px 16px;
    margin-bottom: 20px;
    color: #1565c0;
    font-size: 0.9rem;
    line-height: 1.4;
    font-style: italic;
}

/* Dashboard Toggle Button */
.dashboard-toggle {
    margin-top: 15px;
    text-align: center;
}

.dashboard-btn {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border: none;
    padding: 10px 20px;
    border-radius: 25px;
    font-size: 0.9rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 2px 8px rgba(102, 126, 234, 0.3);
}

.dashboard-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 16px rgba(102, 126, 234, 0.4);
}

/* Dashboard responsive design - consolidated above */

/* Policy Pages Styling */
.page-header {
    margin-bottom: 2rem;
    padding-bottom: 1.5rem;
    border-bottom: 2px solid var(--color-ash);
}

.page-header h1 {
    color: var(--color-charcoal);
    font-size: var(--text-3xl);
    font-weight: 700;
    margin-bottom: 0.5rem;
}

.page-header .last-updated {
    color: var(--color-steel);
    font-size: var(--text-sm);
    font-style: italic;
    margin: 0;
}

.policy-content {
    max-width: 800px;
    margin: 0 auto;
}

.policy-section {
    margin-bottom: 3rem;
}

.policy-section h2 {
    color: var(--color-charcoal);
    font-size: var(--text-xl);
    font-weight: 600;
    margin-bottom: 1rem;
    border-left: 4px solid var(--color-primary);
    padding-left: 1rem;
}

.policy-section h3 {
    color: var(--color-charcoal);
    font-size: var(--text-lg);
    font-weight: 600;
    margin: 1.5rem 0 0.75rem 0;
}

.policy-section p {
    color: var(--color-steel);
    line-height: 1.7;
    margin-bottom: 1rem;
}

.policy-section ul, .policy-section ol {
    color: var(--color-steel);
    line-height: 1.6;
    margin: 1rem 0 1rem 1.5rem;
}

.policy-section li {
    margin-bottom: 0.5rem;
}

.policy-section strong {
    color: var(--color-charcoal);
    font-weight: 600;
}

.policy-section a {
    color: var(--color-primary);
    text-decoration: none;
    transition: color 0.2s ease;
}

.policy-section a:hover {
    color: var(--color-primary-dark);
    text-decoration: underline;
}

.cookie-table {
    width: 100%;
    border-collapse: collapse;
    margin: 1.5rem 0;
    background: var(--color-white);
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.cookie-table th {
    background: var(--color-primary);
    color: var(--color-white);
    padding: 1rem;
    text-align: left;
    font-weight: 600;
    font-size: var(--text-sm);
}

.cookie-table td {
    padding: 1rem;
    border-bottom: 1px solid var(--color-ash);
    font-size: var(--text-sm);
    line-height: 1.5;
}

.cookie-table tr:last-child td {
    border-bottom: none;
}

.cookie-table tr:hover {
    background: var(--color-porcelain);
}

/* Policy pages responsive styles - consolidated above */

/* Enhanced Typography System */
.content-wrapper {
    line-height: 1.6;
    color: var(--color-charcoal);
}

.content-wrapper h1,
.content-wrapper h2,
.content-wrapper h3,
.content-wrapper h4,
.content-wrapper h5,
.content-wrapper h6 {
    color: var(--color-charcoal);
    font-weight: 600;
    line-height: 1.3;
    letter-spacing: -0.02em;
    margin-bottom: var(--space-4);
}

.content-wrapper h1 {
    font-size: clamp(var(--text-3xl), 5vw, var(--text-4xl));
    margin-bottom: var(--space-6);
}

.content-wrapper h2 {
    font-size: clamp(var(--text-2xl), 4vw, var(--text-3xl));
    margin-bottom: var(--space-5);
}

.content-wrapper h3 {
    font-size: clamp(var(--text-xl), 3vw, var(--text-2xl));
    margin-bottom: var(--space-4);
}

.content-wrapper p {
    margin-bottom: var(--space-4);
    line-height: 1.7;
    color: var(--color-steel);
}

.content-wrapper strong {
    color: var(--color-charcoal);
    font-weight: 600;
}

.content-wrapper em {
    color: var(--color-slate);
    font-style: italic;
}

/* Enhanced List Typography */
.content-wrapper ul,
.content-wrapper ol {
    margin-bottom: var(--space-4);
    padding-left: var(--space-6);
}

.content-wrapper li {
    margin-bottom: var(--space-2);
    line-height: 1.6;
    color: var(--color-steel);
}

/* Enhanced Link Typography */
.content-wrapper a {
    color: var(--color-brass);
    text-decoration: none;
    transition: color var(--transition-fast);
    border-bottom: 1px solid transparent;
}

.content-wrapper a:hover {
    color: var(--color-copper);
    border-bottom-color: var(--color-copper);
}

/* ===== PHASE 3: ENHANCED VISUAL HIERARCHY & CONTENT STRUCTURE ===== */

/* Navigation & Header Enhancement - OLD NAVBAR CSS REMOVED - Replaced by new enhanced navigation system */

/* Content Sectioning & Visual Separation */
.content-section {
    margin: var(--space-16) 0;
    padding: var(--space-12) 0;
    position: relative;
}

.content-section:not(:last-child)::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 60px;
    height: 3px;
    background: linear-gradient(90deg, var(--color-brass), var(--color-copper));
    border-radius: var(--radius-sm);
}

.content-section.alternate {
    background: var(--color-porcelain);
    margin: 0;
    padding: var(--space-16) 0;
}

.content-section.alternate::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 1px;
    background: var(--color-ash);
}

.section-header {
    text-align: center;
    margin-bottom: var(--space-12);
}

.section-title {
    font-size: var(--text-4xl);
    font-weight: 600;
    color: var(--color-charcoal);
    margin-bottom: var(--space-4);
    line-height: 1.2;
}

.section-subtitle {
    font-size: var(--text-lg);
    color: var(--color-steel);
    max-width: 600px;
    margin: 0 auto;
    line-height: 1.6;
    opacity: 0.9;
}

/* Interactive Element States & Micro-interactions */
.btn:focus,
.nav-link:focus,
.form-control:focus {
    outline: none;
    box-shadow: 0 0 0 3px rgba(184, 134, 11, 0.2);
    transition: box-shadow var(--transition-fast);
}

.btn:active {
    transform: translateY(1px);
    transition: transform var(--transition-fast);
}

.loading-state {
    position: relative;
    opacity: 0.7;
    pointer-events: none;
}

.loading-state::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 20px;
    height: 20px;
    margin: -10px 0 0 -10px;
    border: 2px solid var(--color-ash);
    border-top: 2px solid var(--color-brass);
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

.hover-lift {
    transition: transform var(--transition-normal), box-shadow var(--transition-normal);
}

.hover-lift:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-xl);
}

/* Form & Input Styling - OLD FORM CSS REMOVED - Replaced by new enhanced form system */

/* Enhanced Card Interactions - REMOVED: Now handled by enhanced-clock-cards.css */

/* Status Indicators */
.status-indicator {
    display: inline-flex;
    align-items: center;
    padding: var(--space-1) var(--space-3);
    border-radius: var(--radius-sm);
    font-size: var(--text-xs);
    font-weight: 600;
    text-transform: uppercase;
}

.status-indicator.broken {
    background: #fed7d7;
    color: #c53030;
}

.status-indicator.fixed {
    background: #c6f6d5;
    color: #2f855a;
}

.status-indicator.unknown {
    background: var(--color-ash);
    color: var(--color-steel);
}

/* Enhanced Mobile Navigation - consolidated above */

/* Enhanced Focus Management for Accessibility */
.skip-link {
    position: absolute;
    top: -40px;
    left: 6px;
    background: var(--color-brass);
    color: var(--color-white);
    padding: var(--space-2) var(--space-4);
    text-decoration: none;
    border-radius: var(--radius-sm);
    z-index: 1001;
    transition: top var(--transition-fast);
}

.skip-link:focus {
    top: 6px;
}

/* Print styles - consolidated above */

/* ===== PHASE 4: ADVANCED INTERACTIONS & POLISH ===== */

/* Enhanced Animations & Transitions */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes fadeInScale {
    from {
        opacity: 0;
        transform: scale(0.95);
    }
    to {
        opacity: 1;
        transform: scale(1);
    }
}

@keyframes slideInLeft {
    from {
        opacity: 0;
        transform: translateX(-30px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

@keyframes slideInRight {
    from {
        opacity: 0;
        transform: translateX(30px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

@keyframes pulse {
    0%, 100% {
        transform: scale(1);
    }
    50% {
        transform: scale(1.05);
    }
}

@keyframes shimmer {
    0% {
        background-position: -200px 0;
    }
    100% {
        background-position: calc(200px + 100%) 0;
    }
}

/* Animation Classes */
.animate-fade-in-up {
    animation: fadeInUp 0.6s ease-out;
}

.animate-fade-in-scale {
    animation: fadeInScale 0.5s ease-out;
}

.animate-slide-in-left {
    animation: slideInLeft 0.6s ease-out;
}

.animate-slide-in-right {
    animation: slideInRight 0.6s ease-out;
}

.animate-pulse {
    animation: pulse 2s infinite;
}

/* Staggered Animations for Lists */
.animate-stagger > * {
    opacity: 0;
    animation: fadeInUp 0.6s ease-out forwards;
}

.animate-stagger > *:nth-child(1) { animation-delay: 0.1s; }
.animate-stagger > *:nth-child(2) { animation-delay: 0.2s; }
.animate-stagger > *:nth-child(3) { animation-delay: 0.3s; }
.animate-stagger > *:nth-child(4) { animation-delay: 0.4s; }
.animate-stagger > *:nth-child(5) { animation-delay: 0.5s; }

/* Enhanced Hover States & Micro-interactions - REMOVED: Now handled by enhanced-components.css */

/* Enhanced Card Interactions - REMOVED: Now handled by enhanced-clock-cards.css */

/* Enhanced Navigation Interactions */
.navbar-nav .nav-link {
    position: relative;
    overflow: hidden;
}

.navbar-nav .nav-link::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, var(--color-brass), transparent);
    transition: left 0.6s ease;
    opacity: 0.1;
}

.navbar-nav .nav-link:hover::before {
    left: 100%;
}

/* Enhanced Form Interactions */
.form-control {
    position: relative;
    transition: all 0.3s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

.form-control:focus {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(184, 134, 11, 0.15);
}

.form-control.error {
    animation: shake 0.5s ease-in-out;
}

@keyframes shake {
    0%, 100% { transform: translateX(0); }
    25% { transform: translateX(-5px); }
    75% { transform: translateX(5px); }
}

/* Enhanced Loading States */
.loading-state {
    position: relative;
    overflow: hidden;
}

.loading-state::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(184, 134, 11, 0.1), transparent);
    animation: shimmer 1.5s infinite;
}

.loading-spinner {
    display: inline-block;
    width: 20px;
    height: 20px;
    border: 2px solid var(--color-ash);
    border-radius: 50%;
    border-top-color: var(--color-brass);
    animation: spin 1s linear infinite;
}

.loading-dots {
    display: inline-flex;
    gap: 4px;
}

.loading-dots span {
    width: 6px;
    height: 6px;
    background: var(--color-brass);
    border-radius: 50%;
    animation: loadingDots 1.4s infinite ease-in-out;
}

.loading-dots span:nth-child(1) { animation-delay: -0.32s; }
.loading-dots span:nth-child(2) { animation-delay: -0.16s; }

@keyframes loadingDots {
    0%, 80%, 100% {
        transform: scale(0);
        opacity: 0.5;
    }
    40% {
        transform: scale(1);
        opacity: 1;
    }
}

/* Enhanced Error States */
.error-state {
    position: relative;
    padding: var(--space-4);
    background: linear-gradient(135deg, #fed7d7 0%, #feb2b2 100%);
    border: 1px solid #f56565;
    border-radius: var(--radius-md);
    color: #c53030;
    animation: fadeInScale 0.3s ease-out;
}

.error-state::before {
    content: '⚠️';
    position: absolute;
    left: var(--space-4);
    top: 50%;
    transform: translateY(-50%);
    font-size: var(--text-lg);
}

.error-state .error-message {
    margin-left: 2rem;
}

/* Enhanced Success States */
.success-state {
    position: relative;
    padding: var(--space-4);
    background: linear-gradient(135deg, #c6f6d5 0%, #9ae6b4 100%);
    border: 1px solid #38a169;
    border-radius: var(--radius-md);
    color: #2f855a;
    animation: fadeInScale 0.3s ease-out;
}

.success-state::before {
    content: '✅';
    position: absolute;
    left: var(--space-4);
    top: 50%;
    transform: translateY(-50%);
    font-size: var(--text-lg);
}

.success-state .success-message {
    margin-left: 2rem;
}

/* Enhanced Focus Management */
.skip-link:focus {
    top: 6px;
    animation: fadeInScale 0.3s ease-out;
}

/* Enhanced Scroll Animations */
.scroll-reveal {
    opacity: 0;
    transform: translateY(30px);
    transition: all 0.8s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

.scroll-reveal.revealed {
    opacity: 1;
    transform: translateY(0);
}

/* Enhanced Image Interactions - REMOVED: Now handled by enhanced-clock-cards.css */

/* Enhanced Tag Interactions */
.tag {
    position: relative;
    overflow: hidden;
    transition: all 0.3s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

.tag::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.3), transparent);
    transition: left 0.5s;
}

.tag:hover::before {
    left: 100%;
}

.tag:hover {
    transform: translateY(-2px) scale(1.05);
    box-shadow: var(--shadow-md);
}

/* Enhanced Featured Section - REMOVED: Now handled by enhanced-layouts.css */

/* Enhanced Button Groups - REMOVED: Now handled by enhanced-components.css */

.btn-group .btn:hover {
    transform: translateY(-3px);
    box-shadow: var(--shadow-lg);
}

.btn-group .btn:active {
    transform: translateY(-1px);
}

/* Enhanced Modal Animations */
.modal {
    animation: fadeInScale 0.3s ease-out;
}

.modal-content {
    animation: slideInUp 0.4s ease-out;
}

@keyframes slideInUp {
    from {
        opacity: 0;
        transform: translateY(50px) scale(0.95);
    }
    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

/* Enhanced Tooltip */
.tooltip {
    position: relative;
    cursor: help;
}

.tooltip::after {
    content: attr(data-tooltip);
    position: absolute;
    bottom: 100%;
    left: 50%;
    transform: translateX(-50%) translateY(-8px);
    background: var(--color-charcoal);
    color: var(--color-white);
    padding: var(--space-2) var(--space-3);
    border-radius: var(--radius-sm);
    font-size: var(--text-sm);
    white-space: nowrap;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
    z-index: 1000;
}

.tooltip:hover::after {
    opacity: 1;
    visibility: visible;
    transform: translateX(-50%) translateY(-4px);
}

/* Enhanced Progress Indicators */
.progress-bar {
    width: 100%;
    height: 6px;
    background: var(--color-ash);
    border-radius: var(--radius-sm);
    overflow: hidden;
    position: relative;
}

.progress-fill {
    height: 100%;
    background: linear-gradient(90deg, var(--color-brass), var(--color-copper));
    border-radius: var(--radius-sm);
    transition: width 0.6s cubic-bezier(0.25, 0.46, 0.45, 0.94);
    position: relative;
    overflow: hidden;
}

.progress-fill::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.3), transparent);
    animation: shimmer 2s infinite;
}

/* Enhanced Mobile Interactions - consolidated above */

/* Performance Optimizations */
.will-change {
    will-change: transform, opacity;
}

.gpu-accelerated {
    transform: translateZ(0);
    backface-visibility: hidden;
    perspective: 1000px;
}

/* Print optimizations - consolidated above */

/* ===== PHASE 5: FINAL INTEGRATION & TESTING ===== */

/* Cross-Browser Compatibility */
@supports not (display: grid) {
    /* Clocks grid styles - REMOVED: Now handled by enhanced-clock-cards.css */
    
    /* Clock content styles - REMOVED: Now handled by enhanced-clock-cards.css */
}

@supports not (gap: 1rem) {
    /* Clocks grid styles - REMOVED: Now handled by enhanced-clock-cards.css */
    
    /* Button group styles - REMOVED: Now handled by enhanced-components.css */
    
    /* Clock meta styles - REMOVED: Now handled by enhanced-clock-cards.css */
}

/* Firefox-specific fixes */
@-moz-document url-prefix() {
    /* Button Firefox fix - REMOVED: Now handled by enhanced-components.css */
    
    /* Clock card Firefox fix - REMOVED: Now handled by enhanced-clock-cards.css */
    
    .form-control:focus {
        outline: 2px solid var(--color-brass);
        outline-offset: 2px;
    }
}

/* Safari and IE11 fixes - consolidated above */

/* Performance Optimisation - OLD PERFORMANCE CSS REMOVED - Replaced by new enhanced performance system */

/* Font Loading Optimization */
.font-loading {
    font-display: swap;
}

.font-loaded {
    font-display: block;
}

/* Image Optimization */
.optimized-image {
    image-rendering: -webkit-optimize-contrast;
    image-rendering: crisp-edges;
    image-rendering: pixelated;
}

/* Accessibility Improvements */
.sr-only {
    position: absolute !important;
    width: 1px !important;
    height: 1px !important;
    padding: 0 !important;
    margin: -1px !important;
    overflow: hidden !important;
    clip: rect(0, 0, 0, 0) !important;
    white-space: nowrap !important;
    border: 0 !important;
}

.sr-only-focusable:focus {
    position: static !important;
    width: auto !important;
    height: auto !important;
    padding: inherit !important;
    margin: inherit !important;
    overflow: visible !important;
    clip: auto !important;
    white-space: normal !important;
}

/* High contrast mode support - consolidated above */

/* Dark Mode Support (disabled by default) */
/*
@media (prefers-color-scheme: dark) {
    :root.theme-dark {
        --color-charcoal: #ffffff;
        --color-slate: #e2e8f0;
        --color-steel: #cbd5e0;
        --color-silver: #a0aec0;
        --color-pewter: #718096;
        --color-ash: #4a5568;
        --color-porcelain: #2d3748;
        --color-white: #1a202c;
        --color-brass: #f6ad55;
        --color-copper: #f6e05e;
        --color-bronze: #f687b3;
    }
}
*/

/* Focus Visible Enhancement */
.focus-visible {
    outline: 2px solid var(--color-brass);
    outline-offset: 2px;
}

/* Reduced Motion Support */
@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
        scroll-behavior: auto !important;
    }
    
    .animate-fade-in-up,
    .animate-fade-in-scale,
    .animate-slide-in-left,
    .animate-slide-in-right,
    .animate-pulse,
    .animate-stagger > * {
        animation: none !important;
        opacity: 1 !important;
        transform: none !important;
    }
    
    .btn::before,
    .navbar-nav .nav-link::before,
    .tag::before {
        display: none !important;
    }
}

/* Print Styles Enhancement */
@media print {
    * {
        background: transparent !important;
        color: black !important;
        box-shadow: none !important;
        text-shadow: none !important;
    }
    
    /* Clock card print styles - REMOVED: Now handled by enhanced-clock-cards.css */
    
    .btn,
    .navbar,
    .sidebar,
    .footer {
        display: none !important;
    }
    
    /* Clock content print styles - REMOVED: Now handled by enhanced-clock-cards.css */
    
    .clock-details {
        margin-top: 1rem;
    }
    
    a[href]:after {
        content: " (" attr(href) ")";
    }
    
    abbr[title]:after {
        content: " (" attr(title) ")";
    }
}

/* Integration Testing Styles - OLD TEST MODE CSS REMOVED - Replaced by new enhanced testing system */

/* Performance Monitoring */
.performance-marker {
    position: fixed;
    top: 10px;
    right: 10px;
    background: rgba(0, 0, 0, 0.8);
    color: white;
    padding: 5px 10px;
    border-radius: 4px;
    font-size: var(--text-xs);
    z-index: 10000;
    font-family: monospace;
}

/* Error Boundary Styling */
.error-boundary {
    padding: var(--space-6);
    margin: var(--space-4);
    background: linear-gradient(135deg, #fed7d7 0%, #feb2b2 100%);
    border: 2px solid #f56565;
    border-radius: var(--radius-lg);
    color: #c53030;
    text-align: center;
}

.error-boundary h2 {
    color: #c53030;
    margin-bottom: var(--space-4);
}

.error-boundary .retry-btn {
    background: #f56565;
    color: white;
    border: none;
    padding: var(--space-3) var(--space-6);
    border-radius: var(--radius-md);
    cursor: pointer;
    margin-top: var(--space-4);
    transition: background-color 0.3s ease;
}

.error-boundary .retry-btn:hover {
    background: #e53e3e;
}

/* Loading Skeleton */
.skeleton {
    background: linear-gradient(90deg, var(--color-ash) 25%, var(--color-porcelain) 50%, var(--color-ash) 75%);
    background-size: 200% 100%;
    animation: shimmer 1.5s infinite;
    border-radius: var(--radius-md);
}

.skeleton-text {
    height: 1em;
    margin-bottom: 0.5em;
}

.skeleton-text:last-child {
    width: 60%;
}

.skeleton-image {
    width: 100%;
    height: 200px;
    border-radius: var(--radius-md);
}

/* Final Polish & Micro-interactions */
.hover-lift {
    transition: transform 0.3s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

.hover-lift:hover {
    transform: translateY(-4px);
}

.hover-scale {
    transition: transform 0.3s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

.hover-scale:hover {
    transform: scale(1.02);
}

.hover-rotate {
    transition: transform 0.3s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

.hover-rotate:hover {
    transform: rotate(2deg);
}

/* Enhanced Scrollbar */
::-webkit-scrollbar {
    width: 8px;
    height: 8px;
}

::-webkit-scrollbar-track {
    background: var(--color-porcelain);
    border-radius: 4px;
}

::-webkit-scrollbar-thumb {
    background: var(--color-brass);
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: var(--color-copper);
}

/* Selection Styling */
::selection {
    background: var(--color-brass);
    color: var(--color-white);
}

::-moz-selection {
    background: var(--color-brass);
    color: var(--color-white);
}

/* Final Integration Test Classes */
.integration-test {
    /* These classes are for testing integration between all phases */
}

.phase-1-content-tone { /* Content tone improvements */ }
.phase-2-typography { /* Typography and visual hierarchy */ }
.phase-3-layout { /* Enhanced layout and structure */ }
.phase-4-interactions { /* Advanced interactions and polish */ }
.phase-5-integration { /* Final integration and testing */ }

/* Responsive Design - Consolidated above */

/* Final Performance Optimizations */
.optimized {
    contain: layout style paint;
    will-change: auto;
}

.optimized * {
    contain: layout style paint;
}

/* Critical Rendering Path Optimization - OLD CRITICAL CSS REMOVED - Replaced by new enhanced critical system */

/* Final Accessibility Enhancements */
.accessible-focus:focus {
    outline: 3px solid var(--color-brass);
    outline-offset: 2px;
}

.accessible-hover:hover {
    outline: 2px solid var(--color-copper);
    outline-offset: 1px;
}

/* Integration Success Indicator */
.integration-success {
    position: fixed;
    bottom: 20px;
    right: 20px;
    background: linear-gradient(135deg, #38a169 0%, #48bb78 100%);
    color: white;
    padding: var(--space-3) var(--space-4);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-lg);
    z-index: 10000;
    animation: fadeInScale 0.5s ease-out;
    font-weight: 600;
}

.integration-success::before {
    content: '✅';
    margin-right: var(--space-2);
}
