/*
Theme Name: N-works Member
Theme URI: https://n-works.club
Description: N-works 会員サイト用テーマ — 既存マップサイトのデザインと統一
Author: V-formation
Version: 1.0.0
Text Domain: nworks-member
*/

/* ---- Reset & Base ---- */

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

html {
  scroll-behavior: smooth;
}

body {
  width: 100%;
  min-height: 100vh;
  background: #f8f6f1;
  font-family: 'Helvetica Neue', Arial, 'Hiragino Kaku Gothic ProN', sans-serif;
  color: #333;
  display: flex;
  flex-direction: column;
}

a { color: #0047AB; text-decoration: none; }
a:hover { text-decoration: underline; }

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

/* ---- Header ---- */

.site-header {
  position: fixed;
  top: 0; left: 0; right: 0;
  height: 56px;
  z-index: 1000;
  background: rgba(245, 240, 230, 0.95);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 24px;
  border-bottom: 1px solid rgba(0, 0, 0, 0.08);
  box-shadow: 0 1px 8px rgba(0, 0, 0, 0.06);
}

.site-header-left {
  display: flex;
  align-items: center;
  gap: 8px;
}

.site-logo {
  display: flex;
  align-items: center;
  text-decoration: none;
  margin-right: 12px;
}

.site-logo img {
  height: 24px;
  width: auto;
  display: block;
}

.site-nav {
  display: flex;
  align-items: center;
}

.site-nav a {
  display: block;
  padding: 8px 16px;
  color: #333;
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0.03em;
  text-decoration: none;
  white-space: nowrap;
  border-radius: 6px;
  transition: background 0.15s ease, color 0.15s ease;
}

.site-nav a:hover {
  background: rgba(0, 0, 0, 0.06);
  color: #0047AB;
  text-decoration: none;
}

.site-nav a.active {
  color: #0047AB;
}

.site-header-right {
  display: flex;
  align-items: center;
  gap: 12px;
  font-size: 13px;
  color: #555;
}

.site-header-right .user-name {
  font-weight: 600;
  color: #333;
}

.site-header-right .logout-link {
  color: #888;
  font-size: 12px;
  padding: 4px 10px;
  border: 1px solid #ccc;
  border-radius: 4px;
  transition: all 0.15s ease;
}

.site-header-right .logout-link:hover {
  color: #333;
  border-color: #999;
  text-decoration: none;
}

/* ---- Main Content ---- */

.site-main {
  flex: 1;
  margin-top: 56px;
  padding: 48px 24px;
  max-width: 960px;
  width: 100%;
  margin-left: auto;
  margin-right: auto;
}

/* ---- Page Title ---- */

.page-title {
  font-size: 28px;
  font-weight: 700;
  color: #1a1a1a;
  margin-bottom: 40px;
  padding-bottom: 16px;
  border-bottom: 2px solid #0047AB;
  letter-spacing: 0.02em;
}

/* ---- Cards ---- */

.card {
  background: #fff;
  border-radius: 12px;
  box-shadow: 0 2px 12px rgba(0, 0, 0, 0.06);
  padding: 32px;
  margin-bottom: 24px;
}

.card-title {
  font-size: 18px;
  font-weight: 700;
  color: #1a1a1a;
  margin-bottom: 16px;
}

/* ---- Forms ---- */

.nw-form label {
  display: block;
  font-size: 13px;
  font-weight: 600;
  color: #555;
  margin-bottom: 6px;
}

.nw-form input[type="text"],
.nw-form input[type="email"],
.nw-form input[type="password"],
.nw-form input[type="date"],
.nw-form input[type="tel"],
.nw-form select,
.nw-form textarea {
  width: 100%;
  padding: 12px 16px;
  font-size: 15px;
  font-family: inherit;
  border: 1px solid #d0ccc4;
  border-radius: 8px;
  background: #fff;
  color: #333;
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
  outline: none;
}

.nw-form input:focus,
.nw-form select:focus,
.nw-form textarea:focus {
  border-color: #0047AB;
  box-shadow: 0 0 0 3px rgba(0, 71, 171, 0.1);
}

.nw-form .form-row {
  margin-bottom: 20px;
}

.nw-form .form-row-inline {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
  margin-bottom: 20px;
}

.nw-form .form-hint {
  font-size: 12px;
  color: #999;
  margin-top: 4px;
}

.nw-form .form-error {
  font-size: 12px;
  color: #d32f2f;
  margin-top: 4px;
}

/* ---- Buttons ---- */

.btn {
  display: inline-block;
  padding: 12px 32px;
  font-size: 15px;
  font-weight: 600;
  font-family: inherit;
  border-radius: 8px;
  border: none;
  cursor: pointer;
  text-align: center;
  text-decoration: none;
  transition: all 0.2s ease;
  letter-spacing: 0.02em;
}

.btn:hover { text-decoration: none; }

.btn-primary {
  background: #0047AB;
  color: #fff;
}

.btn-primary:hover {
  background: #003580;
  color: #fff;
}

.btn-secondary {
  background: transparent;
  color: #0047AB;
  border: 1px solid #0047AB;
}

.btn-secondary:hover {
  background: rgba(0, 71, 171, 0.06);
}

.btn-block {
  display: block;
  width: 100%;
}

/* ---- Registration / Login Layout ---- */

.auth-layout {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 40px;
  align-items: start;
}

.auth-benefits {
  padding: 40px 0;
}

.auth-benefits h2 {
  font-size: 24px;
  font-weight: 700;
  color: #1a1a1a;
  margin-bottom: 24px;
}

.auth-benefits .benefit-item {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  margin-bottom: 20px;
}

.benefit-icon {
  width: 40px;
  height: 40px;
  border-radius: 10px;
  background: rgba(0, 71, 171, 0.08);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.benefit-icon svg {
  width: 20px;
  height: 20px;
  fill: #0047AB;
}

.benefit-text h3 {
  font-size: 15px;
  font-weight: 600;
  color: #333;
  margin-bottom: 4px;
}

.benefit-text p {
  font-size: 13px;
  color: #777;
  line-height: 1.5;
}

/* ---- Dashboard ---- */

.dashboard-welcome {
  background: linear-gradient(135deg, #0047AB 0%, #0066cc 100%);
  color: #fff;
  padding: 32px;
  border-radius: 12px;
  margin-bottom: 32px;
}

.dashboard-welcome h2 {
  font-size: 22px;
  font-weight: 700;
  margin-bottom: 8px;
}

.dashboard-welcome p {
  font-size: 14px;
  opacity: 0.85;
}

.dashboard-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 20px;
}

.dashboard-card {
  background: #fff;
  border-radius: 12px;
  padding: 24px;
  box-shadow: 0 2px 12px rgba(0, 0, 0, 0.06);
  transition: transform 0.15s ease, box-shadow 0.15s ease;
  text-decoration: none;
  color: inherit;
  display: block;
}

.dashboard-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
  text-decoration: none;
  color: inherit;
}

.dashboard-card-icon {
  width: 48px;
  height: 48px;
  border-radius: 12px;
  background: rgba(0, 71, 171, 0.08);
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 16px;
}

.dashboard-card-icon svg {
  width: 24px;
  height: 24px;
  fill: #0047AB;
}

.dashboard-card h3 {
  font-size: 16px;
  font-weight: 700;
  color: #1a1a1a;
  margin-bottom: 6px;
}

.dashboard-card p {
  font-size: 13px;
  color: #777;
  line-height: 1.5;
}

/* ---- Member Content (Posts/Events/Gallery) ---- */

.post-list {
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.post-card {
  background: #fff;
  border-radius: 12px;
  padding: 24px;
  box-shadow: 0 2px 12px rgba(0, 0, 0, 0.06);
}

.post-card-meta {
  font-size: 12px;
  color: #999;
  margin-bottom: 8px;
}

.post-card h2 {
  font-size: 18px;
  font-weight: 700;
  margin-bottom: 8px;
}

.post-card h2 a {
  color: #1a1a1a;
}

.post-card h2 a:hover {
  color: #0047AB;
}

.post-card .excerpt {
  font-size: 14px;
  color: #666;
  line-height: 1.7;
}

.post-card .post-thumbnail {
  border-radius: 8px;
  margin-bottom: 16px;
  overflow: hidden;
}

/* ---- Single Post ---- */

.single-content {
  background: #fff;
  border-radius: 12px;
  padding: 40px;
  box-shadow: 0 2px 12px rgba(0, 0, 0, 0.06);
  line-height: 1.8;
  font-size: 15px;
}

.single-content h1,
.single-content h2,
.single-content h3 {
  margin-top: 32px;
  margin-bottom: 16px;
  color: #1a1a1a;
}

.single-content p {
  margin-bottom: 16px;
}

.single-content img {
  border-radius: 8px;
}

/* ---- Alert Messages ---- */

.alert {
  padding: 14px 20px;
  border-radius: 8px;
  font-size: 14px;
  margin-bottom: 20px;
}

.alert-info {
  background: rgba(0, 71, 171, 0.06);
  color: #0047AB;
  border: 1px solid rgba(0, 71, 171, 0.15);
}

.alert-success {
  background: rgba(46, 125, 50, 0.06);
  color: #2e7d32;
  border: 1px solid rgba(46, 125, 50, 0.15);
}

.alert-error {
  background: rgba(211, 47, 47, 0.06);
  color: #d32f2f;
  border: 1px solid rgba(211, 47, 47, 0.15);
}

/* ---- Pagination ---- */

.pagination {
  display: flex;
  justify-content: center;
  gap: 8px;
  margin-top: 40px;
}

.pagination a,
.pagination span {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  border-radius: 8px;
  font-size: 14px;
  font-weight: 600;
  text-decoration: none;
  transition: all 0.15s ease;
}

.pagination a {
  background: #fff;
  color: #333;
  border: 1px solid #d0ccc4;
}

.pagination a:hover {
  background: #0047AB;
  color: #fff;
  border-color: #0047AB;
  text-decoration: none;
}

.pagination .current {
  background: #0047AB;
  color: #fff;
  border: 1px solid #0047AB;
}

/* ---- Footer ---- */

.site-footer {
  padding: 24px;
  text-align: center;
  font-size: 12px;
  color: #999;
  border-top: 1px solid rgba(0, 0, 0, 0.06);
  margin-top: auto;
}

/* ---- PMPro Style Overrides ---- */

#pmpro_form .pmpro_checkout-field label,
#pmpro_form label {
  font-size: 13px;
  font-weight: 600;
  color: #555;
  margin-bottom: 6px;
}

#pmpro_form input[type="text"],
#pmpro_form input[type="email"],
#pmpro_form input[type="password"],
#pmpro_form input[type="date"],
#pmpro_form input[type="tel"],
#pmpro_form select,
#pmpro_form textarea {
  width: 100%;
  padding: 12px 16px;
  font-size: 15px;
  font-family: inherit;
  border: 1px solid #d0ccc4;
  border-radius: 8px;
  background: #fff;
  color: #333;
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
  outline: none;
}

#pmpro_form input:focus,
#pmpro_form select:focus,
#pmpro_form textarea:focus {
  border-color: #0047AB;
  box-shadow: 0 0 0 3px rgba(0, 71, 171, 0.1);
}

#pmpro_form .pmpro_btn,
#pmpro_form input[type="submit"],
.pmpro_btn {
  display: inline-block;
  padding: 12px 32px;
  font-size: 15px;
  font-weight: 600;
  font-family: inherit;
  border-radius: 8px;
  border: none;
  cursor: pointer;
  background: #0047AB;
  color: #fff;
  transition: background 0.2s ease;
  letter-spacing: 0.02em;
}

#pmpro_form .pmpro_btn:hover,
#pmpro_form input[type="submit"]:hover,
.pmpro_btn:hover {
  background: #003580;
}

.pmpro_message {
  padding: 14px 20px;
  border-radius: 8px;
  font-size: 14px;
  margin-bottom: 20px;
}

.pmpro_success { background: rgba(46, 125, 50, 0.06); color: #2e7d32; border: 1px solid rgba(46, 125, 50, 0.15); }
.pmpro_error, .pmpro_message.pmpro_error { background: rgba(211, 47, 47, 0.06); color: #d32f2f; border: 1px solid rgba(211, 47, 47, 0.15); }
.pmpro_alert { background: rgba(0, 71, 171, 0.06); color: #0047AB; border: 1px solid rgba(0, 71, 171, 0.15); }

/* PMPro: Hide username, default fullname, honeypot */
#pmpro_user_fields .pmpro_checkout-field-username,
.pmpro_checkout-field-username,
#pmpro_form .pmpro_checkout-field-username,
.pmpro_checkout-field-fullname,
#pmpro_form .pmpro_checkout-field-fullname,
#pmpro_form .pmpro_checkout-field-fullname_field,
#pmpro_form [class*="pmpro_captcha"],
#pmpro_form .pmpro_checkout-field label[for="fullname"],
#pmpro_form #fullname_field {
  display: none !important;
}

/* PMPro: Hide pricing/membership info section */
#pmpro_pricing_fields,
#pmpro_form #pmpro_pricing_fields,
#pmpro_pricing_fields.pmpro_card {
  display: none !important;
}

/* PMPro: Hide honeypot field */
#pmpro_form label[for="fullname"],
#pmpro_form #fullname,
#pmpro_form #fullname + strong {
  display: none !important;
}

/* PMPro checkout sections as cards */
#pmpro_form .pmpro_checkout,
#pmpro_form #pmpro_user_fields,
#pmpro_form #pmpro_billing_address_fields,
#pmpro_form #pmpro_payment_information_fields,
#pmpro_form .pmpro_checkout-fields {
  background: #fff;
  border-radius: 12px;
  box-shadow: 0 2px 12px rgba(0, 0, 0, 0.06);
  padding: 32px;
  margin-bottom: 24px;
}

#pmpro_form .pmpro_checkout h2,
#pmpro_form .pmpro_checkout h3,
#pmpro_form .pmpro_checkout-fields h3 {
  font-size: 20px;
  font-weight: 700;
  color: #1a1a1a;
  margin-bottom: 24px;
  padding-bottom: 12px;
  border-bottom: 2px solid #0047AB;
}

/* PMPro: Password show/hide toggle button */
#pmpro_form .pmpro_btn-password-toggle,
#pmpro_form .pmpro_btn.pmpro_btn-plain.pmpro_btn-password-toggle,
#pmpro_form button.pmpro_btn-password-toggle {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 4px 10px;
  font-size: 11px;
  font-weight: 500;
  background: transparent !important;
  color: #0047AB !important;
  border: 1px solid #d0ccc4 !important;
  border-radius: 6px;
  margin-top: 6px;
  width: auto !important;
  max-width: none !important;
  letter-spacing: 0;
  cursor: pointer;
}

#pmpro_form .pmpro_btn-password-toggle:hover,
#pmpro_form .pmpro_btn.pmpro_btn-plain.pmpro_btn-password-toggle:hover {
  background: rgba(0, 71, 171, 0.04) !important;
  border-color: #0047AB !important;
}

#pmpro_form .pmpro_form_submit {
  display: block !important;
  margin-top: 0;
}

#pmpro_submit_span {
  display: block !important;
  text-align: center;
  background: #fff;
  border-radius: 12px;
  box-shadow: 0 2px 12px rgba(0, 0, 0, 0.06);
  padding: 24px 32px;
  width: 100%;
  box-sizing: border-box;
}

#pmpro_submit_span .pmpro_btn,
#pmpro_submit_span input[type="submit"],
#pmpro_btn-submit {
  display: block !important;
  width: 100% !important;
  max-width: 100% !important;
  margin: 0 auto;
  padding: 16px 32px !important;
  font-size: 16px;
  border-radius: 8px;
  box-sizing: border-box;
}

/* PMPro: Force single-column layout */
#pmpro_form .pmpro_cols-2,
.pmpro_cols-2 {
  display: flex !important;
  flex-direction: column !important;
  gap: 0 !important;
}

#pmpro_form .pmpro_cols-2 > *,
.pmpro_cols-2 > * {
  width: 100% !important;
}

#pmpro_form .pmpro_checkout-field,
#pmpro_form .pmpro_form_field {
  margin-bottom: 20px;
}

#pmpro_form .pmpro_asterisk {
  color: #d32f2f;
}

#pmpro_form .login_link,
#pmpro_form .pmpro_checkout-field .login_link {
  text-align: center;
  margin-top: 20px;
  padding-top: 20px;
  border-top: 1px solid rgba(0,0,0,0.06);
  font-size: 13px;
  color: #999;
}

#pmpro_form .login_link a {
  color: #0047AB;
  font-weight: 600;
}

/* PMPro account page */
#pmpro_account .pmpro_box {
  background: #fff;
  border-radius: 12px;
  box-shadow: 0 2px 12px rgba(0, 0, 0, 0.06);
  padding: 24px;
  margin-bottom: 20px;
}

#pmpro_account .pmpro_box h3 {
  font-size: 16px;
  font-weight: 700;
  color: #1a1a1a;
  margin-bottom: 12px;
}

/* PMPro confirmation page */
.pmpro_confirmation_message {
  background: #fff;
  border-radius: 12px;
  box-shadow: 0 2px 12px rgba(0, 0, 0, 0.06);
  padding: 40px;
  text-align: center;
  line-height: 1.7;
}

/* ---- Checkbox / Radio ---- */

.nw-form input[type="checkbox"] {
  width: 18px;
  height: 18px;
  accent-color: #0047AB;
  vertical-align: middle;
  margin-right: 6px;
}

/* ---- Content Restriction Notice ---- */

.pmpro_content_message {
  background: #fff;
  border-radius: 12px;
  padding: 40px;
  box-shadow: 0 2px 12px rgba(0, 0, 0, 0.06);
  text-align: center;
}

.pmpro_content_message a {
  color: #0047AB;
  font-weight: 600;
}

/* ---- Responsive ---- */

@media (max-width: 768px) {
  .site-header {
    padding: 0 8px;
    height: 44px;
  }
  .site-header-left { gap: 2px; min-width: 0; flex: 1; }
  .site-logo { margin-right: 4px; }
  .site-logo img { height: 14px; }
  .site-nav a { padding: 6px 6px; font-size: 10px; letter-spacing: 0.01em; }

  .site-header-right {
    gap: 6px;
    font-size: 11px;
  }
  .site-header-right .logout-link {
    font-size: 10px;
    padding: 3px 6px;
  }

  .site-main {
    margin-top: 44px;
    padding: 24px 16px;
  }

  .page-title {
    font-size: 22px;
    margin-bottom: 24px;
  }

  .auth-layout {
    grid-template-columns: 1fr;
    gap: 24px;
  }

  .auth-benefits { padding: 0; order: -1; }

  .nw-form .form-row-inline {
    grid-template-columns: 1fr;
    gap: 12px;
  }

  .card { padding: 20px; }

  .dashboard-grid {
    grid-template-columns: 1fr;
  }

  .single-content { padding: 24px; }
}
