/* Enhanced Layouts and Spacing */
/* Version: 2.0 - Contemporary Redesign Layouts */

/* ===== ENHANCED CONTAINER SYSTEM ===== */

.container-enhanced {
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 var(--space-6);
    width: 100%;
}

.container-narrow {
    max-width: 800px;
    margin: 0 auto;
    padding: 0 var(--space-6);
}

.container-wide {
    max-width: 1600px;
    margin: 0 auto;
    padding: 0 var(--space-6);
}

/* ===== ENHANCED SPACING SYSTEM ===== */

.section-spacing {
    padding: var(--space-16) 0;
}

.section-spacing-lg {
    padding: var(--space-20) 0;
}

.section-spacing-sm {
    padding: var(--space-12) 0;
}

.section-spacing-xs {
    padding: var(--space-8) 0;
}

/* ===== ENHANCED WELCOME SECTION ===== */

.welcome-section-enhanced {
    background: linear-gradient(135deg, var(--color-porcelain) 0%, var(--color-white) 100%);
    padding: var(--space-20) 0;
    margin-bottom: var(--space-16);
}

.welcome-card-enhanced {
    text-align: center;
    max-width: 800px;
    margin: 0 auto;
}

.welcome-title-enhanced {
    font-size: var(--text-5xl);
    font-weight: 700;
    color: var(--color-navy);
    margin-bottom: var(--space-6);
    line-height: 1.1;
}

.welcome-subtitle-enhanced {
    font-size: var(--text-xl);
    color: var(--color-slate);
    margin-bottom: var(--space-8);
    line-height: 1.6;
    max-width: 600px;
    margin-left: auto;
    margin-right: auto;
}

.welcome-actions-enhanced {
    display: flex;
    gap: var(--space-4);
    justify-content: center;
    flex-wrap: wrap;
}

/* ===== ENHANCED FEATURED SECTION ===== */

.featured-section-enhanced {
    margin-bottom: var(--space-20);
}

.featured-header-enhanced {
    text-align: center;
    margin-bottom: var(--space-12);
}

.featured-title-enhanced {
    font-size: var(--text-3xl);
    font-weight: 600;
    color: var(--color-navy);
    margin-bottom: var(--space-4);
}

.featured-subtitle-enhanced {
    font-size: var(--text-lg);
    color: var(--color-slate);
    max-width: 600px;
    margin: 0 auto;
}

.featured-clock-card {
    background: var(--color-white);
    border-radius: var(--radius-2xl);
    box-shadow: var(--shadow-lg);
    overflow: hidden;
    transition: all var(--transition-bounce);
    max-width: 1000px;
    margin: 0 auto;
}

.featured-clock-card:hover {
    transform: translateY(-8px);
    box-shadow: var(--shadow-2xl);
}

.featured-clock-image {
    width: 100%;
    height: 400px;
    object-fit: cover;
    background: linear-gradient(135deg, var(--color-ash), var(--color-pewter));
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--color-slate);
    font-size: var(--text-lg);
}

.featured-clock-content {
    padding: var(--space-8);
}

.featured-clock-title {
    font-size: var(--text-2xl);
    font-weight: 600;
    color: var(--color-navy);
    margin-bottom: var(--space-4);
}

.featured-clock-location {
    font-size: var(--text-lg);
    color: var(--color-teal);
    margin-bottom: var(--space-4);
    display: flex;
    align-items: center;
    gap: var(--space-2);
}

.featured-clock-description {
    color: var(--color-slate);
    line-height: 1.6;
    margin-bottom: var(--space-6);
}

.featured-clock-actions {
    display: flex;
    gap: var(--space-4);
    flex-wrap: wrap;
}

.featured-clock-tags {
    display: flex;
    gap: var(--space-2);
    flex-wrap: wrap;
    margin-top: var(--space-4);
}

/* ===== ENHANCED CLOCK CARDS ===== */

.clocks-grid-enhanced {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(350px, 1fr));
    gap: var(--space-8);
    margin-bottom: var(--space-16);
}

.clock-card-enhanced {
    background: var(--color-white);
    border-radius: var(--radius-xl);
    box-shadow: var(--shadow-md);
    overflow: hidden;
    transition: all var(--transition-bounce);
    position: relative;
}

.clock-card-enhanced:hover {
    transform: translateY(-6px) scale(1.02);
    box-shadow: var(--shadow-2xl);
}

.clock-card-image {
    width: 100%;
    height: 250px;
    object-fit: cover;
    background: linear-gradient(135deg, var(--color-ash), var(--color-pewter));
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--color-slate);
    font-size: var(--text-base);
}

.clock-card-content {
    padding: var(--space-6);
}

.clock-card-title {
    font-size: var(--text-xl);
    font-weight: 600;
    color: var(--color-navy);
    margin-bottom: var(--space-3);
    line-height: 1.3;
}

.clock-card-location {
    font-size: var(--text-base);
    color: var(--color-teal);
    margin-bottom: var(--space-4);
    display: flex;
    align-items: center;
    gap: var(--space-2);
}

.clock-card-description {
    color: var(--color-slate);
    line-height: 1.5;
    margin-bottom: var(--space-4);
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.clock-card-tags {
    display: flex;
    gap: var(--space-2);
    flex-wrap: wrap;
    margin-bottom: var(--space-4);
}

.clock-card-actions {
    display: flex;
    gap: var(--space-3);
    justify-content: space-between;
    align-items: center;
}

.clock-card-status {
    display: flex;
    align-items: center;
    gap: var(--space-2);
    font-size: var(--text-sm);
    color: var(--color-slate);
}

/* ===== ENHANCED LOAD MORE SECTION ===== */

.load-more-enhanced {
    text-align: center;
    padding: var(--space-12) 0;
}

.load-more-button {
    background: var(--color-navy);
    color: var(--color-white);
    border: none;
    padding: var(--space-4) var(--space-8);
    border-radius: var(--radius-pill);
    font-family: var(--font-family);
    font-size: var(--text-lg);
    font-weight: 500;
    cursor: pointer;
    transition: all var(--transition-normal);
    min-width: 200px;
}

.load-more-button:hover {
    background: #1e40af;
    transform: translateY(-2px);
    box-shadow: var(--shadow-lg);
}

.load-more-button:active {
    transform: translateY(0);
}

/* ===== ENHANCED MAP SECTION ===== */

.map-section-enhanced {
    background: var(--color-porcelain);
    padding: var(--space-16) 0;
    margin-top: var(--space-20);
}

.map-header-enhanced {
    text-align: center;
    margin-bottom: var(--space-12);
}

.map-title-enhanced {
    font-size: var(--text-3xl);
    font-weight: 600;
    color: var(--color-navy);
    margin-bottom: var(--space-4);
}

.map-subtitle-enhanced {
    font-size: var(--text-lg);
    color: var(--color-slate);
    max-width: 600px;
    margin: 0 auto;
}

.map-container-enhanced {
    height: 500px;
    border-radius: var(--radius-xl);
    overflow: hidden;
    box-shadow: var(--shadow-lg);
    margin-bottom: var(--space-12);
}

/* ===== ENHANCED LOCATION PERMISSION ===== */

.location-permission-enhanced {
    max-width: 600px;
    margin: 0 auto;
    text-align: center;
}

.permission-content-enhanced {
    background: var(--color-white);
    padding: var(--space-8);
    border-radius: var(--radius-xl);
    box-shadow: var(--shadow-md);
}

.permission-title-enhanced {
    font-size: var(--text-2xl);
    font-weight: 600;
    color: var(--color-navy);
    margin-bottom: var(--space-4);
}

.permission-description-enhanced {
    color: var(--color-slate);
    line-height: 1.6;
    margin-bottom: var(--space-6);
}

.permission-button-enhanced {
    background: var(--color-navy);
    color: var(--color-white);
    border: none;
    padding: var(--space-4) var(--space-8);
    border-radius: var(--radius-pill);
    font-family: var(--font-family);
    font-size: var(--text-lg);
    font-weight: 500;
    cursor: pointer;
    transition: all var(--transition-normal);
    margin-bottom: var(--space-4);
}

.permission-button-enhanced:hover {
    background: #1e40af;
    transform: translateY(-2px);
    box-shadow: var(--shadow-lg);
}

.permission-note-enhanced {
    font-size: var(--text-sm);
    color: var(--color-gray-new);
    font-style: italic;
}

/* ===== ENHANCED NEARBY CLOCKS ===== */

.nearby-clocks-enhanced {
    margin-top: var(--space-12);
}

.nearby-clocks-title {
    font-size: var(--text-2xl);
    font-weight: 600;
    color: var(--color-navy);
    margin-bottom: var(--space-6);
    text-align: center;
}

.nearby-clocks-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: var(--space-6);
}

/* ===== RESPONSIVE DESIGN ===== */

@media (max-width: 1024px) {
    .clocks-grid-enhanced {
        grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
        gap: var(--space-6);
    }
    
    .featured-clock-card {
        margin: 0 var(--space-4);
    }
}

@media (max-width: 768px) {
    .container-enhanced,
    .container-narrow,
    .container-wide {
        padding: 0 var(--space-4);
    }
    
    .section-spacing {
        padding: var(--space-12) 0;
    }
    
    .section-spacing-lg {
        padding: var(--space-16) 0;
    }
    
    .welcome-section-enhanced {
        padding: var(--space-16) 0;
    }
    
    .welcome-title-enhanced {
        font-size: var(--text-4xl);
    }
    
    .welcome-actions-enhanced {
        flex-direction: column;
        align-items: center;
    }
    
    .clocks-grid-enhanced {
        grid-template-columns: 1fr;
        gap: var(--space-6);
        margin: 0 var(--space-4);
    }
    
    .featured-clock-image {
        height: 300px;
    }
    
    .featured-clock-content {
        padding: var(--space-6);
    }
    
    .map-container-enhanced {
        height: 400px;
        margin: 0 var(--space-4);
    }
}

@media (max-width: 640px) {
    .container-enhanced,
    .container-narrow,
    .container-wide {
        padding: 0 var(--space-3);
    }
    
    .welcome-title-enhanced {
        font-size: var(--text-3xl);
    }
    
    .featured-clock-image {
        height: 250px;
    }
    
    .featured-clock-content {
        padding: var(--space-4);
    }
    
    .clock-card-content {
        padding: var(--space-4);
    }
    
    .map-container-enhanced {
        height: 300px;
    }
}

/* ===== ANIMATIONS ===== */

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.clock-card-enhanced {
    animation: fadeInUp 0.6s ease-out;
}

.clock-card-enhanced:nth-child(2) {
    animation-delay: 0.1s;
}

.clock-card-enhanced:nth-child(3) {
    animation-delay: 0.2s;
}

.clock-card-enhanced:nth-child(4) {
    animation-delay: 0.3s;
}

/* ===== ACCESSIBILITY ===== */

@media (prefers-reduced-motion: reduce) {
    .clock-card-enhanced,
    .featured-clock-card {
        animation: none;
        transition: none;
    }
    
    .clock-card-enhanced:hover,
    .featured-clock-card:hover {
        transform: none;
    }
}

/* ==========================================================================
   CSS Overrides to Ensure New Layout Styles Take Precedence
   ========================================================================== */

/* Force new layout styles to override old styles */
.main-content-with-top-nav {
    margin-top: 70px !important;
    padding-top: var(--space-6) !important;
    margin-left: 0 !important;
    width: 100% !important;
    max-width: none !important;
    background: transparent !important;
}

.container-enhanced {
    max-width: 1400px !important;
    margin: 0 auto !important;
    padding: 0 var(--space-6) !important;
    width: 100% !important;
}

.container-narrow {
    max-width: 800px !important;
    margin: 0 auto !important;
    padding: 0 var(--space-6) !important;
}

.container-wide {
    max-width: 1600px !important;
    margin: 0 auto !important;
    padding: 0 var(--space-6) !important;
}

.section-spacing {
    padding: var(--space-12) 0 !important;
}

.welcome-section-enhanced {
    background: linear-gradient(135deg, var(--color-primary) 0%, var(--color-primary-dark) 100%) !important;
    color: var(--color-white) !important;
    padding: var(--space-16) 0 !important;
    text-align: center !important;
}

.welcome-card-enhanced {
    max-width: 800px !important;
    margin: 0 auto !important;
}

.welcome-title-enhanced {
    font-size: var(--text-4xl) !important;
    font-weight: 700 !important;
    margin-bottom: var(--space-4) !important;
    line-height: 1.2 !important;
}

.welcome-subtitle-enhanced {
    font-size: var(--text-xl) !important;
    margin-bottom: var(--space-8) !important;
    opacity: 0.9 !important;
    line-height: 1.6 !important;
}

.welcome-actions-enhanced {
    display: flex !important;
    gap: var(--space-4) !important;
    justify-content: center !important;
    flex-wrap: wrap !important;
}

.featured-section-enhanced {
    padding: var(--space-12) 0 !important;
    background: var(--color-background) !important;
}

.featured-header-enhanced {
    text-align: center !important;
    margin-bottom: var(--space-8) !important;
}

.featured-title-enhanced {
    font-size: var(--text-3xl) !important;
    font-weight: 600 !important;
    color: var(--color-primary) !important;
    margin-bottom: var(--space-3) !important;
}

.featured-subtitle-enhanced {
    font-size: var(--text-lg) !important;
    color: var(--color-text-light) !important;
    max-width: 600px !important;
    margin: 0 auto !important;
}

.load-more-enhanced {
    text-align: center !important;
    padding: var(--space-8) 0 !important;
}

/* Responsive overrides */
@media (max-width: 768px) {
    .welcome-section-enhanced {
        padding: var(--space-12) 0 !important;
    }
    
    .welcome-title-enhanced {
        font-size: var(--text-3xl) !important;
    }
    
    .welcome-subtitle-enhanced {
        font-size: var(--text-lg) !important;
    }
    
    .welcome-actions-enhanced {
        flex-direction: column !important;
        align-items: center !important;
    }
    
    .section-spacing {
        padding: var(--space-8) 0 !important;
    }
    
    .container-enhanced,
    .container-narrow,
    .container-wide {
        padding: 0 var(--space-4) !important;
    }
}
