/* --- Reset & Basic Settings --- */
body, h1, h2, h3, p, ul, li, table { margin: 0; padding: 0; }
body {
    font-family: 'Noto Sans JP', sans-serif;
    line-height: 1.8;
    color: #333;
    background-color: #fdfdfd;
}
a { text-decoration: none; color: #007bff; }
img { max-width: 100%; height: auto; }
.container { max-width: 1100px; margin: 0 auto; padding: 0 20px; }
.content-section { padding: 80px 0; }
.bg-light { background-color: #f4f4f4; }
.text-center { text-align: center; }

/* --- Header --- */
.site-header {
    background-color: #fff;
    padding: 20px 0;
    border-bottom: 1px solid #eee;
    position: sticky; top: 0; z-index: 100;
}
.site-header .container { display: flex; justify-content: space-between; align-items: center; }
.logo a { font-weight: 700; font-size: 24px; color: #333; text-decoration: none; }
.main-nav ul { list-style: none; display: flex; align-items: center; }
.main-nav li { margin-left: 30px; }
.main-nav a { color: #555; font-weight: 700; transition: color 0.3s; }
.main-nav a:hover { color: #007bff; }
.btn-contact { background-color: #007bff; color: #fff !important; padding: 10px 20px; border-radius: 5px; transition: opacity 0.3s; }
.btn-contact:hover { opacity: 0.8; }

/* --- Hamburger Menu (Mobile) --- */
.hamburger-menu { display: none; background: none; border: none; cursor: pointer; padding: 10px; }
.hamburger-menu span { display: block; width: 25px; height: 3px; background-color: #333; margin: 5px 0; transition: all 0.3s; }
.mobile-nav { display: none; background-color: #fff; text-align: center; padding: 20px 0; border-bottom: 1px solid #eee; }
.mobile-nav ul { list-style: none; }
.mobile-nav li { margin-bottom: 20px; }
.mobile-nav a { font-weight: 700; color: #555; }
.hamburger-menu.active span:nth-child(1) { transform: translateY(8px) rotate(45deg); }
.hamburger-menu.active span:nth-child(2) { opacity: 0; }
.hamburger-menu.active span:nth-child(3) { transform: translateY(-8px) rotate(-45deg); }

/* --- Footer --- */
.site-footer { background-color: #333; color: #fff; padding: 40px 0; text-align: center; }
.footer-logo { font-size: 24px; font-weight: 700; margin-bottom: 10px; }
.copyright { margin-top: 20px; font-size: 14px; color: #aaa; }

/* --- General Components --- */
h1, h2, h3 { font-weight: 700; }
h2 { font-size: 32px; text-align: center; margin-bottom: 60px; }
.btn { display: inline-block; background: #007bff; color: #fff; padding: 12px 30px; border-radius: 5px; font-weight: 700; text-decoration: none; }
.note { font-size: 14px; color: #777; margin-top: 20px; }
.page-header { background: #007bff; color: #fff; text-align: center; padding: 60px 0; }
.page-header h1 { font-size: 36px; }

/* --- Page Specific Styles --- */
/* Index */
.hero { background: #fff; text-align: center; padding: 100px 0; }
.hero h1 { font-size: 42px; line-height: 1.4; margin-bottom: 20px; }
.service-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 40px; }
.service-item { background: #fff; padding: 40px; border: 1px solid #eee; text-align: center; }
.service-item h3 { font-size: 24px; margin-bottom: 20px; }

/* About */
.profile-table { width: 100%; border-collapse: collapse; background: #fff; }
.profile-table th, .profile-table td { border: 1px solid #eee; padding: 20px; text-align: left; }
.profile-table th { background-color: #f9f9f9; width: 25%; font-weight: 700; }

/* Service Vacant */
.price-box { background: #fff; border: 2px solid #007bff; padding: 40px; text-align: center; margin-top: 40px; }
.price-box h3 { font-size: 28px; color: #007bff; }
.check-list { list-style: '✔ '; margin-top: 20px; display: inline-block; text-align: left; }

/* Service General */
.service-list { max-width: 800px; margin: 0 auto; }
.service-list-item { background: #fff; border: 1px solid #eee; padding: 20px; margin-bottom: 15px; font-weight: 700; }

/* Contact */
.contact-info { margin-top: 40px; }
.email-address { font-size: 24px; font-weight: 700; }

/* --- Animation --- */
.fade-in { opacity: 0; transform: translateY(20px); transition: opacity 0.6s ease-out, transform 0.6s ease-out; }
.fade-in.visible { opacity: 1; transform: translateY(0); }

/* --- Responsive (Mobile) --- */
@media (max-width: 768px) {
    .main-nav { display: none; }
    .hamburger-menu { display: block; }

    h1 { font-size: 32px !important; }
    h2 { font-size: 28px; }
    .content-section { padding: 60px 0; }
    
    .service-grid { grid-template-columns: 1fr; }
    .profile-table th, .profile-table td { display: block; width: auto; }
}

/* Contact Page Social Buttons */
.contact-methods {
    margin: 40px 0;
    display: flex;
    justify-content: center;
    gap: 20px;
    flex-wrap: wrap; /* スマホで折り返す */
}
.btn-social {
    display: inline-block;
    padding: 15px 30px;
    border-radius: 5px;
    color: #fff;
    font-weight: 700;
    text-decoration: none;
    transition: transform 0.3s;
}
.btn-social:hover {
    transform: scale(1.05);
}
.btn-social.instagram {
    background: #E1306C;
}
.btn-social.line {
    background: #00B900;
}

/* --- Preloader --- */
#preloader {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: #fdfdfd; /* サイトの背景色 */
    z-index: 9999;
    display: flex;
    justify-content: center;
    align-items: center;
    transition: opacity 0.8s ease, visibility 0.8s ease;
}

/* (変更) テキストではなく、アイコンスピナーに変更 */
.loader {
    width: 60px;  /* アイコンのサイズ */
    height: 60px; /* アイコンのサイズ */
    border: 5px solid #f0f0f0; /* スピナーの薄い円 */
    border-top: 5px solid #007bff; /* スピナーの回転部分（テーマカラー） */
    border-radius: 50%;
    animation: spin 1s linear infinite; /* アニメーションを適用 */
}


/* ローダーのアニメーション */
@keyframes pulse {
    0% {
        transform: scale(1);
        opacity: 1;
    }
    50% {
        transform: scale(1.1);
        opacity: 0.7;
    }
    100% {
        transform: scale(1);
        opacity: 1;
    }
}
.loader {
    display: flex;
    justify-content: center;
    align-items: center;
    width: 100px;  /* ローダー全体のサイズ */
    height: 100px;
}

.loader-logo {
    width: 100%; /* 親要素に合わせる */
    height: 100%;
    object-fit: contain; /* アスペクト比を維持して収める */
    animation: rotate-scale 2s ease-in-out infinite; /* 回転と拡大縮小アニメーション */
}

/* ローダーを非表示にするためのクラス */
#preloader.hidden {
    opacity: 0;
    visibility: hidden;
}

/* (追加) ロゴの回転と拡大縮小アニメーション */
@keyframes rotate-scale {
    0% { transform: rotateY(0deg) scale(0.8); opacity: 0.7; }
    50% { transform: rotateY(360deg) scale(1.1); opacity: 1; }
    100% { transform: rotateY(720deg) scale(0.8); opacity: 0.7; }
}
/* (削除) 以前の .loader::before や @keyframes draw-circle は不要になります */
/* --- Profile Image Styles --- */

/* Index Page Greeting */
.greeting-content {
    display: flex;
    align-items: center;
    gap: 40px;
    text-align: left;
}
.greeting-img {
    flex-shrink: 0;
}
.greeting-img img {
    width: 180px;
    height: 180px;
    border-radius: 50%;
    object-fit: cover;
}

/* About Page Profile */
.profile-header {
    text-align: center;
    margin-bottom: 40px;
}
.profile-main-img {
    width: 200px;
    height: 200px;
    border-radius: 50%;
    object-fit: cover;
    border: 5px solid #fff;
    box-shadow: 0 5px 15px rgba(0,0,0,0.1);
}

/* --- Responsive Adjustments for Images --- */
@media (max-width: 768px) {
    /* ...既存のレスポンシブ設定... */

    .greeting-content {
        flex-direction: column;
        text-align: center;
    }
}

/* --- Preloader (修正) --- */
#preloader {
    /* ...既存のスタイル... */
    background-color: #fdfdfd; /* 背景色をサイトと統一 */
}

.loader {
    font-family: 'Yuji Syuku', serif; /* 手書きフォントを適用 */
    width: 180px; /* 少し大きく */
    height: 180px;
    border: 5px solid transparent; /* 枠線は最初は透明に */
    border-radius: 50%;
    font-size: 42px; /* 文字を大きく */
    color: #333;
    position: relative;
    /* アニメーションを削除し、新しいアニメーション用の要素を追加 */
}

/* 枠線を描画するアニメーション用の疑似要素 */
.loader::before {
    content: '';
    position: absolute;
    top: -5px;
    left: -5px;
    width: 100%;
    height: 100%;
    border: 5px solid #007bff;
    border-radius: 50%;
    animation: draw-circle 2s cubic-bezier(0.65, 0, 0.35, 1) forwards;
}

@keyframes draw-circle {
    from {
        clip-path: polygon(50% 50%, 50% 0%, 50% 0%, 50% 0%, 50% 0%, 50% 0%);
    }
    to {
        clip-path: polygon(50% 50%, 50% 0%, 100% 0%, 100% 100%, 0% 100%, 0% 0%);
    }
}

/* --- Comparison Section (宅サポ) --- */
.comparison-section h2 {
    font-size: 36px; /* PCでは少し大きくしてインパクトを */
    line-height: 1.5;
    margin-bottom: 20px;
}

/* h2の下のリード文（説明文）のスタイル */
.comparison-section .section-lead {
    font-size: 16px;
    color: #555;
    max-width: 700px;
    margin: 0 auto 60px auto; /* 見出しとの余白を確保 */
    text-align: center;
}

.comparison-grid {
    display: grid;
    /* PCでは2カラム表示 */
    grid-template-columns: 1fr 1fr;
    gap: 40px; /* カード間の余白 */
}

.comparison-item {
    background-color: #fff;
    border-radius: 12px; /* 角丸を少し大きめに */
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.06); /* 柔らかい影 */
    overflow: hidden; /* 画像が角丸からはみ出ないように */
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    border: 1px solid #e9e9e9; /* 薄い境界線 */
}

/* ホバー時に浮き上がるエフェクト */
.comparison-item:hover {
    transform: translateY(-8px);
    box-shadow: 0 12px 25px rgba(0, 0, 0, 0.1);
}

.comparison-item img {
    width: 100%;
    height: auto;
    aspect-ratio: 16 / 10; /* 画像の縦横比を16:10に固定 */
    object-fit: cover; /* 比率を保ったままトリミング */
    display: block;
}

.comparison-item h3 {
    font-size: 22px;
    font-weight: 700;
    text-align: center;
    margin: 30px 30px 15px 30px;
    display: flex; /* アイコンとテキストを横並びにするため */
    align-items: center;
    justify-content: center;
    gap: 10px; /* アイコンとテキストの間隔 */
}

/* 対比を明確にするアイコンと色 */
/* 1番目の項目（放置された空き家） */
.comparison-item:first-child h3 {
    color: #d9534f; /* 危険・ネガティブな印象の赤 */
}
.comparison-item:first-child h3::before {
    content: '❌'; /* stxtニーモニック (x) */
    font-size: 20px;
    line-height: 1;
}

/* 2番目の項目（管理された空き家） */
.comparison-item:last-child h3 {
    color: #007bff; /* ポジティブ・解決策の青（既存のテーマカラー） */
}
.comparison-item:last-child h3::before {
    content: '✅'; /* stxtニーモニック (v) */
    font-size: 20px;
    line-height: 1;
}

.comparison-item p {
    font-size: 15px;
    line-height: 1.7;
    color: #444;
    padding: 0 30px 30px 30px; /* テキストの余白 */
}

/* --- Responsive (Mobile) --- */
@media (max-width: 768px) {
    /* ... 既存のレスポンシブ設定 ... */

    .comparison-section h2 {
        font-size: 28px; /* スマホではh2の既存設定に合わせる */
    }

    .comparison-grid {
        grid-template-columns: 1fr; /* スマホでは1カラム表示 */
        gap: 30px;
    }

    .comparison-item h3 {
        font-size: 20px;
        margin: 25px 25px 15px 25px;
    }

    .comparison-item p {
        padding: 0 25px 25px 25px; /* スマホでの余白調整 */
    }
}

/* style.css の .hero を置き換え */
.hero {
    background-image: linear-gradient(rgba(0, 0, 0, 0.4), rgba(0, 0, 0, 0.4)), url('../images/hero_background.png'); /* 生成した画像を使用 */
    background-size: cover;
    background-position: center;
    color: #fff;
    text-align: center;
    padding: 140px 0;
}

.hero h1 {
    font-size: 42px;
    line-height: 1.4;
    margin-bottom: 20px;
    text-shadow: 0 2px 5px rgba(0,0,0,0.5);
}
.hero p {
    font-size: 18px;
    max-width: 600px;
    margin: 0 auto;
    text-shadow: 0 2px 5px rgba(0,0,0,0.5);
}


/* style.css に追記 */

/* --- Service Summary (Index) --- */
/* service-item, service-item-img, h3 i などのスタイルは前回提示したものと変わりません。
   もし未適用であれば、前回のコメントブロック全体を追記してください。 */
.service-item {
    background: #fff;
    padding: 0;
    border: 1px solid #eee;
    text-align: center;
    border-radius: 8px;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    transition: transform 0.3s ease, box-shadow 0.3s ease; /* ホバーエフェクト追加 */
}

.service-item:hover { /* ホバーエフェクト */
    transform: translateY(-5px);
    box-shadow: 0 10px 20px rgba(0,0,0,0.08);
}

.service-item-img {
    width: 100%;
    height: 180px;
    object-fit: cover;
}

.service-item h3 {
    font-size: 24px;
    margin: 30px 20px 20px 20px;
}

.service-item h3 i {
    color: #007bff;
    margin-right: 10px;
}

.service-item p {
    padding: 0 30px;
    flex-grow: 1;
}

.service-item .btn {
    margin: 30px;
    align-self: center; /* ボタンも中央に */
}

/* レスポンシブ調整（必要であれば） */
@media (max-width: 768px) {
    .hero {
        padding: 100px 0;
    }
    .hero h1 {
        font-size: 32px;
    }
    .hero p {
        font-size: 16px;
    }
    .service-item h3 {
        font-size: 20px;
    }
}