/* ==========================================
   SUMAWATCH THEME - home.css
   Homepage-specific styles
   ========================================== */

/* ==========================================
   Main Visual (Homepage Banner)
   ========================================== */
.p-mainVisual--home {
    height: 520px;
    background: linear-gradient(135deg, #1a1a2e 0%, #2d2d44 100%);
}

/* Post list section title on homepage */
.p-homeSection {
    margin-bottom: 48px;
}

.p-homeSection__title {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 20px;
    font-weight: 700;
    margin-bottom: 24px;
    padding-bottom: 12px;
    border-bottom: 2px solid var(--border-light);
    color: var(--text-main);
}

.p-homeSection__title::before {
    content: "";
    display: inline-block;
    width: 4px;
    height: 22px;
    background: var(--primary);
    border-radius: 2px;
}

.p-homeSection__more {
    margin-left: auto;
    font-size: 13px;
    color: var(--primary);
    text-decoration: none;
    font-weight: 500;
    transition: color var(--transition-fast);
}

.p-homeSection__more:hover {
    color: var(--primary-dark);
    text-decoration: underline;
}

/* ==========================================
   Latest Posts (-w-new modifier)
   ========================================== */
.p-postList.-w-new .p-postList__item {
    position: relative;
}

.p-postList.-w-new .p-postList__item.-is-new .c-postThumb__title::before {
    content: "NEW";
    display: inline-block;
    font-size: 10px;
    font-weight: 700;
    background: var(--primary);
    color: #fff;
    padding: 1px 5px;
    border-radius: 2px;
    margin-right: 6px;
    vertical-align: middle;
    line-height: 1.6;
}

/* ==========================================
   Homepage Sidebar Ranking
   ========================================== */
.c-rankWidget {
    counter-reset: rank-counter;
}

.c-rankWidget__item {
    counter-increment: rank-counter;
}

.c-rankWidget__item a {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    padding: 12px 14px;
    border-bottom: 1px solid var(--border-light);
    color: var(--text-main);
    text-decoration: none;
    transition: background var(--transition-fast);
}

.c-rankWidget__item:last-child a {
    border-bottom: none;
}

.c-rankWidget__item a:hover {
    background: var(--bg-secondary);
}

.c-rankWidget__num {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 26px;
    height: 26px;
    border-radius: 50%;
    background: var(--text-light);
    color: #fff;
    font-size: 12px;
    font-weight: 700;
    flex-shrink: 0;
    margin-top: 2px;
}

.c-rankWidget__item:nth-child(1) .c-rankWidget__num {
    background: #d4a017;
}

.c-rankWidget__item:nth-child(2) .c-rankWidget__num {
    background: #9e9e9e;
}

.c-rankWidget__item:nth-child(3) .c-rankWidget__num {
    background: #a97b4f;
}

.c-rankWidget__img {
    width: 70px;
    height: 52px;
    object-fit: cover;
    border-radius: 4px;
    flex-shrink: 0;
}

.c-rankWidget__title {
    font-size: 12px;
    line-height: 1.5;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
    flex: 1;
    min-width: 0;
}

/* ==========================================
   Responsive (Home specific)
   ========================================== */
@media (max-width: 768px) {
    .p-mainVisual--home {
        height: 260px;
    }

    .p-homeSection__title {
        font-size: 17px;
    }
}

/* ==========================================
   Main Visual Mask Overlay (H1 Card)
   ========================================== */
.p-mainVisual--home .p-mainVisual__content {
    display: flex;
    align-items: center;
    justify-content: center;
    height: 100%;
}

.p-mainVisual__mask {
    display: inline-block;
    max-width: 720px;
    width: 90%;
    padding: 36px 48px;
    /*background: rgba(10, 10, 20, 0.52);*/
    backdrop-filter: blur(12px) saturate(1.4);
    -webkit-backdrop-filter: blur(12px) saturate(1.4);
    border: 1px solid rgba(255, 255, 255, 0.12);
    border-radius: 16px;
    box-shadow:
        0 8px 32px rgba(0, 0, 0, 0.36),
        inset 0 1px 0 rgba(255, 255, 255, 0.08);
    text-align: center;
    animation: maskFadeUp 0.7s cubic-bezier(0.22, 1, 0.36, 1) both;
}

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

.p-mainVisual__divider {
    width: 48px;
    height: 2px;
    margin: 14px auto 16px;
    background: linear-gradient(90deg, transparent, var(--primary), transparent);
    border-radius: 1px;
    opacity: 0.85;
}

/* Override existing title & desc inside mask */
.p-mainVisual__mask .p-mainVisual__title {
    font-size: 28px;
    font-weight: 700;
    color: #fff;
    line-height: 1.45;
    letter-spacing: 0.02em;
    margin: 0;
    text-shadow: 0 2px 8px rgba(0, 0, 0, 0.5);
}

.p-mainVisual__mask .p-mainVisual__desc {
    font-size: 14px;
    color: rgba(255, 255, 255, 0.78);
    line-height: 1.7;
    margin: 0;
    text-shadow: 0 1px 4px rgba(0, 0, 0, 0.4);
}

/* Responsive adjustments */
@media (max-width: 768px) {
    .p-mainVisual__mask {
        padding: 24px 22px;
        width: 88%;
        border-radius: 12px;
    }

    .p-mainVisual__mask .p-mainVisual__title {
        font-size: 20px;
    }

    .p-mainVisual__mask .p-mainVisual__desc {
        font-size: 13px;
    }
}
