/* style.css - 最終修正版 */

/* 変数定義 */
:root {
    --primary-color: #1a5f7a;   /* メインカラー: 専門的なブルー */
    --secondary-color: #57a6c1; /* アクセントカラー */
    --accent-color: #ff7a00;    /* アクションカラー */
    --alert-color: #ff4757;     /* アラート/通知用の色 */
    --light-color: #f8f9fa;
    --dark-color: #2c3e50;
    --gray-color: #6c757d;
    --light-gray: #e9ecef;
    --shadow-light: 0 10px 30px rgba(0, 0, 0, 0.05);
    --shadow-medium: 0 10px 30px rgba(0, 0, 0, 0.08);
    --shadow-hover: 0 15px 35px rgba(0, 0, 0, 0.1);
}

/* 基本設定 */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Noto Sans JP', sans-serif;
    color: #333;
    line-height: 1.7;
    background-color: var(--light-color);
    scroll-behavior: smooth;
}

.container {
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

section {
    padding: 80px 0;
    scroll-margin-top: 80px;
}

.section-title {
    text-align: center;
    margin-bottom: 50px;
}

.section-title h2 {
    font-size: 2.2rem;
    color: var(--dark-color);
    margin-bottom: 15px;
    position: relative;
    display: inline-block;
}

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

.section-title p {
    color: var(--gray-color);
    max-width: 700px;
    margin: 0 auto;
    font-size: 1.05rem;
}

/* ボタン */
.btn {
    display: inline-block;
    background-color: var(--primary-color);
    color: white;
    padding: 12px 30px;
    border-radius: 4px;
    text-decoration: none;
    font-weight: 600;
    font-size: 1rem;
    transition: all 0.3s ease;
    border: none;
    cursor: pointer;
    margin-right: 15px;
    margin-bottom: 10px;
}

.btn:hover,
.btn:focus {
    background-color: #144a5f;
    transform: translateY(-2px);
    box-shadow: var(--shadow-hover);
}

.btn:focus {
    outline: 2px solid var(--accent-color);
    outline-offset: 2px;
}

.btn:last-child {
    margin-right: 0;
}

.btn-accent {
    background-color: var(--accent-color);
}

.btn-accent:hover,
.btn-accent:focus {
    background-color: #e06b00;
}

.btn-outline {
    background-color: transparent;
    border: 2px solid var(--primary-color);
    color: var(--primary-color);
    padding: 12px 35px;
    border-radius: 8px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s ease;
    text-decoration: none;
    display: inline-block;
    margin: 0;
}

.btn-outline:hover,
.btn-outline:focus {
    background-color: var(--primary-color);
    color: white;
}

/* ヘッダー */
header {
    background-color: white;
    box-shadow: 0 2px 15px rgba(0, 0, 0, 0.05);
    position: sticky;
    top: 0;
    z-index: 1000;
}

.header-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px 0;
    position: relative;
}

.logo {
    display: flex;
    align-items: center;
    text-decoration: none;
    flex-shrink: 0;
}

.full-logo {
    height: 70px;
    width: auto;
    max-width: 200px;
}

.logo-text {
    display: flex;
    flex-direction: column;
    margin-left: 12px;
}

.logo-name {
    font-weight: 700;
    font-size: 1.4rem;
    color: var(--dark-color);
    line-height: 1.2;
}

.logo-title {
    font-size: 0.80rem;
    color: var(--gray-color);
    font-weight: 400;
}

/* ナビゲーション */
nav ul {
    display: flex;
    list-style: none;
    flex-wrap: nowrap;
    white-space: nowrap;
}

nav li {
    margin-left: 20px;
}

nav a {
    text-decoration: none;
    color: var(--dark-color);
    font-weight: 600;
    font-size: 0.95rem;
    transition: color 0.3s;
    padding: 5px 0;
    position: relative;
    white-space: nowrap;
}

nav a:hover,
nav a:focus {
    color: var(--primary-color);
}

nav a::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 0;
    height: 2px;
    background-color: var(--primary-color);
    transition: width 0.3s;
}

nav a:hover::after,
nav a:focus::after {
    width: 100%;
}

.menu-toggle {
    display: none;
    font-size: 1.5rem;
    cursor: pointer;
    color: var(--primary-color);
    position: absolute;
    right: 20px;
    top: 50%;
    transform: translateY(-50%);
    z-index: 1001;
    background: none;
    border: none;
    padding: 5px;
}

.menu-toggle:focus {
    outline: 2px solid var(--accent-color);
    outline-offset: 2px;
}

/* ヒーローセクション */
.hero {
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--secondary-color) 100%);
    padding: 100px 0;
    color: white;
    position: relative;
    overflow: hidden;
}

.hero::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    /* SVGを適切にエンコード */
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 100 100' preserveAspectRatio='none'%3E%3Cpath d='M0,0 L100,0 L100,100 Z' fill='white' opacity='0.1'/%3E%3C/svg%3E");
    background-size: cover;
}

.hero-content {
    max-width: 800px;
    position: relative;
    z-index: 1;
}

.hero-badge {
    display: inline-block;
    background-color: rgba(255, 255, 255, 0.3);
    color: white;
    padding: 8px 20px;
    border-radius: 50px;
    font-weight: 600;
    font-size: 0.9rem;
    margin-bottom: 25px;
    /* backdrop-filterのフォールバック */
    backdrop-filter: blur(5px);
    -webkit-backdrop-filter: blur(5px);
}

@supports not (backdrop-filter: blur(5px)) {
    .hero-badge {
        background-color: rgba(255, 255, 255, 0.4);
    }
}

.hero h1 {
    font-size: 2.8rem;
    color: white;
    margin-bottom: 20px;
    line-height: 1.3;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
}

.hero-highlight {
    color: #e06c00;
}

.hero p {
    font-size: 1.2rem;
    color: rgba(255, 255, 255, 0.9);
    margin-bottom: 25px;
    max-width: 700px;
}

.hero strong {
    color: white;
    font-weight: 700;
}

/* プロフィール */
.profile {
    background-color: white;
}

.profile-container {
    display: grid;
    grid-template-columns: 1fr 2fr;
    gap: 60px;
    align-items: start;
}

.profile-image {
    text-align: center;
    position: sticky;
    top: 100px;
}

.avatar {
    width: 280px;
    height: 280px;
    border-radius: 50%;
    object-fit: cover;
    border: 8px solid white;
    box-shadow: var(--shadow-hover);
}

.avatar-placeholder {
    width: 280px;
    height: 280px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 4rem;
    margin: 0 auto;
    border: 8px solid white;
    box-shadow: var(--shadow-hover);
}

.profile-content h3 {
    font-size: 1.8rem;
    color: var(--dark-color);
    margin-bottom: 20px;
    line-height: 1.4;
}

.profile-content h4 {
    font-size: 1.1rem;
    color: var(--primary-color);
    margin-bottom: 15px;
    line-height: 1.6;
    font-weight: 500;
    padding-left: 15px;
    border-left: 3px solid var(--secondary-color);
}

.profile-content p {
    margin-bottom: 25px;
    color: #555;
    line-height: 1.8;
}

.expertise-list {
    display: flex;
    flex-wrap: wrap;
    gap: 15px;
    margin-top: 30px;
}

.expertise-tag {
    background-color: white;
    border: 1px solid #ddd;
    padding: 8px 18px;
    border-radius: 50px;
    font-size: 0.9rem;
    font-weight: 500;
    color: var(--dark-color);
    box-shadow: 0 3px 10px rgba(0, 0, 0, 0.05);
    transition: all 0.3s ease;
}

.expertise-tag:hover,
.expertise-tag:focus {
    background-color: var(--primary-color);
    color: white;
    transform: translateY(-2px);
}

/* サービス */
.services-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 30px;
}

.service-card {
    background-color: white;
    border-radius: 8px;
    padding: 40px 30px;
    border-top: 4px solid var(--primary-color);
    box-shadow: var(--shadow-light);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    height: 100%;
    display: flex;
    flex-direction: column;
}

.service-card:hover {
    transform: translateY(-10px);
    box-shadow: var(--shadow-hover);
}

.service-icon {
    font-size: 2.5rem;
    color: var(--primary-color);
    margin-bottom: 25px;
}

.service-card h3 {
    font-size: 1.4rem;
    color: var(--dark-color);
    margin-bottom: 15px;
}

.service-card p {
    color: #666;
    font-size: 1rem;
    line-height: 1.6;
    flex-grow: 1;
}

/* 実績 */
.cases-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 30px;
}

.case-card {
    background-color: white;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: var(--shadow-light);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    display: flex;
    flex-direction: column;
    height: 100%;
}

.case-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-hover);
}

.case-header {
    background-color: var(--primary-color);
    color: white;
    padding: 20px;
    text-align: center;
}

.case-header h4 {
    font-size: 1.1rem;
    font-weight: 600;
    margin: 0;
}

.case-content {
    padding: 25px;
    flex-grow: 1;
    display: flex;
    flex-direction: column;
}

.case-content h3 {
    font-size: 1.3rem;
    color: var(--dark-color);
    margin-bottom: 15px;
}

.case-content p {
    color: #666;
    font-size: 1rem;
    line-height: 1.6;
    flex-grow: 1;
}

/* ニュース */
.news-section {
    background-color: #f9fafc;
}

.news-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 30px;
    margin-top: 50px;
}

.news-card {
    background-color: white;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: var(--shadow-light);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    display: flex;
    flex-direction: column;
    height: 100%;
    border: 1px solid #eaeaea;
}

.news-card:hover {
    transform: translateY(-10px);
    box-shadow: var(--shadow-hover);
}

.news-header {
    padding: 25px 25px 15px;
    position: relative;
    border-bottom: 1px solid #f0f0f0;
}

.news-date {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 15px;
}

.news-day {
    font-size: 32px;
    font-weight: 700;
    color: var(--primary-color);
    line-height: 1;
}

.news-month {
    font-size: 16px;
    color: var(--secondary-color);
    font-weight: 500;
}

.news-badge {
    display: inline-block;
    background-color: var(--alert-color);
    color: white;
    font-size: 12px;
    padding: 4px 12px;
    border-radius: 20px;
    margin-left: 10px;
    animation: pulse 2s infinite;
}

@keyframes pulse {
    0% { opacity: 1; }
    50% { opacity: 0.7; }
    100% { opacity: 1; }
}

.news-category {
    display: inline-block;
    background-color: #f0f7ff;
    color: var(--primary-color);
    font-size: 14px;
    padding: 4px 12px;
    border-radius: 4px;
    margin-bottom: 15px;
}

.news-title {
    font-size: 20px;
    font-weight: 600;
    color: #333;
    line-height: 1.4;
    margin-bottom: 10px;
}

.news-content {
    padding: 0 25px 25px;
    flex-grow: 1;
    display: flex;
    flex-direction: column;
}

.news-content p {
    color: #666;
    line-height: 1.6;
    font-size: 1rem;
    margin-bottom: 20px;
    flex-grow: 1;
}

.news-link {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    color: var(--primary-color);
    text-decoration: none;
    font-size: 1rem;
    font-weight: 500;
    transition: all 0.3s ease;
    margin-top: auto;
}

.news-link:hover,
.news-link:focus {
    color: var(--secondary-color);
    gap: 12px;
}

.news-link i {
    font-size: 14px;
    transition: transform 0.3s ease;
}

.news-link:hover i,
.news-link:focus i {
    transform: translateX(5px);
}

.news-archive {
    text-align: center;
    margin-top: 50px;
}

/* コンタクト */
.contact {
    background-color: var(--light-color);
}

.contact-container {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 50px;
}

.contact-info h3 {
    font-size: 1.8rem;
    color: var(--dark-color);
    margin-bottom: 30px;
}

.contact-detail {
    display: flex;
    align-items: flex-start;
    margin-bottom: 25px;
}

.contact-detail i {
    color: var(--primary-color);
    font-size: 1.2rem;
    margin-right: 15px;
    margin-top: 5px;
    width: 24px;
    flex-shrink: 0;
}

.contact-detail strong {
    font-size: 1rem;
    display: block;
    color: var(--dark-color);
    margin-bottom: 5px;
}

.contact-detail p {
    font-size: 1rem;
    color: var(--gray-color);
    line-height: 1.6;
}

.contact-detail b {
    color: var(--accent-color);
}

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

.contact-form label {
    font-size: 1rem;
    display: block;
    margin-bottom: 8px;
    font-weight: 600;
    color: var(--dark-color);
}

.contact-form .form-control {
    width: 100%;
    padding: 14px;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-family: 'Noto Sans JP', sans-serif;
    font-size: 1rem;
    transition: border 0.3s, box-shadow 0.3s;
    background-color: white;
}

.contact-form .form-control:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(26, 95, 122, 0.1);
}

.contact-form select.form-control {
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' fill='%231a5f7a' viewBox='0 0 16 16'%3E%3Cpath d='M7.247 11.14 2.451 5.658C1.885 5.013 2.345 4 3.204 4h9.592a1 1 0 0 1 .753 1.659l-4.796 5.48a1 1 0 0 1-1.506 0z'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 12px center;
    background-size: 16px;
    padding-right: 40px;
}

.contact-form button[type="submit"] {
    width: 100%;
    margin: 0;
}

/* フッター */
footer {
    background-color: var(--dark-color);
    color: #ddd;
    padding: 60px 0 30px;
}

.footer-container {
    display: grid;
    grid-template-columns: 1fr 1fr 1fr;
    gap: 40px;
    margin-bottom: 40px;
}

.footer-about .logo-name {
    color: white;
    margin-bottom: 5px;
    font-size: 1.6rem;
}

.footer-about .logo-title {
    color: var(--secondary-color);
    margin-bottom: 15px;
    font-size: 0.9rem;
}

.footer-about p {
    color: #aaa;
    font-size: 0.95rem;
    line-height: 1.6;
}

.footer-links h4,
.footer-contact h4 {
    color: white;
    font-size: 1.1rem;
    margin-bottom: 20px;
    position: relative;
    padding-bottom: 10px;
}

.footer-links h4::after,
.footer-contact h4::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 40px;
    height: 2px;
    background-color: var(--secondary-color);
}

.footer-links ul {
    list-style: none;
}

.footer-links li {
    margin-bottom: 12px;
}

.footer-links a {
    color: #bbb;
    text-decoration: none;
    transition: color 0.3s, padding-left 0.3s;
    font-size: 0.95rem;
    display: block;
}

.footer-links a:hover,
.footer-links a:focus {
    color: white;
    padding-left: 5px;
}

.footer-contact p {
    color: #bbb;
    font-size: 0.95rem;
    margin-bottom: 12px;
    line-height: 1.5;
}

.footer-contact strong {
    color: white;
}

.copyright {
    text-align: center;
    padding-top: 30px;
    border-top: 1px solid #3a4a5d;
    color: #999;
    font-size: 0.9rem;
}

/* レスポンシブ対応 */
@media (max-width: 1100px) {
    nav li {
        margin-left: 15px;
    }
    
    nav a {
        font-size: 0.9rem;
    }
}

@media (max-width: 992px) {
    .profile-container {
        grid-template-columns: 1fr;
        gap: 40px;
    }
    
    .profile-image {
        position: static;
    }
    
    .avatar,
    .avatar-placeholder {
        width: 220px;
        height: 220px;
    }
    
    .contact-container {
        grid-template-columns: 1fr;
    }
    
    .footer-container {
        grid-template-columns: 1fr 1fr;
    }
}

@media (max-width: 850px) {
    .menu-toggle {
        display: block;
    }

    .header-container {
        padding: 15px 0;
    }
    
    nav {
        position: absolute;
        top: 100%;
        left: 0;
        width: 100%;
        z-index: 1000;
        background-color: white;
        box-shadow: 0 10px 20px rgba(0, 0, 0, 0.1);
        max-height: 0;
        overflow: hidden;
        transition: max-height 0.3s ease;
    }
    
    nav.active {
        max-height: 500px;
    }
    
    nav ul {
        display: flex;
        flex-direction: column;
        padding: 20px 0;
        margin: 0;
        flex-wrap: wrap;
        white-space: normal;
    }
    
    nav li {
        margin: 0;
        text-align: center;
        padding: 12px 0;
        border-bottom: 1px solid #eee;
    }
    
    nav li:last-child {
        border-bottom: none;
    }
    
    nav a {
        font-size: 1rem;
        white-space: normal;
        padding: 10px 0;
    }
    
    .hero h1 {
        font-size: 2.2rem;
    }
    
    .section-title h2 {
        font-size: 1.8rem;
    }
    
    .services-grid,
    .cases-grid,
    .news-grid {
        grid-template-columns: 1fr;
    }
    
    .hero .btn {
        display: block;
        width: 100%;
        margin-right: 0;
        margin-bottom: 15px;
        text-align: center;
    }
    
    .hero .btn:last-child {
        margin-bottom: 0;
    }
}

@media (max-width: 768px) {
    .hero h1 {
        font-size: 2rem;
    }
    
    .profile-content h3 {
        font-size: 1.5rem;
    }
    
    .section-title h2 {
        font-size: 1.6rem;
    }
    
    .news-title {
        font-size: 18px;
    }
}

@media (max-width: 576px) {
    section {
        padding: 60px 0;
    }
    
    .hero {
        padding: 80px 0;
    }
    
    .hero h1 {
        font-size: 1.8rem;
    }
    
    .hero p {
        font-size: 1.1rem;
    }
    
    .footer-container {
        grid-template-columns: 1fr;
        gap: 30px;
    }
    
    .expertise-list {
        gap: 10px;
    }
    
    .expertise-tag {
        padding: 6px 14px;
        font-size: 0.85rem;
    }
}

@media (max-width: 480px) {
    .container {
        padding: 0 15px;
    }
    
    .logo-text {
        margin-left: 8px;
    }
    
    .logo-name {
        font-size: 1.2rem;
    }
    
    .full-logo {
        height: 50px;
    }
    
    .service-card,
    .case-card,
    .news-card {
        padding: 25px 20px;
    }
    
    .news-header,
    .news-content {
        padding: 20px;
    }
    
    .news-day {
        font-size: 28px;
    }
    
    .news-title {
        font-size: 16px;
    }
}

/* 広い画面用の調整 */
@media (min-width: 1200px) {
    .container {
        max-width: 1300px;
    }
}

/* 印刷用スタイル */
@media print {
    header,
    footer,
    .btn,
    .menu-toggle,
    .contact-form,
    .hero-badge,
    .news-badge {
        display: none;
    }
    
    body {
        font-size: 12pt;
        line-height: 1.5;
        color: #000;
    }
    
    section {
        padding: 30px 0;
        page-break-inside: avoid;
        scroll-margin-top: 0;
    }
    
    a {
        color: #000;
        text-decoration: none;
    }
    
    .hero {
        background: none !important;
        color: #000;
        padding: 60px 0;
    }
    
    .hero h1 {
        color: #000;
        text-shadow: none;
    }
    
    .hero p {
        color: #000;
    }
    
    .section-title h2::after {
        background-color: #000 !important;
    }
    
    .profile-image {
        position: static !important;
    }
    
    .profile-container {
        grid-template-columns: 1fr;
        gap: 20px;
    }
    
    .avatar,
    .avatar-placeholder {
        width: 150px !important;
        height: 150px !important;
        border: 4px solid #fff !important;
        box-shadow: none !important;
    }
    
    .expertise-tag {
        border: 1px solid #ccc !important;
        box-shadow: none !important;
    }
    
    .service-card,
    .case-card,
    .news-card {
        break-inside: avoid;
        box-shadow: none !important;
        border: 1px solid #ddd !important;
    }
    
    .news-card {
        border: 1px solid #ddd !important;
    }
    
    .contact-container {
        grid-template-columns: 1fr;
    }
    
    .footer-container {
        grid-template-columns: 1fr;
    }
}

/* キーボードフォーカスのスタイル */
a:focus,
button:focus,
.btn:focus,
.menu-toggle:focus,
.news-link:focus,
.footer-links a:focus {
    outline: 2px solid var(--accent-color);
    outline-offset: 2px;
}

/* フォーム要素のフォーカス */
input:focus,
textarea:focus,
select:focus {
    outline: 2px solid var(--primary-color);
    outline-offset: 2px;
}

/* フォーム成功メッセージ */
.success-message {
    animation: fadeIn 0.5s ease;
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(-10px); }
    to { opacity: 1; transform: translateY(0); }
}

/* 送信ボタンのローディング状態 */
button[type="submit"]:disabled {
    opacity: 0.7;
    cursor: not-allowed;
}

/* フォームの入力検証スタイル */
.form-control:invalid {
    border-color: #dc3545;
}

.form-control:valid {
    border-color: #28a745;
}