/* ==========================================================================
   Variables
   ========================================================================== */
:root {
    /* Colors */
    --color-primary: #000;
    --color-secondary: #333;
    --color-white: #fff;
    --color-gray: #ddd;
    --color-light-gray: #f8f9fa;
    --color-text: #333;
    --color-text-light: #666;
    --color-text-lighter: #aaa;
    --color-background: rgba(0, 0, 0, 0.03);

    /* Typography */
    --font-family: "Helvetica Neue", Arial, "Hiragino Kaku Gothic ProN", "Hiragino Sans", Meiryo, sans-serif;
    --font-size-base: 14px;
    --font-size-small: 13px;
    --font-size-smaller: 12px;
    --line-height-base: 1.6;

    /* Spacing */
    --spacing-base: 20px;
    --spacing-small: 10px;
    --spacing-large: 40px;
    --section-spacing: 60px;
    --section-spacing-mobile: 40px;
    --content-spacing: 40px;
    --content-padding: 20px;

    /* Layout */
    --content-max-width: 1000px;
    --content-max-width-wide: 1200px;

    /* Breakpoints */
    --breakpoint-mobile: 768px;
    --breakpoint-tablet: 992px;
    --breakpoint-desktop: 1200px;

    /* Main Image */
    --main-image-aspect-ratio: 2.5; /* 2000/800 = 2.5 */
    --main-image-height: calc(100vw / var(--main-image-aspect-ratio));
    --main-image-height-mobile: calc(100vw / var(--main-image-aspect-ratio));
}

/* Full Width Section Mixin */
.full-width-section {
    width: 100vw;
    position: relative;
    left: 50%;
    right: 50%;
    margin-left: -50vw;
    margin-right: -50vw;
    background: var(--color-background);
    padding: var(--section-spacing) 0;
}

.content-width {
    max-width: var(--content-max-width);
    margin-left: auto;
    margin-right: auto;
    padding-left: var(--content-padding);
    padding-right: var(--content-padding);
}

.content-width-wide {
    max-width: var(--content-max-width-wide);
    margin-left: auto;
    margin-right: auto;
    padding-left: var(--content-padding);
    padding-right: var(--content-padding);
}

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

body {
    font-family: var(--font-family);
    line-height: var(--line-height-base);
    color: var(--color-text);
}

/* ==========================================================================
   Layout Components
   ========================================================================== */

/* Header
   ========================================================================== */
header {
    width: 100%;
    background: #000;
}

.header-container {
    width: 100vw;
    position: relative;
    left: 50%;
    right: 50%;
    margin-left: -50vw;
    margin-right: -50vw;
    padding: 0;
    display: flex;
    flex-direction: column;
    background: #000;
}

.header-top {
    max-width: var(--content-max-width-wide);
    margin: 0 auto;
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    width: 100%;
    color: #fff; 
    padding: 16px 0;
}

.logo {
    flex-shrink: 0;
}

.logo img {
    max-width: 300px;
    height: auto;
}

/* 追加: 右側コンテンツ用コンテナ */
.header-right {
    width: 100%;
    display: flex;
    flex-direction: column;
}

/* Navigation Styles */
.global-nav {
    background: #000;
    /* width: 100%; */ /* Let flexbox handle width on desktop */
    /* margin-top: 0; */ /* Reset for desktop */
}

.global-nav ul {
    display: flex;
    justify-content: center;
    list-style: none;
    margin: 0;
    padding: 0;
    max-width: var(--content-max-width-wide);
    margin-left: auto;
    margin-right: auto;
}

.global-nav li {
    position: relative;
    flex: 1;
    text-align: center;
    max-width: 200px;
}

.global-nav a {
    display: block;
    color: #fff;
    text-decoration: none;
    padding: 10px 15px;
    font-size: 14px;
    transition: background-color 0.3s;
    white-space: nowrap;
}

.global-nav a:hover {
    background-color: #333;
    color: #fff;
}

/* Header Description */
.header-description {
    margin: 0;
    padding: 8px 15px 0 15px;
    font-size: 13px;
    color: #fff;
    text-align: left;
    background: #000;
    max-width: var(--content-max-width-wide);
    margin-left: auto;
    margin-right: auto;
}

.header-description p {
    margin-bottom: 5px;
    line-height: 1.6;
    color: #fff;
}

/* Responsive Design */
@media (max-width: 768px) {
    header {
        background: #000;
        padding: 0;
        border-bottom: none;
    }

    .header-container {
        flex-direction: column;
        align-items: center;
        padding: 0;
        /* Reset full-width styles specific to mobile */
        width: 100%; /* Ensure it takes full width */
        position: relative; /* Needed for absolute positioning of hamburger */
        left: auto;
        right: auto;
        margin: 0; /* Remove negative margins */
        background: #000;
    }

    .logo {
        /* margin: 0; */ /* 中央寄せのために削除またはコメントアウト */
        padding: 15px;
        text-align: center;
        width: 100%;
        background: #000;
    }

    .logo img {
        max-width: 250px;
    }

    .header-right {
        width: 100%;
    }

    /* Mobile-specific nav styles */
    .global-nav {
        display: none; /* Hide nav by default on mobile */
        width: 100%;
        margin: 0; /* Ensure no extra margin on mobile */
    }

    .global-nav ul {
        flex-wrap: wrap;
        padding: 5px 0;
    }

    .global-nav li {
        flex: none;
        max-width: none;
    }

    .global-nav a {
        padding: 8px 15px;
        font-size: 13px;
    }

    .header-description {
        text-align: left;
        margin: 0;
        padding: 15px;
        font-size: 12px;
        background: #000;
        color: #fff;
        width: 100%;
        max-width: 100%;
    }

    .header-description p {
        margin-bottom: 3px;
        color: #fff;
    }

    .header-top {
        padding: 0;
    }
}

@media (min-width: 769px) {
    .header-top {
        border-bottom: 1px solid rgba(255,255,255,0.15);
        margin-bottom: 8px;
        box-shadow: 0 2px 8px rgba(0,0,0,0.04);
    }
}

/* Footer
   ========================================================================== */
footer {
    background-color: #000; /* 背景色を黒に */
    color: #fff;           /* 文字色を白に */
    padding: 40px 20px;     /* 上下のパディングを広めに */
    text-align: center;     /* テキストを中央揃えに */
}

.footer-container {
    max-width: 1200px;      /* コンテンツ幅を制限 */
    margin: 0 auto;         /* 中央揃え */
}

.footer-container p {
    margin-bottom: 15px;    /* 各段落下のマージン */
    font-size: 14px;        /* フォントサイズ */
    line-height: 1.7;       /* 行間 */
}

.footer-container p:last-child {
    margin-bottom: 0;       /* 最後の段落下のマージンを削除 */
}

.footer-company-info { /* 会社名とプライバシーポリシーをグループ化 */
    margin-bottom: 25px;    /* 住所情報との間隔 */
    display: flex;          /* Flexbox を使用 */
    justify-content: center; /* 中央揃え */
    align-items: center;    /* 垂直方向中央揃え */
    flex-wrap: wrap;        /* 必要に応じて折り返し */
}

.footer-company-info span { /* 会社名 */
    margin-right: 20px;     /* プライバシーポリシーリンクとの間隔 */
    font-weight: bold;      /* 太字 */
}

.privacy-policy-link {
    display: inline-block;  /* インラインブロック要素として表示 */
    border: 1px solid #fff; /* 白い境界線 */
    padding: 6px 18px;      /* パディング */
    text-decoration: none;  /* 下線なし */
    color: #fff;           /* 文字色を白に */
    font-size: 13px;        /* フォントサイズ */
    transition: background-color 0.3s, color 0.3s; /* ホバーエフェクト */
}

.privacy-policy-link:hover {
    background-color: #fff; /* ホバー時の背景色を白に */
    color: #000;           /* ホバー時の文字色を黒に */
}

.copyright {
    margin-top: 30px;       /* 上のマージン */
    font-size: 12px;        /* フォントサイズを小さく */
    color: #aaa;           /* 文字色をグレーに */
}

/* Responsive Design for Footer */
@media (max-width: 768px) {
    footer {
        padding: 30px 15px; /* スマホ表示でのパディング調整 */
    }

    .footer-container p {
        font-size: 13px;    /* スマホ表示でのフォントサイズ調整 */
    }

    .footer-company-info {
        flex-direction: column; /* 縦積みに変更 */
    }

    .footer-company-info span {
        margin-right: 0;        /* 右マージン削除 */
        margin-bottom: 10px;   /* 下マージン追加 */
    }

    .copyright {
        font-size: 11px;    /* スマホ表示でのコピーライトのフォントサイズ */
    }
}

/* ==========================================================================
   Page Components
   ========================================================================== */

/* Main Slider
   ========================================================================== */
#mainCarousel {
    margin-bottom: 0;
}

.carousel-inner {
    max-height: none;
    overflow: hidden;
}

.carousel-inner img {
    width: 100%;
    height: auto;
    object-fit: contain;
}

.carousel-control-prev,
.carousel-control-next {
    width: 5%;
    opacity: 0;
    transition: opacity 0.3s;
}

#mainCarousel:hover .carousel-control-prev,
#mainCarousel:hover .carousel-control-next {
    opacity: 0.8;
}

.carousel-indicators {
    margin-bottom: 1rem;
}

.carousel-indicators button {
    width: 12px !important;
    height: 12px !important;
    border-radius: 50%;
    margin: 0 5px !important;
}

/* Responsive Design for Slider */
@media (max-width: 768px) {
    .carousel-inner {
        max-height: 300px;
    }
    
    .carousel-control-prev,
    .carousel-control-next {
        opacity: 0.8;
    }
}

/* Section Title
   ========================================================================== */
.section-title {
    font-size: 1.6em;
    margin-bottom: 40px;
    color: var(--color-primary);
    text-align: center;
    position: relative;
    padding-bottom: 10px;
}

.section-title::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 60px;
    height: 2px;
    background-color: var(--color-gray);
}

/* Responsive Design for Privacy Policy */
@media (max-width: 768px) {
    .section-title {
        font-size: 1.5em;
        margin-bottom: 30px;
    }
}
/* New Arrivals
   ========================================================================== */
.new-arrivals {
    background: var(--color-background);
}

.new-arrivals h2 {
    font-weight: bold;
    color: #333;
    margin-bottom: 2rem !important; /* Bootstrapの mb-4 を上書き */
}

.car-card {
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    border-radius: 8px;
    overflow: hidden;
}

.car-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 0.5rem 1rem rgba(0, 0, 0, 0.1) !important; /* Bootstrapの shadow-sm を上書き */
}

.car-card .card-img-top {
}

.car-card .card-body {
    padding: 1rem;
}

.car-card .card-title {
    font-weight: bold;
    margin-bottom: 0.5rem;
    line-height: 1.4;
    height: 3.0em; /* 2行分の高さを確保 */
    overflow: hidden;
    text-overflow: ellipsis;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
}

.car-card .card-text {
    font-size: 0.875rem;
    color: #555;
}

.see-more-btn {
    padding: 0.75rem 2rem;
    border-radius: 50px;
    transition: background-color 0.3s, color 0.3s;
}

.see-more-btn:hover {
    background-color: #343a40;
    color: #fff;
}

/* News & Topics
   ========================================================================== */
.news-topics {
    background: var(--color-background);
}

.news-topics h2 {
    font-weight: bold;
    color: #333;
}

.news-topics .sub-title {
    font-size: 1rem;
    font-weight: normal;
    margin-left: 0.5em;
}

.news-list {
    max-width: 800px;
    margin: 0 auto;
}

.news-item {
    transition: background-color 0.2s ease;
}

.news-item:hover {
    background-color: #f8f9fa; /* ホバー時に少し明るく */
}

.news-thumbnail {
    width: 80px;
    height: 60px;
    object-fit: cover;
    border-radius: 4px;
    flex-shrink: 0;
}

.news-content {
    flex-grow: 1;
}

.news-date {
    font-size: 0.8rem;
}

.news-title {
    font-size: 0.95rem;
    color: #333;
    line-height: 1.5;
}

.see-more-link {
    text-decoration: none;
    font-size: 0.9rem;
}

.see-more-link:hover {
    text-decoration: underline;
}

/* FAIA Network
   ========================================================================== */
.faia-network {
    background: var(--color-background);
}

.faia-network .lead {
    max-width: 700px;
    margin-left: auto;
    margin-right: auto;
    color: #444;
}

.faia-network img {
    max-width: 100%;
    height: auto;
    border: 1px solid #ddd;
}

/* Purchase Flow
   ========================================================================== */
.purchase-section {
    padding: 80px 0;
    background: var(--color-background);
}

.purchase-flow {
    max-width: 1000px;
    margin: 0 auto;
}

.purchase-step {
    position: relative;
    background: #fff;
    padding: 30px;
    margin-bottom: 40px;
    border-radius: 10px;
    box-shadow: 0 2px 15px rgba(0, 0, 0, 0.1);
}

.purchase-step:last-child {
    margin-bottom: 0;
}

.step-number {
    position: absolute;
    top: -20px;
    left: -20px;
    width: 40px;
    height: 40px;
    background: #000;
    color: #fff;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: bold;
    font-size: 1.2rem;
}

.purchase-step h3 {
    font-size: 1.4rem;
    font-weight: bold;
    margin-bottom: 1rem;
    padding-left: 25px;
}

.purchase-step p {
    margin-bottom: 0.5rem;
    color: #555;
    line-height: 1.8;
}

.contact-info {
    background: #f8f9fa;
    padding: 15px;
    margin-top: 15px;
    border-radius: 5px;
}

.contact-info p {
    margin-bottom: 5px;
    font-weight: bold;
}

.required-docs {
    background: #f8f9fa;
    padding: 15px;
    margin-top: 15px;
    border-radius: 5px;
}

.required-docs h4 {
    font-size: 1rem;
    font-weight: bold;
    margin-bottom: 10px;
}

.required-docs p {
    margin-bottom: 5px;
}

/* Responsive Design for Purchase Flow */
@media (max-width: 768px) {
    .purchase-section {
        padding: 40px 0;
    }

    .purchase-step {
        padding: 20px;
        margin-bottom: 30px;
    }

    .step-number {
        top: -15px;
        left: -15px;
        width: 30px;
        height: 30px;
        font-size: 1rem;
    }

    .purchase-step h3 {
        font-size: 1.2rem;
        padding-left: 20px;
    }
}

/* Maintenance
   ========================================================================== */
.maintenance-section {
    margin-bottom: 0;  /* 余分なマージンを削除 */
    background: var(--color-background);
    width: 100vw;
    position: relative;
    left: 50%;
    right: 50%;
    margin-left: -50vw;
    margin-right: -50vw;
    padding: 60px 0 0 0;
}

.maintenance-subtitle {
    font-size: 20px;
    font-weight: bold;
    margin-bottom: var(--spacing-large);
    padding-bottom: var(--spacing-small);
    border-bottom: 2px solid var(--color-primary);  /* 下線を追加 */
    max-width: var(--content-max-width);  /* 最大幅を設定 */
    margin-left: auto;
    margin-right: auto;
    padding-left: var(--content-padding);
    padding-right: var(--content-padding);
}

.maintenance-description {
    margin-bottom: 2rem;
    line-height: 1.8;
    color: #333;
    max-width: 1000px;
    margin-left: auto;
    margin-right: auto;
    padding-left: 20px;
    padding-right: 20px;
}

.maintenance-grid {
    display: grid;
    gap: 20px;
    margin-bottom: 30px;
    max-width: 1000px;
    margin-left: auto;
    margin-right: auto;
    padding-left: 20px;
    padding-right: 20px;
}

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

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

.maintenance-item {
    position: relative;
    overflow: hidden;
    border-radius: 8px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    aspect-ratio: 4/3;  /* 4:3のアスペクト比を追加 */
}

.maintenance-item img {
    width: 100%;
    height: 100%;  /* heightを200pxから100%に変更 */
    object-fit: cover;
    transition: transform 0.3s ease;
}

.maintenance-item:hover img {
    transform: scale(1.05);
}

/* Responsive Design for Maintenance Page */
@media (max-width: 992px) {
    .first-grid,
    .second-grid,
    .third-grid {
        grid-template-columns: repeat(3, 1fr);
    }
}

@media (max-width: 768px) {
    .first-grid,
    .second-grid,
    .third-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .maintenance-section {
        padding: 40px 0;
    }

    .maintenance-subtitle {
        font-size: 1.3rem;
    }

    .maintenance-description {
        font-size: 0.9rem;
    }
}

@media (max-width: 576px) {
    .first-grid,
    .second-grid,
    .third-grid {
        grid-template-columns: 1fr;
    }
}

/* AIS Section
   ========================================================================== */
.ais-section {
    background: var(--color-background);
    color: #333;
    padding: 0;
    margin-bottom: 60px;
    width: 100vw;
    position: relative;
    left: 50%;
    right: 50%;
    margin-left: -50vw;
    margin-right: -50vw;
}

.ais-description-bg {
    width: 100%;
    padding: 40px 0;
}

.ais-description {
    font-size: 1rem;
    line-height: 1.8;
    margin-bottom: 0;
    text-align: left;
    max-width: 1000px;
    margin: 0 auto;
    padding: 0 20px;
}

.ais-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 15px;
    padding: 40px;
    max-width: 1200px;
    margin: 0 auto;
}

.ais-item {
    position: relative;
    background: #fff;
    overflow: hidden;
    aspect-ratio: 4/3;
    border: 1px solid rgba(0, 0, 0, 0.1);
    border-radius: 8px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}

.ais-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s ease;
}

.ais-item:hover img {
    transform: scale(1.05);
}

.ais-text {
    grid-column: span 2;
    aspect-ratio: auto;
    padding: 10px;
}

.ais-text-content {
    height: 100%;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.ais-text h3 {
    font-size: 1.1rem;
    margin-bottom: 15px;
    font-weight: normal;
    color: #333;
}

.ais-text p {
    margin-bottom: 0;
    font-size: 0.95rem;
    line-height: 1.6;
    color: #333;
}

.ais-text p:last-child {
    margin-bottom: 0;
}

/* Responsive Design for AIS Section */
@media (max-width: 992px) {
    .ais-grid {
        grid-template-columns: repeat(2, 1fr);
        padding: 40px 20px;
    }

    .ais-text {
        grid-column: span 2;
    }
}

@media (max-width: 576px) {
    .ais-description-bg {
        padding: 20px 0;
    }

    .ais-grid {
        grid-template-columns: 1fr;
        padding: 20px;
    }

    .ais-text {
        grid-column: span 1;
        padding: 20px 0;
    }

    .ais-description {
        font-size: 0.9rem;
        text-align: left;
    }
}

/* Company Section
   ========================================================================== */
.company-section {
    padding: var(--section-spacing) 0;  /* パディングを変数で統一 */
    background: var(--color-background);
    width: 100vw;
    position: relative;
    left: 50%;
    right: 50%;
    margin-left: -50vw;
    margin-right: -50vw;
}

.company-description {
    max-width: 1000px;
    margin: var(--spacing-large) auto;  /* マージンを変数で統一 */
    text-align: center;
    line-height: 1.8;
}

.company-description p {
    margin-bottom: 0;
}

.company-description p:last-child {
    margin-bottom: 0;
}

.company-logos {
    max-width: 800px;
    margin: 40px auto;
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 60px;
}

.logo-item {
    flex: 0 0 auto;
    max-width: 300px;
    display: flex;
    justify-content: center;
    align-items: center;
}

.logo-item img {
    width: auto;
    height: auto;
    max-width: 100%;
    object-fit: contain;
}

.logo-item a[href*="jucda"] img {
    height: 100px;
    width: 240px;
    max-width: 100%;
}

.logo-item a[href*="faia"] img {
    height: 110px;
    width: 157px;
    max-width: 100%;
}

/* Responsive Design for Company Description and Logos */
@media (max-width: 768px) {
    .company-description {
        text-align: left;
        padding: 0;
        font-size: 0.9rem;
    }

    .company-logos {
        flex-direction: row;
        gap: 20px;
        padding: 0 20px;
        justify-content: center;
    }

    .logo-item {
        flex: 0 0 auto;
        max-width: none;
        width: 140px;
    }

    .logo-item a[href*="jucda"] img,
    .logo-item a[href*="faia"] img {
        width: 140px;
        height: auto;
    }
}

.company-table-wrapper {
    max-width: 1000px;
    margin: 40px auto 0;
}

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

.company-table th,
.company-table td {
    padding: 20px;
    border: 1px solid #ddd;
    line-height: 1.6;
}

.company-table th {
    width: 25%;
    background-color: #f8f9fa;
    font-weight: normal;
    text-align: left;
    vertical-align: top;
}

.company-table td {
    width: 75%;
}

/* Responsive Design for Company Table */
@media (max-width: 768px) {
    .company-section {
        padding: 40px 0;
    }

    .company-table th,
    .company-table td {
        padding: 15px;
        font-size: 0.9rem;
    }

    .company-table th {
        width: 35%;
    }

    .company-table td {
        width: 65%;
    }
}

@media (max-width: 576px) {
    .company-table th,
    .company-table td {
        padding: 10px;
        font-size: 0.85rem;
    }

    .company-table th {
        width: 40%;
    }

    .company-table td {
        width: 60%;
    }
}

/* Map Section
   ========================================================================== */
.map-section {
    width: 100vw;
    position: relative;
    left: 50%;
    right: 50%;
    margin-left: -50vw;
    margin-right: -50vw;
    margin-top: 60px;
    margin-bottom: 0;
    overflow: hidden;
}

.map-wrapper {
    width: 100%;
    position: relative;
    padding-bottom: 400px;  /* 固定の高さを設定 */
    height: 0;
}

.map-wrapper img,
.map-wrapper iframe {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
}

/* Responsive Design for Map Section */
@media (max-width: 768px) {
    .map-section {
        margin-top: 40px;
    }

    .map-wrapper {
        padding-bottom: 300px;  /* スマホでの高さを調整 */
    }
}

/* Loan Section
   ========================================================================== */
.loan-description {
    margin: 40px auto 0;
    padding: 0 20px;
}

.loan-description p {
    font-size: 1.1rem;
    line-height: 1.8;
    margin-bottom: 1.5em;
    color: #333;
}

.loan-description p {
    margin-bottom: 0;
}

.loan-description p:last-child {
    margin-bottom: 0;
}

@media (max-width: 768px) {
    .loan-description {
        padding: 0;
    }
    
    .loan-description p {
        font-size: 1rem;
    }
}

/* Loan Companies Styles */
.loan-companies {
    margin-top: 60px;
}

.loan-company {
    background: #fff;
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    padding: 30px;
    margin-bottom: 30px;
    display: flex;
    gap: 30px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
}

.company-logo {
    flex: 0 0 200px;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
}

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

.company-info {
    flex: 1;
}

.company-info p {
    margin-bottom: 15px;
    line-height: 1.8;
    color: #333;
}

.company-info p:last-child {
    margin-bottom: 0;
}

.simulation-btn {
    display: inline-block;
    background: #2c3e50;
    color: #fff;
    padding: 12px 24px;
    border-radius: 4px;
    text-decoration: none;
    margin-top: 15px;
    transition: background-color 0.3s;
}

.simulation-btn:hover {
    background: #34495e;
    color: #fff;
}

/* Responsive Design for Loan Companies */
@media (max-width: 768px) {
    .loan-company {
        flex-direction: column;
        padding: 20px;
        gap: 20px;
    }

    .company-logo {
        flex: 0 0 auto;
        padding: 10px;
    }

    .company-info p {
        font-size: 0.95rem;
    }

    .simulation-btn {
        display: block;
        text-align: center;
        padding: 10px 20px;
    }
}

/* Contact Form
   ========================================================================== */
.contact-form-section {
    margin-top: 0;  /* 余分なマージンを削除 */
}

.contact-description {
    text-align: center;
    margin-bottom: var(--spacing-large);  /* マージンを変数で統一 */
    color: var(--color-text);
    line-height: 1.8;
}

.form-group {
    margin-bottom: 25px;
    position: relative;  /* エラーメッセージの位置調整用 */
}

.form-label {
    display: block;
    margin-bottom: 8px;
    font-weight: bold;
    color: #333;
}

.form-control {
    width: 100%;
    padding: 12px;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 16px;
    transition: border-color 0.3s;
}

.form-control:focus {
    border-color: #000;
    outline: none;
}

.form-control.is-invalid {
    border-color: #dc3545;
}

.error-message {
    display: none;
    color: #dc3545;
    font-size: 14px;
    margin-top: 5px;
    padding-left: 5px;
}

textarea.form-control {
    min-height: 150px;
    resize: vertical;
}

.submit-button {
    display: block;
    width: 200px;
    margin: 40px auto 0;
    padding: 15px;
    background: #000;
    color: #fff;
    border: none;
    border-radius: 4px;
    font-size: 16px;
    cursor: pointer;
    transition: background-color 0.3s;
}

.submit-button:hover {
    background: #333;
}

.submit-button:disabled {
    background: #666;
    cursor: not-allowed;
}

/* Responsive Design for Contact Form */
@media (max-width: 768px) {
    .contact-form-section {
        margin-bottom: 40px;
    }

    .contact-description {
        text-align: left;
        font-size: 0.9rem;
        margin-bottom: 30px;
    }

    .form-control {
        font-size: 14px;
        padding: 10px;
    }

    .submit-button {
        width: 100%;
        margin-top: 30px;
    }
}

/* Privacy Policy
   ========================================================================== */
.privacy-policy-section {
    padding: var(--section-spacing) 0;
    background: var(--color-background);
    width: 100vw;
    position: relative;
    left: 50%;
    right: 50%;
    margin-left: -50vw;
    margin-right: -50vw;
}

.privacy-policy-content {
    max-width: 900px;
    margin: 40px auto 0;
    line-height: 1.8;
    color: var(--color-text);
}

/* メインタイトル */
/* 削除: 重複するsection-titleの定義 */

/* 共通のセクションスタイル */
.privacy-policy-intro,
.privacy-policy-items,
.contact-info-section,
.privacy-notice,
.policy-changes {
    margin-bottom: 40px;
    padding: 30px;
    background: var(--color-white);
    border-radius: 4px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
}

/* 共通の見出しスタイル */
.privacy-policy-intro h2,
.privacy-policy-items h2,
.contact-info-section h2,
.privacy-notice h2,
.policy-changes h2 {
    font-size: 1.4em;
    margin-bottom: 20px;
    color: var(--color-text);
    position: relative;
    padding-bottom: 8px;
}

.privacy-policy-intro h2::after,
.privacy-policy-items h2::after,
.contact-info-section h2::after,
.privacy-notice h2::after,
.policy-changes h2::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 40px;
    height: 1px;
    background-color: var(--color-gray);
}

/* サブセクションのスタイル */
.policy-item,
.usage-purpose,
.third-party-policy,
.exception-cases,
.statistics-usage,
.data-accuracy {
    margin-bottom: 25px;
    padding: 25px;
    background: var(--color-white);
    border-radius: 4px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
    border-left: 2px solid var(--color-gray);
}

.policy-item h3,
.usage-purpose h3,
.third-party-policy h3,
.exception-cases h3,
.statistics-usage h3,
.data-accuracy h3 {
    font-size: 1.1em;
    margin-bottom: 15px;
    color: var(--color-text);
}

/* リストスタイル */
.usage-purpose ol,
.exception-cases ol {
    padding-left: 20px;
    list-style-type: decimal;
    margin-bottom: 15px;
}

.usage-purpose li,
.exception-cases li {
    margin-bottom: 8px;
    line-height: 1.6;
}

/* お問い合わせ窓口のスタイル */
.contact-details p {
    margin-bottom: 8px;
    padding-left: 15px;
    position: relative;
}

.contact-details p::before {
    content: '•';
    position: absolute;
    left: 0;
    color: var(--color-text-light);
}

/* プライバシーポリシーの変更セクション */
.policy-changes {
    text-align: center;
    background: var(--color-light-gray);
    border: 1px solid var(--color-gray);
}

.policy-changes h2::after {
    left: 50%;
    transform: translateX(-50%);
}

/* 日付表示 */
.privacy-policy-date {
    margin-bottom: 40px;
    color: var(--color-text-light);
    font-size: 0.9em;
    text-align: center;
}

/* Responsive Design for Privacy Policy */
@media (max-width: 768px) {
    .privacy-policy-section {
        padding: 30px 0;
    }

    .privacy-policy-content {
        padding: 0 15px;
        margin-top: 20px;
        width: 100%;
        max-width: none;
    }

    .privacy-policy-intro,
    .privacy-policy-items,
    .contact-info-section,
    .privacy-notice,
    .policy-changes {
        padding: 20px 15px;
        margin-bottom: 25px;
        border-radius: 0;
        box-shadow: none;
    }

    .privacy-policy-intro h2,
    .privacy-policy-items h2,
    .contact-info-section h2,
    .privacy-notice h2,
    .policy-changes h2 {
        font-size: 1.2em;
        margin-bottom: 15px;
    }

    .policy-item,
    .usage-purpose,
    .third-party-policy,
    .exception-cases,
    .statistics-usage,
    .data-accuracy {
        padding: 15px;
        margin-bottom: 15px;
        border-radius: 0;
        box-shadow: none;
        border-left: none;
        border-bottom: 1px solid var(--color-gray);
    }

    .policy-item h3,
    .usage-purpose h3,
    .third-party-policy h3,
    .exception-cases h3,
    .statistics-usage h3,
    .data-accuracy h3 {
        font-size: 1.1em;
        margin-bottom: 10px;
    }

    .usage-purpose ol,
    .exception-cases ol {
        padding-left: 15px;
        margin-bottom: 10px;
    }

    .usage-purpose li,
    .exception-cases li {
        margin-bottom: 6px;
    }

    .contact-details p {
        padding-left: 12px;
    }

    .privacy-policy-date {
        margin-bottom: 30px;
    }
}

/* ==========================================================================
   Helper Classes
   ========================================================================== */
.hide-on-mobile {
    display: block; /* Default: show */
}

.show-on-mobile {
    display: none; /* Default: hide */
}

@media (max-width: 768px) {
    .hide-on-mobile {
        display: none; /* Hide on mobile */
    }

    .show-on-mobile {
        display: block; /* Show on mobile */
    }

    .header-description {
        background: #fff !important;
        color: #222 !important;
        padding: 15px;
        font-size: 12px;
        line-height: 1.6;
        text-align: left;
        width: 100%;
        margin-top: 0; /* Adjust if needed below the main image */
        margin-bottom: 0; /* Add spacing below -> Changed to 0 */
    }

    .header-description p {
        margin-bottom: 3px;
        color: #222 !important;
    }
}

/* ==========================================================================
   Responsive Design
   ========================================================================== */
@media (max-width: var(--breakpoint-tablet)) {
    /* Tablet styles */
}

@media (max-width: var(--breakpoint-mobile)) {
    /* Mobile styles */
    .full-width-section {
        padding: var(--section-spacing-mobile) 0;
    }

    /* 削除: 重複するsection-titleの定義 */
}

@media (max-width: 576px) {
    /* Small mobile styles */
}

/* Blog Section
   ========================================================================== */
.blog-section {
    background: var(--color-background);
}

.blog-section .sub-title {
    font-size: var(--font-size-base);  /* フォントサイズを変数で統一 */
}

.blog-list {
    max-width: 800px;
    margin: 0 auto;
}

.blog-item {
    transition: background-color 0.2s ease;
    display: flex;
    align-items: center;
    padding: var(--spacing-base) 0;
    border-bottom: 1px solid var(--color-gray);
    text-decoration: none;
    color: var(--color-text);
}

.blog-item:hover {
    background-color: rgba(0, 0, 0, 0.02);
}

.blog-thumbnail {
    width: 80px;
    height: 60px;
    object-fit: cover;
    border-radius: 4px;
    margin-right: var(--spacing-base);
}

.blog-content {
    flex-grow: 1;
}

.blog-date {
    font-size: var(--font-size-small);
    color: var(--color-text-light);
    margin-bottom: 0.5em;
}

.blog-title {
    font-size: 0.95rem;
    line-height: 1.5;
    margin: 0;
}

/* Blog Detail */
.blog-detail-section {
    padding: var(--section-spacing) 0;  /* パディングを変数で統一 */
}

.blog-detail-content {
    max-width: 800px;
    margin: 0 auto;
    padding: var(--spacing-base);
}

@media (max-width: 768px) {
    .blog-thumbnail {
        width: 60px;
        height: 45px;
    }

    .blog-title {
        font-size: 0.9rem;
    }
}

/* Content Spacing */
.content-spacing {
    margin-bottom: var(--spacing-large);
}

.content-spacing-small {
    margin-bottom: var(--spacing-base);
}

/* Background Colors */
.bg-light {
    background-color: var(--color-light-gray);
}

.bg-white {
    background-color: var(--color-white);
}

/* Main Image Container */
.container-fluid {
    height: var(--main-image-height);
    overflow: hidden;
    position: relative;
}

.container-fluid img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    position: absolute;
    top: 0;
    left: 0;
}

@media (max-width: 768px) {
    .container-fluid {
        height: var(--main-image-height-mobile);
    }
}

/* Hamburger Menu Button */
.hamburger-menu {
    display: none; /* Hide by default, show in media query */
    position: absolute;
    top: 5px; /* Adjust top position */
    right: 5px; /* Adjust right position */
    background: none;
    border: none;
    cursor: pointer;
    padding: 10px;
    z-index: 1001;
}

.hamburger-menu span {
    display: block;
    width: 25px;
    height: 3px;
    background-color: #fff;
    margin: 5px 0;
    transition: all 0.3s ease-in-out;
}

/* Styles for when the menu is open (added via JS) */
.global-nav.is-active {
    display: block; /* Show nav when active */
    position: absolute;
    top: 70px; /* Adjust as needed */
    left: 0;
    width: 100%;
    background: #000;
    z-index: 1000;
}

.global-nav.is-active ul {
    flex-direction: column;
    align-items: center;
    padding: 10px 0;
}

.global-nav.is-active li {
    width: 100%;
    max-width: none;
    text-align: center;
    border-bottom: 1px solid #333; /* Add separator */
}

.global-nav.is-active li:last-child {
    border-bottom: none;
}

.global-nav.is-active a {
    padding: 15px;
}

/* Helper Classes */
/* Remove the general .hamburger-menu display: none; rule outside media query */
/*.hamburger-menu {*/
/*    display: none; */ /* Hide hamburger on desktop by default */
/*}*/

/* Hamburger animation */
.hamburger-menu.is-active span:nth-child(1) {
    transform: translateY(8px) rotate(45deg);
}
.hamburger-menu.is-active span:nth-child(2) {
    opacity: 0;
}
.hamburger-menu.is-active span:nth-child(3) {
    transform: translateY(-8px) rotate(-45deg);
}

@media (max-width: 768px) {
    /* Mobile styles */
    .full-width-section {
        padding: var(--section-spacing-mobile) 0;
    }

    /* Show hamburger menu on mobile */
    .hamburger-menu {
        display: block;
    }

    /* Ensure nav list items are block level when active */
    .global-nav.is-active ul {
        flex-direction: column;
        align-items: center;
        padding: 10px 0;
    }
}

/* Simple Pagination Styles */
.pagination-wrapper {
    margin-top: 40px; /* Adjust spacing as needed */
}

.pagination {
    justify-content: center; /* Center the pagination */
    margin-bottom: 0;
}

.page-item {
    margin: 0 2px; /* Add small horizontal margin between items */
}

.page-link {
    padding: 0.375rem 0.75rem; /* Standard padding */
    border-radius: 0.25rem; /* Slightly rounded corners */
    border: 1px solid var(--color-gray);
    color: var(--color-secondary);
    background-color: var(--color-white);
    transition: background-color 0.2s, color 0.2s, border-color 0.2s;
}

.page-link:hover {
    background-color: var(--color-light-gray);
    color: var(--color-primary);
    border-color: #adb5bd;
    text-decoration: none;
}

.page-item.active .page-link {
    background-color: var(--color-primary);
    border-color: var(--color-primary);
    color: var(--color-white);
    z-index: 3;
}

.page-item.disabled .page-link {
    color: var(--color-text-lighter);
    pointer-events: none;
    background-color: var(--color-light-gray);
    border-color: var(--color-gray);
}

/* Blog 2-Column Layout */
.blog-container {
    display: flex;
    gap: var(--spacing-large); /* カラム間のスペース */
}

.blog-main {
    flex: 1; /* Use available space */
    /* Consider setting a max-width if needed */
}

.blog-sidebar {
    flex: 0 0 280px; /* 固定幅、または flex-basis: 30%; など */
    /* サイドバー固有のスタイルを追加 */
}

/* Sidebar Widgets */
.sidebar-widget {
    margin-bottom: var(--spacing-large);
    padding: var(--spacing-base);
    background-color: var(--color-white);
    border: 1px solid var(--color-gray);
    border-radius: 4px;
}

.sidebar-widget h3 {
    font-size: 1.1rem;
    margin-bottom: var(--spacing-base);
    padding-bottom: var(--spacing-small);
    border-bottom: 1px solid var(--color-gray);
    color: var(--color-primary);
}

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

.sidebar-widget ul li {
    margin-bottom: var(--spacing-small);
}

.sidebar-widget ul li a {
    text-decoration: none;
    color: var(--color-secondary);
    transition: color 0.2s;
}

.sidebar-widget ul li a:hover {
    color: var(--color-primary);
    text-decoration: underline;
}

/* Search Form in Sidebar */
.sidebar-search form {
    display: flex;
}

.sidebar-search input[type="text"] {
    flex-grow: 1;
    padding: 8px 12px;
    border: 1px solid var(--color-gray);
    border-radius: 4px 0 0 4px;
    font-size: 0.9rem;
}

.sidebar-search button {
    padding: 8px 15px;
    border: 1px solid var(--color-primary);
    background-color: var(--color-primary);
    color: var(--color-white);
    border-radius: 0 4px 4px 0;
    cursor: pointer;
    transition: background-color 0.2s;
    font-size: 0.9rem;
}

.sidebar-search button:hover {
    background-color: var(--color-secondary);
    border-color: var(--color-secondary);
}

/* Comment Widget */
.sidebar-comment p {
    font-size: 0.9rem;
    color: var(--color-text-light);
    line-height: 1.6;
}

/* Responsive adjustments for Blog Layout */
@media (max-width: 768px) {
    .blog-container {
        flex-direction: column; /* スマホでは縦積みに */
        gap: 0; /* 縦積みの場合はカラム間のgapは不要 */
    }

    .blog-sidebar {
        flex: 1 1 auto; /* 幅を自動調整 */
        margin-top: var(--spacing-large); /* 上のコンテンツとのスペース */
    }
}

/* 検索状態のバッジ */
.search-status {
    text-align: center;
}

.search-status .badge {
    font-size: 1rem;
    padding: 0.5rem 1rem;
}

/* サイドバーのアクティブなリンク */
.blog-sidebar .sidebar-widget ul li a.active {
    color: #000;
    font-weight: bold;
    text-decoration: none;
}

.blog-sidebar .sidebar-widget ul li a.active:hover {
    color: #000;
}

/* 検索結果なしのメッセージ */
.no-results {
    color: #666;
    font-size: 1.1rem;
    line-height: 1.6;
}

.no-results p {
    margin-bottom: 0.5rem;
}
