/* Enhanced Layout Styles for QuakeWatchr */

/* ============================================
   ENHANCED HEADER STYLES
   ============================================ */

.main-header {
    position: relative;
    background: linear-gradient(135deg, #ffffff 0%, #f8f9fa 100%);
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
    border-bottom: 1px solid rgba(0, 0, 0, 0.05);
    z-index: 1000;
}

.navbar-custom {
    background: transparent !important;
    padding: 1rem 0;
    transition: all 0.3s ease;
}

.brand-enhanced {
    text-decoration: none !important;
    transition: all 0.3s ease;
}

.brand-enhanced:hover {
    transform: translateY(-2px);
    text-decoration: none !important;
}

.brand-container {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.navbar-brand-logo {
    height: 45px;
    width: auto;
    filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.1));
    transition: all 0.3s ease;
}

.brand-enhanced:hover .navbar-brand-logo {
    transform: rotate(5deg) scale(1.05);
}

.brand-text-container {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
}

.navbar-brand-text {
    font-size: 1.75rem;
    font-weight: 800;
    line-height: 1;
    font-family: 'Segoe UI', system-ui, -apple-system, sans-serif;
}

.navbar-brand-quake {
    color: #e74c3c;
    background: linear-gradient(45deg, #e74c3c, #c0392b);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    text-shadow: 0 2px 4px rgba(231, 76, 60, 0.3);
}

.navbar-brand-watchr {
    color: #3498db;
    background: linear-gradient(45deg, #3498db, #2980b9);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    text-shadow: 0 2px 4px rgba(52, 152, 219, 0.3);
}

.brand-tagline {
    font-size: 0.75rem;
    color: #6c757d;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 1px;
    margin-top: 2px;
    opacity: 0.8;
}

/* Enhanced Navigation */
.navbar-nav-enhanced {
    display: flex;
    align-items: center;
    gap: 2rem;
}

.nav-links-container {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.nav-link-enhanced {
    color: #2c3e50 !important;
    font-weight: 500;
    padding: 0.5rem 1rem !important;
    border-radius: 8px;
    transition: all 0.3s ease;
    text-decoration: none;
    border: 1px solid transparent;
}

.nav-link-enhanced:hover {
    color: #e74c3c !important;
    background: rgba(231, 76, 60, 0.05);
    border-color: rgba(231, 76, 60, 0.2);
    transform: translateY(-1px);
}

/* Enhanced Search Container */
.search-container-enhanced {
    background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
    border-radius: 12px;
    padding: 0.25rem;
    border: 2px solid rgba(52, 152, 219, 0.1);
    backdrop-filter: blur(10px);
    transition: all 0.3s ease;
    min-width: 300px;
}

.search-container-enhanced:hover {
    border-color: rgba(52, 152, 219, 0.3);
    box-shadow: 0 4px 12px rgba(52, 152, 219, 0.15);
}

.search-input-group {
    border-radius: 10px;
    overflow: hidden;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
}

.search-input-enhanced {
    border: none !important;
    background: #ffffff;
    color: #2c3e50;
    font-weight: 500;
    padding: 0.75rem 1rem;
    font-size: 0.95rem;
}

.search-input-enhanced:focus {
    background: #ffffff;
    border: none !important;
    box-shadow: 0 0 0 0.2rem rgba(52, 152, 219, 0.25) !important;
    color: #2c3e50;
}

.search-btn-enhanced {
    background: linear-gradient(135deg, #e74c3c 0%, #c0392b 100%);
    border: none;
    color: #ffffff;
    font-weight: 600;
    padding: 0.75rem 1.25rem;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.search-btn-enhanced::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 ease;
}

.search-btn-enhanced:hover::before {
    left: 100%;
}

.search-btn-enhanced:hover {
    background: linear-gradient(135deg, #c0392b 0%, #a93226 100%);
    transform: translateY(-1px);
    box-shadow: 0 6px 16px rgba(231, 76, 60, 0.4);
}

/* Enhanced Navbar Toggler */
.navbar-toggler-enhanced {
    border: none;
    padding: 0.5rem;
    border-radius: 8px;
    background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
    transition: all 0.3s ease;
}

.navbar-toggler-enhanced:focus {
    box-shadow: 0 0 0 0.25rem rgba(52, 152, 219, 0.25);
}

.navbar-toggler-icon-custom {
    display: flex;
    flex-direction: column;
    justify-content: space-around;
    width: 24px;
    height: 18px;
}

.navbar-toggler-icon-custom span {
    display: block;
    height: 2px;
    width: 100%;
    background: #2c3e50;
    border-radius: 1px;
    transition: all 0.3s ease;
}

.navbar-toggler-enhanced:hover .navbar-toggler-icon-custom span {
    background: #e74c3c;
}

/* Header Wave Effect */
.header-wave {
    position: absolute;
    bottom: -1px;
    left: 0;
    width: 100%;
    overflow: hidden;
    line-height: 0;
    height: 60px;
}

.header-wave svg {
    position: relative;
    display: block;
    width: calc(100% + 1.3px);
    height: 60px;
}

.header-wave .shape-fill {
    fill: #eef2f5;
}

/* ============================================
   ENHANCED FOOTER STYLES
   ============================================ */

.footer-enhanced {
    background: linear-gradient(135deg, #2c3e50 0%, #34495e 100%);
    color: #ecf0f1;
    margin-top: auto;
    position: relative;
    overflow: hidden;
}

.footer-wave {
    position: absolute;
    top: -1px;
    left: 0;
    width: 100%;
    overflow: hidden;
    line-height: 0;
    height: 60px;
    transform: rotate(180deg);
}

.footer-wave svg {
    position: relative;
    display: block;
    width: calc(100% + 1.3px);
    height: 60px;
}

.footer-wave .shape-fill {
    fill: #eef2f5;
}

.footer-content-wrapper {
    padding: 2rem 0;
    position: relative;
    z-index: 1;
}

.footer-section {
    display: flex;
    flex-direction: column;
}

.footer-logo-container {
    display: flex;
    align-items: flex-start;
    gap: 1rem;
    margin-bottom: 1rem;
}

.footer-logo {
    height: 40px;
    width: auto;
    filter: brightness(0) invert(1);
}

.footer-brand-text {
    flex: 1;
}

.footer-brand-name {
    font-size: 1.5rem;
    font-weight: 700;
    display: block;
    margin-bottom: 0.5rem;
}

.footer-brand-quake {
    color: #e74c3c;
}

.footer-brand-watchr {
    color: #3498db;
}

.footer-brand-description {
    color: #bdc3c7;
    font-size: 0.9rem;
    line-height: 1.5;
    margin: 0;
}

.footer-section-title {
    color: #ecf0f1;
    font-size: 1.1rem;
    font-weight: 600;
    margin-bottom: 1.5rem;
    padding-bottom: 0.5rem;
    border-bottom: 2px solid #e74c3c;
    display: inline-block;
}

.footer-links-grid {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.footer-link {
    color: #bdc3c7;
    text-decoration: none;
    font-size: 0.9rem;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    padding: 0.5rem 0;
    border-radius: 4px;
}

.footer-link:hover {
    color: #3498db;
    text-decoration: none;
    transform: translateX(4px);
    background: rgba(52, 152, 219, 0.1);
}

.footer-link i {
    font-size: 0.8rem;
    width: 16px;
    opacity: 0.7;
}

.footer-bottom {
    border-top: 1px solid #34495e;
    padding-top: 2rem;
}

.footer-bottom-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 2rem;
}

.footer-copyright {
    color: #95a5a6;
    font-size: 0.9rem;
    margin: 0;
}

.footer-tech-info {
    display: flex;
    gap: 2rem;
    align-items: center;
}

.footer-data-source,
.footer-update-info {
    color: #95a5a6;
    font-size: 0.8rem;
    display: flex;
    align-items: center;
}

.footer-source-link {
    color: #3498db;
    text-decoration: none;
    font-weight: 500;
}

.footer-source-link:hover {
    color: #5dade2;
    text-decoration: underline;
}

/* ============================================
   ENHANCED BODY AND LAYOUT STYLES
   ============================================ */

body {
    background: linear-gradient(135deg, #eef2f5 0%, #e8ecf0 100%);
    background-attachment: fixed;
    min-height: 100vh;
}

.main-content {
    padding: 3rem 1rem;
    flex: 1;
    position: relative;
}

.main-content::before {
    content: '';
    position: absolute;
    top: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 100%;
    max-width: 1200px;
    height: 100%;
    background: radial-gradient(ellipse at top, rgba(52, 152, 219, 0.05) 0%, transparent 50%);
    pointer-events: none;
    z-index: -1;
}

/* Enhanced Cards */
.combined-stats-card,
.recent-earthquakes-card,
.emergency-preparedness-card {
    background: linear-gradient(135deg, #ffffff 0%, #f8f9fa 100%);
    border: 1px solid rgba(0, 0, 0, 0.05);
    border-radius: 16px;
    box-shadow: 
        0 8px 32px rgba(0, 0, 0, 0.1),
        0 4px 16px rgba(0, 0, 0, 0.05),
        inset 0 1px 0 rgba(255, 255, 255, 0.8);
    backdrop-filter: blur(10px);
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.combined-stats-card::before,
.recent-earthquakes-card::before,
.emergency-preparedness-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: linear-gradient(90deg, #e74c3c, #3498db, #e74c3c);
    background-size: 200% 100%;
    animation: gradientShift 6s ease-in-out infinite;
}

@keyframes gradientShift {
    0%, 100% { background-position: 0% 50%; }
    50% { background-position: 100% 50%; }
}

.combined-stats-card:hover,
.recent-earthquakes-card:hover,
.emergency-preparedness-card:hover {
    transform: translateY(-4px);
    box-shadow: 
        0 16px 48px rgba(0, 0, 0, 0.15),
        0 8px 24px rgba(0, 0, 0, 0.1),
        inset 0 1px 0 rgba(255, 255, 255, 0.9);
}

/* Enhanced Title Styles */
.combined-stats-title {
    background: linear-gradient(135deg, #2c3e50 0%, #34495e 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    text-align: center;
    font-size: 2.5rem;
    font-weight: 700;
    margin-bottom: 2rem;
    position: relative;
    padding-bottom: 1rem;
}

/* Removed the small decorative underline to keep only the main underline */

/* ============================================
   RESPONSIVE DESIGN
   ============================================ */

@media (max-width: 1200px) {
    .footer-main {
        grid-template-columns: 1.5fr 1fr 1fr;
        gap: 2rem;
    }
    
    .search-container-enhanced {
        min-width: 250px;
    }
    
    /* Hide logo on larger tablet devices */
    .navbar-brand-logo {
        display: none;
    }
}

@media (max-width: 1200px) {
    /* Ensure proper spacing for larger tablets */
    .emergency-preparedness-card {
        margin-bottom: 8rem;
    }
    
    .main-content {
        padding-bottom: 10rem;
    }
}

@media (max-width: 992px) {
    .navbar-nav-enhanced {
        flex-direction: column;
        gap: 1rem;
        width: 100%;
        padding: 1rem 0;
    }
    
    .nav-links-container {
        width: 100%;
        justify-content: center;
        flex-wrap: wrap;
    }
    
    .search-container-enhanced {
        width: 100%;
        min-width: auto;
        max-width: 400px;
        margin: 0 auto;
    }
    
    /* Footer main section removed */
    
    .footer-bottom-content {
        flex-direction: column;
        text-align: center;
        gap: 1rem;
    }
    
    .footer-tech-info {
        justify-content: center;
        flex-wrap: wrap;
    }
    
    /* Hide logo on tablet devices */
    .navbar-brand-logo {
        display: none;
    }
    
    /* Ensure proper spacing for emergency preparedness section on tablets */
    .emergency-preparedness-card {
        margin-bottom: 9rem;
    }
    
    /* Ensure proper bottom padding for main content on tablets */
    .main-content {
        padding-bottom: 11rem;
    }
}

@media (max-width: 768px) {
    .main-header {
        box-shadow: 0 2px 12px rgba(0, 0, 0, 0.1);
    }
    
    .navbar-custom {
        padding: 0.75rem 0;
    }
    
    .brand-container {
        gap: 0.75rem;
    }
    
    /* Hide logo on mobile and tablet devices */
    .navbar-brand-logo {
        display: none;
    }
    
    .navbar-brand-text {
        font-size: 1.4rem;
    }
    
    .brand-tagline {
        font-size: 0.7rem;
    }
    
    .nav-link-enhanced {
        padding: 0.75rem 1.25rem !important;
        font-size: 0.95rem;
        width: 100%;
        text-align: center;
        margin-bottom: 0.5rem;
    }
    
    .search-input-enhanced {
        padding: 0.875rem 1rem;
        font-size: 1rem;
    }
    
    .search-btn-enhanced {
        padding: 0.875rem 1.25rem;
    }
    
    .search-text {
        display: none;
    }
    
    .main-content {
        padding: 2rem 1rem;
    }
    
    .main-content::before {
        display: none; /* Hide decorative background on mobile */
    }
    
    .combined-stats-title {
        font-size: 2rem;
        padding: 0.5rem 0;
    }
    
    .header-wave,
    .footer-wave {
        height: 40px;
    }
    
    .header-wave svg,
    .footer-wave svg {
        height: 40px;
    }
    
    .footer-content-wrapper {
        padding: 1.5rem 0;
    }
    
    /* Enhanced card responsiveness */
    .combined-stats-card,
    .recent-earthquakes-card {
        padding: 2rem;
        margin-bottom: 2rem;
        border-radius: 16px;
    }
    
    .emergency-preparedness-card {
        padding: 2rem;
        margin-bottom: 8rem;
        border-radius: 16px;
    }
    
    .combined-stats-card::before,
    .recent-earthquakes-card::before,
    .emergency-preparedness-card::before {
        height: 3px;
    }
}

@media (max-width: 576px) {
    .brand-container {
        flex-direction: column;
        align-items: center;
        text-align: center;
        gap: 0.5rem;
    }
    
    .brand-text-container {
        align-items: center;
    }
    
    .navbar-brand-text {
        font-size: 1.25rem;
    }
    
    .combined-stats-title {
        font-size: 1.75rem;
    }
    
    .main-content {
        padding: 1.5rem 0.75rem;
        padding-bottom: 8rem;
    }
    
    .nav-links-container {
        flex-direction: column;
        gap: 0.5rem;
    }
    
    .nav-link-enhanced {
        width: 100%;
        text-align: center;
    }
    
    .footer-content-wrapper {
        padding: 1rem 0;
    }
}

@media (max-width: 480px) {
    .navbar-brand-logo {
        height: 30px;
    }
    
    .navbar-brand-text {
        font-size: 1.1rem;
    }
    
    .brand-tagline {
        font-size: 0.65rem;
    }
    
    .combined-stats-title {
        font-size: 1.5rem;
    }
    
    /* Additional spacing for very small screens */
    .emergency-preparedness-card {
        margin-bottom: 8rem;
    }
    
    .main-content {
        padding-bottom: 10rem;
    }
}

/* ============================================
   ACCESSIBILITY AND ANIMATIONS
   ============================================ */

@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
    
    .header-wave,
    .footer-wave {
        display: none;
    }
}

/* Focus styles for accessibility */
.nav-link-enhanced:focus,
.search-input-enhanced:focus,
.search-btn-enhanced:focus,
.footer-link:focus {
    outline: 2px solid #3498db;
    outline-offset: 2px;
}

/* Dark mode support */
@media (prefers-color-scheme: dark) {
    .main-header {
        background: linear-gradient(135deg, #2c3e50 0%, #34495e 100%);
    }
    
    .navbar-brand-text,
    .nav-link-enhanced {
        color: #ecf0f1 !important;
    }
    
    .nav-link-enhanced:hover {
        color: #3498db !important;
        background: rgba(52, 152, 219, 0.1);
    }
    
    .search-container-enhanced {
        background: linear-gradient(135deg, #34495e 0%, #2c3e50 100%);
        border-color: rgba(52, 152, 219, 0.3);
    }
    
    .search-input-enhanced {
        background: #2c3e50;
        color: #ecf0f1;
    }
    
    .brand-tagline {
        color: #95a5a6;
    }
}

/* Print styles */
@media print {
    .header-wave,
    .footer-wave,
    .search-container-enhanced,
    .nav-links-container {
        display: none !important;
    }
    
    .main-header,
    .footer-enhanced {
        background: white !important;
        color: black !important;
        box-shadow: none !important;
    }
    
    .navbar-brand-quake,
    .navbar-brand-watchr {
        color: black !important;
        -webkit-text-fill-color: initial !important;
    }
}
