/* ===========================================
   TYPOGRAPHY - CORMORANT GARAMOND FOR TITLES
   =========================================== */

/* 全てのタイトル要素にCormorant Garamondを適用 */
h1, h2, h3, h4, h5, h6,
.post-content h1, .post-content h2, .post-content h3, .post-content h4, .post-content h5, .post-content h6,
.page-content h1, .page-content h2, .page-content h3, .page-content h4, .page-content h5, .page-content h6,
.archive-header h1,
.post-title, .page-title,
.info-title,
.service-name,
.talent-name,
.section-title,
.hero-title,
.card-title {
    font-family: 'Cormorant Garamond', serif !important;
    font-weight: 400 !important;
}

/* より具体的なセレクターで確実に適用 */
body h1, body h2, body h3, body h4, body h5, body h6 {
    font-family: 'Cormorant Garamond', serif !important;
    font-weight: 400 !important;
}

.site-content h1, .site-content h2, .site-content h3, 
.site-content h4, .site-content h5, .site-content h6 {
    font-family: 'Cormorant Garamond', serif !important;
    font-weight: 400 !important;
}

/* ===========================================
   MAIN STYLES - BASE & GLOBALS
   MR8 Corporate Theme
   =========================================== */

/* Reset & Base Styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Arial', 'Helvetica Neue', sans-serif;
    background: #000;
    color: #fff;
    min-height: 100vh;
    position: relative;
    overflow-x: hidden;
    cursor: none; /* Hide default cursor */
}

/* 8をイメージした背景デザイン */
body::before {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: 
        radial-gradient(circle at 30% 25%, rgba(255, 255, 255, 0.06) 0%, transparent 40%),
        radial-gradient(circle at 70% 25%, rgba(255, 255, 255, 0.06) 0%, transparent 40%),
        radial-gradient(circle at 30% 75%, rgba(255, 255, 255, 0.06) 0%, transparent 40%),
        radial-gradient(circle at 70% 75%, rgba(255, 255, 255, 0.06) 0%, transparent 40%),
        linear-gradient(45deg, transparent 40%, rgba(255, 255, 255, 0.02) 50%, transparent 60%);
    pointer-events: none;
    z-index: -2;
}

body::after {
    content: '∞';
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    font-size: 600px;
    color: rgba(255, 255, 255, 0.02);
    font-weight: 100;
    pointer-events: none;
    z-index: -1;
    animation: infinityFloat 25s ease-in-out infinite;
    line-height: 1;
}

@keyframes infinityFloat {
    0%, 100% { 
        transform: translate(-50%, -50%) rotate(0deg) scale(1);
        opacity: 0.02;
    }
    25% { 
        transform: translate(-50%, -50%) rotate(5deg) scale(1.05);
        opacity: 0.04;
    }
    50% { 
        transform: translate(-50%, -50%) rotate(0deg) scale(1.1);
        opacity: 0.02;
    }
    75% { 
        transform: translate(-50%, -50%) rotate(-5deg) scale(1.05);
        opacity: 0.04;
    }
}

/* Animated Background Dots */
.animated-bg {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    overflow: hidden;
    z-index: -3;
    pointer-events: none;
}

.bg-dot {
    position: absolute;
    width: 2px;
    height: 2px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 50%;
    animation: floatDot 15s infinite ease-in-out;
}

.bg-dot:nth-child(odd) {
    animation-delay: -7s;
    background: rgba(255, 255, 255, 0.05);
}

.bg-dot:nth-child(3n) {
    animation-delay: -3s;
    animation-duration: 20s;
}

@keyframes floatDot {
    0%, 100% { 
        transform: translateY(100vh) translateX(0);
        opacity: 0;
    }
    10% { 
        opacity: 1;
    }
    90% { 
        opacity: 1;
    }
    100% { 
        transform: translateY(-100px) translateX(50px);
        opacity: 0;
    }
}

/* Scrollbar Styling */
::-webkit-scrollbar {
    width: 8px;
}

::-webkit-scrollbar-track {
    background: rgba(255, 255, 255, 0.05);
}

::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 0.2);
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: rgba(255, 255, 255, 0.3);
}

/* Selection Styles */
::selection {
    background: rgba(255, 255, 255, 0.2);
    color: #fff;
}

::-moz-selection {
    background: rgba(255, 255, 255, 0.2);
    color: #fff;
}

/* Link Styles */
a {
    color: rgba(255, 255, 255, 0.8);
    text-decoration: none;
    transition: all 0.3s ease;
}

a:hover {
    color: #fff;
}

/* Image Styles */
img {
    max-width: 100%;
    height: auto;
    display: block;
}

/* ===========================================
   UTILITY CLASSES
   =========================================== */

.hidden {
    opacity: 0;
    visibility: hidden;
}

.visible {
    opacity: 1;
    visibility: visible;
}

/* Section Backgrounds */
.mission-vision-section {
    background: linear-gradient(to bottom, transparent, rgba(49, 130, 206, 0.05), transparent);
}

.recruit-section {
    background: linear-gradient(to bottom, transparent, rgba(49, 130, 206, 0.1), transparent);
}

.contact-section {
    background: linear-gradient(to bottom, transparent, rgba(56, 161, 105, 0.1), transparent);
}

/* ===========================================
   SINGLE POST & PAGE STYLES
   =========================================== */

.single-post-container, .page-container {
    background: rgba(255, 255, 255, 0.03);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 20px;
    box-shadow: 0 8px 32px 0 rgba(0, 0, 0, 0.1);
}

.post-header, .page-header {
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    padding-bottom: 30px;
}

.post-title, .page-title {
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.9), rgba(255, 255, 255, 0.7));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.post-meta {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 15px;
    font-size: 14px;
    color: rgba(255, 255, 255, 0.7);
}

.post-meta span {
    padding: 5px 15px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 15px;
    border: 1px solid rgba(255, 255, 255, 0.15);
}

.post-thumbnail {
    border-radius: 15px;
    overflow: hidden;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
}

.post-content, .page-content {
    line-height: 1.8;
}

.post-content p, .page-content p {
    margin-bottom: 20px;
}

.post-content h1, .post-content h2, .post-content h3, .post-content h4, .post-content h5, .post-content h6,
.page-content h1, .page-content h2, .page-content h3, .page-content h4, .page-content h5, .page-content h6 {
    color: rgba(255, 255, 255, 0.95);
    margin-bottom: 15px;
    margin-top: 30px;
}

.post-content h1:first-child, .post-content h2:first-child, .post-content h3:first-child,
.page-content h1:first-child, .page-content h2:first-child, .page-content h3:first-child {
    margin-top: 0;
}

/* ===========================================
   ARCHIVE STYLES
   =========================================== */

.talent-archive, .service-archive {
    background: rgba(255, 255, 255, 0.02);
    border-radius: 20px;
    padding: 40px;
    margin: 20px;
}

.archive-header {
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    padding-bottom: 40px;
    margin-bottom: 60px;
}

.archive-header h1 {
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.9), rgba(255, 255, 255, 0.7));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

@media (max-width: 768px) {
    .single-post-container, .page-container,
    .talent-archive, .service-archive {
        margin: 10px;
        padding: 30px 20px;
    }

    .post-title, .page-title {
        font-size: 28px !important;
    }

    .archive-header h1 {
        font-size: 36px !important;
    }
}

@media (max-width: 480px) {
    .single-post-container, .page-container,
    .talent-archive, .service-archive {
        margin: 5px;
        padding: 25px 15px;
    }

    .post-title, .page-title {
        font-size: 24px !important;
    }

    .archive-header h1 {
        font-size: 28px !important;
    }

    .post-meta {
        flex-direction: column;
        gap: 10px;
    }
}