/*
Theme Name: Puzzle Theme
Author: Puzzle Web
Description: A custom theme for Puzzle Web converted from static HTML.
Version: 1.0
*/
@charset "UTF-8";

/* ==========================================================================
   Reset & Base Styles
   ========================================================================== */
*,
*::before,
*::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

:root {
    /* Colors */
    --color-bg: #FFFFFF;
    --color-text: #000000;
    --color-accent-dark: #444444;
    --color-accent-light: #888888;
    --color-border: #E5E5E5;

    /* Overlay */
    --color-overlay: rgba(0, 0, 0, 0.5);

    /* Fonts */
    --font-ja: 'Noto Sans JP', sans-serif;
    --font-en: 'Montserrat', sans-serif;
    --font-serif: 'Playfair Display', serif;

    /* Sizes */
    --header-height-pc: 60px;
    --header-height-sp: 60px;
}

html {
    font-size: 16px;
    scroll-behavior: smooth;
}

body {
    background-color: var(--color-bg);
    color: var(--color-text);
    font-family: var(--font-ja);
    font-weight: 400;
    line-height: 1.8;
    letter-spacing: 0.05em;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

img {
    max-width: 100%;
    height: auto;
    vertical-align: bottom;
    /* Force grayscale for monotone theme */
    filter: grayscale(100%);
    transition: filter 0.3s ease;
}

img:hover {
    filter: grayscale(0%);
}

a {
    color: inherit;
    text-decoration: none;
    transition: opacity 0.3s ease;
}

a:hover {
    opacity: 0.7;
}

ul,
ol {
    list-style: none;
}

/* ==========================================================================
   Typography
   ========================================================================== */
h1,
h2,
h3,
h4,
h5,
h6 {
    font-family: var(--font-en);
    font-weight: 600;
    line-height: 1.4;
}

.section-title {
    font-size: 1.5rem;
    font-weight: 900;
    margin-bottom: 2rem;
    padding-top: 30px;
    /* Added padding to push it down */
    text-align: center;
    text-transform: uppercase;
    letter-spacing: 0.1em;
}

.section-title span {
    display: block;
    font-size: 1rem;
    font-weight: 400;
    color: var(--color-accent-light);
    margin-top: 0.5rem;
    font-family: var(--font-ja);
}

.section-title span,
.section-title .char {
    font-size: inherit;
    line-height: inherit;
}

/* ==========================================================================
   Layout Utils
   ========================================================================== */
.container {
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

main .section.container,
.hero-buttons {
    padding-left: 15px;
    padding-right: 15px;
}

.mgl-10 {
    margin-left: 10px !important;
}

.section {
    padding: 100px 0;
}

/* ==========================================================================
   Header & Navigation
   ========================================================================== */
.header {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    z-index: 1000;
    transition: background-color 0.3s ease, padding 0.3s ease;
    padding: 20px 0;
    /* Vertical padding only */
    background-color: rgba(255, 255, 255, 0.8);
}

.header.scrolled {
    background-color: rgba(255, 255, 255, 0.95);
    padding: 10px 0;
    box-shadow: 0 1px 0 rgba(0, 0, 0, 0.05);
}

.header-inner {
    display: flex;
    justify-content: space-between;
    align-items: center;
    height: var(--header-height-pc);
}

.logo {
    z-index: 100;
    line-height: 0;
}

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

/* PC Navigation (1000px +) */
.global-nav {
    display: flex;
}

.global-nav ul {
    display: flex;
    gap: 30px;
}

.global-nav a {
    font-family: var(--font-en);
    font-size: 0.9rem;
    text-transform: uppercase;
    position: relative;
}

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

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

/* Hamburger Button */
.hamburger {
    display: none;
    cursor: pointer;
    width: 30px;
    height: 24px;
    position: relative;
    z-index: 1001;
    background: none;
    border: none;
}

.hamburger span {
    display: block;
    position: absolute;
    width: 100%;
    height: 2px;
    background-color: var(--color-text);
    transition: all 0.3s ease;
}

.hamburger span:nth-child(1) {
    top: 0;
}

.hamburger span:nth-child(2) {
    top: 11px;
}

.hamburger span:nth-child(3) {
    bottom: 0;
}

.hamburger.active span:nth-child(1) {
    transform: rotate(45deg);
    top: 11px;
}

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

.hamburger.active span:nth-child(3) {
    transform: rotate(-45deg);
    bottom: 11px;
}

/* Overlay for Mobile Menu */
.overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: var(--color-overlay);
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
    z-index: 999;
}

.overlay.active {
    opacity: 1;
    visibility: visible;
}

/* ==========================================================================
   Footer
   ========================================================================== */
.footer {
    background-color: #111;
    color: #fff;
    padding: 100px 0 40px;
    font-size: 0.9rem;
}

.footer-content {
    display: flex;
    justify-content: space-between;
    align-items: flex-end;
    gap: 40px;
    margin-bottom: 60px;
}

.footer-logo {
    display: block;
    margin-bottom: 10px;
}

.footer-logo img {
    height: 35px;
    width: auto;
    filter: brightness(0) invert(47%);
    /* Reaching #777777 */
}

.footer-tagline {
    font-size: 0.8rem;
    color: var(--color-accent-light);
    letter-spacing: 0.1em;
}

.footer-info {
    display: flex;
    gap: 40px;
    justify-content: flex-end;
    flex-wrap: wrap;
}

.info-label {
    display: block;
    font-family: var(--font-en);
    font-size: 0.75rem;
    font-weight: 700;
    color: #666;
    margin-bottom: 5px;
    letter-spacing: 0.1em;
}

.info-item {
    text-align: right;
}

.info-item p {
    color: #eee;
    font-size: 0.9rem;
}


.footer-bottom {
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    padding-top: 30px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.footer-sub-nav ul {
    display: flex;
    gap: 30px;
}

.footer-sub-nav a {
    font-size: 0.75rem;
    color: #888;
    letter-spacing: 0.05em;
    transition: color 0.3s ease;
}

.footer-sub-nav a:hover {
    color: #fff;
}

.copyright {
    font-size: 0.75rem;
    color: #555;
    font-family: var(--font-en);
}

/* Responsive Footer */
@media (max-width: 999px) {
    .footer-content {
        flex-direction: column;
        align-items: center;
        text-align: center;
        gap: 40px;
    }

    .footer-info {
        justify-content: center;
        text-align: center;
        gap: 30px;
    }

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

    .footer-bottom {
        flex-direction: column;
        gap: 20px;
    }
}

/* ==========================================================================
   Responsive Breakpoints
   ========================================================================== */
/* Tablet & Mobile (Below 1000px) */
@media (max-width: 999px) {
    .global-nav {
        position: fixed;
        top: 0;
        right: -100%;
        /* Hidden by default */
        width: 80%;
        max-width: 360px;
        height: 100%;
        background-color: var(--color-bg);
        flex-direction: column;
        justify-content: center;
        align-items: center;
        transition: right 0.3s cubic-bezier(0.25, 1, 0.5, 1);
        z-index: 999;
        box-shadow: -2px 0 10px rgba(0, 0, 0, 0.1);
    }

    .global-nav.active {
        right: 0;
        /* Slide in */
    }

    .global-nav ul {
        flex-direction: column;
        align-items: center;
        gap: 30px;
    }

    .global-nav a {
        font-size: 1.2rem;
        font-weight: 500;
    }

    .hamburger {
        display: block;
    }

    .section {
        padding: 60px 0;
    }

    .header-inner {
        height: var(--header-height-sp);
    }
}

/* Mobile (Below 600px) */
@media (max-width: 600px) {
    .section-title {
        font-size: 2rem;
    }

    .footer-nav ul {
        flex-direction: column;
        align-items: center;
        gap: 15px;
    }
}

/* ==========================================================================
   Page Specific Styles
   ========================================================================== */

/* --- Common --- */
.service-section {
    position: relative;
    overflow: hidden;
}

#service-particles {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 0;
    /* Behind content */
    pointer-events: none;
    /* Let clicks pass through */
}

.service-section .container {
    position: relative;
    z-index: 1;
    /* Content above background */
}

.page-header {
    padding: 150px 0 80px;
    text-align: center;
    background: url('images/page_header_bg.jpg') no-repeat center center/cover;
    position: relative;
    color: #fff;
    margin-bottom: 0;
}

.page-header::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.4);
    /* Slightly darker overlay for readability */
    z-index: 0;
}

.page-header>* {
    position: relative;
    z-index: 1;
}

/* --- Home (index.html) --- */
.hero {
    height: 100vh;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    text-align: center;
    padding: 0 20px;
    background: url('images/hero.jpg') no-repeat center center/cover;
    position: relative;
    color: #fff;
}

.hero::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.3);
    z-index: 0;
}

.hero>* {
    position: relative;
    z-index: 1;
}

.hero h1 {
    font-size: clamp(2rem, 5vw, 4rem);
    margin-bottom: 2rem;
    padding-top: 50px;
    /* Moves h1 down */
    letter-spacing: 0.1em;
    line-height: 1.2;
}

.hero p {
    font-size: 1rem;
    color: #fff;
    max-width: 700px;
    margin: 0 auto;
}

.hero-buttons {
    display: flex;
    justify-content: center;
    gap: 20px;
    margin-top: 30px;
}

.hero-buttons .btn {
    margin-top: 0;
    /* Reset margin as it is handled by wrapper */
    width: 200px;
    padding: 10px 0;
    text-align: center;
}

.scroll-down {
    position: absolute;
    bottom: 30px;
    left: 50%;
    transform: translateX(-50%);
    color: #fff;
    font-family: var(--font-en);
    font-size: 0.8rem;
    letter-spacing: 0.2em;
    text-align: center;
    z-index: 10;
}

.scroll-down::after {
    content: '';
    display: block;
    width: 1px;
    height: 60px;
    background: #fff;
    margin: 10px auto 0;
    animation: scrollDown 2s infinite;
}

@keyframes scrollDown {
    0% {
        transform: scaleY(0);
        transform-origin: top;
    }

    50% {
        transform: scaleY(1);
        transform-origin: top;
    }

    50.1% {
        transform: scaleY(1);
        transform-origin: bottom;
    }

    100% {
        transform: scaleY(0);
        transform-origin: bottom;
    }
}

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

/* Text Animation */
.section-title .char {
    display: inline-block;
    opacity: 0;
    transform: translateY(20px);
    transition: opacity 0.5s ease, transform 0.5s ease;
}

.section-title.visible .char {
    opacity: 1;
    transform: translateY(0);
}

/* Stagger delay for each character */
.section-title.visible .char:nth-child(1) {
    transition-delay: 0.05s;
}

.section-title.visible .char:nth-child(2) {
    transition-delay: 0.1s;
}

.section-title.visible .char:nth-child(3) {
    transition-delay: 0.15s;
}

.section-title.visible .char:nth-child(4) {
    transition-delay: 0.2s;
}

.section-title.visible .char:nth-child(5) {
    transition-delay: 0.25s;
}

.section-title.visible .char:nth-child(6) {
    transition-delay: 0.3s;
}

.section-title.visible .char:nth-child(7) {
    transition-delay: 0.35s;
}

.section-title.visible .char:nth-child(8) {
    transition-delay: 0.4s;
}

.section-title.visible .char:nth-child(9) {
    transition-delay: 0.45s;
}

.section-title.visible .char:nth-child(10) {
    transition-delay: 0.5s;
}

/* Add more if needed */

.service-item {
    padding: 40px 30px;
    border: none;
    /* Remove border */
    background: rgba(255, 255, 255, 0.4);
    /* Subtle transparent white */
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border-radius: 20px;
    /* Soft rounded corners */
    transition: transform 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275), box-shadow 0.4s ease, background 0.4s ease;
    text-align: center;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.07);
    /* Very subtle initial shadow */
}

.service-item:hover {
    transform: translateY(-10px);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.08);
    /* Soft large shadow on hover */
    background: rgba(255, 255, 255, 0.8);
    /* More opaque on hover */
}

.service-icon {
    display: block;
    font-size: 3rem;
    color: #000;
    margin: 0 auto 20px;
    width: auto;
    height: auto;
    text-align: center;
    transition: transform 0.3s ease;
}

.service-item:hover .service-icon {
    transform: scale(1.1);
    /* Slight zoom on hover */
}

.service-item h3 {
    font-size: 1.3rem;
    margin-bottom: 20px;
    font-family: var(--font-en);
    text-align: center;
    letter-spacing: 0.05em;
    transition: color 0.3s ease;
}

.service-item p {
    font-size: 0.95rem;
    color: var(--color-accent-dark);
    line-height: 1.8;
}

.cta-section {
    background-color: #000;
    color: #fff;
    text-align: center;
    padding: 80px 20px;
}

.cta-section h2 {
    color: #fff;
    margin-bottom: 30px;
}

.btn {
    display: inline-block;
    padding: 15px 40px;
    border: 1px solid #000;
    background: transparent;
    color: #000;
    font-family: var(--font-en);
    font-weight: 600;
    letter-spacing: 0.1em;
    transition: all 0.3s ease;
    margin-top: 30px;
}

.btn:hover {
    background: #000;
    color: #fff;
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
}

.btn-white {
    border-color: rgba(255, 255, 255, 0.7);
    color: #fff;
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(5px);
    -webkit-backdrop-filter: blur(5px);
}

.btn-white:hover {
    background: #fff;
    color: #000;
    box-shadow: 0 5px 20px rgba(255, 255, 255, 0.4);
    transform: translateY(-2px);
    border-color: #fff;
}

/* --- About (about.html) --- */
.about-content {
    display: flex;
    flex-wrap: wrap;
    gap: 50px;
    align-items: center;
    margin-top: 50px;
}

.about-image {
    flex: 1;
    min-width: 300px;
    background-color: #eee;
    aspect-ratio: 16/9;
    /* Placeholder aspect ratio */
    display: flex;
    align-items: center;
    justify-content: center;
    font-family: var(--font-en);
    color: #aaa;
}

.about-text {
    flex: 1;
    min-width: 300px;
}

.about-text .Philosophy {
    margin-bottom: 20px;
}

.about-text h3 {
    font-size: 1.5rem;
    margin-bottom: 20px;
}

.about-details-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 60px;
    margin-top: 100px;
}

.about-column {
    position: relative;
}

.column-inner {
    padding-top: 30px;
    border-top: 1px solid var(--color-border);
}

.column-tag {
    display: block;
    font-family: var(--font-en);
    font-size: 0.7rem;
    font-weight: 700;
    color: var(--color-accent-light);
    letter-spacing: 0.2em;
    margin-bottom: 20px;
}

.about-column h3 {
    font-size: 1.3rem;
    margin-bottom: 25px;
    font-family: var(--font-ja);
    font-weight: 700;
}

.about-column p {
    font-size: 0.9rem;
    line-height: 2;
    color: var(--color-accent-dark);
    margin-bottom: 20px;
}

.about-column p:last-child {
    margin-bottom: 0;
}

@media (max-width: 768px) {
    .about-details-grid {
        grid-template-columns: 1fr;
        gap: 50px;
        margin-top: 60px;
    }
}

/* --- Price (price.html) --- */
.pricing-section {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 20px;
    margin-top: 60px;
    padding: 0 10px;
}

.pricing-card {
    background: #fff;
    border: 1px solid #e5e5e5;
    padding: 50px 25px;
    text-align: center;
    transition: all 0.4s cubic-bezier(0.165, 0.84, 0.44, 1);
    display: flex;
    flex-direction: column;
    position: relative;
    cursor: default;
}

/* Hover State - The "Cool" Factor */
.pricing-card:hover {
    background: #111;
    border-color: #111;
    transform: translateY(-8px) scale(1.02);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.2);
    z-index: 10;
}

.pricing-title {
    font-family: var(--font-en);
    font-size: 1.2rem;
    font-weight: 700;
    letter-spacing: 0.15em;
    margin-bottom: 25px;
    color: #000;
    transition: color 0.4s ease;
    text-transform: uppercase;
}

.pricing-card:hover .pricing-title {
    color: #fff;
}

.pricing-cost {
    font-family: var(--font-serif);
    /* Serif for Luxury feel */
    font-size: 2.2rem;
    font-weight: 600;
    margin-bottom: 30px;
    color: #000;
    display: flex;
    align-items: baseline;
    justify-content: center;
    gap: 5px;
    transition: color 0.4s ease;
}

.pricing-card:hover .pricing-cost {
    color: #fff;
}

.pricing-cost span {
    font-family: var(--font-ja);
    font-size: 1rem;
    font-weight: 400;
}

.pricing-divider {
    width: 30px;
    height: 1px;
    background-color: #000;
    margin: 0 auto 35px;
    transition: background-color 0.4s ease, width 0.4s ease;
}

.pricing-card:hover .pricing-divider {
    background-color: #fff;
    width: 50px;
    /* Slight expansion on hover */
}

.pricing-features {
    list-style: none;
    padding: 0;
    margin: 0 auto;
    text-align: left;
    font-size: 0.9rem;
    color: var(--color-accent-dark);
    line-height: 2.2;
    width: fit-content;
    transition: color 0.4s ease;
}

.pricing-card:hover .pricing-features {
    color: #ccc;
}

.pricing-features li {
    margin-bottom: 8px;
    padding-left: 20px;
    position: relative;
}

.pricing-features li::before {
    content: '';
    position: absolute;
    left: 0;
    top: 10px;
    width: 6px;
    height: 1px;
    /* Minimal dash instead of dot */
    background-color: #000;
    transition: background-color 0.4s ease;
}

.pricing-card:hover .pricing-features li::before {
    background-color: #fff;
}

@media (max-width: 999px) {
    .pricing-section {
        grid-template-columns: repeat(2, 1fr);
        gap: 30px;
    }
}

@media (max-width: 600px) {
    .pricing-section {
        grid-template-columns: 1fr;
        gap: 40px;
    }

    .pricing-card {
        padding: 40px 20px;
    }
}

/* --- Flow (flow.html) --- */
.flow-list {
    position: relative;
    max-width: 800px;
    margin: 0 auto;
}

.flow-list::before {
    content: '';
    position: absolute;
    top: 0;
    left: 20px;
    /* Adjust based on circle size */
    width: 1px;
    height: 100%;
    background-color: var(--color-border);
    z-index: 0;
}

.flow-item {
    display: flex;
    margin-bottom: 50px;
    position: relative;
    z-index: 1;
}

.flow-icon {
    width: 40px;
    height: 40px;
    background-color: #000;
    color: #fff;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-family: var(--font-en);
    font-weight: 700;
    margin-right: 30px;
    flex-shrink: 0;
}

.flow-content h3 {
    font-size: 1.2rem;
    margin-bottom: 10px;
}

.flow-content p {
    color: var(--color-accent-dark);
    font-size: 0.95rem;
}

/* --- Works (works.html) --- */
.works-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 30px;
    margin-top: 40px;
}

.work-item {
    position: relative;
    display: block;
    border: 1px solid var(--color-border);
    transition: opacity 0.3s ease;
}

.work-item:hover {
    opacity: 0.8;
}

.work-thumb {
    aspect-ratio: 4/3;
    background-color: #eee;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #aaa;
    font-family: var(--font-en);
}

.work-info {
    padding: 20px;
}

.work-title {
    font-size: 1.1rem;
    margin-bottom: 5px;
    font-weight: 600;
    text-align: left;
}

.work-cat {
    font-size: 0.8rem;
    color: var(--color-accent-light);
    text-transform: uppercase;
    text-align: left;
}

/* --- Post (post.html) --- */
.post-list {
    margin-top: 40px;
    max-width: 900px;
    margin-left: auto;
    margin-right: auto;
}

.post-item {
    display: flex;
    gap: 30px;
    margin-bottom: 40px;
    padding-bottom: 40px;
    border-bottom: 1px solid var(--color-border);
    align-items: flex-start;
}

.post-thumb {
    width: 250px;
    flex-shrink: 0;
    aspect-ratio: 16/9;
    background-color: #eee;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #aaa;
    font-family: var(--font-en);
}

.post-info {
    flex: 1;
}

.post-meta {
    font-size: 0.8rem;
    color: var(--color-accent-light);
    margin-bottom: 10px;
    display: flex;
    gap: 15px;
}

.post-title {
    font-size: 1.4rem;
    margin-bottom: 15px;
    line-height: 1.4;
}

.post-excerpt {
    color: var(--color-accent-dark);
    font-size: 0.95rem;
    margin-bottom: 20px;
}

.read-more {
    font-size: 0.9rem;
    text-decoration: underline;
    font-family: var(--font-en);
}

@media (max-width: 600px) {
    .post-item {
        flex-direction: column;
        gap: 20px;
    }

    .post-thumb {
        width: 100%;
    }
}

/* --- Contact (contact.html) --- */
/* --- Contact Form (WordPress / Contact Form 7 Style) --- */
.contact_form {
    max-width: 700px;
    margin: 0 auto;
    margin-top: 50px;
    font-family: var(--font-ja);
}

.wpcf7-form p {
    margin-bottom: 30px;
}

.wpcf7-form label {
    display: block;
    width: 100%;
    font-weight: 500;
    font-size: 0.95rem;
    color: var(--color-text);
    margin-bottom: 10px;
}

.wpcf7-form em {
    color: #cc0000;
    font-style: normal;
    margin-left: 5px;
    font-size: 0.9rem;
}

.wpcf7-form-control-wrap {
    display: block;
    width: 100%;
    margin-top: 8px;
}

/* Input & Textarea Styles */
.wpcf7-text,
.wpcf7-textarea,
.wpcf7-email {
    width: 100%;
    padding: 15px 20px;
    border: 1px solid var(--color-border);
    background-color: #fff;
    font-family: inherit;
    font-size: 1rem;
    color: var(--color-text);
    transition: all 0.3s ease;
    border-radius: 0;
    /* Sharp edges for modern look */
    -webkit-appearance: none;
    appearance: none;
    /* Remove default styling on iOS */
}

.wpcf7-text:focus,
.wpcf7-textarea:focus,
.wpcf7-email:focus {
    outline: none;
    border-color: #000;
    box-shadow: 0 0 0 1px #000;
}

.wpcf7-textarea {
    height: 200px;
    resize: vertical;
    line-height: 1.6;
}

/* Submit Button Style */
.wpcf7-submit {
    display: block;
    width: 100%;
    max-width: 300px;
    margin: 40px auto 0;
    padding: 16px 0;
    background-color: #000;
    color: #fff;
    border: 1px solid #000;
    font-family: var(--font-en);
    font-weight: 600;
    font-size: 1rem;
    letter-spacing: 0.15em;
    cursor: pointer;
    transition: all 0.3s ease;
    text-align: center;
}

.wpcf7-submit:hover {
    background-color: #fff;
    color: #000;
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
}

.wpcf7-submit:disabled {
    background-color: #ccc;
    border-color: #ccc;
    cursor: not-allowed;
    transform: none;
    box-shadow: none;
}

/* Response Message */
.wpcf7-response-output {
    margin-top: 30px;
    padding: 15px;
    border: 1px solid var(--color-border);
    text-align: center;
    font-size: 0.9rem;
}

.contact-info {
    text-align: center;
    margin-top: 60px;
    color: var(--color-accent-dark);
}

/* --- Privacy (privacy.html) --- */
.policy-content {
    max-width: 800px;
    margin: 0 auto;
}

.policy-content h2 {
    font-size: 1.2rem;
    margin-top: 40px;
    margin-bottom: 20px;
    font-family: var(--font-ja);
}

.policy-content p {
    margin-bottom: 20px;
    color: var(--color-accent-dark);
    line-height: 2;
}

/* --- Sitemap (sitemap.html) --- */
.sitemap-list {
    max-width: 600px;
    margin: 0 auto;
    border-left: 1px solid var(--color-border);
    padding-left: 40px;
}

.sitemap-list li {
    margin-bottom: 20px;
}

.sitemap-list a {
    font-size: 1.1rem;
    font-family: var(--font-en);
    font-weight: 500;
}

/* --- Works (index.html) --- */
.works-section {
    background-color: #f9f9f9;
}

.works-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
    gap: 40px;
    margin-top: 50px;
}

.work-item {
    background: #fff;
    padding-bottom: 20px;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    cursor: pointer;
}

.work-item:hover {
    transform: translateY(-5px);
    box-shadow: 0 15px 30px rgba(0, 0, 0, 0.05);
}

.work-thumb {
    overflow: hidden;
    aspect-ratio: 16 / 9;
    margin-bottom: 15px;
}

.work-thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    filter: grayscale(100%);
    transition: transform 0.5s ease, filter 0.5s ease;
}

.work-item:hover .work-thumb img {
    transform: scale(1.05);
    filter: grayscale(0%);
}

.work-title {
    font-family: var(--font-ja);
    font-size: 1rem;
    font-weight: 500;
    text-align: left;
    padding: 0;
    margin: 0 0 5px;
    color: var(--color-text);
}

.works-more {
    text-align: center;
    margin-top: 60px;
}

/* --- Links (index.html) --- */
.links-section {
    padding: 0;
    overflow: hidden;
}

.links-grid {
    display: flex;
    flex-wrap: wrap;
}

.link-box {
    position: relative;
    flex: 1;
    min-width: 50%;
    height: 350px;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    color: #fff;
    overflow: hidden;
    text-decoration: none !important;
}

@media (max-width: 768px) {
    .link-box {
        min-width: 100%;
        height: 350px;
    }
}

.link-bg {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-size: cover;
    background-position: center;
    transition: transform 0.8s cubic-bezier(0.25, 0.46, 0.45, 0.94);
    z-index: 1;
}

.link-box::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(126, 127, 131, 0.7);
    /* Deep blue overlay */
    z-index: 2;
    transition: background-color 0.4s ease;
}

.link-box:hover .link-bg {
    transform: scale(1.1);
}

.link-box:hover::after {
    background: rgba(70, 71, 73, 0.5);
}

.link-content {
    position: relative;
    z-index: 3;
    padding: 30px;
}

.link-title {
    font-size: clamp(2rem, 5vw, 3rem);
    font-weight: 700;
    margin-bottom: 15px;
    letter-spacing: 0.15em;
    color: #fff;
}

.link-subtitle {
    font-size: 1.1rem;
    font-weight: 400;
    margin-bottom: 40px;
    color: rgba(255, 255, 255, 0.9);
}

.link-btn {
    display: inline-block;
    padding: 14px 50px;
    border: 2px solid #fff;
    border-radius: 50px;
    font-size: 1rem;
    font-weight: 700;
    letter-spacing: 0.1em;
    color: #fff;
    transition: all 0.4s ease;
}

.link-box:hover .link-btn {
    background: #fff;
    color: #003366;
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.2);
}

/* ==========================================================================
   Single Post (single-post.html)
   ========================================================================== */
.single-post-container {
    max-width: 800px;
    margin: 0 auto;
    padding-top: 60px;
    padding-bottom: 100px;
}

/* Article Header */
.article-header {
    margin-bottom: 40px;
    text-align: center;
}

.single-meta {
    justify-content: center;
    margin-bottom: 20px;
    font-size: 0.9rem;
}

.article-title {
    font-size: clamp(1.5rem, 4vw, 2.2rem);
    font-weight: 700;
    line-height: 1.4;
    font-family: var(--font-ja);
}

/* Thumbnail */
.article-thumbnail {
    width: 100%;
    aspect-ratio: 16/9;
    background-color: #eee;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #aaa;
    font-family: var(--font-en);
    font-size: 2rem;
    font-weight: 700;
    margin-bottom: 60px;
}

/* Post Content */
.post-content {
    font-family: var(--font-ja);
    color: var(--color-text);
    line-height: 2;
    font-size: 1rem;
    margin-bottom: 80px;
}

.post-content h2 {
    font-size: 1.5rem;
    margin-top: 60px;
    margin-bottom: 30px;
    padding-bottom: 15px;
    border-bottom: 1px solid var(--color-border);
}

.post-content h3 {
    font-size: 1.25rem;
    margin-top: 40px;
    margin-bottom: 20px;
    position: relative;
    padding-left: 15px;
}

.post-content h3::before {
    content: '';
    position: absolute;
    left: 0;
    top: 50%;
    transform: translateY(-50%);
    width: 4px;
    height: 20px;
    background-color: #000;
}

.post-content p {
    margin-bottom: 30px;
}

.post-content ul,
.post-content ol {
    margin-bottom: 30px;
    padding-left: 20px;
    list-style: disc;
}

.post-content li {
    margin-bottom: 10px;
}

.post-content blockquote {
    margin: 40px 0;
    padding: 30px;
    background-color: #f9f9f9;
    font-style: italic;
    border-left: 4px solid #000;
}

.post-content blockquote p {
    margin-bottom: 10px;
}

.post-content cite {
    display: block;
    text-align: right;
    font-size: 0.9rem;
    color: var(--color-accent-dark);
}

/* Post Navigation */
.post-navigation {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding-top: 60px;
    border-top: 1px solid var(--color-border);
    gap: 20px;
}

.nav-prev,
.nav-next {
    flex: 1;
    max-width: 40%;
}

.nav-next {
    text-align: right;
}

.nav-prev a,
.nav-next a {
    display: block;
}

.nav-label {
    display: block;
    font-family: var(--font-en);
    font-size: 0.8rem;
    color: var(--color-accent-light);
    margin-bottom: 5px;
    transition: color 0.3s ease;
}

.nav-title {
    display: block;
    font-size: 0.9rem;
    font-weight: 500;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    transition: color 0.3s ease;
}

.nav-prev a:hover .nav-label,
.nav-prev a:hover .nav-title,
.nav-next a:hover .nav-label,
.nav-next a:hover .nav-title {
    color: var(--color-accent-dark);
}

.nav-btn-list a {
    display: inline-block;
    padding: 10px 30px;
    border: 1px solid var(--color-border);
    font-size: 0.85rem;
    color: var(--color-text);
    transition: all 0.3s ease;
}

.nav-btn-list a:hover {
    background-color: #000;
    color: #fff;
    border-color: #000;
}

@media (max-width: 600px) {
    .post-navigation {
        flex-direction: column;
        gap: 30px;
    }

    .nav-prev,
    .nav-next {
        max-width: 100%;
        width: 100%;
        text-align: center !important;
    }

    .nav-btn-list {
        order: 3;
    }

    .nav-prev {
        order: 1;
    }

    .nav-next {
        order: 2;
    }
}

/* ==========================================================================
   Page Top Button
   ========================================================================== */
.page-top {
    position: fixed;
    right: 30px;
    bottom: 30px;
    width: 60px;
    height: 60px;
    background-color: #dcdbdb;
    color: #111111;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 24px;
    z-index: 500;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.2);
    opacity: 0;
    visibility: hidden;
    transition: all 0.4s ease;
}

.page-top.active {
    opacity: 1;
    visibility: visible;
}

.page-top i {
    transition: transform 0.3s ease;
}

.page-top:hover {
    background-color: #b5b5b5;
    transform: translateY(-3px);
}

.page-top:hover i {
    transform: translateY(-5px);
}

@media (max-width: 600px) {
    .page-top {
        right: 20px;
        bottom: 20px;
        width: 50px;
        height: 50px;
        font-size: 20px;
    }
}

/* ==========================================================================
   Pagination
   ========================================================================== */
.pagination,
.pagination .nav-links {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 10px;
    font-family: var(--font-en);
}

.pagination {
    margin-top: 80px;
}


.page-num,
.page-numbers:not(.next):not(.prev),
.pagination .nav-links .page-numbers:not(.next):not(.prev) {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    background-color: transparent;
    border: 1px solid var(--color-border);
    color: var(--color-text);
    font-size: 0.9rem;
    font-weight: 500;
    transition: all 0.3s ease;
    text-decoration: none;
    cursor: pointer;
}


.page-num:hover,
.page-num.current,
.page-numbers:not(.next):not(.prev):hover,
.pagination .nav-links .page-numbers:not(.next):not(.prev):hover,
.page-numbers.current,
.pagination .nav-links .page-numbers.current,
.pagination .page-numbers.current {
    background-color: #000 !important;
    color: #fff !important;
    border-color: #000 !important;
    opacity: 1 !important;
}


/* Ensure next/prev links don't get the box style if they have page-numbers class */
.page-numbers.next,
.page-numbers.prev {
    width: auto;
    height: auto;
    border: none;
    background: none;
}


.page-dots {
    font-size: 1rem;
    color: var(--color-accent-light);
    margin: 0 5px;
    letter-spacing: 2px;
}

/* Fix for WordPress nested pagination structure */
.pagination .navigation.pagination {
    margin-top: 0;
    padding-top: 0;
}

.pagination .nav-links {
    margin-top: 0;
    padding-top: 0;
}

.page-next,
.page-numbers.next,
.page-numbers.prev {
    margin-left: 20px;
    font-size: 0.9rem;
    font-weight: 600;
    color: var(--color-text);
    letter-spacing: 0.1em;
    display: flex;
    align-items: center;
    gap: 10px;
    transition: color 0.3s ease;
    text-decoration: none;
}

.page-numbers.prev {
    margin-left: 0;
    margin-right: 20px;
}

.page-next:hover,
.page-numbers.next:hover,
.page-numbers.prev:hover {
    color: var(--color-accent-light);
}

@media (max-width: 600px) {
    .pagination {
        gap: 5px;
        margin-top: 60px;
    }

    .page-num,
    .page-numbers:not(.next):not(.prev) {
        width: 35px;
        height: 35px;
        font-size: 0.8rem;
    }

    .page-next,
    .page-numbers.next,
    .page-numbers.prev {
        margin-left: 10px;
        font-size: 0.8rem;
    }
}

/* ==========================================================================
   Breadcrumbs
   ========================================================================== */
.breadcrumb-container {
    height: 30px;
    background-color: #fcfcfc;
    border-bottom: 1px solid #f0f0f0;
    line-height: 30px;
    /* Center text vertically */
}

.breadcrumbs {
    display: flex;
    align-items: center;
    list-style: none;
    padding: 0;
    margin: 0;
    font-size: 0.75rem;
    font-family: var(--font-en);
    letter-spacing: 0.1em;
    color: #999;
    text-transform: uppercase;
}

.breadcrumbs li {
    display: flex;
    align-items: center;
}

.breadcrumbs li+li::before {
    content: '/';
    margin: 0 15px;
    color: #ddd;
    font-size: 0.7rem;
}

.breadcrumbs a {
    color: #777;
    transition: color 0.3s ease;
}

.breadcrumbs a:hover {
    color: #111;
}

.breadcrumbs li:last-child {
    color: #333;
    font-weight: 500;
}