/* factions.css - Revised 3-Card Header Section */

/* Add these gradient variables if they don't exist */
:root {
    --gradient-teal: linear-gradient(135deg, #0d9488 0%, #14b8a6 100%);
    --gradient-teal-hover: linear-gradient(135deg, #0f766e 0%, #0d9488 100%);
}

.dark {
    --gradient-teal: linear-gradient(135deg, #0f766e 0%, #14b8a6 100%);
    --gradient-teal-hover: linear-gradient(135deg, #115e59 0%, #0f766e 100%);
}

/* Dark mode specific styling for the Human tag */
.dark .image-card .guide-tag {
    background-color: rgba(15, 23, 42, 0.95);
    color: var(--color-foreground);
    /* This should be light color in dark mode */
    border: 1px solid rgba(255, 255, 255, 0.1);
}

/* 3-Card Header Section - Simple Square Fix */
.guide-header-cards {
    margin-bottom: 3rem;
}

.header-cards-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1.5rem;
    align-items: start;
}

/* Simple square cards using grid */
.header-card {
    background-color: var(--color-card);
    border: 1px solid var(--color-border);
    border-radius: var(--radius);
    padding: 1.5rem;
    transition: var(--transition);
    display: flex;
    flex-direction: column;
    position: relative;
    /* Simple square approach */
    aspect-ratio: 1;
    min-height: 0;
    /* Important for grid items */
    overflow: hidden;
}

.header-card:hover {
    border-color: var(--color-primary);
    box-shadow: var(--shadow-md);
}

/* Card 1: Jadeon Image with Tags */
.image-card {
    padding: 0;
}

.image-card .faction-image-container {
    width: 100%;
    height: 100%;
    position: relative;
    overflow: hidden;
}

.image-card .faction-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s ease;
}

.image-card:hover .faction-image {
    transform: scale(1.05);
}

.image-card .guide-meta {
    position: absolute;
    top: 1rem;
    left: 1rem;
    display: flex;
    gap: 0.5rem;
    z-index: 2;
}

.image-card .guide-tag {
    padding: 0.375rem 0.75rem;
    font-size: 0.75rem;
    font-weight: 600;
    background-color: rgba(255, 255, 255, 0.95);
    color: var(--color-foreground);
    border-radius: 9999px;
    border: 1px solid rgba(255, 255, 255, 0.2);
    backdrop-filter: blur(8px);
}

/* Card 2: Stats Overview Image */
.stats-card {
    padding: 0;
}

.stats-card .stats-image-container {
    width: 100%;
    height: 100%;
    position: relative;
    overflow: hidden;
}

.stats-card .stats-image {
    width: 100%;
    height: 100%;
    object-fit: contain;
    transition: transform 0.3s ease;
    background-color: var(--color-card);
    /* Add background for better contrast */
}

.stats-card:hover .stats-image {
    transform: scale(1.05);
}

.stats-card .stats-label {
    position: absolute;
    bottom: 1rem;
    left: 1rem;
    /* Changed from centered to left bottom */
    text-align: left;
    /* Align text to left */
    z-index: 2;
}

.stats-card .stats-label-text {
    display: inline-block;
    padding: 0.5rem 1rem;
    background: var(--gradient-teal);
    /* Changed from white to teal gradient */
    color: white;
    /* White text for better contrast */
    font-size: 0.875rem;
    font-weight: 700;
    border-radius: var(--radius);
    backdrop-filter: blur(8px);
    border: 1px solid rgba(255, 255, 255, 0.3);
    box-shadow: var(--shadow-md);
}

/* Card 3: Detailed Information */
.info-card {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    justify-content: center;
    overflow-y: auto;
}

.info-card h3 {
    font-size: 1.25rem;
    font-weight: 700;
    margin: 0;
    color: var(--color-foreground);
    text-align: center;
}

/* Server Availability */
.server-availability {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.server-availability h4 {
    font-size: 0.875rem;
    font-weight: 600;
    color: var(--color-muted);
    margin-bottom: 0.5rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.server-status {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.5rem 0.75rem;
    background-color: var(--color-background);
    border: 1px solid var(--color-border);
    border-radius: var(--radius);
}

.server-name {
    font-size: 0.8rem;
    font-weight: 500;
    color: var(--color-foreground);
}

.status-badge {
    padding: 0.2rem 0.6rem;
    font-size: 0.7rem;
    font-weight: 600;
    border-radius: 9999px;
    text-transform: uppercase;
}

.status-badge.available {
    background-color: rgba(16, 185, 129, 0.1);
    color: #10b981;
}

.status-badge.unavailable {
    background-color: rgba(148, 163, 184, 0.1);
    color: var(--color-muted);
}

/* Detailed Stats */
.detailed-stats {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
    flex-grow: 1;
}

.stat-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.5rem 0;
    border-bottom: 1px solid var(--color-border);
}

.stat-item:last-child {
    border-bottom: none;
}

.stat-label {
    font-size: 0.875rem;
    color: var(--color-muted);
    font-weight: 500;
}

.stat-value {
    font-size: 0.875rem;
    font-weight: 600;
    color: var(--color-foreground);
    text-align: right;
}

/* Responsive Design */
@media (max-width: 1024px) {
    .header-cards-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .info-card {
        grid-column: span 2;
        aspect-ratio: 2/1;
        /* Wider rectangle on tablet */
    }
}

@media (max-width: 768px) {
    .header-cards-grid {
        grid-template-columns: 1fr;
    }

    .info-card {
        grid-column: span 1;
        aspect-ratio: 1;
        /* Back to square on mobile */
    }

    .header-card {
        padding: 1rem;
    }
}

/* Guide Navigation */
.guide-navigation {
    background-color: var(--color-card);
    border: 1px solid var(--color-border);
    border-radius: var(--radius);
    padding: 1.5rem;
    margin-bottom: 2rem;
}

.guide-navigation h3 {
    font-size: 1.125rem;
    font-weight: 700;
    margin-bottom: 1rem;
    color: var(--color-foreground);
}

.content-nav {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.nav-link {
    padding: 0.5rem 1rem;
    font-size: 0.875rem;
    font-weight: 500;
    background-color: var(--color-background);
    border: 1px solid var(--color-border);
    border-radius: var(--radius);
    color: var(--color-foreground);
    text-decoration: none;
    transition: var(--transition);
}

.nav-link:hover {
    background-color: var(--color-card-hover);
    border-color: var(--color-primary);
    color: var(--color-primary);
}

/* Guide Content - Apply max-width constraint */
.guide-content {
    max-width: 1280px;
    margin: 0 auto;
    padding: 0 1.5rem;
}

/* Pros-Cons with colored boxes */
.pros-cons {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 2rem;
    margin-top: 1.5rem;
    max-width: 100%;
}

.pros {
    background-color: rgba(16, 185, 129, 0.1);
    border: 1px solid rgba(16, 185, 129, 0.3);
    border-radius: var(--radius);
    padding: 1.5rem;
    max-width: 100%;
}

.pros h3 {
    color: #10b981;
    margin-top: 0;
}

.cons {
    background-color: rgba(239, 68, 68, 0.1);
    border: 1px solid rgba(239, 68, 68, 0.3);
    border-radius: var(--radius);
    padding: 1.5rem;
    max-width: 100%;
}

.cons h3 {
    color: #ef4444;
    margin-top: 0;
}

.pros ul,
.cons ul {
    color: var(--color-muted);
    padding-left: 1.25rem;
    margin: 0;
}

.pros li,
.cons li {
    margin-bottom: 0.5rem;
    line-height: 1.5;
}

.pros li:last-child,
.cons li:last-child {
    margin-bottom: 0;
}

/* Make sure all section cards use the same grid within the max-width */
.guide-section .section-cards-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1.5rem;
    align-items: start;
    max-width: 100%;
}

/* Section cards - same as header cards */
.section-card {
    background-color: var(--color-card);
    border: 1px solid var(--color-border);
    border-radius: var(--radius);
    padding: 1.5rem;
    transition: var(--transition);
    display: flex;
    flex-direction: column;
    aspect-ratio: 1;
    min-height: 0;
    overflow: hidden;
    max-width: 100%;
}

.section-card:hover {
    border-color: var(--color-primary);
    box-shadow: var(--shadow-md);
}

.section-card-header {
    margin-bottom: 1rem;
}

.section-card-header h3 {
    font-size: 1.25rem;
    font-weight: 700;
    margin: 0;
    color: var(--color-foreground);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.section-card-content {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 1rem;
    overflow-y: auto;
}

/* Adjust content sizing to fit within squares */
.skill-item-card,
.equipment-item-card,
.strategy-item {
    padding: 0.75rem;
    background-color: var(--color-background);
    border: 1px solid var(--color-border);
    border-radius: var(--radius);
    margin-bottom: 0.75rem;
    max-width: 100%;
}

.skill-item-card:last-child,
.equipment-item-card:last-child,
.strategy-item:last-child {
    margin-bottom: 0;
}

.skill-item-card h4,
.equipment-item-card h4,
.strategy-item h4 {
    font-size: 0.875rem;
    font-weight: 600;
    margin: 0 0 0.25rem;
    color: var(--color-foreground);
}

.skill-item-card p,
.equipment-item-card p,
.strategy-item p {
    font-size: 0.8rem;
    margin: 0 0 0.5rem;
    color: var(--color-muted);
    line-height: 1.3;
}

/* Compact styles for all content */
.skill-meta {
    display: flex;
    gap: 0.375rem;
}

.skill-type, .skill-cost {
    padding: 0.2rem 0.4rem;
    font-size: 0.7rem;
    font-weight: 600;
    border-radius: var(--radius);
    background-color: var(--color-card);
    color: var(--color-muted);
}

.item-stats-compact {
    display: flex;
    flex-direction: column;
    gap: 0.2rem;
}

.item-stats-compact .stat {
    font-size: 0.75rem;
    color: var(--color-primary);
    font-weight: 500;
}

.affinity-type-tag {
    display: inline-block;
    padding: 0.25rem 0.5rem;
    font-size: 0.75rem;
    font-weight: 600;
    background-color: var(--color-background);
    color: var(--color-primary);
    border-radius: 9999px;
    margin-bottom: 0.5rem;
}

.matchup-item-card {
    padding: 0.75rem;
    border-radius: var(--radius);
    border-left: 3px solid;
    margin-bottom: 0.75rem;
    max-width: 100%;
}

.matchup-item-card:last-child {
    margin-bottom: 0;
}

.matchup-item-card.favorable {
    border-left-color: #10b981;
    background-color: rgba(16, 185, 129, 0.05);
}

.matchup-item-card.neutral {
    border-left-color: #f59e0b;
    background-color: rgba(245, 158, 11, 0.05);
}

.matchup-item-card.unfavorable {
    border-left-color: #ef4444;
    background-color: rgba(239, 68, 68, 0.05);
}

/* Ensure guide sections stay within max-width */
.guide-section {
    margin-bottom: 3rem;
    padding-bottom: 2rem;
    border-bottom: 1px solid var(--color-border);
    max-width: 100%;
}

.guide-section:last-of-type {
    border-bottom: none;
}

/* Responsive - same as header cards */
@media (max-width: 1024px) {
    .guide-section .section-cards-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .section-card {
        aspect-ratio: 2/1;
    }
    
    .pros-cons {
        grid-template-columns: 1fr;
        gap: 1rem;
    }
}

@media (max-width: 768px) {
    .guide-content {
        padding: 0 1rem;
    }
    
    .guide-section .section-cards-grid {
        grid-template-columns: 1fr;
    }
    
    .section-card {
        aspect-ratio: 1;
        padding: 1rem;
    }
    
    .pros-cons {
        grid-template-columns: 1fr;
    }
}

/* Calculator CTA Button Styles - Improved */
.calculator-cta {
    display: flex;
    justify-content: center;
    margin: 2.5rem 0;
    padding: 0 1rem;
}

.calculator-btn {
    display: inline-flex;
    flex-direction: column;
    align-items: center;
    gap: 0.75rem;
    padding: 2rem 2.5rem;
    background: var(--gradient-teal);
    color: white;
    text-decoration: none;
    border-radius: var(--radius);
    font-weight: 600;
    transition: var(--transition);
    box-shadow: var(--shadow-md);
    text-align: center;
    max-width: 450px;
    width: 100%;
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.calculator-btn span:first-child {
    font-size: 1.5rem;
    font-weight: 700;
    letter-spacing: 0.025em;
}

.calculator-btn span:last-child {
    font-size: 1rem;
    opacity: 0.95;
    line-height: 1.4;
}

.calculator-btn:hover {
    transform: translateY(-3px);
    box-shadow: var(--shadow-lg);
    background: var(--gradient-teal-hover);
}

/* Responsive adjustments */
@media (max-width: 768px) {
    .calculator-btn {
        padding: 1.75rem 2rem;
        max-width: 100%;
    }
    
    .calculator-btn span:first-child {
        font-size: 1.25rem;
    }
    
    .calculator-btn span:last-child {
        font-size: 0.9rem;
    }
}

@media (max-width: 480px) {
    .calculator-btn {
        padding: 1.5rem 1.5rem;
        gap: 0.5rem;
    }
    
    .calculator-btn span:first-child {
        font-size: 1.1rem;
    }
    
    .calculator-btn span:last-child {
        font-size: 0.85rem;
    }
}

/* Coming Soon Box Styles */
.coming-soon-cta {
    display: flex;
    justify-content: center;
    margin: 2.5rem 0;
    padding: 0 1rem;
}

.coming-soon-box {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 0.75rem;
    padding: 2rem 2.5rem;
    background: var(--color-card);
    color: var(--color-foreground);
    border: 2px dashed var(--color-border);
    border-radius: var(--radius);
    font-weight: 600;
    text-align: center;
    max-width: 450px;
    width: 100%;
    cursor: not-allowed;
    opacity: 0.8;
}

.coming-soon-box span:first-child {
    font-size: 1.5rem;
    font-weight: 700;
    letter-spacing: 0.025em;
}

.coming-soon-box span:last-child {
    font-size: 1rem;
    opacity: 0.8;
    line-height: 1.4;
}

/* Responsive adjustments */
@media (max-width: 768px) {
    .coming-soon-box {
        padding: 1.75rem 2rem;
        max-width: 100%;
    }
    
    .coming-soon-box span:first-child {
        font-size: 1.25rem;
    }
    
    .coming-soon-box span:last-child {
        font-size: 0.9rem;
    }
}

@media (max-width: 480px) {
    .coming-soon-box {
        padding: 1.5rem 1.5rem;
        gap: 0.5rem;
    }
    
    .coming-soon-box span:first-child {
        font-size: 1.1rem;
    }
    
    .coming-soon-box span:last-child {
        font-size: 0.85rem;
    }
}

/* PvP Guide Discord Box Styles */
.guide-section#pvp .discord-cta {
    display: flex;
    justify-content: center;
    align-items: center;
    margin: 2.5rem 0;
    padding: 0;
    width: 100%;
}

.guide-section#pvp .discord-box {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 0.75rem;
    padding: 2rem 2.5rem;
    background: var(--color-card);
    color: var(--color-foreground);
    border: 2px solid var(--color-primary);
    border-radius: var(--radius);
    font-weight: 600;
    text-align: center;
    max-width: 500px;
    width: 100%;
    text-decoration: none;
    transition: var(--transition);
    margin: 0 auto;
}

.guide-section#pvp .discord-box:hover {
    background: var(--color-card-hover);
    border-color: var(--color-primary-hover);
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
}

.guide-section#pvp .discord-box span:first-child {
    font-size: 1.5rem;
    font-weight: 700;
    letter-spacing: 0.025em;
    color: var(--color-primary);
}

.guide-section#pvp .discord-box span:last-child {
    font-size: 1rem;
    opacity: 0.9;
    line-height: 1.4;
}

/* Responsive adjustments */
@media (max-width: 768px) {
    .guide-section#pvp .discord-box {
        padding: 1.75rem 2rem;
        max-width: 100%;
    }
    
    .guide-section#pvp .discord-box span:first-child {
        font-size: 1.25rem;
    }
    
    .guide-section#pvp .discord-box span:last-child {
        font-size: 0.9rem;
    }
}

@media (max-width: 480px) {
    .guide-section#pvp .discord-box {
        padding: 1.5rem 1.5rem;
        gap: 0.5rem;
    }
    
    .guide-section#pvp .discord-box span:first-child {
        font-size: 1.1rem;
    }
    
    .guide-section#pvp .discord-box span:last-child {
        font-size: 0.85rem;
    }
}