/*
Theme Name: Factoring Portal
Theme URI: https://fc-marke.co.jp
Description: ファクタリング情報ポータルサイト用テーマ
Version: 1.0
Author: FC Marketing
*/

/* Reset & Base Styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
    font-size: 16px;
    line-height: 1.6;
    color: #333;
    background: #f8f9fa;
}

a {
    color: #2563eb;
    text-decoration: none;
}

a:hover {
    text-decoration: underline;
}

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

/* Container */
.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

.container-wide {
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 20px;
}

/* Header */
.site-header {
    background: #fff;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
    position: sticky;
    top: 0;
    z-index: 100;
}

.header-inner {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 15px 0;
}

.site-logo {
    font-size: 24px;
    font-weight: bold;
    color: #1e40af;
}

.site-logo:hover {
    text-decoration: none;
}

/* Navigation */
.main-nav ul {
    display: flex;
    list-style: none;
    gap: 30px;
}

.main-nav a {
    color: #333;
    font-weight: 500;
    padding: 10px 0;
    display: block;
}

.main-nav a:hover {
    color: #2563eb;
    text-decoration: none;
}

/* Hero Section */
.hero-section {
    background: linear-gradient(135deg, #1e40af 0%, #3b82f6 100%);
    color: #fff;
    padding: 60px 0;
    text-align: center;
}

.hero-section h1 {
    font-size: 42px;
    margin-bottom: 20px;
}

.hero-section p {
    font-size: 18px;
    opacity: 0.9;
    margin-bottom: 30px;
}

.hero-stats {
    display: flex;
    justify-content: center;
    gap: 50px;
    margin-top: 40px;
}

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

.stat-number {
    font-size: 36px;
    font-weight: bold;
    display: block;
}

.stat-label {
    font-size: 14px;
    opacity: 0.8;
}

/* Search Box */
.search-box {
    background: #fff;
    border-radius: 8px;
    padding: 30px;
    box-shadow: 0 4px 6px rgba(0,0,0,0.1);
    margin: -30px auto 40px;
    max-width: 800px;
}

.search-form {
    display: flex;
    gap: 10px;
}

.search-form input {
    flex: 1;
    padding: 12px 20px;
    border: 2px solid #e5e7eb;
    border-radius: 6px;
    font-size: 16px;
}

.search-form button {
    padding: 12px 30px;
    background: #2563eb;
    color: #fff;
    border: none;
    border-radius: 6px;
    font-size: 16px;
    font-weight: 500;
    cursor: pointer;
}

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

/* Content Area */
.content-area {
    padding: 40px 0;
}

.section-title {
    font-size: 28px;
    margin-bottom: 30px;
    padding-bottom: 15px;
    border-bottom: 3px solid #2563eb;
}

/* Company Grid */
.company-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 25px;
    margin-bottom: 40px;
}

.company-card {
    background: #fff;
    border-radius: 8px;
    padding: 25px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
    transition: transform 0.2s, box-shadow 0.2s;
}

.company-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 4px 12px rgba(0,0,0,0.15);
}

.company-name {
    font-size: 20px;
    font-weight: bold;
    margin-bottom: 15px;
    color: #1e40af;
}

.company-meta {
    display: flex;
    flex-direction: column;
    gap: 10px;
    margin-bottom: 15px;
}

.meta-item {
    display: flex;
    justify-content: space-between;
    padding: 8px 0;
    border-bottom: 1px solid #f3f4f6;
}

.meta-label {
    color: #6b7280;
    font-size: 14px;
}

.meta-value {
    font-weight: 500;
    color: #333;
}

.company-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 15px;
}

.tag {
    background: #eff6ff;
    color: #1e40af;
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 13px;
}

.cta-button {
    display: block;
    width: 100%;
    padding: 12px;
    background: #2563eb;
    color: #fff;
    text-align: center;
    border-radius: 6px;
    font-weight: 500;
    transition: background 0.2s;
}

.cta-button:hover {
    background: #1e40af;
    text-decoration: none;
}

/* Comparison Table */
.comparison-table {
    background: #fff;
    border-radius: 8px;
    padding: 30px;
    overflow-x: auto;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.comparison-table table {
    width: 100%;
    border-collapse: collapse;
}

.comparison-table th {
    background: #f3f4f6;
    padding: 15px;
    text-align: left;
    font-weight: 600;
    border-bottom: 2px solid #e5e7eb;
}

.comparison-table td {
    padding: 15px;
    border-bottom: 1px solid #f3f4f6;
}

.comparison-table tr:hover {
    background: #f9fafb;
}

/* Rating */
.rating {
    color: #fbbf24;
    font-size: 18px;
}

/* Sidebar */
.sidebar {
    background: #fff;
    border-radius: 8px;
    padding: 25px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.sidebar-title {
    font-size: 20px;
    font-weight: bold;
    margin-bottom: 20px;
    padding-bottom: 10px;
    border-bottom: 2px solid #e5e7eb;
}

.sidebar ul {
    list-style: none;
}

.sidebar li {
    padding: 10px 0;
    border-bottom: 1px solid #f3f4f6;
}

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

/* Content Layout */
.content-layout {
    display: grid;
    grid-template-columns: 1fr 300px;
    gap: 30px;
    margin-bottom: 40px;
}

/* Article Content */
.article-content {
    background: #fff;
    border-radius: 8px;
    padding: 40px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.article-content h2 {
    font-size: 26px;
    margin: 30px 0 15px;
    color: #1e40af;
}

.article-content h3 {
    font-size: 22px;
    margin: 25px 0 12px;
    color: #1e40af;
}

.article-content p {
    margin-bottom: 15px;
    line-height: 1.8;
}

.article-content ul, .article-content ol {
    margin: 15px 0 15px 30px;
}

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

/* Footer */
.site-footer {
    background: #1f2937;
    color: #fff;
    padding: 40px 0 20px;
    margin-top: 60px;
}

.footer-content {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 30px;
    margin-bottom: 30px;
}

.footer-section h3 {
    margin-bottom: 15px;
    color: #fff;
}

.footer-section ul {
    list-style: none;
}

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

.footer-section a {
    color: #d1d5db;
}

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

.footer-bottom {
    text-align: center;
    padding-top: 20px;
    border-top: 1px solid #374151;
    color: #9ca3af;
}

/* Simulator */
.simulator-box {
    background: #fff;
    border-radius: 8px;
    padding: 30px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
    margin-bottom: 30px;
}

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

.form-group label {
    display: block;
    margin-bottom: 8px;
    font-weight: 500;
}

.form-group input,
.form-group select {
    width: 100%;
    padding: 12px;
    border: 2px solid #e5e7eb;
    border-radius: 6px;
    font-size: 16px;
}

.result-box {
    background: #eff6ff;
    border: 2px solid #2563eb;
    border-radius: 8px;
    padding: 25px;
    margin-top: 20px;
}

.result-item {
    display: flex;
    justify-content: space-between;
    padding: 10px 0;
    border-bottom: 1px solid #bfdbfe;
}

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

.result-label {
    font-weight: 500;
}

.result-value {
    font-size: 20px;
    font-weight: bold;
    color: #1e40af;
}

/* Responsive */
@media (max-width: 768px) {
    .header-inner {
        flex-direction: row;
        justify-content: space-between;
        align-items: center;
    }
    
    /* ハンバーガーメニュー */
    .hamburger {
        display: flex;
        flex-direction: column;
        justify-content: space-around;
        width: 30px;
        height: 24px;
        background: transparent;
        border: none;
        cursor: pointer;
        padding: 0;
        z-index: 1001;
    }
    
    .hamburger span {
        width: 100%;
        height: 3px;
        background: #333;
        border-radius: 2px;
        transition: all 0.3s ease;
    }
    
    .hamburger.active span:nth-child(1) {
        transform: translateY(10.5px) rotate(45deg);
    }
    
    .hamburger.active span:nth-child(2) {
        opacity: 0;
    }
    
    .hamburger.active span:nth-child(3) {
        transform: translateY(-10.5px) rotate(-45deg);
    }
    
    /* ナビゲーション */
    .main-nav {
        position: fixed;
        top: 0;
        right: -100%;
        width: 80%;
        max-width: 300px;
        height: 100vh;
        background: #fff;
        box-shadow: -2px 0 10px rgba(0,0,0,0.1);
        transition: right 0.3s ease;
        z-index: 1000;
        padding: 80px 20px 20px;
        overflow-y: auto;
    }
    
    .main-nav.active {
        right: 0;
    }
    
    .main-nav ul {
        flex-direction: column;
        gap: 0;
    }
    
    .main-nav li {
        border-bottom: 1px solid #f3f4f6;
    }
    
    .main-nav a {
        padding: 15px 10px;
        display: block;
    }
    
    /* メニュー開いている時のオーバーレイ */
    body.menu-open::before {
        content: '';
        position: fixed;
        top: 0;
        left: 0;
        width: 100%;
        height: 100%;
        background: rgba(0,0,0,0.5);
        z-index: 999;
    }
    
    body.menu-open {
        overflow: hidden;
    }
    
    .hero-section h1 {
        font-size: 32px;
    }
    
    .hero-stats {
        flex-direction: column;
        gap: 20px;
    }
    
    .content-layout {
        grid-template-columns: 1fr;
    }
    
    .company-grid {
        grid-template-columns: 1fr;
    }
    
    .search-form {
        flex-direction: column;
    }
    
    .article-content {
        padding: 20px;
    }
    
    .footer-content {
        grid-template-columns: 1fr;
    }
}

/* PCではハンバーガーメニューを非表示 */
@media (min-width: 769px) {
    .hamburger {
        display: none;
    }
}
