/* Global Reset & Layout */
html,
body {
    margin: 0;
    padding: 0;
    height: 100%;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background-color: #ecf0f1;
    overflow: hidden;
    /* Prevent body scroll, handle in #main-content */
    display: flex;
    flex-direction: column;
}

/* Header - Fixed Top */
header {
    flex: 0 0 auto;
    background: #2c3e50;
    color: white;
    padding: 15px;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.15);
    z-index: 1000;
    width: 100%;
    box-sizing: border-box;
    text-align: center;
}

header h1 {
    margin: 0;
    font-size: 1.2rem;
    color: #f1c40f;
}

/* Main Content - Scrollable Middle */
#main-content {
    flex: 1 1 auto;
    overflow-y: auto;
    padding: 20px;
    width: 100%;
    box-sizing: border-box;
    position: relative;
    /* Smooth scrolling */
    scroll-behavior: smooth;
    -webkit-overflow-scrolling: touch;
}

/* Footer - Fixed Bottom */
#footer {
    flex: 0 0 auto;
    background: #fff;
    padding: 10px 15px;
    font-size: 12px;
    color: #7f8c8d;
    border-top: 1px solid #bdc3c7;
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    align-items: center;
    z-index: 1000;
    width: 100%;
    box-sizing: border-box;
}

#footer a {
    color: #2980b9;
    text-decoration: none;
    font-weight: bold;
}

#footer a:hover {
    text-decoration: underline;
}

.footer-text {
    text-align: right;
    line-height: 1.5;
}

/* Analytics Section in Footer */
.analytics {
    display: flex;
    gap: 15px;
    font-weight: 500;
    color: #34495e;
}

.analytics strong {
    color: #2c3e50;
}

.live-dot {
    height: 8px;
    width: 8px;
    background-color: #2ecc71;
    border-radius: 50%;
    display: inline-block;
    margin-right: 4px;
    animation: pulse 1.5s infinite;
}

@keyframes pulse {
    0% {
        transform: scale(0.95);
        box-shadow: 0 0 0 0 rgba(46, 204, 113, 0.7);
    }

    70% {
        transform: scale(1);
        box-shadow: 0 0 0 6px rgba(46, 204, 113, 0);
    }

    100% {
        transform: scale(0.95);
        box-shadow: 0 0 0 0 rgba(46, 204, 113, 0);
    }
}

/* Floating Action Buttons (FAB) */
.fab-container {
    position: fixed;
    top: 50%;
    transform: translateY(-50%);
    right: 20px;
    display: flex;
    flex-direction: column;
    gap: 15px;
    z-index: 1500;
}

.fab {
    width: 50px;
    height: 50px;
    background-color: #3498db;
    color: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 24px;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.3);
    cursor: pointer;
    transition: transform 0.2s, background-color 0.2s, width 0.2s;
    text-decoration: none;
    opacity: 0.9;
}

.fab:hover {
    transform: scale(1.1);
    background-color: #2980b9;
    opacity: 1;
}

.fab-home {
    background-color: #e67e22;
}

.fab-contact {
    background-color: #9b59b6;
}

.fab-donate {
    background-color: #2ecc71;
}

/* Common Container Style (used in pages) */
.container {
    background: #fff;
    padding: 30px;
    border-radius: 12px;
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.1);
    width: 100%;
    max-width: 1000px;
    /* Increased max width for desktop */
    margin: 0 auto;
    box-sizing: border-box;
}

/* Two Column Layout for Identifier Page on Desktop */
.content-wrapper {
    display: flex;
    gap: 30px;
    align-items: flex-start;
}

.left-panel {
    flex: 1;
    min-width: 300px;
}

.right-panel {
    flex: 1;
    min-width: 300px;
    display: none;
    /* Hidden initially until result or map mode */
}

.right-panel.visible {
    display: block;
}

/* Mobile Adjustments */
@media (max-width: 768px) {
    .content-wrapper {
        flex-direction: column;
    }

    .right-panel {
        width: 100%;
        min-width: auto;
    }

    .fab-container {
        top: auto;
        bottom: 120px;
        right: 15px;
        transform: none;
        gap: 10px;
    }

    .fab {
        width: 42px;
        height: 42px;
        font-size: 20px;
    }

    #footer {
        flex-direction: column;
        gap: 10px;
        text-align: center;
        justify-content: center;
        padding-bottom: 20px;
    }

    .footer-text,
    .analytics {
        text-align: center;
        justify-content: center;
        width: 100%;
    }
}