:root {
    /* Color Palette */
    --color-bg-body: #F9F7F2;
    /* Warm off-white */
    --color-bg-section: #FFFFFF;
    /* White */
    --color-bg-accent: #F4EBE2;
    /* Light beige/wood tone */

    --color-text-main: #333333;
    /* Dark gray for softer contrast than black */
    --color-text-light: #777777;

    --color-primary: #8C6A4B;
    /* Wood/Earth tone */
    --color-secondary: #8F2E14;
    /* Red-Brown (Benigara) - Logo Color */

    --color-border: #E0E0E0;
    --color-orange: #ed6730;


    /* Spacing */
    --spacing-xs: 0.5rem;
    --spacing-sm: 1rem;
    --spacing-md: 2rem;
    --spacing-lg: 4rem;
    --spacing-xl: 6rem;

    /* Typography */
    --font-serif: "Shippori Mincho", "Yu Mincho", "YuMincho", serif;
    --font-sans: "Inter", "Yu Gothic", "YuGothic", sans-serif;

    --font-size-base: 16px;
    --font-size-h1: 3.5rem;
    --font-size-h2: 2.25rem;
    --font-size-h3: 1.5rem;

    /* Layout */
    --container-width: 1200px;
    --header-height: 80px;

    /* Animation */
    --transition-base: 0.3s ease;
}

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

body {
    font-family: var(--font-sans);
    background-color: var(--color-bg-body);
    color: var(--color-text-main);
    line-height: 1.8;
    font-size: var(--font-size-base);
    -webkit-font-smoothing: antialiased;
}

h1,
h2,
h3,
h4,
h5,
h6 {
    font-family: var(--font-serif);
    font-weight: 500;
    line-height: 1.4;
    color: var(--color-secondary);
}

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

ul,
ol {
    list-style: none;
}

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

/* Utilities */
.container {
    max-width: var(--container-width);
    margin: 0 auto;
    padding: 0 var(--spacing-sm);
}

.section {
    padding: var(--spacing-lg) 0;
    position: relative;
    overflow: hidden;
}

.text-center {
    text-align: center;
}
.white{
    color: #fff;
}

/* Components */

/* Button */
.btn {
    display: inline-block;
    padding: 1rem 2.5rem;
    border: 1px solid var(--color-secondary);
    background-color: var(--color-secondary);
    color: #fff;
    font-family: var(--font-sans);
    font-weight: 500;
    letter-spacing: 0.05em;
    position: relative;
    overflow: hidden;
    z-index: 1;
}

.btn::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 0%;
    height: 100%;
    background-color: #fff;
    z-index: -1;
    transition: all var(--transition-base);
}

.btn:hover {
    color: var(--color-secondary);
}

.btn:hover::after {
    width: 100%;
}

.btn-outline {
    background-color: transparent;
    color: var(--color-secondary);
}

.btn-outline:hover {
    color: #fff;
}

.btn-outline::after {
    background-color: var(--color-secondary);
}

/* Section Title */
.section-title {
    margin-bottom: var(--spacing-lg);
    text-align: center;
    position: relative;
    display: inline-block;
    padding-bottom: 1rem;
}

/* Add a natural decorative line */
.section-title::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 60px;
    height: 3px;
    background-color: var(--color-secondary);
    border-radius: 2px;
}

.section-title .en {
    display: block;
    font-family: var(--font-sans);
    font-size: 0.875rem;
    letter-spacing: 0.2em;
    color: var(--color-secondary);
    /* Use accent color */
    margin-bottom: 0.5rem;
    text-transform: uppercase;
    font-weight: 600;
}

.section-title .jp {
    font-size: var(--font-size-h2);
    display: block;
    line-height: 1.2;
}

/* Secondary Headings (h3 inside sections) */
h3 {
    position: relative;
    padding-left: 1rem;
    margin-bottom: 1.5rem;
    font-size: var(--font-size-h3);
}

/* Vertical bar for H3 */
h3::before {
    content: '';
    position: absolute;
    left: 0;
    top: 0.2em;
    bottom: 0.2em;
    width: 4px;
    background-color: var(--color-secondary);
    border-radius: 2px;
}

/* Center aligned h3 override if needed */
.text-center h3 {
    padding-left: 0;
}

.text-center h3::before {
    display: none;
}

.text-center h3::after {
    content: '';
    display: block;
    width: 40px;
    height: 2px;
    background-color: var(--color-secondary);
    margin: 1rem auto;
}
.title-medium{
    font-size: 2rem; margin-bottom: 2rem; font-weight: 500;
}
@media screen and (max-width: 767px) {
    .section-title .jp{
        font-size: 2.0rem;
    }
    .title-medium{
        font-size: 1.3rem;
    }
}
/* Header */
.header {
    background-color: rgba(249, 247, 242, 0.95);
    position: sticky;
    top: 0;
    z-index: 100;
    border-bottom: 1px solid rgba(0, 0, 0, 0.05);
}

.header-inner {
    display: flex;
    justify-content: space-between;
    align-items: center;
    height: 76px;
}

.logo a {
    text-decoration: none;
    color: var(--color-text-main);
    font-family: var(--font-serif);
    font-weight: 700;
    font-size: 1.5rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.logo img {
    max-height: 50px;
    width: auto;
}

.nav-desktop {
    display: none;
}

/* 初期状態：スクロール用ロゴを隠す */
.logo-scrolled {
    display: none;
}

/* ヘッダーに .header-scrolled がついた時 */
.header-scrolled .logo-default {
    display: none;
}

.header-scrolled .logo-scrolled {
    display: block;
}

/*下層ページではヘッダー背景が黒なので白ロゴを表示*/
.page  .logo-default,
.single .logo-default {
    display: none;
}
.page  .logo-scrolled,
.single .logo-scrolled {
    display: block;
}

@media (min-width: 768px) {
    .nav-desktop {
        display: flex;
        align-items: center;
        gap: 2rem;
    }
}

.nav-desktop a {
    font-family: var(--font-sans);
    font-size: 1.0rem;
    color: var(--color-text-main);
    font-weight: 800;
    color: #fff;
    position: relative;
}

.nav-desktop a::before {
    content: '';
    position: absolute;
    bottom: -4px;
    left: 0;
    width: 0;
    height: 1px;
    background-color: var(--color-secondary);
    transition: var(--transition-base);
}

.nav-desktop a:hover::before {
    width: 100%;
}
.nav-desktop .btn-outline{
    background-color: var(--color-secondary);
    border: none;
}
/* Header States for Top Page */
.header.header-overlay {
    position: fixed;
    width: 100%;
    background-color: transparent;
    background-color: var(--color-orange);
    border-bottom: none;
    transition: background-color 0.3s ease, padding 0.3s ease;
}

/* Shared Dark Header Styles (Scrolled Top & All Subpages) */
.header.header-scrolled,
.header.header-dark {
    background-color: #333333;
    /* Logo's Gray */
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}

/* Change text colors on dark background */
.header.header-scrolled .nav-desktop a,
.header.header-dark .nav-desktop a {
    color: #fff;
}

.header.header-scrolled .nav-desktop a::before,
.header.header-dark .nav-desktop a::before {
    background-color: #fff;
}

.header.header-scrolled .btn-outline,
.header.header-dark .btn-outline {
    color: #fff;
    border-color: #fff;
}

.header.header-scrolled .btn-outline:hover,
.header.header-dark .btn-outline:hover {
    background-color: #fff;
    color: #333333;
}

.header.header-scrolled .mobile-menu-btn span,
.header.header-dark .mobile-menu-btn span {
    background-color: #fff;
}


@media screen and (max-width: 767px) {
    .header.header-overlay{
        background-color: var(--color-text-main);
    }
    .header-inner {
        height: 56px;
    }
    .mobile-menu-btn span{
        background-color: #fff;
    }
}


/* Hero */
.hero {
    height: 90vh;
    min-height: 700px;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    padding-top: var(--header-height);
}

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

.hero-bg img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    opacity: 0.8;
    /* Slight fade for text readability */
}

.hero-content {
    text-align: center;
    z-index: 1;
    padding: 0 var(--spacing-sm);
}

.hero-title {
    font-size: var(--font-size-h1);
    margin-bottom: var(--spacing-md);
    letter-spacing: 0.1em;
    line-height: 1.2;
    color: #ffffff;
    font-weight: 700;
    text-shadow: 1px 1px 12px #000000af;
}

.hero-subtitle {
    font-family: var(--font-serif);
    font-size: 1.25rem;
    margin-bottom: var(--spacing-lg);
    color: #ffffff;
    background: var(--color-orange);
}

.scroll-indicator {
    position: absolute;
    bottom: 2rem;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.5rem;
    font-family: var(--font-sans);
    font-size: 0.75rem;
    font-weight: bold;
    letter-spacing: 0.2em;
    writing-mode: vertical-rl;
}

.scroll-indicator::after {
    content: '';
    width: 2px;
    height: 60px;
    background-color: var(--color-secondary);
    animation: scrollDown 2s infinite;
}

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

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

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

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

/* Works (Grid) */
.works-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: var(--spacing-lg) var(--spacing-md);
    margin-bottom: 3rem;
}

.work-item {
    display: block;
    text-decoration: none;
    color: inherit;
}

.work-thumb {
    overflow: hidden;
    position: relative;
    aspect-ratio: 4/3;
    margin-bottom: 1.5rem;
}

.work-thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.6s ease;
}

.work-item:hover .work-thumb img {
    transform: scale(1.05);
    /* Zoom effect only on image */
}

.work-info {
    text-align: left;
}

.work-title {
    font-size: 1.25rem;
    font-family: var(--font-serif);
    margin-bottom: 0.5rem;
    font-weight: 700;
}

.work-cat {
    font-size: 0.875rem;
    color: var(--color-text-light);
    margin-bottom: 1rem;
    display: block;
}

.work-more {
    display: inline-block;
    font-size: 0.875rem;
    padding: 0.5rem 1.5rem;
    border: 1px solid var(--color-border);
    background-color: transparent;
    transition: all 0.3s ease;
    cursor: pointer;
}

.work-item:hover .work-more {
    background-color: var(--color-secondary);
    border-color: var(--color-secondary);
    color: #fff;
}

/* CTA Section */
.cta-section {
    background-color: var(--color-text-main);
    color: #fff;
    padding: var(--spacing-xl) 0;
    text-align: center;
    background-image: url('../images/large-photo2.jpg');
    background-size: cover;
    background-position: 80% 50%;
    background-repeat: no-repeat;
}

.cta-title {
    font-size: 2rem;
    color: #fff;
    margin-bottom: var(--spacing-md);
}

.cta-lead {
    margin-bottom: var(--spacing-md);
    opacity: 0.8;
}

/* Fixed Floating Buttons */
.floating-nav {
    position: fixed;
    bottom: 2rem;
    right: 0;
    z-index: 900;
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.float-btn {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    width: 60px;
    height: 60px;
    background-color: var(--color-secondary);
    color: #fff;
    font-size: 0.7rem;
    text-align: center;
    text-decoration: none;
    transition: transform 0.3s ease, background-color 0.3s ease;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    line-height: 1.2;
    padding: 2px;
}

.float-btn1 {
    background-color: var(--color-secondary);
}

.float-btn2 {
    background-color: var(--color-orange);
}

.float-btn:hover {
    transform: translateX(-5px);
    background-color: var(--color-primary);
    color: #fff;
}

.float-btn.float-top {
    background-color: #fff;
    color: var(--color-text-main);
    border: 1px solid var(--color-border);
}

.float-btn.float-top:hover {
    background-color: var(--color-bg-accent);
    color: var(--color-text-main);
}

.float-btn span {
    display: block;
}

@media (min-width: 768px) {
    .floating-nav {
        right: 0;
    }

    .float-btn {
        width: 70px;
        height: 70px;
        font-size: 0.75rem;
    }
}

/* Footer */
.footer {
    background-color: #222;
    color: #fff;
    padding: var(--spacing-lg) 0 2rem;
}

.footer-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: var(--spacing-lg);
}

@media (min-width: 768px) {
    .footer-grid {
        grid-template-columns: 1fr 2fr;
    }
}


.footer-nav {
    display: flex;
    flex-wrap: wrap;
    gap: 1rem 2rem;
}

.copyright {
    margin-top: var(--spacing-lg);
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    padding-top: 2rem;
    text-align: center;
    font-size: 0.75rem;
    opacity: 0.5;
}

/* Mobile Menu */
.mobile-menu-btn {
    display: block;
    width: 30px;
    height: 20px;
    position: relative;
    cursor: pointer;
    z-index: 1001;
}

.mobile-menu-btn span {
    display: block;
    width: 100%;
    height: 2px;
    background-color: #fff;
    position: absolute;
    left: 0;
    transition: var(--transition-base);
}

.mobile-menu-btn span:nth-child(1) {
    top: 0;
}

.mobile-menu-btn span:nth-child(2) {
    top: 50%;
    transform: translateY(-50%);
}

.mobile-menu-btn span:nth-child(3) {
    bottom: 0;
}

.body-locked {
    overflow: hidden;
}

.mobile-nav-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100vh;
    background-color: var(--color-bg-body);
    z-index: 1000;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s ease;
}

.mobile-nav-overlay.active {
    opacity: 1;
    pointer-events: auto;
}

@media (min-width: 768px) {
    .mobile-menu-btn {
        display: none;
    }
}
@media screen and (max-width: 767px) {
    .header.header-overlay{
        background-color: var(--color-text-main);
        z-index: 1001;
    }
    .header-inner {
        height: 56px;
    }
    .hero-title{
        font-size: 2.5rem;
    }
    .hero {
        height: 65vh;
        min-height: 650px;
    }
    .hero-subtitle {
        font-size: 1.0rem;
        text-align: center;
    }

}


/* News List */
.news-list {
    border-top: 1px solid var(--color-border);
}

.news-item {
    display: flex;
    flex-direction: column;
    padding: 1.5rem 0;
    border-bottom: 1px solid var(--color-border);
    transition: background-color 0.3s ease;
}

@media (min-width: 768px) {
    .news-item {
        flex-direction: row;
        align-items: baseline;
        gap: 2rem;
    }
}

.news-date {
    font-family: var(--font-sans);
    font-size: 0.875rem;
    color: var(--color-text-light);
    min-width: 100px;
}

.news-title {
    font-weight: 500;
}

/* Voice bubble */
.voice-grid {
    display: grid;
    gap: 2rem;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
}

.voice-card {
    background-color: #fff;
    padding: 2rem;
    border: 1px solid var(--color-border);
    position: relative;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.03);
}

.voice-card::before {
    content: "“";
    position: absolute;
    top: 1rem;
    left: 1rem;
    font-family: var(--font-serif);
    font-size: 4rem;
    color: var(--color-bg-accent);
    line-height: 1;
}

.voice-text {
    position: relative;
    z-index: 1;
    margin-bottom: 1.5rem;
}

.voice-author {
    font-size: 0.875rem;
    color: var(--color-text-light);
    text-align: right;
}

/* --- Refactoring Classes (Added) --- */

/* Utilities */
.mb-md {
    margin-bottom: 2rem;
}

.mb-lg {
    margin-bottom: 4rem;
}

.mt-md {
    margin-top: 2rem;
}

.mt-lg {
    margin-top: 3rem;
}

.mt-xl {
    margin-top: 4rem;
}

/* Buttons */
.btn-sm {
    padding: 0.5rem 1.5rem;
    font-size: 0.9rem;
}

/* Hero Placeholder */
.hero-placeholder {
    background-color: #6d6d6d;
    width: 100%;
    height: 100%;
}

/* Concept Section */
.concept-lead {
    max-width: 600px;
    margin: 0 auto;
    line-height: 2;
}

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

.concept-item {
    display: block;
    position: relative;
    overflow: hidden;
    aspect-ratio: 16/9;
}

.concept-thumb {
    width: 100%;
    height: 100%;
    background-color: #d0c8be;
    /* Default placeholder color */
    transition: transform 0.3s;
}

/* Use different colors for variety if needed, or use specific classes */
.concept-thumb.thumb-1 {
    background-color: #d0c8be;
}

.concept-thumb.thumb-2 {
    background-color: #c0b8ad;
}

.concept-overlay {
    position: absolute;
    bottom: 0;
    left: 0;
    padding: 1.5rem;
    background: rgba(255, 255, 255, 0.9);
    width: 100%;
}

.concept-overlay h4 {
    font-size: 1.1rem;
    margin-bottom: 0.5rem;
}

.concept-overlay p {
    font-size: 0.85rem;
    color: #555;
    margin-bottom: 0;
}

/* Large Photo Area */
.large-photo-area {
    width: 100%;
    height: 60vh;
    background-color: #d0c8be;
    margin: 0;
    background-image: url(../images/large-photo.jpg);
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    filter: brightness(0.95);
    /* If putting an image inside later:
       display: flex; align-items: center; justify-content: center; overflow: hidden; */
}

/* News Badges */
.news-badge {
    font-size: 0.75rem;
    padding: 2px 8px;
    margin-right: 1rem;
    border: 1px solid #333;
    display: inline-block;
}

.news-badge.event {
    border-color: #333;
    color: var(--color-text-main);
}

.news-badge.info {
    border-color: #ccc;
    color: #777;
}

.news-badge.works {
    border-color: #333;
    color: var(--color-text-main);
}

/* Footer Logo Image */
.footer-logo-img {
    height: 180px;
    width: auto;
}

/* Mobile Nav Link Mobile specific (if needed) */
.nav-link-mobile {
    /* style="text-align: center; display: flex; flex-direction: column; gap: 2rem;" */
    /* This was on the nav container, so let's make a class for the nav container */
}

.mobile-nav-content {
    text-align: center;
    display: flex;
    flex-direction: column;
    gap: 2rem;
}

.cta-buttons {
    display: flex;
    justify-content: center;
    gap: 1rem;
    flex-wrap: wrap;
}

.bg-white {
    background-color: #fff;
}

.color-secondary {
    color: var(--color-secondary);
}

/* Border color overrides for CTA specific buttons if not using classes */
.cta-btn-primary {
    background-color: #fff;
    color: var(--color-secondary);
    border-color: #fff;
}

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


/* Subpage Header */
.page-header-section {
    padding-top: var(--header-height);
    background-color: var(--color-bg-accent);
    background-image: url('../images/page-title.jpg');
    background-size: cover;
    background-position: 50% 65%;
    background-repeat: no-repeat;
}

.page-header-inner {
    padding: 3rem 0;
}

.title-no-margin {
    margin-bottom: 0;
}

/* About Page */
.about-layout {
    display: flex;
    flex-direction: column;
    gap: 6rem;
}

.about-intro {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
}

.about-intro h3 {
    font-size: 2.5rem;
    font-size:clamp(22px, 22 / 375 * 100vw ,2.0rem);
    margin-bottom: 3rem;
    line-height: 1.6;
    font-family: var(--font-serif);
    text-align: left;
    padding-left: 0.8em;
}

.about-intro p {
    max-width: 800px;
    font-size: 1.1rem;
    line-height: 2;
}

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

.promise-img {
    width: 100%;
    aspect-ratio: 4/3;
    background-color: #eee;
    margin-bottom: 1.5rem;
}

.ceo-message {
    display: flex;
    flex-direction: column;
    gap: 2rem;
    background-color: #f9f9f9;
    padding: 3rem;
    border-radius: 4px;
}

.ceo-content {
    display: flex;
    flex-direction: column;
    gap: 2rem;
}

.ceo-img {
    width: 150px;
    height: 150px;
    border-radius: 50%;
    background-color: #ccc;
    margin: 0 auto;
    overflow: hidden;
}
.ceo-img img{
    border-radius: 50% !important;
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}
/* Company Page */
.company-dl {
    display: grid;
    grid-template-columns: 100px 1fr;
    gap: 1.5rem;
    max-width: 800px;
    margin: 0 auto;
    border-top: 1px solid #ddd;
}

.company-dt {
    padding: 1.5rem 0;
    border-bottom: 1px solid #ddd;
    font-weight: bold;
}

.company-dd {
    padding: 1.5rem 0;
    border-bottom: 1px solid #ddd;
}

.map-container {
    width: 100%;
    height: 400px;
    background-color: #eee;
    margin-top: 2rem;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #777;
}

/* Service Page */
.service-flow {
    display: flex;
    flex-direction: column;
    gap: 2rem;
    max-width: 800px;
    margin: 0 auto;
}

.flow-step {
    display: flex;
    gap: 2rem;
    align-items: flex-start;
}

.step-num {
    font-size: 3rem;
    font-family: var(--font-serif);
    color: var(--color-bg-accent);
    line-height: 1;
    font-weight: bold;
}


/* Contact Form */
.form-group {
    margin-bottom: 2rem;
}

.form-label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: bold;
}

.form-control {
    width: 100%;
    padding: 1rem;
    border: 1px solid var(--color-border);
    font-family: inherit;
    background-color: #fff;
}

.form-control:focus {
    outline: none;
    border-color: var(--color-secondary);
}

.radio-group label {
    margin-right: 1.5rem;
    cursor: pointer;
}

.required {
    color: #cc0000;
    margin-left: 0.25rem;
    font-size: 0.8em;
}


.btn-submit {
    min-width: 200px;
    cursor: pointer;
}

/* Footer & Floating Cleanup */
.footer-tel {
    margin-top: 1rem;
}

.float-icon {
    font-size: 1.5rem;
    margin-bottom: 2px;
}


/* Swiper Works Slider */
.works-swiper {
    width: 100%;
    padding-bottom: 4rem;
    overflow: hidden;
    /* Hide overflow outside the box (masks left side) */
    padding-left: var(--spacing-sm);
    /* Default mobile padding */
}

/* Calculate left alignment to match .container on larger screens */
@media (min-width: 1200px) {
    .works-swiper {
        /* 
           Align box left edge to (ScreenCenter - HalfContainer).
           Container is 1200px. Half is 600px.
        */
        margin-left: calc(50% - 600px);
        margin-right: 0;

        /* 
           Let width fill the remaining space to the right.
           With box-sizing: border-box and block display, 
           width: auto + margin-left takes up rest of parent width.
        */
        width: auto;

        padding-left: var(--spacing-sm);
        /* Maintain visual alignment with text inside container */
        padding-right: 0;
    }
}

.work-item-slide {
    width: 85%;
    /* Mobile */
    max-width: 350px;
    margin-right: 1.5rem;
    height: auto;
}

/* Ensure work-item behaves well inside slide */
.work-item-slide .work-item {
    width: 100%;
    height: 100%;
    display: flex;
    flex-direction: column;
}

@media (min-width: 768px) {
    .work-item-slide {
        width: 33.333%;
        max-width: 400px;
        margin-right: 2rem;
    }
}

/* Swiper Navigation Customization */
.works-swiper .swiper-button-prev,
.works-swiper .swiper-button-next {
    color: var(--color-secondary);
    background-color: rgba(255, 255, 255, 0.8);
    width: 50px;
    height: 50px;
    border-radius: 50%;
    backdrop-filter: blur(4px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);

    /* Vertically center on the image only */
    /* Mobile: Slide width ~85vw, Aspect 4/3 -> Image Height ~64vw -> Center ~32vw */
    top: 32vw;
    transform: translateY(-50%);
    margin-top: 0;
}

.works-swiper .swiper-button-prev::after,
.works-swiper .swiper-button-next::after {
    font-size: 1.2rem;
    font-weight: bold;
}

/* Adjust button positions if needed */
.works-swiper .swiper-button-prev {
    left: 1rem;
}

.works-swiper .swiper-button-next {
    right: 1rem;
}

@media (min-width: 768px) {

    /* Tablet/Desktop: Item max-width ~300-400px. Image Height ~225-300px. Center ~110-150px. */
    .works-swiper .swiper-button-prev,
    .works-swiper .swiper-button-next {
        top: 140px;
        /* Approximate center for desktop images */
    }
}

@media (min-width: 1200px) {

    /* Since we use margin-left to position the slider box, 
       left: 0 is already aligned with the container edge. 
       We just want a small offset so it's not flush with the edge. */
    .works-swiper .swiper-button-prev {
        left: 20px;
    }

    .works-swiper .swiper-button-next {
        right: 40px;
        /* Give a bit more space from the screen edge on large simple */
    }
}



/* Works Detail */
.works-detail-header {
    margin-bottom: 3rem;
}

/* Common Misc */
.mb-0 {
    margin-bottom: 0;
}

.py-lg {
    padding-top: 3rem;
    padding-bottom: 3rem;
}

/* Service Page Specific */
.service-card {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
    margin-bottom: 4rem;
}

@media (min-width: 768px) {
    .service-card {
        flex-direction: row;
        align-items: center;
        gap: 3rem;
    }

    .service-card:nth-child(even) {
        flex-direction: row-reverse;
    }
}

.flow-step {
    position: relative;
    padding-left: 2rem;
    padding-bottom: 2rem;
    border-left: 2px solid var(--color-border);
}

.flow-step::before {
    content: '';
    position: absolute;
    left: -9px;
    top: 0;
    width: 16px;
    height: 16px;
    border-radius: 50%;
    background-color: var(--color-secondary);
}

.flow-number {
    font-family: var(--font-sans);
    font-weight: bold;
    color: var(--color-secondary);
    margin-bottom: 0.5rem;
    display: block;
}
@media screen and (max-width: 767px) {
    .flow-step {
    flex-direction: column;
    gap: 5px;
    }
}

@media screen and (max-width: 550px) {
    .post-type-archive-works .btn {
        padding: 0.5rem 2.0rem;
    }
}