/* MDUC Components CSS - Extracted from inline styles */

/* ===== Welcome Section ===== */
.welcome-message {
    text-align: center;
    padding: 2em;
    background: #FFFBEF;
    border-radius: 16px;
    margin-bottom: 2em;
}

.welcome-message img {
    width: 150px;
    margin-bottom: 1em;
}

.welcome-message h2 {
    font-size: 2em;
    color: #F39800;
}

.welcome-message p {
    font-size: 1.1em;
    max-width: 800px;
    margin: auto;
}

.quick-links {
    margin-top: 2em;
    display: flex;
    gap: 1rem;
    justify-content: center;
}

/* ===== Section Layouts ===== */
.section-intro {
    display: flex;
    align-items: flex-start;
    gap: 2.5em;
    flex-wrap: wrap;
    margin-bottom: 2em;
}

.section-intro-content {
    flex: 1;
    min-width: 350px;
}

.section-intro-image {
    flex: 0 0 220px;
    text-align: center;
}

.section-intro-image img {
    width: 220px;
    height: 220px;
    object-fit: contain;
    filter: drop-shadow(0 12px 24px rgba(243, 152, 0, 0.35));
}

.section-intro p {
    color: #F39800;
    font-weight: 600;
    font-size: 1.1em;
    margin: 0.5em 0 1em 0;
}

/* FAQ答の部分は通常の色にする */
.section-intro .faq-item p {
    color: #333;
    font-weight: normal;
    font-size: 1em;
}

/* ===== Step Items ===== */
.step-content h5 {
    margin-top: 1.5em;
}

.step-content h5 strong {
    display: block;
    margin-bottom: 0.5em;
}

/* ===== Contact Section ===== */
.contact-intro {
    display: flex;
    align-items: center;
    gap: 2em;
}

.contact-intro img {
    width: 150px;
}

/* ===== Data Catalog Section ===== */
.data-catalog-placeholder {
    text-align: center;
    padding: 3em;
    background-color: #f9f9f9;
    border-radius: 8px;
}

.data-catalog-placeholder img {
    width: 150px;
    height: 150px;
    margin-bottom: 1em;
}

/* ===== Form Styles ===== */
.contact-form {
    background: linear-gradient(135deg, #fff8f0 0%, #ffffff 100%);
    padding: 3em;
    border-radius: 16px;
    box-shadow: 0 8px 32px rgba(243, 152, 0, 0.15);
    border: 1px solid rgba(243, 152, 0, 0.2);
    max-width: 1000px;
    margin: 0 auto;
}

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

.form-grid-full {
    grid-template-columns: 1fr;
}

.form-label {
    display: flex;
    align-items: center;
    gap: 0.5em;
    color: #F39800;
    font-weight: 600;
    margin-bottom: 0.8em;
}

.form-number {
    display: inline-block;
    width: 24px;
    height: 24px;
    background: #F39800;
    color: white;
    border-radius: 50%;
    text-align: center;
    line-height: 24px;
    font-size: 14px;
}

.form-note {
    font-size: 0.9em;
    color: #666;
    margin-top: 0.5em;
}

.form-submit-container {
    text-align: center;
}

.form-input,
.form-textarea,
.form-select {
    padding: 0.75rem;
    border: 2px solid #E0E0E0;
    border-radius: 8px;
    font-size: 1rem;
    transition: all 0.3s ease;
}

.form-input:focus,
.form-textarea:focus,
.form-select:focus {
    outline: none;
    border-color: #F39800;
    box-shadow: 0 0 0 3px rgba(243, 152, 0, 0.1);
}

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

/* ===== Footer Back Link ===== */
.footer-back-link {
    color: #FF8C00; /* Changed from #F39800 to DarkOrange */
    font-weight: 600;
    text-decoration: none;
    border: 2px solid #FF8C00; /* Changed from #F39800 to DarkOrange */
    padding: 0.5em 1.5em;
    border-radius: 25px;
    transition: all 0.3s ease;
    display: inline-block;
    margin-bottom: 1em;
}

.footer-back-link:hover {
    background: #FFA500; /* Changed from #F39800 to Orange */
    color: white;
}

/* ===== Button Components ===== */
.btn-content {
    display: flex;
    align-items: center;
    gap: 0.5em;
    justify-content: center;
}

.btn-icon {
    width: 20px;
    height: 20px;
}

/* ===== Modal System ===== */
.modal-backdrop {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0,0,0,0.5);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1000;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.modal-content {
    background: white;
    padding: 2em;
    border-radius: 8px;
    max-width: 900px;
    width: 95%;
    max-height: 85vh;
    overflow-y: auto;
    transform: scale(0.9);
    transition: transform 0.3s ease;
}

.modal-backdrop[style*="opacity: 1"] .modal-content {
    transform: scale(1);
}

/* ===== Hero Subtitle ===== */
.hero-sub-title .highlight-underline {
    border-bottom: 2px solid #F39800;
}

/* ===== Step Content Sections ===== */
.step-content .step-subsection {
    margin-top: 1.5em;
}

.step-content .step-note {
    margin-top: 1em;
    font-style: italic;
}

/* ===== Card Important ===== */
.card.important {
    margin-top: 2em;
}

/* ===== Centered Content ===== */
.text-center {
    text-align: center;
}

.margin-center {
    margin: 2em 0;
}

/* ===== FAQ Questions ===== */
.faq-question {
    color: #F39800;
    margin-bottom: 0.5em;
}

/* ===== About Section ===== */
.about-section {
    padding: 2em;
    margin-bottom: 2em;
}

.about-content {
    display: flex;
    align-items: center;
    gap: 2.5em;
    flex-wrap: wrap;
}

.about-text {
    flex: 1;
    min-width: 350px;
}

.about-image {
    flex: 0 0 220px;
    text-align: center;
}

.about-image img {
    width: 220px;
    height: 220px;
    object-fit: contain;
    filter: drop-shadow(0 12px 24px rgba(243, 152, 0, 0.35));
}

/* About Section Mobile */
@media (max-width: 767px) {
    .about-section {
        padding: 1em;
    }
    
    .about-content {
        flex-direction: column;
        gap: 1.5em;
        text-align: center;
    }
    
    .about-text {
        min-width: 100%;
        order: 2;
    }
    
    .about-image {
        flex: 0 0 auto;
        order: 1;
    }
    
    .about-image img {
        width: 150px;
        height: 150px;
    }
}

/* ===== Services Section ===== */
.services-content {
    display: flex;
    align-items: center;
    gap: 2em;
    flex-wrap: wrap;
}

.services-image {
    flex: 0 0 220px;
    text-align: center;
}

.services-text {
    flex: 1;
    min-width: 300px;
}

.services-text h3 {
    color: #F39800;
    margin-top: 0;
}

/* ===== News Section ===== */
.news-content {
    display: flex;
    align-items: center;
    gap: 2.5em;
    flex-wrap: wrap;
    margin-bottom: 2em;
}

.news-text {
    flex: 1;
    min-width: 350px;
}

.news-text h3 {
    margin-top: 0;
    color: #F39800;
}

.news-image {
    flex: 0 0 220px;
    text-align: center;
}

.news-button-container {
    text-align: center;
    margin-top: 2em;
}

/* ===== Companies Section ===== */
.companies-intro {
    display: flex;
    align-items: flex-start;
    gap: 2.5em;
    flex-wrap: wrap;
    margin-bottom: 2em;
}

.companies-image {
    flex: 0 0 220px;
    text-align: center;
}

.companies-text {
    flex: 1;
    min-width: 350px;
}

.companies-note {
    margin-top: 1em;
    font-size: 0.9em;
    color: #666;
}

.companies-description {
    margin-top: 1em;
}

/* ===== Faculty Section ===== */
.faculty-content {
    display: flex;
    align-items: center;
    gap: 2.5em;
    flex-wrap: wrap;
    margin-bottom: 2em;
}

.faculty-text {
    flex: 1;
    min-width: 350px;
}

.faculty-image {
    flex: 0 0 220px;
    text-align: center;
}

/* ===== FAQ Main Section ===== */
.faq-main-content {
    display: flex;
    align-items: flex-start;
    gap: 2.5em;
    flex-wrap: wrap;
}

.faq-text {
    flex: 1;
    min-width: 350px;
}

.faq-text p {
    margin-bottom: 2em;
}

.faq-image {
    flex: 0 0 220px;
    text-align: center;
}

/* ===== Contact Main Section ===== */
.contact-main-content {
    display: flex;
    align-items: flex-start;
    gap: 2.5em;
    margin-bottom: 3em;
}

.contact-main-image {
    width: 220px;
    height: 220px;
    object-fit: contain;
    flex-shrink: 0;
    filter: drop-shadow(0 12px 24px rgba(243, 152, 0, 0.35));
}

.contact-main-text {
    flex: 1;
}

.contact-main-text h2 {
    margin-top: 0.5em;
    margin-bottom: 1em;
}

.contact-main-text p {
    margin: 0;
    font-size: 1.1em;
    line-height: 1.8;
}

/* ===== Form Field Spacing ===== */
.form-group.no-margin {
    margin-bottom: 0;
}

.form-group.large-margin {
    margin-bottom: 2.5em;
}

/* ===== Special Form Labels ===== */
.form-label.secondary {
    color: #666;
}

.form-number.secondary {
    background: #999;
}

/* ===== News Modal ===== */
.news-item {
    margin-bottom: 1em;
    cursor: pointer;
}

.news-item-header {
    display: flex;
    align-items: center;
    gap: 1em;
    margin-bottom: 0.5em;
}

.news-item h3 {
    margin: 0 0 0.5em 0;
    color: #333;
}

.news-item p {
    margin: 0;
    color: #666;
}

/* ===== Large Modal ===== */
.modal-content.large {
    max-width: 1200px;
}

/* ===== Additional Layout Classes ===== */
.flow-header-section {
    color: #F39800;
}

.news-header-section {
    display: flex; 
    align-items: center; 
    gap: 2.5em; 
    flex-wrap: wrap; 
    margin-bottom: 2em;
}

.news-header-title {
    margin-top: 0; 
    color: #F39800;
}

.faculty-header-section {
    display: flex; 
    align-items: center; 
    gap: 2.5em; 
    flex-wrap: wrap; 
    margin-bottom: 2em;
}

.contact-main-text-flex {
    flex: 1;
}

/* ===== Greeting Section ===== */
.greeting-card {
    position: relative;
    overflow: visible;
    padding: 3rem;
    margin-bottom: 2rem;
}

.greeting-content {
    max-width: 900px;
    margin: 0 auto;
}

.greeting-header {
    display: flex;
    align-items: center;
    gap: 2rem;
    margin-bottom: 2rem;
}

.greeting-photo {
    flex-shrink: 0;
}

.greeting-photo img {
    width: 120px;
    height: 120px;
    border-radius: 50%;
    object-fit: cover;
    border: 3px solid #F39800;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
}

.greeting-title {
    flex-grow: 1;
}

.greeting-title h3 {
    font-size: 1.2rem;
    color: #666;
    margin: 0;
    font-weight: normal;
}

.director-name {
    font-size: 2rem;
    font-weight: bold;
    color: #333;
    margin: 0.5rem 0 0 0;
}

.greeting-message {
    line-height: 1.8;
    color: #333;
}

.greeting-message p {
    margin-bottom: 1.2rem;
}

.greeting-message p:last-child {
    margin-bottom: 0;
}

.greeting-mduc-decoration {
    position: absolute;
    bottom: -20px;
    right: 20px;
    width: 100px;
    height: 100px;
}

.greeting-mduc-decoration img {
    width: 100%;
    height: auto;
}

@media (max-width: 768px) {
    .greeting-card {
        padding: 2rem 1.5rem;
        padding-bottom: 3rem;
    }
    
    .greeting-header {
        flex-direction: column;
        text-align: center;
    }
    
    .greeting-photo img {
        width: 100px;
        height: 100px;
    }
    
    .greeting-mduc-decoration {
        width: 80px;
        height: 80px;
        bottom: -10px;
        right: 10px;
    }
}

/* ===== MDUCちゃんメッセージスタイル ===== */
.mduc-message {
    font-family: 'Kiwi Maru', 'Noto Sans JP', sans-serif;
    font-weight: 500;
    font-size: 1.3em;
    line-height: 1.8;
    color: #F39800;
    margin: 0;
    padding: 0.5em 0;
}

/* ===== MDUCちゃんとの会話レイアウト ===== */
.mduc-speech-container {
    display: flex;
    align-items: center;
    gap: 1.5em;
    margin: 2em 0;
}

.mduc-speech-image {
    flex: 0 0 180px;
}

.mduc-speech-image img {
    width: 180px;
    height: 180px;
    object-fit: contain;
    filter: drop-shadow(0 8px 16px rgba(243, 152, 0, 0.25));
}

.mduc-speech-content {
    flex: 1;
    min-width: 0;
    word-wrap: break-word;
    overflow-wrap: break-word;
}

/* 逆向きレイアウト（画像が右） */
.mduc-speech-container.reverse {
    flex-direction: row-reverse;
}

.mduc-speech-container.reverse .mduc-speech-content {
    text-align: right;
}

/* ===== FAQ チャット形式スタイル ===== */
.faq-chat-container {
    max-width: 800px;
    margin: 0 auto;
    padding: 2em 0;
}

.faq-chat-item {
    margin-bottom: 3em;
}

.faq-question-container {
    display: flex;
    align-items: flex-start;
    gap: 1.5em;
    margin-bottom: 1.5em;
    justify-content: flex-end;
}

.faq-question-bubble {
    background: #FFF8F0;
    border: 2px solid #F39800;
    border-radius: 20px;
    padding: 1.2em 1em;
    max-width: 70%;
    position: relative;
    font-weight: 600;
    color: #F39800;
}

.faq-question-bubble::before {
    content: '';
    position: absolute;
    right: -20px;
    top: 50%;
    transform: translateY(-50%);
    width: 0;
    height: 0;
    border-style: solid;
    border-width: 15px 0 15px 20px;
    border-color: transparent transparent transparent #F39800;
}

.faq-question-bubble::after {
    content: '';
    position: absolute;
    right: -16px;
    top: 50%;
    transform: translateY(-50%);
    width: 0;
    height: 0;
    border-style: solid;
    border-width: 13px 0 13px 18px;
    border-color: transparent transparent transparent #FFF8F0;
}

.faq-user-icon {
    width: 50px;
    height: 50px;
    background: #F39800;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-weight: bold;
    font-size: 1.2em;
    flex-shrink: 0;
}

.faq-answer-container {
    display: flex;
    align-items: flex-start;
    gap: 1.5em;
    justify-content: flex-start;
}

.faq-mduc-image {
    width: 100px;
    height: 100px;
    flex-shrink: 0;
    order: -1;
}

.faq-mduc-image img,
.faq-mduc-image picture {
    width: 100%;
    height: 100%;
    object-fit: contain;
    filter: drop-shadow(0 4px 8px rgba(243, 152, 0, 0.2));
}

.faq-mduc-image picture {
    display: block;
}

.faq-answer-text {
    font-family: 'Kiwi Maru', 'Noto Sans JP', sans-serif;
    font-weight: 500;
    color: #F39800;
    line-height: 1.7;
    margin: 0;
    padding: 0.5em 0;
    flex: 1;
    display: flex;
    align-items: center;
}

/* ===== Responsive Overrides ===== */
@media (max-width: 767px) {
    .section-intro {
        flex-direction: column;
        gap: 1.5em;
    }
    
    .section-intro-content {
        min-width: 100%;
        text-align: center;
        word-wrap: break-word;
        overflow-wrap: break-word;
        hyphens: auto;
    }
    
    .section-intro-content p {
        line-height: 1.7;
        margin-bottom: 1em;
        text-align: left;
        word-break: keep-all;
        overflow-wrap: anywhere;
    }
    
    .section-intro-image {
        flex: 1 1 auto;
        width: 100%;
        max-width: 200px;
        margin: 0 auto;
    }
    
    .section-intro-image img {
        width: 150px;
        height: 150px;
    }
    
    .form-grid {
        grid-template-columns: 1fr;
        gap: 1em;
    }
    
    .contact-form {
        padding: 1.5em;
    }
    
    .contact-intro {
        flex-direction: column;
        text-align: center;
    }
    
    .contact-intro img {
        width: 120px;
        margin: 0 auto 1rem;
    }
    
    /* MDUCちゃんメッセージレスポンシブ */
    .mduc-speech-container {
        flex-direction: column;
        align-items: center;
        text-align: center;
        gap: 1em;
    }
    
    .mduc-speech-container.reverse {
        flex-direction: column;
    }
    
    .mduc-speech-container.reverse .mduc-speech-content {
        text-align: center;
    }
    
    .mduc-speech-image {
        flex: 0 0 120px;
    }
    
    .mduc-speech-image img {
        width: 120px;
        height: 120px;
    }
    
    .mduc-message {
        font-size: 1.1em;
        text-align: center;
        word-wrap: break-word;
        overflow-wrap: break-word;
        line-height: 1.7;
        hyphens: auto;
    }
    
    /* FAQ チャットレスポンシブ */
    .faq-question-container {
        gap: 1em;
        flex-direction: row-reverse;
        align-items: flex-start;
        justify-content: flex-start;
    }
    
    .faq-question-bubble {
        max-width: calc(100% - 50px);
        font-size: 0.95em;
        word-wrap: break-word;
        overflow-wrap: break-word;
        hyphens: auto;
        line-height: 1.6;
        text-align: left;
    }
    
    .faq-question-bubble::before,
    .faq-question-bubble::after {
        display: none;
    }
    
    .faq-answer-text {
        font-size: 0.95em;
        word-wrap: break-word;
        overflow-wrap: break-word;
        line-height: 1.7;
        text-align: left;
        hyphens: auto;
        flex: 1;
        display: flex;
        align-items: center;
        padding: 0;
    }
    
    .faq-user-icon {
        width: 40px;
        height: 40px;
        font-size: 1em;
        order: 0;
    }
    
    .faq-mduc-image {
        width: 60px;
        height: 60px;
        order: -1;
    }
    
    .faq-answer-container {
        gap: 1em;
        flex-direction: row;
        align-items: flex-start;
        text-align: left;
        justify-content: flex-start;
    }
    
    .faq-chat-container {
        padding: 1em 0.5em;
    }
    
    .faq-chat-item {
        margin-bottom: 2.5em;
    }
}

/* ===== Hero Combined Panel ===== */
.hero-combined-panel {
    display: block;
    position: relative;
    max-width: 1200px;
    margin: 0 auto;
    padding: 2.5em;
    background-color: rgba(255, 255, 255, 0.7) !important;
    backdrop-filter: blur(10px);
    min-height: 450px;
}

.hero-title-section {
    margin-right: 420px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    height: 450px;
}

.hero-main-title {
    font-family: 'Kiwi Maru', 'Noto Sans JP', sans-serif !important;
    font-weight: 500;
    font-size: 3em !important;
    color: #F39800 !important;
    margin-bottom: 0.8em;
    line-height: 1.2;
}

.hero-sub-title {
    font-family: 'Kiwi Maru', 'Noto Sans JP', sans-serif;
    font-weight: 400;
    color: #666;
    margin-bottom: 0.5em;
}

.hero-mduc-note {
    font-family: 'Kiwi Maru', 'Noto Sans JP', sans-serif;
    font-weight: 500;
    font-size: 1.1em;
    color: #F39800;
    margin: 0.5em 0 0 0;
    text-align: right;
}

.hero-mascot-section {
    position: absolute;
    top: 50%;
    right: 1em;
    transform: translateY(-50%);
    width: 400px;
    height: 400px;
}

/* MDUCちゃんホバーアニメーション */
.mduc-flipper {
    position: relative;
    width: 100%;
    height: 100%;
    transition: transform 0.6s;
    transform-style: preserve-3d;
}

.hero-mascot-section:hover .mduc-flipper {
    transform: rotateY(180deg);
}

.mduc-front, .mduc-back {
    position: absolute;
    width: 100%;
    height: 100%;
    backface-visibility: hidden;
}

.mduc-back {
    transform: rotateY(180deg);
}

.hero-mduc-chan {
    width: 100%;
    height: 100%;
    object-fit: contain;
    filter: drop-shadow(0 8px 16px rgba(243, 152, 0, 0.25));
}

/* レスポンシブ対応 */
@media (max-width: 767px) {
    .hero-combined-panel {
        padding: 1.5em;
        min-height: auto;
        text-align: center;
        display: flex;
        flex-direction: column;
        align-items: center;
        gap: 1.5em;
    }
    
    .hero-title-section {
        margin-right: 0;
        margin-bottom: 0;
        height: auto;
        text-align: center;
    }
    
    .hero-main-title {
        font-size: 2.2em !important;
        margin-bottom: 0.5em;
    }
    
    .hero-mduc-note {
        text-align: center;
        font-size: 1em;
    }
    
    .hero-mascot-section {
        position: relative;
        top: auto;
        right: auto;
        transform: none;
        width: 200px;
        height: 200px;
        margin: 0 auto;
    }
    
    .hero-mascot-section:hover .mduc-flipper {
        transform: rotateY(180deg);
    }
}

.footer-mduc-section {
    position: relative;
    z-index: 10;
}

/* ===== Login Notice ===== */
.login-notice {
    margin-top: 2em;
    padding: 1.5em;
    background-color: #FFF3E0;
    border: 2px solid #FF6B6B;
    border-radius: 12px;
    text-align: center;
    max-width: 500px;
    margin-left: auto;
    margin-right: auto;
}

.login-notice h2 {
    color: #FF6B6B;
    font-size: 1.5em;
    margin-bottom: 0.5em;
    font-weight: bold;
}

.login-notice p {
    color: #666;
    margin: 0.5em 0;
    line-height: 1.6;
}

.login-notice p:last-child {
    margin-bottom: 0;
}

/* ===== Checklist Style ===== */
.checklist-container {
    margin: 1rem 0;
}

.fee-table-container {
    display: flex;
    justify-content: center;
}


.checklist-item {
    display: flex;
    align-items: flex-start;
    gap: 0.75rem;
    margin-bottom: 0.75rem;
    padding: 0.5rem 0;
}

.checklist-icon {
    flex-shrink: 0;
    width: 24px;
    height: 24px;
    background: #4CAF50;
    color: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 14px;
    font-weight: bold;
    margin-top: 0.1rem;
}

.checklist-text {
    flex: 1;
    line-height: 1.6;
    color: #333;
}

/* ===== Enhanced Step Subsection ===== */
.step-subsection {
    background: #f8f9fa;
    border-left: 4px solid #F39800;
    padding: 1.5rem;
    margin: 1.5rem 0;
    border-radius: 8px;
}

.step-subsection h5 {
    color: #F39800;
    margin-top: 0;
    margin-bottom: 1rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}