/* style.css */

/* ==========================================================================
   1. CSS Reset
   ========================================================================= */
   *, *::before, *::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
    border: 0;
    font-size: 100%;
    font: inherit;
    vertical-align: baseline;
}
body {
    line-height: 1;
}
ol, ul {
    list-style: none;
}

/* ==========================================================================
   2. Base Layout
   ========================================================================= */
html {
    height: 100%;
}
body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    color: #333;
    background-color: #f8f8f8;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    overflow-x: hidden; /* Prevent horizontal scrollbars */
}
main {
    flex-grow: 1;
    display: flex;
    flex-direction: column;
}

/* ==========================================================================
   3. Header & Navigation Styles
   ========================================================================= */
header {
    background: #ffffff;
    padding: 1rem 0;
    border-bottom: 1px solid #eee;
    box-shadow: 0 2px 8px rgba(0,0,0,0.08);
    position: sticky; /* Keeps the header fixed at the top during scroll */
    top: 0; /* Aligns the sticky header to the top of the viewport */
    z-index: 1000; /* Ensures the header stays on top of other content */
    width: 100%; /* Ensures header spans full width */
}

header .container {
    display: flex;
    justify-content: space-between; /* Spaces logo and navigation */
    align-items: center; /* Vertically aligns logo and navigation */
    padding: 0 20px; /* Horizontal padding within the header container */
}

.logo {
    display: flex;
    align-items: center;
}

.logo img {
    height: 70px; /* Fixed height for the logo image */
    margin-right: 15px;
    transition: transform 0.3s ease; /* Smooth transition for hover effect */
}

.logo img:hover {
    transform: scale(1.05); /* Slightly enlarges logo on hover */
}

.site-title {
    font-size: 2.5rem;
    font-weight: 700;
    color: #1a2c4e;
    letter-spacing: -1px; /* Tighter letter spacing for branding */
}

nav ul {
    list-style: none; /* Removes default list styling */
    padding: 0;
    margin: 0;
}

nav ul li {
    display: inline; /* Displays navigation items in a single line */
    margin-left: 30px; /* Spacing between navigation items */
}

nav ul li a {
    color: #1a2c4e;
    font-weight: 500;
    font-size: 1.1rem;
    position: relative; /* Needed for the custom underline effect */
}

nav ul li a::after {
    content: '';
    position: absolute;
    width: 0; /* Initially hidden underline */
    height: 2px;
    bottom: -5px; /* Positions underline below the text */
    left: 0;
    background-color: #007bff; /* Color of the underline */
    transition: width 0.3s ease-out; /* Smooth animation for underline expansion */
}

nav ul li a:hover::after {
    width: 100%; /* Expands underline to full width on hover */
}

/* ==========================================================================
   4. Hero Section Styles
   ========================================================================= */
#hero {
    /* Background settings: Ensure 'images/hero-background.jpg' exists in your project */
    background: linear-gradient(rgba(26, 44, 78, 0.7), rgba(26, 44, 78, 0.7)), url('/images/hero-background.jpg') no-repeat center center;
    background-size: cover; /* Ensures the background image covers the entire section */
    background-attachment: scroll; /* Background scrolls with the page content */
    background-position: center center; /* Centers the background image */

    min-height: calc(100vh - 110px); /* Sets minimum height to fill viewport minus header height */
    
    color: #FFFFFF; /* Text color for content within hero section */
    text-align: center;
    display: flex; /* Uses Flexbox for easy content centering */
    align-items: center; /* Vertically centers the content */
    justify-content: center; /* Horizontally centers the content */
    width: 100%; /* Ensures the section takes full width */
    flex-shrink: 0; /* Prevents the hero section from shrinking within a flex container */

    padding: 120px 0; /* Ample top and bottom padding for content */
}

.hero-content {
    max-width: 900px;
    margin: 0 auto; /* Centers content horizontally within hero section */
    animation: fadeInScale 1s ease-out forwards; /* Applies a fade-in and scale animation on load */
    transform: scale(0.9); /* Starts slightly scaled down */
    opacity: 0; /* Starts invisible for animation */
    z-index: 2; /* Ensures content is above the background overlay */
    position: relative; /* Needed for z-index to take effect */
}

#hero h2 {
    font-size: 3.8rem;
    margin-bottom: 20px;
    color: #FFFFFF;
    font-weight: 700;
    text-shadow: 2px 2px 5px rgba(0,0,0,0.3); /* Adds a subtle text shadow for readability */
}

.mission-subtext {
    font-size: 1.5rem;
    margin-bottom: 40px;
    font-weight: 300;
}

.hero-content .button-link { 
    color: #FFFFFF;
    text-decoration: none;
    font-size: 1.2rem;
    font-weight: 600;
    border: 2px solid #FFFFFF;
    padding: 15px 35px;
    border-radius: 50px;
    transition: background 0.3s ease, color 0.3s ease, border-color 0.3s ease;
    text-shadow: 0px 0px 5px rgba(0, 0, 0, 0.3); /* 追加した場合 */
}

.hero-content .button-link:hover {
    background: #FFFFFF; /* ホバー時に背景を白に */
    color: #007bff; /* ホバー時に文字色を青に */
    border-color: #007bff; /* ホバー時に枠線も青に */
}

/* ==========================================================================
   5. General Section Styles (Excluding Hero)
   ========================================================================= */
section:not(#hero) { 
    padding: 60px 0;
    margin-bottom: 20px;
    border-radius: 10px;
    box-shadow: 0 5px 15px rgba(0,0,0,0.05);
    background-color: #ffffff; /* General section background color */
    
    /* Reveal animation properties, triggered by JavaScript adding 'reveal' class */
    transition: transform 0.6s ease-out, opacity 0.6s ease-out;
    opacity: 0; /* Start invisible */
    transform: translateY(30px); /* Start slightly below final position */
}

section:not(#hero).reveal { /* Applies when 'reveal' class is added to sections other than #hero */
    opacity: 1; /* Fully visible */
    transform: translateY(0); /* Moves to its natural position */
}

section:not(#hero) h2 { /* Headings for sections other than #hero */
    text-align: center;
    margin-bottom: 50px;
    font-size: 3rem;
    position: relative;
    padding-bottom: 10px;
}

section:not(#hero) h2::after { /* Underline for headings in sections other than #hero */
    content: '';
    position: absolute;
    left: 50%;
    bottom: 0;
    transform: translateX(-50%);
    width: 80px;
    height: 4px;
    background-color: #007bff;
    border-radius: 2px;
}

/* ==========================================================================
   6. Mission & Vision Section Styles
   ========================================================================= */
#mission-vision {
    display: flex;
    justify-content: space-around;
    flex-wrap: wrap;
    text-align: center;
    scroll-margin-top: 80px;
}

.mv-block {
    flex: 1;
    min-width: 300px;
    margin: 20px;
    padding: 30px;
    border: 1px solid #e0e0e0;
    border-radius: 10px;
    box-shadow: 0 3px 10px rgba(0,0,0,0.05);
    background-color: #fdfdfd;
}

.mv-block h3 {
    font-size: 1.8rem;
    margin-bottom: 20px;
    color: #007bff;
}

.mv-block p {
    font-size: 1.1rem;
    line-height: 1.8;
}

/* ==========================================================================
   7. Values Grid Styles
   ========================================================================= */
.value-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); /* Responsive grid with min 300px columns */
    gap: 30px; /* Spacing between grid items */
    margin-top: 30px;
}

.value-item {
    background: #fdfdfd;
    padding: 30px;
    border-radius: 10px;
    text-align: left;
    box-shadow: 0 3px 10px rgba(0,0,0,0.05);
    transition: transform 0.3s ease, box-shadow 0.3s ease; /* Smooth hover effects */
}

.value-item:hover {
    transform: translateY(-8px); /* Lifts item on hover */
    box-shadow: 0 8px 20px rgba(0,0,0,0.1); /* Enlarges shadow on hover */
}

.value-item h4 {
    color: #1a2c4e;
    font-size: 1.6rem;
    margin-bottom: 10px;
    border-bottom: 2px solid #e0e0e0;
    padding-bottom: 10px;
}

.value-item .value-subtitle {
    font-weight: 600;
    color: #555;
    margin-bottom: 15px;
}

.value-item p {
    font-size: 0.95rem;
    line-height: 1.7;
}

/* ==========================================================================
   8. Services Grid Styles
   ========================================================================= */
.service-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); /* Responsive grid columns */
    gap: 30px;
    margin-top: 30px;
}

.service-item {
    background: #fdfdfd;
    padding: 25px;
    border-radius: 10px;
    text-align: center;
    box-shadow: 0 3px 10px rgba(0,0,0,0.05);
    transition: transform 0.3s ease; /* Smooth lift on hover */
}

.service-item:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 20px rgba(0,0,0,0.1);
}

.service-item h3 {
    color: #007bff;
    margin-bottom: 15px;
}

/* ==========================================================================
   9. Contact Form Styles
   ========================================================================= */
#contact form {
    max-width: 700px;
    margin: 0 auto; /* Centers the form horizontally */
    display: flex;
    flex-direction: column;
    padding: 30px;
    background: #fdfdfd;
    border-radius: 10px;
    box-shadow: 0 5px 15px rgba(0,0,0,0.05);
}

#contact label {
    margin-bottom: 10px;
    font-weight: bold;
    color: #1a2c4e;
}

#contact input[type="text"],
#contact input[type="email"],
#contact textarea {
    padding: 15px;
    margin-bottom: 25px;
    border: 1px solid #ddd;
    border-radius: 8px;
    font-size: 1.05rem;
    transition: border-color 0.3s ease, box-shadow 0.3s ease; /* Smooth focus effects */
}

#contact input[type="text"]:focus,
#contact input[type="email"]:focus,
#contact textarea:focus {
    border-color: #007bff; /* Blue border on focus */
    box-shadow: 0 0 0 3px rgba(0, 123, 255, 0.2); /* Soft blue focus ring */
    outline: none; /* Removes default browser outline */
}

#contact textarea {
    resize: vertical; /* Allows only vertical resizing */
}

#contact button[type="submit"] {
    background: #007bff;
    color: white;
    padding: 15px 35px;
    border: none;
    border-radius: 50px;
    cursor: pointer;
    font-size: 1.2rem;
    font-weight: 600;
    transition: background 0.3s ease, transform 0.3s ease, box-shadow 0.3s ease;
    box-shadow: 0 4px 10px rgba(0, 123, 255, 0.3);
}

#contact button[type="submit"]:hover {
    background: #0056b3;
    transform: translateY(-3px);
    box-shadow: 0 6px 15px rgba(0, 123, 255, 0.4);
}

.contact-form-container {
    max-width: 600px; /* フォームの最大幅を制限 */
    margin: 0 auto;   /* 中央寄せ */
    padding: 20px;    /* 周囲に少しパディング */
    background: #fdfdfd; /* フォーム背景色 */
    border-radius: 8px; /* 角丸 */
    box-shadow: 0 2px 10px rgba(0,0,0,0.05); /* 影 */
}

.contact-form-container iframe {
    width: 100% !important; /* 親コンテナに合わせて幅を100%にする */
    height: 690px !important; /* 高さも必要に応じて調整してください */
}

/* ==========================================================================
   10. Footer Styles
   ========================================================================= */
footer {
    background: #1a2c4e;
    color: white;
    text-align: center;
    padding: 30px 0;
    margin-top: 50px; /* Provides spacing above the footer from the last section */
    font-size: 0.9rem;
    flex-shrink: 0; /* Prevents the footer from shrinking within the flex container */
}

/* ==========================================================================
   11. Animations
   ========================================================================= */
@keyframes fadeInScale {
    from {
        opacity: 0;
        transform: scale(0.9);
    }
    to {
        opacity: 1;
        transform: scale(1);
    }
}

/* ==========================================================================
   12. Responsive Design (Media Queries)
   ========================================================================= */
/* Tablet & Smaller Desktop Screens */
@media (max-width: 768px) {
    header .container {
        flex-direction: column; /* Stacks header items (logo, nav) vertically */
        text-align: center;
    }

    nav ul {
        margin-top: 20px;
    }

    nav ul li {
        margin: 0 15px; /* Adjusts spacing between nav items for smaller screens */
    }

    .logo img {
        height: 60px; /* Slightly smaller logo on tablets */
    }

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

    #hero h2 {
        font-size: 2.5rem;
    }

    .mission-subtext {
        font-size: 1.2rem;
    }

    #hero {
        min-height: calc(100vh - 80px); /* Adjusts hero height considering a potentially shorter header */
        padding: 80px 0;
    }

    .button {
        padding: 15px 25px;
        font-size: 1.1rem;
    }

    #mission-vision {
        flex-direction: column; /* Stacks mission and vision blocks vertically */
    }

    .mv-block {
        margin: 15px 0;
    }

    .value-grid,
    .service-grid {
        grid-template-columns: 1fr; /* Changes grids to a single column layout */
    }

    section:not(#hero) { /* Responsive adjustments for general sections */
        padding: 40px 0; /* Reduces vertical padding for sections */
    }

    section:not(#hero) h2 { /* Responsive adjustments for general section headings */
        font-size: 2.2rem;
    }
}

/* Small Mobile Screens */
@media (max-width: 480px) {
    .logo img {
        height: 50px; /* Even smaller logo on small mobiles */
    }

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

    nav ul li {
        margin: 0 10px;
        font-size: 1rem;
    }

    #hero h2 {
        font-size: 2rem;
    }

    .mission-subtext {
        font-size: 1rem;
    }

    .button {
        padding: 12px 25px;
        font-size: 1rem;
    }

    section:not(#hero) h2 { /* Responsive adjustments for general section headings */
        font-size: 2rem;
    }

    .mv-block h3 {
        font-size: 1.5rem;
    }

    .value-item h4 {
        font-size: 1.4rem;
    }
}

/* about.html のデザイン改善用CSS */

/* ミッション・ビジョン セクション */
#mission-vision {
    padding: 80px 0; /* セクションの上下パディングを調整 */
    background-color: #f9f9f9; /* 背景色を追加してセクションを区別 */
}

.mv-grid {
    display: flex; /* Flexboxで左右に配置 */
    gap: 40px; /* ブロック間の隙間 */
    flex-wrap: wrap; /* 小さい画面では折り返す */
    justify-content: center; /* 中央寄せ */
    align-items: flex-start; /* 上揃え */
}

.mv-block {
    flex: 1; /* 利用可能なスペースを均等に占める */
    min-width: 300px; /* ブロックの最小幅 */
    background-color: #fff;
    padding: 40px;
    border-radius: 8px;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.05);
    text-align: center; /* テキスト中央寄せ */
    transition: transform 0.3s ease; /* ホバーエフェクト */
}

.mv-block:hover {
    transform: translateY(-5px); /* ホバーで少し上に移動 */
}

.mv-title {
    font-size: 1.8em;
    color: #2c3e50;
    margin-bottom: 20px;
}

.mv-statement {
    font-size: 1.3em;
    color: #34495e;
    line-height: 1.6;
    margin-bottom: 20px;
}

.mv-description {
    font-size: 0.95em;
    color: #7f8c8d;
    line-height: 1.5;
}

/* 私たちの価値 セクション */
#values {
    padding: 80px 0;
    background-color: #ffffff;
}

.section-heading {
    text-align: center;
    font-size: 2.5em;
    color: #2c3e50;
    margin-bottom: 20px;
}

.values-intro {
    text-align: center;
    font-size: 1.1em;
    color: #555;
    margin-bottom: 50px;
    max-width: 800px;
    margin-left: auto;
    margin-right: auto;
    line-height: 1.6;
}

.value-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); /* レスポンシブなグリッド */
    gap: 30px; /* グリッドアイテム間の隙間 */
}

.value-item {
    background-color: #fbfbfb;
    padding: 30px;
    border-radius: 8px;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.03);
    text-align: center;
    transition: all 0.3s ease; /* ホバーエフェクト */
    border: 1px solid #eee;
}

.value-item:hover {
    box-shadow: 0 8px 15px rgba(0, 0, 0, 0.1);
    transform: translateY(-8px);
}

.value-icon {
    width: 80px; /* アイコンコンテナの幅 */
    height: 80px; /* アイコンコンテナの高さ */
    margin: 0 auto 20px auto; /* 中央寄せと下マージン */
    display: flex;
    justify-content: center;
    align-items: center;
    /* optional: 背景色やボーダー、丸い形状などを追加 */
    background-color: #ecf0f1; 
    border-radius: 50%;
}

.value-icon img {
    max-width: 60%; /* アイコン画像のサイズ調整 */
    height: auto;
}

.value-item h4 {
    font-size: 1.4em;
    color: #34495e;
    margin-bottom: 10px;
}

.value-item .value-subtitle {
    font-size: 1em;
    color: #2980b9; /* 強調色 */
    margin-bottom: 15px;
}

.value-item p {
    font-size: 0.9em;
    color: #7f8c8d;
    line-height: 1.5;
}

/* レスポンシブ対応の調整例 */
@media (max-width: 768px) {
    .mv-grid {
        flex-direction: column; /* 縦並びにする */
    }

    .mv-block {
        margin-bottom: 30px;
    }
}

@media (max-width: 480px) {
    #mission-vision, #values {
        padding: 50px 0;
    }
    .mv-block, .value-item {
        padding: 25px;
    }
    .mv-title, .section-heading {
        font-size: 1.5em;
    }
    .mv-statement {
        font-size: 1.1em;
    }
}