/* assets/css/style.css */

/* ==========================================================================
   Variables & Reset
   ========================================================================== */
:root {
    /* Colors */
    --color-primary: #0066CC;
    /* Yamaguchi Blue */
    --color-primary-dark: #004C99;
    /* Darker shade for hover */
    --color-secondary: #383838;
    /* Dark Grey for Footer/Accents */
    --color-line: #06C755;
    /* LINE Green */
    --color-text: #222222;
    /* Headings */
    --color-text-body: #333333;
    /* Body text */
    --color-bg: #FFFFFF;
    --color-bg-gray: #f5f5f5;
    --color-border: #e0e0e0;

    /* Sizes */
    --sidebar-width: 260px;
    --header-height-mobile: 60px;

    /* Fonts */
    --font-base: "Yu Gothic Medium", "游ゴシック Medium", "YuGothic", "游ゴシック体", "Hiragino Kaku Gothic ProN", "Meiryo", sans-serif;
    --font-serif: "Times New Roman", "YuMincho", "Hiragino Mincho ProN", "Yu Mincho", "MS PMincho", serif;
}

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

body {
    font-family: var(--font-base);
    color: var(--color-text-body);
    line-height: 1.8;
    background-color: var(--color-bg);
    overflow-x: hidden;
}

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

a:hover {
    opacity: 0.8;
}

img {
    max-width: 100%;
    height: auto;
    vertical-align: bottom;
}

ul {
    list-style: none;
}

/* ==========================================================================
   Layout Structure
   ========================================================================== */
.page-wrapper {
    display: block;
    /* Changed from flex to block to simplify fixed sidebar handling */
    width: 100%;
    min-height: 100vh;
}

/* Sidebar (Desktop) */
.sidebar {
    width: var(--sidebar-width);
    background: #fff;
    border-right: 1px solid var(--color-border);
    position: fixed;
    top: 0;
    left: 0;
    height: 100vh;
    z-index: 1000;
    display: flex;
    flex-direction: column;
    overflow-y: auto;
}

.main-content {
    margin-left: var(--sidebar-width);
    width: auto;
    /* Uses remaining space automatically */
    display: flex;
    flex-direction: column;
    min-height: 100vh;
    position: relative;
    /* For z-index context if needed */
}

/* ==========================================================================
   Utility Classes
   ========================================================================== */
.container {
    max-width: 1000px;
    margin: 0 auto;
    padding: 0 40px;
}

.section {
    padding: 80px 0;
}

.section-gray {
    background-color: var(--color-bg-gray);
}

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

.text-primary {
    color: var(--color-primary);
}

.text-serif {
    font-family: var(--font-serif);
}

.mt-20 {
    margin-top: 20px;
}

.mb-20 {
    margin-bottom: 20px;
}

.mb-40 {
    margin-bottom: 40px;
}

/* Buttons */
.btn {
    display: inline-flex;
    justify-content: center;
    align-items: center;
    padding: 15px 30px;
    font-weight: bold;
    border-radius: 6px;
    /* Rounded corners for premium feel */
    transition: all 0.3s;
    cursor: pointer;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    /* Soft shadow */
}

.btn-primary {
    background: linear-gradient(to bottom, var(--color-primary), var(--color-primary-dark));
    /* Gradient */
    color: #fff;
    border: none;
    /* Remove border for cleaner gradient look */
}

.btn-primary:hover {
    background: linear-gradient(to bottom, #3399FF, var(--color-primary));
    /* Lighter gradient on hover */
    transform: translateY(-2px);
    box-shadow: 0 6px 12px rgba(0, 0, 0, 0.15);
}

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

.btn-outline {
    border: 1px solid var(--color-text-body);
    background: transparent;
    color: var(--color-text-body);
}

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

/* Section Titles */
.section-title {
    font-family: var(--font-serif);
    font-size: 2.2rem;
    color: var(--color-text);
    text-align: center;
    margin-bottom: 60px;
    letter-spacing: 0.1em;
}

.section-title span {
    display: block;
    font-size: 1rem;
    color: var(--color-primary);
    font-family: var(--font-base);
    margin-top: 10px;
    font-weight: normal;
    letter-spacing: 0.05em;
}

/* ==========================================================================
   Sidebar Components
   ========================================================================== */
.sidebar {
    width: var(--sidebar-width);
    background: #fff;
    border-right: 1px solid var(--color-border);
    position: fixed;
    top: 0;
    left: 0;
    height: 100vh;
    z-index: 1000;
    display: flex;
    flex-direction: column;
    overflow-y: auto;
    /* Custom scrollbar for aesthetic */
    scrollbar-width: thin;
    scrollbar-color: #ddd #f5f5f5;
}

/* Header Era */
.sidebar-header {
    padding: 15px 15px 10px;
    /* Reduced padding */
    text-align: center;
    border-bottom: 1px solid var(--color-border);
}

.site-area {
    font-size: 0.7rem;
    color: #666;
    margin-bottom: 5px;
    /* Reduced margin */
    line-height: 1.4;
}

.site-logo-link {
    display: block;
    margin: 0 auto;
    max-width: 90%;
    /* Slightly constrained width to reduce visual dominance if needed */
}

.sidebar-logo-img {
    width: 100%;
    height: auto;
    display: block;
}

/* Top CTA (Email) */
.sidebar-cta-top {
    padding: 10px 15px;
    /* Reduced padding */
}

.btn-sidebar-mail {
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, #3399FF, #0066CC);
    /* Gradient */
    color: #fff;
    padding: 10px;
    border-radius: 6px;
    /* Match global radius */
    text-decoration: none;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.15);
    /* Stronger shadow */
    transition: all 0.3s;
}

.btn-sidebar-mail:hover {
    background: var(--color-primary);
    opacity: 1;
}

.icon-mail {
    font-size: 1.8rem;
    margin-right: 10px;
}

.text-mail {
    font-size: 0.9rem;
    font-weight: bold;
    line-height: 1.3;
    text-align: left;
}

/* Phone Section */
.sidebar-phone-section {
    text-align: center;
    padding: 5px 15px 10px;
    /* Reduced padding */
}

.phone-label {
    font-size: 0.8rem;
    color: var(--color-text-body);
    margin-bottom: 2px;
    /* Reduced margin */
}

.sidebar-phone-number {
    display: block;
    font-size: 1.8rem;
    /* Slightly reduced font size for better fit */
    color: #0066CC;
    /* Blue text */
    font-weight: bold;
    font-family: var(--font-serif);
    line-height: 1.1;
    margin-bottom: 2px;
    /* Reduced margin */
    text-decoration: none;
}

.phone-meta {
    font-size: 0.7rem;
    color: #888;
}

/* Navigation Banners */
.sidebar-nav {
    flex: 1;
    padding: 10px 0;
    background: #fdfdfd;
}

.sidebar-menu {
    border-top: 1px dotted #ccc;
}

.nav-item {
    border-bottom: 1px dotted #ccc;
}

.nav-link-banner {
    display: block;
    padding: 15px 20px;
    background: linear-gradient(to right, #ffffff, #f9f9f9);
    transition: background 0.3s, padding-left 0.3s;
    position: relative;
}

.nav-link-banner:hover {
    background: #f0f0f0;
    padding-left: 25px;
}

/* Arrow indicator on hover or constant */
.nav-link-banner::after {
    content: '›';
    position: absolute;
    right: 15px;
    top: 50%;
    transform: translateY(-50%);
    color: #ccc;
    font-size: 1.5rem;
    font-weight: bold;
}

.nav-ja {
    display: block;
    font-size: 0.75rem;
    color: #666;
    margin-bottom: 2px;
    font-weight: bold;
}

.nav-main {
    display: block;
    font-size: 1.1rem;
    font-weight: bold;
    font-family: var(--font-serif);
    color: var(--color-text);
}

.nav-main .small {
    font-size: 0.8rem;
    font-weight: normal;
}

.nav-main .highlight {
    color: #0066CC;
}


/* Footer Links & Social */
.sidebar-footer-links {
    background: #fff;
    padding: 20px 15px;
    border-top: 1px solid var(--color-border);
}

.footer-links-list li {
    margin-bottom: 8px;
}

.footer-links-list a {
    font-size: 0.8rem;
    color: #333;
    text-decoration: none;
    font-weight: bold;
}

.footer-links-list a:hover {
    text-decoration: underline;
    color: var(--color-primary);
}

.sidebar-social {
    display: flex;
    justify-content: center;
    gap: 15px;
    margin-top: 20px;
}

.social-icon {
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    transition: transform 0.2s;
}

.social-icon:hover {
    transform: scale(1.1);
}

.social-icon img {
    width: 100%;
    height: 100%;
}

.icon-instagram {
    /* bg handled by svg or added here if transparent */
}

.icon-youtube {
    /* */
}

.icon-line {
    /* */
}

.sidebar-social-labels {
    display: flex;
    justify-content: center;
    gap: 15px;
    margin-top: 5px;
    font-size: 0.6rem;
    color: #666;
    font-weight: bold;
}

.sidebar-social-labels span {
    width: 40px;
    text-align: center;
}

/* ==========================================================================
   Mobile Header (Hidden on Desktop)
   ========================================================================== */
.mobile-header {
    display: none;
    /* Flex on mobile */
    height: var(--header-height-mobile);
    background: #fff;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    z-index: 1000;
    border-bottom: 2px solid var(--color-primary);
    /* Orange line at bottom like reference */
    align-items: center;
    justify-content: space-between;
    padding: 0;
}

.mobile-logo {
    font-size: 1.1rem;
    font-weight: bold;
    font-family: var(--font-serif);
    padding-left: 15px;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.mobile-logo small {
    font-size: 0.6rem;
    color: #666;
    font-weight: normal;
}

.mobile-header-actions {
    display: flex;
    height: 100%;
}

.header-btn {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    width: 70px;
    /* Reduced width to fit better */
    height: 100%;
    color: #fff;
    text-decoration: none;
    font-size: 0.7rem;
    font-weight: bold;
    cursor: pointer;
    line-height: 1.2;
}

.header-btn-tel {
    background-color: #333;
}

.header-btn-menu {
    background-color: var(--color-primary);
}

.header-btn-icon {
    font-size: 1.2rem;
    margin-bottom: 2px;
}

/* ==========================================================================
   Footer
   ========================================================================== */
.footer {
    background-color: var(--color-secondary);
    color: #fff;
    padding: 60px 0;
    margin-top: auto;
    width: 100%;
    /* Ensure full width relative to main-content */
}

.footer h2 {
    font-family: var(--font-serif);
    margin-bottom: 20px;
}

.footer-grid {
    display: grid;
    grid-template-columns: 2fr 1fr;
    gap: 60px;
    /* Increased gap for better separation */
    margin-bottom: 50px;
    /* Increased margin */
}

.footer-nav ul {
    display: flex;
    flex-direction: column;
    /* Changed to list stack for better visual hierarchy on desktop */
    gap: 15px;
}

.footer-nav a {
    color: #ccc;
    font-size: 0.95rem;
    /* Slightly larger */
}

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

.copyright {
    text-align: center;
    font-size: 0.8rem;
    color: #999;
    border-top: 1px solid #555;
    padding-top: 25px;
    width: 100%;
}

/* ==========================================================================
   Page Specifics (Hero, etc)
   ========================================================================== */

/* Hero Section */
/* Hero Slider */
/* Hero Slider */
.hero-slider {
    position: relative;
    /* Height is now determined by content due to Grid, but we can set min/max or fixed */
    min-height: 600px;
    display: flex;
    align-items: center;
    overflow: hidden;
}

.slides-container {
    /* Changed from absolute to relative grid to allow content to dictate height */
    position: relative;
    width: 100%;
    height: 100%;
    display: grid;
    grid-template-columns: 1fr;
    grid-template-rows: 1fr;
}

.slide {
    /* Stack all slides in the same grid cell */
    grid-column: 1;
    grid-row: 1;
    width: 100%;
    height: 100%;
    padding: 0 60px;
    display: flex;
    align-items: center;
    justify-content: flex-start;
    /* Changed from center to allow explicit control */
    opacity: 0;
    transition: opacity 1.5s ease-in-out;
    z-index: 0;
    pointer-events: none;
}

.slide.active {
    opacity: 1;
    z-index: 2;
    pointer-events: auto;
}

.slide-bg {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-size: cover;
    background-position: center;
    z-index: -1;
}

/* Ensure content on slides is positioned correctly */
.slide .hero-content {
    position: relative;
    z-index: 3;
    max-width: 800px;
}

/* Mobile adjustments for slide padding */
@media (max-width: 900px) {
    .slide {
        padding: 0;
        justify-content: center;
    }

    .slide .hero-content {
        padding: 0 20px;
        text-align: center;
    }
}

/* Overlay to ensure text readability */
.hero-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.3);
    z-index: 1;
}

.hero-content {
    position: relative;
    z-index: 2;
    padding: 0 60px;
    max-width: 800px;
}

.hero-title {
    font-family: var(--font-serif);
    font-size: 3.5rem;
    color: #fff;
    line-height: 1.3;
    margin-bottom: 20px;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.5);
    background: rgba(0, 0, 0, 0.6);
    /* Optional: Box background style if preferred */
    display: inline-block;
    padding: 20px 30px;
}

.hero-subtitle {
    font-size: 1.5rem;
    color: #fff;
    background: linear-gradient(135deg, var(--color-primary), var(--color-primary-dark));
    /* Gradient background */
    display: inline-block;
    padding: 10px 20px;
    margin-bottom: 30px;
    font-weight: bold;
    border-radius: 4px;
    /* Rounded corners */
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.2);
}

.hero-description {
    color: #fff;
    font-size: 1.2rem;
    font-weight: 500;
    line-height: 1.8;
    text-shadow: 0 1px 4px rgba(0, 0, 0, 0.8);
}

/* Service Cards */
.card-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 30px;
}

.card {
    background: #fff;
    border: 1px solid #eee;
    border-radius: 8px;
    /* Rounded corners */
    transition: transform 0.3s, box-shadow 0.3s;
    overflow: hidden;
    /* Clip content to radius */
}

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

.card-img {
    height: 200px;
    background: #eee;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2rem;
    color: #aaa;
}

.card-body {
    padding: 25px;
}

.card-title {
    font-size: 1.2rem;
    margin-bottom: 15px;
    font-weight: bold;
    border-bottom: 2px solid var(--color-primary);
    display: inline-block;
}

/* ==========================================================================
   Responsive
   ========================================================================== */
@media (max-width: 900px) {
    .sidebar {
        transform: translateX(-100%);
        transition: transform 0.3s;
        width: 260px;
        box-shadow: 2px 0 10px rgba(0, 0, 0, 0.1);
    }

    .sidebar.active {
        transform: translateX(0);
    }

    .main-content {
        margin-left: 0;
        width: 100%;
        padding-top: var(--header-height-mobile);
    }

    .mobile-header {
        display: flex;
    }

    .hero-title {
        font-size: 2rem;
        padding: 15px;
    }

    .hero-slider {
        height: auto;
        padding: 60px 0;
        min-height: 400px;
    }

    .card-grid {
        grid-template-columns: 1fr;
    }

    .footer-grid {
        grid-template-columns: 1fr;
    }

    .footer {
        padding-bottom: 100px;
    }

    /* Space for fixed CTA */

    /* Fixed Footer Grid (3 cols) */
    .fixed-footer-grid {
        display: grid;
        grid-template-columns: 1fr 1.3fr 1fr;
        /* Adjust ratios so center is slightly larger */
        width: 100%;
        height: 70px;
        position: fixed;
        bottom: 0;
        left: 0;
        z-index: 2000;
        box-shadow: 0 -2px 10px rgba(0, 0, 0, 0.1);
        border-top: 1px solid #ddd;
        transition: transform 0.3s ease-in-out;
        transform: translateY(100%);
        /* Default hidden */
    }

    .fixed-footer-grid.visible {
        transform: translateY(0);
    }

    .footer-btn {
        display: flex;
        flex-direction: column;
        align-items: center;
        justify-content: center;
        color: #fff;
        text-decoration: none;
        font-size: 0.7rem;
        font-weight: bold;
        text-align: center;
        padding: 5px;
        line-height: 1.3;
        width: 100%;
        height: 100%;
    }

    .footer-btn-tel {
        background-color: rgba(68, 68, 68, 0.9);
        /* Dark Grey with opacity */
        backdrop-filter: blur(4px);
    }

    .footer-btn-mail {
        background-color: rgba(240, 115, 67, 0.9);
        /* #F07343 with opacity */
        backdrop-filter: blur(4px);
        position: relative;
    }

    /* Decoration for main CTA */
    .footer-btn-mail::before {
        content: '＼ 現地調査 ／';
        position: absolute;
        top: -12px;
        left: 50%;
        transform: translateX(-50%);
        background: #fff;
        color: var(--color-primary);
        font-size: 0.6rem;
        padding: 2px 8px;
        border-radius: 10px;
        border: 1px solid var(--color-primary);
        font-weight: bold;
        white-space: nowrap;
        box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    }

    .footer-btn-line {
        background-color: rgba(6, 199, 85, 0.9);
        /* #06C755 with opacity */
        backdrop-filter: blur(4px);
    }

    .footer-icon {
        margin-bottom: 2px;
        line-height: 0;
    }

    .footer-icon svg {
        width: 20px;
        height: 20px;
    }

    .footer-label {
        font-size: 0.65rem;
        line-height: 1.2;
    }

    .footer-tel-number {
        font-size: 0.9rem;
        font-weight: bold;
        line-height: 1;
        margin-top: 2px;
        font-family: 'Arial', sans-serif;
        /* Clear number font */
    }

    /* Tweaks for specific buttons to match layout */
    .footer-btn-tel .footer-icon {
        margin-bottom: 0;
    }

    .footer-btn-tel {
        /* Align items slightly differently if needed for the 3-row look */
        justify-content: center;
    }
}