/* Custom CSS for Stream Portal Page - Matched to Messiah Community Church Theme */

:root {
    --bg-color: #ffffff;
    --card-bg: #f9f9f9;
    --text-primary: #333333;
    --text-muted: #666666;
    --accent-blue: #018cfd;
    --accent-blue-hover: #0171ca;
    --live-red: #ef4444;
    --border-color: #e2e2e2;
    --max-width: 1200px;
}

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

body {
    font-family: 'Open Sans', Arial, sans-serif;
    background-color: var(--bg-color);
    color: var(--text-primary);
    line-height: 1.7em;
    font-weight: 500;
    -webkit-font-smoothing: antialiased;
}

/* Top Navigation Bar */
.top-nav {
    background-color: #ffffff;
    border-bottom: 1px solid var(--border-color);
    padding: 0.75rem 1.5rem;
    position: sticky;
    top: 0;
    z-index: 100;
}

.nav-container {
    max-width: var(--max-width);
    margin: 0 auto;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.brand-logo img {
    height: auto;
    max-height: 50px; /* Scales down logo nicely for mobile while keeping proportion */
    width: auto;
    display: block;
}

.btn-main-site {
    color: var(--text-primary);
    background-color: transparent;
    border: 2px solid #000000;
    padding: 0.3em 1em;
    border-radius: 10px;
    text-decoration: none;
    font-size: 0.9rem;
    font-weight: 500;
    transition: all 0.3s ease;
}

.btn-main-site:hover {
    background-color: rgba(0, 0, 0, 0.05);
    color: #999999 !important;
    border-color: #999999 !important;
}

/* Main Layout */
.portal-container {
    max-width: var(--max-width);
    margin: 2rem auto;
    padding: 0 1.5rem;
}

/* Live Section */
.live-section {
    background-color: var(--card-bg);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    padding: 1.5rem;
    margin-bottom: 3rem;
}

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

.status-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    background-color: rgba(239, 68, 68, 0.1);
    border: 1px solid rgba(239, 68, 68, 0.3);
    padding: 0.25rem 0.75rem;
    border-radius: 20px;
    margin-bottom: 0.5rem;
}

.live-dot {
    width: 8px;
    height: 8px;
    background-color: var(--live-red);
    border-radius: 50%;
    animation: pulse 1.5s infinite;
}

.status-text {
    color: var(--live-red);
    font-size: 0.75rem;
    font-weight: 700;
    letter-spacing: 0.05em;
}

@keyframes pulse {
    0% { opacity: 1; transform: scale(1); }
    50% { opacity: 0.4; transform: scale(1.2); }
    100% { opacity: 1; transform: scale(1); }
}

.section-header h1 {
    font-size: 1.75rem;
    font-weight: 500;
    color: #333333;
    line-height: 1.3em;
}

/* Responsive 16:9 Aspect Ratio Video Frame */
.video-embed-wrapper {
    position: relative;
    padding-bottom: 56.25%; /* 16:9 Aspect Ratio */
    height: 0;
    overflow: hidden;
    border-radius: 8px;
    background-color: #000;
}

.video-embed-wrapper iframe {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    border: 0;
}

.stream-info {
    margin-top: 1rem;
    color: var(--text-muted);
    font-size: 0.875rem;
}

/* Archive Grid */
.archive-title {
    font-size: 1.35rem;
    font-weight: 500;
    color: #333333;
    margin-bottom: 1.5rem;
}

.archive-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 1.5rem;
}

.archive-card {
    background-color: var(--card-bg);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    overflow: hidden;
    display: flex;
    flex-direction: column;
}

.card-video {
    position: relative;
    padding-bottom: 56.25%;
    height: 0;
    background-color: #000;
}

.card-video iframe {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    border: 0;
}

.card-body {
    padding: 1rem;
    flex-grow: 1;
}

.card-date {
    font-size: 0.75rem;
    color: var(--text-muted);
    text-transform: uppercase;
    font-weight: 600;
}

.card-body h3 {
    font-size: 1.1rem;
    font-weight: 500;
    color: #333333;
    margin: 0.25rem 0 0.5rem 0;
}

.card-body p {
    font-size: 0.875rem;
    color: var(--text-muted);
}

/* Footer */
.portal-footer {
    text-align: center;
    padding: 2rem 0;
    color: var(--text-muted);
    font-size: 0.875rem;
    border-top: 1px solid var(--border-color);
    margin-top: 3rem;
}

/* Mobile Adjustments */
@media (max-width: 640px) {
    .nav-container {
        flex-direction: column;
        gap: 0.75rem;
    }
    .brand-logo img {
        max-height: 40px;
    }
    .section-header h1 {
        font-size: 1.35rem;
    }
}

.audio-notice-banner {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    background-color: rgba(1, 140, 253, 0.1);
    border: 1px solid var(--accent-blue);
    color: var(--text-primary);
    padding: 0.85rem 1.25rem;
    border-radius: 8px;
    margin-top: 1rem;
    font-size: 0.9rem;
}

.notice-icon {
    font-size: 1.25rem;
}