/* TiptapEditor Content Styles */

/* Event Detail Content & Supporter Profile Content */
.event-detail-content,
.supporter-profile-content {
    font-family: 'Noto Sans JP', sans-serif;
}

.event-detail-content h1,
.supporter-profile-content h1 {
    font-family: 'Noto Sans JP', sans-serif;
    font-size: 32px;
    font-weight: 400;
    color: #000000;
    line-height: 1.4;
    margin-bottom: 16px;
    margin-top: 0;
}

.event-detail-content h2,
.supporter-profile-content h2 {
    font-family: 'Noto Sans JP', sans-serif;
    font-size: 28px;
    font-weight: 700;
    color: #000000;
    letter-spacing: 2.24px;
    line-height: 1.7;
    margin-bottom: 16px;
}

.event-detail-content h3,
.supporter-profile-content h3 {
    font-family: 'Noto Sans JP', sans-serif;
    font-size: 24px;
    font-weight: 700;
    color: #000000;
    letter-spacing: 1.92px;
    line-height: 1.7;
    margin-bottom: 16px;
}

.event-detail-content h4,
.supporter-profile-content h4 {
    font-family: 'Noto Sans JP', sans-serif;
    font-size: 20px;
    font-weight: 700;
    color: #000000;
    letter-spacing: 1.6px;
    line-height: 1.7;
    margin-bottom: 12px;
}

.event-detail-content h5,
.supporter-profile-content h5 {
    font-family: 'Noto Sans JP', sans-serif;
    font-size: 18px;
    font-weight: 700;
    color: #000000;
    letter-spacing: 1.44px;
    line-height: 1.7;
    margin-bottom: 12px;
}

.event-detail-content h6,
.supporter-profile-content h6 {
    font-family: 'Noto Sans JP', sans-serif;
    font-size: 18px;
    font-weight: 700;
    color: #000000;
    letter-spacing: 1.44px;
    line-height: 1.7;
    margin-bottom: 8px;
}

.event-detail-content p,
.supporter-profile-content p {
    font-family: 'Noto Sans JP', sans-serif;
    font-size: 16px;
    font-weight: 400;
    color: #000000;
    line-height: 1.8;
    margin-bottom: 16px;
}

/* News Detail Content */
.news-detail-content {
    font-family: 'Noto Sans JP', sans-serif;
}

.news-detail-content h1 {
    font-family: 'Noto Sans JP', sans-serif;
    font-size: 32px;
    font-weight: 400;
    color: #000000;
    line-height: 1.4;
    margin-bottom: 16px;
    margin-top: 0;
}

.news-detail-content h2 {
    font-family: 'Noto Sans JP', sans-serif;
    font-size: 28px;
    font-weight: 700;
    color: #000000;
    letter-spacing: 2.24px;
    line-height: 1.7;
    margin-bottom: 16px;
}

.news-detail-content h3 {
    font-family: 'Noto Sans JP', sans-serif;
    font-size: 24px;
    font-weight: 700;
    color: #000000;
    letter-spacing: 1.92px;
    line-height: 1.7;
    margin-bottom: 16px;
}

.news-detail-content h4 {
    font-family: 'Noto Sans JP', sans-serif;
    font-size: 20px;
    font-weight: 700;
    color: #000000;
    letter-spacing: 1.6px;
    line-height: 1.7;
    margin-bottom: 12px;
}

.news-detail-content h5 {
    font-family: 'Noto Sans JP', sans-serif;
    font-size: 18px;
    font-weight: 700;
    color: #000000;
    letter-spacing: 1.44px;
    line-height: 1.7;
    margin-bottom: 12px;
}

.news-detail-content h6 {
    font-family: 'Noto Sans JP', sans-serif;
    font-size: 18px;
    font-weight: 700;
    color: #000000;
    letter-spacing: 1.44px;
    line-height: 1.7;
    margin-bottom: 8px;
}

.news-detail-content p {
    font-family: 'Noto Sans JP', sans-serif;
    font-size: 16px;
    font-weight: 400;
    color: #000000;
    line-height: 2;
    margin-bottom: 16px;
}

/* Responsive Design */
@media (min-width: 768px) {
    .event-detail-content h1,
    .news-detail-content h1,
    .supporter-profile-content h1 {
        font-size: 40px;
        margin-bottom: 24px;
    }

    .event-detail-content h2,
    .news-detail-content h2,
    .supporter-profile-content h2 {
        font-size: 32px;
        letter-spacing: 2.56px;
        margin-bottom: 24px;
    }

    .event-detail-content h3,
    .news-detail-content h3,
    .supporter-profile-content h3 {
        font-size: 28px;
        letter-spacing: 2.24px;
        margin-bottom: 20px;
    }

    .event-detail-content h4,
    .news-detail-content h4,
    .supporter-profile-content h4 {
        font-size: 24px;
        letter-spacing: 1.92px;
        margin-bottom: 16px;
    }

    .event-detail-content h5,
    .news-detail-content h5,
    .supporter-profile-content h5 {
        font-size: 20px;
        letter-spacing: 1.6px;
    }

    .event-detail-content h6,
    .news-detail-content h6,
    .supporter-profile-content h6 {
        margin-bottom: 12px;
    }

    .event-detail-content p,
    .supporter-profile-content p {
        font-size: 18px;
        line-height: 2;
        margin-bottom: 24px;
    }

    .news-detail-content p {
        margin-bottom: 24px;
    }
}

/* Common Content Elements */

/* Images */
.event-detail-content img,
.news-detail-content img,
.supporter-profile-content img {
    border-radius: 8px;
    max-width: 100%;
    height: auto;
    margin: 24px auto;
    display: block;
    box-shadow: 0px 4px 8px 0px rgba(0,0,0,0.1);
}

/* Links */
.event-detail-content a[data-as-button="true"],
.news-detail-content a[data-as-button="true"],
.supporter-profile-content a[data-as-button="true"] {
    display: inline-block;
    background-color: #ee1c25;
    color: white;
    padding: 12px 24px;
    border-radius: 8px;
    font-weight: 700;
    font-size: 14px;
    letter-spacing: 1.4px;
    line-height: 1.4;
    text-decoration: none;
    transition: background-color 0.2s ease-in-out;
    margin: 16px 0;
    font-family: 'Noto Sans JP', sans-serif;
    cursor: pointer;
}

.event-detail-content a[data-as-button="true"]:hover,
.news-detail-content a[data-as-button="true"]:hover,
.supporter-profile-content a[data-as-button="true"]:hover {
    background-color: #c70010;
}

.event-detail-content a[data-as-button="false"],
.event-detail-content a:not([data-as-button]),
.news-detail-content a[data-as-button="false"],
.news-detail-content a:not([data-as-button]),
.supporter-profile-content a[data-as-button="false"],
.supporter-profile-content a:not([data-as-button]) {
    color: #ee1c25;
    text-decoration: underline;
    font-weight: 400;
    font-family: 'Noto Sans JP', sans-serif;
    cursor: pointer;
}

.event-detail-content a[data-as-button="false"]:hover,
.event-detail-content a:not([data-as-button]):hover,
.news-detail-content a[data-as-button="false"]:hover,
.news-detail-content a:not([data-as-button]):hover,
.supporter-profile-content a[data-as-button="false"]:hover,
.supporter-profile-content a:not([data-as-button]):hover {
    color: #c70010;
}

/* Tables */
.event-detail-content table,
.news-detail-content table,
.supporter-profile-content table {
    width: 100%;
    border-collapse: collapse;
    margin-bottom: 24px;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0px 2px 8px 0px rgba(0,0,0,0.1);
}

.event-detail-content th,
.news-detail-content th,
.supporter-profile-content th {
    background-color: #f5f5f5;
    border: 1px solid #dee2e6;
    padding: 12px 16px;
    font-size: 14px;
    font-weight: 700;
    color: #000000;
    text-align: left;
    font-family: 'Noto Sans JP', sans-serif;
}

.event-detail-content td,
.news-detail-content td,
.supporter-profile-content td {
    border: 1px solid #dee2e6;
    padding: 12px 16px;
    font-size: 14px;
    font-weight: 400;
    color: #000000;
    font-family: 'Noto Sans JP', sans-serif;
}

.event-detail-content th p,
.event-detail-content td p,
.news-detail-content th p,
.news-detail-content td p,
.supporter-profile-content th p,
.supporter-profile-content td p {
    margin-bottom: 4px;
}

.event-detail-content th p,
.news-detail-content th p,
.supporter-profile-content th p {
    font-weight: 700;
}

/* Lists */
.event-detail-content ul,
.news-detail-content ul,
.supporter-profile-content ul {
    font-family: 'Noto Sans JP', sans-serif;
    font-size: 16px;
    font-weight: 400;
    color: #000000;
    line-height: 1.8;
    list-style-type: disc;
    padding-left: 24px;
    margin-bottom: 16px;
}

.event-detail-content ol,
.news-detail-content ol,
.supporter-profile-content ol {
    font-family: 'Noto Sans JP', sans-serif;
    font-size: 16px;
    font-weight: 400;
    color: #000000;
    line-height: 1.8;
    list-style-type: decimal;
    padding-left: 24px;
    margin-bottom: 16px;
}

.event-detail-content li,
.news-detail-content li,
.supporter-profile-content li {
    margin-bottom: 8px;
}

/* Text Formatting */
.event-detail-content strong,
.news-detail-content strong,
.supporter-profile-content strong {
    font-weight: 700;
}

.event-detail-content em,
.news-detail-content em,
.supporter-profile-content em {
    font-style: italic;
}

.event-detail-content code,
.news-detail-content code,
.supporter-profile-content code {
    background-color: #f1f1f1;
    padding: 2px 4px;
    border-radius: 4px;
    font-size: 14px;
    font-family: monospace;
}

.event-detail-content pre,
.news-detail-content pre,
.supporter-profile-content pre {
    background-color: #f1f1f1;
    padding: 16px;
    border-radius: 8px;
    overflow-x: auto;
    margin-bottom: 16px;
}

.event-detail-content pre code,
.news-detail-content pre code,
.supporter-profile-content pre code {
    background-color: transparent;
    padding: 0;
}

.event-detail-content blockquote,
.news-detail-content blockquote,
.supporter-profile-content blockquote {
    border-left: 4px solid #cccccc;
    padding-left: 16px;
    font-style: italic;
    color: #666666;
    margin-bottom: 16px;
}

/* Grid Layout for TiptapEditor */
.event-detail-content .filament-tiptap-grid-builder,
.news-detail-content .filament-tiptap-grid-builder,
.supporter-profile-content .filament-tiptap-grid-builder {
    display: grid;
    gap: 16px;
    margin-bottom: 24px;
}

.event-detail-content .filament-tiptap-grid-builder .filament-tiptap-grid-builder__column,
.news-detail-content .filament-tiptap-grid-builder .filament-tiptap-grid-builder__column,
.supporter-profile-content .filament-tiptap-grid-builder .filament-tiptap-grid-builder__column {
    background-color: white;
    padding: 16px;
    border-radius: 8px;
    box-shadow: 0px 2px 8px 0px rgba(0,0,0,0.05);
}

/* Video Embed */
.event-detail-content .responsive,
.news-detail-content .responsive,
.supporter-profile-content .responsive {
    position: relative;
    width: 100%;
    margin-bottom: 24px;
    border-radius: 8px;
    overflow: hidden;
}

.event-detail-content .responsive iframe,
.news-detail-content .responsive iframe,
.supporter-profile-content .responsive iframe {
    width: 100%;
    height: auto;
    border-radius: 8px;
}

/* Text wrapping */
.event-detail-content h1,
.event-detail-content h2,
.event-detail-content h3,
.event-detail-content h4,
.event-detail-content h5,
.event-detail-content h6,
.news-detail-content h1,
.news-detail-content h2,
.news-detail-content h3,
.news-detail-content h4,
.news-detail-content h5,
.news-detail-content h6,
.supporter-profile-content h1,
.supporter-profile-content h2,
.supporter-profile-content h3,
.supporter-profile-content h4,
.supporter-profile-content h5,
.supporter-profile-content h6 {
    word-break: break-word;
    overflow-wrap: break-word;
    hyphens: auto;
}

.event-detail-content p,
.event-detail-content div,
.news-detail-content p,
.news-detail-content div,
.supporter-profile-content p,
.supporter-profile-content div {
    word-break: break-word;
    overflow-wrap: break-word;
}

/* Video responsive wrapper for iframes */
.supporter-profile-content .video-responsive,
.event-detail-content .video-responsive,
.news-detail-content .video-responsive {
    position: relative;
    width: 100%;
    padding-bottom: 56.25%; /* 16:9 aspect ratio */
    margin-bottom: 24px;
    overflow: hidden;
    border-radius: 8px;
    background-color: #000;
}

.supporter-profile-content .video-responsive iframe,
.event-detail-content .video-responsive iframe,
.news-detail-content .video-responsive iframe {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    border: 0;
    border-radius: 8px;
}

/* Auto-detect and make iframes responsive */
.supporter-profile-content iframe:not(.non-responsive):not(.video-responsive iframe),
.event-detail-content iframe:not(.non-responsive):not(.video-responsive iframe),
.news-detail-content iframe:not(.non-responsive):not(.video-responsive iframe) {
    max-width: 100%;
    width: 100%;
    height: auto;
    min-height: 300px;
    aspect-ratio: 16/9;
    border-radius: 8px;
    margin: 24px auto;
    display: block;
    box-shadow: 0px 4px 8px 0px rgba(0,0,0,0.1);
}

/* For small screens, ensure iframes don't cause horizontal scrolling */
@media (max-width: 767px) {
    .supporter-profile-content iframe:not(.non-responsive):not(.video-responsive iframe),
    .event-detail-content iframe:not(.non-responsive):not(.video-responsive iframe),
    .news-detail-content iframe:not(.non-responsive):not(.video-responsive iframe) {
        min-height: 200px;
        margin: 16px auto;
    }
}

/* Responsive Design for Additional Elements */
@media (min-width: 768px) {
    .event-detail-content img,
    .news-detail-content img,
    .supporter-profile-content img {
        margin: 32px auto;
    }

    .event-detail-content a[data-as-button="true"],
    .news-detail-content a[data-as-button="true"],
    .supporter-profile-content a[data-as-button="true"] {
        padding: 16px 32px;
        font-size: 16px;
        letter-spacing: 1.6px;
        margin: 24px 0;
    }

    .event-detail-content table,
    .news-detail-content table,
    .supporter-profile-content table {
        margin-bottom: 32px;
    }

    .event-detail-content th,
    .news-detail-content th,
    .supporter-profile-content th {
        padding: 16px 24px;
        font-size: 16px;
    }

    .event-detail-content td,
    .news-detail-content td,
    .supporter-profile-content td {
        padding: 16px 24px;
        font-size: 16px;
    }

    .event-detail-content ul,
    .event-detail-content ol,
    .news-detail-content ul,
    .news-detail-content ol,
    .supporter-profile-content ul,
    .supporter-profile-content ol {
        font-size: 18px;
        line-height: 2;
        padding-left: 32px;
        margin-bottom: 24px;
    }

    .event-detail-content .filament-tiptap-grid-builder,
    .news-detail-content .filament-tiptap-grid-builder,
    .supporter-profile-content .filament-tiptap-grid-builder {
        gap: 24px;
        margin-bottom: 32px;
    }

    .event-detail-content .filament-tiptap-grid-builder .filament-tiptap-grid-builder__column,
    .news-detail-content .filament-tiptap-grid-builder .filament-tiptap-grid-builder__column,
    .supporter-profile-content .filament-tiptap-grid-builder .filament-tiptap-grid-builder__column {
        padding: 24px;
    }

    .event-detail-content .responsive,
    .news-detail-content .responsive,
    .supporter-profile-content .responsive {
        margin-bottom: 32px;
    }
}
