/* CSS Variables - Theme Constants */
:root {
    /* Colors */
    --firewatch-red: #d73527;
    --firewatch-orange: #f07818;
    --firewatch-dark-red: #b91d05;
    --firewatch-brown: #8b4513;
    --firewatch-light-brown: #d2691e;
    --background-cream: #fff4e6;
    --background-light: #f4e4bc;
    --background-medium: #e6d7b8;
    --text-dark: #2c1810;
    --text-muted: #6c757d;
    
    /* Navigation */
    --nav-height: 65px;
    --nav-height-mobile: 60px;
    
    /* Spacing */
    --content-padding: 2rem;
    --content-padding-mobile: 1rem;
    --border-radius: 8px;
    --border-radius-large: 12px;
    
    /* Animation */
    --transition-fast: 0.2s ease;
    --transition-normal: 0.3s ease;
}

/* Reset and Base Styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
    line-height: 1.6;
    color: var(--text-dark);
    background: linear-gradient(135deg, var(--background-cream) 0%, var(--background-light) 50%, var(--background-medium) 100%);
    overflow-x: hidden;
    min-height: 100vh;
}

/* Container Layout */
.container {
    display: flex;
    min-height: 100vh;
    position: relative;
}

/* Main Content Area - Firewatch Theme */
.main-content {
    flex: 1;
    padding: 0;
    margin: 0;
    margin-right: 65px; /* Space for right sidebar */
    min-height: 100vh;
    background: transparent;
    border-radius: 0;
    box-shadow: none;
    transition: all var(--transition-normal);
    border: none;
    backdrop-filter: none;
}

/* Right Sidebar Navigation - Firewatch Theme */
.bottom-nav {
    position: fixed;
    top: 0;
    right: 0;
    bottom: 0;
    width: 65px;
    background: linear-gradient(180deg, var(--firewatch-red) 0%, var(--firewatch-orange) 50%, var(--firewatch-dark-red) 100%);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: flex-start;
    z-index: 1000;
    box-shadow: -3px 0 15px rgba(183, 29, 5, 0.3);
    border-left: 2px solid rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(10px);
    padding: 1rem 0 0 0;
}

/* Logo in sidebar */
.sidebar-logo {
    width: 50px;
    height: 50px;
    margin-bottom: 1rem;
    border-radius: 0;
    background: transparent;
    padding: 0;
    box-shadow: none;
}

.sidebar-logo img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    border-radius: 0;
}

.bottom-nav-container {
    display: flex;
    flex-direction: column;
    gap: 0.3rem;
    width: 100%;
    padding: 0;
    align-items: center;
}

/* Navigation Buttons - Vertical Sidebar Design */
.nav-btn {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 0.15rem;
    padding: 0.4rem 0;
    border: none;
    border-radius: 6px;
    background: transparent;
    color: #fff4e6;
    cursor: pointer;
    transition: all var(--transition-fast);
    position: relative;
    width: 55px;
    margin: 0;
}

.nav-btn:hover {
    background: rgba(255, 255, 255, 0.1);
    color: #ffffff;
    transform: none;
    box-shadow: none;
    border-radius: 6px;
}

.nav-btn.active {
    background: rgba(255, 255, 255, 0.15);
    color: #ffffff;
    transform: none;
    box-shadow: none;
    border-radius: 6px;
}

.nav-btn i {
    width: 18px;
    height: 18px;
    stroke-width: 1.8;
}

.nav-label {
    font-size: 0.55rem;
    font-weight: 500;
    text-align: center;
    opacity: 0.9;
    line-height: 1;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* Tooltips removed for bottom navigation - clean hover experience */

/* Footer - Firewatch Theme */
.footer {
    background: linear-gradient(135deg, var(--firewatch-brown) 0%, var(--firewatch-light-brown) 100%);
    color: var(--background-cream);
    padding: 1rem 2rem;
    padding-right: 75px; /* Space for right sidebar */
    text-align: center;
    min-height: 60px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-top: 2px solid rgba(255, 244, 230, 0.2);
    box-shadow: 0 -2px 10px rgba(139, 69, 19, 0.2);
    margin-top: 0;
    margin-right: 65px;
}

/* Loading Indicator - Firewatch Theme */
.loading {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(255, 244, 230, 0.95);
    display: none;
    align-items: center;
    justify-content: center;
    z-index: 9999;
    backdrop-filter: blur(5px);
}

.loading.show {
    display: flex;
}

.loading-spinner {
    width: 40px;
    height: 40px;
    border: 4px solid rgba(210, 105, 30, 0.3);
    border-top: 4px solid #d73527;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* Content Fade Animation */
.main-content {
    opacity: 1;
    transition: opacity 0.3s ease;
}

.main-content.fade-out {
    opacity: 0;
}

/* Responsive Design */
@media (max-width: 768px) {
    .main-content {
        margin: 0;
        margin-right: 55px;
        padding: 0;
    }
    
    .footer {
        padding: 0.5rem 1rem;
        padding-bottom: 0;
    }
    
    .page-content {
        padding: 1rem;
        margin-right: 55px; /* Space for right sidebar on mobile */
    }
    
    .map-container {
        height: 400px;
        margin: 1rem 0;
    }
    
    .legend {
        grid-template-columns: 1fr;
    }
    
    .modal-content {
        width: 95%;
        margin: 10% auto;
    }
    
    .modal-header {
        padding: 1rem 1.5rem;
    }
    
    .modal-body {
        padding: 1.5rem;
    }
    
    .bank-item {
        flex-direction: column;
        align-items: flex-start;
        gap: 0.5rem;
    }
    
    .bank-item strong {
        min-width: auto;
    }
    
    .payment-method {
        flex-direction: column;
        gap: 0.25rem;
    }
    
    .payment-method strong {
        min-width: auto;
    }
}

/* Page Section Styles */
.page-section {
    display: none;
    width: 100%;
    height: 100%;
}

.page-section.active {
    display: block;
    animation: fadeIn 0.3s ease-in;
}

/* Page Content Styles - Clean No-Frame Design */
.page-content {
    animation: fadeIn 0.5s ease-in;
    padding: var(--content-padding);
    background: transparent;
    border-radius: 0;
    box-shadow: none;
    margin: 0;
    margin-right: 65px; /* Space for right sidebar */
    border: none;
    backdrop-filter: none;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Common page elements - Clean Design */
.page-header {
    margin-bottom: 1rem;
    padding-bottom: 0.5rem;
    border-bottom: none;
}

.page-title {
    font-size: 2.5rem;
    font-weight: 700;
    color: var(--firewatch-brown);
    margin-bottom: 0.5rem;
    text-shadow: 2px 2px 4px rgba(139, 69, 19, 0.1);
}

.page-subtitle {
    font-size: 1.1rem;
    color: var(--text-muted);
    font-weight: 400;
}

.content-section {
    margin-bottom: 1rem;
    padding: 1rem;
    background: transparent;
    border-radius: 0;
    border-left: none;
}

/* Embedded Content Styles - Clean No-Frame Design */
.embedded-content {
    width: 100%;
    height: 100vh;
    position: relative;
    margin: 0;
    padding: 0;
}

.notion-iframe {
    width: 100%;
    height: 100%;
    border: none;
    border-radius: 0;
    background: transparent;
    box-shadow: none;
    margin: 0;
    padding: 0;
}

/* Map Styles - Clean No-Frame Design */
.map-container {
    width: 100%;
    height: 500px;
    margin: 1rem 0;
    border-radius: 0;
    overflow: hidden;
    box-shadow: none;
    position: relative;
}

#emergency-map {
    width: 100%;
    height: 100%;
    border-radius: 0;
}

/* Hide OpenStreetMap attribution */
.leaflet-control-attribution {
    display: none !important;
}

/* Fullscreen button for map - styled like Leaflet controls */
.fullscreen-btn {
    position: absolute;
    top: 10px;
    right: 10px;
    z-index: 1000;
    background: #fff;
    color: #333;
    border: 2px solid rgba(0,0,0,0.2);
    width: 30px;
    height: 30px;
    border-radius: 4px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: none;
    transition: all 0.3s ease;
    font-size: 18px;
    font-weight: bold;
    line-height: 1;
}

.fullscreen-btn:hover {
    background: #f4f4f4;
    border-color: rgba(0,0,0,0.3);
}

.fullscreen-btn i {
    width: 16px;
    height: 16px;
    stroke-width: 2;
}

/* Fullscreen map overlay - covers entire viewport */
.map-fullscreen {
    position: fixed !important;
    top: 0 !important;
    left: 0 !important;
    width: 100vw !important;
    height: 100vh !important;
    z-index: 9999 !important;
    margin: 0 !important;
    border-radius: 0 !important;
}

.map-fullscreen #emergency-map {
    border-radius: 0 !important;
}

/* Legend Styles */
.legend {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 1rem;
    margin-top: 1rem;
}

.legend-item {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.5rem;
    background: transparent;
    border-radius: 0;
    border-left: none;
}

/* Notification Item Styles - Clean Design */
.notification-item {
    background: transparent;
    border-left: none;
    padding: 0.5rem;
    margin-bottom: 0.5rem;
    border-radius: 0;
    box-shadow: none;
}

.notification-item p {
    margin: 0;
    color: var(--text-dark);
}

.legend-marker {
    font-size: 1.2rem;
    padding: 0.25rem;
    border-radius: 4px;
    min-width: 30px;
    text-align: center;
}

/* Modal Styles */
.modal {
    display: none;
    position: fixed;
    z-index: 10000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    overflow: auto;
    background-color: rgba(0, 0, 0, 0.6);
    backdrop-filter: blur(5px);
}

.modal-content {
    background-color: #fff;
    margin: 5% auto;
    padding: 0;
    border-radius: 12px;
    width: 90%;
    max-width: 600px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
    animation: modalSlideIn 0.3s ease-out;
}

@keyframes modalSlideIn {
    from {
        transform: translateY(-50px);
        opacity: 0;
    }
    to {
        transform: translateY(0);
        opacity: 1;
    }
}

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1.5rem 2rem;
    background: linear-gradient(135deg, #d73527 0%, #f07818 100%);
    color: white;
    border-radius: 12px 12px 0 0;
}

.modal-header h2 {
    margin: 0;
    font-size: 1.5rem;
}

.modal-close {
    font-size: 2rem;
    font-weight: bold;
    color: white;
    cursor: pointer;
    line-height: 1;
    padding: 0.25rem;
    border-radius: 4px;
    transition: background-color 0.2s;
}

.modal-close:hover {
    background-color: rgba(255, 255, 255, 0.2);
}

.modal-body {
    padding: 2rem;
}

.banking-info {
    margin: 1.5rem 0;
}

.banking-info h3 {
    color: #d73527;
    margin-bottom: 1rem;
    font-size: 1.2rem;
}

.bank-details {
    background: transparent;
    padding: 1rem;
    border-radius: 0;
    border-left: none;
}

.bank-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.75rem 0;
    border-bottom: 1px solid #dee2e6;
}

.bank-item:last-child {
    border-bottom: none;
}

.bank-item strong {
    min-width: 140px;
    color: #495057;
}

.bank-item span {
    flex: 1;
    font-family: 'Courier New', monospace;
    font-weight: 500;
    color: #212529;
}

.copy-btn {
    background: #d73527;
    color: white;
    border: none;
    padding: 0.5rem;
    border-radius: 4px;
    cursor: pointer;
    margin-left: 0.5rem;
    transition: background-color 0.2s;
    display: flex;
    align-items: center;
    justify-content: center;
}

.copy-btn:hover {
    background: #b91d05;
}

.copy-btn i {
    width: 16px;
    height: 16px;
}

.alternative-methods {
    margin: 1.5rem 0;
}

.alternative-methods h3 {
    color: #d73527;
    margin-bottom: 1rem;
    font-size: 1.2rem;
}

.payment-methods {
    background: #e8f4fd;
    padding: 1.5rem;
    border-radius: 8px;
    border-left: 4px solid #0066cc;
}

.payment-method {
    display: flex;
    gap: 1rem;
    padding: 0.5rem 0;
    border-bottom: 1px solid #cce7ff;
}

.payment-method:last-child {
    border-bottom: none;
}

.payment-method strong {
    min-width: 80px;
    color: #0066cc;
}

.payment-method span {
    font-family: 'Courier New', monospace;
    font-weight: 500;
    color: #003d7a;
}

.donation-note {
    margin-top: 1.5rem;
    padding: 1rem;
    background: #fff3cd;
    border: 1px solid #ffeaa7;
    border-radius: 6px;
    color: #856404;
}

.donation-note p {
    margin: 0;
    font-size: 0.9rem;
    line-height: 1.5;
}

/* Mobile-specific adjustments for right sidebar */
@media (max-width: 768px) {
    .bottom-nav {
        width: 55px;
        padding: 0.5rem 0 0 0;
    }
    
    .main-content {
        margin-right: 55px;
    }
    
    .footer {
        margin-right: 55px;
        padding-right: 65px;
    }
    
    .sidebar-logo {
        width: 40px;
        height: 40px;
        margin-bottom: 0.8rem;
    }
    
    .bottom-nav-container {
        gap: 0.2rem;
        padding: 0;
    }
    
    .nav-btn {
        width: 45px;
        padding: 0.3rem 0;
        margin: 0;
    }
    
    .nav-btn i {
        width: 16px;
        height: 16px;
    }
    
    .nav-label {
        font-size: 0.5rem;
    }
}

/* News Feed Styles */
.news-container {
    max-width: 1000px;
    margin: 0 auto;
    padding: 1rem;
}

.news-subtitle {
    color: var(--text-secondary);
    margin-bottom: 2rem;
    font-size: 1.1rem;
    text-align: center;
}

.articles-list {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.news-article {
    background: var(--card-background);
    border-radius: 12px;
    padding: 1.5rem;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    border-left: 4px solid var(--primary-color);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.news-article:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.15);
}

.article-header {
    margin-bottom: 1rem;
}

.article-title {
    margin: 0 0 0.5rem 0;
    font-size: 1.3rem;
    line-height: 1.4;
}

.article-title a {
    color: var(--primary-color);
    text-decoration: none;
    transition: color 0.2s ease;
}

.article-title a:hover {
    color: #c0392b;
    text-decoration: underline;
}

.article-meta {
    display: flex;
    gap: 1rem;
    flex-wrap: wrap;
    font-size: 0.9rem;
    color: var(--text-secondary);
    margin-bottom: 0.5rem;
}

.article-date,
.article-source {
    display: flex;
    align-items: center;
    gap: 0.25rem;
}

.article-content {
    margin: 1rem 0;
    line-height: 1.6;
    color: var(--text-color);
}

.article-actions {
    margin-top: 1rem;
    padding-top: 1rem;
    border-top: 1px solid var(--border-color);
}

.read-more-btn {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    background: var(--primary-color);
    color: white;
    padding: 0.5rem 1rem;
    border-radius: 6px;
    text-decoration: none;
    font-size: 0.9rem;
    font-weight: 500;
    transition: background-color 0.2s ease;
}

.read-more-btn:hover {
    background: #c0392b;
}

.news-footer {
    margin-top: 2rem;
    padding: 1.5rem;
    background: #f8f9fa;
    border-radius: 8px;
    text-align: center;
    color: var(--text-secondary);
    font-size: 0.9rem;
}

.no-news {
    text-align: center;
    padding: 2rem;
    background: #f8f9fa;
    border-radius: 8px;
    color: var(--text-secondary);
}

.no-news ul {
    text-align: left;
    display: inline-block;
    margin: 1rem 0;
}

.loading-container {
    text-align: center;
    padding: 3rem 1rem;
    color: var(--text-secondary);
}

.loading-spinner {
    width: 40px;
    height: 40px;
    border: 4px solid #f3f3f3;
    border-top: 4px solid var(--primary-color);
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin: 0 auto 1rem;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

.error-container {
    text-align: center;
    padding: 2rem;
    background: #fff5f5;
    border: 1px solid #fed7d7;
    border-radius: 8px;
    color: #c53030;
}

.error-container h3 {
    color: #c53030;
    margin-bottom: 1rem;
}

.error-container ul {
    text-align: left;
    display: inline-block;
    margin: 1rem 0;
}

.retry-btn {
    background: var(--primary-color);
    color: white;
    border: none;
    padding: 0.75rem 1.5rem;
    border-radius: 6px;
    cursor: pointer;
    font-size: 1rem;
    margin-top: 1rem;
    transition: background-color 0.2s ease;
}

.retry-btn:hover {
    background: #c0392b;
}

.news-disclaimer {
    margin-top: 2rem;
    padding: 1.5rem;
    background: #f0f8ff;
    border-radius: 8px;
    border-left: 4px solid #3498db;
}

.news-disclaimer h4 {
    color: #2980b9;
    margin-bottom: 1rem;
}

.news-disclaimer ul {
    margin: 1rem 0;
    padding-left: 1.5rem;
}

.disclaimer-note {
    margin-top: 1rem;
    font-style: italic;
    color: var(--text-secondary);
    font-size: 0.9rem;
}

/* News Sources Grid Styles */
.manual-news-sources {
    margin: 2rem 0;
    padding: 1.5rem;
    background: #f8f9fa;
    border-radius: 12px;
    border-left: 4px solid var(--primary-color);
}

.news-sources-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 1rem;
    margin-top: 1rem;
}

.news-source-card {
    background: white;
    padding: 1.5rem;
    border-radius: 8px;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.1);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
    border: 1px solid #e0e0e0;
}

.news-source-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.news-source-card h4 {
    color: var(--primary-color);
    margin: 0 0 0.5rem 0;
    font-size: 1.1rem;
}

.news-source-card p {
    color: var(--text-secondary);
    font-size: 0.9rem;
    margin: 0 0 1rem 0;
}

.source-link {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    background: var(--primary-color);
    color: white;
    padding: 0.5rem 1rem;
    border-radius: 6px;
    text-decoration: none;
    font-size: 0.9rem;
    font-weight: 500;
    transition: background-color 0.2s ease;
}

.source-link:hover {
    background: #c0392b;
}

/* Emergency Feeds Styles */
.emergency-feeds {
    margin: 2rem 0;
    padding: 1.5rem;
    background: #fff5f5;
    border-radius: 12px;
    border-left: 4px solid #e74c3c;
}

.feed-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(400px, 1fr));
    gap: 1.5rem;
    margin-top: 1rem;
}

.feed-item {
    background: white;
    padding: 1rem;
    border-radius: 8px;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.1);
}

.feed-item h4 {
    color: #e74c3c;
    margin: 0 0 0.5rem 0;
    font-size: 1.1rem;
}

.feed-item p {
    color: var(--text-secondary);
    font-size: 0.9rem;
    margin: 0 0 1rem 0;
}

/* Mobile responsiveness for news */
@media (max-width: 768px) {
    .news-container {
        padding: 0.5rem;
    }
    
    .news-article {
        padding: 1rem;
    }
    
    .article-meta {
        flex-direction: column;
        gap: 0.5rem;
    }
    
    .article-title {
        font-size: 1.1rem;
    }
    
    .news-sources-grid {
        grid-template-columns: 1fr;
        gap: 0.8rem;
    }
    
    .news-source-card {
        padding: 1rem;
    }
    
    .feed-grid {
        grid-template-columns: 1fr;
        gap: 1rem;
    }
    
    .feed-item iframe {
        height: 250px !important;
    }
    
    .manual-news-sources,
    .emergency-feeds {
        padding: 1rem;
        margin: 1rem 0;
    }
}
