/* ==========================================
   CSS Reset & Base Styles
   ========================================== */
@import url('https://fonts.googleapis.com/css2?family=Outfit:wght@300;400;500;700&display=swap');

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

:root {
    --primary-color: #333;
    --accent-design: #000;
    --accent-tech: #000;
    --accent-knowhow: #000;
    --accent-column: #000;
    --text-color: #333;
    --bg-color: #f9f9f9;
    --bg-dot-color: #e5e5e5;
    --border-radius: 4px;
    --font-main: 'Noto Sans JP', sans-serif;
    --font-en: 'Outfit', sans-serif;
}

body {
    font-family: var(--font-main);
    color: var(--text-color);
    background-color: #fff;
    /* 肉球のSVGパターン: さらに大きく調整 */
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='100' height='100' viewBox='-50 -50 200 200'%3E%3Cg fill='%23e5e5e5'%3E%3Cellipse cx='50' cy='65' rx='25' ry='20' /%3E%3Ccircle cx='25' cy='35' r='12' /%3E%3Ccircle cx='50' cy='25' r='12' /%3E%3Ccircle cx='75' cy='35' r='12' /%3E%3C/g%3E%3C/svg%3E");
    background-size: 20px 20px;
    /* ドットと同じ繰り返しサイズ */
    background-repeat: repeat;
}

a {
    text-decoration: none;
    color: inherit;
    transition: opacity 0.3s;
}

a:hover {
    opacity: 0.7;
}

ul {
    list-style: none;
}

/* ==========================================
   Header
   ========================================== */
.header {
    background: #fff;
    padding: 20px 0 0;
    border-bottom: 1px solid #eee;
}

.header-top {
    max-width: 1200px;
    margin: 0 auto;
    position: relative;
    padding: 0 20px 20px;
    text-align: center;
}

.site-desc {
    font-size: 10px;
    color: #666;
    margin-bottom: 5px;
    letter-spacing: 1px;
}

.header-logo img {
    height: 50px;
}

.header-utils {
    position: absolute;
    right: 20px;
    top: 0;
    display: flex;
    align-items: center;
    gap: 20px;
}

.sub-nav {
    display: flex;
    gap: 15px;
    font-family: var(--font-en);
    font-size: 14px;
    text-transform: uppercase;
    color: #666;
}

.sub-nav a {
    position: relative;
}

.sub-nav a:not(:last-child)::after {
    content: '|';
    position: absolute;
    right: -10px;
    color: #ddd;
}

.header-icons {
    display: flex;
    gap: 10px;
}

.header-icons a {
    width: 30px;
    height: 30px;
    background: #555;
    color: #fff;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 14px;
}

.header-icons .icon-fb {
    background: #1877f2;
}

html,
body {
    overflow-x: visible !important;
}

.main-nav-bar {
    border-top: 1px solid #eee;
    background: #fff;
    position: -webkit-sticky;
    position: sticky;
    top: 0;
    z-index: 999;
}

body.admin-bar .main-nav-bar {
    top: 32px;
}

@media screen and (max-width: 782px) {
    body.admin-bar .main-nav-bar {
        top: 46px;
    }
}

.nav-container {
    max-width: 1000px;
    margin: 0 auto;
}

/* ==========================================
   Single Page Layout with Sidebar
   ========================================== */
.single-page-layout {
    max-width: 1200px;
    margin: 40px auto;
    padding: 0 20px;
    display: flex;
    gap: 40px;
    align-items: flex-start;
    justify-content: center;
}

.single-main-col {
    flex: 1;
    max-width: 800px;
    width: 100%;
}

.single-sidebar {
    width: 320px;
    flex-shrink: 0;
    position: sticky;
    top: 80px;
    /* Space for the sticky header */
}

.single-sidebar img {
    width: 100%;
    height: auto;
    border-radius: 8px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
    transition: transform 0.3s ease;
}

.single-sidebar img:hover {
    transform: translateY(-3px);
}

@media (max-width: 1024px) {
    .single-page-layout {
        flex-direction: column;
        align-items: center;
    }

    .single-sidebar {
        width: 100%;
        max-width: 800px;
        position: static;
        margin-top: 40px;
    }
}

.nav-list {
    display: flex;
    justify-content: flex-start;
    gap: 40px;
    padding: 15px 20px;
}

.nav-list a {
    font-family: var(--font-en);
    font-size: 12px;
    font-weight: 700;
    text-transform: uppercase;
    display: flex;
    align-items: center;
    gap: 5px;
    color: #333;
}

/* Icons for nav - use paw SVG */
.nav-list i {
    display: inline-block;
    width: 15px;
    height: 15px;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 100 100'%3E%3Cg fill='%23333333'%3E%3Cellipse cx='50' cy='65' rx='25' ry='20' /%3E%3Ccircle cx='25' cy='35' r='12' /%3E%3Ccircle cx='50' cy='25' r='12' /%3E%3Ccircle cx='75' cy='35' r='12' /%3E%3C/g%3E%3C/svg%3E");
    background-size: contain;
    background-repeat: no-repeat;
    background-position: center;
}

/* ==========================================
   Main Grid Layout
   ========================================== */
.content-container {
    max-width: 1100px;
    margin: 0 auto;
    padding: 40px 20px;
}

.section-spacing {
    padding-top: 40px;
}

.articles-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 30px;
}

/* Article Card Styles */
.article-card {
    background: #fff;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
    transition: transform 0.3s, box-shadow 0.3s;
    display: flex;
    flex-direction: column;
    height: 100%;
    border-radius: 4px;
    overflow: hidden;
}

.article-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.1);
}

.article-image {
    position: relative;
    width: 100%;
    padding-top: 60%;
    overflow: hidden;
}

.article-image img {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.article-content {
    padding: 20px;
    flex: 1;
    display: flex;
    flex-direction: column;
    position: relative;
}

.category-tag {
    font-family: var(--font-en);
    font-size: 10px;
    color: #999;
    margin-bottom: 10px;
    text-transform: capitalize;
}

.title {
    font-size: 15px;
    font-weight: 700;
    line-height: 1.6;
    margin-bottom: 40px;
    flex: 1;
}

.title a {
    color: #333;
}

.title a:hover {
    color: #ed9455;
}

.author-info {
    display: flex;
    align-items: center;
    gap: 10px;
    position: absolute;
    bottom: 20px;
    left: 20px;
}

.author-info img {
    width: 30px;
    height: 30px;
    border-radius: 50%;
}

.author-info span {
    font-size: 11px;
    color: #ed9455;
}

/* ==========================================
   Pick Up Section
   ========================================== */
.pickup-section {
    background: #ddd;
    margin: 40px 0;
    padding: 30px 0;
}

.pickup-section .content-container {
    padding: 20px;
}

.pickup-label {
    background: #ed9455;
    color: #fff;
    display: inline-block;
    padding: 5px 15px;
    font-size: 11px;
    font-weight: 700;
    margin-bottom: 20px;
    text-transform: uppercase;
}

.pickup-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 30px;
}

.pickup-card .article-image {
    padding-top: 55%;
}

/* ==========================================
   Buttons
   ========================================== */
.pagination {
    text-align: center;
    margin-top: 50px;
}

.btn-read-more {
    background: #ed9455;
    color: #fff;
    padding: 15px 50px;
    border-radius: 30px;
    border: 2px solid transparent;
    font-family: var(--font-en);
    font-size: 14px;
    font-weight: 700;
    display: inline-flex;
    align-items: center;
    gap: 10px;
    transition: all 0.3s ease;
}

.btn-read-more:hover {
    background: #fff !important;
    color: #ed9455;
    border-color: #ed9455;
}

/* ==========================================
   Cosmic Section
   ========================================== */
.cosmic-section {
    background: #ed9455;
    color: #fff;
    padding: 60px 0;
    position: relative;
    overflow: hidden;
    text-align: center;
}

/* Starry background effect */
.cosmic-section::before {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-image:
        radial-gradient(white, rgba(255, 255, 255, .2) 2px, transparent 3px),
        radial-gradient(white, rgba(255, 255, 255, .15) 1px, transparent 2px),
        radial-gradient(white, rgba(255, 255, 255, .1) 2px, transparent 3px);
    background-size: 550px 550px, 350px 350px, 250px 250px;
    background-position: 0 0, 40px 60px, 130px 270px;
}

.cosmic-container {
    max-width: 800px;
    margin: 0 auto;
    position: relative;
    z-index: 1;
}

.cosmic-logo {
    font-family: var(--font-en);
    font-size: 40px;
    font-weight: 700;
    margin-bottom: 20px;
    letter-spacing: 2px;
}

.cosmic-text {
    font-size: 14px;
    margin-bottom: 30px;
    opacity: 0.8;
}

.cosmic-social {
    display: flex;
    justify-content: center;
    gap: 20px;
}

.social-btn {
    background: rgba(255, 255, 255, 0.2);
    color: #fff;
    padding: 10px 20px;
    border-radius: 20px;
    font-size: 13px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.social-btn.facebook {
    background: #1877f2;
}

/* Characters - Simple CSS shapes as placeholders */
.cosmic-chars {
    margin-top: 40px;
    display: flex;
    justify-content: space-between;
    padding: 0 100px;
}

.char-pink {
    width: 60px;
    height: 60px;
    background: #ffcccb;
    border-radius: 50%;
}

.char-computer {
    width: 60px;
    height: 50px;
    background: #ccc;
    border-radius: 5px;
}

/* ==========================================
   Beeworks Section
   ========================================== */
.beeworks-section {
    max-width: 1100px;
    margin: 60px auto;
    padding: 0 20px;
    text-align: center;
}

.beeworks-header {
    margin-bottom: 30px;
}

.bw-logo {
    font-family: 'Outfit', cursive;
    color: #ed9455;
    font-size: 32px;
    font-weight: 700;
}

.beeworks-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 30px;
}

.bw-card {
    text-align: left;
    background: #fff;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.05);
    display: flex;
    flex-direction: column;
    border-radius: 4px;
    overflow: hidden;
    transition: transform 0.3s;
}

.bw-card:hover {
    transform: translateY(-5px);
}

.bw-image {
    aspect-ratio: 2 / 1;
    overflow: hidden;
}

.bw-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.bw-info {
    padding: 25px;
    flex: 1;
}

.bw-info h3 {
    font-size: 18px;
    margin-bottom: 10px;
}

.bw-info p {
    font-size: 13px;
    color: #666;
    margin-bottom: 20px;
    line-height: 1.8;
}

.btn-arrow {
    background: #000;
    color: #fff;
    padding: 8px 20px;
    border-radius: 20px;
    font-size: 12px;
    float: right;
    transition: background-color 0.3s ease;
}

.bw-card:hover .btn-arrow {
    background-color: #ed9455;
}

/* ==========================================
   Ranking Section - UPDATED
   ========================================== */
.ranking-section {
    background-color: #f5f5f5;
    background-image:
        linear-gradient(rgba(0, 0, 0, 0.05) 1px, transparent 1px),
        linear-gradient(90deg, rgba(0, 0, 0, 0.05) 1px, transparent 1px);
    background-size: 20px 20px;
    padding: 60px 0 60px;
    position: relative;
    overflow: hidden;
}

.ranking-section .content-container {
    padding: 40px 20px 0;
}

.ranking-header {
    text-align: center;
    margin-bottom: 40px;
    font-family: var(--font-en);
    font-weight: 700;
    font-size: 20px;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 10px;
}

.ranking-header i {
    font-size: 24px;
    color: #333;
}

.ranking-grid {
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    gap: 20px;
    max-width: 1200px;
    margin: 0 auto;
}

.ranking-card {
    background: #fff;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
    border-radius: 4px;
    overflow: hidden;
    position: relative;
    transition: transform 0.3s, box-shadow 0.3s;
    display: flex;
    flex-direction: column;
}

.ranking-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.15);
}

.ranking-card .article-image {
    padding-top: 60%;
}

.ranking-card .article-content {
    padding: 15px;
    display: flex;
    flex-direction: column;
    flex-grow: 1;
}

.ranking-card .category-tag {
    margin-bottom: 8px;
    font-size: 9px;
}

.ranking-card .title {
    font-size: 11px;
    line-height: 1.5;
    margin-bottom: 10px;
    font-weight: 700;
}

.ranking-card .author-info {
    position: static;
    margin-top: auto;
    gap: 5px;
}

.ranking-card .author-info img {
    width: 20px;
    height: 20px;
}

.ranking-card .author-info span {
    font-size: 10px;
}

/* Rank Badges - Top Left Black Triangle */
.rank-badge {
    position: absolute;
    top: 0;
    left: 0;
    width: 0;
    height: 0;
    border-style: solid;
    border-width: 35px 35px 0 0;
    border-color: #ed9455 transparent transparent transparent;
    z-index: 10;
}

.ranking-card .rank-number {
    position: absolute;
    top: 2px;
    left: 6px;
    color: #fff;
    font-family: var(--font-en);
    font-weight: 700;
    font-size: 13px;
    z-index: 11;
}

/* Constellations Decoration */
.constellation-bg {
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 120px;
    pointer-events: none;
    z-index: 0;
    opacity: 0.2;
}

/* ==========================================
   Footer
   ========================================== */
.footer {
    background: #ed9455;
    color: #fff;
    padding: 30px 0 10px;
}

.footer-container {
    max-width: 1000px;
    margin: 0 auto;
    display: flex;
    justify-content: space-between;
    padding: 0 20px 20px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.3);
}

.footer-left {
    flex: 1;
}

.footer-logo {
    font-size: 30px;
    font-weight: 700;
    margin-bottom: 20px;
}

.footer-links {
    margin-bottom: 15px;
    font-family: var(--font-en);
}

.footer-links a,
.footer-sub-links a {
    color: #fff;
    margin: 0 5px;
    font-size: 14px;
    transition: opacity 0.2s;
}

.footer-links a:hover,
.footer-sub-links a:hover,
.btn-footer:hover {
    opacity: 0.7;
}

.footer-right {
    text-align: right;
}

.beeworks-logo-footer {
    font-size: 24px;
    color: #fff;
    margin: 15px 0;
}

.footer-buttons {
    display: flex;
    gap: 10px;
    justify-content: flex-end;
}

.btn-footer {
    padding: 8px 15px;
    color: #fff;
    font-size: 14px;
    transition: opacity 0.2s;
}

.copyright {
    text-align: center;
    padding: 20px;
    color: #fff;
}

/* ==========================================
   Responsive
   ========================================== */
@media (max-width: 1024px) {
    .ranking-grid {
        grid-template-columns: repeat(3, 1fr);
    }
}

@media (max-width: 768px) {
    .header-top {
        flex-direction: column;
        gap: 10px;
    }

    .header-utils {
        position: static;
        justify-content: center;
        margin-top: 10px;
    }

    .nav-list {
        justify-content: center;
        gap: 20px;
        flex-wrap: wrap;
    }

    .articles-grid,
    .pickup-grid,
    .beeworks-grid {
        grid-template-columns: 1fr;
    }

    .footer-container {
        flex-direction: column;
        text-align: center;
        gap: 40px;
    }

    .footer-right {
        text-align: center;
    }

    .footer-buttons {
        justify-content: center;
    }

    .ranking-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 480px) {
    .ranking-grid {
        grid-template-columns: 1fr;
    }
}

/* ==========================================
   Single Post Styles
   ========================================== */
.single-content h2 {
    font-size: 24px;
    font-weight: 700;
    color: #333;
    padding: 15px 20px;
    background-color: #fff0e5;
    border-left: 5px solid #ed9455;
    margin: 40px 0 20px;
    border-radius: 4px;
}

.single-content h3 {
    font-size: 20px;
    font-weight: 700;
    color: #333;
    padding-bottom: 10px;
    border-bottom: 2px dashed #ed9455;
    margin: 35px 0 15px;
}

.single-content>* {
    margin-bottom: 24px;
    line-height: 1.8;
}

.single-content>*:last-child {
    margin-bottom: 0;
}

/* ==========================================
   Sidebar Ranking Widget
   ========================================== */
.sidebar-ranking {
    background: #fff;
    padding: 20px;
    border-radius: 8px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
}

.sidebar-ranking-title {
    font-size: 16px;
    font-weight: 700;
    margin-bottom: 20px;
    padding-bottom: 10px;
    border-bottom: 2px solid #ed9455;
    display: flex;
    align-items: center;
    gap: 8px;
}

.sidebar-ranking-title i {
    color: #ed9455;
}

.sidebar-ranking-list {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.sidebar-ranking-link-wrap {
    display: flex;
    align-items: flex-start;
    gap: 15px;
    position: relative;
    padding: 10px;
    margin: -10px;
    /* Offset padding to keep alignment */
    border-radius: 8px;
    text-decoration: none;
    transition: background-color 0.3s ease;
}

.sidebar-ranking-item:not(:last-child) {
    border-bottom: 1px dashed #eee;
    padding-bottom: 15px;
    margin-bottom: 15px;
}

.sidebar-ranking-link-wrap:hover {
    background-color: #f9f9f9;
}

.sidebar-ranking-link-wrap:hover .sidebar-ranking-title-link {
    color: #ed9455;
}

.sidebar-rank-number {
    position: absolute;
    top: 5px;
    /* Adjusted due to new wrapper padding */
    left: 5px;
    background: #ed9455;
    color: #fff;
    width: 22px;
    height: 22px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 11px;
    font-weight: bold;
    font-family: var(--font-en);
    z-index: 10;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.sidebar-ranking-thumb {
    width: 120px;
    aspect-ratio: 16 / 9;
    height: auto;
    flex-shrink: 0;
    border-radius: 4px;
    overflow: hidden;
}

.sidebar-ranking-thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.sidebar-ranking-info {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 5px;
}

.sidebar-cat {
    font-size: 10px;
    color: #fff;
    background: #ccc;
    padding: 2px 6px;
    border-radius: 2px;
    display: inline-block;
    align-self: flex-start;
}

.sidebar-cat.design {
    background-color: #f7a4b9;
}

.sidebar-cat.technology {
    background-color: #92d050;
}

.sidebar-cat.knowhow {
    background-color: #00b0f0;
}

.sidebar-cat.column {
    background-color: #ffc000;
}

.sidebar-ranking-title-link {
    font-size: 12px;
    line-height: 1.4;
    font-weight: 700;
    color: #333;
    margin: 0;
    transition: color 0.3s ease;
}