/* ============================================================
   Site Buy - Main Stylesheet
   M&A Marketplace Theme
   ============================================================ */

/* ------------------------------------------------------------
   1. CSS Variables / Color Scheme
   ------------------------------------------------------------ */
:root {
    --color-primary: #1a2b4a;
    --color-primary-light: #2c3e6b;
    --color-accent: #e67e22;
    --color-accent-hover: #d35400;
    --color-success: #27ae60;
    --color-warning: #f39c12;
    --color-danger: #e74c3c;
    --color-bg: #f8f9fa;
    --color-bg-white: #ffffff;
    --color-text: #333333;
    --color-text-light: #666666;
    --color-text-muted: #999999;
    --color-border: #e0e0e0;
    --font-family: 'Noto Sans JP', 'Hiragino Kaku Gothic ProN', 'Yu Gothic', sans-serif;
    --container-width: 1200px;
    --header-height: 70px;
    --shadow-sm: 0 1px 3px rgba(0, 0, 0, 0.08);
    --shadow-md: 0 4px 12px rgba(0, 0, 0, 0.1);
    --shadow-lg: 0 8px 24px rgba(0, 0, 0, 0.12);
    --radius-sm: 4px;
    --radius-md: 8px;
    --radius-lg: 12px;
    --transition: 0.3s ease;
}

/* ------------------------------------------------------------
   2. Reset / Base
   ------------------------------------------------------------ */
*,
*::before,
*::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

html {
    font-size: 16px;
    scroll-behavior: smooth;
    -webkit-text-size-adjust: 100%;
}

body {
    font-family: var(--font-family);
    font-size: 1rem;
    line-height: 1.8;
    color: var(--color-text);
    background-color: var(--color-bg);
    padding-top: var(--header-height);
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

body.menu-open {
    overflow: hidden;
}

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

ul, ol {
    list-style: none;
}

a {
    color: var(--color-primary);
    text-decoration: none;
    transition: color var(--transition);
}

a:hover {
    color: var(--color-accent);
}

/* ------------------------------------------------------------
   3. Typography
   ------------------------------------------------------------ */
h1, h2, h3, h4, h5, h6 {
    font-weight: 700;
    line-height: 1.4;
    color: var(--color-text);
    margin-bottom: 0.5em;
}

h1 { font-size: 2rem; }
h2 { font-size: 1.75rem; }
h3 { font-size: 1.5rem; }
h4 { font-size: 1.25rem; }
h5 { font-size: 1.1rem; }
h6 { font-size: 1rem; }

p {
    margin-bottom: 1em;
}

.text-center { text-align: center; }
.text-right { text-align: right; }
.text-muted { color: var(--color-text-muted); }
.text-light { color: var(--color-text-light); }
.text-primary { color: var(--color-primary); }
.text-accent { color: var(--color-accent); }
.text-success { color: var(--color-success); }
.text-danger { color: var(--color-danger); }

/* ------------------------------------------------------------
   4. Layout
   ------------------------------------------------------------ */
.container {
    max-width: var(--container-width);
    margin: 0 auto;
    padding: 0 20px;
    width: 100%;
}

.site-main {
    min-height: 60vh;
    padding: 40px 0;
}

.section {
    padding: 60px 0;
}

.section-title {
    font-size: 1.75rem;
    font-weight: 700;
    text-align: center;
    margin-bottom: 40px;
    position: relative;
}

.section-title::after {
    content: '';
    display: block;
    width: 60px;
    height: 3px;
    background-color: var(--color-accent);
    margin: 12px auto 0;
    border-radius: 2px;
}

/* Grid System */
.grid {
    display: grid;
    gap: 24px;
}

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

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

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

.flex {
    display: flex;
}

.flex-between {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.flex-center {
    display: flex;
    justify-content: center;
    align-items: center;
}

.flex-wrap {
    flex-wrap: wrap;
}

.gap-sm { gap: 8px; }
.gap-md { gap: 16px; }
.gap-lg { gap: 24px; }

/* ------------------------------------------------------------
   5. Buttons
   ------------------------------------------------------------ */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 10px 24px;
    font-size: 0.9rem;
    font-weight: 600;
    font-family: var(--font-family);
    line-height: 1.5;
    border: 2px solid transparent;
    border-radius: var(--radius-sm);
    cursor: pointer;
    transition: all var(--transition);
    text-decoration: none;
    white-space: nowrap;
    gap: 6px;
}

.btn:hover {
    transform: translateY(-1px);
}

.btn-primary {
    background-color: var(--color-accent);
    color: #ffffff;
    border-color: var(--color-accent);
}

.btn-primary:hover {
    background-color: var(--color-accent-hover);
    border-color: var(--color-accent-hover);
    color: #ffffff;
}

.btn-outline {
    background-color: transparent;
    color: var(--color-primary);
    border-color: var(--color-primary);
}

.btn-outline:hover {
    background-color: var(--color-primary);
    color: #ffffff;
}

.btn-outline-white {
    background-color: transparent;
    color: #ffffff;
    border-color: #ffffff;
}

.btn-outline-white:hover {
    background-color: #ffffff;
    color: var(--color-primary);
}

.btn-text {
    background-color: transparent;
    color: var(--color-text-light);
    border-color: transparent;
    padding: 10px 12px;
}

.btn-text:hover {
    color: var(--color-primary);
    background-color: rgba(0, 0, 0, 0.04);
}

.btn-sm {
    padding: 6px 16px;
    font-size: 0.8rem;
}

.btn-lg {
    padding: 14px 36px;
    font-size: 1.05rem;
}

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

.btn-icon {
    padding: 8px;
    border-radius: 50%;
}

/* Header-specific button overrides */
.header-auth .btn-outline {
    color: #ffffff;
    border-color: rgba(255, 255, 255, 0.6);
    padding: 6px 18px;
    font-size: 0.85rem;
}

.header-auth .btn-outline:hover {
    background-color: #ffffff;
    color: var(--color-primary);
    border-color: #ffffff;
}

.header-auth .btn-primary {
    padding: 6px 18px;
    font-size: 0.85rem;
}

.header-auth .btn-text {
    color: rgba(255, 255, 255, 0.7);
    padding: 6px 12px;
    font-size: 0.85rem;
}

.header-auth .btn-text:hover {
    color: #ffffff;
    background-color: rgba(255, 255, 255, 0.1);
}

/* ------------------------------------------------------------
   6. Header
   ------------------------------------------------------------ */
.site-header {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    height: var(--header-height);
    background-color: var(--color-primary);
    z-index: 1000;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
}

.header-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: 100%;
}

.header-logo a {
    display: flex;
    flex-direction: column;
    text-decoration: none;
    line-height: 1.2;
}

.header-logo .logo-text {
    font-size: 1.5rem;
    font-weight: 800;
    color: #ffffff;
    letter-spacing: 2px;
}

.header-logo .logo-sub {
    font-size: 0.65rem;
    color: rgba(255, 255, 255, 0.65);
    letter-spacing: 0.5px;
}

/* Navigation */
.header-nav {
    flex: 1;
    display: flex;
    justify-content: center;
}

.nav-menu {
    display: flex;
    align-items: center;
    gap: 4px;
}

.nav-item > a {
    display: block;
    padding: 8px 18px;
    color: rgba(255, 255, 255, 0.9);
    font-size: 0.9rem;
    font-weight: 500;
    border-radius: var(--radius-sm);
    transition: all var(--transition);
}

.nav-item > a:hover,
.nav-item.active > a {
    color: #ffffff;
    background-color: rgba(255, 255, 255, 0.1);
}

/* Dropdown */
.has-dropdown {
    position: relative;
}

.dropdown-menu {
    position: absolute;
    top: 100%;
    left: 0;
    min-width: 200px;
    background-color: var(--color-bg-white);
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-lg);
    opacity: 0;
    visibility: hidden;
    transform: translateY(8px);
    transition: all var(--transition);
    padding: 8px 0;
    z-index: 100;
}

.dropdown-menu.show {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.dropdown-menu li a {
    display: block;
    padding: 10px 20px;
    color: var(--color-text);
    font-size: 0.85rem;
    transition: background-color var(--transition);
}

.dropdown-menu li a:hover {
    background-color: var(--color-bg);
    color: var(--color-accent);
}

/* Auth Buttons */
.header-auth {
    display: flex;
    align-items: center;
    gap: 8px;
}

/* Hamburger */
.hamburger {
    display: none;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    width: 40px;
    height: 40px;
    background: transparent;
    border: none;
    cursor: pointer;
    padding: 0;
    gap: 5px;
    z-index: 1100;
}

.hamburger span {
    display: block;
    width: 24px;
    height: 2px;
    background-color: #ffffff;
    border-radius: 2px;
    transition: all var(--transition);
}

.hamburger.active span:nth-child(1) {
    transform: rotate(45deg) translate(5px, 5px);
}

.hamburger.active span:nth-child(2) {
    opacity: 0;
}

.hamburger.active span:nth-child(3) {
    transform: rotate(-45deg) translate(5px, -5px);
}

/* ------------------------------------------------------------
   7. Mobile Menu
   ------------------------------------------------------------ */
.mobile-menu {
    position: fixed;
    top: 0;
    right: -100%;
    width: 300px;
    height: 100vh;
    background-color: var(--color-bg-white);
    z-index: 1050;
    transition: right var(--transition);
    overflow-y: auto;
    padding: calc(var(--header-height) + 20px) 24px 24px;
    box-shadow: -4px 0 24px rgba(0, 0, 0, 0.15);
}

.mobile-menu.open {
    right: 0;
}

.mobile-nav ul li {
    border-bottom: 1px solid var(--color-border);
}

.mobile-nav ul li a {
    display: block;
    padding: 14px 0;
    color: var(--color-text);
    font-size: 0.95rem;
    font-weight: 500;
}

.mobile-nav ul li a:hover {
    color: var(--color-accent);
}

.mobile-auth {
    margin-top: 24px;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

/* Mobile menu overlay */
body.menu-open::after {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: rgba(0, 0, 0, 0.5);
    z-index: 1040;
}

/* ------------------------------------------------------------
   8. Footer
   ------------------------------------------------------------ */
.site-footer {
    background-color: var(--color-primary);
    color: rgba(255, 255, 255, 0.8);
    padding: 60px 0 0;
    margin-top: 60px;
}

.footer-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 40px;
}

.footer-col h4 {
    color: #ffffff;
    font-size: 0.95rem;
    font-weight: 700;
    margin-bottom: 16px;
    padding-bottom: 10px;
    border-bottom: 2px solid rgba(255, 255, 255, 0.15);
}

.footer-col ul li {
    margin-bottom: 8px;
}

.footer-col ul li a {
    color: rgba(255, 255, 255, 0.7);
    font-size: 0.85rem;
    transition: color var(--transition);
}

.footer-col ul li a:hover {
    color: #ffffff;
}

.footer-contact .footer-logo .logo-text {
    font-size: 1.3rem;
    font-weight: 800;
    color: #ffffff;
    letter-spacing: 2px;
}

.footer-phone {
    font-size: 1.1rem;
    font-weight: 700;
    color: #ffffff;
    margin-top: 16px;
    margin-bottom: 4px;
}

.footer-hours {
    font-size: 0.8rem;
    color: rgba(255, 255, 255, 0.6);
}

.footer-bottom {
    text-align: center;
    padding: 24px 0;
    margin-top: 40px;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    font-size: 0.8rem;
    color: rgba(255, 255, 255, 0.5);
}

/* ------------------------------------------------------------
   9. Cards - Listing Card
   ------------------------------------------------------------ */
.listing-card {
    background-color: var(--color-bg-white);
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-sm);
    overflow: hidden;
    transition: all var(--transition);
    border: 1px solid var(--color-border);
}

.listing-card:hover {
    box-shadow: var(--shadow-md);
    transform: translateY(-2px);
}

.listing-card a {
    display: block;
    text-decoration: none;
    color: inherit;
}

.listing-card-header {
    padding: 20px 20px 0;
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
}

.listing-card-id {
    font-size: 0.75rem;
    color: var(--color-text-muted);
    font-weight: 500;
}

.listing-card-body {
    padding: 12px 20px;
}

.listing-card-title {
    font-size: 1.05rem;
    font-weight: 700;
    color: var(--color-text);
    line-height: 1.5;
    margin-bottom: 8px;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.listing-card-desc {
    font-size: 0.85rem;
    color: var(--color-text-light);
    line-height: 1.6;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    margin-bottom: 12px;
}

.listing-card-info {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 8px;
    padding: 16px 20px;
    border-top: 1px solid var(--color-border);
    background-color: #fafbfc;
}

.listing-card-info dt {
    font-size: 0.7rem;
    color: var(--color-text-muted);
    font-weight: 500;
}

.listing-card-info dd {
    font-size: 0.9rem;
    font-weight: 700;
    color: var(--color-text);
}

.listing-card-price {
    font-size: 1.15rem;
    font-weight: 800;
    color: var(--color-accent);
}

.listing-card-footer {
    padding: 12px 20px;
    border-top: 1px solid var(--color-border);
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 0.8rem;
    color: var(--color-text-muted);
}

.listing-card-meta {
    display: flex;
    gap: 16px;
    align-items: center;
}

.listing-card-views::before {
    content: '';
    display: inline-block;
    width: 14px;
    height: 14px;
    margin-right: 4px;
    vertical-align: -2px;
}

/* Card grid layout */
.listing-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 24px;
}

/* Needs card variant */
.needs-card {
    background-color: var(--color-bg-white);
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-sm);
    border: 1px solid var(--color-border);
    padding: 24px;
    transition: all var(--transition);
}

.needs-card:hover {
    box-shadow: var(--shadow-md);
    transform: translateY(-2px);
}

.needs-card-title {
    font-size: 1.05rem;
    font-weight: 700;
    margin-bottom: 12px;
    line-height: 1.5;
}

.needs-card-budget {
    font-size: 1.1rem;
    font-weight: 800;
    color: var(--color-accent);
    margin-bottom: 8px;
}

.needs-card-detail {
    font-size: 0.85rem;
    color: var(--color-text-light);
    line-height: 1.6;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

/* ------------------------------------------------------------
   10. Status Badges
   ------------------------------------------------------------ */
.badge {
    display: inline-flex;
    align-items: center;
    padding: 3px 10px;
    font-size: 0.72rem;
    font-weight: 700;
    border-radius: 20px;
    white-space: nowrap;
    letter-spacing: 0.5px;
}

.badge-open {
    background-color: rgba(39, 174, 96, 0.12);
    color: var(--color-success);
}

.badge-negotiating {
    background-color: rgba(243, 156, 18, 0.12);
    color: var(--color-warning);
}

.badge-closed {
    background-color: rgba(231, 76, 60, 0.12);
    color: var(--color-danger);
}

.badge-category {
    background-color: rgba(26, 43, 74, 0.08);
    color: var(--color-primary);
}

/* ------------------------------------------------------------
   11. Tables
   ------------------------------------------------------------ */
.detail-table {
    width: 100%;
    border-collapse: collapse;
    background-color: var(--color-bg-white);
    border-radius: var(--radius-md);
    overflow: hidden;
    box-shadow: var(--shadow-sm);
    border: 1px solid var(--color-border);
}

.detail-table th,
.detail-table td {
    padding: 14px 20px;
    text-align: left;
    font-size: 0.9rem;
    border-bottom: 1px solid var(--color-border);
}

.detail-table th {
    background-color: #f5f6f8;
    color: var(--color-text-light);
    font-weight: 600;
    width: 180px;
    white-space: nowrap;
    vertical-align: top;
}

.detail-table td {
    color: var(--color-text);
}

.detail-table tr:nth-child(even) td {
    background-color: #fafbfc;
}

.detail-table tr:last-child th,
.detail-table tr:last-child td {
    border-bottom: none;
}

/* Fee table */
.fee-table {
    width: 100%;
    border-collapse: collapse;
    background-color: var(--color-bg-white);
    border-radius: var(--radius-md);
    overflow: hidden;
    box-shadow: var(--shadow-sm);
    border: 1px solid var(--color-border);
}

.fee-table thead th {
    background-color: var(--color-primary);
    color: #ffffff;
    padding: 14px 20px;
    font-size: 0.9rem;
    font-weight: 600;
    text-align: center;
}

.fee-table tbody td {
    padding: 14px 20px;
    text-align: center;
    font-size: 0.9rem;
    border-bottom: 1px solid var(--color-border);
}

.fee-table tbody tr:nth-child(even) td {
    background-color: #fafbfc;
}

.fee-table tbody tr:last-child td {
    border-bottom: none;
}

.fee-table .fee-highlight {
    font-weight: 700;
    color: var(--color-accent);
    font-size: 1.1rem;
}

/* ------------------------------------------------------------
   12. Forms
   ------------------------------------------------------------ */
.filter-form {
    background-color: var(--color-bg-white);
    border-radius: var(--radius-md);
    padding: 24px;
    box-shadow: var(--shadow-sm);
    border: 1px solid var(--color-border);
    margin-bottom: 30px;
}

.filter-form .form-row {
    display: flex;
    gap: 16px;
    align-items: flex-end;
    flex-wrap: wrap;
}

.filter-form .form-group {
    flex: 1;
    min-width: 160px;
}

.form-group {
    margin-bottom: 20px;
}

.form-group label {
    display: block;
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--color-text);
    margin-bottom: 6px;
}

.form-group .required {
    color: var(--color-danger);
    font-size: 0.75rem;
    margin-left: 4px;
}

input[type="text"],
input[type="email"],
input[type="tel"],
input[type="url"],
input[type="number"],
input[type="password"],
input[type="search"],
select,
textarea {
    width: 100%;
    padding: 10px 14px;
    font-size: 0.9rem;
    font-family: var(--font-family);
    color: var(--color-text);
    background-color: var(--color-bg-white);
    border: 1px solid var(--color-border);
    border-radius: var(--radius-sm);
    transition: border-color var(--transition), box-shadow var(--transition);
    appearance: none;
    -webkit-appearance: none;
}

input[type="text"]:focus,
input[type="email"]:focus,
input[type="tel"]:focus,
input[type="url"]:focus,
input[type="number"]:focus,
input[type="password"]:focus,
input[type="search"]:focus,
select:focus,
textarea:focus {
    outline: none;
    border-color: var(--color-primary-light);
    box-shadow: 0 0 0 3px rgba(26, 43, 74, 0.1);
}

select {
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath fill='%23666' d='M6 8L1 3h10z'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 12px center;
    padding-right: 36px;
}

textarea {
    resize: vertical;
    min-height: 120px;
}

input[type="text"]::placeholder,
input[type="email"]::placeholder,
input[type="search"]::placeholder,
textarea::placeholder {
    color: var(--color-text-muted);
}

/* Search box */
.search-box {
    position: relative;
}

.search-box input {
    padding-right: 44px;
}

.search-box button {
    position: absolute;
    right: 1px;
    top: 1px;
    bottom: 1px;
    width: 42px;
    background-color: var(--color-accent);
    border: none;
    border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
    color: #ffffff;
    cursor: pointer;
    font-size: 1rem;
    transition: background-color var(--transition);
}

.search-box button:hover {
    background-color: var(--color-accent-hover);
}

/* Checkbox & Radio */
.form-check {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 8px;
}

.form-check input[type="checkbox"],
.form-check input[type="radio"] {
    width: 18px;
    height: 18px;
    accent-color: var(--color-primary);
}

.form-check label {
    font-size: 0.9rem;
    margin-bottom: 0;
    cursor: pointer;
}

/* ------------------------------------------------------------
   13. Pagination
   ------------------------------------------------------------ */
.pagination {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 4px;
    margin-top: 40px;
    padding: 20px 0;
}

.pagination a,
.pagination span {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 40px;
    height: 40px;
    padding: 0 12px;
    font-size: 0.9rem;
    font-weight: 500;
    color: var(--color-text);
    background-color: var(--color-bg-white);
    border: 1px solid var(--color-border);
    border-radius: var(--radius-sm);
    transition: all var(--transition);
    text-decoration: none;
}

.pagination a:hover {
    background-color: var(--color-primary);
    color: #ffffff;
    border-color: var(--color-primary);
}

.pagination .current,
.pagination span.current {
    background-color: var(--color-primary);
    color: #ffffff;
    border-color: var(--color-primary);
    font-weight: 700;
}

.pagination .dots {
    border: none;
    background: none;
    color: var(--color-text-muted);
}

.pagination .prev,
.pagination .next {
    font-weight: 600;
}

/* ------------------------------------------------------------
   14. Page Header / Breadcrumb
   ------------------------------------------------------------ */
.page-header {
    background-color: var(--color-primary);
    color: #ffffff;
    padding: 40px 0;
    margin-top: 0;
}

.page-header h1 {
    color: #ffffff;
    font-size: 1.75rem;
    margin-bottom: 8px;
}

.page-header p {
    color: rgba(255, 255, 255, 0.7);
    font-size: 0.9rem;
    margin-bottom: 0;
}

.breadcrumb {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 0.8rem;
    color: var(--color-text-muted);
    padding: 12px 0;
}

.breadcrumb a {
    color: var(--color-text-muted);
}

.breadcrumb a:hover {
    color: var(--color-accent);
}

.breadcrumb span.separator {
    color: var(--color-border);
}

/* ------------------------------------------------------------
   15. Alerts / Messages
   ------------------------------------------------------------ */
.alert {
    padding: 14px 20px;
    border-radius: var(--radius-md);
    font-size: 0.9rem;
    margin-bottom: 20px;
    border: 1px solid;
}

.alert-success {
    background-color: rgba(39, 174, 96, 0.08);
    border-color: rgba(39, 174, 96, 0.2);
    color: #1e8449;
}

.alert-warning {
    background-color: rgba(243, 156, 18, 0.08);
    border-color: rgba(243, 156, 18, 0.2);
    color: #b7791f;
}

.alert-danger {
    background-color: rgba(231, 76, 60, 0.08);
    border-color: rgba(231, 76, 60, 0.2);
    color: #c0392b;
}

.alert-info {
    background-color: rgba(44, 62, 107, 0.06);
    border-color: rgba(44, 62, 107, 0.15);
    color: var(--color-primary);
}

/* ------------------------------------------------------------
   16. FAQ Accordion
   ------------------------------------------------------------ */
.faq-item {
    background-color: var(--color-bg-white);
    border: 1px solid var(--color-border);
    border-radius: var(--radius-md);
    margin-bottom: 12px;
    overflow: hidden;
}

.faq-question {
    display: flex;
    justify-content: space-between;
    align-items: center;
    width: 100%;
    padding: 18px 24px;
    background: none;
    border: none;
    font-family: var(--font-family);
    font-size: 0.95rem;
    font-weight: 600;
    color: var(--color-text);
    cursor: pointer;
    text-align: left;
    transition: background-color var(--transition);
}

.faq-question:hover {
    background-color: #fafbfc;
}

.faq-question::after {
    content: '+';
    font-size: 1.2rem;
    font-weight: 700;
    color: var(--color-text-muted);
    transition: transform var(--transition);
    flex-shrink: 0;
    margin-left: 16px;
}

.faq-question.active::after {
    content: '-';
}

.faq-answer {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.4s ease, padding 0.4s ease;
}

.faq-answer.open {
    max-height: 500px;
    padding: 0 24px 20px;
}

.faq-answer p {
    font-size: 0.9rem;
    color: var(--color-text-light);
    line-height: 1.8;
}

/* ------------------------------------------------------------
   17. Steps / Process Flow
   ------------------------------------------------------------ */
.steps {
    display: flex;
    justify-content: center;
    gap: 0;
    margin: 40px 0;
}

.step {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    flex: 1;
    position: relative;
    padding: 0 16px;
}

.step::after {
    content: '';
    position: absolute;
    top: 24px;
    right: -50%;
    width: 100%;
    height: 2px;
    background-color: var(--color-border);
    z-index: 0;
}

.step:last-child::after {
    display: none;
}

.step-number {
    width: 48px;
    height: 48px;
    border-radius: 50%;
    background-color: var(--color-primary);
    color: #ffffff;
    font-size: 1.1rem;
    font-weight: 700;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 16px;
    position: relative;
    z-index: 1;
}

.step-title {
    font-size: 0.95rem;
    font-weight: 700;
    margin-bottom: 6px;
    color: var(--color-text);
}

.step-desc {
    font-size: 0.8rem;
    color: var(--color-text-light);
    line-height: 1.6;
}

/* ------------------------------------------------------------
   18. Hero / CTA Sections
   ------------------------------------------------------------ */
.hero {
    background-color: var(--color-primary);
    color: #ffffff;
    padding: 80px 0;
    text-align: center;
}

.hero h1 {
    color: #ffffff;
    font-size: 2.2rem;
    margin-bottom: 16px;
}

.hero p {
    color: rgba(255, 255, 255, 0.8);
    font-size: 1.1rem;
    margin-bottom: 32px;
}

.hero-buttons {
    display: flex;
    gap: 16px;
    justify-content: center;
}

.cta-section {
    background-color: var(--color-primary-light);
    color: #ffffff;
    padding: 60px 0;
    text-align: center;
}

.cta-section h2 {
    color: #ffffff;
    margin-bottom: 16px;
}

.cta-section p {
    color: rgba(255, 255, 255, 0.8);
    margin-bottom: 24px;
}

/* Hero Section (front-page variant using .hero-section) */
.hero-section {
    background: linear-gradient(135deg, var(--color-primary) 0%, var(--color-primary-light) 100%);
    color: #ffffff;
    padding: 80px 0;
    text-align: center;
}

.hero-section h1 {
    color: #ffffff;
    font-size: 2.4rem;
    margin-bottom: 16px;
    letter-spacing: 1px;
}

.hero-subtitle {
    color: rgba(255, 255, 255, 0.8);
    font-size: 1.15rem;
    margin-bottom: 36px;
}

/* Counter / Stats Section */
.counter-section {
    padding: 50px 0;
    background-color: var(--color-bg-white);
    border-bottom: 1px solid var(--color-border);
}

.counter-grid {
    display: flex;
    justify-content: center;
    gap: 60px;
}

.counter-item {
    text-align: center;
}

.counter-number {
    font-size: 2.5rem;
    font-weight: 800;
    color: var(--color-accent);
    line-height: 1.2;
}

.counter-label {
    font-size: 0.9rem;
    color: var(--color-text-light);
    font-weight: 600;
    margin-top: 4px;
}

/* Category Section */
.category-section {
    background-color: var(--color-bg);
}

.category-grid {
    display: grid;
    gap: 16px;
}

.category-card {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 16px 20px;
    background-color: var(--color-bg-white);
    border: 1px solid var(--color-border);
    border-radius: var(--radius-md);
    transition: all var(--transition);
    text-decoration: none;
    color: var(--color-text);
}

.category-card:hover {
    box-shadow: var(--shadow-md);
    transform: translateY(-2px);
    border-color: var(--color-accent);
    color: var(--color-accent);
}

.category-name {
    font-size: 0.95rem;
    font-weight: 600;
}

.category-count {
    font-size: 0.8rem;
    color: var(--color-text-muted);
    background-color: var(--color-bg);
    padding: 2px 10px;
    border-radius: 20px;
    font-weight: 500;
}

/* Prefecture Tags */
.prefecture-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.prefecture-tag {
    display: inline-block;
    padding: 6px 16px;
    background-color: var(--color-bg-white);
    border: 1px solid var(--color-border);
    border-radius: 20px;
    font-size: 0.85rem;
    color: var(--color-text);
    text-decoration: none;
    transition: all var(--transition);
}

.prefecture-tag:hover {
    background-color: var(--color-primary);
    color: #ffffff;
    border-color: var(--color-primary);
}

/* Steps Section */
.steps-section {
    background-color: var(--color-bg-white);
}

/* FAQ Section */
.faq-section {
    background-color: var(--color-bg);
}

/* News Section (front-page) */
.news-section {
    background-color: var(--color-bg-white);
}

/* CTA Buttons & Phone */
.cta-buttons {
    display: flex;
    gap: 16px;
    justify-content: center;
    margin-bottom: 16px;
}

.cta-phone {
    font-size: 0.9rem;
    color: rgba(255, 255, 255, 0.6);
    margin-bottom: 0;
}

/* More Link */
.more-link {
    text-align: center;
    margin-top: 32px;
}

.more-link a {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-size: 0.95rem;
    font-weight: 600;
    color: var(--color-primary);
    transition: color var(--transition);
}

.more-link a:hover {
    color: var(--color-accent);
}

.more-link a::after {
    content: '\2192';
}

/* Needs card info row */
.needs-card-info {
    display: flex;
    flex-direction: column;
    gap: 6px;
    margin-top: 12px;
}

.needs-card-info-item {
    display: flex;
    font-size: 0.85rem;
    gap: 8px;
}

.needs-card-info-item dt {
    color: var(--color-text-muted);
    font-weight: 500;
    white-space: nowrap;
    min-width: 90px;
}

.needs-card-info-item dd {
    color: var(--color-text);
}

.needs-card-date {
    font-size: 0.8rem;
    color: var(--color-text-muted);
    margin-top: 12px;
    padding-top: 12px;
    border-top: 1px solid var(--color-border);
}

/* Responsive additions for front page */
@media (max-width: 767px) {
    .hero-section {
        padding: 50px 0;
    }

    .hero-section h1 {
        font-size: 1.6rem;
    }

    .hero-subtitle {
        font-size: 0.95rem;
    }

    .counter-grid {
        flex-direction: column;
        gap: 24px;
        align-items: center;
    }

    .counter-number {
        font-size: 2rem;
    }

    .cta-buttons {
        flex-direction: column;
        align-items: center;
        gap: 12px;
    }

    .cta-buttons .btn {
        width: 100%;
        max-width: 300px;
    }

    .prefecture-tags {
        justify-content: center;
    }
}

/* ------------------------------------------------------------
   19. Detail Page
   ------------------------------------------------------------ */
.detail-content {
    display: grid;
    grid-template-columns: 1fr 340px;
    gap: 30px;
    align-items: start;
}

.detail-main {
    min-width: 0;
}

.detail-sidebar {
    position: sticky;
    top: calc(var(--header-height) + 20px);
}

.sidebar-card {
    background-color: var(--color-bg-white);
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-sm);
    border: 1px solid var(--color-border);
    padding: 24px;
    margin-bottom: 20px;
}

.sidebar-card h3 {
    font-size: 1rem;
    margin-bottom: 16px;
    padding-bottom: 12px;
    border-bottom: 2px solid var(--color-border);
}

.detail-section {
    background-color: var(--color-bg-white);
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-sm);
    border: 1px solid var(--color-border);
    padding: 30px;
    margin-bottom: 24px;
}

.detail-section h2 {
    font-size: 1.25rem;
    margin-bottom: 20px;
    padding-bottom: 12px;
    border-bottom: 2px solid var(--color-primary);
}

/* ------------------------------------------------------------
   20. News / Article List
   ------------------------------------------------------------ */
.news-list {
    list-style: none;
}

.news-item {
    display: flex;
    align-items: center;
    gap: 16px;
    padding: 16px 0;
    border-bottom: 1px solid var(--color-border);
}

.news-item:last-child {
    border-bottom: none;
}

.news-date {
    font-size: 0.8rem;
    color: var(--color-text-muted);
    white-space: nowrap;
    min-width: 90px;
}

.news-category {
    display: inline-block;
    padding: 2px 10px;
    font-size: 0.7rem;
    font-weight: 600;
    background-color: var(--color-primary);
    color: #ffffff;
    border-radius: 3px;
    white-space: nowrap;
}

.news-title {
    font-size: 0.9rem;
    color: var(--color-text);
}

.news-title:hover {
    color: var(--color-accent);
}

/* Article detail */
.article-content {
    background-color: var(--color-bg-white);
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-sm);
    border: 1px solid var(--color-border);
    padding: 40px;
    line-height: 2;
}

.article-content h2 {
    font-size: 1.4rem;
    margin-top: 40px;
    margin-bottom: 16px;
    padding-bottom: 8px;
    border-bottom: 2px solid var(--color-border);
}

.article-content h3 {
    font-size: 1.2rem;
    margin-top: 32px;
    margin-bottom: 12px;
}

.article-content p {
    margin-bottom: 1.5em;
}

.article-content ul,
.article-content ol {
    margin-bottom: 1.5em;
    padding-left: 24px;
}

.article-content ul {
    list-style: disc;
}

.article-content ol {
    list-style: decimal;
}

.article-content li {
    margin-bottom: 8px;
}

/* ------------------------------------------------------------
   21. Archive Layout (sidebar + main)
   ------------------------------------------------------------ */
.archive-layout {
    display: grid;
    grid-template-columns: 280px 1fr;
    gap: 32px;
    padding-top: 40px;
    padding-bottom: 60px;
}

.archive-sidebar {
    align-self: start;
    position: sticky;
    top: calc(var(--header-height) + 20px);
}

.archive-main {
    min-width: 0;
}

.pagination-wrap {
    margin-top: 40px;
}

/* ------------------------------------------------------------
   22. Utility Classes
   ------------------------------------------------------------ */
.mt-0 { margin-top: 0; }
.mt-1 { margin-top: 8px; }
.mt-2 { margin-top: 16px; }
.mt-3 { margin-top: 24px; }
.mt-4 { margin-top: 32px; }
.mt-5 { margin-top: 40px; }

.mb-0 { margin-bottom: 0; }
.mb-1 { margin-bottom: 8px; }
.mb-2 { margin-bottom: 16px; }
.mb-3 { margin-bottom: 24px; }
.mb-4 { margin-bottom: 32px; }
.mb-5 { margin-bottom: 40px; }

.pt-0 { padding-top: 0; }
.pt-3 { padding-top: 24px; }
.pb-0 { padding-bottom: 0; }
.pb-3 { padding-bottom: 24px; }

.hidden { display: none !important; }
.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    border: 0;
}

/* ------------------------------------------------------------
   22. Responsive - Tablet (768px - 1024px)
   ------------------------------------------------------------ */
@media (max-width: 1024px) {
    .grid-4 {
        grid-template-columns: repeat(2, 1fr);
    }

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

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

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

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

    .detail-content {
        grid-template-columns: 1fr 280px;
        gap: 20px;
    }

    .steps {
        flex-wrap: wrap;
        gap: 24px;
    }

    .step::after {
        display: none;
    }

    .step {
        width: 45%;
    }

    .hero h1 {
        font-size: 1.8rem;
    }

    .header-nav {
        display: none;
    }

    .hamburger {
        display: flex;
    }
}

/* ------------------------------------------------------------
   23. Responsive - Mobile (below 768px)
   ------------------------------------------------------------ */
@media (max-width: 767px) {
    :root {
        --header-height: 60px;
    }

    body {
        font-size: 0.95rem;
    }

    h1 { font-size: 1.5rem; }
    h2 { font-size: 1.35rem; }
    h3 { font-size: 1.2rem; }

    .container {
        padding: 0 16px;
    }

    .site-main {
        padding: 24px 0;
    }

    .section {
        padding: 40px 0;
    }

    .section-title {
        font-size: 1.4rem;
        margin-bottom: 24px;
    }

    /* Header mobile */
    .header-logo .logo-text {
        font-size: 1.2rem;
    }

    .header-logo .logo-sub {
        font-size: 0.55rem;
    }

    .header-nav {
        display: none;
    }

    .header-auth {
        display: none;
    }

    .hamburger {
        display: flex;
    }

    /* Grid stacking */
    .grid-2,
    .grid-3,
    .grid-4 {
        grid-template-columns: 1fr;
    }

    .listing-grid {
        grid-template-columns: 1fr;
        gap: 16px;
    }

    /* Footer mobile */
    .footer-grid {
        grid-template-columns: 1fr;
        gap: 24px;
    }

    .site-footer {
        padding: 40px 0 0;
        margin-top: 40px;
    }

    /* Archive layout mobile */
    .archive-layout {
        grid-template-columns: 1fr;
        gap: 24px;
        padding-top: 24px;
        padding-bottom: 40px;
    }

    .archive-sidebar {
        position: static;
    }

    /* Detail page mobile */
    .detail-content {
        grid-template-columns: 1fr;
    }

    .detail-sidebar {
        position: static;
    }

    .detail-section {
        padding: 20px;
    }

    /* Table responsive */
    .detail-table th,
    .detail-table td {
        padding: 10px 14px;
        font-size: 0.85rem;
    }

    .detail-table th {
        width: 120px;
    }

    .fee-table {
        display: block;
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
    }

    /* Filter form mobile */
    .filter-form .form-row {
        flex-direction: column;
        gap: 12px;
    }

    .filter-form .form-group {
        min-width: 100%;
    }

    /* Steps mobile */
    .steps {
        flex-direction: column;
        gap: 20px;
    }

    .step {
        width: 100%;
        flex-direction: row;
        text-align: left;
        gap: 16px;
    }

    .step::after {
        display: none;
    }

    .step-number {
        flex-shrink: 0;
        width: 40px;
        height: 40px;
        font-size: 0.95rem;
    }

    /* Hero mobile */
    .hero {
        padding: 50px 0;
    }

    .hero h1 {
        font-size: 1.5rem;
    }

    .hero p {
        font-size: 0.95rem;
    }

    .hero-buttons {
        flex-direction: column;
        align-items: center;
        gap: 12px;
    }

    .hero-buttons .btn {
        width: 100%;
        max-width: 300px;
    }

    /* Page header mobile */
    .page-header {
        padding: 28px 0;
    }

    .page-header h1 {
        font-size: 1.4rem;
    }

    /* News mobile */
    .news-item {
        flex-wrap: wrap;
        gap: 8px;
    }

    /* Article mobile */
    .article-content {
        padding: 24px;
    }

    /* Pagination mobile */
    .pagination {
        gap: 2px;
    }

    .pagination a,
    .pagination span {
        min-width: 36px;
        height: 36px;
        font-size: 0.8rem;
    }

    /* Buttons mobile */
    .btn-lg {
        padding: 12px 28px;
        font-size: 0.95rem;
    }

    /* CTA mobile */
    .cta-section {
        padding: 40px 0;
    }

    /* Mobile menu width */
    .mobile-menu {
        width: 280px;
    }
}

/* ------------------------------------------------------------
   24. Print Styles
   ------------------------------------------------------------ */
@media print {
    .site-header,
    .site-footer,
    .mobile-menu,
    .hamburger,
    .header-auth,
    .pagination,
    .filter-form {
        display: none !important;
    }

    body {
        padding-top: 0;
        background-color: #ffffff;
        color: #000000;
    }

    .site-main {
        padding: 0;
    }

    .listing-card,
    .detail-section,
    .sidebar-card {
        box-shadow: none;
        border: 1px solid #ccc;
    }
}
