/*
 * os-modern.css
 * Modern card/grid enhancements — layered on top of existing os-dark.css
 * Adds: hover scale, shadows, smooth transitions, better image handling
 */

/* ── Card image boxes: smoother corners + aspect ratio ── */
.os-img-box .img-box {
    border-radius: 8px;
    overflow: hidden;
    transition: box-shadow 0.25s ease, transform 0.25s ease;
    box-shadow: 0 2px 8px rgba(0,0,0,0.2);
}
.os-img-box .img-box img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.35s ease;
}

/* ── Hover: lift + scale image ── */
.os-img-box:hover .img-box {
    box-shadow: 0 8px 25px rgba(0,0,0,0.35);
    transform: translateY(-4px);
}
.os-img-box:hover .img-box img {
    transform: scale(1.05);
}

/* ── Title text: smoother transition ── */
.os-img-box .title {
    transition: color 0.2s ease;
}

/* ── Carousel items: consistent spacing ── */
.owl-carousel .os-img-box {
    padding-bottom: 4px; /* room for shadow */
}

/* ── Recent updates large cards ── */
.os-img-box .img-box.img-box-lg {
    border-radius: 12px;
}

/* ── Hover state overlay: smoother ── */
.os-img-box .hover-state {
    transition: opacity 0.3s ease;
    border-radius: inherit;
}

/* ── Play button: pulse on hover ── */
.os-img-box:hover .play-btn-dark {
    animation: os-pulse 1.5s infinite;
}
@keyframes os-pulse {
    0% { box-shadow: 0 0 0 0 rgba(230, 0, 0, 0.4); }
    70% { box-shadow: 0 0 0 12px rgba(230, 0, 0, 0); }
    100% { box-shadow: 0 0 0 0 rgba(230, 0, 0, 0); }
}

/* ── Section titles: subtle underline accent ── */
section > .d-flex > .title-box .title {
    position: relative;
}

/* ── Review cards ── */
.osrevhome .img-box {
    border-radius: 8px;
}

/* ── Discussion cards ── */
.img-box-text-over {
    border-radius: 12px;
    transition: transform 0.25s ease, box-shadow 0.25s ease;
}
.img-box-text-over:hover {
    transform: translateY(-3px);
    box-shadow: 0 6px 20px rgba(0,0,0,0.3);
}

/* ── Skeleton loading animation (reusable utility) ── */
.os-skeleton {
    background: linear-gradient(90deg, rgba(255,255,255,0.04) 25%, rgba(255,255,255,0.08) 50%, rgba(255,255,255,0.04) 75%);
    background-size: 200% 100%;
    animation: os-shimmer 1.5s infinite;
    border-radius: 8px;
}
@keyframes os-shimmer {
    0% { background-position: 200% 0; }
    100% { background-position: -200% 0; }
}

/* ── Skeleton templates ── */
.os-skeleton-post {
    padding: 20px;
    background: rgba(255,255,255,0.02);
    border-radius: 12px;
    margin-bottom: 16px;
    border: 1px solid rgba(255,255,255,0.05);
}
.os-skeleton-post-header {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 14px;
}
.os-skeleton-circle {
    width: 40px;
    height: 40px;
    border-radius: 50%;
}
.os-skeleton-line {
    height: 12px;
    border-radius: 6px;
}
.os-skeleton-line-sm { width: 80px; }
.os-skeleton-line-md { width: 150px; }
.os-skeleton-line-lg { width: 100%; max-width: 300px; }
.os-skeleton-line-xl { width: 100%; }
.os-skeleton-body { margin-bottom: 12px; }
.os-skeleton-body .os-skeleton-line { margin-bottom: 8px; }
.os-skeleton-card {
    border-radius: 8px;
    overflow: hidden;
}
.os-skeleton-card-img {
    width: 100%;
    height: 180px;
    margin-bottom: 10px;
}
.os-skeleton-card-title {
    height: 14px;
    width: 80%;
    margin-bottom: 6px;
}
.os-skeleton-card-sub {
    height: 10px;
    width: 60%;
}
.os-skeleton-search-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 10px 16px;
}
.os-skeleton-search-img {
    width: 40px;
    height: 55px;
    border-radius: 4px;
    flex-shrink: 0;
}
.os-skeleton-search-lines {
    flex: 1;
}
.os-skeleton-search-lines .os-skeleton-line {
    margin-bottom: 6px;
}

/* ── Better scrollbar styling ── */
::-webkit-scrollbar {
    width: 6px;
    height: 6px;
}
::-webkit-scrollbar-track {
    background: rgba(255,255,255,0.03);
}
::-webkit-scrollbar-thumb {
    background: rgba(255,255,255,0.12);
    border-radius: 3px;
}
::-webkit-scrollbar-thumb:hover {
    background: rgba(255,255,255,0.2);
}

/* ── Buttons: subtle hover lift ── */
.btn-primary,
.btn-info {
    transition: transform 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
}
.btn-primary:hover,
.btn-info:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(0,0,0,0.2);
}

/* ── Following feed: hover highlight ── */
.follower-box {
    padding: 8px 12px;
    border-radius: 8px;
    transition: background 0.2s ease;
}
.follower-box:hover {
    background: rgba(255,255,255,0.04);
}

/* ── Badge/tag refinements ── */
.badge {
    border-radius: 4px;
    font-weight: 500;
    letter-spacing: 0.02em;
}

/* ── Light mode adjustments ── */
.os-light-mode .os-img-box .img-box {
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
}
.os-light-mode .os-img-box:hover .img-box {
    box-shadow: 0 8px 25px rgba(0,0,0,0.15);
}
.os-light-mode .search-autocomplete {
    background: #fff;
    border-color: rgba(0,0,0,0.1);
}
.os-light-mode .ac-item:hover,
.os-light-mode .ac-item.ac-active {
    background: rgba(0,0,0,0.04);
}
.os-light-mode .ac-item-title { color: #222; }
.os-light-mode .ac-item-sub { color: #888; }
.os-light-mode .ac-section-label { color: #999; }
.os-light-mode .ac-hint { color: #bbb; border-top-color: rgba(0,0,0,0.06); }

/* ── Reaction picker on feed posts ── */
.os-reaction-wrap {
    position: relative;
}
.os-reaction-picker {
    display: none;
    position: absolute;
    bottom: 100%;
    left: 50%;
    transform: translateX(-50%);
    background: #1e1e38;
    border: 1px solid rgba(255,255,255,0.12);
    border-radius: 24px;
    padding: 6px 8px;
    white-space: nowrap;
    box-shadow: 0 4px 20px rgba(0,0,0,0.4);
    z-index: 100;
    margin-bottom: 8px;
}
.os-reaction-wrap:hover .os-reaction-picker,
.os-reaction-picker.os-picker-show {
    display: flex;
    gap: 2px;
    align-items: center;
    animation: os-picker-pop 0.2s ease;
}
@keyframes os-picker-pop {
    from { transform: translateX(-50%) scale(0.8); opacity: 0; }
    to { transform: translateX(-50%) scale(1); opacity: 1; }
}
.os-react-emoji {
    font-size: 1.4rem;
    cursor: pointer;
    padding: 4px 6px;
    border-radius: 50%;
    transition: transform 0.15s ease, background 0.15s ease;
    line-height: 1;
}
.os-react-emoji:hover {
    transform: scale(1.35);
    background: rgba(255,255,255,0.1);
}
.os-light-mode .os-reaction-picker {
    background: #fff;
    border-color: rgba(0,0,0,0.1);
    box-shadow: 0 4px 20px rgba(0,0,0,0.15);
}
.os-light-mode .os-react-emoji:hover {
    background: rgba(0,0,0,0.06);
}

/* ── Smooth page-level transitions ── */
#site-content {
    animation: os-fadeIn 0.3s ease;
}
@keyframes os-fadeIn {
    from { opacity: 0; transform: translateY(8px); }
    to { opacity: 1; transform: translateY(0); }
}
