/* ========================================
   株式会社リフアクト コーポレートサイト
   共通スタイルシート
======================================== */

/* ========== リセット & 基本設定 ========== */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    /* カラーパレット - パステルグリーンベース */
    --primary-color: #a8d5ba;
    --primary-dark: #7eb899;
    --primary-light: #cfe8d8;
    --secondary-color: #f0f9f4;
    --accent-color: #6fa884;
    --text-dark: #2c5f4a;
    --text-gray: #5a5a5a;
    --text-light: #7a7a7a;
    --bg-white: #ffffff;
    --bg-gray: #f5f5f5;
    --border-color: #e0e0e0;
    
    /* フォント */
    --font-main: 'Noto Sans JP', 'Hiragino Sans', 'Hiragino Kaku Gothic ProN', 'メイリオ', sans-serif;
    
    /* スペーシング */
    --section-padding: 80px 0;
    --container-padding: 0 20px;
    
    /* トランジション */
    --transition-smooth: all 0.3s ease;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: var(--font-main);
    font-size: 16px;
    line-height: 1.8;
    color: var(--text-gray);
    background-color: var(--bg-white);
    overflow-x: hidden;
}

/* ========== コンテナ ========== */
.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: var(--container-padding);
}

.container-wide {
    max-width: 1400px;
    margin: 0 auto;
    padding: var(--container-padding);
}

/* ========== タイポグラフィ ========== */
h1, h2, h3, h4, h5, h6 {
    color: var(--text-dark);
    font-weight: 700;
    line-height: 1.4;
}

h1 { font-size: 2.5rem; }
h2 { font-size: 2rem; }
h3 { font-size: 1.5rem; }
h4 { font-size: 1.25rem; }

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

a:hover {
    color: var(--accent-color);
}

/* ========== ヘッダー ========== */
.site-header {
    background-color: var(--bg-white);
    box-shadow: 0 2px 10px rgba(0,0,0,0.05);
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1000;
    transition: var(--transition-smooth);
}

.header-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px;
    max-width: 1200px;
    margin: 0 auto;
}

.site-logo {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--text-dark);
    letter-spacing: 1px;
}

.site-logo span {
    color: var(--primary-color);
}

/* ナビゲーション */
.main-nav ul {
    display: flex;
    list-style: none;
    gap: 35px;
}

.main-nav a {
    color: var(--text-gray);
    font-weight: 500;
    padding: 8px 0;
    position: relative;
}

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

.main-nav a:hover::after,
.main-nav a.active::after {
    width: 100%;
}

/* ハンバーガーメニュー */
.menu-toggle {
    display: none;
    flex-direction: column;
    cursor: pointer;
    gap: 5px;
}

.menu-toggle span {
    width: 28px;
    height: 3px;
    background-color: var(--text-dark);
    transition: var(--transition-smooth);
    border-radius: 2px;
}

.menu-toggle.active span:nth-child(1) {
    transform: rotate(45deg) translate(8px, 8px);
}

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

.menu-toggle.active span:nth-child(3) {
    transform: rotate(-45deg) translate(7px, -7px);
}

/* ========== ヒーローセクション ========== */
.hero-section {
    height: 100vh;
    min-height: 600px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, var(--secondary-color) 0%, var(--primary-light) 100%);
    position: relative;
    overflow: hidden;
    margin-top: 70px;
}

.hero-section::before {
    content: '';
    position: absolute;
    top: -50%;
    right: -10%;
    width: 600px;
    height: 600px;
    background: rgba(168, 213, 186, 0.2);
    border-radius: 50%;
    z-index: 1;
}

.hero-section::after {
    content: '';
    position: absolute;
    bottom: -30%;
    left: -5%;
    width: 400px;
    height: 400px;
    background: rgba(111, 168, 132, 0.15);
    border-radius: 50%;
    z-index: 1;
}

.hero-content {
    text-align: center;
    z-index: 2;
    position: relative;
    animation: fadeInUp 1s ease;
}

.hero-content h1 {
    font-size: 3rem;
    margin-bottom: 20px;
    color: var(--text-dark);
}

.hero-content .subtitle {
    font-size: 1.3rem;
    color: var(--text-gray);
    margin-bottom: 40px;
    line-height: 1.8;
    max-width: 700px;
    margin-left: auto;
    margin-right: auto;
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* ========== セクション共通スタイル ========== */
.section {
    padding: var(--section-padding);
}

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

.section-title h2 {
    font-size: 2.2rem;
    margin-bottom: 15px;
    color: var(--text-dark);
}

.section-title .subtitle {
    color: var(--text-light);
    font-size: 1rem;
}

.section-title::after {
    content: '';
    display: block;
    width: 60px;
    height: 3px;
    background: linear-gradient(90deg, var(--primary-color), var(--accent-color));
    margin: 20px auto 0;
    border-radius: 2px;
}

/* 背景色バリエーション */
.section-white {
    background-color: var(--bg-white);
}

.section-gray {
    background-color: var(--bg-gray);
}

.section-primary {
    background-color: var(--secondary-color);
}

/* ========== ボタン ========== */
.btn {
    display: inline-block;
    padding: 14px 40px;
    border-radius: 50px;
    font-weight: 600;
    text-align: center;
    cursor: pointer;
    border: none;
    transition: var(--transition-smooth);
    font-size: 1rem;
}

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

.btn-primary:hover {
    background-color: var(--accent-color);
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(168, 213, 186, 0.4);
}

.btn-outline {
    background-color: transparent;
    border: 2px solid var(--primary-color);
    color: var(--primary-color);
}

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

/* ========== カード ========== */
.card-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 30px;
    margin-top: 40px;
}

.card {
    background-color: var(--bg-white);
    border-radius: 10px;
    padding: 40px 30px;
    box-shadow: 0 5px 20px rgba(0,0,0,0.08);
    transition: var(--transition-smooth);
    position: relative;
    overflow: hidden;
}

.card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 4px;
    background: linear-gradient(90deg, var(--primary-color), var(--accent-color));
    transform: scaleX(0);
    transition: transform 0.3s ease;
}

.card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 30px rgba(0,0,0,0.12);
}

.card:hover::before {
    transform: scaleX(1);
}

.card-icon {
    font-size: 3rem;
    color: var(--primary-color);
    margin-bottom: 20px;
}

.card h3 {
    margin-bottom: 15px;
    color: var(--text-dark);
}

.card p {
    color: var(--text-light);
    line-height: 1.7;
}

/* ========== ニュース・お知らせ ========== */
.news-list {
    max-width: 900px;
    margin: 0 auto;
}

.news-item {
    display: flex;
    padding: 25px;
    background-color: var(--bg-white);
    margin-bottom: 15px;
    border-radius: 8px;
    border-left: 4px solid var(--primary-color);
    transition: var(--transition-smooth);
}

.news-item:hover {
    background-color: var(--secondary-color);
    transform: translateX(5px);
}

.news-date {
    font-weight: 600;
    color: var(--text-dark);
    min-width: 120px;
    font-size: 0.95rem;
}

.news-title {
    color: var(--text-gray);
    flex: 1;
}

/* ========== フッター ========== */
.site-footer {
    background-color: var(--text-dark);
    color: white;
    padding: 60px 0 30px;
}

.footer-content {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 40px;
    margin-bottom: 40px;
}

.footer-section h3 {
    color: var(--primary-light);
    margin-bottom: 20px;
    font-size: 1.2rem;
}

.footer-section p,
.footer-section a {
    color: rgba(255,255,255,0.8);
    line-height: 2;
}

.footer-section a:hover {
    color: var(--primary-light);
}

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

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

.social-links {
    display: flex;
    gap: 15px;
    margin-top: 15px;
}

.social-links a {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    background-color: rgba(255,255,255,0.1);
    border-radius: 50%;
    transition: var(--transition-smooth);
}

.social-links a:hover {
    background-color: var(--primary-color);
    transform: translateY(-3px);
}

.footer-bottom {
    text-align: center;
    padding-top: 30px;
    border-top: 1px solid rgba(255,255,255,0.1);
}

.footer-bottom p {
    color: rgba(255,255,255,0.6);
    font-size: 0.9rem;
}

/* ========== ページトップへ戻るボタン ========== */
.scroll-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;
    cursor: pointer;
    opacity: 0;
    visibility: hidden;
    transition: var(--transition-smooth);
    z-index: 999;
    box-shadow: 0 4px 15px rgba(0,0,0,0.2);
}

.scroll-to-top.visible {
    opacity: 1;
    visibility: visible;
}

.scroll-to-top:hover {
    background-color: var(--accent-color);
    transform: translateY(-5px);
}

/* ========== フォーム ========== */
.form-group {
    margin-bottom: 25px;
}

.form-group label {
    display: block;
    margin-bottom: 8px;
    color: var(--text-dark);
    font-weight: 600;
}

.form-group input,
.form-group textarea,
.form-group select {
    width: 100%;
    padding: 14px;
    border: 2px solid var(--border-color);
    border-radius: 8px;
    font-family: var(--font-main);
    font-size: 1rem;
    transition: var(--transition-smooth);
}

.form-group input:focus,
.form-group textarea:focus,
.form-group select:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(168, 213, 186, 0.1);
}

.form-group textarea {
    min-height: 150px;
    resize: vertical;
}

.form-error {
    color: #e74c3c;
    font-size: 0.9rem;
    margin-top: 5px;
    display: none;
}

.form-group.error input,
.form-group.error textarea,
.form-group.error select {
    border-color: #e74c3c;
}

.form-group.error .form-error {
    display: block;
}

/* ========== レスポンシブデザイン ========== */

/* タブレット */
@media (max-width: 768px) {
    :root {
        --section-padding: 60px 0;
    }
    
    .header-container {
        padding: 15px 20px;
    }
    
    .main-nav {
        position: fixed;
        top: 70px;
        left: 0;
        right: 0;
        background-color: var(--bg-white);
        box-shadow: 0 5px 15px rgba(0,0,0,0.1);
        max-height: 0;
        overflow: hidden;
        transition: max-height 0.3s ease;
    }
    
    .main-nav.active {
        max-height: 400px;
    }
    
    .main-nav ul {
        flex-direction: column;
        gap: 0;
        padding: 20px;
    }
    
    .main-nav li {
        border-bottom: 1px solid var(--border-color);
    }
    
    .main-nav a {
        display: block;
        padding: 15px 0;
    }
    
    .menu-toggle {
        display: flex;
    }
    
    .hero-content h1 {
        font-size: 2.2rem;
    }
    
    .hero-content .subtitle {
        font-size: 1.1rem;
    }
    
    .section-title h2 {
        font-size: 1.8rem;
    }
    
    .card-grid {
        grid-template-columns: 1fr;
    }
    
    .news-item {
        flex-direction: column;
        gap: 10px;
    }
    
    .news-date {
        min-width: auto;
    }
    
    .footer-content {
        grid-template-columns: 1fr;
        gap: 30px;
    }
}

/* スマートフォン */
@media (max-width: 480px) {
    h1 { 
        font-size: 1.6rem;
        line-height: 1.5;
    }
    h2 { 
        font-size: 1.4rem;
        line-height: 1.5;
    }
    h3 { 
        font-size: 1.1rem;
        line-height: 1.6;
    }
    
    body {
        font-size: 15px;
        line-height: 1.9;
    }
    
    p {
        line-height: 1.9;
        word-break: break-word;
    }
    
    .hero-section {
        min-height: 500px;
        padding: 0 15px;
    }
    
    .hero-content h1 {
        font-size: 1.6rem;
        line-height: 1.5;
        word-break: keep-all;
        overflow-wrap: break-word;
    }
    
    .hero-content .subtitle {
        font-size: 0.95rem;
        line-height: 1.8;
    }
    
    .btn {
        padding: 12px 25px;
        font-size: 0.9rem;
        white-space: nowrap;
    }
    
    .card {
        padding: 25px 15px;
    }
    
    .card h3 {
        font-size: 1.1rem;
        line-height: 1.6;
        margin-bottom: 12px;
    }
    
    .card p {
        font-size: 0.95rem;
        line-height: 1.8;
    }
    
    .section-title h2 {
        font-size: 1.5rem;
        line-height: 1.5;
    }
    
    .section-title .subtitle {
        font-size: 0.9rem;
    }
    
    .container {
        padding: 0 15px;
    }
    
    .scroll-to-top {
        bottom: 20px;
        right: 20px;
        width: 45px;
        height: 45px;
    }
    
    /* テーブルのスマホ対応 */
    table {
        font-size: 0.9rem;
    }
    
    table th,
    table td {
        padding: 15px 10px !important;
        word-break: break-word;
    }
    
    /* ニュースアイテムのスマホ対応 */
    .news-item {
        padding: 20px 15px;
    }
    
    .news-date {
        font-size: 0.85rem;
    }
    
    .news-title {
        font-size: 0.95rem;
        line-height: 1.7;
    }
    
    /* フォームのスマホ対応 */
    .form-group label {
        font-size: 0.95rem;
    }
    
    .form-group input,
    .form-group textarea,
    .form-group select {
        font-size: 16px; /* iOS自動ズーム防止 */
        padding: 12px;
    }
}

/* ========== ユーティリティクラス ========== */
.text-center { text-align: center; }
.text-left { text-align: left; }
.text-right { text-align: right; }

.mt-1 { margin-top: 10px; }
.mt-2 { margin-top: 20px; }
.mt-3 { margin-top: 30px; }
.mt-4 { margin-top: 40px; }

.mb-1 { margin-bottom: 10px; }
.mb-2 { margin-bottom: 20px; }
.mb-3 { margin-bottom: 30px; }
.mb-4 { margin-bottom: 40px; }

/* スマホのみ改行を表示 */
.br-sp {
    display: none;
}

@media (max-width: 768px) {
    .br-sp {
        display: block;
    }
    
    .br-pc {
        display: none;
    }
}

.fade-in {
    animation: fadeIn 0.8s ease;
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}