/* ========================================
   JOUFUJI TEMPLE - ABOUT PAGE STYLES
   ======================================== */

/* ===== PAGE HEADER ===== */
.page-header {
    padding: 140px 0 80px;
    background: linear-gradient(135deg, var(--bg-primary), var(--bg-secondary));
    text-align: center;
}

.header-content {
    max-width: 800px;
    margin: 0 auto;
}

.page-title {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 15px;
    margin-bottom: 30px;
}

.page-title .title-jp {
    font-family: var(--font-serif);
    font-size: clamp(48px, 6vw, 72px);
    font-weight: 700;
    color: var(--accent-gold);
    text-shadow: var(--glow-gold);
}

.page-title .title-en {
    font-size: clamp(14px, 2vw, 20px);
    letter-spacing: 3px;
    color: var(--text-muted);
    text-transform: uppercase;
}

.page-subtitle {
    font-size: clamp(16px, 2vw, 20px);
    color: var(--text-secondary);
    line-height: 1.8;
}

/* ===== ABOUT HERO IMAGE ===== */
.about-hero-section {
    padding: 80px 0;
    background: var(--bg-secondary);
}

.about-hero-image {
    position: relative;
    display: flex;
    justify-content: center;
}

.hero-image-wrapper {
    position: relative;
    width: 100%;
    max-width: 900px;
    border-radius: 30px;
    overflow: hidden;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.5);
    transition: var(--transition-smooth);
}

.hero-image-wrapper::before {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: conic-gradient(
        from 0deg,
        transparent 0deg,
        var(--accent-gold) 60deg,
        var(--accent-vermilion) 120deg,
        transparent 180deg
    );
    animation: rotateGlow 8s linear infinite;
    opacity: 0;
    transition: opacity 0.6s ease;
    z-index: -1;
}

.hero-image-wrapper:hover::before {
    opacity: 0.6;
}

.hero-image-wrapper img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 1.2s cubic-bezier(0.4, 0, 0.2, 1);
    filter: brightness(0.9);
}

.hero-image-wrapper:hover img {
    transform: scale(1.08);
    filter: brightness(1);
}

/* Animated Glow Overlay */
.image-glow {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: radial-gradient(
        circle at var(--mouse-x, 50%) var(--mouse-y, 50%),
        rgba(255, 167, 38, 0.4) 0%,
        rgba(216, 67, 21, 0.3) 30%,
        transparent 70%
    );
    opacity: 0;
    transition: opacity 0.8s ease;
    mix-blend-mode: screen;
    pointer-events: none;
}

.hero-image-wrapper:hover .image-glow {
    opacity: 1;
    animation: pulseGlow 3s ease-in-out infinite;
}

/* Floating Particles */
.floating-particles {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    pointer-events: none;
    overflow: hidden;
}

.particle {
    position: absolute;
    width: 4px;
    height: 4px;
    background: var(--accent-gold);
    border-radius: 50%;
    box-shadow: 0 0 20px var(--accent-gold),
                0 0 40px var(--accent-gold);
    opacity: 0;
    animation: floatParticle 6s ease-in-out infinite;
}

.particle:nth-child(1) {
    left: 20%;
    animation-delay: 0s;
    animation-duration: 7s;
}

.particle:nth-child(2) {
    left: 40%;
    animation-delay: 1.5s;
    animation-duration: 6s;
}

.particle:nth-child(3) {
    left: 60%;
    animation-delay: 3s;
    animation-duration: 8s;
}

.particle:nth-child(4) {
    left: 80%;
    animation-delay: 4.5s;
    animation-duration: 7.5s;
}

.particle:nth-child(5) {
    left: 50%;
    animation-delay: 2s;
    animation-duration: 6.5s;
}

/* ===== TEMPLE INFO SECTION ===== */
.temple-content {
    display: grid;
    grid-template-columns: 1.2fr 0.8fr;
    gap: 40px;
    align-items: stretch;
    position: relative;
}

.temple-info {
    position: relative;
    z-index: 2;
    display: flex;
}

.info-card {
    background: linear-gradient(135deg, var(--bg-card), var(--bg-secondary));
    padding: 60px 50px;
    border-radius: 30px;
    border: 2px solid rgba(255, 167, 38, 0.3);
    transition: var(--transition-smooth);
    position: relative;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    justify-content: center;
    width: 100%;
    height: 100%;
}

.info-card::before {
    content: '';
    position: absolute;
    top: -50%;
    right: -50%;
    width: 200%;
    height: 200%;
    background: radial-gradient(circle, rgba(255, 167, 38, 0.1) 0%, transparent 70%);
    animation: rotateGlow 15s linear infinite;
}

.info-card:hover {
    border-color: var(--accent-gold);
    box-shadow: 0 20px 60px rgba(255, 167, 38, 0.3);
    transform: translateY(-8px);
}

.info-card h3 {
    font-family: var(--font-serif);
    font-size: 36px;
    color: var(--accent-gold);
    margin-bottom: 50px;
    text-shadow: var(--glow-gold);
    position: relative;
    z-index: 1;
}

.info-list {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 30px 40px;
    position: relative;
    z-index: 1;
}

.info-list dt {
    font-size: 12px;
    color: var(--accent-gold);
    margin-bottom: 8px;
    text-transform: uppercase;
    letter-spacing: 2px;
    font-weight: 600;
}

.info-list dd {
    font-size: 20px;
    color: var(--text-primary);
    font-weight: 500;
    padding: 18px 0;
    border-bottom: 1px solid rgba(255, 167, 38, 0.15);
    transition: var(--transition-fast);
}

.info-list dd:hover {
    color: var(--accent-gold);
    padding-left: 10px;
    border-bottom-color: var(--accent-gold);
}

.temple-images {
    display: flex;
    flex-direction: column;
    gap: 30px;
    position: relative;
}

.temple-image-item {
    position: relative;
    transition: var(--transition-smooth);
}

.temple-image-item:first-child {
    transform: translateY(0);
}

.temple-image-item:last-child {
    transform: translateY(0);
}

.temple-image-item:hover {
    transform: translateY(-5px) scale(1.02);
    z-index: 3;
}

.image-wrapper {
    position: relative;
    border-radius: 25px;
    overflow: hidden;
    height: 320px;
    box-shadow: 0 15px 50px rgba(0, 0, 0, 0.4);
    border: 3px solid rgba(255, 167, 38, 0.2);
    transition: var(--transition-smooth);
}

.image-wrapper:hover {
    border-color: var(--accent-gold);
    box-shadow: 0 20px 60px rgba(255, 167, 38, 0.5);
}

.image-wrapper img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 1s cubic-bezier(0.4, 0, 0.2, 1);
}

.image-wrapper:hover img {
    transform: scale(1.15);
}

.image-wrapper .image-glow {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(
        45deg,
        rgba(216, 67, 21, 0.4),
        rgba(255, 167, 38, 0.4)
    );
    opacity: 0;
    transition: opacity 0.6s ease;
    mix-blend-mode: overlay;
}

.image-wrapper:hover .image-glow {
    opacity: 1;
}

/* ===== HISTORY SECTION ===== */
.history-section {
    background: var(--bg-secondary);
}

.timeline {
    position: relative;
    padding-left: 60px;
    max-width: 800px;
    margin: 0 auto;
}

.timeline::before {
    content: '';
    position: absolute;
    left: 20px;
    top: 0;
    bottom: 0;
    width: 2px;
    background: linear-gradient(
        to bottom,
        transparent,
        var(--accent-gold),
        transparent
    );
}

.timeline-item {
    position: relative;
    margin-bottom: 60px;
}

.timeline-marker {
    position: absolute;
    left: -48px;
    top: 8px;
    width: 16px;
    height: 16px;
    border-radius: 50%;
    background: var(--accent-gold);
    box-shadow: var(--glow-gold);
}

.timeline-year {
    display: inline-block;
    font-family: var(--font-serif);
    font-size: 20px;
    color: var(--accent-gold);
    margin-bottom: 10px;
}

.timeline-content h4 {
    font-family: var(--font-serif);
    font-size: 24px;
    color: var(--text-primary);
    margin-bottom: 15px;
}

.timeline-content p {
    color: var(--text-secondary);
    line-height: 1.8;
    font-size: 16px;
}

/* ===== LEGACY SECTION ===== */
.legacy-section {
    background: var(--bg-primary);
}

.legacy-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 30px;
    margin-top: 60px;
}

.legacy-card {
    position: relative;
    transition: var(--transition-smooth);
}

.legacy-card:hover {
    transform: translateY(-10px);
}

.legacy-image {
    position: relative;
    border-radius: 20px;
    overflow: hidden;
    aspect-ratio: 3/4;
    border: 2px solid rgba(255, 167, 38, 0.2);
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.3);
    transition: var(--transition-smooth);
}

.legacy-card:hover .legacy-image {
    border-color: var(--accent-gold);
    box-shadow: 0 15px 50px rgba(255, 167, 38, 0.4);
}

.legacy-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.8s ease;
}

.legacy-card:hover .legacy-image img {
    transform: scale(1.1);
}

.legacy-overlay {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    background: linear-gradient(
        to top,
        rgba(10, 14, 26, 0.95) 0%,
        rgba(10, 14, 26, 0.7) 50%,
        transparent 100%
    );
    padding: 30px 20px 20px;
    transform: translateY(100%);
    transition: transform 0.4s ease;
}

.legacy-card:hover .legacy-overlay {
    transform: translateY(0);
}

.legacy-info h4 {
    font-family: var(--font-serif);
    font-size: 20px;
    color: var(--accent-gold);
    margin-bottom: 5px;
    text-shadow: var(--glow-gold);
}

.legacy-info p {
    font-size: 14px;
    color: var(--text-secondary);
}

/* ===== PHILOSOPHY SECTION ===== */
.philosophy-content {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 80px;
    align-items: center;
}

.philosophy-text h3 {
    font-family: var(--font-serif);
    font-size: 24px;
    color: var(--accent-gold);
    margin-bottom: 20px;
    margin-top: 40px;
}

.philosophy-text h3:first-child {
    margin-top: 0;
}

.philosophy-text p {
    color: var(--text-secondary);
    line-height: 1.8;
    font-size: 16px;
}

.philosophy-image .image-wrapper {
    aspect-ratio: 3/4;
}

/* ===== KEYFRAME ANIMATIONS ===== */
@keyframes rotateGlow {
    0% {
        transform: rotate(0deg);
    }
    100% {
        transform: rotate(360deg);
    }
}

@keyframes pulseGlow {
    0%, 100% {
        opacity: 0.6;
        transform: scale(1);
    }
    50% {
        opacity: 1;
        transform: scale(1.05);
    }
}

@keyframes floatParticle {
    0% {
        bottom: 0;
        opacity: 0;
        transform: translateX(0) scale(0);
    }
    10% {
        opacity: 1;
        transform: translateX(10px) scale(1);
    }
    90% {
        opacity: 1;
        transform: translateX(-10px) scale(1);
    }
    100% {
        bottom: 100%;
        opacity: 0;
        transform: translateX(0) scale(0);
    }
}

/* ===== RESPONSIVE DESIGN ===== */

/* Tablet */
@media (max-width: 1024px) {
    .temple-content {
        grid-template-columns: 1fr;
        gap: 60px;
    }
    
    .temple-image-item:first-child,
    .temple-image-item:last-child {
        transform: translateX(0);
    }
    
    .info-card {
        padding: 50px 40px;
    }
    
    .philosophy-content {
        grid-template-columns: 1fr;
        gap: 60px;
    }
}

/* Mobile */
@media (max-width: 768px) {
    .page-header {
        padding: 120px 0 60px;
    }
    
    .about-hero-section {
        padding: 60px 0;
    }
    
    .hero-image-wrapper {
        border-radius: 20px;
    }
    
    .info-card {
        padding: 40px 25px;
    }
    
    .info-card h3 {
        font-size: 28px;
        margin-bottom: 35px;
    }
    
    .info-list {
        grid-template-columns: 1fr;
        gap: 20px;
    }
    
    .info-list dd {
        font-size: 18px;
    }
    
    .image-wrapper {
        height: 280px;
    }
    
    .timeline {
        padding-left: 40px;
    }
    
    .timeline-marker {
        left: -32px;
    }
    
    .timeline-item {
        margin-bottom: 40px;
    }
}

/* Small Mobile */
@media (max-width: 480px) {
    .about-hero-section {
        padding: 40px 0;
    }
    
    .info-card {
        padding: 30px 20px;
    }
}


/* ===== RESPONSIVE - LEGACY SECTION ===== */
@media (max-width: 1024px) {
    .legacy-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 25px;
    }
}

@media (max-width: 768px) {
    .legacy-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 20px;
    }
}

@media (max-width: 480px) {
    .legacy-grid {
        grid-template-columns: 1fr;
        gap: 20px;
    }
}
