/*
Theme Name: Sigfox Partner
Theme URI: https://partner.sigfox.kccs.co.jp/
Author: KCCS
Author URI: https://www.kccs.co.jp/
Description: Sigfoxパートナーサイトを再現したWordPressテーマ。お知らせ一覧と技術情報タイムラインをトップページに表示します。
Version: 1.0.0
Requires at least: 6.0
Tested up to: 6.5
Requires PHP: 7.4
License: GNU General Public License v2 or later
License URI: http://www.gnu.org/licenses/gpl-2.0.html
Text Domain: sigfox-partner
*/

/* =========================
   Reset / Base
   ========================= */
*,
*::before,
*::after {
    box-sizing: border-box;
}

html {
    font-size: 14px;
}

body {
    margin: 0;
    font-family: "Hiragino Kaku Gothic ProN", "ヒラギノ角ゴ ProN W3", Meiryo, "メイリオ", sans-serif;
    color: #333;
    background-color: #ffffff;
    line-height: 1.6;
}

a {
    color: #2a6496;
    text-decoration: none;
}

a:hover {
    color: #1c4570;
    text-decoration: underline;
}

img {
    max-width: 100%;
    height: auto;
    vertical-align: middle;
}

ul {
    list-style: none;
    margin: 0;
    padding: 0;
}

/* =========================
   Layout
   ========================= */
.container {
    max-width: 960px;
    margin: 0 auto;
    padding: 0 15px;
}

.site-main {
    padding: 20px 0 60px;
    min-height: calc(100vh - 220px);
}

/* =========================
   Site Header
   ========================= */
.site-header {
    background: #ffffff;
    border-bottom: 1px solid #e5e5e5;
    padding: 12px 0 0;
}

.site-header-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 12px;
    padding-bottom: 8px;
}

.site-branding {
    display: flex;
    align-items: center;
    gap: 10px;
}

.site-logo img {
    height: 36px;
    width: auto;
}

.site-title {
    font-size: 18px;
    font-weight: bold;
    margin: 0;
    color: #333;
}

.site-title a {
    color: inherit;
    text-decoration: none;
}

.site-header-utility {
    display: flex;
    align-items: center;
    gap: 16px;
}

.user-menu {
    position: relative;
}

.user-menu-toggle {
    background: none;
    border: 0;
    padding: 4px 0;
    cursor: pointer;
    font: inherit;
    line-height: 1;
}

.user-menu-toggle:focus {
    outline: 2px solid #66afe9;
    outline-offset: 2px;
}

.user-email {
    font-size: 12px;
    color: #2a6496;
    white-space: nowrap;
}

.user-menu-dropdown {
    position: absolute;
    top: 100%;
    right: 0;
    min-width: 160px;
    background: #fff;
    border: 1px solid #e0e0e0;
    border-radius: 3px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
    opacity: 0;
    visibility: hidden;
    transform: translateY(-4px);
    transition: opacity 0.15s ease, transform 0.15s ease, visibility 0.15s;
    z-index: 1000;
}

.user-menu:hover .user-menu-dropdown,
.user-menu:focus-within .user-menu-dropdown {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.user-menu-item {
    display: block;
    padding: 8px 14px;
    font-size: 13px;
    color: #333;
    text-decoration: none;
    white-space: nowrap;
}

.user-menu-item:hover,
.user-menu-item:focus {
    background: #f5f5f5;
    color: #2a6496;
}

.search-form {
    display: flex;
    align-items: stretch;
}

.search-form input[type="search"] {
    border: 1px solid #ccc;
    border-right: none;
    padding: 4px 8px;
    font-size: 12px;
    width: 180px;
    height: 28px;
    border-radius: 3px 0 0 3px;
    outline: none;
}

.search-form input[type="search"]:focus {
    border-color: #66afe9;
    box-shadow: 0 0 4px rgba(102, 175, 233, 0.4);
}

.search-form button {
    border: 1px solid #ccc;
    background: #f5f5f5;
    padding: 0 10px;
    cursor: pointer;
    border-radius: 0 3px 3px 0;
    height: 28px;
    color: #555;
}

.search-form button:hover {
    background: #e5e5e5;
}

/* =========================
   Primary Navigation
   ========================= */
.primary-nav {
    border-top: 1px solid #f0f0f0;
}

.primary-nav .menu {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: center;
    gap: 0;
}

.primary-nav .menu li {
    position: relative;
    padding: 8px 14px;
}

.primary-nav .menu li + li::before {
    content: "|";
    position: absolute;
    left: -2px;
    color: #ddd;
    pointer-events: none;
}

.primary-nav .menu a {
    color: #2a6496;
    font-size: 13px;
    text-decoration: none;
}

.primary-nav .menu a:hover {
    text-decoration: underline;
}

/* =========================
   Edit Link
   ========================= */
.page-edit-link {
    text-align: right;
    margin: 6px 0;
    font-size: 12px;
    color: #2a6496;
}

/* =========================
   Section Box
   ========================= */
.section-box {
    border: 1px solid #ddd;
    border-radius: 4px;
    background: #fff;
    margin-bottom: 24px;
    overflow: hidden;
}

.section-box-header {
    background: #f5f5f5;
    border-bottom: 1px solid #ddd;
    padding: 8px 14px;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.section-box-title {
    font-size: 14px;
    font-weight: bold;
    margin: 0;
    color: #333;
}

.section-box-more a {
    font-size: 12px;
    color: #2a6496;
}

.section-box-body {
    padding: 8px 16px 12px;
}

/* =========================
   Notice List
   ========================= */
.notice-list li {
    border-bottom: 1px dotted #e0e0e0;
    padding: 8px 0 8px 18px;
    position: relative;
    font-size: 13px;
}

.notice-list li:last-child {
    border-bottom: none;
}

.notice-list li::before {
    content: "";
    position: absolute;
    left: 4px;
    top: 14px;
    width: 0;
    height: 0;
    border-style: solid;
    border-width: 4px 0 4px 6px;
    border-color: transparent transparent transparent #2a6496;
}

.notice-list a {
    color: #2a6496;
}

/* =========================
   Timeline
   ========================= */
.timeline {
    position: relative;
    padding: 8px 0 8px 110px;
}

.timeline::before {
    content: "";
    position: absolute;
    left: 105px;
    top: 0;
    bottom: 0;
    width: 2px;
    background: #d8e3ea;
}

.timeline-item {
    position: relative;
    padding: 10px 0;
    font-size: 13px;
}

.timeline-item .timeline-date {
    position: absolute;
    left: -110px;
    top: 12px;
    width: 90px;
    text-align: right;
    color: #555;
    font-size: 12px;
}

.timeline-item .timeline-marker {
    position: absolute;
    left: -10px;
    top: 14px;
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background: #6db64f;
    border: 2px solid #fff;
    box-shadow: 0 0 0 1px #6db64f;
}

.timeline-item a {
    color: #2a6496;
    margin-left: 8px;
}

/* =========================
   Share / Contact
   ========================= */
.share-buttons {
    display: flex;
    justify-content: flex-end;
    gap: 6px;
    margin: 20px 0 8px;
}

.share-buttons a {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 28px;
    height: 28px;
    border-radius: 3px;
    color: #fff;
}

.share-buttons .share-twitter {
    background: #1da1f2;
}

.share-buttons .share-facebook {
    background: #1877f2;
}

.contact-info {
    text-align: right;
    font-size: 12px;
    color: #555;
    margin-bottom: 24px;
    line-height: 1.8;
}

.contact-info a {
    color: #2a6496;
}

/* =========================
   Single / Page
   ========================= */
.entry-header {
    margin-bottom: 16px;
    border-bottom: 1px solid #eee;
    padding-bottom: 8px;
}

.entry-title {
    font-size: 20px;
    margin: 0 0 4px;
    color: #333;
}

.entry-meta {
    font-size: 12px;
    color: #888;
}

.entry-content {
    font-size: 14px;
    line-height: 1.8;
}

.entry-content h2 {
    font-size: 16px;
    border-left: 4px solid #2a6496;
    padding-left: 8px;
    margin-top: 24px;
}

.post-navigation {
    margin-top: 32px;
    display: flex;
    justify-content: space-between;
    font-size: 13px;
}

/* =========================
   Site Footer
   ========================= */
.site-footer {
    background: #1a1a1a;
    color: #cfcfcf;
    padding: 24px 0;
    font-size: 12px;
    text-align: center;
}

.footer-nav ul {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 0;
    margin-bottom: 12px;
}

.footer-nav li {
    padding: 0 12px;
    position: relative;
}

.footer-nav li + li::before {
    content: "|";
    position: absolute;
    left: -2px;
    color: #555;
}

.footer-nav a {
    color: #cfcfcf;
}

.footer-nav a:hover {
    color: #fff;
}

.footer-credit {
    line-height: 1.8;
    color: #aaa;
}

/* =========================
   Login / Register / Password Reset Page
   ========================= */
body.page-template-page-login .site-main,
body.page-template-page-register .site-main,
body.page-template-page-password-reset .site-main {
    background: linear-gradient(180deg, #f4f7fa 0%, #e9eff5 100%);
    padding: 80px 0 64px;
    min-height: calc(100vh - 120px);
}

.login-page {
    display: flex;
    justify-content: center;
    align-items: flex-start;
    padding: 0 12px;
}

.login-card {
    width: 100%;
    max-width: 420px;
    background: #ffffff;
    border: 1px solid #d8e0e8;
    border-radius: 6px;
    box-shadow: 0 12px 32px rgba(20, 50, 90, 0.08);
    overflow: hidden;
}

.login-card-header {
    background: #ffffff;
    border-bottom: 1px solid #eef2f6;
    padding: 28px 32px 20px;
    text-align: center;
}

.login-card-logo {
    display: inline-block;
    margin-bottom: 12px;
}

.login-card-logo img,
.login-card-logo .custom-logo {
    height: 44px;
    width: auto;
}

.login-card-title {
    font-size: 18px;
    font-weight: bold;
    margin: 0 0 8px;
    color: #1f3a5f;
    letter-spacing: 0.02em;
}

.login-card-lead {
    margin: 0;
    font-size: 12px;
    color: #6b7785;
    line-height: 1.6;
}

.login-card-body {
    padding: 24px 32px 8px;
}

.login-card-footer {
    border-top: 1px solid #eef2f6;
    background: #fafcfd;
    padding: 14px 32px;
}

.login-card-links {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 12px 18px;
    font-size: 12px;
    margin: 0;
}

.login-card-links a {
    color: #2a6496;
}

/* Alerts */
.login-alert {
    border-radius: 4px;
    padding: 10px 12px;
    font-size: 12px;
    margin-bottom: 16px;
    line-height: 1.6;
}

.login-alert-error {
    background: #fbecec;
    border: 1px solid #e6b8b8;
    color: #a03434;
}

.login-alert-info {
    background: #eef5fb;
    border: 1px solid #c4d8eb;
    color: #2a6496;
}

/* WP-Members form overrides */
.login-card-body .wpmem_msg {
    background: #eef5fb;
    border: 1px solid #c4d8eb;
    color: #2a6496;
    padding: 10px 12px;
    font-size: 12px;
    border-radius: 4px;
    margin-bottom: 16px;
}

.login-card-body .div_text,
.login-card-body .div_textarea,
.login-card-body .div_select,
.login-card-body .div_password,
.login-card-body .form {
    margin-bottom: 14px;
}

.login-card-body label,
.login-card-body .text,
.login-card-body .password,
.login-card-body .textbox,
.login-card-body .username {
    display: block;
}

.login-card-body label {
    font-size: 12px;
    color: #4a5663;
    margin-bottom: 6px;
    font-weight: 600;
}

.login-card-body .req {
    color: #c0392b;
    margin-left: 2px;
}

.login-card-body input[type="text"],
.login-card-body input[type="email"],
.login-card-body input[type="password"],
.login-card-body input[type="url"],
.login-card-body input[type="tel"],
.login-card-body select,
.login-card-body textarea {
    width: 100%;
    border: 1px solid #c8d2dc;
    border-radius: 4px;
    background: #fff;
    padding: 9px 12px;
    font-size: 14px;
    color: #333;
    box-sizing: border-box;
    transition: border-color 0.15s ease, box-shadow 0.15s ease;
    -webkit-appearance: none;
    appearance: none;
}

.login-card-body input[type="text"]:focus,
.login-card-body input[type="email"]:focus,
.login-card-body input[type="password"]:focus,
.login-card-body input[type="url"]:focus,
.login-card-body input[type="tel"]:focus,
.login-card-body select:focus,
.login-card-body textarea:focus {
    border-color: #2a6496;
    box-shadow: 0 0 0 3px rgba(42, 100, 150, 0.15);
    outline: none;
}

.login-card-body .div_checkbox,
.login-card-body .div_radio {
    font-size: 12px;
    color: #4a5663;
    display: flex;
    align-items: center;
    gap: 6px;
    margin-bottom: 14px;
}

.login-card-body .div_checkbox label,
.login-card-body .div_radio label {
    margin: 0;
    font-weight: normal;
}

.login-card-body .button_div,
.login-card-body .button_div_login {
    text-align: center;
    margin-top: 8px;
}

.login-card-body .buttons,
.login-card-body input[type="submit"],
.login-card-body button[type="submit"] {
    display: inline-block;
    width: 100%;
    background: linear-gradient(180deg, #2a6496 0%, #214f78 100%);
    border: 1px solid #1c4570;
    color: #ffffff;
    font-size: 14px;
    font-weight: bold;
    letter-spacing: 0.05em;
    padding: 11px 16px;
    border-radius: 4px;
    cursor: pointer;
    transition: filter 0.15s ease, transform 0.05s ease;
    -webkit-appearance: none;
    appearance: none;
}

.login-card-body .buttons:hover,
.login-card-body input[type="submit"]:hover,
.login-card-body button[type="submit"]:hover {
    filter: brightness(1.08);
}

.login-card-body .buttons:active,
.login-card-body input[type="submit"]:active,
.login-card-body button[type="submit"]:active {
    transform: translateY(1px);
}

.login-card-body .link-text-forgot,
.login-card-body .link-text-register {
    display: block;
    text-align: center;
    font-size: 12px;
    margin-top: 12px;
}

/* WP-Members の table レイアウト互換（古いバージョン向け） */
.login-card-body .wpmem_login table,
.login-card-body table.form {
    width: 100%;
    border-collapse: collapse;
}

.login-card-body .wpmem_login td,
.login-card-body table.form td {
    padding: 4px 0;
    vertical-align: middle;
}

.login-card-body .wpmem_login td:first-child,
.login-card-body table.form td:first-child {
    width: 110px;
    font-size: 12px;
    color: #4a5663;
    font-weight: 600;
}

/* =========================
   Technical Category Grid / Tabs
   ========================= */
.tech-category-grid {
    list-style: none;
    margin: 0;
    padding: 8px 0;
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
    gap: 12px;
}

.tech-category-grid > li {
    margin: 0;
}

.tech-category-card {
    display: block;
    padding: 14px 16px;
    border: 1px solid #ddd;
    border-radius: 4px;
    background: #fff;
    color: inherit;
    text-decoration: none;
    transition: border-color .15s ease, box-shadow .15s ease;
}

.tech-category-card:hover {
    border-color: #2a6496;
    box-shadow: 0 4px 12px rgba(42, 100, 150, 0.08);
    text-decoration: none;
}

.tech-category-card-title {
    margin: 0 0 6px;
    font-size: 14px;
    font-weight: bold;
    color: #2a6496;
}

.tech-category-card-desc {
    margin: 0 0 8px;
    font-size: 12px;
    color: #555;
    line-height: 1.5;
}

.tech-category-card-count {
    display: inline-block;
    font-size: 11px;
    color: #888;
}

.tech-category-tabs {
    margin-bottom: 16px;
    border-bottom: 1px solid #e5e5e5;
}

.tech-category-tabs-list {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    margin: 0;
    padding: 6px 0;
    list-style: none;
}

.tech-category-tabs-list > li {
    margin: 0;
}

.tech-category-tab {
    display: inline-block;
    padding: 5px 12px;
    border: 1px solid #d5dde6;
    border-radius: 999px;
    background: #fff;
    color: #2a6496;
    font-size: 12px;
    line-height: 1.4;
    text-decoration: none;
}

.tech-category-tab:hover {
    background: #eef5fb;
    text-decoration: none;
}

.tech-category-tab.is-active {
    background: #2a6496;
    border-color: #2a6496;
    color: #fff;
    pointer-events: none;
}

.tech-category-tab-all .tech-category-tab {
    border-style: dashed;
}

/* =========================
   Responsive
   ========================= */
@media screen and (max-width: 768px) {
    .site-header-inner {
        justify-content: center;
        text-align: center;
    }

    .primary-nav .menu {
        justify-content: flex-start;
        overflow-x: auto;
    }

    .timeline {
        padding-left: 90px;
    }

    .timeline::before {
        left: 85px;
    }

    .timeline-item .timeline-date {
        left: -90px;
        width: 75px;
        font-size: 11px;
    }

    .tech-category-grid {
        grid-template-columns: 1fr;
    }

    .tech-category-tabs-list {
        flex-wrap: nowrap;
        overflow-x: auto;
        padding-bottom: 8px;
    }

    .tech-category-tab {
        flex: 0 0 auto;
    }

    .footer-nav ul {
        flex-direction: column;
        gap: 6px;
    }

    .footer-nav li + li::before {
        display: none;
    }

    body.page-template-page-login .site-main,
    body.page-template-page-register .site-main,
    body.page-template-page-password-reset .site-main {
        padding: 40px 0 40px;
    }

    .login-card-header,
    .login-card-body,
    .login-card-footer {
        padding-left: 20px;
        padding-right: 20px;
    }

    .login-card-links {
        gap: 8px 14px;
    }
}
