/* Base Variables */
:root {
    --primary-color: #2563eb;
    --primary-hover: #1d4ed8;
    --text-color: #1f2937;
    --text-light: #6b7280;
    --bg-color: #f9fafb;
    --white: #ffffff;
    --accent-color: #f59e0b;
    --error-color: #ef4444;
    --glass-bg: rgba(255, 255, 255, 0.8);
    --glass-border: rgba(255, 255, 255, 0.3);
    --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
    --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
    --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1);
}

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

body {
    font-family: 'Noto Sans JP', 'Inter', sans-serif;
    color: var(--text-color);
    background-color: var(--bg-color);
    line-height: 1.6;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

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

ul {
    list-style: none;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

/* Typography */
h1,
h2,
h3,
h4 {
    font-weight: 700;
    line-height: 1.2;
    margin-bottom: 1rem;
}

.page-header {
    background: var(--primary-color);
    color: var(--white);
    padding: 100px 0 3rem;
    /* Account for fixed header */
    text-align: center;
    margin-bottom: 3rem;
    position: relative;
    background-size: cover;
    background-position: center;
}

/* Overlay for headers with background images */
.service-header::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    /* darker overlay for better text contrast */
    z-index: 1;
}

.service-header .container {
    position: relative;
    z-index: 2;
}

.page-header h1 {
    font-size: 2.5rem;
    margin: 0;
}

.section-title {
    font-size: 2rem;
    text-align: center;
    margin-bottom: 3rem;
    position: relative;
    display: inline-block;
    left: 50%;
    transform: translateX(-50%);
}

.section-title::after {
    content: '';
    display: block;
    width: 60px;
    height: 4px;
    background: var(--primary-color);
    margin: 10px auto 0;
    border-radius: 2px;
}

/* Header */
.site-header {
    background: var(--glass-bg);
    backdrop-filter: blur(10px);
    border-bottom: 1px solid var(--glass-border);
    position: fixed;
    top: 0;
    width: 100%;
    z-index: 1000;
    height: 70px;
    display: flex;
    align-items: center;
}

.header-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    width: 100%;
}

.logo-text {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--primary-color);
}

.main-nav ul {
    display: flex;
    gap: 2rem;
    align-items: center;
}

.main-nav a {
    font-weight: 500;
    font-size: 0.95rem;
}

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

.btn {
    display: inline-block;
    padding: 0.75rem 1.5rem;
    border-radius: 8px;
    font-weight: 600;
    transition: all 0.3s ease;
    cursor: pointer;
    border: none;
    font-size: 1rem;
}

.btn-primary {
    background: var(--primary-color);
    color: var(--white);
    box-shadow: var(--shadow-sm);
}

.btn-primary:hover {
    background: var(--primary-hover);
    transform: translateY(-1px);
    box-shadow: var(--shadow-md);
}

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

.btn-secondary:hover {
    background: #d1d5db;
}

.btn-danger {
    background: var(--error-color);
    color: var(--white);
}

.btn-danger:hover {
    background: #dc2626;
}

.btn-block {
    display: block;
    width: 100%;
    text-align: center;
}

/* Mobile Menu */
.mobile-menu-toggle {
    display: none;
    flex-direction: column;
    gap: 5px;
    cursor: pointer;
}

.mobile-menu-toggle span {
    width: 25px;
    height: 3px;
    background: var(--text-color);
    border-radius: 2px;
}

/* Sections */
section {
    padding: 5rem 0;
}

main {
    padding-top: 70px;
    /* Offset for fixed header on non-hero pages */
    flex: 1;
}

/* Hero Section (Home) */
.hero {
    height: 90vh;
    /* Taller hero */
    position: relative;
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--white);
    text-align: center;
    padding-top: 0;
}

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

.hero-slide {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-size: cover;
    background-position: center;
    opacity: 0;
    transition: opacity 1.5s ease-in-out;
}

.hero-slide.active {
    opacity: 1;
}

/* Dark overlay to ensure text readability */
.hero::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.4);
    z-index: 2;
}

.hero-content {
    position: relative;
    z-index: 3;
    max-width: 800px;
    padding: 0 20px;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.5);
}

.hero h1 {
    font-size: 3.5rem;
    margin-bottom: 1.5rem;
    color: var(--white);
    font-weight: 700;
}

.hero p {
    font-size: 1.5rem;
    color: #f3f4f6;
    margin-bottom: 0;
    /* Remove bottom margin as button is removed */
    font-weight: 500;
}

/* Responsive tweaks for new hero */
@media (max-width: 768px) {
    .hero h1 {
        font-size: 2.2rem;
    }

    .hero p {
        font-size: 1.1rem;
    }
}

/* Features/Services Grid */
.features-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 2rem;
}

.feature-card {
    background: var(--white);
    padding: 2rem;
    border-radius: 12px;
    box-shadow: var(--shadow-sm);
    text-align: center;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.feature-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-lg);
}

.feature-icon {
    font-size: 2.5rem;
    margin-bottom: 1rem;
    color: var(--primary-color);
}

/* Workspace Styles */
.workspace-card {
    background: var(--white);
    border-radius: 16px;
    overflow: hidden;
    box-shadow: var(--shadow-md);
    transition: transform 0.3s ease;
}

.workspace-card:hover {
    transform: translateY(-5px);
}

.workspace-image {
    height: 200px;
    background-color: #e5e7eb;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #9ca3af;
    cursor: pointer;
    position: relative;
    background-size: cover;
    background-position: center;
}

.workspace-image:hover::after {
    content: 'クリックで拡大';
    position: absolute;
    background: rgba(0, 0, 0, 0.5);
    color: white;
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: bold;
}

.workspace-content {
    padding: 1.5rem;
}

.workspace-title {
    font-size: 1.25rem;
    margin-bottom: 0.5rem;
}

/* News List */
.news-list {
    max-width: 800px;
    margin: 0 auto;
}

.news-item {
    display: flex;
    gap: 1.5rem;
    padding: 1.5rem 0;
    border-bottom: 1px solid #e5e7eb;
    align-items: start;
}

.news-date {
    color: var(--text-light);
    font-size: 0.9rem;
    width: 100px;
    flex-shrink: 0;
}

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

/* Footer */
.site-footer {
    background: rgb(255, 236, 0);
    color: #333;
    padding: 3rem 0 2rem;
    margin-top: 10px;
    font-size: 0.9rem;
}

.footer-grid-layout {
    display: grid;
    grid-template-columns: 1.2fr 1.5fr 1fr;
    gap: 2rem;
    margin-bottom: 3rem;
    align-items: start;
}

@media (max-width: 900px) {
    .footer-grid-layout {
        grid-template-columns: 1fr;
        gap: 2rem;
    }
}

/* Left Column */
.footer-heading {
    font-size: 1.5rem;
    font-weight: 700;
    margin-bottom: 0.5rem;
    border-bottom: 1px solid #333;
    display: inline-block;
    padding-bottom: 2px;
}

.company-info {
    line-height: 1.6;
    margin-bottom: 1rem;
}

.phone-block {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin-bottom: 0.25rem;
}

.phone-icon {
    width: 30px;
    height: auto;
}

.phone-number {
    font-size: 2rem;
    font-weight: 900;
    font-family: 'Inter', sans-serif;
    line-height: 1;
}

.phone-hours {
    font-weight: 700;
    margin-left: 0;
}

/* Center Column (Table) */
.hours-table {
    width: 100%;
    border-collapse: collapse;
    background: transparent;
    border: 1px solid #666;
    margin-bottom: 0.5rem;
}

.hours-table th,
.hours-table td {
    border: 1px solid #666;
    text-align: center;
    padding: 0.25rem;
    font-size: 0.85rem;
}

.hours-table th {
    background: #e5e5e5;
    font-weight: 700;
}

.hours-table td:first-child {
    background: rgb(255, 236, 0);
    /* Match footer bg if needed, or keep transparent */
    font-weight: 700;
    text-align: center;
    white-space: nowrap;
}

.hours-notes {
    font-size: 0.8rem;
    line-height: 1.5;
}

/* Right Column */
.footer-right p {
    line-height: 1.8;
}

/* Footer Bottom */
.footer-bottom {
    text-align: center;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1rem;
}

.legal-link {
    text-decoration: underline;
    font-weight: 700;
    color: #333;
}

.copyright {
    font-size: 0.9rem;
    margin: 0;
    padding: 0;
    border: none;
}

.social-icons {
    display: flex;
    gap: 1rem;
    font-size: 1.5rem;
}

.icon-link {
    color: #333;
    text-decoration: none;
}

/* Nav Active State */
.main-nav a.active {
    color: var(--primary-color);
    border-bottom: 2px solid var(--primary-color);
}

/* Custom Modal (Renamed from .modal to avoid Bootstrap conflict) */
.custom-modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.7);
    z-index: 2000;
    justify-content: center;
    align-items: center;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.custom-modal.active {
    display: flex;
    opacity: 1;
}

.custom-modal-content {
    background: white;
    padding: 2rem;
    border-radius: 12px;
    max-width: 90%;
    max-height: 90%;
    overflow: auto;
    position: relative;
    transform: scale(0.9);
    transition: transform 0.3s ease;
}

.custom-modal.active .custom-modal-content {
    transform: scale(1);
}

.close-custom-modal {
    position: absolute;
    top: 1rem;
    right: 1.5rem;
    font-size: 2rem;
    cursor: pointer;
    line-height: 1;
}

.custom-modal-image {
    max-width: 100%;
    height: auto;
    display: block;
    border-radius: 8px;
}

/* --- New Styles for Inner Pages --- */

/* Tabs (Custom) */
.custom-tabs {
    display: flex;
    gap: 1rem;
    margin-bottom: 2rem;
    border-bottom: 1px solid #e5e7eb;
}

.custom-tab-btn {
    padding: 1rem 2rem;
    background: none;
    border: none;
    cursor: pointer;
    font-weight: 500;
    color: var(--text-light);
    border-bottom: 2px solid transparent;
    transition: all 0.3s;
}

.custom-tab-btn.active {
    color: var(--primary-color);
    border-bottom-color: var(--primary-color);
}

.custom-tab-content {
    display: none;
    animation: fadeIn 0.5s ease;
}

.custom-tab-content.active {
    display: block;
}

/* Forms */
.form-group {
    margin-bottom: 1.5rem;
}

.form-label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 500;
    color: var(--text-color);
}

.form-control {
    width: 100%;
    padding: 0.75rem;
    border: 1px solid #d1d5db;
    border-radius: 8px;
    font-size: 1rem;
    transition: border-color 0.3s;
}

.form-control:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.1);
}

.form-text {
    font-size: 0.875rem;
    color: var(--text-light);
    margin-top: 0.5rem;
}

.auth-card {
    max-width: 400px;
    margin: 4rem auto;
    padding: 2rem;
    background: white;
    border-radius: 12px;
    box-shadow: var(--shadow-md);
}

/* Accordion */
.accordion-item {
    border-bottom: 1px solid #e5e7eb;
}

.accordion-header {
    width: 100%;
    padding: 1.5rem;
    text-align: left;
    background: none;
    border: none;
    cursor: pointer;
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-weight: 600;
}

.accordion-icon {
    transition: transform 0.3s;
}

.accordion-header.active .accordion-icon {
    transform: rotate(180deg);
}

.accordion-body {
    padding: 0 1.5rem;
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.3s ease-out, padding 0.3s ease;
}

.accordion-header.active+.accordion-body {
    padding-bottom: 1.5rem;
    max-height: 500px;
    /* arbitrary large value */
}

/* Tables */
.table-responsive {
    overflow-x: auto;
}

.table {
    width: 100%;
    border-collapse: collapse;
    margin-bottom: 1rem;
}

.table th,
.table td {
    padding: 1rem;
    border-bottom: 1px solid #e5e7eb;
    text-align: left;
}

.table th {
    background-color: #f9fafb;
    font-weight: 600;
}

/* General Utilities */
.text-center {
    text-align: center;
}

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

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

.text-danger {
    color: var(--error-color);
}

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

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(10px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Responsive */
@media (max-width: 768px) {
    .main-nav {
        display: none;
        /* simple hide for now, would be toggleable */
        position: absolute;
        top: 70px;
        left: 0;
        width: 100%;
        background: white;
        padding: 1rem;
        box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
    }

    .main-nav.active {
        display: block;
    }

    .main-nav ul {
        flex-direction: column;
        gap: 1rem;
    }

    .mobile-menu-toggle {
        display: flex;
    }

    .hero h1 {
        font-size: 2.5rem;
    }

    .tabs {
        flex-direction: column;
        gap: 0;
    }

    .tab-btn {
        width: 100%;
        text-align: left;
        border-bottom: 1px solid #e5e7eb;
    }
}