/* Global Styles */
:root {
    --primary-color: #75b8fe;
    /* Ocean Blue */
    --secondary-color: #333333;
    /* Dark Gray/Black */
    --accent-color: #fce38a;
    /* Soft Gold/Yellow */
    --text-color: #333333;
    --light-text: #666666;
    --bg-light: #f8f9fa;
    --bg-white: #ffffff;
    --border-color: #e9ecef;
    --max-width: 1200px;
    --header-height: 80px;
    --font-heading: 'Noto Sans JP', sans-serif;
    --font-body: 'Noto Sans JP', sans-serif;
    --transition: all 0.3s ease;
}

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: var(--font-body);
    color: var(--text-color);
    line-height: 1.6;
    background-color: var(--bg-white);
}

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

ul {
    list-style: none;
}

img {
    max-width: 100%;
    height: auto;
    display: block;
}

.container {
    width: 90%;
    max-width: var(--max-width);
    margin: 0 auto;
    padding: 0 20px;
}

/* Typography */
h1,
h2,
h3,
h4,
h5,
h6 {
    font-family: var(--font-heading);
    font-weight: 700;
    line-height: 1.3;
}

.text-center {
    text-align: center;
}

/* Buttons */
.btn {
    display: inline-block;
    padding: 12px 30px;
    border-radius: 50px;
    font-weight: 700;
    cursor: pointer;
    border: 2px solid transparent;
    transition: var(--transition);
}

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

.btn-primary:hover {
    background-color: #003d80;
    transform: translateY(-2px);
    box-shadow: 0 4px 10px rgba(0, 86, 179, 0.3);
}

.btn-outline {
    background-color: transparent;
    border-color: #fff;
    color: #fff;
}

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

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

.btn-white:hover {
    background-color: #f1f1f1;
    transform: translateY(-2px);
}

.btn-wide {
    width: 100%;
    max-width: 300px;
}

.btn-lg {
    padding: 15px 40px;
    font-size: 1.1rem;
}

/* Header */
.header {
    height: var(--header-height);
    background-color: rgba(255, 255, 255, 0.95);
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    z-index: 1000;
    backdrop-filter: blur(10px);
}

.header-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    height: 100%;
    width: 90%;
    max-width: var(--max-width);
    margin: 0 auto;
}

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

.logo img {
    height: 150px;
    width: auto;
}

.nav-list {
    display: flex;
    align-items: center;
    gap: 30px;
}

.nav-link {
    font-weight: 500;
    color: var(--text-color);
    position: relative;
    font-size: 0.9rem;
}

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

.nav-link:hover {
    color: var(--primary-color);
}

.nav-link:hover::after {
    width: 100%;
}

.header-right-sp {
    display: none;
}

.sp-only-tel {
    display: none;
}

.hamburger {
    display: none;
    background: none;
    border: none;
    cursor: pointer;
}

.bar {
    display: block;
    width: 25px;
    height: 3px;
    background-color: var(--primary-color);
    margin: 5px 0;
    transition: var(--transition);
}

/* Hero Section */
.hero {
    height: 56.25vw;
    /* PC: 16:9動画に合わせた比率 */
    max-height: 100vh;
    margin-top: var(--header-height);
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #555555;
    overflow: hidden;
}

.hero-bg {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: -1;
}

.hero-bg img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    position: absolute;
    top: 0;
    left: 0;
}

.hero-bg video {
    width: 100%;
    height: 100%;
    object-fit: cover;
    position: absolute;
    top: 0;
    left: 0;
    background-color: var(--bg-white);
}

/* PC：スマホ用動画を非表示 */
.hero-video-sp {
    display: none;
}

/*
.hero-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, rgba(187, 200, 214, 0.8), rgba(190, 221, 197, 0.6));
    z-index: 1;
    opacity: 0;
    transition: opacity 1.2s ease-in-out;
}
*/
/* If you wanted a real image feel without loading one, CSS Patterns */
/* Just using gradient above for now as safe fallback */

.hero-content {
    position: absolute;
    bottom: 25%;
    left: 50%;
    transform: translateX(-50%);
    text-align: center;
    max-width: 800px;
    width: 100%;
    padding: 0 20px;
    opacity: 0;
    transition: opacity 1.2s ease-in-out;
}

.hero-show {
    opacity: 1 !important;
}


.hero-title {
    position: absolute;
    top: 10%;
    left: 50%;
    transform: translateX(-50%);
    width: 100%;
    text-align: center;
    font-size: clamp(3.0rem, 7vw, 5.5rem);
    letter-spacing: 0.2em;
    margin-bottom: 0px;
    font-feature-settings: "palt";
    opacity: 0;
    transition: opacity 1.2s ease-in-out;
}

/* 順番表示アニメーション */
.block-reveal {
    display: inline-block;
    opacity: 0;
    transform: translateY(10px);
    transition: opacity 0.8s ease, transform 0.8s ease;
}

.block-reveal.delay-1 {
    transition-delay: 0.8s;
}

.hero-title.hero-show .block-reveal {
    opacity: 1;
    transform: translateY(0);
}

/* 順番表示を無効にする場合：このクラスをhero-titleに追加 */
.hero-title.no-reveal .block-reveal {
    opacity: 1;
    transform: translateY(0);
    transition: none;
}

/* 動画3.2秒後の文字色変更 + 上がって戻る */
@keyframes bounce-up {
    0% {
        transform: translateY(0);
    }

    50% {
        transform: translateY(-15px);
    }

    100% {
        transform: translateY(0);
    }
}

.hero-title.color-change .title-group {
    color: #75b8fe;
    transition: color 0.4s ease;
    animation: bounce-up 0.4s ease;
}

/* 2つ目のグループを少し遅らせる */
.hero-title.color-change .title-group:nth-child(2) {
    animation-delay: 0.3s;
    transition-delay: 0.3s;
}

.hero-subtitle {
    font-size: 1.3rem;
    margin-bottom: 0;
    opacity: 0.9;
}

.hero-actions {
    display: flex;
    gap: 20px;
    justify-content: center;
}

/* Sections */
.section {
    padding: 100px 0;
}

.section-header {
    margin-bottom: 60px;
}

.section-subtitle {
    display: block;
    color: var(--secondary-color);
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 2px;
    margin-bottom: 10px;
}

.section-title {
    font-size: 2.5rem;
    color: var(--primary-color);
}

/* Mission Section */
.mission-content {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 50px;
    align-items: center;
}

.mission-text h3 {
    font-size: 1.7rem;
    margin-bottom: 20px;
    color: var(--text-color);
}

.mission-text p {
    color: var(--light-text);
    margin-bottom: 20px;
}

.img-placeholder {
    width: 100%;
    height: 400px;
    background: linear-gradient(45deg, #eee, #ddd);
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 20px;
    color: #999;
    font-weight: 700;
    font-size: 1.2rem;
    position: relative;
    overflow: hidden;
}

/* Add a shimmer effect to placeholders */
.img-placeholder::after {
    content: "";
    position: absolute;
    top: 0;
    left: -100%;
    width: 50%;
    height: 100%;
    background: linear-gradient(to right, rgba(255, 255, 255, 0) 0%, rgba(255, 255, 255, 0.3) 50%, rgba(255, 255, 255, 0) 100%);
    animation: shimmer 2s infinite;
}

@keyframes shimmer {
    100% {
        left: 150%;
    }
}

/* Services Section */
.services-section {
    background-color: var(--bg-light);
}

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

.service-card {
    background: #fff;
    padding: 40px 20px;
    border-radius: 15px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.05);
    transition: var(--transition);
    text-align: center;
}

.service-card:hover {
    transform: translateY(-10px);
    box-shadow: 0 15px 40px rgba(0, 0, 0, 0.1);
}

.service-icon {
    width: 80px;
    height: 80px;
    background-color: rgba(0, 86, 179, 0.1);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 25px;
    color: var(--primary-color);
}

.service-icon svg {
    width: 40px;
    height: 40px;
}

.service-card h3 {
    margin-bottom: 15px;
    font-size: 1.5rem;
}

.service-card p {
    color: var(--light-text);
    font-size: 0.95rem;
    text-align: left;
}

/* FAQ Section */
.faq-section {
    background-color: var(--bg-white);
}

.faq-list {
    max-width: 800px;
    margin: 0 auto;
}

.faq-item {
    border-bottom: 1px solid var(--border-color);
    margin-bottom: 15px;
    padding-bottom: 10px;
}

.faq-item:last-child {
    border-bottom: none;
    margin-bottom: 0;
    padding-bottom: 0;
}

.faq-question {
    display: flex;
    justify-content: space-between;
    align-items: center;
    cursor: pointer;
    padding: 15px 0;
    font-size: 1.1rem;
    font-weight: 700;
    color: var(--primary-color);
}

.faq-question h3 {
    font-size: 1.1rem;
    margin-bottom: 0;
}

.faq-toggle {
    font-size: 1.5rem;
    color: var(--secondary-color);
    transition: var(--transition);
}

.faq-answer {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.4s ease-out;
}

.faq-answer p {
    padding: 0 0 15px;
    color: var(--text-color);
}

/* CTA Section */
.cta-section {
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    color: #fff;
    padding: 80px 0;
}

.cta-title {
    font-size: 2.5rem;
    margin-bottom: 20px;
}

.cta-text {
    font-size: 1.2rem;
    margin-bottom: 40px;
    opacity: 0.9;
}

/* Company Section */
.company-table-wrapper {
    max-width: 800px;
    margin: 0 auto;
}

.company-table {
    width: 100%;
    border-collapse: collapse;
}

.company-table th,
.company-table td {
    padding: 20px;
    border-bottom: 1px solid var(--border-color);
    text-align: left;
}

.company-table th {
    width: 30%;
    background-color: var(--bg-light);
    color: var(--text-color);
    font-weight: 700;
}

/* Contact Section */
.contact-section {
    background-color: var(--bg-light);
}

.contact-form-wrapper {
    max-width: 700px;
    margin: 0 auto;
    background: #fff;
    padding: 50px;
    border-radius: 15px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.05);
}

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

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

.required {
    background-color: #ff4757;
    color: #fff;
    font-size: 0.7rem;
    padding: 2px 6px;
    border-radius: 4px;
    margin-left: 8px;
    vertical-align: middle;
}

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

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

/* Footer */
.footer {
    background-color: #eeeeee;
    /* ライトな背景にあわせて調整 */
    color: #333;
    padding: 60px 0 30px;
}

.footer-content {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    flex-wrap: wrap;
    gap: 40px;
    margin-bottom: 40px;
    padding-bottom: 40px;
    border-bottom: 1px solid #333;
}

.footer-info {
    max-width: 300px;
}

.footer-address p {
    font-size: 0.9rem;
    color: #666;
    margin-bottom: 8px;
    line-height: 1.5;
}

.footer-address a {
    color: #333;
    font-weight: bold;
}

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

.footer-nav {
    flex: 1;
    display: flex;
    justify-content: center;
}

.footer-menu {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.footer-menu a {
    color: #666;
    font-size: 0.95rem;
}

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

.footer-links {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.footer-links a {
    color: #666;
    font-size: 0.9rem;
}

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

.footer-copyright {
    text-align: center;
    color: #666;
    font-size: 0.8rem;
}

/* Animations */
.fade-up,
.fade-right,
.fade-left {
    opacity: 0;
    transform: translateY(30px);
    transition: all 0.8s ease-out;
}

.fade-right {
    transform: translateX(-30px);
}

.fade-left {
    transform: translateX(30px);
}

.fade-up.visible,
.fade-right.visible,
.fade-left.visible {
    opacity: 1;
    transform: translate(0);
}

.delay-1 {
    transition-delay: 0.2s;
}

.delay-2 {
    transition-delay: 0.4s;
}

/* Cookie Consent Banner */
.cookie-banner {
    position: fixed;
    bottom: 20px;
    left: 50%;
    transform: translateX(-50%) translateY(150%);
    width: 90%;
    max-width: 800px;
    background-color: var(--bg-white);
    color: var(--text-color);
    padding: 20px;
    border-radius: 12px;
    z-index: 9999;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.15);
    border: 1px solid var(--border-color);
    transition: transform 0.5s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.cookie-banner.show {
    transform: translateX(-50%) translateY(0);
}

.cookie-banner.hidden {
    display: none;
}

.cookie-container {
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    align-items: center;
    gap: 20px;
}

.cookie-content {
    flex: 1 1 300px;
    font-size: 0.9rem;
    line-height: 1.6;
    color: var(--text-color);
}

.cookie-content a {
    color: var(--primary-color);
    text-decoration: underline;
    font-weight: 500;
}

.cookie-actions {
    display: flex;
    gap: 10px;
    flex-shrink: 0;
}

.cookie-actions .btn-sm {
    padding: 10px 24px;
    font-size: 0.9rem;
    border-radius: 50px;
    white-space: nowrap;
}

/* Responsive */
@media (max-width: 768px) {
    .header-container {
        padding: 0 10px;
    }

    .nav {
        position: fixed;
        right: -100%;
        top: var(--header-height);
        background-color: #fff;
        width: 100%;
        height: calc(100vh - var(--header-height));
        transition: 0.3s;
        box-shadow: 0 10px 10px rgba(0, 0, 0, 0.1);
        display: flex;
        flex-direction: column;
        justify-content: flex-start;
        padding-top: 50px;
    }

    .nav.active {
        right: 0;
    }

    .nav-list {
        flex-direction: column;
        gap: 40px;
    }

    .header-right-sp {
        display: flex;
        align-items: center;
        gap: 15px;
    }

    .sp-tel-btn {
        display: flex;
        align-items: center;
        justify-content: center;
        background-color: var(--primary-color);
        color: #fff;
        padding: 6px 12px;
        border-radius: 20px;
        font-weight: 700;
        font-size: 0.9rem;
        gap: 5px;
        text-decoration: none;
        box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
        z-index: 1001;
        /* To ensure it stays clickable above other elements if needed */
    }

    .sp-tel-btn:hover {
        background-color: #003d80;
        color: #fff;
    }

    .hamburger {
        display: block;
        z-index: 1001;
    }

    .hamburger.active .bar:nth-child(1) {
        transform: rotate(45deg) translate(5px, 6px);
    }

    .hamburger.active .bar:nth-child(2) {
        opacity: 0;
    }

    .hamburger.active .bar:nth-child(3) {
        transform: rotate(-45deg) translate(5px, -6px);
    }

    .hero {
        height: 56.25vw;
        /* SP: PC同様16:9動画に合わせた比率 */
        max-height: 75vh;
        min-height: auto;
    }

    /* スマホ：動画の上に余白を追加 */
    .hero .hero-bg {
        top: 80px;
        /* 上の余白（お好みで調整） */
        height: calc(100% - 40px);
    }

    .hero-content {
        bottom: 25%;
    }


    /* スマホ：PC用動画を非表示、スマホ用を表示 */
    .hero-video-pc {
        display: none;
    }

    .hero-video-sp {
        display: block;
    }

    /* スマホ表示での背景画像の位置調整および縮小表示 */
    .hero-bg img {
        width: 100%;
        height: 100%;
        object-fit: cover;
        /* 見切れないように全体を枠内に収める */
        object-position: 60% 50%;
    }

    .hero-title {
        font-size: clamp(1.8rem, 6vw, 5.0rem);
        top: 25%;
        letter-spacing: 0.2em;
    }

    .hero-subtitle {
        font-size: 0.85rem;
        margin-bottom: 0;
    }

    .hero-actions {
        flex-direction: column;
    }

    .pc-only-tel {
        display: none;
    }

    .sp-only-tel {
        display: block;
    }

    /* Make SP tel button in the menu a bit larger for easier tapping */
    .sp-only-tel .sp-tel-btn {
        padding: 12px 30px;
        font-size: 1.1rem;
        border-radius: 50px;
    }

    .section-title {
        font-size: 2.0rem;
        color: var(--primary-color);
    }

    .mission-text h3 {
        font-size: 1.3rem;
    }

    .mission-content {
        grid-template-columns: 1fr;
    }

    .mission-image {
        order: -1;
        margin-bottom: 30px;
    }

    .service-card h3 {
        margin-bottom: 15px;
        font-size: 1.0rem;
    }

    .company-table th,
    .company-table td {
        display: block;
        width: 100%;
    }

    .company-table th {
        background-color: transparent;
        padding-bottom: 5px;
        color: var(--light-text);
        font-size: 0.9rem;
    }

    .company-table td {
        padding-top: 0;
        font-weight: 500;
    }

    .footer-content {
        flex-direction: column;
        align-items: center;
        gap: 30px;
        text-align: center;
    }

    .footer-menu,
    .footer-links {
        align-items: center;
    }

    .footer-info {
        display: flex;
        flex-direction: column;
        align-items: center;
    }

    .footer-links a {
        margin: 0;
    }

    .cookie-banner {
        bottom: 10px;
        padding: 15px;
    }

    .cookie-container {
        flex-direction: column;
        text-align: center;
    }

    .cookie-actions {
        width: 100%;
        justify-content: center;
    }
}