
/* 日本語テキストの適切な改行設定 */
h1, h2, h3, h4, h5, h6, p, span, a, li {
    word-break: keep-all;
    overflow-wrap: break-word;
    hyphens: auto;
}

/* 全体的なオーバーフロー防止 */
* {
    box-sizing: border-box;
    max-width: 100%;
}

/* Contact Page Specific Styles */

/* Page Hero (reuse from about.css) */
.page-hero {
    position: relative;
    height: 50vh;
    min-height: 400px;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    margin-top: 70px;
}

.page-hero-bg {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--secondary-color) 100%);
    opacity: 0.9;
    z-index: 1;
}

.page-hero-bg::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-image: url('data:image/svg+xml,%3Csvg width="40" height="40" viewBox="0 0 40 40" 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="M20 20.5V18H0v-2h20v-2H0v-2h20v-2H0V8h20V6H0V4h20V2H0V0h22v20h2V0h2v20h2V0h2v20h2V0h2v20h2V0h2v20h2v2H20v-1.5zM0 20h2v20H0V20zm4 0h2v20H4V20zm4 0h2v20H8V20zm4 0h2v20h-2V20zm4 0h2v20h-2V20zm4 4h20v2H20v-2zm0 4h20v2H20v-2zm0 4h20v2H20v-2zm0 4h20v2H20v-2z"/%3E%3C/g%3E%3C/g%3E%3C/svg%3E');
}

.page-hero-content {
    position: relative;
    z-index: 2;
    text-align: center;
    color: var(--white);
}

.page-title {
    font-size: 3rem;
    font-weight: 700;
    margin-bottom: 1rem;
    animation: fadeInUp 0.8s ease;
}

.page-subtitle {
    font-size: 1.6rem;
    opacity: 0.9;
    animation: fadeInUp 0.8s 0.2s ease both;
    word-wrap: break-word;
    overflow-wrap: break-word;
    hyphens: auto;
    text-align: center;
}

/* Contact Section */
.contact-section {
    padding: 80px 0;
    background-color: var(--white);
    width: 100%;
}

.contact-section .container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 2rem;
    width: 100%;
}

.contact-intro {
    text-align: left;
    color: var(--text-light);
    margin-bottom: 3rem;
    font-size: 1.1rem;
    line-height: 1.8;
}

.contact-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 4rem;
    margin: 3rem auto 0;
    max-width: 1200px;
    width: 100%;
}

/* Contact Form */
.contact-form-wrapper {
    background: var(--bg-light);
    padding: 2.5rem;
    border-radius: 15px;
    box-shadow: var(--shadow-sm);
    order: 2;
}

.contact-form-wrapper h2 {
    color: var(--primary-color);
    font-size: 1.8rem;
    margin-bottom: 2rem;
    text-align: center;
}

.form-container {
    border-radius: 10px;
    overflow: hidden;
    box-shadow: var(--shadow-sm);
}

.form-container iframe {
    width: 100%;
    height: 800px;
    border: none;
    background: var(--white);
}

.form-note {
    text-align: center;
    margin-top: 1.5rem;
    color: var(--text-light);
    font-size: 0.9rem;
    line-height: 1.6;
}

.form-note a {
    color: var(--primary-color);
    text-decoration: none;
    font-weight: 500;
}

.form-note a:hover {
    color: var(--secondary-color);
    text-decoration: underline;
}

/* Contact Info */
.contact-info-wrapper {
    display: flex;
    flex-direction: column;
    gap: 2rem;
    order: 1;
    width: 100%;
    margin: 0 auto;
}

.info-card {
    background: var(--white);
    padding: 2rem;
    border-radius: 15px;
    box-shadow: var(--shadow-sm);
    border: 1px solid rgba(0, 0, 0, 0.05);
}

.info-card h3 {
    color: var(--primary-color);
    font-size: 1.3rem;
    margin-bottom: 1.5rem;
    text-align: center;
}

.info-content {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.info-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 50px;
    height: 50px;
    background: var(--bg-light);
    border-radius: 50%;
    color: var(--primary-color);
    flex-shrink: 0;
}

.info-text {
    flex: 1;
}

.info-label {
    color: var(--secondary-color);
    font-size: 0.9rem;
    font-weight: 600;
    margin-bottom: 0.5rem;
}

.info-value {
    color: var(--text-dark);
    font-size: 1.1rem;
    font-weight: 500;
    margin-bottom: 0.5rem;
    line-height: 1.4;
}

.info-hours {
    color: var(--text-light);
    font-size: 0.9rem;
}

.access-info {
    margin-top: 1.5rem;
    padding: 1.5rem;
    background: var(--bg-light);
    border-radius: 10px;
}

.access-info h4 {
    color: var(--primary-color);
    font-size: 1.1rem;
    margin-bottom: 1rem;
    font-weight: 600;
}

.access-list {
    list-style: none;
    padding: 0;
    margin: 0;
}

.access-list li {
    padding: 0.6rem 0;
    padding-left: 1.5rem;
    position: relative;
    color: var(--text-light);
    line-height: 1.6;
    word-wrap: break-word;
    overflow-wrap: break-word;
}

.access-list li:before {
    content: "🚃";
    position: absolute;
    left: 0;
    top: 0.6rem;
}

.map-container {
    margin-top: 1.5rem;
    border-radius: 10px;
    overflow: hidden;
    box-shadow: var(--shadow-sm);
}

.map-container iframe {
    width: 100%;
    height: 250px;
    border: none;
}

/* Map Section */
.map-section {
    padding: 80px 0;
    background-color: var(--bg-light);
}

.map-container {
    margin-top: 3rem;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: var(--shadow-md);
}

.map-container iframe {
    display: block;
    width: 100%;
    height: 400px;
    border: none;
}

.access-info {
    margin-top: 3rem;
    background: var(--white);
    padding: 2rem;
    border-radius: 12px;
    box-shadow: var(--shadow-sm);
}

.access-info h3 {
    color: var(--text-dark);
    margin-bottom: 1rem;
    font-size: 1.25rem;
}

.access-info ul {
    list-style: none;
    padding: 0;
}

.access-info li {
    padding: 0.5rem 0;
    padding-left: 1.5rem;
    position: relative;
    color: var(--text-light);
    word-wrap: break-word;
    overflow-wrap: break-word;
}

.access-info li:before {
    content: "▸";
    position: absolute;
    left: 0;
    color: var(--primary-color);
}

/* Contact Form Section */
.contact-form-section {
    padding: 80px 0;
    background-color: var(--white);
}

.form-container {
    max-width: 800px;
    margin: 0 auto;
}

.form-intro {
    text-align: center;
    color: var(--text-light);
    margin: 2rem 0 3rem;
    font-size: 1.1rem;
    line-height: 1.8;
}

.google-form-wrapper {
    background: var(--bg-light);
    border-radius: 12px;
    padding: 2rem;
    box-shadow: var(--shadow-sm);
}

.google-form-wrapper iframe {
    width: 100%;
    height: 1000px;
    border: none;
    background: var(--white);
    border-radius: 8px;
}

.form-note {
    text-align: center;
    margin-top: 2rem;
    color: var(--text-light);
    font-size: 0.9rem;
}

.form-note a {
    color: var(--primary-color);
    text-decoration: none;
    font-weight: 500;
    transition: var(--transition);
}

.form-note a:hover {
    color: var(--secondary-color);
    text-decoration: underline;
}


/* Animations */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Responsive Design */
@media (max-width: 1024px) {
    .contact-grid {
        gap: 3rem;
    }
}

@media (max-width: 768px) {
    .page-hero {
        height: 40vh;
        min-height: 300px;
    }
    
    .page-title {
        font-size: 2rem;
    }
    
    .page-subtitle {
        font-size: 0.9rem;
        word-break: break-all;
        overflow-wrap: anywhere;
        line-height: 1.4;
    }
    
    .contact-grid {
        grid-template-columns: 1fr;
        gap: 2rem;
        justify-items: center;
        align-items: center;
        place-items: center;
    }
    
    .contact-form-wrapper {
        padding: 2rem;
        width: 100%;
        max-width: 600px;
        margin: 0 auto;
    }
    
    .contact-form-wrapper h2 {
        font-size: 1.5rem;
    }
    
    .form-container iframe {
        height: 600px;
    }
    
    .contact-info-wrapper {
        width: 100%;
        max-width: 600px;
        margin: 0 auto;
    }
    
    .info-card {
        padding: 1.5rem;
    }
    
    .info-card h3 {
        font-size: 1.2rem;
    }
    
    .info-content {
        flex-direction: column;
        align-items: center;
        text-align: center;
        gap: 1rem;
    }
    
    .info-icon {
        width: 45px;
        height: 45px;
    }
    
    .info-value {
        font-size: 1rem;
    }
    
    .map-container iframe {
        height: 200px;
    }
    
    .access-info {
        padding: 1rem;
        text-align: center;
    }
    
    .access-info h4 {
        font-size: 1rem;
    }
    
    .access-list {
        text-align: left;
        display: inline-block;
    }
    
    .access-list li {
        font-size: 0.9rem;
        padding-left: 1.2rem;
    }
}

@media (max-width: 480px) {
    .contact-section {
        padding: 60px 0;
    }
    
    .contact-intro {
        font-size: 1rem;
        margin: 1.5rem 0 2rem;
        padding: 0 0.5rem;
    }
    
    .contact-form-wrapper {
        padding: 1.5rem;
        max-width: 100%;
        margin: 0 auto;
    }
    
    .contact-form-wrapper h2 {
        font-size: 1.3rem;
    }
    
    .form-container iframe {
        height: 500px;
    }
    
    .info-card {
        padding: 1rem;
    }
    
    .info-card h3 {
        font-size: 1.1rem;
    }
    
    .info-icon {
        width: 40px;
        height: 40px;
    }
    
    .info-value {
        font-size: 0.9rem;
    }
    
    .info-hours {
        font-size: 0.85rem;
    }
    
    .map-container iframe {
        height: 180px;
    }
    
    .access-info {
        padding: 0.8rem;
    }
    
    .access-info h4 {
        font-size: 0.95rem;
    }
    
    .access-list li {
        font-size: 0.85rem;
        padding-left: 1rem;
        line-height: 1.8;
    }
    
    .page-subtitle {
        font-size: 0.8rem;
        word-break: break-all;
        overflow-wrap: anywhere;
        line-height: 1.3;
    }
}

/* iPhone 12 Pro and similar devices */
@media (max-width: 390px) {
    .contact-section {
        padding: 60px 0;
        width: 100%;
        margin: 0;
    }
    
    .contact-section .container {
        padding: 0 1rem;
        width: 100%;
        max-width: 100%;
        margin: 0 auto;
    }
    
    .contact-grid {
        grid-template-columns: 1fr;
        gap: 2rem;
        justify-items: center;
        align-items: center;
        place-items: center;
        width: 100%;
        margin: 0 auto;
        padding: 0;
        display: flex;
        flex-direction: column;
        align-items: center;
        justify-content: center;
    }
    
    .contact-form-wrapper {
        padding: 1.5rem;
        width: 100%;
        max-width: 100%;
        margin: 0 auto;
        box-sizing: border-box;
        position: relative;
        display: flex;
        flex-direction: column;
        align-items: center;
    }
    
    .contact-info-wrapper {
        width: 100%;
        max-width: 100%;
        margin: 0 auto;
        box-sizing: border-box;
        position: relative;
        display: flex;
        flex-direction: column;
        align-items: center;
    }
    
    .info-card {
        padding: 1rem;
        width: 100%;
        box-sizing: border-box;
        margin: 0 auto;
    }
    
    .page-subtitle {
        font-size: 0.75rem;
        line-height: 1.3;
    }
    
    /* Force text alignment for all content */
    .contact-intro {
        text-align: center;
        padding: 0 0.5rem;
    }
    
    .contact-form-wrapper h2 {
        text-align: center;
    }
    
    .info-card h3 {
        text-align: center;
    }
}

/* Extra small screens */
@media (max-width: 360px) {
    .page-subtitle {
        font-size: 0.75rem;
        line-height: 1.3;
    }
}
