/* ベーススタイル */
:root {
    --primary-color: #4a90e2;
    --secondary-color: #6c757d;
    --accent-color: #4CAF50;
    --light-color: #f8f9fa;
    --dark-color: #333;
    --text-color: #495057;
    --border-color: #e9ecef;
    --shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    --hover-shadow: 0 5px 15px rgba(0, 0, 0, 0.15);
    --transition: all 0.3s ease;
    --font-family-sans: 'Noto Sans JP', sans-serif;
    --font-family-serif: 'Noto Serif JP', serif;
    --container-width: 1200px;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
    scroll-padding-top: 80px; /* ヘッダーの高さ分 */
}

body {
    font-family: var(--font-family-sans);
    font-size: 16px;
    line-height: 1.6;
    color: var(--text-color);
    overflow-x: hidden;
}

h1, h2, h3, h4, h5, h6 {
    font-weight: 700;
    line-height: 1.3;
    margin-bottom: 1rem;
    color: var(--dark-color);
}

p {
    margin-bottom: 1.5rem;
}

a {
    color: var(--primary-color);
    text-decoration: none;
    transition: var(--transition);
}

a:hover {
    color: var(--dark-color);
}

img {
    max-width: 100%;
    height: auto;
    display: block;
}

ul {
    list-style: none;
}

.container {
    width: 100%;
    max-width: var(--container-width);
    margin: 0 auto;
    padding: 0 20px;
}

.section {
    padding: 100px 0;
}

.section-title {
    font-size: 2.5rem;
    text-align: center;
    margin-bottom: 0.5rem;
    position: relative;
}

.section-subtitle {
    font-size: 1.2rem;
    text-align: center;
    color: var(--secondary-color);
    margin-bottom: 50px;
}

.btn {
    display: inline-block;
    padding: 12px 30px;
    border-radius: 4px;
    font-weight: 600;
    font-size: 16px;
    cursor: pointer;
    transition: var(--transition);
    text-align: center;
    border: none;
}

.btn-primary {
    background-color: var(--primary-color);
    color: white;
}

.btn-primary:hover {
    background-color: #3a7bc8;
    color: white;
    transform: translateY(-2px);
    box-shadow: var(--hover-shadow);
}

.btn-outline {
    background-color: transparent;
    color: white;
    border: 2px solid white;
}

.btn-outline:hover {
    background-color: white;
    color: var(--primary-color);
    transform: translateY(-2px);
    box-shadow: var(--hover-shadow);
}

.btn-accent {
    background-color: var(--accent-color);
    color: white;
}

.btn-accent:hover {
    background-color: #3d9d40;
    color: white;
    transform: translateY(-2px);
    box-shadow: var(--hover-shadow);
}

/* ヘッダースタイル */
.header {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1000;
    padding: 20px 0;
    transition: var(--transition);
}

.header.fixed {
    position: fixed;
    background-color: white;
    box-shadow: var(--shadow);
    padding: 15px 0;
}

.header.fixed .logo h1 {
    color: var(--dark-color);
}

.header.fixed nav ul li a {
    color: var(--text-color);
}

.header.fixed nav ul li a:hover {
    color: var(--primary-color);
}

.header.fixed .nav-toggle span {
    background-color: var(--dark-color);
}

.header-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo h1 {
    font-size: 1.8rem;
    color: white;
    font-weight: 700;
    transition: var(--transition);
}

nav ul {
    display: flex;
}

nav ul li {
    margin-left: 30px;
}

nav ul li a {
    color: white;
    font-weight: 500;
    padding: 5px 0;
    position: relative;
}

nav ul li a::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 0;
    height: 2px;
    background-color: var(--primary-color);
    transition: var(--transition);
}

nav ul li a:hover::after {
    width: 100%;
}

.nav-toggle {
    display: none;
    background: none;
    border: none;
    cursor: pointer;
    padding: 0;
    width: 30px;
    height: 20px;
    position: relative;
}

.nav-toggle span {
    display: block;
    width: 100%;
    height: 2px;
    background-color: white;
    position: absolute;
    left: 0;
    transition: var(--transition);
}

.nav-toggle span:nth-child(1) {
    top: 0;
}

.nav-toggle span:nth-child(2) {
    top: 9px;
}

.nav-toggle span:nth-child(3) {
    top: 18px;
}

/* ヒーローセクション */
.hero {
    height: 100vh;
    background-image: url('hero-background.jpg');
    background-size: cover;
    background-position: center;
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    color: white;
}

.hero-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: rgba(0, 0, 0, 0.6);
    z-index: 1;
}

.hero-content {
    position: relative;
    z-index: 2;
    max-width: 800px;
    padding: 0 20px;
}

.hero-content h1 {
    font-size: 3.5rem;
    margin-bottom: 1.5rem;
    color: white;
    font-family: var(--font-family-serif);
}

.hero-content p {
    font-size: 1.5rem;
    margin-bottom: 2rem;
}

.hero-buttons {
    display: flex;
    justify-content: center;
    gap: 20px;
}

.fade-in {
    animation: fadeIn 1.5s ease-out forwards;
    opacity: 0;
}

@keyframes fadeIn {
    0% {
        opacity: 0;
        transform: translateY(20px);
    }
    100% {
        opacity: 1;
        transform: translateY(0);
    }
}

.hero-content h1.fade-in {
    animation-delay: 0.2s;
}

.hero-content p.fade-in {
    animation-delay: 0.4s;
}

.hero-buttons.fade-in {
    animation-delay: 0.6s;
}

/* 事務所紹介セクション */
.about {
    background-color: white;
}

.about-content {
    display: flex;
    gap: 50px;
    align-items: center;
}

.about-text {
    flex: 1;
}

.about-image {
    flex: 1;
    border-radius: 8px;
    overflow: hidden;
}

.profile-details {
    margin-top: 30px;
}

.profile-item {
    display: flex;
    align-items: flex-start;
    margin-bottom: 20px;
}

.profile-icon {
    font-size: 1.2rem;
    color: var(--primary-color);
    margin-right: 15px;
    width: 30px;
    height: 30px;
    display: flex;
    align-items: center;
    justify-content: center;
    background-color: rgba(74, 144, 226, 0.1);
    border-radius: 50%;
}

.profile-item strong {
    color: var(--dark-color);
    font-weight: 700;
}

/* サービスセクション */
.services {
    background-color: var(--light-color);
}

.services-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(350px, 1fr));
    gap: 30px;
}

.service-card {
    background-color: white;
    border-radius: 8px;
    padding: 30px;
    box-shadow: var(--shadow);
    transition: var(--transition);
}

.service-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--hover-shadow);
}

.service-icon {
    font-size: 2rem;
    color: var(--primary-color);
    margin-bottom: 20px;
    width: 70px;
    height: 70px;
    display: flex;
    align-items: center;
    justify-content: center;
    background-color: rgba(74, 144, 226, 0.1);
    border-radius: 50%;
}

.service-card h3 {
    font-size: 1.5rem;
    margin-bottom: 15px;
}

.read-more {
    display: inline-block;
    font-weight: 500;
    color: var(--primary-color);
    margin-top: 10px;
}

.read-more i {
    font-size: 0.8rem;
    margin-left: 5px;
    transition: var(--transition);
}

.read-more:hover i {
    transform: translateX(5px);
}

/* オンライン相談セクション */
.online-consultation {
    background-color: white;
}

.online-content {
    display: flex;
    gap: 50px;
    align-items: center;
}

.online-text {
    flex: 1;
}

.online-image {
    flex: 1;
    border-radius: 8px;
    overflow: hidden;
}

.online-text h3 {
    font-size: 1.8rem;
    margin-bottom: 20px;
    color: var(--dark-color);
}

.online-steps {
    margin-top: 30px;
}

.step {
    display: flex;
    gap: 20px;
    margin-bottom: 25px;
}

.step-number {
    width: 40px;
    height: 40px;
    background-color: var(--primary-color);
    color: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 1.2rem;
    flex-shrink: 0;
}

.step-content h4 {
    font-size: 1.2rem;
    margin-bottom: 8px;
}

/* FAQ スタイル */
.faq-container {
    max-width: 800px;
    margin: 0 auto;
}

.faq-item {
    margin-bottom: 20px;
    border-radius: 8px;
    box-shadow: var(--shadow);
    background-color: white;
    overflow: hidden;
}

.faq-question {
    padding: 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    cursor: pointer;
    transition: var(--transition);
}

.faq-question:hover {
    background-color: rgba(74, 144, 226, 0.05);
}

.faq-question h3 {
    margin: 0;
    font-size: 1.1rem;
    flex: 1;
}

.faq-icon {
    width: 24px;
    height: 24px;
    border-radius: 50%;
    background-color: rgba(74, 144, 226, 0.1);
    color: var(--primary-color);
    display: flex;
    align-items: center;
    justify-content: center;
    transition: var(--transition);
}

.faq-answer {
    padding: 0 20px 20px;
    border-top: 1px solid var(--border-color);
}

.faq-answer p {
    margin-top: 15px;
    margin-bottom: 0;
}

/* 料金セクション */
.pricing {
    background-color: var(--light-color);
}

.pricing-table {
    width: 100%;
    border-collapse: collapse;
    background-color: white;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: var(--shadow);
}

.pricing-table th, .pricing-table td {
    padding: 15px 20px;
    text-align: left;
    border-bottom: 1px solid var(--border-color);
}

.pricing-table th {
    background-color: var(--primary-color);
    color: white;
    font-weight: 600;
}

.pricing-table tr:last-child td {
    border-bottom: none;
}

.pricing-notes {
    margin-top: 20px;
    font-size: 0.9rem;
    color: var(--secondary-color);
}

.pricing-notes p {
    margin-bottom: 8px;
}

/* お問い合わせセクション */
.contact {
    background-color: var(--light-color);
}

.contact-content {
    display: flex;
    gap: 50px;
}

.contact-info {
    flex: 1;
}

.map {
    flex: 1;
    border-radius: 8px;
    overflow: hidden;
    height: 450px;
}

.map iframe {
    width: 100%;
    height: 100%;
    border: none;
}

.contact-info h3 {
    font-size: 1.8rem;
    margin-bottom: 25px;
}

.contact-method {
    display: flex;
    margin-bottom: 25px;
}

.contact-icon {
    width: 50px;
    height: 50px;
    background-color: rgba(74, 144, 226, 0.1);
    color: var(--primary-color);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.2rem;
    margin-right: 15px;
    flex-shrink: 0;
}

.contact-details h4 {
    font-size: 1rem;
    margin-bottom: 5px;
}

.contact-details p, .contact-details a {
    color: var(--text-color);
}

.contact-buttons {
    margin-top: 30px;
}

/* フッター */
footer {
    background-color: var(--dark-color);
    color: #ccc;
    padding: 70px 0 20px;
}

.footer-container {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    gap: 30px;
    margin-bottom: 50px;
}

.footer-column h4 {
    color: white;
    font-size: 1.2rem;
    margin-bottom: 20px;
    padding-bottom: 10px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.footer-column p {
    margin-bottom: 8px;
}

.footer-column ul li {
    margin-bottom: 10px;
}

.footer-column ul li a {
    color: #ccc;
}

.footer-column ul li a:hover {
    color: white;
}

.social-icons {
    display: flex;
    gap: 15px;
    margin-top: 15px;
}

.social-icon {
    width: 40px;
    height: 40px;
    background-color: rgba(255, 255, 255, 0.1);
    color: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: var(--transition);
}

.social-icon:hover {
    background-color: var(--primary-color);
    color: white;
    transform: translateY(-3px);
}

.copyright {
    text-align: center;
    padding-top: 20px;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
}

/* バックトゥトップボタン */
.back-to-top {
    position: fixed;
    bottom: 30px;
    right: 30px;
    width: 50px;
    height: 50px;
    background-color: var(--primary-color);
    color: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.2rem;
    opacity: 0;
    visibility: hidden;
    transition: var(--transition);
    box-shadow: var(--shadow);
    z-index: 900;
}

.back-to-top.visible {
    opacity: 1;
    visibility: visible;
}

.back-to-top:hover {
    background-color: var(--dark-color);
    color: white;
    transform: translateY(-5px);
    box-shadow: var(--hover-shadow);
}

/* レスポンシブデザイン */
@media (max-width: 1024px) {
    .section {
        padding: 80px 0;
    }
    
    .section-title {
        font-size: 2.2rem;
    }
    
    .about-content, 
    .online-content,
    .contact-content {
        flex-direction: column;
    }
    
    .about-image, 
    .online-image {
        margin-top: 30px;
    }
    
    .map {
        height: 350px;
    }
}

@media (max-width: 768px) {
    .header-content {
        position: relative;
    }
    
    nav {
        position: absolute;
        top: 100%;
        left: 0;
        right: 0;
        background-color: white;
        box-shadow: var(--shadow);
        padding: 20px;
        border-radius: 8px;
        opacity: 0;
        visibility: hidden;
        transform: translateY(20px);
        transition: var(--transition);
    }
    
    nav.active {
        opacity: 1;
        visibility: visible;
        transform: translateY(0);
    }
    
    nav ul {
        flex-direction: column;
    }
    
    nav ul li {
        margin: 0;
        margin-bottom: 15px;
    }
    
    nav ul li:last-child {
        margin-bottom: 0;
    }
    
    nav ul li a {
        color: var(--text-color);
        display: block;
        padding: 8px 0;
    }
    
    .nav-toggle {
        display: block;
    }
    
    .hero-content h1 {
        font-size: 2.5rem;
    }
    
    .hero-content p {
        font-size: 1.2rem;
    }
    
    .hero-buttons {
        flex-direction: column;
        gap: 15px;
    }
    
    .services-grid {
        grid-template-columns: 1fr;
    }
    
    .footer-container {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 480px) {
    .section-title {
        font-size: 1.8rem;
    }
    
    .hero-content h1 {
        font-size: 2rem;
    }
    
    .hero-content p {
        font-size: 1rem;
    }
    
    .pricing-table th, .pricing-table td {
        padding: 10px;
        font-size: 0.9rem;
    }
    
    .back-to-top {
        width: 40px;
        height: 40px;
        bottom: 20px;
        right: 20px;
    }
}

/* まずは通常はダーク版のみ表示 */
.logo-light { display: none; }
.logo-dark  { display: inline-block; }

/* ヒーロー上（ヘッダーが固定されていない間）は白版を表示 */
.header:not(.fixed) .logo-dark  { display: none; }
.header:not(.fixed) .logo-light { display: inline-block; }

/* 見やすさ向上のための微調整（任意） */
.header:not(.fixed) .logo-light {
  filter: drop-shadow(0 1px 2px rgba(0,0,0,.35));
}

.logo-link img {
  height: 50px;       /* ここでお好みの高さに調整（例：40px） */
  width: auto;        /* アスペクト比維持 */
}

@media (max-width: 768px) {
  .logo-link img {
    height: 50px;     /* スマホ時はさらに小さく */
  }
}

/* スマホ時のロゴ制御 */
@media (max-width: 768px) {
  .logo-dark, 
  .logo-light {
    display: none; /* 基本は非表示 */
  }

  .header.fixed .logo-dark {
    display: inline-block; /* 固定時は黒ロゴだけ */
  }

  .header:not(.fixed) .logo-light {
    display: inline-block; /* 非固定時は白ロゴだけ */
  }
}
