/* ============================================
   DIG税理士法人 - Main Stylesheet
   ============================================ */

/* CSS Variables */
:root {
    --primary-color: #1a365d;
    --secondary-color: #4a5568;
    --accent-color: #3182ce;
    --background-color: #ffffff;
    --text-color: #2d3748;
    --light-gray: #f7fafc;
    --border-color: #e2e8f0;
    --success-color: #38a169;
    --error-color: #e53e3e;
    --font-family: 'Hiragino Kaku Gothic Pro', 'Meiryo', 'Noto Sans JP', sans-serif;
    --max-width: 1200px;
    --header-height: 80px;
    --transition: all 0.3s ease;
}

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

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

body {
    font-family: var(--font-family);
    color: var(--text-color);
    background-color: var(--background-color);
    line-height: 1.7;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

main {
    flex: 1;
}

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

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

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

ul, ol {
    list-style: none;
}

/* Typography */
h1, h2, h3, h4, h5, h6 {
    color: var(--primary-color);
    font-weight: 700;
    line-height: 1.3;
    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: 4px;
    cursor: pointer;
    transition: var(--transition);
}

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

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

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

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

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

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

/* Header */
.header {
    background-color: white;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1000;
    height: var(--header-height);
}

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

.logo {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--primary-color);
}

.logo span {
    color: var(--accent-color);
}

/* Navigation */
.nav {
    display: flex;
    align-items: center;
}

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

.nav-link {
    color: var(--text-color);
    font-weight: 500;
    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(--accent-color);
}

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

.mobile-menu-btn span {
    display: block;
    width: 25px;
    height: 3px;
    background-color: var(--primary-color);
    transition: var(--transition);
}

/* Hero Section */
.hero {
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--accent-color) 100%);
    color: white;
    padding: 8rem 0 5rem;
    min-height: 80vh;
    display: flex;
    align-items: center;
}

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

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

.hero-text p {
    font-size: 1.25rem;
    opacity: 0.9;
    margin-bottom: 2rem;
}

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

.hero-image img {
    border-radius: 8px;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.2);
}

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

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

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

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

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

.section-title p {
    color: var(--secondary-color);
    max-width: 600px;
    margin: 1rem auto 0;
}

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

.service-card {
    background: white;
    border-radius: 8px;
    padding: 2rem;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
    transition: var(--transition);
}

.service-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.12);
}

.service-card img {
    width: 100%;
    height: 200px;
    object-fit: cover;
    border-radius: 8px;
    margin-bottom: 1.5rem;
}

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

.service-card p {
    color: var(--secondary-color);
}

.service-card .btn {
    margin-top: 1rem;
}

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

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

.feature-icon {
    width: 80px;
    height: 80px;
    background: linear-gradient(135deg, var(--primary-color), var(--accent-color));
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 1.5rem;
    color: white;
    font-size: 2rem;
}

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

.feature-item p {
    color: var(--secondary-color);
    font-size: 0.95rem;
}

/* Lead Form */
.lead-form-section {
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--accent-color) 100%);
    color: white;
    padding: 5rem 0;
}

.lead-form-container {
    max-width: 600px;
    margin: 0 auto;
    background: white;
    border-radius: 12px;
    padding: 3rem;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.2);
}

.lead-form-container h2 {
    color: var(--primary-color);
    text-align: center;
    margin-bottom: 0.5rem;
}

.lead-form-container > p {
    text-align: center;
    color: var(--secondary-color);
    margin-bottom: 2rem;
}

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

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

.form-group label .required {
    color: var(--error-color);
    margin-left: 0.25rem;
}

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

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
    outline: none;
    border-color: var(--accent-color);
    box-shadow: 0 0 0 3px rgba(49, 130, 206, 0.1);
}

.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;
    color: var(--secondary-color);
    line-height: 1.5;
}

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

.form-submit {
    width: 100%;
}

/* Contact Info */
.contact-info {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 3rem;
}

.contact-details h3 {
    margin-bottom: 1.5rem;
}

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

.contact-item-icon {
    width: 50px;
    height: 50px;
    background-color: var(--light-gray);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--accent-color);
    font-size: 1.25rem;
    flex-shrink: 0;
}

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

.contact-item-content p {
    color: var(--secondary-color);
    margin-bottom: 0;
}

.contact-item-content a {
    color: var(--accent-color);
}

/* Map */
.map-container {
    background: var(--light-gray);
    border-radius: 8px;
    padding: 2rem;
    text-align: center;
}

.map-container h4 {
    margin-bottom: 1rem;
}

.map-link {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    color: var(--accent-color);
    font-weight: 600;
}

.map-link:hover {
    text-decoration: underline;
}

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

.footer-content {
    display: grid;
    grid-template-columns: 2fr 1fr 1fr 1fr;
    gap: 3rem;
    margin-bottom: 3rem;
}

.footer-brand h3 {
    color: white;
    margin-bottom: 1rem;
}

.footer-brand p {
    opacity: 0.8;
    font-size: 0.95rem;
}

.footer-links h4 {
    color: white;
    margin-bottom: 1.5rem;
    font-size: 1.1rem;
}

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

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

.footer-links a:hover {
    color: white;
}

.footer-bottom {
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    padding-top: 2rem;
}

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

.footer-copyright {
    font-size: 0.9rem;
    opacity: 0.8;
    text-align: center;
}

/* Cookie Consent Banner */
.cookie-banner {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    background: white;
    box-shadow: 0 -4px 20px rgba(0, 0, 0, 0.15);
    z-index: 9999;
    padding: 1.5rem;
    transform: translateY(100%);
    transition: transform 0.3s ease;
}

.cookie-banner.show {
    transform: translateY(0);
}

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

.cookie-banner-text h4 {
    margin-bottom: 0.5rem;
}

.cookie-banner-text p {
    margin-bottom: 0;
    font-size: 0.95rem;
    color: var(--secondary-color);
}

.cookie-banner-text a {
    color: var(--accent-color);
    text-decoration: underline;
}

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

.cookie-banner-buttons .btn {
    padding: 0.75rem 1.5rem;
    font-size: 0.9rem;
}

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

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

.cookie-modal-content {
    background: white;
    border-radius: 12px;
    max-width: 600px;
    width: 100%;
    max-height: 80vh;
    overflow-y: auto;
}

.cookie-modal-header {
    padding: 1.5rem;
    border-bottom: 1px solid var(--border-color);
}

.cookie-modal-header h3 {
    margin-bottom: 0;
}

.cookie-modal-body {
    padding: 1.5rem;
}

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

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

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

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

.cookie-category p {
    color: var(--secondary-color);
    font-size: 0.9rem;
    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: var(--border-color);
    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;
}

.cookie-modal-footer {
    padding: 1.5rem;
    border-top: 1px solid var(--border-color);
    display: flex;
    justify-content: flex-end;
    gap: 1rem;
}

/* Page Header */
.page-header {
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--accent-color) 100%);
    color: white;
    padding: 8rem 0 4rem;
    text-align: center;
}

.page-header h1 {
    color: white;
    margin-bottom: 1rem;
}

.page-header p {
    opacity: 0.9;
    max-width: 600px;
    margin: 0 auto;
}

/* Content Pages */
.content-page {
    padding: 4rem 0;
}

.content-page .container {
    max-width: 800px;
}

.content-page h2 {
    margin-top: 2rem;
    margin-bottom: 1rem;
}

.content-page h3 {
    margin-top: 1.5rem;
    margin-bottom: 0.75rem;
}

.content-page ul,
.content-page ol {
    margin-left: 1.5rem;
    margin-bottom: 1rem;
}

.content-page ul {
    list-style: disc;
}

.content-page ol {
    list-style: decimal;
}

.content-page li {
    margin-bottom: 0.5rem;
}

.content-page a {
    color: var(--accent-color);
    text-decoration: underline;
}

/* About Page */
.about-intro {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 3rem;
    align-items: center;
    margin-bottom: 4rem;
}

.about-intro img {
    border-radius: 8px;
}

.values-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 2rem;
}

.value-card {
    text-align: center;
    padding: 2rem;
    background: var(--light-gray);
    border-radius: 8px;
}

.value-card h4 {
    margin-bottom: 1rem;
}

.value-card p {
    color: var(--secondary-color);
    margin-bottom: 0;
}

/* Services Page */
.service-detail {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 3rem;
    align-items: center;
    margin-bottom: 4rem;
}

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

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

.service-detail img {
    border-radius: 8px;
}

.service-detail h3 {
    margin-bottom: 1rem;
}

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

.service-detail li {
    position: relative;
    padding-left: 1.5rem;
    margin-bottom: 0.75rem;
}

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

/* Business Hours */
.business-hours {
    background: var(--light-gray);
    border-radius: 8px;
    padding: 2rem;
    margin-top: 2rem;
}

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

.business-hours table {
    width: 100%;
    border-collapse: collapse;
}

.business-hours td {
    padding: 0.5rem 0;
    border-bottom: 1px solid var(--border-color);
}

.business-hours td:last-child {
    text-align: right;
}

.business-hours tr:last-child td {
    border-bottom: none;
}

/* Breadcrumb */
.breadcrumb {
    padding: 1rem 0;
    background: var(--light-gray);
}

.breadcrumb ul {
    display: flex;
    gap: 0.5rem;
}

.breadcrumb li::after {
    content: '>';
    margin-left: 0.5rem;
    color: var(--secondary-color);
}

.breadcrumb li:last-child::after {
    display: none;
}

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

.breadcrumb li:last-child {
    color: var(--primary-color);
}

/* Success Message */
.form-success {
    background: #c6f6d5;
    border: 1px solid var(--success-color);
    color: #276749;
    padding: 1rem;
    border-radius: 4px;
    margin-bottom: 1.5rem;
    text-align: center;
}

.form-error {
    background: #fed7d7;
    border: 1px solid var(--error-color);
    color: #c53030;
    padding: 1rem;
    border-radius: 4px;
    margin-bottom: 1.5rem;
    text-align: center;
}

/* Responsive Design */
@media (max-width: 1024px) {
    .hero-content {
        grid-template-columns: 1fr;
        text-align: center;
    }
    
    .hero-image {
        display: none;
    }
    
    .services-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .features-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .footer-content {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .about-intro {
        grid-template-columns: 1fr;
    }
    
    .service-detail {
        grid-template-columns: 1fr;
    }
    
    .service-detail:nth-child(even) {
        direction: ltr;
    }
}

@media (max-width: 768px) {
    h1 { font-size: 2rem; }
    h2 { font-size: 1.75rem; }
    
    .header {
        height: 70px;
    }
    
    .nav-list {
        position: fixed;
        top: 70px;
        left: 0;
        right: 0;
        background: white;
        flex-direction: column;
        padding: 2rem;
        gap: 1rem;
        box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
        transform: translateY(-100%);
        opacity: 0;
        visibility: hidden;
        transition: var(--transition);
    }
    
    .nav-list.show {
        transform: translateY(0);
        opacity: 1;
        visibility: visible;
    }
    
    .mobile-menu-btn {
        display: flex;
    }
    
    .hero {
        padding: 6rem 0 3rem;
        min-height: auto;
    }
    
    .hero-text h1 {
        font-size: 2rem;
    }
    
    .hero-buttons {
        flex-direction: column;
    }
    
    .services-grid {
        grid-template-columns: 1fr;
    }
    
    .features-grid {
        grid-template-columns: 1fr;
    }
    
    .contact-info {
        grid-template-columns: 1fr;
    }
    
    .footer-content {
        grid-template-columns: 1fr;
        gap: 2rem;
    }
    
    .cookie-banner-content {
        flex-direction: column;
        text-align: center;
    }
    
    .cookie-banner-buttons {
        flex-direction: column;
        width: 100%;
    }
    
    .cookie-banner-buttons .btn {
        width: 100%;
    }
    
    .values-grid {
        grid-template-columns: 1fr;
    }
    
    .lead-form-container {
        padding: 2rem;
    }
}

@media (max-width: 480px) {
    .container {
        padding: 0 1rem;
    }
    
    .section {
        padding: 3rem 0;
    }
    
    .btn {
        padding: 0.75rem 1.5rem;
    }
    
    .page-header {
        padding: 6rem 0 3rem;
    }
}

/* 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; }
.mb-1 { margin-bottom: 0.5rem; }
.mb-2 { margin-bottom: 1rem; }
.mb-3 { margin-bottom: 1.5rem; }
.mb-4 { margin-bottom: 2rem; }

/* Print Styles */
@media print {
    .header,
    .footer,
    .cookie-banner,
    .cookie-modal {
        display: none;
    }
    
    body {
        font-size: 12pt;
    }
    
    .hero {
        background: none;
        color: black;
        padding: 2rem 0;
    }
    
    .hero-text h1 {
        color: black;
    }
}
