/* ============================================
   Tax Connection Accounting - Main Styles
   ============================================ */

/* CSS Variables */
:root {
    --primary-color: #1a4b8c;
    --primary-dark: #0d2d5a;
    --primary-light: #2d6bc4;
    --secondary-color: #f8f9fa;
    --accent-color: #28a745;
    --text-color: #333333;
    --text-light: #666666;
    --white: #ffffff;
    --border-color: #e0e0e0;
    --shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    --shadow-hover: 0 4px 20px rgba(0, 0, 0, 0.15);
    --transition: all 0.3s ease;
    --max-width: 1200px;
    --header-height: 80px;
}

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

html {
    scroll-behavior: smooth;
}

body {
    font-family: 'Hiragino Kaku Gothic Pro', 'Meiryo', 'MS PGothic', sans-serif;
    font-size: 16px;
    line-height: 1.6;
    color: var(--text-color);
    background-color: var(--white);
}

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

ul {
    list-style: none;
}

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

/* Container */
.container {
    max-width: var(--max-width);
    margin: 0 auto;
    padding: 0 20px;
}

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

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

.logo {
    display: flex;
    align-items: center;
    gap: 10px;
}

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

.logo-subtext {
    font-size: 0.75rem;
    color: var(--text-light);
}

.nav-menu {
    display: flex;
    gap: 30px;
}

.nav-menu a {
    font-size: 0.95rem;
    font-weight: 500;
    color: var(--text-color);
    padding: 8px 0;
    position: relative;
}

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

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

.nav-menu a:hover::after {
    width: 100%;
}

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

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

/* ============================================
   Hero Section
   ============================================ */
.hero {
    position: relative;
    min-height: 100vh;
    display: flex;
    align-items: center;
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--primary-dark) 100%);
    padding-top: var(--header-height);
    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-content {
    position: relative;
    z-index: 1;
    max-width: 700px;
    color: var(--white);
}

.hero-title {
    font-size: 2.75rem;
    font-weight: 700;
    line-height: 1.3;
    margin-bottom: 20px;
}

.hero-subtitle {
    font-size: 1.15rem;
    line-height: 1.8;
    margin-bottom: 30px;
    opacity: 0.95;
}

.hero-cta {
    display: inline-flex;
    gap: 15px;
    flex-wrap: wrap;
}

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

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

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

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

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

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

.btn-accent:hover {
    background-color: #218838;
    transform: translateY(-2px);
}

/* ============================================
   Sections
   ============================================ */
.section {
    padding: 80px 0;
}

.section-title {
    font-size: 2rem;
    font-weight: 700;
    color: var(--primary-color);
    text-align: center;
    margin-bottom: 15px;
}

.section-subtitle {
    font-size: 1.1rem;
    color: var(--text-light);
    text-align: center;
    max-width: 600px;
    margin: 0 auto 50px;
}

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

/* ============================================
   Services Grid
   ============================================ */
.services-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 30px;
}

.service-card {
    background-color: var(--white);
    border-radius: 12px;
    overflow: hidden;
    box-shadow: var(--shadow);
    transition: var(--transition);
}

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

.service-card-image {
    height: 200px;
    overflow: hidden;
}

.service-card-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: var(--transition);
}

.service-card:hover .service-card-image img {
    transform: scale(1.05);
}

.service-card-content {
    padding: 25px;
}

.service-card-title {
    font-size: 1.25rem;
    font-weight: 600;
    color: var(--primary-color);
    margin-bottom: 12px;
}

.service-card-text {
    font-size: 0.95rem;
    color: var(--text-light);
    line-height: 1.7;
}

.service-card-link {
    display: inline-block;
    margin-top: 15px;
    font-size: 0.9rem;
    font-weight: 600;
    color: var(--primary-color);
}

.service-card-link:hover {
    color: var(--primary-light);
}

/* ============================================
   Features / Why Choose Us
   ============================================ */
.features-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 40px;
}

.feature-item {
    text-align: center;
    padding: 30px;
}

.feature-icon {
    width: 70px;
    height: 70px;
    margin: 0 auto 20px;
    background-color: var(--primary-color);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
}

.feature-icon svg {
    width: 35px;
    height: 35px;
    fill: var(--white);
}

.feature-title {
    font-size: 1.15rem;
    font-weight: 600;
    color: var(--text-color);
    margin-bottom: 12px;
}

.feature-text {
    font-size: 0.95rem;
    color: var(--text-light);
    line-height: 1.7;
}

/* ============================================
   Forms
   ============================================ */
.form-container {
    max-width: 600px;
    margin: 0 auto;
    background-color: var(--white);
    padding: 40px;
    border-radius: 12px;
    box-shadow: var(--shadow);
}

.form-group {
    margin-bottom: 20px;
}

.form-label {
    display: block;
    font-size: 0.95rem;
    font-weight: 600;
    color: var(--text-color);
    margin-bottom: 8px;
}

.form-label .required {
    color: #dc3545;
}

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

.form-input:focus,
.form-textarea:focus,
.form-select:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(26, 75, 140, 0.1);
}

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

.form-checkbox {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    cursor: pointer;
}

.form-checkbox input[type="checkbox"] {
    width: 18px;
    height: 18px;
    margin-top: 2px;
    cursor: pointer;
    accent-color: var(--primary-color);
}

.form-checkbox-text {
    font-size: 0.9rem;
    color: var(--text-light);
    line-height: 1.5;
}

.form-checkbox-text a {
    color: var(--primary-color);
    text-decoration: underline;
}

.form-submit {
    width: 100%;
    margin-top: 10px;
}

.form-disclaimer {
    font-size: 0.85rem;
    color: var(--text-light);
    text-align: center;
    margin-top: 15px;
    line-height: 1.5;
}

/* Form Messages */
.form-message {
    padding: 15px;
    border-radius: 6px;
    margin-bottom: 20px;
    text-align: center;
}

.form-message.success {
    background-color: #d4edda;
    color: #155724;
    border: 1px solid #c3e6cb;
}

.form-message.error {
    background-color: #f8d7da;
    color: #721c24;
    border: 1px solid #f5c6cb;
}

/* ============================================
   Contact Section
   ============================================ */
.contact-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 50px;
    align-items: start;
}

.contact-info {
    padding: 30px;
}

.contact-info-item {
    display: flex;
    gap: 15px;
    margin-bottom: 25px;
}

.contact-info-icon {
    width: 50px;
    height: 50px;
    background-color: var(--primary-color);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.contact-info-icon svg {
    width: 24px;
    height: 24px;
    fill: var(--white);
}

.contact-info-content h3 {
    font-size: 1rem;
    font-weight: 600;
    color: var(--text-color);
    margin-bottom: 5px;
}

.contact-info-content p {
    font-size: 0.95rem;
    color: var(--text-light);
    line-height: 1.6;
}

.contact-map {
    height: 400px;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: var(--shadow);
}

.contact-map iframe {
    width: 100%;
    height: 100%;
    border: none;
}

/* ============================================
   About Page
   ============================================ */
.about-hero {
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--primary-dark) 100%);
    color: var(--white);
    padding: 150px 0 80px;
    text-align: center;
}

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

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

.about-text h2 {
    font-size: 1.75rem;
    color: var(--primary-color);
    margin-bottom: 20px;
}

.about-text p {
    font-size: 1rem;
    color: var(--text-light);
    line-height: 1.8;
    margin-bottom: 15px;
}

.values-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 30px;
}

.value-card {
    background-color: var(--white);
    padding: 30px;
    border-radius: 12px;
    box-shadow: var(--shadow);
    text-align: center;
    transition: var(--transition);
}

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

.value-card h3 {
    font-size: 1.15rem;
    color: var(--primary-color);
    margin-bottom: 12px;
}

.value-card p {
    font-size: 0.95rem;
    color: var(--text-light);
    line-height: 1.7;
}

/* ============================================
   Services Page
   ============================================ */
.services-hero {
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--primary-dark) 100%);
    color: var(--white);
    padding: 150px 0 80px;
    text-align: center;
}

.service-detail {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 50px;
    align-items: center;
    margin-bottom: 60px;
    padding-bottom: 60px;
    border-bottom: 1px solid var(--border-color);
}

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

.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.5rem;
    color: var(--primary-color);
    margin-bottom: 15px;
}

.service-detail-content p {
    font-size: 1rem;
    color: var(--text-light);
    line-height: 1.8;
    margin-bottom: 20px;
}

.service-detail-list {
    list-style: none;
}

.service-detail-list li {
    position: relative;
    padding-left: 25px;
    margin-bottom: 10px;
    font-size: 0.95rem;
    color: var(--text-color);
}

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

/* ============================================
   Legal Pages (Privacy, Terms, etc.)
   ============================================ */
.legal-hero {
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--primary-dark) 100%);
    color: var(--white);
    padding: 150px 0 80px;
    text-align: center;
}

.legal-content {
    max-width: 800px;
    margin: 0 auto;
}

.legal-content h2 {
    font-size: 1.5rem;
    color: var(--primary-color);
    margin: 40px 0 15px;
    padding-top: 20px;
}

.legal-content h2:first-of-type {
    margin-top: 0;
    padding-top: 0;
}

.legal-content p {
    font-size: 1rem;
    color: var(--text-light);
    line-height: 1.8;
    margin-bottom: 15px;
}

.legal-content ul {
    margin: 15px 0;
    padding-left: 30px;
}

.legal-content ul li {
    list-style-type: disc;
    font-size: 1rem;
    color: var(--text-light);
    line-height: 1.8;
    margin-bottom: 8px;
}

.legal-content a {
    color: var(--primary-color);
    text-decoration: underline;
}

.legal-update {
    font-size: 0.9rem;
    color: var(--text-light);
    margin-top: 40px;
    padding-top: 20px;
    border-top: 1px solid var(--border-color);
}

/* ============================================
   Footer
   ============================================ */
.footer {
    background-color: var(--primary-dark);
    color: var(--white);
    padding: 60px 0 30px;
}

.footer-grid {
    display: grid;
    grid-template-columns: 2fr 1fr 1fr 1fr;
    gap: 40px;
    margin-bottom: 40px;
}

.footer-brand {
    margin-bottom: 20px;
}

.footer-brand .logo-text {
    color: var(--white);
    font-size: 1.25rem;
}

.footer-brand p {
    font-size: 0.9rem;
    opacity: 0.8;
    line-height: 1.7;
    margin-top: 15px;
}

.footer-column h4 {
    font-size: 1rem;
    font-weight: 600;
    margin-bottom: 20px;
    color: var(--white);
}

.footer-links {
    list-style: none;
}

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

.footer-links a {
    font-size: 0.9rem;
    opacity: 0.8;
    transition: var(--transition);
}

.footer-links a:hover {
    opacity: 1;
    color: var(--white);
}

.footer-contact p {
    font-size: 0.9rem;
    opacity: 0.8;
    margin-bottom: 10px;
    line-height: 1.6;
}

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

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

.footer-copyright {
    font-size: 0.85rem;
    opacity: 0.7;
}

/* ============================================
   Cookie Consent Banner
   ============================================ */
.cookie-banner {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    background-color: var(--white);
    box-shadow: 0 -4px 20px rgba(0, 0, 0, 0.15);
    z-index: 9999;
    padding: 20px;
    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;
    flex-wrap: wrap;
    gap: 20px;
    align-items: center;
    justify-content: space-between;
}

.cookie-banner-text {
    flex: 1;
    min-width: 300px;
}

.cookie-banner-text p {
    font-size: 0.9rem;
    color: var(--text-color);
    line-height: 1.6;
}

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

.cookie-banner-buttons {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
}

.cookie-banner-buttons .btn {
    padding: 10px 20px;
    font-size: 0.9rem;
}

/* 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;
}

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

.cookie-modal-content {
    background-color: var(--white);
    max-width: 500px;
    width: 90%;
    max-height: 80vh;
    overflow-y: auto;
    border-radius: 12px;
    padding: 30px;
}

.cookie-modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
}

.cookie-modal-header h3 {
    font-size: 1.25rem;
    color: var(--primary-color);
}

.cookie-modal-close {
    background: none;
    border: none;
    font-size: 1.5rem;
    cursor: pointer;
    color: var(--text-light);
}

.cookie-category {
    margin-bottom: 20px;
    padding-bottom: 20px;
    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: 10px;
}

.cookie-category-header h4 {
    font-size: 1rem;
    color: var(--text-color);
}

.cookie-category-header label {
    position: relative;
    display: inline-block;
    width: 50px;
    height: 26px;
}

.cookie-category-header input {
    opacity: 0;
    width: 0;
    height: 0;
}

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

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

.cookie-category-header input:checked + .cookie-slider {
    background-color: var(--primary-color);
}

.cookie-category-header input:checked + .cookie-slider::before {
    transform: translateX(24px);
}

.cookie-category-header input:disabled + .cookie-slider {
    background-color: var(--primary-color);
    opacity: 0.6;
    cursor: not-allowed;
}

.cookie-category p {
    font-size: 0.9rem;
    color: var(--text-light);
    line-height: 1.6;
}

/* ============================================
   Responsive Design
   ============================================ */
@media (max-width: 1024px) {
    .footer-grid {
        grid-template-columns: 1fr 1fr;
    }
    
    .contact-grid {
        grid-template-columns: 1fr;
    }
    
    .about-content {
        grid-template-columns: 1fr;
    }
    
    .service-detail {
        grid-template-columns: 1fr;
    }
    
    .service-detail:nth-child(even) {
        direction: ltr;
    }
}

@media (max-width: 768px) {
    :root {
        --header-height: 70px;
    }
    
    .nav-menu {
        display: none;
        position: absolute;
        top: var(--header-height);
        left: 0;
        right: 0;
        background-color: var(--white);
        flex-direction: column;
        padding: 20px;
        box-shadow: var(--shadow);
        gap: 0;
    }
    
    .nav-menu.active {
        display: flex;
    }
    
    .nav-menu a {
        padding: 15px 0;
        border-bottom: 1px solid var(--border-color);
    }
    
    .mobile-menu-toggle {
        display: flex;
    }
    
    .hero-title {
        font-size: 2rem;
    }
    
    .hero-subtitle {
        font-size: 1rem;
    }
    
    .section {
        padding: 60px 0;
    }
    
    .section-title {
        font-size: 1.75rem;
    }
    
    .footer-grid {
        grid-template-columns: 1fr;
        gap: 30px;
    }
    
    .form-container {
        padding: 25px;
    }
    
    .cookie-banner-content {
        flex-direction: column;
        text-align: center;
    }
    
    .cookie-banner-buttons {
        width: 100%;
        justify-content: center;
    }
}

@media (max-width: 480px) {
    .hero-title {
        font-size: 1.75rem;
    }
    
    .hero-cta {
        flex-direction: column;
        width: 100%;
    }
    
    .btn {
        width: 100%;
    }
    
    .services-grid {
        grid-template-columns: 1fr;
    }
    
    .features-grid {
        grid-template-columns: 1fr;
    }
}

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

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

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

.mt-1 { margin-top: 10px; }
.mt-2 { margin-top: 20px; }
.mt-3 { margin-top: 30px; }
.mt-4 { margin-top: 40px; }

.mb-1 { margin-bottom: 10px; }
.mb-2 { margin-bottom: 20px; }
.mb-3 { margin-bottom: 30px; }
.mb-4 { margin-bottom: 40px; }

.hidden {
    display: none !important;
}

.visually-hidden {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

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

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