:root {
    /* Color Palette - Balanced Professional (Fresh yet Trusted) */
    --primary: #1E8E48;
    /* Fresh Green (Trust + Energy) */
    --primary-light: #4DAF70;
    --primary-dark: #146633;
    --accent: #E8F5E9;
    /* Very light green background */
    --text-main: #333333;
    /* Standard Dark Gray */
    --text-light: #666666;
    --bg-body: #ffffff;
    --bg-light: #F8F9FA;
    /* Crisp Light Gray */
    --white: #ffffff;
    --border: #E0E0E0;

    --radius: 8px;
    /* Approachable roundness */
    --shadow: 0 4px 20px rgba(0, 0, 0, 0.05);

    --font-base: 'Noto Sans JP', sans-serif;
    --transition: all 0.4s ease;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: var(--font-base);
    background-color: var(--bg-body);
    color: var(--text-main);
    line-height: 1.8;
    letter-spacing: 0.04em;
    overflow-x: hidden;
}

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

ul {
    list-style: none;
}

.container {
    width: 90%;
    max-width: 1080px;
    margin: 0 auto;
}

/* Header */
.header {
    background: rgba(255, 255, 255, 0.98);
    padding: 20px 0;
    position: fixed;
    top: 0;
    width: 100%;
    z-index: 1000;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.03);
}

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

.company-name {
    font-size: 1.3rem;
    font-weight: 700;
    color: var(--primary);
    display: flex;
    align-items: center;
    gap: 10px;
}

.nav-list {
    display: flex;
    gap: 30px;
    align-items: center;
}

.nav-link {
    font-size: 0.95rem;
    font-weight: 500;
    color: var(--text-main);
}

.nav-link:hover {
    color: var(--primary);
}

.btn-contact {
    background-color: var(--primary);
    color: var(--white);
    padding: 10px 25px;
    border-radius: 50px;
    font-weight: 700;
    white-space: nowrap;
}

.btn-contact:hover {
    background-color: var(--primary-dark);
    color: var(--white);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(30, 142, 72, 0.3);
}

.mobile-menu-btn {
    display: none;
    background: none;
    border: none;
    flex-direction: column;
    gap: 6px;
    cursor: pointer;
}

.mobile-menu-btn span {
    display: block;
    width: 25px;
    height: 2px;
    background-color: var(--text-main);
    transition: 0.3s ease-in-out;
}

/* Hero Slider */
.hero-slider-section {
    position: relative;
    height: 85vh;
    margin-top: 70px;
    background-color: #000;
    overflow: hidden;
}

.hero-slider {
    width: 100%;
    height: 100%;
    position: relative;
}

.slide {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-size: cover;
    background-position: center;
    opacity: 0;
    visibility: hidden;
    transition: opacity 1s ease-in-out, visibility 1s ease-in-out;
}

.slide.active {
    opacity: 1;
    visibility: visible;
}

.slide-overlay {
    position: absolute;
    inset: 0;
    background: rgba(0, 0, 0, 0.3);
    /* 画像を少し暗くして文字を読みやすく */
}

.slide-content {
    position: relative;
    z-index: 10;
    height: 100%;
    display: flex;
    flex-direction: column;
    justify-content: center;
    color: var(--white);
    text-align: center;
}

.slide-content-left {
    align-items: flex-start;
    text-align: left;
}

.slide-content-top-right {
    justify-content: flex-start;
    align-items: flex-end;
    padding-top: 14vh;
    text-align: right;
    padding-right: 0;
}

.slide-content-top-left {
    justify-content: flex-start;
    align-items: flex-start;
    padding-top: 6.5vh;
    text-align: left;
    margin-left: 12%;
}

.slide-content-top {
    justify-content: flex-start;
    padding-top: 15vh;
    /* テキストを上に寄せる */
}

.slide-title {
    font-size: 2.8rem;
    font-weight: 700;
    line-height: 1.5;
    margin-bottom: 20px;
    text-shadow: 0 2px 10px rgba(0, 0, 0, 0.5);
    animation: fadeUp 1s ease forwards;
}

.slide-title.large-title {
    font-size: 3.5rem;
}

.slide-subtitle {
    font-size: 1.2rem;
    font-weight: 700;
    text-shadow: 0 2px 10px rgba(0, 0, 0, 0.5);
    color: var(--accent);
}

.slide-vision {
    font-size: 1rem;
    letter-spacing: 0.15em;
    font-weight: 700;
    margin-top: 20px;
    text-shadow: 0 2px 10px rgba(0, 0, 0, 0.5);
}

/* Slider Controls */
.slider-controls {
    position: absolute;
    bottom: 30px;
    left: 0;
    width: 100%;
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 20px;
    z-index: 20;
}

.slider-pagination {
    display: flex;
    gap: 8px;
}

.dot {
    width: 35px;
    height: 3px;
    background-color: rgba(255, 255, 255, 0.4);
    cursor: pointer;
    transition: background-color 0.3s;
}

.dot.active {
    background-color: rgba(255, 255, 255, 1);
}

.slider-pause-btn {
    background: none;
    border: none;
    cursor: pointer;
    padding: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.pause-icon {
    width: 12px;
    height: 14px;
    border-left: 3px solid #fff;
    border-right: 3px solid #fff;
    transition: all 0.2s;
}

.pause-icon.play {
    border-right: 0;
    border-left: 12px solid #fff;
    border-top: 7px solid transparent;
    border-bottom: 7px solid transparent;
    height: 0;
    width: 0;
}

/* Sections */
.section {
    padding: 100px 0;
}

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

.section-tag {
    display: inline-block;
    font-size: 0.85rem;
    color: var(--primary);
    background: var(--accent);
    padding: 5px 15px;
    border-radius: 20px;
    margin-bottom: 20px;
    font-weight: 700;
    letter-spacing: 0.05em;
}

.lead-text {
    font-size: 1.8rem;
    font-weight: 700;
    margin-bottom: 30px;
}

/* スマホのみ特定位置で改行させる（参考: display:block方式） */
.sp-br {
    display: inline;
}

/* Philosophy */
.philosophy-content {
    max-width: 700px;
    margin: 0 auto;
}

.philosophy-text {
    color: var(--text-light);
    line-height: 2;
    text-align: center;
}

/* Horizontal Services */
.services-section {
    background-color: var(--bg-light);
}

.horizontal-scroll-wrapper {
    width: 100%;
    padding-bottom: 20px;
}

.service-list {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 30px;
    padding: 0;
    max-width: 1080px;
    margin: 0 auto;
    width: 90%;
}

.service-card {
    width: 100%;
    background: var(--white);
    border-radius: var(--radius);
    overflow: hidden;
    box-shadow: var(--shadow);
    transition: var(--transition);
}

.service-card:hover {
    transform: translateY(-5px);
}

.service-img {
    height: 180px;
    background-color: #eee;
    background-size: cover;
    background-position: center;
}

.service-img.reform {
    background-image: url('images/reform_meeting.png');
}

.service-img.exterior {
    /* オープンでオシャレな家の外観 */
    background-image: url('images/exterior_house.png');
}

.service-img.interior {
    background-image: url('images/interior.png');
}

.service-img.lifeline {
    background-image: url('images/kitchen.png');
}

.service-img.maintain {
    background-image: url('images/bath.png');
}

.service-body {
    padding: 24px;
}

.service-body h3 {
    font-size: 1.1rem;
    margin-bottom: 10px;
    color: var(--primary);
}

.service-body p {
    font-size: 0.9rem;
    color: var(--text-light);
    line-height: 1.6;
}

/* Strengths */
.strengths-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 30px;
}

.strength-item {
    text-align: left;
    padding: 30px 20px;
    background: var(--white);
    border: 1px solid var(--border);
    border-radius: var(--radius);
}

.strength-icon {
    font-size: 2rem;
    color: var(--primary);
    margin-bottom: 15px;
    text-align: center;
}

.strength-item h3 {
    font-size: 1.1rem;
    margin-bottom: 10px;
    text-align: center;
}

.strength-item p {
    font-size: 0.85rem;
    color: var(--text-light);
}


/* Company Profile */
.company-section {
    background-color: var(--bg-light);
}

.company-table {
    width: 100%;
    max-width: 800px;
    margin: 0 auto;
    border-collapse: collapse;
    background: var(--white);
    border-radius: var(--radius);
    overflow: hidden;
    box-shadow: var(--shadow);
}

.company-table th,
.company-table td {
    padding: 20px;
    border-bottom: 1px solid var(--border);
    text-align: left;
}

.company-table th {
    background-color: var(--accent);
    color: var(--primary);
    font-weight: 700;
    width: 30%;
    min-width: 120px;
}

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

/* おすすめポイント (Recommended Section) */
.recommended-section {
    background-color: var(--bg-body);
    scroll-margin-top: 80px;
}

.recommended-title {
    font-size: 1.8rem;
    font-weight: 700;
    letter-spacing: 0.1em;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 15px;
}

.recommended-slash {
    font-weight: 300;
    color: var(--text-main);
    font-size: 2rem;
    line-height: 1;
}

.recommended-nav {
    display: flex;
    justify-content: center;
    gap: 20px;
    margin-bottom: 60px;
}

.recommended-nav-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    width: 25%;
    color: var(--text-main);
}

.recommended-nav-item:hover {
    color: var(--primary);
    transform: translateY(-2px);
}

.nav-num {
    font-size: 3.5rem;
    font-weight: 300;
    color: #DDDDDD;
    line-height: 1;
    margin-bottom: 5px;
    font-family: Arial, sans-serif;
}

.nav-text {
    font-size: 0.95rem;
    font-weight: 700;
    margin-bottom: 15px;
    min-height: 2.8em;
    padding: 0 10px;
}

.nav-arrow {
    display: inline-block;
    width: 14px;
    height: 14px;
    border-bottom: 2px solid #888888;
    border-right: 2px solid #888888;
    transform: rotate(45deg);
    margin-top: auto;
}

.recommended-list {
    display: flex;
    flex-direction: column;
}

.recommended-item {
    display: flex;
    gap: 40px;
    padding: 60px 0;
    border-bottom: 1px solid var(--border);
    align-items: center;
    scroll-margin-top: 100px;
    /* 固定ヘッダー被り防止用 */
}

.recommended-item:last-child {
    border-bottom: none;
    padding-bottom: 0;
}

.recommended-head {
    width: 25%;
    flex-shrink: 0;
}

.recommended-num {
    font-size: 5rem;
    font-weight: 300;
    color: #E5E5E5;
    line-height: 1;
    margin-bottom: 10px;
    letter-spacing: -0.05em;
    font-family: Arial, sans-serif;
}

.recommended-heading {
    font-size: 1.25rem;
    line-height: 1.6;
    font-weight: 700;
}

.recommended-image {
    width: 45%;
    flex-shrink: 0;
}

.image-placeholder {
    width: 100%;
    padding-top: 66%;
    /* 3:2 Aspect Ratio */
    background-color: #f0f0f0;
    background-size: cover;
    background-position: center;
    border-radius: var(--radius);
}

.recommended-desc {
    width: 30%;
}

.recommended-desc p {
    font-size: 0.95rem;
    color: var(--text-main);
    line-height: 1.8;
}

/* Contact */
.contact-phone {
    font-size: 2.5rem;
    font-weight: 700;
    color: var(--primary);
    margin: 20px 0;
    display: block;
}

/* Footer */
.footer {
    background: #333;
    color: #fff;
    padding: 50px 0;
    text-align: center;
    font-size: 0.9rem;
}

/* Animation */
@keyframes fadeUp {
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.fade-in {
    opacity: 0;
    transform: translateY(20px);
    transition: opacity 0.8s, transform 0.8s;
}

.fade-in.visible {
    opacity: 1;
    transform: translateY(0);
}

@media (max-width: 900px) {
    .recommended-nav {
        flex-wrap: wrap;
    }

    .recommended-nav-item {
        width: 45%;
        margin-bottom: 20px;
    }

    .recommended-item {
        flex-direction: column;
        gap: 20px;
        align-items: flex-start;
        padding: 40px 0;
    }

    .recommended-head,
    .recommended-image,
    .recommended-desc {
        width: 100%;
    }

    .recommended-num {
        font-size: 4rem;
    }
}

@media (max-width: 768px) {

    /* スマホのみsp-brをブロック要素にして特定位置で改行 */
    .sp-br {
        display: block;
    }

    /* スマホではPC用の文間brを非表示にして二重改行を防ぐ */
    br.pc-br {
        display: none;
    }

    /* 見出し「ちゃんとした仕事」を小さくして2行で収まるように調整 */
    .philosophy .lead-text {
        font-size: 1.4rem;
    }

    .nav {
        position: fixed;
        top: 0;
        right: -100%;
        width: 80%;
        max-width: 300px;
        height: 100vh;
        background-color: var(--white);
        box-shadow: -5px 0 15px rgba(0, 0, 0, 0.1);
        transition: 0.4s ease-in-out;
        z-index: 999;
        display: flex;
        flex-direction: column;
        justify-content: flex-start;
        padding: 100px 40px 40px 40px;
    }

    .nav.active {
        right: 0;
    }

    .nav-list {
        flex-direction: column;
        gap: 25px;
    }

    .mobile-menu-btn {
        display: flex;
        z-index: 1000;
    }

    /* Animate Hamburger to X */
    .mobile-menu-btn.active span:nth-child(1) {
        transform: translateY(8px) rotate(45deg);
    }

    .mobile-menu-btn.active span:nth-child(2) {
        opacity: 0;
    }

    .mobile-menu-btn.active span:nth-child(3) {
        transform: translateY(-8px) rotate(-45deg);
    }

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

    .hero-slider-section {
        height: 70vh;
    }

    .slide-title {
        font-size: 2rem;
    }

    .slide-title.large-title {
        font-size: 1.9rem;
    }

    .slide-vision {
        margin-top: 6px;
        letter-spacing: 0.28em;
        font-size: 0.9rem;
    }

    .slide-subtitle {
        font-size: 1rem;
    }

    .dot {
        width: 25px;
    }

    .company-table th,
    .company-table td {
        display: block;
        width: 100%;
    }

    .company-table th {
        background: transparent;
        color: var(--text-light);
        padding-bottom: 5px;
    }

    .company-table td {
        padding-top: 0;
    }

    .company-table tr:last-child th {
        border-bottom: 1px solid var(--border);
    }

    /* おすすめポイント (スマホ用文字サイズ・レイアウト調整) */
    .recommended-title {
        font-size: 1.3rem;
        gap: 10px;
    }

    .recommended-slash {
        font-size: 1.4rem;
    }

    .recommended-nav {
        gap: 10px;
        margin-bottom: 40px;
    }

    .recommended-nav-item {
        width: 48%;
    }

    .nav-num {
        font-size: 2.5rem;
    }

    .nav-text {
        font-size: 0.85rem;
        min-height: auto;
        padding: 0 5px;
    }

    .recommended-item {
        padding: 30px 0;
        gap: 15px;
    }

    .recommended-num {
        font-size: 3.5rem;
        margin-bottom: 5px;
    }

    .recommended-heading {
        font-size: 1.1rem;
    }

    .recommended-desc p {
        font-size: 0.9rem;
        line-height: 1.6;
    }
}

/* Modal */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.6);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 2000;
    opacity: 0;
    visibility: hidden;
    transition: var(--transition);
}

.modal-overlay.active {
    opacity: 1;
    visibility: visible;
}

.modal-content {
    background: var(--white);
    width: 90%;
    max-width: 600px;
    border-radius: var(--radius);
    padding: 40px;
    position: relative;
    transform: translateY(-20px);
    transition: var(--transition);
    max-height: 90vh;
    overflow-y: auto;
}

.modal-overlay.active .modal-content {
    transform: translateY(0);
}

.modal-close {
    position: absolute;
    top: 20px;
    right: 25px;
    font-size: 2rem;
    cursor: pointer;
    line-height: 1;
    color: var(--text-light);
    transition: color 0.3s;
}

.modal-close:hover {
    color: var(--text-main);
}

.modal-title {
    font-size: 1.5rem;
    font-weight: 700;
    margin-bottom: 30px;
    color: var(--primary);
    text-align: center;
}

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

.contact-form label {
    display: block;
    margin-bottom: 8px;
    font-weight: 700;
    font-size: 0.95rem;
}

.contact-form .required {
    background: #e74c3c;
    color: white;
    font-size: 0.75rem;
    padding: 2px 6px;
    border-radius: 4px;
    margin-left: 10px;
    vertical-align: middle;
}

.contact-form input,
.contact-form textarea {
    width: 100%;
    padding: 12px;
    border: 1px solid var(--border);
    border-radius: 4px;
    font-family: inherit;
    font-size: 1rem;
    transition: border-color 0.3s;
}

.contact-form input:focus,
.contact-form textarea:focus {
    outline: none;
    border-color: var(--primary);
}

.contact-form .form-submit {
    text-align: center;
    margin-top: 30px;
}

.btn-submit {
    background: var(--primary);
    color: var(--white);
    border: none;
    padding: 15px 50px;
    font-size: 1.1rem;
    font-weight: 700;
    border-radius: 50px;
    cursor: pointer;
    transition: var(--transition);
}

.btn-submit:hover {
    background: var(--primary-dark);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(30, 142, 72, 0.3);
}

@media (max-width: 768px) {
    .modal-content {
        padding: 30px 20px;
    }
}