body {
    display: flex;
    flex-direction: column;
    min-height: 100vh;
}

/* Landing page specific styles */
body.landing {
    padding-top: 56px;
}

/* Best-effort fallback for pages that forget the landing class (not supported in all browsers). */
body:has(.navbar.fixed-top) {
    padding-top: 56px;
}



.card-img-top {
    width: 100%;
    height: 200px;
    object-fit: cover;
}

.card {
    transition: transform 0.2s;
}

.card:hover {
    transform: scale(1.02);
}

.navbar-brand {
    font-weight: bold;
    font-size: 1.5rem;
}

footer {
    width: 100%;
}

/* ========================================
   VIDEO CONTAINERS (YouTube & Instagram)
   ======================================== */
.video-container {
    position: relative;
    padding-bottom: 56.25%; /* 16:9 aspect ratio */
    height: 0;
    overflow: hidden;
    background: #000;
}

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

/* Embed containers for Instagram/Twitter on detail page */
.instagram-embed-container,
.twitter-embed-container {
    display: flex;
    justify-content: center;
    margin-bottom: 1rem;
    width: 100%;
}

.article-content {
    max-width: 800px;
    margin: 0 auto;
}

#adCarousel .carousel-item img {
    max-height: 400px;
    object-fit: contain;
}

.carousel-control-prev-icon,
.carousel-control-next-icon {
    filter: invert(1);
}

/* Ensure review author name is visible against light background */
.card-body .list-group-item h5 {
    color: #333 !important; /* Dark grey for readability */
}

/* Add subtle hover effect to review cards */
.card-body .list-group-item {
    transition: transform 0.2s ease-in-out, box-shadow 0.2s ease-in-out;
}

.card-body .list-group-item:hover {
    transform: translateY(-3px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

/* Ensure review text is visible against light background */
.card-body .list-group-item p {
    color: #333 !important; /* Dark grey for readability */
}

/* ========================================
   TOPBAR NETWORK INDICATOR
   ======================================== */
.topbar-greeting {
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
    min-width: 0;
}

.topbar-welcome-row {
    display: inline-flex;
    align-items: center;
    gap: 0.65rem;
    flex-wrap: wrap;
}

.topbar-network-indicator {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    padding: 0.1rem 0.55rem;
    border-radius: 999px;
    font-size: 0.8rem;
    font-weight: 600;
    color: #198754;
    background: rgba(25, 135, 84, 0.12);
    border: 1px solid rgba(25, 135, 84, 0.25);
    transition: background 0.3s ease, color 0.3s ease, border-color 0.3s ease;
}

.topbar-network-indicator.offline {
    color: #dc3545;
    background: rgba(220, 53, 69, 0.08);
    border-color: rgba(220, 53, 69, 0.25);
}

.topbar-network-dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background: #198754;
    box-shadow: 0 0 0 0 rgba(25, 135, 84, 0.5);
    animation: topbar-pulse-green 2.2s infinite;
    transition: background 0.3s ease, box-shadow 0.3s ease;
}

.topbar-network-indicator.offline .topbar-network-dot {
    background: #dc3545;
    box-shadow: none;
    animation: none;
}

.topbar-network-text {
    letter-spacing: 0.02em;
}

@keyframes topbar-pulse-green {
    0% {
        box-shadow: 0 0 0 0 rgba(25, 135, 84, 0.5);
    }
    70% {
        box-shadow: 0 0 0 8px rgba(25, 135, 84, 0);
    }
    100% {
        box-shadow: 0 0 0 0 rgba(25, 135, 84, 0);
    }
}

@media (max-width: 576px) {
    .topbar-network-indicator {
        padding: 0.1rem 0.4rem;
    }
}
