/* 
   Koike Tax Accountant Office - Premium Design System 
   Theme: Trust, Professionalism, Accessibility
*/

:root {
    /* Color Palette */
    --primary-color: #0f2a4a;
    /* Deep Navy - Trust, Authority */
    --primary-light: #1a4b82;
    /* Lighter Navy for hover */
    --secondary-color: #c5a059;
    /* Gold - Premium, Quality */
    --secondary-light: #e6c57e;
    /* Lighter Gold */
    --accent-color: #f4f7fa;
    /* Very Light Blue-Gray - Backgrounds */
    --text-color: #333333;
    /* Dark Gray - Main Text */
    --text-light: #666666;
    /* Medium Gray - Sub Text */
    --white: #ffffff;
    --border-color: #e0e0e0;

    /* Typography */
    --font-main: 'Noto Sans JP', sans-serif;

    /* Layout */
    --container-width: 1200px;
    --header-height: 80px;
    --transition-speed: 0.3s;
    --shadow-sm: 0 2px 4px rgba(0, 0, 0, 0.05);
    --shadow-md: 0 4px 12px rgba(0, 0, 0, 0.08);
    --shadow-lg: 0 8px 24px rgba(0, 0, 0, 0.12);
}

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

body {
    font-family: var(--font-main);
    color: var(--text-color);
    line-height: 1.8;
    background-color: var(--white);
    overflow-x: hidden;
    padding-top: var(--header-height);
    /* Prevent content hiding behind fixed header */
}

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

ul {
    list-style: none;
}

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

h1,
h2,
h3,
h4,
h5,
h6 {
    line-height: 1.4;
    font-weight: 700;
}

/* Utility Classes */
.container {
    max-width: var(--container-width);
    margin: 0 auto;
    padding: 0 2rem;
}

.section-padding {
    padding: 5rem 0;
}

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

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

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

/* Button Styles */
.btn {
    display: inline-block;
    padding: 1rem 2rem;
    border-radius: 50px;
    /* Pill shape */
    font-weight: 700;
    text-align: center;
    cursor: pointer;
    transition: all var(--transition-speed);
    border: 2px solid transparent;
}

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

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

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

.btn-secondary:hover {
    background-color: var(--secondary-light);
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
}

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

.btn-outline:hover {
    background-color: var(--primary-color);
    color: var(--white);
}

/* Header & Navigation (Sticky & Responsive) */
.site-header {
    background-color: var(--white);
    box-shadow: var(--shadow-sm);
    position: fixed;
    width: 100%;
    top: 0;
    left: 0;
    z-index: 1000;
    height: var(--header-height);
    display: flex;
    align-items: center;
}

.header-inner {
    display: flex;
    justify-content: space-between;
    align-items: center;
    width: 100%;
    max-width: var(--container-width);
    margin: 0 auto;
    padding: 0 2rem;
}

.logo {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--primary-color);
    display: flex;
    align-items: center;
    gap: 0.5rem;
    z-index: 1001;
    /* Above mobile menu */
}

/* Desktop Navigation */
.nav-menu {
    display: flex;
    gap: 1.5rem;
    align-items: center;
}

.nav-link {
    font-weight: 500;
    color: var(--primary-color);
    font-size: 0.95rem;
    position: relative;
    padding: 0.5rem 0;
}

.nav-link::after {
    content: '';
    position: absolute;
    width: 0;
    height: 2px;
    bottom: 0;
    left: 0;
    background-color: var(--secondary-color);
    transition: width var(--transition-speed);
}

.nav-link:hover::after,
.nav-link.active::after {
    width: 100%;
}

/* Mobile Menu Toggle (Hamburger) */
.mobile-menu-toggle {
    display: none;
    flex-direction: column;
    justify-content: space-between;
    width: 30px;
    height: 21px;
    cursor: pointer;
    z-index: 1002;
}

.mobile-menu-toggle span {
    display: block;
    width: 100%;
    height: 3px;
    background-color: var(--primary-color);
    border-radius: 3px;
    transition: all var(--transition-speed);
}

/* Mobile Menu Active State (X icon) */
.mobile-menu-toggle.active span:nth-child(1) {
    transform: translateY(9px) rotate(45deg);
}

.mobile-menu-toggle.active span:nth-child(2) {
    opacity: 0;
}

.mobile-menu-toggle.active span:nth-child(3) {
    transform: translateY(-9px) rotate(-45deg);
}

/* Hero Section */
.hero {
    background: linear-gradient(rgba(15, 42, 74, 0.8), rgba(15, 42, 74, 0.8)), url('tax_office_hero_1763703522970.png');
    background-size: cover;
    background-position: center;
    color: var(--white);
    padding: 8rem 2rem;
    text-align: center;
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 60vh;
}

.hero h1 {
    font-size: 2.5rem;
    margin-bottom: 1.5rem;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
}

.hero p {
    font-size: 1.2rem;
    margin-bottom: 2.5rem;
    max-width: 800px;
    margin-left: auto;
    margin-right: auto;
}

/* Page Header (for sub-pages) */
.page-header {
    background-color: var(--primary-color);
    color: var(--white);
    padding: 4rem 2rem;
    text-align: center;
    margin-bottom: 3rem;
}

.page-header h1 {
    font-size: 2rem;
    margin-bottom: 0.5rem;
}

.page-header p {
    color: var(--secondary-color);
    font-weight: 500;
    letter-spacing: 1px;
    text-transform: uppercase;
}

/* Section Titles */
.section-title {
    text-align: center;
    margin-bottom: 3rem;
}

.section-title h2 {
    font-size: 2rem;
    color: var(--primary-color);
    margin-bottom: 0.5rem;
    position: relative;
    display: inline-block;
}

.section-title h2::after {
    content: '';
    display: block;
    width: 60px;
    height: 3px;
    background-color: var(--secondary-color);
    margin: 1rem auto 0;
}

.section-title p {
    color: var(--text-light);
    font-size: 0.9rem;
    margin-top: 0.5rem;
    letter-spacing: 1px;
    text-transform: uppercase;
}

/* Services Grid */
.services-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
    max-width: var(--container-width);
    margin: 0 auto;
}

.service-card {
    background: var(--white);
    border-radius: 8px;
    padding: 2rem;
    box-shadow: var(--shadow-sm);
    transition: transform var(--transition-speed), box-shadow var(--transition-speed);
    border-top: 4px solid var(--secondary-color);
    display: flex;
    flex-direction: column;
    height: 100%;
}

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

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

.service-card h3 {
    font-size: 1.4rem;
    margin-bottom: 1rem;
    color: var(--primary-color);
}

.service-card p {
    color: var(--text-light);
    margin-bottom: 1.5rem;
    flex-grow: 1;
}

/* Footer */
footer {
    background-color: var(--primary-color);
    color: var(--white);
    padding: 4rem 0 0;
    margin-top: 5rem;
}

.footer-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 3rem;
    max-width: var(--container-width);
    margin: 0 auto;
    padding: 0 2rem 3rem;
}

.footer-col h3 {
    color: var(--secondary-color);
    margin-bottom: 1.5rem;
    font-size: 1.2rem;
}

.footer-links li {
    margin-bottom: 0.8rem;
}

.footer-links a {
    color: #ccc;
    transition: color var(--transition-speed);
}

.footer-links a:hover {
    color: var(--white);
    padding-left: 5px;
}

.footer-contact p {
    margin-bottom: 1rem;
    color: #ccc;
    display: flex;
    align-items: flex-start;
    gap: 0.8rem;
}

.copyright {
    background-color: #0a1f38;
    text-align: center;
    padding: 1.5rem;
    font-size: 0.9rem;
    color: #888;
}

/* Chat Widget */
.chat-widget {
    position: fixed;
    bottom: 20px;
    right: 20px;
    z-index: 2000;
}

.chat-button {
    width: 60px;
    height: 60px;
    background-color: var(--secondary-color);
    color: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    cursor: pointer;
    box-shadow: var(--shadow-md);
    transition: transform var(--transition-speed);
}

.chat-button:hover {
    transform: scale(1.1);
}

.chat-window {
    display: none;
    position: absolute;
    bottom: 80px;
    right: 0;
    width: 300px;
    background: white;
    border-radius: 10px;
    box-shadow: var(--shadow-lg);
    overflow: hidden;
    flex-direction: column;
}

.chat-window.active {
    display: flex;
}

.chat-header {
    background: var(--primary-color);
    color: white;
    padding: 1rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.chat-body {
    height: 300px;
    padding: 1rem;
    overflow-y: auto;
    background: #f9f9f9;
}

.chat-message {
    margin-bottom: 1rem;
    padding: 0.8rem;
    border-radius: 8px;
    max-width: 80%;
    font-size: 0.9rem;
}

.chat-message.bot {
    background: white;
    border: 1px solid #eee;
    margin-right: auto;
}

.chat-message.user {
    background: var(--primary-color);
    color: white;
    margin-left: auto;
}

.chat-input-area {
    padding: 1rem;
    border-top: 1px solid #eee;
    display: flex;
    gap: 0.5rem;
}

.chat-input-area input {
    flex: 1;
    padding: 0.5rem;
    border: 1px solid #ddd;
    border-radius: 4px;
}

.chat-input-area button {
    background: var(--primary-color);
    color: white;
    border: none;
    padding: 0.5rem 1rem;
    border-radius: 4px;
    cursor: pointer;
}

/* Responsive Design (Mobile) */
@media (max-width: 768px) {
    :root {
        --header-height: 70px;
    }

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

    .nav-menu {
        position: fixed;
        top: var(--header-height);
        left: 0;
        width: 100%;
        background-color: var(--white);
        flex-direction: column;
        padding: 2rem;
        box-shadow: var(--shadow-md);
        transform: translateY(-150%);
        /* Hidden by default */
        transition: transform var(--transition-speed) ease-in-out;
        gap: 0;
    }

    .nav-menu.active {
        transform: translateY(0);
    }

    .nav-menu li {
        width: 100%;
        border-bottom: 1px solid #eee;
    }

    .nav-link {
        display: block;
        padding: 1rem 0;
        font-size: 1.1rem;
    }

    .nav-link::after {
        display: none;
        /* Remove underline effect on mobile */
    }

    .nav-menu .cta-button {
        display: block;
        text-align: center;
        margin-top: 1.5rem;
    }

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

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

    .section-padding {
        padding: 3rem 0;
    }
}