/* Tech Map Page Styles */

/* Container */
.tech-map-container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 2rem 1rem;
}

/* Header Section */
.tech-map-header {
    text-align: center;
    margin-bottom: 4rem;
    padding: 2rem 0;
}

.tech-map-title {
    font-size: 3rem;
    font-weight: 700;
    color: var(--primary-color);
    margin-bottom: 1rem;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 1rem;
}

.tech-map-title i {
    font-size: 3rem;
}

.tech-map-subtitle {
    font-size: 1.5rem;
    color: var(--text-light);
    margin-bottom: 2rem;
}

.tech-map-description {
    max-width: 800px;
    margin: 0 auto;
    font-size: 1.1rem;
    line-height: 1.8;
    color: var(--text-dark);
}

.tech-map-description p {
    margin-bottom: 0.5rem;
}

/* Section */
.tech-section {
    margin-bottom: 3rem;
    position: relative;
}

/* Section Connector */
.section-connector {
    display: flex;
    flex-direction: column;
    align-items: center;
    margin: 3rem 0;
    position: relative;
    opacity: 0;
    transform: translateY(20px);
    animation: fadeInUp 0.8s ease forwards;
}

.section-connector:nth-of-type(1) {
    animation-delay: 0.5s;
}

.section-connector:nth-of-type(2) {
    animation-delay: 0.7s;
}

.connector-line {
    width: 3px;
    height: 60px;
    background: linear-gradient(180deg, var(--primary-color), var(--warm-orange));
    position: relative;
}

.connector-arrow {
    font-size: 3rem;
    color: var(--primary-color);
    margin: 1rem 0;
    text-shadow: 0 4px 15px rgba(255, 107, 107, 0.3);
}


.connector-text {
    font-size: 1.2rem;
    font-weight: 600;
    color: var(--text-dark);
    margin: 0;
    padding: 0.5rem 1.5rem;
    background: white;
    border-radius: 20px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
}

.section-header {
    text-align: center;
    margin-bottom: 3rem;
}

.section-title {
    font-size: 2rem;
    font-weight: 700;
    color: var(--dark-color);
    margin-bottom: 0.5rem;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.75rem;
}

.section-title i {
    color: var(--primary-color);
}

.section-description {
    font-size: 1.1rem;
    color: var(--text-light);
}

/* Tech Cards Grid */
.tech-cards-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 2rem;
    margin: 0 auto;
}

/* Tech Card */
.tech-card {
    background: white;
    border-radius: 16px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
    transition: all 0.3s ease;
    cursor: pointer;
    position: relative;
    min-height: 370px;
    perspective: 1000px;
    z-index: 2;
    overflow: hidden;
}

.tech-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 12px 40px rgba(0, 0, 0, 0.15);
    z-index: 10;
}


/* Card Front */
.tech-card-front {
    padding: 2rem;
    text-align: center;
    min-height: 370px;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    transition: opacity 0.3s ease;
}

.tech-card:hover .tech-card-front {
    opacity: 0;
}

/* Card Back */
.tech-card-back {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    min-height: 370px;
    padding: 1.5rem;
    opacity: 0;
    transition: opacity 0.3s ease;
    display: flex;
    flex-direction: column;
    justify-content: flex-start;
    gap: 0.75rem;
    background: white;
    border-radius: 16px;
}

.tech-card:hover .tech-card-back {
    opacity: 1;
}

/* Tech Icon */
.tech-icon {
    width: 80px;
    height: 80px;
    margin: 0 auto 1.5rem;
    background: linear-gradient(135deg, var(--primary-color), var(--warm-orange));
    border-radius: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2.5rem;
    color: white;
    box-shadow: 0 4px 15px rgba(255, 107, 107, 0.3);
}

/* Tech Name */
.tech-name {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--dark-color);
    margin-bottom: 0.5rem;
}

/* Tech Badge */
.tech-badge {
    display: inline-block;
    padding: 0.25rem 0.75rem;
    background: var(--secondary-color);
    color: white;
    border-radius: 20px;
    font-size: 0.875rem;
    font-weight: 600;
    margin-bottom: 1rem;
}


/* Tech Summary */
.tech-summary {
    font-size: 1rem;
    color: var(--text-light);
    margin-bottom: 1.5rem;
    line-height: 1.6;
}

/* Tech Level Indicator */
.tech-level {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.5rem;
    margin-top: auto;
    padding-top: 0.5rem;
}

.level-label {
    font-size: 0.75rem;
    font-weight: 600;
    color: var(--text-light);
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.level-dots {
    display: flex;
    justify-content: center;
    gap: 0.5rem;
}

.level-dot {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background: #e0e0e0;
    transition: all 0.3s ease;
}

.level-dot.active {
    background: var(--primary-color);
    box-shadow: 0 0 8px var(--primary-color);
}

/* Mobile Tech Header - デスクトップでは非表示 */
.mobile-tech-header {
    display: none;
}

/* Card Back Content */
.tech-card-back h4 {
    font-size: 1.1rem;
    font-weight: 700;
    color: var(--dark-color);
    margin-bottom: 0;
    text-align: center;
}

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

.achievement-list li {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.35rem 0;
    font-size: 0.9rem;
    color: var(--text-dark);
}

.achievement-list i {
    color: var(--success-color);
    font-size: 1rem;
    flex-shrink: 0;
}

.example-output {
    background: var(--bg-light);
    padding: 0.75rem;
    border-radius: 8px;
    margin-bottom: 0;
}

.example-label {
    font-weight: 600;
    color: var(--dark-color);
    margin-bottom: 0.35rem;
    font-size: 0.85rem;
}

.example-output p:last-child {
    margin-bottom: 0;
    font-size: 0.85rem;
    color: var(--text-light);
    line-height: 1.4;
}

/* Learn Button Container */
.tech-card-back > .learn-btn {
    padding-top: 1rem;
    border-top: 2px solid var(--bg-light);
}

/* Learn Button */
.learn-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    padding: 0.85rem 1.5rem;
    background: linear-gradient(135deg, var(--primary-color), var(--warm-orange));
    color: white;
    border-radius: 10px;
    text-decoration: none;
    font-weight: 700;
    font-size: 1rem;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(255, 107, 107, 0.3);
    margin-top: auto;
    width: 100%;
    text-align: center;
    border: none;
    position: relative;
    overflow: hidden;
}

.learn-btn::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.3), transparent);
    transition: left 0.5s ease;
}

.learn-btn:hover::before {
    left: 100%;
}

.learn-btn:hover {
    transform: translateY(-3px) scale(1.02);
    box-shadow: 0 8px 30px rgba(255, 107, 107, 0.5);
    color: white;
    text-decoration: none;
    background: linear-gradient(135deg, #ff5252, #ff7043);
}

.learn-btn:active {
    transform: translateY(0) scale(0.98);
}

.learn-btn i {
    font-size: 1.2rem;
    transition: transform 0.3s ease;
}

.learn-btn:hover i {
    transform: translateX(3px);
}

/* CTAボタンのパルスアニメーション */
@keyframes btnPulse {
    0%, 100% {
        box-shadow: 0 4px 15px rgba(255, 107, 107, 0.3);
    }
    50% {
        box-shadow: 0 4px 25px rgba(255, 107, 107, 0.5);
    }
}

.tech-card:hover .learn-btn {
    animation: btnPulse 2s ease-in-out infinite;
}


/* Learning Flow */
.learning-flow {
    max-width: 800px;
    margin: 5rem auto;
    padding: 3rem 2rem;
    background: white;
    border-radius: 20px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
}

.learning-flow .section-title {
    margin-bottom: 3rem;
}

.flow-steps {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.flow-step {
    display: flex;
    align-items: center;
    gap: 1.5rem;
    padding: 1.5rem;
    background: var(--bg-light);
    border-radius: 12px;
    transition: all 0.3s ease;
}

.step-number {
    width: 60px;
    height: 60px;
    background: linear-gradient(135deg, var(--primary-color), var(--warm-orange));
    color: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    font-weight: 700;
    flex-shrink: 0;
    box-shadow: 0 4px 15px rgba(255, 107, 107, 0.3);
    margin-right: 0;
}

.step-content h3 {
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--dark-color);
    margin-bottom: 0.5rem;
}

.step-content p {
    margin: 0;
    color: var(--text-light);
    font-size: 1rem;
}

.flow-arrow {
    text-align: center;
    font-size: 2rem;
    color: var(--primary-color);
}

/* CTA Section */
.cta-section {
    text-align: center;
    padding: 4rem 2rem;
    background: linear-gradient(135deg, var(--primary-color), var(--warm-orange));
    border-radius: 20px;
    margin: 4rem 0;
    box-shadow: 0 8px 30px rgba(255, 107, 107, 0.3);
}

.cta-content h2 {
    font-size: 2.5rem;
    font-weight: 700;
    color: white;
    margin-bottom: 1rem;
}

.cta-content p {
    font-size: 1.25rem;
    color: rgba(255, 255, 255, 0.9);
    margin-bottom: 2rem;
}

.cta-buttons {
    display: flex;
    gap: 1rem;
    justify-content: center;
    flex-wrap: wrap;
}

.cta-section .btn {
    padding: 1rem 2rem;
    font-size: 1.1rem;
    border-radius: 12px;
    font-weight: 600;
    transition: all 0.3s ease;
}

.cta-section .btn-primary {
    background: white;
    color: var(--primary-color);
    border: none;
}

.cta-section .btn-primary:hover {
    transform: translateY(-4px);
    box-shadow: 0 8px 25px rgba(255, 255, 255, 0.4);
}

.cta-section .btn-outline-primary {
    background: transparent;
    color: white;
    border: 2px solid white;
}

.cta-section .btn-outline-primary:hover {
    background: white;
    color: var(--primary-color);
    transform: translateY(-4px);
}


/* Responsive Design */
@media (max-width: 768px) {
    .tech-map-title {
        font-size: 2rem;
    }

    .tech-map-title i {
        font-size: 2rem;
    }

    .tech-map-subtitle {
        font-size: 1.2rem;
    }

    .tech-map-description {
        font-size: 1rem;
    }

    .section-title {
        font-size: 1.5rem;
    }

    .tech-cards-grid {
        grid-template-columns: 1fr;
        gap: 1.5rem;
    }

    .tech-card {
        min-height: 370px;
    }

    /* モバイルでは常に裏面を表示 */
    .tech-card-front {
        display: none;
    }

    .tech-card-back {
        position: static;
        opacity: 1;
        min-height: auto;
        padding: 1.5rem;
    }

    .tech-card:hover {
        transform: none;
        box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
    }

    /* モバイル専用：技術名とバッジを表示 */
    .mobile-tech-header {
        display: block;
        text-align: center;
        margin-bottom: 1rem;
        padding-bottom: 1rem;
        border-bottom: 2px solid var(--bg-light);
    }

    .mobile-tech-name {
        font-size: 1.5rem;
        font-weight: 700;
        color: var(--dark-color);
        margin-bottom: 0.5rem;
    }

    .mobile-tech-badge {
        display: inline-block;
        padding: 0.25rem 0.75rem;
        background: var(--secondary-color);
        color: white;
        border-radius: 20px;
        font-size: 0.875rem;
        font-weight: 600;
    }

    .learn-btn {
        font-size: 1rem;
        padding: 1rem 1.5rem;
    }

    .tech-card-back > .learn-btn {
        padding-top: 1.25rem;
        margin-top: 0.75rem;
    }

    .flow-step {
        flex-direction: column;
        text-align: center;
    }

    .step-number {
        width: 50px;
        height: 50px;
        font-size: 1.25rem;
    }

    .cta-content h2 {
        font-size: 1.5rem;
    }

    .cta-content p {
        font-size: 1rem;
    }

    .cta-buttons {
        flex-direction: column;
        align-items: center;
    }

    .cta-section .btn {
        width: 100%;
        max-width: 300px;
    }

    .level-label {
        font-size: 0.7rem;
    }

    .level-dot {
        width: 10px;
        height: 10px;
    }

}

@media (max-width: 480px) {
    .tech-map-container {
        padding: 1rem 0.5rem;
    }

    .tech-map-header {
        margin-bottom: 2rem;
        padding: 1rem 0;
    }

    .tech-section {
        margin-bottom: 3rem;
    }

    .learning-flow {
        padding: 2rem 1rem;
    }

    .cta-section {
        padding: 2rem 1rem;
    }
}

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

.tech-card {
    animation: fadeInUp 0.6s ease forwards;
}

.tech-card:nth-child(1) {
    animation-delay: 0.1s;
}

.tech-card:nth-child(2) {
    animation-delay: 0.2s;
}

.tech-card:nth-child(3) {
    animation-delay: 0.3s;
}

.tech-card:nth-child(4) {
    animation-delay: 0.4s;
}

/* Print Styles */
@media print {
    .tech-card-front {
        display: none;
    }

    .tech-card-back {
        position: static;
        opacity: 1;
    }
}
