/* Reset and Base Styles */
@import url('https://fonts.googleapis.com/css2?family=Montserrat:wght@700;900&family=Noto+Sans+JP:wght@400;700&display=swap');

*,
*::before,
*::after {
    box-sizing: border-box;
}

:root {
    --pale-green: #A8D8B9; /* 仮のペールグリーン */
    --vivid-red: #E63946;   /* 仮のレッド */
    --dark-blue: #1D3557;  /* アクセント用の濃い青 */
    --light-gray: #F1FAEE; /* 明るい背景色 */
    --white: #FFFFFF;
    --black: #000000;
}

body {
    font-family: 'Noto Sans JP', sans-serif;
    margin: 0;
    background-color: var(--light-gray);
    color: var(--dark-blue);
    overflow-x: hidden;
    line-height: 1.8;
}

body.mobile-nav-open {
    overflow: hidden;
}

a {
    color: var(--vivid-red);
    text-decoration: none;
    transition: color 0.3s ease;
}

a:hover {
    color: var(--dark-blue);
}

h1, h2, h3, h4, h5, h6 {
    font-family: 'Montserrat', sans-serif;
    font-weight: 900;
    color: var(--dark-blue);
}

h2 {
    font-size: 3rem;
    text-align: center;
    margin-bottom: 60px;
    position: relative;
}

h2::after {
    content: '';
    position: absolute;
    left: 50%;
    transform: translateX(-50%);
    bottom: -15px;
    width: 80px;
    height: 5px;
    background-color: var(--vivid-red);
}


/* Header */
header {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    padding: 15px 50px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    z-index: 1000;
    background-color: rgba(255, 255, 255, 0.8);
    backdrop-filter: blur(10px);
    border-bottom: 1px solid #eee;
    transition: top 0.3s;
}

.logo {
    font-family: 'Montserrat', sans-serif;
    font-size: 1.8rem;
    font-weight: 900;
    color: var(--dark-blue);
    z-index: 1001; /* Ensure logo is above mobile nav */
}

.nav-pc ul {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
}

.nav-pc li {
    margin-left: 40px;
}

.nav-pc a {
    font-family: 'Montserrat', sans-serif;
    font-weight: 700;
    font-size: 1rem;
    color: var(--dark-blue);
}

.nav-pc a:hover {
    color: var(--vivid-red);
}

/* Hamburger Menu */
.hamburger-menu {
    display: none; /* Hidden by default */
    flex-direction: column;
    justify-content: space-around;
    width: 30px;
    height: 25px;
    background: transparent;
    border: none;
    cursor: pointer;
    padding: 0;
    z-index: 1001;
}

.hamburger-line {
    width: 30px;
    height: 3px;
    background-color: var(--dark-blue);
    border-radius: 3px;
    transition: all 0.3s ease-in-out;
}

.mobile-nav-open .hamburger-line:nth-child(1) {
    transform: rotate(45deg) translate(7px, 7px);
}

.mobile-nav-open .hamburger-line:nth-child(2) {
    opacity: 0;
}

.mobile-nav-open .hamburger-line:nth-child(3) {
    transform: rotate(-45deg) translate(7px, -7px);
}


/* Mobile Navigation */
.nav-mobile {
    display: none; /* Hidden by default */
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(29, 53, 87, 0.98); /* Dark blue with opacity */
    justify-content: center;
    align-items: center;
    flex-direction: column;
    z-index: 1000;
    opacity: 0;
    transform: translateY(-100%);
    transition: opacity 0.3s ease-in-out, transform 0.3s ease-in-out;
}

.mobile-nav-open .nav-mobile {
    display: flex;
    opacity: 1;
    transform: translateY(0);
}

.nav-mobile ul {
    list-style: none;
    padding: 0;
    text-align: center;
}

.nav-mobile li {
    margin: 20px 0;
}

.nav-mobile a {
    color: var(--white);
    font-size: 2rem;
    font-family: 'Montserrat', sans-serif;
    font-weight: 700;
}

.nav-mobile a:hover {
    color: var(--vivid-red);
}


/* Main Content */
main {
    padding-top: 75px; /* Adjust based on header height */
}

section {
    padding: 100px 50px;
}

.section-intro {
    text-align: center;
    max-width: 800px;
    margin: -30px auto 60px; /* Adjust margin to bring it closer to the title */
}

.section-intro .catchphrase {
    font-family: 'Montserrat', sans-serif;
    font-weight: 700;
    font-size: 1.5rem;
    color: var(--vivid-red);
    margin-bottom: 1rem;
}

.section-intro p {
    font-size: 1.1rem;
    line-height: 1.8;
    color: #333;
}

/* Hero Section */
#hero {
    height: 100vh;
    position: relative;
    overflow: hidden;
    background-color: var(--dark-blue);
    padding: 0;
    display: flex;
    align-items: center;
    justify-content: center;
}

.hero-grid {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    grid-template-rows: repeat(4, 1fr);
    gap: 10px;
    transform: rotate(-15deg) scale(1.4);
    opacity: 0.3;
    filter: grayscale(100%);
}

.grid-item {
    background-size: cover;
    background-position: center;
    border-radius: 8px;
    animation: scroll-bg 60s linear infinite;
}

/* Stagger the animation start */
.grid-item:nth-child(3n) { animation-duration: 45s; }
.grid-item:nth-child(4n) { animation-duration: 70s; }
.grid-item:nth-child(5n) { animation-direction: reverse; }


@keyframes scroll-bg {
    0% { background-position: 50% 0%; }
    100% { background-position: 50% 200%; }
}

.hero-text-container {
    position: relative;
    z-index: 2;
    text-align: center;
    background-color: rgba(0, 0, 0, 0.5);
    padding: 40px;
    border-radius: 10px;
    backdrop-filter: blur(5px);
}

.hero-title {
    font-size: 4.5vw;
    color: var(--white);
    margin: 0;
    line-height: 1.3;
    text-shadow: 2px 2px 20px rgba(0,0,0,0.7);
}

/* Cards */
.card-container {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 40px;
}

.card-link {
    text-decoration: none;
    color: inherit;
    display: block;
}

.card {
    background-color: var(--white);
    border-radius: 15px;
    overflow: hidden;
    box-shadow: 0 8px 24px rgba(29, 53, 87, 0.1);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    display: flex;
    flex-direction: column;
    height: 100%; /* Make card fill the link container */
}

.card-link:hover .card {
    transform: translateY(-10px);
    box-shadow: 0 12px 32px rgba(29, 53, 87, 0.15);
}

.card img {
    width: 100%;
    height: 220px;
    object-fit: cover;
    transition: transform 0.4s ease;
}

.card-link:hover .card img {
    transform: scale(1.05);
}

.card-content {
    padding: 30px;
    flex-grow: 1;
    display: flex;
    flex-direction: column;
}

.card-content h3 {
    font-size: 1.5rem;
    margin-top: 0;
    margin-bottom: 15px;
    color: var(--dark-blue);
    text-align: left;
}

.card-content p {
    font-size: 1rem;
    line-height: 1.7;
    color: #555; /* 少し濃いめのグレー */
    flex-grow: 1;
}

/* Use Pale Green for Service section card titles */
#service .card-content h3 {
    color: var(--pale-green);
}

/* Contact Form */
#contact {
    background-color: var(--white);
}

#contact p {
    max-width: 600px;
    margin: 0 auto 40px;
    text-align: center;
}

form {
    max-width: 600px;
    margin: 0 auto;
    text-align: left;
}

form input,
form textarea {
    width: 100%;
    padding: 15px;
    margin-bottom: 20px;
    border: 1px solid #ddd;
    border-radius: 8px;
    background-color: var(--white);
    color: var(--dark-blue);
    font-size: 1rem;
    font-family: 'Noto Sans JP', sans-serif;
    transition: border-color 0.3s ease, box-shadow 0.3s ease;
}

form input:focus,
form textarea:focus {
    outline: none;
    border-color: var(--pale-green);
    box-shadow: 0 0 0 3px rgba(168, 216, 185, 0.3);
}

form button {
    background-color: var(--vivid-red);
    color: var(--white);
    padding: 15px 40px;
    border: none;
    border-radius: 50px;
    cursor: pointer;
    font-weight: 700;
    font-family: 'Montserrat', sans-serif;
    font-size: 1rem;
    transition: background-color 0.3s ease, transform 0.3s ease;
    display: block;
    margin: 20px auto 0;
    text-transform: uppercase;
}

form button:hover {
    background-color: #c0392b; /* 少し暗い赤 */
    transform: translateY(-3px);
}

/* Policy Page */
#policy {
    background-color: var(--white);
    padding-top: 120px;
    padding-bottom: 120px;
}
.policy-content {
    max-width: 800px;
    margin: 0 auto;
}
.policy-content h3 {
    font-size: 1.5rem;
    color: var(--dark-blue);
    margin-top: 2em;
    margin-bottom: 1em;
    border-bottom: 2px solid var(--pale-green);
    padding-bottom: 0.5em;
    text-align: left;
}
.policy-content p {
    font-size: 1rem;
    line-height: 2;
}

/* Service Details Page */
#service-details {
    background-color: var(--white);
    padding-top: 120px;
    padding-bottom: 120px;
}

.service-detail-item {
    max-width: 800px;
    margin: 0 auto 60px;
}

.service-detail-item h3 {
    font-size: 1.8rem;
    color: var(--dark-blue);
    margin-bottom: 1.5em;
    padding-left: 1em;
    border-left: 5px solid var(--vivid-red);
    text-align: left;
}

.service-detail-item p {
    font-size: 1.1rem;
    line-height: 2;
    color: #333;
}

.service-detail-image {
    width: 100%;
    max-width: 600px;
    height: auto;
    border-radius: 10px;
    margin: 0 auto 2em;
    display: block;
    box-shadow: 0 8px 24px rgba(29, 53, 87, 0.1);
}


/* Footer */
footer {
    background-color: var(--dark-blue);
    color: var(--light-gray);
    text-align: center;
    padding: 40px 30px;
}

.footer-nav {
    margin-bottom: 20px;
}

.footer-nav a {
    margin: 0 15px;
    font-family: 'Montserrat', sans-serif;
    font-weight: 700;
    color: var(--light-gray);
}

.footer-nav a:hover {
    color: var(--vivid-red);
}

.footer-social {
    margin-bottom: 20px;
}

.footer-social a {
    font-family: 'Montserrat', sans-serif;
    font-weight: 700;
    color: var(--light-gray);
    transition: color 0.3s ease, background-color 0.3s ease, border-color 0.3s ease;
    border: 1px solid var(--light-gray);
    padding: 8px 20px;
    border-radius: 50px;
    display: inline-block;
}

.footer-social a:hover {
    background-color: var(--vivid-red);
    color: var(--white);
    border-color: var(--vivid-red);
}

.footer-links {
    margin-top: 20px;
}

.footer-links a {
    color: var(--light-gray);
    text-decoration: underline;
    font-size: 0.9rem;
}

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

footer p {
    margin: 0;
    font-size: 0.9rem;
}


/* Responsive */
@media (max-width: 768px) {
    header {
        padding: 15px 20px;
    }

    .nav-pc {
        display: none;
    }

    .hamburger-menu {
        display: flex;
    }

    h2 {
        font-size: 2.2rem;
    }

    section {
        padding: 80px 20px;
    }

    .hero-title {
        font-size: 8vw;
    }
    .hero-grid {
        grid-template-columns: repeat(3, 1fr);
        grid-template-rows: repeat(5, 1fr);
    }
}

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

/* SPAM対策: Honeypot */
.honeypot {
    display: none;
}
