/* common.css - 3hweb Mini Apps */

:root {
    --app-primary: #1e3a8a;
    --app-accent: #c9a84c;
    --app-text: #0f172a;
    --app-text-muted: #64748b;
    --app-bg: #ffffff;
    --app-card-bg: #ffffff;
    --app-border: #e2e8f0;
    --app-radius: 12px;
    --app-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
}

body {
    margin: 0;
    padding: 0;
    font-family: 'Inter', 'Noto Sans JP', sans-serif;
    color: var(--app-text);
    background-color: #ffffff;
    line-height: 1.6;
    overflow-x: hidden;
}

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

.apps-container {
    width: 100%;
    max-width: 1100px;
    margin: 0 auto;
    padding: 0 20px;
    box-sizing: border-box;
}

.app-block {
    margin-bottom: 0;
    padding: 6rem 0;
    border-bottom: 1px solid var(--app-border);
}

/* Visual Separation with clearly distinct backgrounds */
.app-block:nth-child(even) {
    background-color: #f1f5f9; /* Slate 100 - more visible than 50 */
}
.app-block:nth-child(odd) {
    background-color: #ffffff;
}
.app-block.app-availability {
    background-color: #fffbeb; /* Amber 50 - warmer for prominence */
}

.app-block-inner {
    width: 100%;
    max-width: 900px;
    margin: 0 auto;
    padding: 0 20px;
    box-sizing: border-box;
    display: block;
}

.app-title {
    font-size: 2rem;
    font-weight: 800;
    margin-bottom: 1.5rem;
    color: var(--app-primary);
    position: relative;
    padding-bottom: 1rem;
}

.app-title::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 60px;
    height: 4px;
    background: var(--app-accent);
    border-radius: 2px;
}

/* Header & Back Button */
.demo-header-actions {
    margin-top: 2rem;
    display: flex;
    justify-content: center;
    gap: 1rem;
}

.btn-back {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.75rem 1.5rem;
    background: #1e293b;
    color: #fff;
    text-decoration: none;
    border-radius: 999px;
    font-weight: 600;
    transition: all 0.2s;
}

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

.btn-admin-demo {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.75rem 2rem;
    background: var(--app-accent);
    color: #1a1a1a;
    text-decoration: none;
    border-radius: 999px;
    font-weight: 800;
    transition: all 0.2s;
    box-shadow: 0 4px 15px rgba(201, 168, 76, 0.3);
}

.btn-admin-demo:hover {
    background: #d4b55e;
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(201, 168, 76, 0.4);
}

/* Footer Sync (styles used in index.html) */
.footer {
    background-color: #0f172a;
    color: #94a3b8;
    padding: 4rem 0 2rem;
    font-size: 0.9375rem;
}

.footer-grid {
    display: grid;
    grid-template-columns: 1.5fr repeat(3, 1fr);
    gap: 3rem;
    margin-bottom: 3rem;
    max-width: 1100px;
    margin-left: auto;
    margin-right: auto;
    padding: 0 1.5rem;
}

.footer-logo {
    font-size: 1.5rem;
    font-weight: 700;
    color: #fff;
    text-decoration: none;
    display: block;
    margin-bottom: 1rem;
}

.footer-tagline {
    line-height: 1.6;
}

.footer-col-title {
    color: #fff;
    font-size: 1rem;
    font-weight: 700;
    margin-bottom: 1.5rem;
}

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

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

.footer-links a {
    color: inherit;
    text-decoration: none;
    transition: color 0.2s;
}

.footer-links a:hover {
    color: #fff;
}

.footer-address {
    font-style: normal;
    line-height: 1.6;
}

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

@media (max-width: 1100px) {
    .container, .apps-container, .app-block-inner {
        padding: 0 1.25rem;
    }
}

@media (max-width: 768px) {
    .footer-grid {
        grid-template-columns: 1fr 1fr;
        gap: 2rem;
    }
}

@media (max-width: 480px) {
    .footer-grid {
        grid-template-columns: 1fr;
    }
}

/* --- Hero Section (Optimized) --- */
.demo-intro {
    text-align: center;
    padding: 80px 20px;
    background-color: #0f172a;
    background-image: 
        radial-gradient(at 0% 0%, hsla(253,16%,7%,1) 0, transparent 50%), 
        radial-gradient(at 50% 0%, hsla(225,39%,30%,1) 0, transparent 20%), 
        radial-gradient(at 100% 0%, hsla(339,49%,30%,1) 0, transparent 50%);
    color: #ffffff;
}

.demo-title {
    font-size: clamp(2rem, 8vw, 3.5rem);
    margin: 0 0 1rem 0;
    font-weight: 900;
    color: #ffffff;
    line-height: 1.1;
    text-shadow: 0 4px 12px rgba(0,0,0,0.5);
}

.demo-subtitle {
    max-width: 800px;
    margin: 0 auto 2.5rem auto;
    color: #94a3b8;
    line-height: 1.6;
    font-size: clamp(1rem, 4vw, 1.2rem);
    font-weight: 500;
}

/* Base Card structure */
.card {
    background: var(--app-card-bg);
    border: 1px solid var(--app-border);
    border-radius: var(--app-radius);
    padding: 1.25rem;
}

/* --- News --- */
.news-list {
    list-style: none;
    padding: 0;
    margin: 0;
}
.news-item {
    padding: 1rem 0;
    border-bottom: 1px dashed var(--app-border);
}
.news-item:last-child { border-bottom: none; }
.news-meta {
    font-size: 0.875rem;
    color: var(--app-text-muted);
    margin-bottom: 0.25rem;
}
.news-title {
    font-weight: 600;
    font-size: 1.1rem;
    margin-bottom: 0.5rem;
}
.news-desc {
    font-size: 0.95rem;
    color: #4b5563;
    line-height: 1.6;
}
.btn-more {
    appearance: none;
    border: 1px solid var(--app-primary);
    background: #fff;
    color: var(--app-primary);
    padding: 0.5rem 1.5rem;
    border-radius: 999px;
    cursor: pointer;
    transition: all 0.2s;
    font-size: 0.9rem;
}
.btn-more:hover {
    background: var(--app-primary);
    color: #fff;
}

/* --- FAQ --- */
.faq-list {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}
.faq-item {
    border: 1px solid var(--app-border);
    border-radius: var(--app-radius);
    overflow: hidden;
    background: var(--app-bg);
}
.faq-q {
    width: 100%;
    text-align: left;
    background: #f8fafc;
    border: none;
    padding: 1rem 1.25rem;
    font-size: 1.05rem;
    font-weight: 600;
    cursor: pointer;
    display: flex;
    justify-content: space-between;
    align-items: center;
    color: var(--app-text);
}
.faq-q:hover { background: #f1f5f9; }
.faq-icon {
    font-size: 1.2rem;
    transition: transform 0.3s;
}
.faq-item.open .faq-icon { transform: rotate(45deg); }
.faq-a {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.3s ease;
    background: var(--app-bg);
}
.faq-a-content {
    padding: 1rem 1.25rem;
    color: #374151;
    line-height: 1.6;
    border-top: 1px dashed var(--app-border);
}

/* --- Voice --- */
.voice-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 1.5rem;
}
.voice-card {
    background: var(--app-bg);
    border: 1px solid var(--app-border);
    border-radius: var(--app-radius);
    padding: 1.5rem;
    box-shadow: 0 1px 3px rgba(0,0,0,0.05);
}
.voice-desc {
    font-size: 0.95rem;
    font-style: italic;
    color: #374151;
    margin-bottom: 1rem;
    line-height: 1.6;
}
.voice-name {
    font-weight: 600;
    text-align: right;
    color: var(--app-primary);
}

/* --- Works --- */
.works-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 1.5rem;
}
.works-card {
    background: var(--app-bg);
    border: 1px solid var(--app-border);
    border-radius: var(--app-radius);
    overflow: hidden;
}
.works-img-wrap {
    width: 100%;
    aspect-ratio: 16/9;
    background: #e2e8f0;
}
.works-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}
.works-info {
    padding: 1rem;
}
.works-card-title {
    font-size: 1.1rem;
    margin: 0 0 0.5rem 0;
}
.works-date {
    font-size: 0.8rem;
    color: var(--app-text-muted);
    margin-bottom: 0.5rem;
}
.works-desc {
    font-size: 0.9rem;
    color: #4b5563;
    line-height: 1.5;
}

/* --- Availability --- */
.availability-table-wrap {
    overflow-x: auto;
    border: 1px solid var(--app-border);
    border-radius: var(--app-radius);
    background: var(--app-bg);
}
.availability-table {
    width: 100%;
    border-collapse: collapse;
    min-width: 500px;
}
.availability-table th, .availability-table td {
    padding: 0.75rem 1rem;
    border-bottom: 1px solid var(--app-border);
    text-align: left;
}
.availability-table th { background: #f8fafc; font-weight: 600; }
.availability-table tr:last-child td { border-bottom: none; }
.avail-status { font-weight: 700; }
.color-green { color: #16a34a; }
.color-red { color: #dc2626; }
.color-orange { color: #d97706; }

/* --- Articles --- */
.articles-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 1rem;
}
.article-card {
    display: block;
    text-decoration: none;
    color: inherit;
    background: var(--app-card-bg);
    border: 1px solid var(--app-border);
    border-radius: var(--app-radius);
    padding: 1.25rem;
    transition: transform 0.2s;
}
.article-card:hover { transform: translateY(-2px); border-color: var(--app-primary); }
.article-title { margin: 0 0 0.25rem 0; font-size: 1.1rem; color: var(--app-primary); }
.article-date { font-size: 0.8rem; color: var(--app-text-muted); margin-bottom: 0.5rem; }
.article-desc { margin: 0; font-size: 0.9rem; line-height: 1.5; color: #4b5563; }

/* --- SNS --- */
.sns-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 1.5rem;
}
.sns-card {
    background: #fff;
    border-radius: var(--app-radius);
    overflow: hidden;
    padding: 0.5rem;
    display: flex;
    justify-content: center;
}
.sns-card iframe { max-width: 100% !important; }

/* Utilities */
.hidden { display: none !important; }

/* Utilities */
.hidden { display: none !important; }
