/*
Theme Name: Clend Theme
Theme URI: https://icoalert.com/
Author: AI Assistant
Description: Official WordPress Theme for Clend Japan
Version: 1.0.0
Text Domain: clend
*/

:root {
    --color-primary: #0A1C3A; /* Navy */
    --color-secondary: #D4AF37; /* Gold */
    --color-text-main: #0A1C3A;
    --color-text-muted: #4A4A4A;
    --color-bg-light: #F7F9FC;
    --color-bg-white: #FFFFFF;
    --color-border: #E5E7EB;
    
    --font-sans: 'Noto Sans JP', 'Inter', sans-serif;
}

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

body {
    font-family: var(--font-sans);
    color: var(--color-text-main);
    line-height: 1.6;
    background-color: var(--color-bg-light);
}

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

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

ul {
    list-style: none;
}

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

/* Header & buttons are styled in styles-lp.css */

/* Main Layout */
.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 40px 20px;
}

.site-content {
    display: flex;
    gap: 40px;
}

.main-content {
    flex: 1;
    background: var(--color-bg-white);
    padding: 40px;
    border-radius: 12px;
    box-shadow: 0 4px 20px rgba(0,0,0,0.03);
}

/* Blog Posts Loop */
.post-card {
    margin-bottom: 40px;
    padding-bottom: 40px;
    border-bottom: 1px solid var(--color-border);
}

.post-card:last-child {
    border-bottom: none;
    margin-bottom: 0;
    padding-bottom: 0;
}

.post-title {
    font-size: 24px;
    margin-bottom: 10px;
}

.post-title a {
    color: var(--color-primary);
}

.post-meta {
    font-size: 14px;
    color: var(--color-text-muted);
    margin-bottom: 20px;
}

.post-excerpt {
    margin-bottom: 20px;
}

.read-more {
    font-weight: 600;
}

/* Single Post Content */
.single-post-title {
    font-size: 32px;
    margin-bottom: 20px;
    color: var(--color-primary);
}

.entry-content h2 {
    font-size: 24px;
    margin: 40px 0 20px;
    padding: 16px 20px;
    background: #f8fafc;
    border-left: 5px solid var(--color-primary);
    color: var(--color-primary);
    font-weight: 700;
}

.entry-content h3 {
    font-size: 20px;
    margin: 30px 0 15px;
    color: var(--color-text-main);
}

.entry-content p {
    margin-bottom: 20px;
}

.entry-content ul {
    list-style: disc;
    margin: 0 0 20px 0;
    padding-left: 24px;
}

.entry-content ol {
    list-style: decimal;
    margin: 0 0 20px 0;
    padding-left: 24px;
}

/* Footer is styled in styles-lp.css */

/* Responsive Utilities */
body {
    word-break: break-word;
    overflow-wrap: anywhere;
}

.featured-card {
    display: flex;
    gap: 30px;
    background: white;
    border-radius: 16px;
    overflow: hidden;
    box-shadow: 0 4px 20px rgba(0,0,0,0.03);
}

.featured-img {
    flex: 0 0 50%;
    min-height: 240px;
}

.featured-content {
    padding: 30px 30px 30px 0;
    flex: 1;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.posts-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 24px;
    margin-bottom: 40px;
}

.post-card {
    background: white;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 4px 15px rgba(0,0,0,0.03);
    display: flex;
    flex-direction: column;
    height: 100%;
}

.post-img {
    height: 140px;
    position: relative;
}

.post-img a {
    display: block;
    width: 100%;
    height: 100%;
}

.post-img img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.post-img .badge {
    position: absolute;
    bottom: -12px;
    left: 16px;
    padding: 4px 10px;
    background: #FEF3C7;
    color: #D97706;
    font-size: 11px;
    font-weight: 700;
    border-radius: 4px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.post-content {
    padding: 24px 16px 16px;
    display: flex;
    flex-direction: column;
    flex: 1;
}

.post-content h4 {
    font-size: 16px;
    font-weight: 700;
    margin-bottom: 10px;
    line-height: 1.4;
}

.post-content h4 a {
    color: var(--color-primary);
    text-decoration: none;
}

.post-content .excerpt {
    color: var(--color-text-muted);
    font-size: 12px;
    margin-bottom: 15px;
    line-height: 1.5;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.post-content .meta {
    display: flex;
    justify-content: space-between;
    color: #888;
    font-size: 12px;
    margin-top: auto;
}

@media (max-width: 768px) {
    .featured-card {
        flex-direction: column;
        gap: 0;
    }
    
    .featured-img {
        flex: none;
        width: 100%;
        min-height: 200px;
    }
    
    .featured-content {
        padding: 20px;
    }
    
    .posts-grid {
        grid-template-columns: 1fr;
    }
}
/* Category Pills */
.category-pills-wrap {
    position: relative;
    max-width: 100%;
}
.swipe-hint {
    display: none;
}
@media (max-width: 768px) {
    .swipe-hint {
        display: block;
        text-align: right;
        font-size: 11px;
        font-weight: 500;
        color: #64748b;
        margin-bottom: 8px;
        animation: pulseFade 2s infinite;
    }
    @keyframes pulseFade {
        0%, 100% { opacity: 0.6; }
        50% { opacity: 1; }
    }
    .category-pills-wrap::after {
        content: '';
        position: absolute;
        bottom: 0;
        right: -20px;
        width: 40px;
        height: 40px;
        background: linear-gradient(to right, rgba(248,250,252,0) 0%, rgba(248,250,252,0.9) 100%);
        pointer-events: none;
    }
}
.category-pills {
    display: flex;
    justify-content: flex-start;
    gap: 8px;
    flex-wrap: nowrap;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    padding-bottom: 8px;
    scrollbar-width: none;
    -ms-overflow-style: none;
}
.category-pills::-webkit-scrollbar {
    display: none;
}
.category-pills .pill {
    white-space: nowrap;
    padding: 6px 18px;
    font-size: 13px;
    font-weight: 600;
    border-radius: 20px;
    text-decoration: none;
    border: 1px solid var(--color-border);
    background: white;
    color: var(--color-text-muted);
    box-shadow: 0 2px 8px rgba(0,0,0,0.02);
    flex-shrink: 0;
    transition: all 0.2s;
}
.category-pills .pill.active {
    background: var(--color-secondary);
    color: white;
    border-color: transparent;
}

.single-main-content {
    background: white;
    border-radius: 20px;
    box-shadow: 0 10px 40px rgba(10,28,58,0.06);
    padding: 50px;
    border: 1px solid rgba(0,0,0,0.04);
}

/* Responsive */
@media (max-width: 768px) {
    .site-content {
        flex-direction: column;
    }
    
    .main-nav {
        display: none;
    }
    
    .main-content, .single-main-content {
        padding: 20px;
    }
}

/* Additional Blog Content Styles */
.entry-content {
    font-size: 17px;
    line-height: 1.9;
    color: #334155;
}

.entry-content p {
    margin-bottom: 28px;
}

.entry-content a {
    color: #0056b3;
    text-decoration: underline;
}

.entry-content a:hover {
    color: #004494;
}



.entry-content img {
    border: none !important;
    box-shadow: none !important;
    background: transparent !important;
    padding: 0 !important;
}

.entry-content h3 {
    font-size: 22px;
    font-weight: 700;
    color: var(--color-primary);
    margin: 40px 0 20px;
    padding-bottom: 10px;
    border-bottom: 2px solid #E2E8F0;
    position: relative;
}

.entry-content h3::after {
    content: '';
    position: absolute;
    bottom: -2px;
    left: 0;
    width: 60px;
    height: 2px;
    background: var(--color-secondary);
}

.entry-content h4 {
    font-size: 19px;
    font-weight: 700;
    color: var(--color-primary);
    margin: 32px 0 16px;
    padding-left: 14px;
    border-left: 4px solid var(--color-secondary);
}

.entry-content ul, .entry-content ol {
    margin: 0 0 32px 0;
    padding-left: 24px;
}

.entry-content li {
    margin-bottom: 10px;
}
.entry-content blockquote {
    margin: 30px 0;
    padding: 20px 30px;
    border-left: 4px solid var(--color-secondary);
    background: var(--color-bg-white);
    border-radius: 0 12px 12px 0;
    font-style: italic;
    color: var(--color-text-muted);
}

.entry-content table {
    width: 100%;
    border-collapse: collapse;
    margin: 30px 0;
    background: var(--color-bg-white);
}

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

.entry-content th {
    background-color: var(--color-primary);
    color: white;
}

.entry-content figure {
    margin: 30px 0;
    text-align: center;
}

.entry-content figcaption {
    font-size: 14px;
    color: var(--color-text-muted);
    margin-top: 10px;
}

/* Pagination */
.nav-links {
    display: flex;
    justify-content: center;
    gap: 10px;
    margin-top: 50px;
}

.page-numbers {
    display: inline-block;
    padding: 10px 15px;
    background: var(--color-bg-white);
    border: 1px solid var(--color-border);
    border-radius: 8px;
    color: var(--color-text-main);
    transition: all 0.2s;
}

.page-numbers.current,
.page-numbers:hover {
    background: var(--color-primary);
    color: white;
    border-color: var(--color-primary);
}

/* ==========================================================================
   Shortcode Styles
   ========================================================================== */

/* 1. FAQ */
.clend-faq {
    margin: 30px 0;
    border: 1px solid var(--color-border);
    border-radius: 12px;
    background: #fff;
    overflow: hidden;
    box-shadow: 0 4px 12px rgba(0,0,0,0.02);
}
.clend-faq .faq-q {
    background: #F8FAFC;
    padding: 16px 20px;
    display: flex;
    align-items: center;
    gap: 12px;
    font-weight: 700;
    color: var(--color-primary);
    border-bottom: 1px solid var(--color-border);
}
.clend-faq .faq-q .icon {
    background: var(--color-primary);
    color: #fff;
    width: 28px;
    height: 28px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 14px;
    flex-shrink: 0;
}
.clend-faq .faq-a {
    padding: 20px;
    display: flex;
    gap: 12px;
    color: var(--color-text-main);
    line-height: 1.7;
}
.clend-faq .faq-a .icon {
    background: var(--color-secondary);
    color: #fff;
    width: 28px;
    height: 28px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 14px;
    font-weight: 700;
    flex-shrink: 0;
}
.clend-faq .faq-a .text {
    flex: 1;
}

/* 2. CTA Block */
.clend-cta-box {
    margin: 40px 0;
    padding: 40px;
    background: linear-gradient(135deg, #F1F5F9 0%, #E2E8F0 100%);
    border-radius: 16px;
    text-align: left;
    border: 1px solid #CBD5E1;
}

/* 3. CTA Button */
.clend-btn-wrap {
    text-align: center;
    margin: 30px 0;
}
.clend-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 16px 48px;
    background: var(--color-secondary);
    color: #fff !important;
    font-size: 18px;
    font-weight: 800;
    border-radius: 30px;
    text-decoration: none !important;
    box-shadow: 0 4px 15px rgba(217, 119, 6, 0.3);
    transition: all 0.2s;
}
.clend-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(217, 119, 6, 0.4);
    background: #e67e22;
}

/* 4. Gray Box */
.clend-gray-box {
    margin: 30px 0;
    padding: 24px;
    background: #F8FAFC;
    border: 1px solid #E2E8F0;
    border-radius: 8px;
    color: #475569;
    line-height: 1.8;
}

/* 5. Spoiler (Accordion) */
.clend-spoiler {
    margin: 30px 0;
    border: 1px solid var(--color-border);
    border-radius: 8px;
    overflow: hidden;
}
.clend-spoiler summary {
    background: #F8FAFC;
    padding: 16px 20px;
    font-weight: 700;
    color: var(--color-primary);
    cursor: pointer;
    list-style: none;
    display: flex;
    justify-content: space-between;
    align-items: center;
}
.clend-spoiler summary::-webkit-details-marker {
    display: none;
}
.clend-spoiler summary .spoiler-icon::after {
    content: '+';
    font-size: 20px;
    font-weight: 400;
}
.clend-spoiler[open] summary .spoiler-icon::after {
    content: '-';
}
.clend-spoiler .spoiler-content {
    padding: 20px;
    border-top: 1px solid var(--color-border);
    background: #fff;
}

/* 6. Pros / Cons Boxes */
.clend-pros, .clend-cons {
    margin: 30px 0;
    border-radius: 12px;
    padding: 24px 30px;
}
.clend-pros {
    border: 1px solid #dcfce7;
    background: #f0fdf4;
}
.clend-cons {
    border: 1px solid #ffe4e6;
    background: #fff1f2;
}
.clend-pros .pros-title, .clend-cons .cons-title {
    font-weight: 700;
    font-size: 18px;
    margin-bottom: 20px;
    color: var(--color-text-main);
}
.clend-pros .pros-list, .clend-cons .cons-list {
    margin: 0;
    padding: 0;
    list-style: none;
}
.clend-pros .pros-list li, .clend-cons .cons-list li {
    margin-bottom: 16px;
    display: flex;
    gap: 12px;
    align-items: flex-start;
    line-height: 1.7;
    color: var(--color-text-main);
}
.clend-pros .pros-list li:last-child, .clend-cons .cons-list li:last-child {
    margin-bottom: 0;
}
.clend-pros .pros-list li .icon, .clend-cons .cons-list li .icon {
    width: 20px;
    height: 20px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    margin-top: 4px;
    position: relative;
}
.clend-pros .pros-list li .icon.check {
    background: #a7f3d0;
}
.clend-pros .pros-list li .icon.check::after {
    content: '';
    width: 5px;
    height: 9px;
    border-right: 2px solid #047857;
    border-bottom: 2px solid #047857;
    transform: rotate(45deg);
    margin-bottom: 2px;
}
.clend-cons .cons-list li .icon.cross {
    background: #fecdd3;
}
.clend-cons .cons-list li .icon.cross::after, .clend-cons .cons-list li .icon.cross::before {
    content: '';
    position: absolute;
    width: 10px;
    height: 2px;
    background: #be123c;
}
.clend-cons .cons-list li .icon.cross::after {
    transform: rotate(45deg);
}
.clend-cons .cons-list li .icon.cross::before {
    transform: rotate(-45deg);
}
.clend-pros .pros-list li .text, .clend-cons .cons-list li .text {
    flex: 1;
}

/* 8. Table Wrap & Native Tables */
.clend-table-wrap, .wp-block-table {
    width: 100%;
    overflow-x: auto;
    margin: 30px 0;
}
.clend-table-wrap table, .wp-block-table table, .entry-content table {
    width: 100%;
    border-collapse: collapse;
    min-width: 500px;
    background: #fff;
    margin: 0;
}
.clend-table-wrap th, .clend-table-wrap td, .wp-block-table th, .wp-block-table td, .entry-content table th, .entry-content table td {
    border: 1px solid var(--color-border);
    padding: 16px 20px;
    text-align: left;
    line-height: 1.6;
}
.clend-table-wrap th, .wp-block-table th, .entry-content table th {
    background: #F1F5F9;
    color: var(--color-primary);
    font-weight: 700;
}
.clend-table-wrap tr:nth-child(even) td, .wp-block-table tr:nth-child(even) td, .entry-content table tr:nth-child(even) td {
    background: #F8FAFC;
}
