/* ========================================
   Mitsubishi UFJ Capital Co., Ltd.
   Main Stylesheet
   ======================================== */

/* CSS Variables */
:root {
    --primary-color: #C8102E;
    --primary-dark: #A00D24;
    --secondary-color: #000000;
    --text-color: #333333;
    --text-light: #666666;
    --background-light: #F8F9FA;
    --background-white: #FFFFFF;
    --border-color: #E0E0E0;
    --success-color: #28A745;
    --error-color: #DC3545;
    --shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    --shadow-lg: 0 4px 20px rgba(0, 0, 0, 0.15);
    --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: 'Hiragino Kaku Gothic Pro', 'Meiryo', 'Noto Sans JP', sans-serif;
    line-height: 1.7;
    color: var(--text-color);
    background-color: var(--background-white);
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

main {
    flex: 1;
}

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

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

ul, ol {
    list-style: none;
}

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

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 20px;
}

/* ========================================
   Header & Navigation
   ======================================== */
.header {
    background-color: var(--background-white);
    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);
    display: flex;
    align-items: center;
    gap: 10px;
}

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

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

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

.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,
.nav-menu a.active::after {
    width: 100%;
}

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

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

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

/* ========================================
   Hero Section
   ======================================== */
.hero {
    background: linear-gradient(135deg, var(--secondary-color) 0%, #1a1a1a 100%);
    color: var(--background-white);
    padding: 140px 0 80px;
    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.2;
}

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

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

.hero h1 {
    color: var(--background-white);
    font-size: 2.8rem;
    margin-bottom: 20px;
}

.hero h1 span {
    color: var(--primary-color);
}

.hero-subtitle {
    font-size: 1.25rem;
    color: rgba(255, 255, 255, 0.9);
    margin-bottom: 30px;
    line-height: 1.8;
}

.hero-description {
    font-size: 1rem;
    color: rgba(255, 255, 255, 0.8);
    margin-bottom: 40px;
}

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

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

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

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

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

.btn-group {
    display: flex;
    gap: 15px;
    flex-wrap: wrap;
}

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

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

.section-header {
    text-align: center;
    margin-bottom: 50px;
}

.section-header h2 {
    margin-bottom: 15px;
    position: relative;
    display: inline-block;
}

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

.section-header p {
    color: var(--text-light);
    font-size: 1.1rem;
    max-width: 600px;
    margin: 20px auto 0;
}

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

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

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

.card-image {
    width: 100%;
    height: 200px;
    object-fit: cover;
}

.card-content {
    padding: 25px;
}

.card-content h3 {
    margin-bottom: 15px;
    font-size: 1.25rem;
}

.card-content p {
    color: var(--text-light);
    margin-bottom: 0;
}

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

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

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

.form-group label .required {
    color: var(--primary-color);
}

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

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

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

.checkbox-group {
    display: flex;
    align-items: flex-start;
    gap: 10px;
}

.checkbox-group input[type="checkbox"] {
    margin-top: 4px;
    width: 18px;
    height: 18px;
    cursor: pointer;
}

.checkbox-group label {
    font-size: 0.9rem;
    color: var(--text-light);
    cursor: pointer;
}

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

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

.form-note {
    text-align: center;
    margin-top: 20px;
    font-size: 0.85rem;
    color: var(--text-light);
}

.form-note a {
    color: var(--primary-color);
}

/* ========================================
   Cookie Banner
   ======================================== */
.cookie-banner {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    background-color: var(--secondary-color);
    color: var(--background-white);
    padding: 20px;
    z-index: 9999;
    transform: translateY(100%);
    transition: transform 0.5s ease;
    box-shadow: 0 -4px 20px rgba(0, 0, 0, 0.2);
}

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

.cookie-content {
    max-width: var(--max-width);
    margin: 0 auto;
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.cookie-text h3 {
    color: var(--background-white);
    margin-bottom: 10px;
    font-size: 1.1rem;
}

.cookie-text p {
    font-size: 0.9rem;
    color: rgba(255, 255, 255, 0.8);
    margin-bottom: 0;
}

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

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

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

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

.btn-cookie:hover {
    background-color: var(--background-light);
}

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

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

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

.btn-reject:hover {
    background-color: rgba(255, 255, 255, 0.1);
}

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

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

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

.cookie-modal-content h3 {
    margin-bottom: 20px;
    color: var(--secondary-color);
}

.cookie-option {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 15px 0;
    border-bottom: 1px solid var(--border-color);
}

.cookie-option:last-of-type {
    border-bottom: none;
}

.cookie-option-info h4 {
    font-size: 1rem;
    margin-bottom: 5px;
}

.cookie-option-info p {
    font-size: 0.85rem;
    color: var(--text-light);
    margin-bottom: 0;
}

.cookie-toggle {
    position: relative;
    width: 50px;
    height: 26px;
}

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

.cookie-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;
}

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

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

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

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

.cookie-modal-buttons {
    display: flex;
    gap: 10px;
    margin-top: 25px;
}

/* ========================================
   Footer
   ======================================== */
.footer {
    background-color: var(--secondary-color);
    color: var(--background-white);
    padding: 60px 0 30px;
    margin-top: auto;
}

.footer-content {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 40px;
    margin-bottom: 40px;
}

.footer-section h4 {
    color: var(--background-white);
    margin-bottom: 20px;
    font-size: 1.1rem;
}

.footer-section p {
    color: rgba(255, 255, 255, 0.7);
    font-size: 0.9rem;
    margin-bottom: 10px;
}

.footer-section a {
    color: rgba(255, 255, 255, 0.7);
    font-size: 0.9rem;
    display: block;
    margin-bottom: 8px;
}

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

.footer-links {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

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

.footer-disclaimer p {
    font-size: 0.85rem;
    color: rgba(255, 255, 255, 0.6);
    text-align: center;
}

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

.footer-bottom p {
    font-size: 0.85rem;
    color: rgba(255, 255, 255, 0.6);
    margin-bottom: 0;
}

/* ========================================
   Page Header (Internal Pages)
   ======================================== */
.page-header {
    background: linear-gradient(135deg, var(--secondary-color) 0%, #1a1a1a 100%);
    color: var(--background-white);
    padding: 120px 0 60px;
    text-align: center;
}

.page-header h1 {
    color: var(--background-white);
    margin-bottom: 15px;
}

.page-header p {
    color: rgba(255, 255, 255, 0.8);
    font-size: 1.1rem;
    max-width: 600px;
    margin: 0 auto;
}

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

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

.about-text h3 {
    margin-bottom: 20px;
    color: var(--primary-color);
}

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

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

.value-card h4 {
    margin-bottom: 15px;
    color: var(--primary-color);
}

/* ========================================
   Services Page
   ======================================== */
.service-card {
    display: grid;
    grid-template-columns: 300px 1fr;
    gap: 30px;
    background-color: var(--background-white);
    border-radius: 8px;
    overflow: hidden;
    box-shadow: var(--shadow);
    margin-bottom: 30px;
}

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

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

.service-card-image {
    width: 100%;
    height: 100%;
    min-height: 250px;
    object-fit: cover;
}

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

.service-card-content h3 {
    margin-bottom: 15px;
    color: var(--primary-color);
}

.service-card-content ul {
    margin-top: 15px;
    padding-left: 20px;
}

.service-card-content li {
    list-style: disc;
    margin-bottom: 8px;
    color: var(--text-light);
}

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

.contact-info h3 {
    margin-bottom: 25px;
    color: var(--primary-color);
}

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

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

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

.contact-item-content p {
    color: var(--text-light);
    margin-bottom: 0;
    font-size: 0.95rem;
}

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

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

/* ========================================
   Legal Pages (Privacy, Terms, etc.)
   ======================================== */
.legal-content {
    max-width: 800px;
    margin: 0 auto;
}

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

.legal-content h3 {
    margin: 30px 0 15px;
    font-size: 1.2rem;
}

.legal-content p {
    margin-bottom: 15px;
    color: var(--text-light);
}

.legal-content ul {
    margin-bottom: 20px;
    padding-left: 30px;
}

.legal-content li {
    list-style: disc;
    margin-bottom: 10px;
    color: var(--text-light);
}

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

/* ========================================
   Accessibility Page
   ======================================== */
.accessibility-content {
    max-width: 800px;
    margin: 0 auto;
}

.accessibility-content h2 {
    margin: 30px 0 20px;
    color: var(--primary-color);
}

.accessibility-content p {
    color: var(--text-light);
    margin-bottom: 15px;
}

.accessibility-content ul {
    padding-left: 30px;
    margin-bottom: 20px;
}

.accessibility-content li {
    list-style: disc;
    margin-bottom: 10px;
    color: var(--text-light);
}

/* ========================================
   Responsive Design
   ======================================== */

/* Tablet */
@media (max-width: 992px) {
    h1 { font-size: 2rem; }
    h2 { font-size: 1.75rem; }
    
    .hero {
        padding: 120px 0 60px;
    }
    
    .hero h1 {
        font-size: 2.2rem;
    }
    
    .about-content {
        grid-template-columns: 1fr;
        gap: 30px;
    }
    
    .service-card {
        grid-template-columns: 1fr;
    }
    
    .service-card:nth-child(even) {
        direction: ltr;
    }
    
    .contact-grid {
        grid-template-columns: 1fr;
        gap: 40px;
    }
}

/* Mobile */
@media (max-width: 768px) {
    :root {
        --header-height: 70px;
    }
    
    h1 { font-size: 1.75rem; }
    h2 { font-size: 1.5rem; }
    h3 { font-size: 1.25rem; }
    
    .section {
        padding: 50px 0;
    }
    
    .nav-menu {
        position: fixed;
        top: var(--header-height);
        left: 0;
        right: 0;
        background-color: var(--background-white);
        flex-direction: column;
        padding: 20px;
        gap: 0;
        box-shadow: var(--shadow);
        display: none;
    }
    
    .nav-menu.active {
        display: flex;
    }
    
    .nav-menu a {
        padding: 15px 0;
        border-bottom: 1px solid var(--border-color);
        width: 100%;
    }
    
    .menu-toggle {
        display: flex;
    }
    
    .hero {
        padding: 100px 0 50px;
        text-align: center;
    }
    
    .hero h1 {
        font-size: 1.8rem;
    }
    
    .hero-subtitle {
        font-size: 1rem;
    }
    
    .btn-group {
        justify-content: center;
    }
    
    .form-container {
        padding: 25px;
    }
    
    .footer-content {
        grid-template-columns: 1fr;
        gap: 30px;
        text-align: center;
    }
    
    .cookie-content {
        text-align: center;
    }
    
    .cookie-buttons {
        justify-content: center;
    }
    
    .cookie-modal-content {
        padding: 20px;
    }
    
    .cookie-option {
        flex-direction: column;
        align-items: flex-start;
        gap: 10px;
    }
    
    .page-header {
        padding: 100px 0 40px;
    }
    
    .values-grid {
        grid-template-columns: 1fr;
    }
}

/* Small Mobile */
@media (max-width: 480px) {
    .container {
        padding: 0 15px;
    }
    
    .btn {
        padding: 12px 24px;
        font-size: 0.9rem;
    }
    
    .hero h1 {
        font-size: 1.5rem;
    }
    
    .section-header p {
        font-size: 1rem;
    }
    
    .card-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; }
.mt-5 { margin-top: 50px; }

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

.py-1 { padding-top: 10px; padding-bottom: 10px; }
.py-2 { padding-top: 20px; padding-bottom: 20px; }
.py-3 { padding-top: 30px; padding-bottom: 30px; }

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

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

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

/* Focus Styles for Accessibility */
a:focus,
button:focus,
input:focus,
select:focus,
textarea:focus {
    outline: 2px solid var(--primary-color);
    outline-offset: 2px;
}

/* Cookie Table Styles */
.cookie-table {
    width: 100%;
    border-collapse: collapse;
    margin: 20px 0 30px;
    font-size: 0.9rem;
}

.cookie-table th,
.cookie-table td {
    padding: 12px 15px;
    text-align: left;
    border: 1px solid var(--border-color);
}

.cookie-table th {
    background-color: var(--primary-color);
    color: var(--background-white);
    font-weight: 600;
}

.cookie-table tr:nth-child(even) {
    background-color: var(--background-light);
}

.cookie-table tr:hover {
    background-color: rgba(200, 16, 46, 0.05);
}

/* Print Styles */
@media print {
    .header,
    .footer,
    .cookie-banner,
    .cookie-modal {
        display: none;
    }
    
    .hero {
        padding: 20px 0;
        background: none;
        color: var(--text-color);
    }
    
    .hero h1,
    .hero-subtitle,
    .hero-description {
        color: var(--text-color);
    }
}
