/*
Theme Name: Toyotama News
Description: 豊玉タクシー新着情報用オリジナルテーマ
Version: 2.0
Author: Toyotama Taxi
*/

/* ===== Header ===== */
#site-header {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    z-index: 999;
}

/* -- Top bar (logo + phone / hamburger) -- */
.header-top {
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: 60px;
    background: rgba(255, 255, 255, 0.95);
    padding: 0 5%;
    box-sizing: border-box;
}
.header-logo {
    display: flex;
    align-items: center;
    text-decoration: none;
}
.header-logo img {
    height: 40px;
    width: auto;
}
.header-tel-pc {
    display: flex;
    gap: 5px;
    align-items: center;
}
.header-tel-pc a {
    display: block;
    transition: transform 0.2s;
}
.header-tel-pc a:hover {
    transform: translateY(3px);
}
.header-tel-pc img {
    height: 60px;
    width: auto;
    display: block;
}

/* -- Navigation -- */
.header-nav {
    background: rgba(255, 255, 255, 0.95);
}
.header-nav ul {
    display: flex;
    justify-content: center;
    list-style: none;
    margin: 0 auto;
    padding: 0;
    max-width: 900px;
}
.header-nav li {
    width: calc(100% / 7);
}
.header-nav li a {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    text-decoration: none;
    color: #333;
    padding: 8px 4px;
    font-size: 14px;
    line-height: 1.7;
    letter-spacing: 1px;
    transition: color 0.2s, transform 0.2s;
}
.header-nav li a img {
    max-width: 40px;
    margin: 0 auto 2px;
}
.header-nav li a:hover {
    color: #A3C93E;
    transform: translateY(-3px);
}

/* -- Mobile phone bar (PC: hidden) -- */
.header-tel-sp {
    display: none;
}

/* -- Hamburger button (PC: hidden) -- */
.hamburger-btn {
    display: none;
}

/* -- Admin bar offset (PC) -- */
body.admin-bar #site-header {
    top: 32px;
}

/* ===== Page content offset ===== */
.news-page {
    margin-top: 160px;
}

/* ===== Breadcrumb ===== */
.news .pankuzu {
    max-width: 1236px;
    margin: 0 auto;
    padding: 0 35px;
}

/* ===== Layout ===== */
.news-inner {
    max-width: 1236px;
    margin: 0 auto;
    padding: 35px;
    display: flex;
    gap: 0 2%;
    background: #fff;
    box-sizing: border-box;
}
.news-main {
    width: 728px;
    max-width: 100%;
    flex: 1;
}
.news-sidebar {
    width: 336px;
    flex-shrink: 0;
}

/* ===== Post Grid (Card Layout) ===== */
.post-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 24px;
}
.post-card {
    background: #e8f2d6;
    border-radius: 12px;
    overflow: hidden;
    transition: box-shadow 0.3s;
}
.post-card:hover {
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.1);
}
.post-card a {
    text-decoration: none;
    color: #333;
    display: block;
}
.post-card-img {
    position: relative;
    overflow: hidden;
}
.post-card-img img {
    width: 100%;
    height: 200px;
    object-fit: cover;
    display: block;
}
.post-card-noimg {
    width: 100%;
    height: 200px;
    background: #dde4ed;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #aaa;
    font-size: 13px;
}
.post-card-cat {
    position: absolute;
    bottom: 10px;
    left: 10px;
    background: #A3C93E;
    color: #fff;
    font-size: 12px;
    font-weight: 700;
    padding: 4px 14px;
    border-radius: 3px;
}
.post-card-body {
    padding: 18px 20px 22px;
}
.post-card-date {
    font-size: 13px;
    color: #888;
    font-family: "Montserrat", sans-serif;
    display: block;
    margin-bottom: 8px;
}
.post-card-title {
    font-size: 16px;
    font-weight: 700;
    line-height: 1.6;
    margin-bottom: 10px;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}
.post-card-excerpt {
    font-size: 13px;
    color: #666;
    line-height: 1.7;
    margin-bottom: 14px;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}
.post-card-more {
    font-size: 14px;
    color: #A3C93E;
    font-weight: 700;
}

/* ===== Pagination ===== */
.pagination {
    text-align: center;
    padding: 30px 0;
}
.pagination a,
.pagination span {
    display: inline-block;
    min-width: 36px;
    height: 36px;
    line-height: 36px;
    text-align: center;
    margin: 0 3px;
    text-decoration: none;
    font-size: 14px;
    border-radius: 3px;
    font-family: "Montserrat", sans-serif;
}
.pagination a {
    color: #333;
    background: #f0f0f0;
}
.pagination a:hover {
    background: #ddd;
}
.pagination .current {
    background: #333;
    color: #fff;
}
.pagination .dots {
    background: none;
    color: #999;
}

/* ===== Single Post ===== */
.single-header {
    margin-bottom: 30px;
}
.single-header .post-date {
    margin-bottom: 12px;
}
.single-header .entry-title {
    font-size: 26px;
    font-weight: 700;
    line-height: 1.5;
}
.single-thumbnail {
    margin-bottom: 30px;
}
.single-thumbnail img {
    width: 100%;
    height: auto;
    border-radius: 6px;
    display: block;
}
.single-content {
    font-size: 16px;
    line-height: 2;
    margin-bottom: 40px;
}
.single-content p {
    margin-bottom: 1.5em;
}
.single-content img {
    max-width: 100%;
    height: auto;
}
.single-content a {
    color: #0066cc;
    text-decoration: underline;
}
.single-footer {
    padding: 15px 0;
    border-top: 1px solid #eee;
    margin-bottom: 30px;
    background-color: transparent;
}
.single-footer .category-label {
    display: inline-block;
    background: #f0f0f0;
    padding: 4px 12px;
    border-radius: 3px;
    font-size: 13px;
    color: #666;
    text-decoration: none;
}
.post-nav {
    display: flex;
    justify-content: space-between;
    border-top: 1px solid #eee;
    padding-top: 20px;
}
.post-nav a {
    color: #333;
    text-decoration: none;
    font-size: 14px;
}
.post-nav a:hover {
    text-decoration: underline;
}

/* ===== Sidebar ===== */
.sb-widget {
    margin-bottom: 30px;
}
.sb-widget-title {
    font-size: 15px;
    font-weight: 700;
    color: #fff;
    background: #A3C93E;
    padding: 10px 16px;
    border-radius: 6px 6px 0 0;
    margin: 0;
}
.sb-list {
    list-style: none;
    padding: 0;
    margin: 0;
    border: 1px solid #e0e0e0;
    border-top: none;
    border-radius: 0 0 6px 6px;
    overflow: hidden;
}
.sb-list li {
    border-bottom: 1px solid #f0f0f0;
}
.sb-list li:last-child {
    border-bottom: none;
}
.sb-list li a {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 12px 16px;
    text-decoration: none;
    color: #333;
    font-size: 14px;
    line-height: 1.5;
    transition: background 0.2s;
}
.sb-list li a:hover {
    background: #f8f8f8;
}
.sb-list li a::after {
    content: ">";
    color: #ccc;
    font-size: 14px;
    flex-shrink: 0;
    margin-left: 10px;
}

/* Archive */
.sb-archive {
    border: 1px solid #e0e0e0;
    border-top: none;
    border-radius: 0 0 6px 6px;
    overflow: hidden;
}
.sb-archive-year {
    border-bottom: 1px solid #f0f0f0;
}
.sb-archive-year:last-child {
    border-bottom: none;
}
.sb-archive-year-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 12px 16px;
    font-size: 14px;
    font-weight: 700;
    color: #333;
    cursor: pointer;
    transition: background 0.2s;
}
.sb-archive-year-header:hover {
    background: #f8f8f8;
}
.sb-archive-toggle {
    width: 26px;
    height: 26px;
    border: 1px solid #A3C93E;
    color: #A3C93E;
    border-radius: 4px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 16px;
    line-height: 1;
    flex-shrink: 0;
}
.sb-archive-months {
    list-style: none;
    padding: 0;
    margin: 0;
    display: none;
}
.sb-archive-months.show {
    display: block;
}
.sb-archive-year.open .sb-archive-months {
    display: block;
}
.sb-archive-year.open .sb-archive-toggle {
    font-size: 0;
}
.sb-archive-year.open .sb-archive-toggle::after {
    content: "−";
    font-size: 16px;
}
.sb-archive-months li {
    border-top: 1px solid #f0f0f0;
}
.sb-archive-months li a {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 10px 16px 10px 28px;
    text-decoration: none;
    color: #333;
    font-size: 13px;
    transition: background 0.2s;
}
.sb-archive-months li a:hover {
    background: #f8f8f8;
}
.sb-archive-months li a::after {
    content: ">";
    color: #ccc;
    font-size: 14px;
    flex-shrink: 0;
    margin-left: 10px;
}

/* ==========================================================
   Responsive
   ========================================================== */

/* -- Tablet (≤960px) -- */
@media screen and (max-width: 960px) {
    .news-inner {
        flex-direction: column;
        padding: 20px;
    }
    .news-main {
        width: 100%;
    }
    .news-sidebar {
        width: 100%;
        margin-top: 30px;
    }
}

/* -- Mobile admin bar (≤782px) -- */
@media screen and (max-width: 782px) {
    body.admin-bar #site-header {
        top: 46px;
    }
}

/* -- Tablet & Mobile (≤960px): hamburger layout -- */
@media screen and (max-width: 960px) {

    /* Header: top bar → logo centered + hamburger */
    .header-top {
        justify-content: center;
        position: relative;
        padding: 0;
    }
    .header-logo {
        flex: 1;
        justify-content: center;
    }
    .header-logo img {
        height: auto;
        width: 65%;
        max-width: 300px;
    }

    /* Header: hide PC phone & nav, show SP phone */
    .header-tel-pc {
        display: none;
    }
    .header-nav {
        display: none;
        position: fixed;
        top: 100px;
        left: 0;
        width: 100%;
        height: calc(100vh - 100px);
        background: #fff;
        z-index: 1000;
        overflow-y: auto;
    }
    body.admin-bar .header-nav {
        top: 146px;
        height: calc(100vh - 146px);
    }
    .header-nav.open {
        display: block;
    }
    .header-nav ul {
        flex-direction: column;
        max-width: 100%;
    }
    .header-nav li {
        width: 100%;
        border-bottom: 1px solid #eee;
    }
    .header-nav li a {
        flex-direction: row;
        justify-content: flex-start;
        padding: 14px 20px;
        font-size: 15px;
    }
    .header-nav li a img {
        width: 28px;
        margin: 0 12px 0 0;
    }

    .header-tel-sp {
        display: flex;
        line-height: 0;
        max-width: 500px;
        margin: 0 auto;
        width: 100%;
    }
    .header-tel-sp a {
        display: block;
        width: 50%;
        line-height: 0;
    }
    .header-tel-sp img {
        display: block;
        width: 100%;
        height: auto;
    }

    /* Hamburger button */
    .hamburger-btn {
        display: flex;
        flex-direction: column;
        justify-content: center;
        align-items: center;
        gap: 5px;
        position: absolute;
        top: 10px;
        right: 10px;
        width: 40px;
        height: 40px;
        background: #262525;
        border: none;
        cursor: pointer;
        padding: 0;
        z-index: 1001;
    }
    .hamburger-btn:focus,
    .hamburger-btn:active,
    .hamburger-btn:hover,
    .hamburger-btn.open {
        background: #262525;
        outline: none;
    }
    .hamburger-btn span {
        display: block;
        width: 20px;
        height: 3px;
        background: #fff;
        transition: transform 0.3s, opacity 0.3s;
    }
    .hamburger-btn.open span:nth-child(1) {
        transform: translateY(8px) rotate(45deg);
    }
    .hamburger-btn.open span:nth-child(2) {
        opacity: 0;
    }
    .hamburger-btn.open span:nth-child(3) {
        transform: translateY(-8px) rotate(-45deg);
    }

    /* Content offset for mobile header (60px top + ~50px phone) */
    .news-page {
        margin-top: 130px;
    }
}

/* -- Mobile (≤620px) -- */
@media screen and (max-width: 620px) {
    .news .pankuzu {
        padding-left: 10px;
        padding-right: 10px;
    }
    .news-inner {
        padding: 10px;
        box-sizing: border-box;
        width: 100%;
        max-width: 100%;
    }
    .post-grid {
        grid-template-columns: 1fr;
        gap: 16px;
    }
    .post-card {
        max-width: 100%;
    }
    .post-card-img img,
    .post-card-noimg {
        height: 180px;
    }
    .post-card-title {
        font-size: 15px;
    }
    .single-header .entry-title {
        font-size: 20px;
    }
    .pagination a,
    .pagination span {
        min-width: 30px;
        height: 30px;
        line-height: 30px;
        font-size: 13px;
    }
}
