/* =========================================
   POST-TRANSITION METALS CATEGORY PAGE
   Complete Teal/Cyan Theme Styling
   ========================================= */

/* CSS Variables - Teal/Cyan Theme */
:root {
    --ptm-primary: #06b6d4;
    --ptm-secondary: #0891b2;
    --ptm-dark: #0e7490;
    --ptm-accent: #67e8f9;
    --ptm-light: #a5f3fc;
    --ptm-glow: rgba(6, 182, 212, 0.4);
    --ptm-gradient: linear-gradient(135deg, #06b6d4 0%, #0891b2 50%, #0e7490 100%);
    --ptm-shadow-sm: 0 2px 8px rgba(6, 182, 212, 0.15);
    --ptm-shadow-md: 0 8px 24px rgba(6, 182, 212, 0.2);
    --ptm-shadow-lg: 0 16px 48px rgba(6, 182, 212, 0.25);
    --ptm-shadow-xl: 0 24px 64px rgba(6, 182, 212, 0.3);
}

/* Override category color with post-transition theme */
.post-transition-page {
    --category-color: var(--ptm-primary);
    background: #0a0f1b;
    min-height: 100vh;
    position: relative;
}

/* ===================================
   HERO SECTION
   =================================== */

.ptm-hero {
    position: relative;
    min-height: 70vh;
    background: linear-gradient(135deg, 
        rgba(6, 182, 212, 0.1) 0%, 
        #0a0f1b 40%, 
        rgba(14, 116, 144, 0.1) 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 120px 20px 80px;
    overflow: hidden;
}

.ptm-hero::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: 
        radial-gradient(circle at 20% 50%, var(--ptm-glow) 0%, transparent 50%),
        radial-gradient(circle at 80% 50%, rgba(103, 232, 249, 0.2) 0%, transparent 50%);
    animation: heroGlow 8s ease-in-out infinite alternate;
}

@keyframes heroGlow {
    0% { opacity: 0.3; }
    100% { opacity: 0.6; }
}

/* Metallic Grid Background */
.metallic-grid {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
}

.metal-particle {
    position: absolute;
    font-family: 'Orbitron', monospace;
    font-weight: 900;
    font-size: 2rem;
    background: linear-gradient(135deg, var(--ptm-light), var(--ptm-accent));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    opacity: 0.15;
    animation: floatParticle 20s ease-in-out infinite;
}

.metal-particle:nth-child(1) { top: 10%; left: 5%; animation-delay: 0s; }
.metal-particle:nth-child(2) { top: 20%; right: 10%; animation-delay: 3s; }
.metal-particle:nth-child(3) { bottom: 30%; left: 15%; animation-delay: 6s; }
.metal-particle:nth-child(4) { top: 40%; left: 50%; animation-delay: 9s; }
.metal-particle:nth-child(5) { bottom: 20%; right: 20%; animation-delay: 12s; }
.metal-particle:nth-child(6) { top: 60%; right: 40%; animation-delay: 15s; }
.metal-particle:nth-child(7) { bottom: 40%; left: 40%; animation-delay: 18s; }

@keyframes floatParticle {
    0%, 100% { transform: translateY(0) scale(1); opacity: 0.15; }
    50% { transform: translateY(-30px) scale(1.1); opacity: 0.3; }
}

/* Hero Content */
.hero-content {
    position: relative;
    z-index: 2;
    text-align: center;
    max-width: 1200px;
    margin: 0 auto;
}

.hero-title {
    font-family: 'Orbitron', monospace;
    font-size: clamp(2.5rem, 7vw, 5rem);
    font-weight: 900;
    margin-bottom: 20px;
    background: linear-gradient(135deg, var(--ptm-light), var(--ptm-primary), var(--ptm-accent));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    text-transform: uppercase;
    letter-spacing: 4px;
    text-shadow: 0 0 60px var(--ptm-glow);
    animation: titleGlow 3s ease-in-out infinite alternate;
}

@keyframes titleGlow {
    0% { filter: brightness(1); }
    100% { filter: brightness(1.2); }
}

.hero-subtitle {
    font-size: clamp(1rem, 2.5vw, 1.5rem);
    color: #cbd5e1;
    margin-bottom: 40px;
    max-width: 800px;
    margin-left: auto;
    margin-right: auto;
    line-height: 1.6;
    opacity: 0.9;
}

/* Hero Stats */
.ptm-hero-stats {
    display: flex;
    justify-content: center;
    gap: clamp(30px, 5vw, 60px);
    flex-wrap: wrap;
    margin-top: 40px;
}

.ptm-hero-stat {
    text-align: center;
    animation: statPulse 2s ease-in-out infinite;
}

.ptm-hero-stat:nth-child(1) { animation-delay: 0s; }
.ptm-hero-stat:nth-child(2) { animation-delay: 0.3s; }
.ptm-hero-stat:nth-child(3) { animation-delay: 0.6s; }

@keyframes statPulse {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-5px); }
}

.ptm-hero-stat-value {
    font-family: 'Orbitron', monospace;
    font-size: clamp(2rem, 4vw, 3rem);
    font-weight: 900;
    background: var(--ptm-gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    margin-bottom: 10px;
    filter: drop-shadow(0 0 20px var(--ptm-glow));
}

.ptm-hero-stat-label {
    font-size: 0.9rem;
    color: #94a3b8;
    text-transform: uppercase;
    letter-spacing: 2px;
}

/* ===================================
   BREADCRUMB NAVIGATION
   =================================== */

.ptm-breadcrumb {
    background: rgba(6, 182, 212, 0.05);
    border-bottom: 1px solid rgba(6, 182, 212, 0.2);
    padding: 15px 0;
}

.ptm-breadcrumb-list {
    max-width: 1600px;
    margin: 0 auto;
    padding: 0 20px;
    display: flex;
    align-items: center;
    list-style: none;
    font-size: 0.9rem;
}

.ptm-breadcrumb-link {
    color: var(--ptm-accent);
    text-decoration: none;
    transition: all 0.3s ease;
    position: relative;
}

.ptm-breadcrumb-link:hover {
    color: var(--ptm-light);
    text-shadow: 0 0 10px var(--ptm-glow);
}

.ptm-breadcrumb-link::after {
    content: '';
    position: absolute;
    bottom: -2px;
    left: 0;
    width: 0;
    height: 2px;
    background: var(--ptm-gradient);
    transition: width 0.3s ease;
}

.ptm-breadcrumb-link:hover::after {
    width: 100%;
}

.ptm-breadcrumb-separator {
    margin: 0 10px;
    color: #475569;
}

.ptm-breadcrumb-current {
    color: #cbd5e1;
    font-weight: 600;
}

/* ===================================
   CONTENT SECTIONS
   =================================== */

main {
    max-width: 1600px;
    margin: 0 auto;
    padding: 0 20px;
    position: relative;
    z-index: 1;
}

.content-section {
    margin-bottom: 80px;
    opacity: 0;
    animation: fadeInUp 0.8s ease forwards;
}

.content-section:nth-child(1) { animation-delay: 0.1s; }
.content-section:nth-child(2) { animation-delay: 0.2s; }
.content-section:nth-child(3) { animation-delay: 0.3s; }
.content-section:nth-child(4) { animation-delay: 0.4s; }

@keyframes fadeInUp {
    0% {
        opacity: 0;
        transform: translateY(30px);
    }
    100% {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Section Titles */
.section-title {
    font-family: 'Orbitron', monospace;
    font-size: clamp(2rem, 4vw, 3rem);
    font-weight: 800;
    margin-bottom: 40px;
    text-align: center;
    background: linear-gradient(135deg, var(--ptm-light), var(--ptm-primary));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    text-transform: uppercase;
    letter-spacing: 2px;
    position: relative;
}

.section-title::after {
    content: '';
    position: absolute;
    bottom: -15px;
    left: 50%;
    transform: translateX(-50%);
    width: 100px;
    height: 3px;
    background: var(--ptm-gradient);
    box-shadow: 0 0 20px var(--ptm-glow);
}

/* ===================================
   TABLE OF CONTENTS
   =================================== */

.ptm-toc-container {
    background: linear-gradient(135deg, 
        rgba(6, 182, 212, 0.05) 0%, 
        rgba(14, 116, 144, 0.02) 100%);
    border: 1px solid rgba(6, 182, 212, 0.2);
    border-radius: 20px;
    padding: 40px;
    backdrop-filter: blur(10px);
    box-shadow: var(--ptm-shadow-lg);
}

.ptm-toc-container h3 {
    font-family: 'Orbitron', monospace;
    font-size: 1.3rem;
    color: var(--ptm-secondary) !important;
    margin-bottom: 15px;
    font-weight: 700;
}

.ptm-toc-container a {
    color: #94a3b8 !important;
    text-decoration: none !important;
    transition: all 0.3s ease;
    display: inline-block;
    padding-left: 20px;
    position: relative;
}

.ptm-toc-container a::before {
    content: '→';
    position: absolute;
    left: 0;
    transition: transform 0.3s ease;
}

.ptm-toc-container a:hover {
    color: var(--ptm-accent) !important;
    transform: translateX(5px);
}

.ptm-toc-container a:hover::before {
    transform: translateX(5px);
    color: var(--ptm-primary);
}

/* ===================================
   ELEMENT GRID & CARDS
   =================================== */

.element-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(350px, 1fr));
    gap: 25px;
    margin-top: 40px;
}

.element-card {
    background: linear-gradient(135deg, 
        rgba(6, 182, 212, 0.08) 0%, 
        rgba(14, 116, 144, 0.04) 100%);
    border: 2px solid rgba(6, 182, 212, 0.3);
    border-radius: 15px;
    padding: 25px;
    text-align: center;
    cursor: pointer;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
    backdrop-filter: blur(5px);
}

.element-card::before {
    content: '';
    position: absolute;
    top: -100%;
    left: -100%;
    width: 300%;
    height: 300%;
    background: radial-gradient(circle, var(--ptm-glow) 0%, transparent 70%);
    opacity: 0;
    transition: opacity 0.3s ease;
}

.element-card:hover {
    transform: translateY(-8px) scale(1.03);
    border-color: var(--ptm-primary);
    box-shadow: 
        0 20px 40px rgba(6, 182, 212, 0.3),
        inset 0 0 20px rgba(6, 182, 212, 0.1);
    background: linear-gradient(135deg, 
        rgba(6, 182, 212, 0.15) 0%, 
        rgba(14, 116, 144, 0.08) 100%);
}

.element-card:hover::before {
    opacity: 0.3;
}

.element-number {
    position: absolute;
    top: 12px;
    right: 15px;
    font-size: 0.85rem;
    color: var(--ptm-accent);
    opacity: 0.7;
    font-family: 'JetBrains Mono', monospace;
    font-weight: 600;
}

.element-symbol {
    font-family: 'Orbitron', monospace;
    font-size: 2.8rem;
    font-weight: 900;
    background: linear-gradient(135deg, var(--ptm-light), var(--ptm-accent));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    margin-bottom: 10px;
    filter: drop-shadow(0 0 15px var(--ptm-glow));
    transition: all 0.3s ease;
}

.element-card:hover .element-symbol {
    transform: scale(1.1);
    filter: drop-shadow(0 0 25px var(--ptm-glow));
}

.element-name {
    font-size: 1.15rem;
    font-weight: 600;
    color: #e2e8f0;
    margin-bottom: 8px;
    font-family: 'Inter', sans-serif;
}

.element-mass {
    font-size: 0.9rem;
    color: #94a3b8;
    font-family: 'JetBrains Mono', monospace;
}

/* Featured Elements */
.element-card.featured {
    background: linear-gradient(135deg, 
        rgba(103, 232, 249, 0.15) 0%, 
        rgba(6, 182, 212, 0.1) 100%);
    border-color: var(--ptm-accent);
    animation: featurePulse 3s ease-in-out infinite;
}

@keyframes featurePulse {
    0%, 100% { box-shadow: 0 0 20px rgba(103, 232, 249, 0.3); }
    50% { box-shadow: 0 0 40px rgba(103, 232, 249, 0.5); }
}

/* ===================================
   PROPERTY TABLES
   =================================== */

.properties-table {
    width: 100%;
    border-collapse: separate;
    border-spacing: 0;
    background: rgba(10, 15, 27, 0.6);
    border-radius: 15px;
    overflow: hidden;
    box-shadow: var(--ptm-shadow-lg);
    margin-top: 30px;
}

.properties-table thead {
    background: var(--ptm-gradient);
}

.properties-table th {
    padding: 18px;
    text-align: left;
    color: white;
    font-weight: 700;
    font-size: 0.95rem;
    text-transform: uppercase;
    letter-spacing: 1.5px;
    font-family: 'Orbitron', monospace;
}

.properties-table td {
    padding: 15px 18px;
    color: #cbd5e1;
    border-bottom: 1px solid rgba(6, 182, 212, 0.1);
    font-family: 'JetBrains Mono', monospace;
    font-size: 0.95rem;
}

.properties-table tbody tr {
    transition: all 0.3s ease;
}

.properties-table tbody tr:hover {
    background: rgba(6, 182, 212, 0.08);
    transform: scale(1.01);
}

.properties-table tbody tr:last-child td {
    border-bottom: none;
}

/* ===================================
   APPLICATION CARDS
   =================================== */

.applications-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
    gap: 35px;
    margin-top: 40px;
}

.application-card {
    background: linear-gradient(135deg, 
        rgba(6, 182, 212, 0.05) 0%, 
        rgba(10, 15, 27, 0.8) 100%);
    border: 2px solid rgba(6, 182, 212, 0.2);
    border-radius: 20px;
    padding: 35px;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.application-card::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 4px;
    background: var(--ptm-gradient);
    transform: scaleX(0);
    transition: transform 0.3s ease;
}

.application-card:hover {
    transform: translateY(-10px);
    box-shadow: var(--ptm-shadow-xl);
    border-color: var(--ptm-primary);
}

.application-card:hover::after {
    transform: scaleX(1);
}

.application-title,
.app-title {
    font-size: 1.8rem;
    font-weight: 700;
    color: var(--ptm-light);
    margin-bottom: 20px;
    display: flex;
    align-items: center;
    gap: 15px;
    font-family: 'Orbitron', monospace;
}

.application-icon,
.app-icon,
.ptm-app-icon {
    font-size: 2.2rem;
    color: var(--ptm-primary);
    filter: drop-shadow(0 0 10px var(--ptm-glow));
}

.application-content,
.app-content {
    color: #cbd5e1;
    line-height: 1.8;
    font-size: 1.05rem;
}

.app-content p {
    margin-bottom: 15px;
}

/* ===================================
   QUIZ CTA SECTION
   =================================== */

.quiz-cta {
    background: var(--ptm-gradient);
    border-radius: 25px;
    padding: 70px 40px;
    text-align: center;
    margin: 80px 0;
    position: relative;
    overflow: hidden;
    box-shadow: var(--ptm-shadow-xl);
}

.quiz-cta::before {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: radial-gradient(circle, 
        rgba(255, 255, 255, 0.1) 0%, 
        transparent 50%);
    animation: rotateGlow 20s linear infinite;
}

.quiz-cta::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: 
        linear-gradient(45deg, transparent 30%, rgba(255, 255, 255, 0.1) 50%, transparent 70%);
    animation: shineEffect 3s ease-in-out infinite;
}

@keyframes rotateGlow {
    from { transform: rotate(0deg); }
    to { transform: rotate(360deg); }
}

@keyframes shineEffect {
    0% { transform: translateX(-100%); }
    100% { transform: translateX(100%); }
}

.quiz-title {
    font-family: 'Orbitron', monospace;
    font-size: clamp(2rem, 4vw, 3rem);
    font-weight: 900;
    color: white;
    margin-bottom: 20px;
    position: relative;
    z-index: 1;
    text-transform: uppercase;
    letter-spacing: 3px;
    text-shadow: 0 2px 10px rgba(0, 0, 0, 0.3);
}

.quiz-description {
    font-size: 1.25rem;
    color: rgba(255, 255, 255, 0.95);
    margin-bottom: 35px;
    position: relative;
    z-index: 1;
    max-width: 600px;
    margin-left: auto;
    margin-right: auto;
}

.quiz-button {
    display: inline-block;
    padding: 18px 45px;
    background: white;
    color: var(--ptm-primary);
    border-radius: 50px;
    font-weight: 700;
    font-size: 1.15rem;
    text-decoration: none;
    transition: all 0.3s ease;
    position: relative;
    z-index: 1;
    font-family: 'Orbitron', monospace;
    text-transform: uppercase;
    letter-spacing: 1px;
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.2);
}

.quiz-button:hover {
    transform: translateY(-3px) scale(1.05);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
    background: linear-gradient(135deg, white, #f0f9ff);
}

/* ===================================
   FONT AWESOME ICON FIXES
   =================================== */

.post-transition-page i[class^="fa"],
.post-transition-page i[class*=" fa"] {
    display: inline-block;
    width: auto;
    height: auto;
    font-size: inherit;
    line-height: 1;
    vertical-align: middle;
}

.ptm-highlight-icon {
    font-size: 1.3rem;
    color: var(--ptm-secondary);
    margin-right: 10px;
    filter: drop-shadow(0 0 5px var(--ptm-glow));
}

/* ===================================
   RESPONSIVE DESIGN
   =================================== */

@media (max-width: 1024px) {
    .element-grid {
        grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
    }
    
    .applications-grid {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 768px) {
    .ptm-hero {
        min-height: 60vh;
        padding: 100px 20px 60px;
    }
    
    .hero-title {
        letter-spacing: 2px;
    }
    
    .ptm-hero-stats {
        gap: 20px;
    }
    
    .element-grid {
        grid-template-columns: repeat(auto-fill, minmax(120px, 1fr));
        gap: 15px;
    }
    
    .element-symbol {
        font-size: 2.2rem;
    }
    
    .section-title {
        font-size: 2rem;
    }
    
    .quiz-cta {
        padding: 50px 30px;
    }
    
    .properties-table {
        font-size: 0.85rem;
    }
    
    .properties-table th,
    .properties-table td {
        padding: 12px;
    }
    
    .ptm-toc-container {
        padding: 25px;
    }
}

@media (max-width: 480px) {
    .hero-title {
        font-size: 2rem;
        letter-spacing: 1px;
    }
    
    .hero-subtitle {
        font-size: 1rem;
    }
    
    .ptm-hero-stat-value {
        font-size: 1.8rem;
    }
    
    .element-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .element-card {
        padding: 20px;
    }
    
    .element-symbol {
        font-size: 1.8rem;
    }
    
    .quiz-title {
        font-size: 1.5rem;
    }
    
    .quiz-button {
        padding: 15px 35px;
        font-size: 1rem;
    }
}

/* ===================================
   UTILITY CLASSES
   =================================== */

.post-transition-page .text-center {
    text-align: center;
}

.post-transition-page .mb-4 {
    margin-bottom: 2rem;
}

.post-transition-page .mb-6 {
    margin-bottom: 3rem;
}

.post-transition-page .container {
    max-width: 1600px;
    margin: 0 auto;
    padding: 0 20px;
}

/* ===================================
   ANIMATIONS & TRANSITIONS
   =================================== */

.post-transition-page * {
    transition: color 0.3s ease, background-color 0.3s ease;
}

.post-transition-page a {
    transition: all 0.3s ease;
}

.post-transition-page button,
.post-transition-page .btn {
    transition: all 0.3s ease;
    cursor: pointer;
}

/* Smooth scroll behavior */
html {
    scroll-behavior: smooth;
}

/* Selection colors */
.post-transition-page ::selection {
    background: var(--ptm-primary);
    color: white;
}

.post-transition-page ::-moz-selection {
    background: var(--ptm-primary);
    color: white;
}

/* Custom scrollbar */
.post-transition-page::-webkit-scrollbar {
    width: 12px;
}

.post-transition-page::-webkit-scrollbar-track {
    background: rgba(6, 182, 212, 0.1);
}

.post-transition-page::-webkit-scrollbar-thumb {
    background: var(--ptm-gradient);
    border-radius: 6px;
}

.post-transition-page::-webkit-scrollbar-thumb:hover {
    background: var(--ptm-primary);
}

/* ===================================
   PRINT STYLES
   =================================== */

@media print {
    .post-transition-page .quiz-cta,
    .post-transition-page .ptm-hero,
    .post-transition-page .metallic-grid {
        display: none;
    }
    
    .post-transition-page {
        background: white;
        color: black;
    }
    
    .post-transition-page .section-title {
        -webkit-text-fill-color: black;
        color: black;
    }
}

/* ===================================
   LOADING STATES
   =================================== */

.post-transition-page .loading {
    position: relative;
    opacity: 0.5;
    pointer-events: none;
}

.post-transition-page .loading::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 40px;
    height: 40px;
    border: 4px solid var(--ptm-primary);
    border-top-color: transparent;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    to { transform: translate(-50%, -50%) rotate(360deg); }
}

/* ===================================
   ACCESSIBILITY IMPROVEMENTS
   =================================== */

.skip-to-content {
    position: absolute;
    top: -40px;
    left: 0;
    background: var(--ptm-primary);
    color: white;
    padding: 8px;
    text-decoration: none;
    z-index: 100;
}

.skip-to-content:focus {
    top: 0;
}

/* Focus styles */
.post-transition-page a:focus,
.post-transition-page button:focus {
    outline: 2px solid var(--ptm-accent);
    outline-offset: 2px;
}

/* Reduced motion */
@media (prefers-reduced-motion: reduce) {
    .post-transition-page *,
    .post-transition-page *::before,
    .post-transition-page *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
}