/* styles/directory.css */
body { background-color: #fffdf8; }

.map-container { 
    max-width: 1200px; 
    margin: 0 auto; 
    padding: 20px;
}

.directory-grid {
    display: grid !important;
    grid-template-columns: repeat(3, 1fr) !important;
    gap: 30px !important; /* Wider gap for less crowded feel */
    align-items: start;
}

/* THE TILE: Made bigger and deeper by default */
.dir-card {
    background: #fff;
    border: 1px solid #b08a48;
    border-radius: 16px; /* Rounder corners */
    transition: all 0.4s cubic-bezier(0.165, 0.84, 0.44, 1);
    cursor: pointer;
    position: relative;
    min-height: 180px; /* Increased initial depth */
    display: flex;
    flex-direction: column;
    justify-content: center; /* Centers content in the big white space */
    box-shadow: 0 4px 15px rgba(176,138,72,0.08);
}

/* HEADER: Added more padding for that "Airy" look */
.dir-header { 
    padding: 30px 20px; 
    display: flex; 
    flex-direction: column; /* Stacked look for more depth */
    align-items: center; 
    text-align: center;
    gap: 15px; 
}

.dir-thumb { 
    width: 80px; 
    height: 80px; 
    border-radius: 12px; 
    object-fit: cover; 
    border: 1px solid #b08a48; 
}

.dir-title { font-weight: 700; font-size: 1.2rem; margin: 0; color: #000; letter-spacing: 0.5px; }
.dir-subtitle { font-size: 0.9rem; color: #888; margin: 0; }

/* OPEN STATE: Grows even deeper */
.dir-card.open {
    transform: scale(1.05);
    z-index: 10;
    min-height: 450px; /* Deep Portrait Look */
    box-shadow: 0 20px 40px rgba(176,138,72,0.2);
}

.dir-body { 
    display: none; 
    padding: 0 25px 30px 25px; 
    background: #fff; 
}

.dir-card.open .dir-body { 
    display: block; 
    animation: fadeIn 0.5s ease;
}

/* DIMMED STATE */
.dir-card.dimmed {
    opacity: 0.1;
    filter: grayscale(100%);
    pointer-events: none;
}

/* Modules inside the open box */
.mod-item { 
    display: flex; 
    align-items: center; 
    gap: 12px; 
    padding: 15px 0; 
    text-decoration: none; 
    color: #000; 
    border-bottom: 1px solid #f8f8f8;
}

@keyframes fadeIn { from { opacity: 0; } to { opacity: 1; } }

/* Responsive */
@media (max-width: 991px) { .directory-grid { grid-template-columns: repeat(2, 1fr) !important; } }
@media (max-width: 650px) { .directory-grid { grid-template-columns: 1fr !important; } }