@import url('/css/variables.css');

/* ============================================================
   Smartmart ロボット法務情報・弁護士広告メディア — Layout
   Prefix: rlg-（robot-inspection.css の rin- 構造を踏襲・改名）
   ============================================================ */

/* ─── Container ─────────────────────────────────────── */
.rlg-hero {
    background: linear-gradient(135deg, #f5f7fa 0%, #c3cfe2 100%);
    padding: 60px 0;
}

.rlg-section {
    padding: 24px 0 80px;
}

.rlg-container {
    max-width: 1140px;
    margin: 0 auto;
    padding: 0 20px;
}

/* ─── 2カラム Layout ─────────────────────────────────── */
.rlg-layout {
    display: grid;
    grid-template-columns: 1fr 340px;
    gap: 32px;
}

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

/* ─── Hero ────────────────────────────────────────────── */
.rlg-hero-inner {
    display: grid;
    grid-template-columns: 1fr auto;
    gap: 48px;
    align-items: center;
}

.rlg-hero-badges {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
    margin-bottom: 12px;
}

.rlg-badge {
    display: inline-block;
    padding: 4px 12px;
    border-radius: 4px;
    font-size: 12px;
    font-weight: 600;
    line-height: 1.4;
}

.rlg-badge--warning { background: #f59e0b; color: #fff; }
.rlg-badge--primary { background: var(--primary-color); color: #fff; }
.rlg-badge--danger { background: #ef4444; color: #fff; }
.rlg-badge--success { background: var(--success-color); color: #fff; }
.rlg-badge--info { background: var(--info-color); color: #fff; }

.rlg-hero-title {
    font-size: 2rem;
    font-weight: 700;
    line-height: 1.3;
    margin-bottom: 12px;
    color: var(--text-primary);
}

.rlg-hero-title small {
    font-size: 1.2rem;
    font-weight: 500;
    display: block;
    margin-top: 4px;
}

.rlg-hero-lead {
    font-size: 16px;
    line-height: 1.7;
    color: var(--text-secondary);
    margin-bottom: 20px;
}

.rlg-hero-actions {
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
    margin-bottom: 24px;
}

.rlg-hero-img { max-width: 100%; display: block; }

/* ─── Stats ───────────────────────────────────────────── */
.rlg-stats {
    display: flex;
    gap: 32px;
    flex-wrap: wrap;
}

.rlg-stat { text-align: center; }

.rlg-stat-number {
    font-size: 2rem;
    font-weight: 700;
    color: var(--primary-color);
    line-height: 1.2;
}

.rlg-stat-label {
    font-size: 12px;
    color: var(--text-secondary);
    margin-top: 2px;
}

/* ─── Buttons ─────────────────────────────────────────── */
.rlg-btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 12px 24px;
    border-radius: var(--radius-md);
    font-size: 15px;
    font-weight: 600;
    text-decoration: none;
    cursor: pointer;
    border: 2px solid transparent;
    transition: all 0.2s;
    line-height: 1;
}

.rlg-btn--lg { padding: 14px 28px; font-size: 16px; }
.rlg-btn--sm { padding: 8px 16px; font-size: 13px; }

.rlg-btn--primary {
    background: var(--primary-color);
    color: #fff;
    border-color: var(--primary-color);
}
.rlg-btn--primary:hover {
    background: var(--primary-dark);
    border-color: var(--primary-dark);
    color: #fff;
}

.rlg-btn--warning {
    background: #f59e0b;
    color: #fff;
    border-color: #f59e0b;
}
.rlg-btn--warning:hover {
    background: #d97706;
    border-color: #d97706;
    color: #fff;
}

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

.rlg-btn--outline-light {
    background: transparent;
    color: #fff;
    border-color: rgba(255,255,255,0.7);
}
.rlg-btn--outline-light:hover {
    background: rgba(255,255,255,0.15);
    color: #fff;
}

/* ─── Article Typography ──────────────────────────────── */
.rlg-article {
    font-size: 16px;
    line-height: 1.8;
    color: var(--text-primary);
}

.rlg-article h2 {
    font-size: 1.4rem;
    font-weight: 700;
    margin-top: 2.5rem;
    margin-bottom: 1.2rem;
    padding-bottom: 0.5rem;
    border-bottom: 2px solid var(--primary-color);
    color: var(--text-primary);
}

.rlg-article h2:first-child { margin-top: 0; }

.rlg-article h3 {
    font-size: 1.15rem;
    font-weight: 600;
    margin-top: 1.8rem;
    margin-bottom: 0.8rem;
    color: var(--primary-color);
}

.rlg-article h4 {
    font-size: 1rem;
    font-weight: 600;
    margin-top: 1.2rem;
    margin-bottom: 0.6rem;
    color: var(--text-primary);
}

/* ─── TOC ─────────────────────────────────────────────── */
.rlg-toc {
    background: linear-gradient(135deg, var(--bg-secondary) 0%, #e9ecef 100%);
    border-radius: var(--radius-md);
    padding: 24px;
    margin-bottom: 40px;
}

.rlg-toc-title {
    font-size: 1rem;
    font-weight: 700;
    margin-bottom: 12px;
    color: var(--text-primary);
}

.rlg-toc-list { list-style: none; margin: 0; padding: 0; }
.rlg-toc-list li { margin-bottom: 6px; }

.rlg-toc-list a {
    color: var(--primary-color);
    text-decoration: none;
    font-size: 14px;
    transition: color 0.2s;
}
.rlg-toc-list a:hover { text-decoration: underline; }

/* ─── Info Boxes ──────────────────────────────────────── */
.rlg-infobox {
    padding: 20px;
    border-radius: var(--radius-md);
    margin-bottom: 20px;
}

.rlg-infobox--primary,
.rlg-infobox--success,
.rlg-infobox--warning,
.rlg-infobox--danger,
.rlg-infobox--info {
    background: #eff6ff;
    color: #1e40af;
}

.rlg-infobox--secondary {
    background: var(--bg-secondary);
    color: var(--text-secondary);
}

.rlg-infobox p:last-child,
.rlg-infobox ul:last-child { margin-bottom: 0; }

.rlg-infobox h3,
.rlg-infobox h4 { margin-top: 0; }

/* ─── Cards ───────────────────────────────────────────── */
.rlg-card {
    background: #fff;
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-sm);
    border: 1px solid var(--border-light);
    overflow: hidden;
}

.rlg-card-body { padding: 20px; }

.rlg-card--hover {
    transition: box-shadow 0.2s;
    cursor: pointer;
}
.rlg-card--hover:hover {
    box-shadow: inset 0 0 0 1px var(--border-color, #ddd);
}

.rlg-card--link {
    text-decoration: none;
    display: block;
    color: inherit;
}
.rlg-card--link:hover { color: inherit; }

/* ─── Grids ───────────────────────────────────────────── */
.rlg-grid-2 {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 20px;
}
.rlg-grid-3 {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 20px;
}
.rlg-grid-4 {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 16px;
}

/* ─── Tables ──────────────────────────────────────────── */
.rlg-table-wrap {
    overflow-x: auto;
    margin-bottom: 20px;
    border-radius: var(--radius-md);
    border: 1px solid var(--border-color);
}

.rlg-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 14px;
}

.rlg-table th {
    background: var(--text-primary);
    color: #fff;
    font-weight: 600;
    padding: 12px 16px;
    text-align: center;
    white-space: nowrap;
}
.rlg-table th:first-child { text-align: left; }

.rlg-table td {
    padding: 11px 16px;
    border-bottom: 1px solid var(--border-light);
    vertical-align: middle;
}
.rlg-table tbody tr:last-child td { border-bottom: none; }
.rlg-table tbody tr:hover { background: var(--bg-secondary); }
.rlg-table td:first-child { font-weight: 500; }

.rlg-table--highlight tbody tr:last-child td {
    background: #eff6ff;
    font-weight: 700;
    color: var(--primary-color);
}

.rlg-table--sm td,
.rlg-table--sm th { padding: 8px 12px; }

.rlg-price-highlight {
    font-size: 1.1em;
    font-weight: 700;
    color: var(--primary-color);
}

.rlg-text-success { color: var(--success-color); }
.rlg-text-danger { color: var(--error-color); }
.rlg-text-warning { color: var(--warning-color); }
.rlg-text-center { text-align: center; }
.rlg-text-muted { color: var(--text-secondary); font-size: 12px; }

/* ─── FAQ ─────────────────────────────────────────────── */
.rlg-faq-item {
    margin-bottom: 20px;
    padding-bottom: 20px;
    border-bottom: 1px solid var(--border-light);
}
.rlg-faq-item:last-child {
    border-bottom: none;
    margin-bottom: 0;
    padding-bottom: 0;
}

.rlg-faq-question {
    font-weight: 600;
    color: var(--primary-color);
    margin-bottom: 8px;
    font-size: 15px;
}

.rlg-faq-answer {
    padding-left: 20px;
    color: var(--text-primary);
    font-size: 14px;
    line-height: 1.7;
}
.rlg-faq-answer p:last-child { margin-bottom: 0; }

/* ─── Guide cards ─────────────────────────────────────── */
.rlg-guide-card-body {
    text-align: center;
    padding: 20px 16px;
}

.rlg-guide-card-icon {
    font-size: 2rem;
    margin-bottom: 10px;
    display: block;
}

.rlg-guide-card-name {
    font-weight: 600;
    font-size: 14px;
    margin-bottom: 4px;
    color: var(--text-primary);
}

/* ─── CTA Block ───────────────────────────────────────── */
.rlg-cta-final {
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--primary-dark) 100%);
    border-radius: var(--radius-lg);
    padding: 48px 32px;
    text-align: center;
    color: #fff;
    margin-bottom: 24px;
}

.rlg-cta-final h3 {
    font-size: 1.4rem;
    font-weight: 700;
    margin-bottom: 8px;
    color: #fff;
}

.rlg-cta-final p {
    font-size: 15px;
    opacity: 0.9;
    margin-bottom: 24px;
}

.rlg-cta-actions {
    display: flex;
    gap: 12px;
    justify-content: center;
    flex-wrap: wrap;
    margin-bottom: 12px;
}

.rlg-cta-note {
    font-size: 13px;
    opacity: 0.75;
    margin-bottom: 0;
}

/* ─── Section wrapper ─────────────────────────────────── */
.rlg-content-section { margin-bottom: 48px; }

/* ─── Icon colors（法務は青系で統一） ─────────────────── */
.rlg-icon--primary,
.rlg-icon--success,
.rlg-icon--warning,
.rlg-icon--danger,
.rlg-icon--info,
.rlg-icon--dark { color: var(--primary-color); }

/* ─── Sidebar ─────────────────────────────────────────── */
.rlg-sidebar { min-width: 0; }

.rlg-sidebar-sticky {
    position: -webkit-sticky;
    position: sticky;
    top: 120px;
}

.rlg-sidebar-card {
    background: #fff;
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-sm);
    border: 1px solid var(--border-light);
    margin-bottom: 20px;
    overflow: hidden;
}

.rlg-sidebar-card-header {
    padding: 14px 18px;
    background: var(--bg-secondary);
    border-bottom: 1px solid var(--border-light);
    font-size: 14px;
    font-weight: 700;
    color: var(--text-primary);
}

.rlg-sidebar-card-body { padding: 16px 18px; }

.rlg-sidebar-card--primary {
    background: var(--primary-color);
    border-color: var(--primary-color);
}
.rlg-sidebar-card--primary .rlg-sidebar-card-body {
    text-align: center;
    color: #fff;
    padding: 24px 18px;
}
.rlg-sidebar-card--primary h2 {
    font-size: 1.1rem;
    font-weight: 700;
    color: #fff;
    margin-bottom: 8px;
}
.rlg-sidebar-card--primary p {
    font-size: 13px;
    opacity: 0.9;
    margin-bottom: 0;
}

/* ─── Link List ───────────────────────────────────────── */
.rlg-link-list { list-style: none; margin: 0; padding: 0; }
.rlg-link-list-item { border-bottom: 1px solid var(--border-light); }
.rlg-link-list-item:last-child { border-bottom: none; }

.rlg-link-list-item a {
    display: block;
    padding: 11px 0;
    color: var(--text-primary);
    text-decoration: none;
    font-size: 13px;
    transition: color 0.2s;
}
.rlg-link-list-item a:hover { color: var(--primary-color); }

/* ─── 広告掲載枠（情報メディアへの広告・非弁72条配慮） ─── */
.rlg-ad-label {
    display: inline-block;
    padding: 2px 8px;
    border-radius: 3px;
    background: var(--bg-secondary);
    color: var(--text-secondary);
    font-size: 11px;
    font-weight: 600;
    letter-spacing: 0.04em;
    margin-bottom: 8px;
}

.rlg-ad-slot {
    border: 1px dashed var(--border-color);
    border-radius: var(--radius-md);
    padding: 24px;
    text-align: center;
    color: var(--text-secondary);
    background: #fafbfc;
}

/* ─── Utility ─────────────────────────────────────────── */
.rlg-mb-0  { margin-bottom: 0; }
.rlg-mb-sm { margin-bottom: 8px; }
.rlg-mb-md { margin-bottom: 12px; }
.rlg-mb-lg { margin-bottom: 16px; }
.rlg-mb-xl { margin-bottom: 20px; }
.rlg-mb-2xl { margin-bottom: 24px; }
.rlg-mt-md { margin-top: 16px; }
.rlg-card--spaced { margin-bottom: 16px; }

/* ─── Source note（出典明記用） ───────────────────────── */
.rlg-source {
    font-size: 11px;
    color: var(--text-secondary);
    margin-top: 6px;
    line-height: 1.5;
}
.rlg-source a { color: var(--primary-color); }

/* ─── Responsive ──────────────────────────────────────── */
@media (max-width: 991px) {
    .rlg-layout { grid-template-columns: 1fr; }
    .rlg-sidebar-sticky { position: relative; top: 0; }
    .rlg-hero-inner { grid-template-columns: 1fr; }
    .rlg-hero-img-wrap { display: none; }
    .rlg-grid-4 { grid-template-columns: repeat(2, 1fr); }
    .rlg-grid-3 { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 767px) {
    .rlg-hero { padding: 40px 0; }
    .rlg-hero-title { font-size: 1.5rem; }
    .rlg-grid-2 { grid-template-columns: 1fr; }
    .rlg-grid-3 { grid-template-columns: 1fr; }
    .rlg-grid-4 { grid-template-columns: repeat(2, 1fr); }
    .rlg-cta-final { padding: 32px 20px; }
    .rlg-stats { gap: 20px; }
}
