/* ========================================
   長井誠税理士事務所 - Main Stylesheet
   ======================================== */

/* CSS Variables */
:root {
    --primary-color: #1a365d;
    --secondary-color: #2c5282;
    --accent-color: #38a169;
    --background-color: #ffffff;
    --text-color: #2d3748;
    --light-gray: #f7fafc;
    --border-color: #e2e8f0;
    --shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
    --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
    --transition: all 0.3s ease;
    --max-width: 1200px;
    --header-height: 80px;
}

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

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

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

main {
    flex: 1;
}

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

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

a:hover {
    color: var(--accent-color);
}

ul, ol {
    list-style: none;
}

/* Typography */
h1, h2, h3, h4, h5, h6 {
    font-weight: 700;
    line-height: 1.3;
    color: var(--primary-color);
    margin-bottom: 1rem;
}

h1 { font-size: 2.5rem; }
h2 { font-size: 2rem; }
h3 { font-size: 1.5rem; }
h4 { font-size: 1.25rem; }
h5 { font-size: 1.125rem; }
h6 { font-size: 1rem; }

p {
    margin-bottom: 1rem;
}

/* Container */
.container {
    width: 100%;
    max-width: var(--max-width);
    margin: 0 auto;
    padding: 0 1.5rem;
}

/* Buttons */
.btn {
    display: inline-block;
    padding: 0.875rem 2rem;
    font-size: 1rem;
    font-weight: 600;
    text-align: center;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    transition: var(--transition);
}

.btn-primary {
    background-color: var(--accent-color);
    color: #ffffff;
}

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

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

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

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

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

/* ========================================
   Header & Navigation
   ======================================== */
.header {
    background-color: var(--background-color);
    box-shadow: var(--shadow);
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1000;
    height: var(--header-height);
}

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

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

.logo:hover {
    color: var(--secondary-color);
    text-decoration: none;
}

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

.nav-list {
    display: flex;
    gap: 1.5rem;
}

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

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

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

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

.header-phone {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-weight: 600;
    color: var(--primary-color);
}

.header-phone:hover {
    color: var(--accent-color);
}

/* Mobile Menu Toggle */
.menu-toggle {
    display: none;
    flex-direction: column;
    gap: 5px;
    background: none;
    border: none;
    cursor: pointer;
    padding: 0.5rem;
}

.menu-toggle span {
    display: block;
    width: 25px;
    height: 3px;
    background-color: var(--primary-color);
    border-radius: 2px;
    transition: var(--transition);
}

/* ========================================
   Hero Section
   ======================================== */
.hero {
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--secondary-color) 100%);
    color: #ffffff;
    padding: 8rem 0 5rem;
    margin-top: var(--header-height);
    position: relative;
    overflow: hidden;
}

.hero::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: url('../assets/financial-services.jpg') center/cover no-repeat;
    opacity: 0.15;
}

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

.hero-content {
    max-width: 700px;
}

.hero h1 {
    color: #ffffff;
    font-size: 3rem;
    margin-bottom: 1.5rem;
}

.hero-subtitle {
    font-size: 1.25rem;
    opacity: 0.95;
    margin-bottom: 2rem;
    line-height: 1.8;
}

.hero-buttons {
    display: flex;
    gap: 1rem;
    flex-wrap: wrap;
}

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

.hero .btn-outline {
    border-color: #ffffff;
    color: #ffffff;
}

.hero .btn-outline:hover {
    background-color: #ffffff;
    color: var(--primary-color);
}

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

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

.section-header {
    text-align: center;
    margin-bottom: 3rem;
}

.section-header h2 {
    position: relative;
    display: inline-block;
    padding-bottom: 1rem;
}

.section-header h2::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 60px;
    height: 3px;
    background-color: var(--accent-color);
}

.section-header p {
    color: #718096;
    font-size: 1.125rem;
    max-width: 600px;
    margin: 1rem auto 0;
}

/* ========================================
   Services Grid
   ======================================== */
.services-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 2rem;
}

.service-card {
    background-color: var(--background-color);
    border-radius: 12px;
    padding: 2rem;
    box-shadow: var(--shadow);
    transition: var(--transition);
}

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

.service-icon {
    width: 60px;
    height: 60px;
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 1.5rem;
    font-size: 1.5rem;
}

.service-card h3 {
    font-size: 1.25rem;
    margin-bottom: 1rem;
}

.service-card p {
    color: #718096;
    margin-bottom: 0;
}

.service-card .btn {
    margin-top: 1.5rem;
    padding: 0.625rem 1.25rem;
    font-size: 0.875rem;
}

/* ========================================
   Features / Why Choose Us
   ======================================== */
.features-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 2rem;
}

.feature-item {
    text-align: center;
    padding: 1.5rem;
}

.feature-icon {
    width: 80px;
    height: 80px;
    background-color: var(--light-gray);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 1.5rem;
    font-size: 2rem;
    transition: var(--transition);
}

.feature-item:hover .feature-icon {
    background-color: var(--accent-color);
    color: #ffffff;
}

.feature-item h4 {
    margin-bottom: 0.75rem;
}

.feature-item p {
    color: #718096;
    font-size: 0.9375rem;
    margin-bottom: 0;
}

/* ========================================
   Lead Form
   ======================================== */
.lead-form-section {
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--secondary-color) 100%);
    color: #ffffff;
}

.lead-form-container {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 4rem;
    align-items: center;
}

.lead-form-content h2 {
    color: #ffffff;
    font-size: 2.25rem;
}

.lead-form-content p {
    opacity: 0.9;
    font-size: 1.125rem;
}

.lead-form {
    background-color: var(--background-color);
    border-radius: 12px;
    padding: 2.5rem;
    box-shadow: var(--shadow-lg);
}

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

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

.form-group label .required {
    color: #e53e3e;
}

.form-group input,
.form-group textarea,
.form-group select {
    width: 100%;
    padding: 0.875rem 1rem;
    font-size: 1rem;
    font-family: inherit;
    border: 1px solid var(--border-color);
    border-radius: 6px;
    transition: var(--transition);
}

.form-group input:focus,
.form-group textarea:focus,
.form-group select:focus {
    outline: none;
    border-color: var(--accent-color);
    box-shadow: 0 0 0 3px rgba(56, 161, 105, 0.2);
}

.form-group textarea {
    min-height: 120px;
    resize: vertical;
}

.consent-group {
    display: flex;
    align-items: flex-start;
    gap: 0.75rem;
    margin-bottom: 1.5rem;
}

.consent-group input[type="checkbox"] {
    width: auto;
    margin-top: 0.25rem;
}

.consent-group label {
    font-size: 0.875rem;
    font-weight: 400;
    margin-bottom: 0;
    line-height: 1.5;
}

.consent-group a {
    color: var(--secondary-color);
    text-decoration: underline;
}

.lead-form .btn {
    width: 100%;
}

/* ========================================
   About Page
   ======================================== */
.about-hero {
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--secondary-color) 100%);
    color: #ffffff;
    padding: 8rem 0 5rem;
    margin-top: var(--header-height);
}

.about-hero h1 {
    color: #ffffff;
}

.about-content {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 4rem;
    align-items: center;
}

.about-image {
    border-radius: 12px;
    overflow: hidden;
    box-shadow: var(--shadow-lg);
}

.about-text h2 {
    margin-bottom: 1.5rem;
}

.about-text p {
    color: #718096;
}

.values-list {
    margin-top: 2rem;
}

.value-item {
    display: flex;
    align-items: flex-start;
    gap: 1rem;
    margin-bottom: 1.5rem;
}

.value-icon {
    width: 40px;
    height: 40px;
    background-color: var(--accent-color);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #ffffff;
    flex-shrink: 0;
}

.value-content h4 {
    margin-bottom: 0.25rem;
}

.value-content p {
    color: #718096;
    font-size: 0.9375rem;
    margin-bottom: 0;
}

/* ========================================
   Services Page
   ======================================== */
.service-detail {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 4rem;
    align-items: center;
    padding: 3rem 0;
    border-bottom: 1px solid var(--border-color);
}

.service-detail:last-child {
    border-bottom: none;
}

.service-detail:nth-child(even) {
    direction: rtl;
}

.service-detail:nth-child(even) > * {
    direction: ltr;
}

.service-detail-image {
    border-radius: 12px;
    overflow: hidden;
    box-shadow: var(--shadow);
}

.service-detail-content h3 {
    font-size: 1.75rem;
    margin-bottom: 1rem;
}

.service-detail-content p {
    color: #718096;
    margin-bottom: 1.5rem;
}

.service-detail-content ul {
    margin-bottom: 1.5rem;
}

.service-detail-content li {
    position: relative;
    padding-left: 1.5rem;
    margin-bottom: 0.75rem;
    color: var(--text-color);
}

.service-detail-content li::before {
    content: '✓';
    position: absolute;
    left: 0;
    color: var(--accent-color);
    font-weight: 700;
}

/* ========================================
   Contact Page
   ======================================== */
.contact-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 4rem;
}

.contact-info h2 {
    margin-bottom: 1.5rem;
}

.contact-item {
    display: flex;
    align-items: flex-start;
    gap: 1rem;
    margin-bottom: 1.5rem;
    padding: 1.5rem;
    background-color: var(--light-gray);
    border-radius: 8px;
}

.contact-icon {
    width: 50px;
    height: 50px;
    background-color: var(--primary-color);
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #ffffff;
    font-size: 1.25rem;
    flex-shrink: 0;
}

.contact-details h4 {
    margin-bottom: 0.25rem;
    font-size: 1rem;
}

.contact-details p {
    color: #718096;
    margin-bottom: 0;
}

.contact-details a {
    color: var(--secondary-color);
}

.business-hours {
    margin-top: 2rem;
    padding: 1.5rem;
    background-color: var(--light-gray);
    border-radius: 8px;
}

.business-hours h4 {
    margin-bottom: 1rem;
}

.business-hours p {
    margin-bottom: 0.5rem;
    color: #718096;
}

.map-container {
    border-radius: 12px;
    overflow: hidden;
    box-shadow: var(--shadow);
    margin-top: 2rem;
}

.map-container iframe {
    width: 100%;
    height: 300px;
    border: none;
}

/* ========================================
   Legal Pages (Privacy, Terms, etc.)
   ======================================== */
.legal-hero {
    background-color: var(--primary-color);
    color: #ffffff;
    padding: 8rem 0 3rem;
    margin-top: var(--header-height);
}

.legal-hero h1 {
    color: #ffffff;
}

.legal-content {
    padding: 4rem 0;
}

.legal-content h2 {
    font-size: 1.5rem;
    margin-top: 2.5rem;
    margin-bottom: 1rem;
}

.legal-content h3 {
    font-size: 1.25rem;
    margin-top: 2rem;
    margin-bottom: 0.75rem;
}

.legal-content p {
    color: #718096;
}

.legal-content ul {
    margin: 1rem 0;
    padding-left: 1.5rem;
}

.legal-content li {
    list-style-type: disc;
    margin-bottom: 0.5rem;
    color: #718096;
}

.legal-content a {
    color: var(--secondary-color);
}

.last-updated {
    color: #718096;
    font-style: italic;
    margin-top: 2rem;
    padding-top: 2rem;
    border-top: 1px solid var(--border-color);
}

/* ========================================
   Footer
   ======================================== */
.footer {
    background-color: var(--primary-color);
    color: #ffffff;
    padding: 4rem 0 0;
}

.footer-grid {
    display: grid;
    grid-template-columns: 2fr 1fr 1fr 1fr;
    gap: 3rem;
    padding-bottom: 3rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.footer-brand .logo {
    color: #ffffff;
    font-size: 1.25rem;
    margin-bottom: 1rem;
    display: inline-block;
}

.footer-brand p {
    opacity: 0.8;
    font-size: 0.9375rem;
    margin-bottom: 1.5rem;
}

.footer h4 {
    color: #ffffff;
    font-size: 1rem;
    margin-bottom: 1.5rem;
}

.footer-links {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.footer-links a {
    color: rgba(255, 255, 255, 0.8);
    font-size: 0.9375rem;
}

.footer-links a:hover {
    color: #ffffff;
}

.footer-contact p {
    display: flex;
    align-items: flex-start;
    gap: 0.75rem;
    margin-bottom: 1rem;
    font-size: 0.9375rem;
    opacity: 0.8;
}

.footer-bottom {
    padding: 2rem 0;
}

.footer-disclaimer {
    font-size: 0.8125rem;
    opacity: 0.7;
    margin-bottom: 1rem;
    line-height: 1.6;
}

.footer-copyright {
    font-size: 0.875rem;
    opacity: 0.8;
}

.footer-legal-links {
    display: flex;
    gap: 1.5rem;
    margin-top: 1rem;
    flex-wrap: wrap;
}

.footer-legal-links a {
    color: rgba(255, 255, 255, 0.7);
    font-size: 0.875rem;
}

.footer-legal-links a:hover {
    color: #ffffff;
}

/* ========================================
   Sitemap Page
   ======================================== */
.sitemap-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 3rem;
}

.sitemap-section h3 {
    margin-bottom: 1.5rem;
    padding-bottom: 0.75rem;
    border-bottom: 2px solid var(--accent-color);
}

.sitemap-section ul {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.sitemap-section a {
    color: var(--text-color);
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.sitemap-section a:hover {
    color: var(--accent-color);
}

/* ========================================
   Cookie Consent Banner
   ======================================== */
.cookie-banner {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    background-color: var(--primary-color);
    color: #ffffff;
    padding: 1.5rem;
    z-index: 9999;
    box-shadow: 0 -4px 6px -1px rgba(0, 0, 0, 0.1);
    display: none;
}

.cookie-banner.show {
    display: block;
}

.cookie-content {
    max-width: var(--max-width);
    margin: 0 auto;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 2rem;
}

.cookie-text {
    flex: 1;
}

.cookie-text p {
    margin-bottom: 0;
    font-size: 0.9375rem;
    opacity: 0.9;
}

.cookie-text a {
    color: #ffffff;
    text-decoration: underline;
}

.cookie-buttons {
    display: flex;
    gap: 1rem;
    flex-shrink: 0;
}

.cookie-buttons .btn {
    padding: 0.625rem 1.25rem;
    font-size: 0.875rem;
}

/* Cookie Settings Modal */
.cookie-modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: rgba(0, 0, 0, 0.5);
    z-index: 10000;
    align-items: center;
    justify-content: center;
    padding: 1rem;
}

.cookie-modal.show {
    display: flex;
}

.cookie-modal-content {
    background-color: var(--background-color);
    border-radius: 12px;
    max-width: 600px;
    width: 100%;
    max-height: 80vh;
    overflow-y: auto;
    padding: 2rem;
}

.cookie-modal-content h2 {
    margin-bottom: 1.5rem;
}

.cookie-category {
    padding: 1rem 0;
    border-bottom: 1px solid var(--border-color);
}

.cookie-category:last-child {
    border-bottom: none;
}

.cookie-category-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 0.5rem;
}

.cookie-category-header h4 {
    margin-bottom: 0;
}

.cookie-category p {
    color: #718096;
    font-size: 0.875rem;
    margin-bottom: 0;
}

/* Toggle Switch */
.toggle-switch {
    position: relative;
    width: 50px;
    height: 26px;
}

.toggle-switch input {
    opacity: 0;
    width: 0;
    height: 0;
}

.toggle-slider {
    position: absolute;
    cursor: pointer;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: #ccc;
    transition: var(--transition);
    border-radius: 26px;
}

.toggle-slider::before {
    position: absolute;
    content: "";
    height: 20px;
    width: 20px;
    left: 3px;
    bottom: 3px;
    background-color: white;
    transition: var(--transition);
    border-radius: 50%;
}

.toggle-switch input:checked + .toggle-slider {
    background-color: var(--accent-color);
}

.toggle-switch input:checked + .toggle-slider::before {
    transform: translateX(24px);
}

.toggle-switch input:disabled + .toggle-slider {
    opacity: 0.5;
    cursor: not-allowed;
}

/* ========================================
   Utility Classes
   ======================================== */
.text-center { text-align: center; }
.text-left { text-align: left; }
.text-right { text-align: right; }

.mt-1 { margin-top: 0.5rem; }
.mt-2 { margin-top: 1rem; }
.mt-3 { margin-top: 1.5rem; }
.mt-4 { margin-top: 2rem; }
.mt-5 { margin-top: 3rem; }

.mb-1 { margin-bottom: 0.5rem; }
.mb-2 { margin-bottom: 1rem; }
.mb-3 { margin-bottom: 1.5rem; }
.mb-4 { margin-bottom: 2rem; }
.mb-5 { margin-bottom: 3rem; }

.py-1 { padding-top: 0.5rem; padding-bottom: 0.5rem; }
.py-2 { padding-top: 1rem; padding-bottom: 1rem; }
.py-3 { padding-top: 1.5rem; padding-bottom: 1.5rem; }
.py-4 { padding-top: 2rem; padding-bottom: 2rem; }
.py-5 { padding-top: 3rem; padding-bottom: 3rem; }

.hidden { display: none !important; }
.visible { display: block !important; }

/* Skip Link for Accessibility */
.skip-link {
    position: absolute;
    top: -40px;
    left: 0;
    background: var(--primary-color);
    color: white;
    padding: 8px;
    z-index: 100;
}

.skip-link:focus {
    top: 0;
}

/* Focus Styles for Accessibility */
*:focus-visible {
    outline: 2px solid var(--accent-color);
    outline-offset: 2px;
}

/* Screen Reader Only */
.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}
