/* ========================================
   日本語変換ツール - Japanese Conversion Tools
   Theme: Traditional Japanese Aesthetics
   ======================================== */

:root {
    --primary-red: #C41E3A;
    --primary-white: #FFFFFF;
    --secondary-cream: #FDF5E6;
    --accent-gold: #D4AF37;
    --text-dark: #2C2C2C;
    --text-light: #666666;
    --border-light: #E8E0D5;
    --shadow-soft: rgba(0, 0, 0, 0.08);
    --shadow-medium: rgba(0, 0, 0, 0.12);
    --gradient-warm: linear-gradient(135deg, #C41E3A 0%, #8B0000 100%);
    --font-ja: 'Noto Sans JP', 'Hiragino Kaku Gothic ProN', 'Yu Gothic', sans-serif;
    --font-body: 'Noto Sans JP', sans-serif;
    --transition-smooth: all 0.3s ease;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: var(--font-body);
    color: var(--text-dark);
    background-color: var(--secondary-cream);
    line-height: 1.8;
    min-height: 100vh;
}

/* ========================================
   Typography
   ======================================== */
h1, h2, h3, h4, h5, h6 {
    font-weight: 700;
    line-height: 1.4;
    margin-bottom: 1rem;
}

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

p { margin-bottom: 1rem; }

a {
    color: var(--primary-red);
    text-decoration: none;
    transition: var(--transition-smooth);
}

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

/* ========================================
   Header & Navigation
   ======================================== */
header {
    background: var(--primary-white);
    box-shadow: 0 2px 10px var(--shadow-soft);
    position: sticky;
    top: 0;
    z-index: 1000;
}

.header-top {
    background: var(--gradient-warm);
    padding: 0.5rem 0;
}

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

.header-tagline {
    color: var(--primary-white);
    font-size: 0.85rem;
    letter-spacing: 2px;
}

.header-cta {
    background: var(--primary-white);
    color: var(--primary-red);
    padding: 0.4rem 1rem;
    border-radius: 4px;
    font-weight: 600;
    font-size: 0.85rem;
}

nav {
    background: var(--primary-white);
    border-bottom: 3px solid var(--primary-red);
}

.nav-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 1.5rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    height: 70px;
}

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

.logo::before {
    content: "あ";
    font-size: 2rem;
}

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

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

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

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

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

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

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

/* ========================================
   Hero Section
   ======================================== */
.hero {
    background: linear-gradient(135deg, rgba(196, 30, 58, 0.95) 0%, rgba(139, 0, 0, 0.95) 100%),
                url('https://images.unsplash.com/photo-1493976040374-85c8e12f0c0e?w=1200') center/cover;
    color: var(--primary-white);
    padding: 5rem 0;
    text-align: center;
    position: relative;
    overflow: hidden;
}

.hero::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: url("data:image/svg+xml,%3Csvg width='60' height='60' viewBox='0 0 60 60' xmlns='http://www.w3.org/2000/svg'%3E%3Cg fill='none' fill-rule='evenodd'%3E%3Cg fill='%23ffffff' fill-opacity='0.05'%3E%3Cpath d='M36 34v-4h-2v4h-4v2h4v4h2v-4h4v-2h-4zm0-30V0h-2v4h-4v2h4v4h2V6h4V4h-4zM6 34v-4H4v4H0v2h4v4h2v-4h4v-2H6zM6 4V0H4v4H0v2h4v4h2V6h4V4H6z'/%3E%3C/g%3E%3C/g%3E%3C/svg%3E");
    opacity: 0.5;
}

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

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

.hero p {
    font-size: 1.25rem;
    max-width: 600px;
    margin: 0 auto 2rem;
    opacity: 0.95;
}

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

.btn {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.875rem 2rem;
    border-radius: 50px;
    font-weight: 600;
    font-size: 1rem;
    cursor: pointer;
    border: none;
    transition: var(--transition-smooth);
}

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

.btn-primary:hover {
    background: var(--secondary-cream);
    transform: translateY(-2px);
    box-shadow: 0 5px 20px rgba(0,0,0,0.2);
}

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

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

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

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 1.5rem;
}

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

.section-header h2 {
    color: var(--primary-red);
    position: relative;
    display: inline-block;
}

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

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

/* ========================================
   Cards & Grid
   ======================================== */
.grid {
    display: grid;
    gap: 1.5rem;
}

.grid-2 { grid-template-columns: repeat(2, 1fr); }
.grid-3 { grid-template-columns: repeat(3, 1fr); }
.grid-4 { grid-template-columns: repeat(4, 1fr); }

.card {
    background: var(--primary-white);
    border-radius: 12px;
    padding: 1.5rem;
    box-shadow: 0 3px 15px var(--shadow-soft);
    transition: var(--transition-smooth);
    border: 1px solid var(--border-light);
}

.card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 30px var(--shadow-medium);
    border-color: var(--primary-red);
}

.card-icon {
    width: 60px;
    height: 60px;
    background: linear-gradient(135deg, var(--primary-red) 0%, #8B0000 100%);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.75rem;
    margin-bottom: 1rem;
}

.card h3 {
    color: var(--text-dark);
    font-size: 1.25rem;
    margin-bottom: 0.75rem;
}

.card p {
    color: var(--text-light);
    font-size: 0.95rem;
    margin-bottom: 1rem;
}

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

.card-link::after {
    content: '→';
    transition: var(--transition-smooth);
}

.card-link:hover::after {
    transform: translateX(5px);
}

/* ========================================
   Tools Grid
   ======================================== */
.tool-card {
    display: flex;
    flex-direction: column;
    height: 100%;
}

.tool-card .card-content {
    flex: 1;
}

.tool-category {
    display: inline-block;
    background: var(--secondary-cream);
    color: var(--primary-red);
    padding: 0.25rem 0.75rem;
    border-radius: 20px;
    font-size: 0.75rem;
    font-weight: 600;
    margin-bottom: 0.75rem;
}

/* ========================================
   Article Cards
   ======================================== */
.article-card {
    display: flex;
    flex-direction: column;
}

.article-card img {
    width: 100%;
    height: 180px;
    object-fit: cover;
    border-radius: 8px;
    margin-bottom: 1rem;
}

.article-card .meta {
    color: var(--text-light);
    font-size: 0.85rem;
    margin-bottom: 0.5rem;
}

.article-card h3 {
    font-size: 1.1rem;
    margin-bottom: 0.5rem;
}

.article-card h3 a {
    color: var(--text-dark);
}

.article-card h3 a:hover {
    color: var(--primary-red);
}

/* ========================================
   Tool Page Specific
   ======================================== */
.tool-page {
    background: var(--primary-white);
    padding: 2rem;
    border-radius: 12px;
    margin-bottom: 2rem;
}

.tool-input {
    width: 100%;
    padding: 1rem;
    border: 2px solid var(--border-light);
    border-radius: 8px;
    font-size: 1rem;
    font-family: var(--font-body);
    transition: var(--transition-smooth);
    resize: vertical;
    min-height: 150px;
}

.tool-input:focus {
    outline: none;
    border-color: var(--primary-red);
    box-shadow: 0 0 0 3px rgba(196, 30, 58, 0.1);
}

.tool-output {
    background: var(--secondary-cream);
    padding: 1rem;
    border-radius: 8px;
    min-height: 150px;
    border: 2px solid var(--border-light);
    white-space: pre-wrap;
    word-wrap: break-word;
}

.tool-controls {
    display: flex;
    gap: 1rem;
    margin: 1rem 0;
    flex-wrap: wrap;
}

.btn-tool {
    background: var(--primary-red);
    color: var(--primary-white);
    padding: 0.75rem 1.5rem;
    border: none;
    border-radius: 8px;
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition-smooth);
}

.btn-tool:hover {
    background: #A01830;
    transform: translateY(-2px);
}

.btn-tool.secondary {
    background: var(--text-light);
}

.btn-tool.secondary:hover {
    background: var(--text-dark);
}

/* Select dropdowns */
select.tool-select {
    padding: 0.75rem 1rem;
    border: 2px solid var(--border-light);
    border-radius: 8px;
    font-size: 1rem;
    background: var(--primary-white);
    cursor: pointer;
    min-width: 150px;
}

select.tool-select:focus {
    outline: none;
    border-color: var(--primary-red);
}

/* ========================================
   Tabs
   ======================================== */
.tabs {
    display: flex;
    gap: 0;
    border-bottom: 2px solid var(--border-light);
    margin-bottom: 1.5rem;
}

.tab-btn {
    padding: 1rem 1.5rem;
    background: transparent;
    border: none;
    font-size: 1rem;
    font-weight: 500;
    color: var(--text-light);
    cursor: pointer;
    position: relative;
    transition: var(--transition-smooth);
}

.tab-btn.active {
    color: var(--primary-red);
}

.tab-btn::after {
    content: '';
    position: absolute;
    bottom: -2px;
    left: 0;
    right: 0;
    height: 3px;
    background: var(--primary-red);
    transform: scaleX(0);
    transition: var(--transition-smooth);
}

.tab-btn.active::after,
.tab-btn:hover::after {
    transform: scaleX(1);
}

.tab-content {
    display: none;
}

.tab-content.active {
    display: block;
}

/* ========================================
   Footer
   ======================================== */
footer {
    background: var(--text-dark);
    color: var(--primary-white);
    padding: 3rem 0 1rem;
}

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

.footer-about h4 {
    font-size: 1.25rem;
    margin-bottom: 1rem;
}

.footer-about p {
    color: rgba(255,255,255,0.7);
    font-size: 0.95rem;
}

.footer-links h5 {
    font-size: 1rem;
    margin-bottom: 1rem;
    color: var(--accent-gold);
}

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

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

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

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

.footer-bottom {
    border-top: 1px solid rgba(255,255,255,0.1);
    padding-top: 1.5rem;
    text-align: center;
    color: rgba(255,255,255,0.5);
    font-size: 0.9rem;
}

/* ========================================
   Forms
   ======================================== */
.form-group {
    margin-bottom: 1.5rem;
}

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

.form-input {
    width: 100%;
    padding: 0.875rem 1rem;
    border: 2px solid var(--border-light);
    border-radius: 8px;
    font-size: 1rem;
    font-family: var(--font-body);
    transition: var(--transition-smooth);
}

.form-input:focus {
    outline: none;
    border-color: var(--primary-red);
    box-shadow: 0 0 0 3px rgba(196, 30, 58, 0.1);
}

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

/* ========================================
   Page Headers
   ======================================== */
.page-header {
    background: linear-gradient(135deg, rgba(196, 30, 58, 0.9) 0%, rgba(139, 0, 0, 0.9) 100%);
    color: var(--primary-white);
    padding: 3rem 0;
    text-align: center;
}

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

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

.breadcrumb {
    padding: 1rem 0;
    font-size: 0.9rem;
}

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

.breadcrumb span {
    color: var(--text-light);
    margin: 0 0.5rem;
}

/* ========================================
   404 Page
   ======================================== */
.error-page {
    text-align: center;
    padding: 5rem 1rem;
}

.error-code {
    font-size: 8rem;
    font-weight: 800;
    color: var(--primary-red);
    line-height: 1;
}

.error-page h2 {
    margin-bottom: 1rem;
}

.error-page p {
    color: var(--text-light);
    margin-bottom: 2rem;
}

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

.about-image {
    border-radius: 12px;
    overflow: hidden;
}

.about-image img {
    width: 100%;
    height: auto;
}

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

.value-card {
    text-align: center;
    padding: 2rem;
    background: var(--primary-white);
    border-radius: 12px;
    border: 1px solid var(--border-light);
}

.value-icon {
    font-size: 3rem;
    margin-bottom: 1rem;
}

/* ========================================
   Legal Pages
   ======================================== */
.legal-content {
    background: var(--primary-white);
    padding: 2rem;
    border-radius: 12px;
    max-width: 800px;
    margin: 0 auto;
}

.legal-content h2 {
    color: var(--primary-red);
    margin-top: 2rem;
    padding-top: 1rem;
    border-top: 1px solid var(--border-light);
}

.legal-content h2:first-child {
    margin-top: 0;
    padding-top: 0;
    border-top: none;
}

/* ========================================
   Sidebar
   ======================================== */
.content-with-sidebar {
    display: grid;
    grid-template-columns: 1fr 300px;
    gap: 2rem;
}

.sidebar {
    position: sticky;
    top: 100px;
    height: fit-content;
}

.sidebar-widget {
    background: var(--primary-white);
    border-radius: 12px;
    padding: 1.5rem;
    margin-bottom: 1.5rem;
    border: 1px solid var(--border-light);
}

.sidebar-widget h4 {
    color: var(--primary-red);
    margin-bottom: 1rem;
    padding-bottom: 0.5rem;
    border-bottom: 2px solid var(--accent-gold);
}

.sidebar-widget ul {
    list-style: none;
}

.sidebar-widget li {
    margin-bottom: 0.75rem;
    padding-bottom: 0.75rem;
    border-bottom: 1px solid var(--border-light);
}

.sidebar-widget li:last-child {
    border-bottom: none;
    margin-bottom: 0;
    padding-bottom: 0;
}

/* ========================================
   Pagination
   ======================================== */
.pagination {
    display: flex;
    justify-content: center;
    gap: 0.5rem;
    margin-top: 2rem;
}

.pagination a {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    border-radius: 8px;
    background: var(--primary-white);
    color: var(--text-dark);
    font-weight: 600;
    border: 1px solid var(--border-light);
    transition: var(--transition-smooth);
}

.pagination a:hover,
.pagination a.active {
    background: var(--primary-red);
    color: var(--primary-white);
    border-color: var(--primary-red);
}

/* ========================================
   JSON-LD Schema
   ======================================== */
.schema-markdown {
    background: var(--text-dark);
    color: #f8f8f2;
    padding: 1.5rem;
    border-radius: 8px;
    overflow-x: auto;
    font-family: 'Monaco', 'Consolas', monospace;
    font-size: 0.85rem;
    margin: 1rem 0;
}

/* ========================================
   Utility Classes
   ======================================== */
.text-center { text-align: center; }
.text-right { text-align: right; }
.mt-1 { margin-top: 1rem; }
.mt-2 { margin-top: 2rem; }
.mb-1 { margin-bottom: 1rem; }
.mb-2 { margin-bottom: 2rem; }
.hidden { display: none; }
.flex { display: flex; }
.flex-wrap { flex-wrap: wrap; }
.gap-1 { gap: 1rem; }
.gap-2 { gap: 2rem; }

/* ========================================
   Responsive Design
   ======================================== */
@media (max-width: 1024px) {
    .grid-4 { grid-template-columns: repeat(3, 1fr); }
    .footer-grid { grid-template-columns: repeat(2, 1fr); }
    .about-content { grid-template-columns: 1fr; }
    .content-with-sidebar { grid-template-columns: 1fr; }
    .sidebar { position: static; }
}

@media (max-width: 768px) {
    h1 { font-size: 2rem; }
    h2 { font-size: 1.5rem; }
    
    .nav-links {
        display: none;
        position: absolute;
        top: 70px;
        left: 0;
        right: 0;
        background: var(--primary-white);
        flex-direction: column;
        padding: 1rem;
        gap: 0;
        box-shadow: 0 5px 15px var(--shadow-medium);
    }
    
    .nav-links.active {
        display: flex;
    }
    
    .nav-links li {
        padding: 0.75rem 0;
        border-bottom: 1px solid var(--border-light);
    }
    
    .menu-toggle {
        display: flex;
    }
    
    .grid-2, .grid-3, .grid-4 {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .hero h1 { font-size: 2rem; }
    .hero p { font-size: 1rem; }
    
    .footer-grid {
        grid-template-columns: 1fr;
        text-align: center;
    }
    
    .values-grid {
        grid-template-columns: 1fr;
    }
    
    .tool-controls {
        flex-direction: column;
    }
    
    select.tool-select {
        width: 100%;
    }
}

@media (max-width: 480px) {
    .container { padding: 0 1rem; }
    
    .grid-2, .grid-3, .grid-4 {
        grid-template-columns: 1fr;
    }
    
    .section { padding: 2rem 0; }
    
    .tool-page { padding: 1rem; }
    
    .hero { padding: 3rem 0; }
    
    .btn {
        padding: 0.75rem 1.5rem;
        font-size: 0.9rem;
    }
}

/* ========================================
   Animations
   ======================================== */
@keyframes fadeIn {
    from { opacity: 0; transform: translateY(20px); }
    to { opacity: 1; transform: translateY(0); }
}

.fade-in {
    animation: fadeIn 0.5s ease forwards;
}

@keyframes pulse {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.05); }
}

.pulse {
    animation: pulse 2s ease-in-out infinite;
}

/* ========================================
   Print Styles
   ======================================== */
@media print {
    header, footer, .sidebar, .breadcrumb {
        display: none;
    }
    
    body {
        background: white;
        color: black;
    }
    
    .card {
        box-shadow: none;
        border: 1px solid #ddd;
    }
}
