/* ============================================
   PASTE THIS INTO YOUR /public/css/npcs.css FILE
   (Replace the existing content)
   ============================================ */

/* Container with sidebar layout */
.container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 2rem;
    display: grid;
    grid-template-columns: 80px 1fr 80px; /* THINNER sidebars - was 1fr 900px 1fr */
    gap: 2rem;
}

.npc-header {
    grid-column: 1 / -1; /* Span all columns */
    text-align: center;
    margin-bottom: 2rem;
}

.orientation-tabs {
    grid-column: 1 / -1; /* Span all columns */
    display: flex;
    gap: 1rem;
    margin: 2rem 0;
    justify-content: center;
    flex-wrap: wrap;
}

.sort-controls {
    grid-column: 1 / -1; /* Span all columns */
}

/* Main content area */
.tab-content {
    grid-column: 2; /* Center column only */
    min-height: 400px;
}

/* NPC Grid - 4 cards per row */
.npc-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr); /* FIXED: 4 columns instead of auto-fill */
    gap: 1.5rem;
    padding: 1rem 0;
}

.npc-card {
    background: rgba(20, 20, 40, 0.8);
    border: 2px solid rgba(65, 225, 20, 0.2);
    border-radius: 12px;
    padding: 1.5rem;
    transition: all 0.3s ease;
}

.npc-card:hover {
    border-color: var(--cyan, #41e114);
    transform: translateY(-4px);
    box-shadow: 0 8px 24px rgba(65, 225, 20, 0.2);
}

.npc-image {
    width: 100%;
    height: 200px;
    overflow: hidden;
    border-radius: 8px;
    margin-bottom: 1rem;
    background: rgba(0, 0, 0, 0.3);
}

.npc-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: top; /* FIXED: Crop from bottom by keeping top visible */
}

.npc-name {
    color: var(--cyan, #41e114);
    font-size: 1.3rem;
    margin-bottom: 0.5rem;
}

/* Yellow location text instead of purple */
.npc-location {
    color: var(--yellow, #edff84) !important; 
    font-size: 1rem;
    margin-bottom: 0.8rem;
    font-weight: 600;
}

.npc-description {
    color: #d0d0ff;
    font-size: 0.95rem;
    line-height: 1.6;
}

/* Map Guide Styling */
.map-guide-section {
    background: rgba(20, 20, 40, 0.6);
    border: 2px solid rgba(65, 225, 20, 0.2);
    border-radius: 12px;
    padding: 2rem;
    margin: 0; /* Remove extra margin */
}

/* Smaller map images */
.map-guide-section img,
.map-content img,
.map-image {
    max-width: 500px !important; /* Reduced from 600px */
    width: 100%;
    height: auto;
    border-radius: 8px;
    margin: 1.5rem auto; /* Center the images */
    display: block;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
    border: 2px solid rgba(65, 225, 20, 0.2);
}

.map-image:hover {
    transform: scale(1.02);
    transition: transform 0.3s ease;
    border-color: var(--cyan, #41e114);
}

/* Ensure map content has proper spacing */
.map-content {
    max-width: 100%;
    overflow-x: hidden;
}

.map-content p {
    margin-bottom: 0.8rem;
    line-height: 1.6;
}

/* Tab buttons */
.tab-button {
    padding: 1rem 2rem;
    background: rgba(20, 20, 40, 0.8);
    border: 2px solid rgba(65, 225, 20, 0.3);
    border-radius: 8px;
    color: white;
    font-size: 1.1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
}

.tab-button:hover {
    border-color: var(--cyan, #41e114);
    background: rgba(65, 225, 20, 0.1);
}

.tab-button.active {
    background: var(--cyan, #41e114);
    color: black;
    border-color: var(--cyan, #41e114);
}

/* Sort controls */
.sort-controls {
    text-align: center;
    margin: 1.5rem 0;
    color: #d0d0ff;
}

.sort-controls a {
    color: var(--cyan, #41e114);
    text-decoration: none;
    padding: 0.5rem 1rem;
    border-radius: 4px;
    transition: all 0.2s ease;
}

.sort-controls a:hover {
    background: rgba(65, 225, 20, 0.1);
}

.sort-controls a.active {
    background: rgba(65, 225, 20, 0.2);
    font-weight: bold;
}

/* No NPCs message */
.no-npcs {
    text-align: center;
    padding: 3rem;
    color: #b0b0ff;
    font-size: 1.2rem;
}

/* RESPONSIVE DESIGN */

/* Large screens - 4 columns */
@media (min-width: 1400px) {
    .npc-grid {
        grid-template-columns: repeat(4, 1fr);
    }
}

/* Medium-large screens - 3 columns */
@media (max-width: 1399px) and (min-width: 1000px) {
    .npc-grid {
        grid-template-columns: repeat(3, 1fr);
    }
    
    .container {
        grid-template-columns: 40px 1fr 40px; /* Even thinner sidebars */
    }
}

/* Tablets - 2 columns */
@media (max-width: 999px) {
    .container {
        grid-template-columns: 20px 1fr 20px; /* Very thin sidebars */
        padding: 1.5rem;
    }
    
    .npc-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 1rem;
    }
    
    .tab-content {
        grid-column: 2; /* Still center column */
    }
}

/* Mobile - 1 column */
@media (max-width: 768px) {
    .container {
        grid-template-columns: 1fr; /* Single column, no sidebars */
        padding: 1rem;
    }
    
    .npc-header,
    .orientation-tabs,
    .sort-controls,
    .tab-content {
        grid-column: 1; /* All span the single column */
    }
    
    .npc-grid {
        grid-template-columns: 1fr; /* Single column on mobile */
        gap: 1rem;
    }
    
    .map-guide-section {
        padding: 1.5rem;
    }
    
    .map-guide-section img,
    .map-content img,
    .map-image {
        max-width: 100% !important; /* Full width on mobile */
    }
    
    .tab-button {
        padding: 0.75rem 1.5rem;
        font-size: 1rem;
    }
}

/* Small mobile */
@media (max-width: 480px) {
    .container {
        padding: 0.5rem;
    }
    
    .map-guide-section {
        padding: 1rem;
        border-radius: 8px;
    }
    
    .orientation-tabs {
        gap: 0.5rem;
    }
    
    .tab-button {
        padding: 0.6rem 1rem;
        font-size: 0.9rem;
    }
}
