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

body {
    font-family: 'Hiragino Sans', 'Yu Gothic', 'Meiryo', sans-serif;
    line-height: 1.6;
    color: #333;
    min-height: 100vh;
}

a:link {
    color: #ffffff;
}
a:visited {
    color: #ffffff;
}
a:hover {
    color: rgb(103, 103, 103);
}
a:active {
    color: orange;
}

/* Header */
.header {
    background: linear-gradient(135deg, #4A90E2 0%, #E91E63 100%);
    padding: 15px 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    position: sticky;
    top: 0;
    z-index: 1000;
}

.logo {
    display: flex;
    align-items: center;
}

.logo img {
    height: 40px;
    width: auto;
    max-width: 150px;
}

.nav {
    position: relative;
}

.menu-btn {
    background: rgba(0, 0, 0, 0.7);
    color: white;
    border: none;
    padding: 8px 16px;
    border-radius: 20px;
    cursor: pointer;
    font-size: 0.875rem;
    font-weight: bold;
    z-index: 1001;
    position: relative;
    transition: background 0.3s ease;
    display: block;
}

.menu-btn:hover {
    background: rgba(0, 0, 0, 0.9);
}

.nav-menu {
    position: absolute;
    top: 100%;
    right: 0;
    background: rgba(0, 0, 0, 0.95);
    backdrop-filter: blur(10px);
    border-radius: 10px;
    padding: 20px 0;
    margin-top: 10px;
    min-width: 250px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.3);
    opacity: 0;
    visibility: hidden;
    transform: translateY(-10px);
    transition: all 0.3s ease;
    z-index: 1000;
    list-style: none;
}

.nav-menu.active {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.nav-menu li {
    margin: 0;
    padding: 0;
}

.nav-menu a {
    display: block;
    color: #ffffff;
    text-decoration: none;
    padding: 12px 25px;
    font-size: 0.875rem;
    transition: all 0.3s ease;
    border-left: 3px solid transparent;
}

.nav-menu a:hover {
    background: rgba(255, 255, 255, 0.1);
    border-left-color: #e85298;
    color: #d63384;
}

.nav-menu li:last-child a {
    border-bottom: none;
}

/* PC用の横並びメニュー表示 */
@media (min-width: 1024px) {
    .menu-btn {
        display: none;
    }
    
    .nav-menu {
        position: static;
        display: flex;
        flex-direction: row;
        background: transparent;
        backdrop-filter: none;
        border-radius: 0;
        padding: 0;
        margin: 0;
        min-width: auto;
        box-shadow: none;
        opacity: 1;
        visibility: visible;
        transform: none;
        transition: none;
    }
    
    .nav-menu li {
        margin: 0 5px;
    }
    
    .nav-menu a {
        padding: 8px 12px;
        font-size: 1rem;
        border-left: none;
        border-radius: 15px;
        white-space: nowrap;
    }
    
    .nav-menu a:hover {
        background: rgba(255, 255, 255, 0.2);
        border-left-color: transparent;
        color: #ffffff;
    }
    
    /* PC表示時のみプライバシーポリシーとサイトポリシーを非表示 */
    .nav-menu a[href="privacy.html"],
    .nav-menu a[href="sitepolicy.html"] {
        display: none;
    }
}

/* Title Section */
.main-title {
    color: white;
    font-size: 2rem;
    font-weight: bold;
    text-align: center;
    margin: 0;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.3);
    background-image: url('../images/bg.jpg?v=20250807');
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    padding: 60px 20px;
    min-height: 200px;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* Program Content Section */
.program-content-section {
    background: #4d4398;
    text-align: center;
    padding: 40px 40px 20px;
    color: white;
}

.tab-buttons {
    display: flex;
    justify-content: center;
    gap: 20px;
    margin-bottom: 30px;
    flex-wrap: wrap;
}

.tab-btn {
    padding: 18px 40px;
    border: none;
    border-radius: 40px;
    font-size: 1.3rem;
    font-weight: bold;
    cursor: pointer;
    transition: all 0.3s ease;
    background: rgba(255, 255, 255, 0.2);
    color: white;
    border: 2px solid rgba(255, 255, 255, 0.3);
    min-width: 200px;
}

.tab-btn:hover {
    background: rgba(255, 255, 255, 0.3);
    transform: translateY(-2px);
}

/* Disabled state - must come before active to allow active to override */
.tab-btn:disabled {
    background: rgba(255, 255, 255, 0.1);
    color: rgba(255, 255, 255, 0.4);
    opacity: 0.3;
    cursor: not-allowed;
}

/* Active state - must come after disabled to override when both are present */
.tab-btn.active {
    background: #FFD700;
    color: #333;
    border-color: #FFD700;
}

.tab-btn.active:hover {
    background: #FFC700;
}

.subtitle-text {
    font-size: 1rem;
    line-height: 1.8;
    max-width: 800px;
    margin: 0 auto;
    opacity: 0.9;
}

/* Main Content */
.main-content {
    background: #4d4398;
    min-height: 100vh;
    justify-content: center;
    padding: 40px 20px;
}

.tab-content {
    display: block;
}

.programs-container {
    max-width: 900px;
    margin: 0 auto;
    display: flex;
    flex-direction: column;
    gap: 30px;
}

.program-card {
    background: white;
    border-radius: 20px;
    padding: 30px;
    display: flex;
    align-items: center;
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.15);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.program-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 12px 35px rgba(0, 0, 0, 0.2);
}

.program-content {
    flex: 1;
}

.program-title {
    color: #e85298;
    font-size: 1.6rem;
    font-weight: bold;
    margin-bottom: 20px;
    padding-bottom: 5px;
}

.program-details {
    margin-bottom: 25px;
}

.program-details p {
    margin: 8px 0;
    color: #666;
    line-height: 1.6;
}

.class-section {
    margin-bottom: 25px;
    padding: 15px;
    background: #f8f9fa;
    border-radius: 10px;
    border-left: 4px solid #e85298;
}

.class-section h4 {
    color: #e85298;
    font-size: 1.2rem;
    font-weight: bold;
    margin-bottom: 15px;
    margin-top: 0;
}

.class-section p strong {
    color: #333;
    font-weight: bold;
}

/* Schedule and Venue Labels with Circle Border */
.schedule-label {
    display: inline-block;
    border: 1px solid #333;
    border-radius: 50px;
    margin: 5px 0;
    background: #fff;
    color: #333;
    font-size: 0.9rem;
    min-width: 160px;
    text-align: center;
}

.venue-label01 {
    display: inline-block;
    border-radius: 50px;
    margin: 5px 0;
    padding: 3px;
    background: #084a20;
    color: #fff;
    font-size: 0.9rem;
    min-width: 200px;
    text-align: center;
}
.venue-label02 {
    display: inline-block;
    border-radius: 50px;
    margin: 5px 0;
    padding: 3px;
    background: #3d1568;
    color: #fff;
    font-size: 0.9rem;
    min-width: 200px;
    text-align: center;
}
.venue-label03 {
    display: inline-block;
    border-radius: 50px;
    margin: 5px 0;
    padding: 3px;
    background: #247cc0;
    color: #fff;
    font-size: 0.9rem;
    min-width: 200px;
    text-align: center;
}
.venue-label04 {
    display: inline-block;
    border-radius: 50px;
    margin: 5px 0;
    padding: 3px;
    background: #1c9f9c;
    color: #fff;
    font-size: 0.9rem;
    min-width: 200px;
    text-align: center;
}
.venue-label05 {
    display: inline-block;
    border-radius: 50px;
    margin: 5px 0;
    padding: 3px;
    background: #892113;
    color: #fff;
    font-size: 0.9rem;
    min-width: 200px;
    text-align: center;
}
.venue-label06 {
    display: inline-block;
    border-radius: 50px;
    margin: 5px 0;
    padding: 3px;
    background: #e6830b;
    color: #fff;
    font-size: 0.9rem;
    min-width: 200px;
    text-align: center;
}

.program-btn {
    background-color: black;
    color: white;
    border: none;
    padding: 12px 24px;
    border-radius: 25px;
    font-size: 1rem;
    font-weight: bold;
    cursor: pointer;
    transition: all 0.3s ease;
}

.program-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(118, 75, 162, 0.4);
}

.download-btn {
    background: linear-gradient(135deg, #32CD32 0%, #228B22 100%);
}

.download-btn:hover {
    box-shadow: 0 5px 15px rgba(50, 205, 50, 0.4);
}

.program-image {
    flex-shrink: 0;
    width: 400px;
    height: 400px;
    margin-left: 20px;
}

.image-placeholder {
    width: 100%;
    height: 100%;
    background: #ffffff;
    border-radius: 15px;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    overflow: hidden;
}

.image-placeholder img,
.image-placeholder image {
    width: 100%;
    height: 100%;
    object-fit: contain;
    border-radius: 15px;
}

.image-placeholder::after {
    content: '';
    position: absolute;
    bottom: 10px;
    right: 10px;
    width: 40px;
    height: 40px;
    background: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="%23764ba2"><path d="M12 2C13.1 2 14 2.9 14 4C14 5.1 13.1 6 12 6C10.9 6 10 5.1 10 4C10 2.9 10.9 2 12 2ZM21 9V7L15 13L13.5 11.5C13.1 11.1 12.6 11.1 12.2 11.5L10 13.7L8.5 12.2C8.1 11.8 7.6 11.8 7.2 12.2L3 16.4V18C3 19.1 3.9 20 5 20H19C20.1 20 21 19.1 21 18V9Z"/></svg>') no-repeat center;
    background-size: contain;
    display: none;
}

.image-placeholder:empty::after {
    display: block;
}

/* Footer */
/* Footer */
.footer {
    background: #2D2D2D;
    color: white;
    padding: 40px 20px 20px;
    text-align: center;
}

.footer-links {
    font-size: 1rem;
    margin-bottom: 30px;
    line-height: 1.8;
    color: #ffffff;
}

.footer-links a {
    color: #ffffff;
    text-decoration: none;
}

.footer-links a:hover {
    color: #e85298;
    text-decoration: underline;
}

.footer-logo {
    margin-bottom: 10px;
    color: white;
}

.footer-tagline {
    font-size: 0.875rem;
    color: #ffffff;
    margin-bottom: 20px;
    font-style: italic;
}

/* General Link Styles */
a {
    color: #ffffff;
    text-decoration: none;
}

a:hover {
    color: #d63384;
    text-decoration: underline;
}

/* Exclude buttons and specific elements from general link styles */
a.contact-btn,
.footer-links a {
    /* These will use their specific styles */
    color: inherit;
}

.footer-info {
    font-size: 0.8rem;
    color: #ffffff;
    margin-bottom: 20px;
    line-height: 1.6;
}

.bunkacho-logo {
    color: #ffffff;
    padding: 8px 16px;
    border-radius: 5px;
    display: inline-block;
    font-size: 0.8rem;
    margin-bottom: 20px;
}

.contact-btn {
    background: #FFD700;
    color: #333;
    border: none;
    padding: 12px 24px;
    border-radius: 25px;
    font-size: 0.875rem;
    font-weight: bold;
    cursor: pointer;
    position: fixed;
    bottom: 20px;
    right: 20px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    z-index: 1000;
}

.contact-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 16px rgba(0, 0, 0, 0.4);
}

.contact-btn a {
    color: #333;
    text-decoration: none;
}

.copyright {
    font-size: 0.625rem;
    color: #ffffff;
    margin-top: 20px;
}

/* Modal Styles */
.modal {
    display: none;
    position: fixed;
    z-index: 2000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
    animation: fadeIn 0.3s ease;
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

.modal-content {
    background-color: white;
    margin: 5% auto;
    padding: 0;
    border-radius: 15px;
    width: 90%;
    max-width: 600px;
    max-height: 80vh;
    overflow-y: auto;
    position: relative;
    animation: slideIn 0.3s ease;
    box-shadow: 0 15px 35px rgba(0, 0, 0, 0.3);
}

@keyframes slideIn {
    from {
        transform: translateY(-50px);
        opacity: 0;
    }
    to {
        transform: translateY(0);
        opacity: 1;
    }
}

.close {
    position: absolute;
    right: 20px;
    top: 15px;
    color: #aaa;
    font-size: 1.75rem;
    font-weight: bold;
    cursor: pointer;
    z-index: 1;
    transition: color 0.3s ease;
}

.close:hover,
.close:focus {
    color: #E91E63;
}

#modalTitle {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 20px 30px;
    margin: 0;
    border-radius: 15px 15px 0 0;
    font-size: 1.5rem;
    font-weight: bold;
}

#modalBody {
    padding: 30px;
}

.program-info h3 {
    color: #764ba2;
    font-size: 1.125rem;
    margin-bottom: 15px;
    margin-top: 25px;
    border-left: 4px solid #E91E63;
    padding-left: 15px;
}

.program-info h3:first-child {
    margin-top: 0;
}

.program-info ul {
    list-style: none;
    padding: 0;
    margin-bottom: 20px;
}

.program-info li {
    padding: 8px 0;
    border-bottom: 1px solid #f0f0f0;
    font-size: 1rem;
    color: #555;
}

.program-info li:last-child {
    border-bottom: none;
}

.program-info p {
    line-height: 1.8;
    color: #333;
    font-size: 1rem;
    background: #f8f9fa;
    padding: 15px;
    border-radius: 8px;
    margin: 0;
}

.modal-footer {
    padding: 20px 30px;
    border-top: 1px solid #eee;
    display: flex;
    justify-content: flex-end;
    gap: 15px;
    background: #f8f9fa;
    border-radius: 0 0 15px 15px;
}

.apply-btn {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border: none;
    padding: 12px 24px;
    border-radius: 25px;
    font-size: 1rem;
    font-weight: bold;
    cursor: pointer;
    transition: all 0.3s ease;
}

.apply-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(118, 75, 162, 0.4);
}

.cancel-btn {
    background: #6c757d;
    color: white;
    border: none;
    padding: 12px 24px;
    border-radius: 25px;
    font-size: 1rem;
    font-weight: bold;
    cursor: pointer;
    transition: all 0.3s ease;
}

.cancel-btn:hover {
    background: #5a6268;
    transform: translateY(-2px);
}

/* Responsive Design */
@media (max-width: 768px) {
    .main-title {
        font-size: 2.25rem;
    }
    
    .program-card {
        flex-direction: column;
        text-align: center;
        gap: 20px;
    }
    
    .program-image {
        width: 300px;
        height: 300px;
        margin-left: 0;
        margin-top: 20px;
    }
    
    .tab-buttons {
        flex-direction: column;
        align-items: center;
    }
    
    .tab-btn {
        width: 250px;
    }
}

@media (max-width: 480px) {
    .main-title {
        font-size: 1.75rem;
    }
    
    .program-card {
        padding: 20px;
    }
    
    .program-title {
        font-size: 1.25rem;
    }
    
    .program-details p {
        font-size: 1rem;
    }
    
    /* タブボタンのフォントサイズを小さくして1行に収める */
    .tab-btn {
        font-size: 1rem;
        padding: 15px 20px;
        min-width: 150px;
    }
    
    /* １部お申し込み終了ボタンにmargin-bottom追加 */
    .program-btn:has(a[href*="forms.gle"]):first-of-type {
        margin-bottom: 20px;
    }
}
