/* -----------------------------------------------
   基本設定 & 変数
----------------------------------------------- */
:root {
    --navy: #223670;
    --sky: #56A3E2;
    --white: #ffffff;
    --bg-light: #f4f7fc;
    --text-main: #2c3e50;
    --text-sub: #5f6d7a;
    --shadow: 0 10px 30px rgba(34, 54, 112, 0.05);
    --shadow-heavy: 0 20px 50px rgba(34, 54, 112, 0.12);
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    text-decoration: none !important;
    list-style: none !important;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: 'Noto Sans JP', sans-serif;
    color: var(--text-main);
    line-height: 1.8;
    background-color: var(--white);
    overflow-x: hidden;
    font-size: 16px;
}

.container {
    max-width: 1140px;
    margin: 0 auto;
    padding: 0 25px;
}

.font-serif {
    font-family: 'Shippori Mincho', serif;
}

/* -----------------------------------------------
   アニメーション
----------------------------------------------- */
.floating-hover {
    transition: transform 0.45s cubic-bezier(0.23, 1, 0.32, 1),
        box-shadow 0.45s cubic-bezier(0.23, 1, 0.32, 1),
        background-color 0.3s ease;
}

.floating-hover:hover {
    transform: translateY(-10px);
    box-shadow: var(--shadow-heavy);
}

/* -----------------------------------------------
   ナビゲーション
----------------------------------------------- */
.navbar {
    position: fixed;
    top: 0;
    width: 100%;
    z-index: 1000;
    padding: 25px 0;
    transition: 0.4s;
    background: transparent;
}

.navbar.scrolled {
    background: rgba(255, 255, 255, 0.98);
    padding: 15px 0;
    box-shadow: 0 2px 20px rgba(34, 54, 112, 0.05);
    backdrop-filter: blur(10px);
}

.nav-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo {
    display: flex;
    align-items: center;
    gap: 12px;
    position: relative;
    z-index: 1001;
}

.logo-icon {
    width: 44px;
    height: 44px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    overflow: hidden;
}

.logo-icon img {
    width: 100%;
    height: 100%;
    object-fit: contain;
}

.placeholder-svg {
    width: 100%;
    height: 100%;
}

.logo-main {
    font-family: 'Shippori Mincho', serif;
    font-size: 22px;
    font-weight: bold;
    color: var(--navy);
    display: block;
    line-height: 1.2;
}

.logo-sub {
    font-size: 12px;
    letter-spacing: 0.15em;
    color: var(--text-sub);
}

.nav-links {
    display: flex;
    align-items: center;
    gap: 25px;
}

.nav-links a {
    font-weight: 500;
    font-size: 15px;
    color: var(--navy);
    transition: color 0.3s;
}

.nav-links a:hover {
    color: var(--sky);
}

.btn-consult {
    background: var(--navy);
    color: white !important;
    padding: 15px 30px;
    border-radius: 50px;
    font-size: 15px;
    transition: 0.3s ease;
    display: inline-block;
    border: none;
    cursor: pointer;
    text-align: center;
}

.btn-consult:hover {
    background: var(--sky) !important;
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(86, 163, 226, 0.3);
}

/* -----------------------------------------------
   ハンバーガーメニュー
----------------------------------------------- */
.hamburger {
    display: none;
    cursor: pointer;
    background: none;
    border: none;
    padding: 10px;
    position: relative;
    z-index: 1100;
}

.hamburger .bar {
    display: block;
    width: 25px;
    height: 2px;
    margin: 5px 0;
    background-color: var(--navy);
    transition: 0.3s;
}

/* -----------------------------------------------
   詳細ビュー (SPA構成)
----------------------------------------------- */
#detail-view {
    padding-top: 180px;
    background-color: var(--bg-light);
    min-height: 100vh;
}

.detail-container {
    padding-bottom: 80px;
}

.btn-back {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    padding: 12px 30px;
    background: var(--navy);
    color: white;
    border: none;
    border-radius: 50px;
    font-weight: bold;
    font-size: 15px;
    cursor: pointer;
    margin-bottom: 50px;
    transition: 0.3s ease;
    box-shadow: var(--shadow);
}

.btn-back:hover {
    background: var(--sky);
    transform: translateY(-3px);
    box-shadow: var(--shadow-heavy);
}

.detail-footer-btns {
    text-align: center;
    margin-top: 60px;
}

/* 詳細ヘッダー：以前のサイズ（height: 400px）に戻す */
.detail-header {
    position: relative;
    height: 400px;
    border-radius: 30px;
    overflow: hidden;
    margin-bottom: 50px;
    box-shadow: var(--shadow-heavy);
}

.detail-header img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.detail-overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(to top, rgba(34, 54, 112, 0.9), rgba(34, 54, 112, 0.2));
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
    padding: 50px;
    color: white;
}

.detail-overlay h1 {
    font-size: 42px;
    font-family: 'Shippori Mincho', serif;
    line-height: 1.3;
}

.detail-body {
    background: white;
    padding: 60px;
    border-radius: 30px;
    box-shadow: var(--shadow);
}

.detail-body h2 {
    font-size: 32px;
    color: var(--navy);
    margin-bottom: 30px;
    border-left: 5px solid var(--sky);
    padding-left: 20px;
}

.detail-body p {
    font-size: 17px;
    color: var(--text-main);
    margin-bottom: 25px;
    line-height: 1.9;
}

.benefits-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 20px;
    margin: 40px 0;
}

.benefit-item {
    background: var(--bg-light);
    padding: 20px;
    border-radius: 15px;
    font-weight: bold;
    color: var(--navy);
}

/* -----------------------------------------------
   ヒーローセクション
----------------------------------------------- */
.hero {
    height: 100vh;
    min-height: 750px;
    display: flex;
    align-items: center;
    position: relative;
    text-align: center;
}

.hero-bg {
    position: absolute;
    inset: 0;
    background: url('images/hero.jpg') no-repeat center/cover;
    background-color: var(--bg-light);
    z-index: -1;
}

.hero-bg::after {
    content: '';
    position: absolute;
    inset: 0;
    background: rgba(255, 255, 255, 0.65);
}

.hero-content {
    max-width: 800px;
    margin: 0 auto;
}

.hero h1 {
    font-size: 68px;
    color: var(--navy);
    line-height: 1.15;
    margin-bottom: 35px;
    text-shadow: 0 0 15px rgba(255, 255, 255, 1), 0 0 30px rgba(255, 255, 255, 0.8);
}

.text-sky {
    color: var(--sky);
}

.hero p {
    font-size: 20px;
    color: var(--navy);
    margin-bottom: 45px;
    font-weight: 500;
    text-shadow: 0 0 10px rgba(255, 255, 255, 1);
}

.hero-btns {
    display: flex;
    gap: 20px;
    justify-content: center;
}

.btn {
    padding: 18px 40px;
    border-radius: 50px;
    font-weight: bold;
    text-align: center;
    cursor: pointer;
    transition: 0.3s;
    font-size: 16px;
    display: inline-block;
}

.btn-navy {
    background: var(--navy);
    color: white;
}

.btn-navy:hover {
    background: var(--sky);
}

/* -----------------------------------------------
   セクション共通
----------------------------------------------- */
section {
    padding: 100px 0;
    scroll-margin-top: 80px;
}

.section-title {
    text-align: center;
    margin-bottom: 70px;
}

.subtitle {
    display: block;
    color: var(--sky);
    font-weight: bold;
    letter-spacing: 0.2em;
    text-transform: uppercase;
    font-size: 14px;
    margin-bottom: 10px;
}

.section-title h2 {
    font-size: 45px;
    color: var(--navy);
}

.title-line {
    width: 45px;
    height: 3px;
    background: var(--sky);
    margin: 25px auto;
}

/* -----------------------------------------------
   事業案内
----------------------------------------------- */
.services {
    background-color: var(--bg-light);
}

.services-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 30px;
}

.service-card {
    background: white;
    padding: 45px;
    border-radius: 25px;
    box-shadow: var(--shadow);
    cursor: pointer;
    display: flex;
    flex-direction: column;
    scroll-margin-top: 100px;
}

.service-icon {
    width: 60px;
    height: 60px;
    margin-bottom: 25px;
    color: var(--sky);
    background: #eff6ff;
    padding: 15px;
    border-radius: 15px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.service-icon svg {
    width: 100%;
    height: 100%;
}

.service-card h3 {
    font-size: 24px;
    margin-bottom: 20px;
    color: var(--navy);
    line-height: 1.3;
}

.service-card p {
    color: var(--text-sub);
    font-size: 15px;
    margin-bottom: 25px;
    flex-grow: 1;
}

.read-more {
    font-weight: bold;
    color: var(--navy);
    font-size: 14px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.service-card:hover .read-more {
    color: var(--sky);
}

.service-card:hover .service-icon {
    background: var(--navy);
    color: white;
}

/* -----------------------------------------------
   私たちの強み
----------------------------------------------- */
.strengths-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 40px;
}

.strength-card {
    text-align: center;
    padding: 50px 35px;
    background: #ffffff;
    border: 1px solid #eef2f6;
    border-radius: 35px;
}

.strength-icon {
    width: 70px;
    height: 70px;
    margin: 0 auto 25px;
    color: var(--navy);
}

.strength-icon svg {
    width: 100%;
    height: 100%;
}

.strength-card h3 {
    font-size: 24px;
    margin-bottom: 18px;
    color: var(--navy);
}

.strength-card p {
    color: var(--text-sub);
    font-size: 15px;
}

/* -----------------------------------------------
   お知らせセクション
----------------------------------------------- */
.news {
    background-color: var(--white);
    scroll-margin-top: 80px;
}

.news-list {
    max-width: 900px;
    margin: 0 auto;
}

.news-item {
    display: flex;
    align-items: center;
    padding: 25px 15px;
    border-bottom: 1px solid #eee;
    transition: 0.3s;
    color: var(--text-main);
    overflow: hidden;
}

.news-item:hover {
    background-color: #f8fbff;
    padding-left: 25px;
}

.news-date {
    font-size: 14px;
    color: var(--text-sub);
    width: 100px;
    flex-shrink: 0;
}

.news-category {
    font-size: 11px;
    padding: 4px 12px;
    border-radius: 4px;
    margin-right: 20px;
    font-weight: bold;
    flex-shrink: 0;
    text-align: center;
    min-width: 80px;
}

.cat-law {
    background: #fee2e2;
    color: #b91c1c;
}

.cat-grant {
    background: #dcfce7;
    color: #15803d;
}

.cat-info {
    background: #f3f4f6;
    color: #374151;
}

.news-title {
    font-size: 16px;
    font-weight: 500;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    flex-grow: 1;
}

.news-footer {
    text-align: center;
    margin-top: 40px;
}

.btn-text {
    color: var(--navy);
    font-weight: bold;
    font-size: 15px;
    display: inline-flex;
    align-items: center;
    gap: 8px;
}

/* -----------------------------------------------
   事務所概要
----------------------------------------------- */
.about {
    background-color: var(--bg-light);
}

.about-container {
    display: flex;
    gap: 80px;
    align-items: flex-start;
}

.about-image {
    flex: 1;
}

.about-image img {
    width: 100%;
    height: auto;
    display: block;
    border-radius: 40px;
    box-shadow: 0 30px 60px rgba(34, 54, 112, 0.1);
}

.about-content {
    flex: 1;
}

.about-content .lead {
    font-size: 27px;
    color: var(--navy);
    margin-bottom: 25px;
}

.about-info {
    margin-top: 45px;
    border-top: 1px solid #eee;
    padding-top: 30px;
}

.info-item {
    display: flex;
    margin-bottom: 20px;
    font-size: 15px;
}

.info-item label {
    width: 110px;
    font-weight: bold;
    color: var(--sky);
}

/* -----------------------------------------------
   お問い合わせ
----------------------------------------------- */
.contact {
    background-color: var(--navy);
    text-align: center;
    scroll-margin-top: 80px;
}

.text-white {
    color: white !important;
}

.contact-box {
    background: white;
    max-width: 850px;
    margin: 0 auto;
    padding: 80px 50px;
    border-radius: 40px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.1);
}

.contact-icon {
    margin-bottom: 30px;
    display: flex;
    justify-content: center;
}

.contact-box h3 {
    font-size: 32px;
    color: var(--navy);
    margin-bottom: 20px;
}

.contact-box p {
    color: var(--text-sub);
    margin-bottom: 15px;
    font-size: 16px;
}

.contact-subtext {
    font-size: 14px;
    color: var(--text-sub);
    margin-bottom: 40px;
    opacity: 0.8;
}

.btn-large {
    font-size: 18px;
    padding: 20px 60px;
    display: inline-block;
}

/* -----------------------------------------------
   フッター
----------------------------------------------- */
.footer {
    padding: 80px 0 40px;
    background: #fff;
    border-top: 1px solid #eee;
}

.footer-content {
    display: flex;
    justify-content: space-between;
    margin-bottom: 40px;
}

.footer-logo {
    font-size: 26px;
    color: var(--navy);
    margin-bottom: 15px;
    font-weight: bold;
}

.footer-address {
    font-style: normal;
    font-size: 14px;
    color: var(--text-sub);
    line-height: 1.6;
}

.footer-nav ul {
    display: flex;
    flex-direction: column;
    gap: 10px;
    text-align: right;
}

.footer-nav a {
    font-size: 14px;
    color: var(--text-sub);
}

.footer-bottom {
    padding-top: 30px;
    border-top: 1px solid #f4f4f4;
    text-align: center;
}

.copyright {
    font-size: 12px;
    color: #999;
}

/* -----------------------------------------------
   レスポンス
----------------------------------------------- */
@media (max-width: 1024px) {
    .hero h1 {
        font-size: 52px;
    }

    .services-grid,
    .strengths-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .about-container {
        flex-direction: column;
        gap: 50px;
    }
}

@media (max-width: 768px) {
    .navbar {
        padding: 15px 0;
        background: rgba(255, 255, 255, 0.98);
        backdrop-filter: blur(10px);
        box-shadow: 0 2px 20px rgba(34, 54, 112, 0.05);
    }

    .hamburger {
        display: block;
    }

    .nav-links {
        position: fixed;
        top: 0;
        right: 0;
        height: 100vh;
        width: 100%;
        background-color: white;
        flex-direction: column;
        justify-content: center;
        align-items: center;
        gap: 30px;
        transform: translateX(100%);
        transition: transform 0.4s cubic-bezier(0.23, 1, 0.32, 1);
        z-index: 1050;
    }

    .nav-links.active {
        transform: translateX(0);
    }

    .nav-links li {
        width: 100%;
        display: flex;
        justify-content: center;
    }

    .nav-links a {
        font-size: 20px;
        font-weight: bold;
    }

    .btn-consult {
        padding: 15px 30px;
        width: auto;
        min-width: 250px;
        max-width: 85%;
        display: block;
        margin: 0 auto;
        text-align: center;
    }

    .hamburger.active .bar:nth-child(2) {
        opacity: 0;
    }

    .hamburger.active .bar:nth-child(1) {
        transform: translateY(7px) rotate(45deg);
    }

    .hamburger.active .bar:nth-child(3) {
        transform: translateY(-7px) rotate(-45deg);
    }

    section {
        padding: 60px 0;
        scroll-margin-top: 70px;
    }

    .section-title {
        margin-bottom: 40px;
    }

    .section-title h2 {
        font-size: 32px;
    }

    .title-line {
        margin: 15px auto;
    }

    .news-item {
        flex-direction: column;
        align-items: flex-start;
        padding: 20px 10px;
    }

    .news-date {
        width: auto;
        margin-bottom: 6px;
        font-size: 13px;
    }

    .news-category {
        margin-right: 0;
        margin-bottom: 10px;
        display: inline-block;
    }

    .news-title {
        font-size: 15px;
        line-height: 1.5;
        font-weight: 500;
        display: block;
        width: 100%;
        white-space: normal;
        overflow: visible;
        text-overflow: clip;
    }

    .hero {
        min-height: 500px;
        height: auto;
        padding: 120px 0 80px;
    }

    .hero h1 {
        font-size: 38px;
        margin-bottom: 25px;
    }

    .hero p {
        font-size: 16px;
        margin-bottom: 30px;
    }

    .hero-btns {
        flex-direction: column;
        gap: 15px;
        padding: 0 20px;
    }

    .services-grid,
    .strengths-grid {
        grid-template-columns: 1fr;
        gap: 20px;
    }

    .service-card {
        padding: 30px 20px;
        scroll-margin-top: 80px;
    }

    #detail-view {
        padding-top: 100px;
    }

    .detail-body {
        padding: 30px 20px;
        border-radius: 20px;
    }

    .detail-body h2 {
        font-size: 28px;
    }

    .detail-header {
        height: 250px;
        border-radius: 20px;
        margin-bottom: 30px;
    }

    .detail-overlay {
        padding: 20px;
    }

    .detail-overlay h1 {
        font-size: 24px;
    }

    .contact-box {
        padding: 40px 20px;
        border-radius: 25px;
    }

    .contact-box h3 {
        font-size: 24px;
    }

    .btn-large {
        padding: 15px 26px;
        font-size: 16px;
        width: 100%;
    }

    .footer {
        padding: 40px 0 20px;
    }

    .footer-content {
        flex-direction: column;
        align-items: center;
        text-align: center;
        gap: 40px;
    }

    .footer-info {
        width: 100%;
    }

    .footer-nav ul {
        text-align: center;
        align-items: center;
    }

    .footer-address {
        font-size: 13px;
    }
}