/* 
==============================================================
DIRECTORY / SITEMAP TEMPLATES STYLES - V2.1 (Compact UI)
(For template-list-industry.php & template-list-location.php)
============================================================== 
*/

/* --- 1. Page Layout & Header Fix --- */
.fixydo-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

/* Header Overlap Fix & Styling */
.archive-free-header {
    text-align: center;
    margin-bottom: 40px; /* CHANGED: Reduced margin from 50px (inline style) to 40px */
    padding-top: 20px; 
    position: relative;
}

.header-title {
    font-size: 2.2rem; /* CHANGED: Slightly smaller font size */
    font-weight: 800;
    color: var(--primary-color, #003366);
    margin-bottom: 10px; /* CHANGED: Reduced margin */
    line-height: 1.2;
}

.header-description {
    font-size: 1rem; /* CHANGED: Slightly smaller font size */
    color: #64748b;
    line-height: 1.6;
    max-width: 800px; /* CHANGED: Matched with inline style from PHP */
    margin: 0 auto;
}

.fixydo-sitemap-wrapper {
    padding-bottom: 60px; /* CHANGED: Reduced bottom padding */
}

/* --- 2. Grid Layout --- */
.fixydo-directory-grid {
    display: grid;
    /* CHANGED: Reduced minmax width to allow more cards per row and reduced gap */
    grid-template-columns: repeat(auto-fill, minmax(290px, 1fr));
    gap: 20px; 
}

/* --- 3. Directory Card (Premium Look) --- */
.directory-card {
    background: #ffffff;
    border: 1px solid #e2e8f0; /* CHANGED: Slightly lighter border for a softer look */
    border-radius: 12px; /* CHANGED: Reduced border radius */
    padding: 20px; /* CHANGED: Reduced padding from 30px to 20px for compactness */
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    display: flex;
    flex-direction: column;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.04), 0 2px 4px -1px rgba(0, 0, 0, 0.02); /* CHANGED: Softer shadow */
    height: 100%;
    position: relative;
    overflow: hidden;
}

/* Hover Effect: Lift Up + Stronger Shadow */
.directory-card:hover {
    transform: translateY(-6px); /* CHANGED: Slightly less lift */
    box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.08), 0 4px 6px -2px rgba(0, 0, 0, 0.04); /* CHANGED: Adjusted hover shadow */
    border-color: var(--primary-color, #003366);
}

/* Top Accent Line on Hover */
.directory-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 3px; /* CHANGED: Thinner line */
    background: var(--primary-color, #003366);
    transform: scaleX(0);
    transform-origin: left;
    transition: transform 0.3s ease;
}

.directory-card:hover::before {
    transform: scaleX(1);
}

/* --- 4. Card Header (Icon + Title) --- */
.dir-card-header {
    display: flex;
    align-items: center;
    gap: 15px; /* CHANGED: Reduced gap */
    margin-bottom: 15px; /* CHANGED: Reduced margin */
    padding-bottom: 15px; /* CHANGED: Reduced padding */
    border-bottom: 1px solid #f1f5f9;
}

/* Icon Styling */
.dir-icon-box {
    width: 48px; /* CHANGED: Smaller icon box */
    height: 48px; /* CHANGED: Smaller icon box */
    background-color: rgba(0, 51, 102, 0.07);
    color: var(--primary-color, #003366);
    border-radius: 10px; /* CHANGED: Adjusted border radius */
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    transition: all 0.3s ease;
}

.directory-card:hover .dir-icon-box {
    background-color: var(--primary-color, #003366);
    color: #ffffff;
}

.dir-icon-box.location-icon {
    background-color: rgba(255, 69, 0, 0.07);
    color: var(--accent-color, #FF4500);
}

.directory-card:hover .dir-icon-box.location-icon {
    background-color: var(--accent-color, #FF4500);
    color: #ffffff;
}

.dir-icon-box span, 
.dir-icon-box i {
    font-size: 22px; /* CHANGED: Smaller icon size */
}

/* Title Styling */
.dir-title {
    margin: 0;
    font-size: 1.15rem; /* CHANGED: Slightly smaller font size */
    font-weight: 700;
    line-height: 1.3;
}

.dir-title a {
    color: var(--text-primary, #1e293b);
    text-decoration: none;
    transition: color 0.2s;
}

.directory-card:hover .dir-title a {
    color: var(--primary-color, #003366);
}

/* --- 5. Child List (Sub-items) --- */
.dir-child-list {
    list-style: none;
    padding: 0;
    margin: 0;
    display: flex;
    flex-direction: column;
    gap: 8px; /* CHANGED: Reduced gap between list items */
}

.dir-child-list li a {
    display: flex;
    align-items: center;
    gap: 8px; /* CHANGED: Reduced gap */
    color: #64748b;
    font-size: 0.9rem; /* CHANGED: Slightly smaller font */
    font-weight: 500;
    text-decoration: none;
    transition: all 0.2s ease;
    padding: 4px 8px; /* CHANGED: Reduced padding */
    border-radius: 6px;
    background-color: transparent;
}

.dir-child-list li a .dashicons {
    font-size: 12px; /* CHANGED: Smaller icon */
    width: 12px;
    height: 12px;
    color: #cbd5e1;
    transition: transform 0.2s;
}

/* List Item Hover */
.dir-child-list li a:hover {
    color: var(--primary-color, #003366);
    background-color: #f8fafc;
    padding-left: 12px; /* CHANGED: Adjusted padding */
}

.dir-child-list li a:hover .dashicons {
    color: var(--accent-color, #FF4500);
    transform: translateX(2px); /* CHANGED: Adjusted transform */
}

/* --- 6. Empty State Button --- */
.dir-empty-state {
    margin-top: auto;
    padding-top: 15px; /* CHANGED: Reduced padding */
    text-align: center;
}

.button-ghost {
    display: inline-block;
    padding: 6px 18px; /* CHANGED: Reduced padding */
    border: 1px solid #e2e8f0;
    border-radius: 50px;
    color: #64748b;
    font-size: 0.85rem; /* CHANGED: Smaller font */
    font-weight: 600;
    text-decoration: none;
    transition: all 0.3s ease;
}

.button-ghost:hover {
    border-color: var(--primary-color, #003366);
    color: var(--primary-color, #003366);
    background: #fff;
}

/* --- 7. Responsive Adjustments --- */
@media (max-width: 992px) {
    .archive-free-header {
        padding-top: 120px;
        margin-bottom: 40px;
    }
    .header-title {
        font-size: 2rem;
    }
}

@media (max-width: 768px) {
    .fixydo-directory-grid {
        grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
        gap: 15px; /* CHANGED: Reduced gap for tablets */
    }
}

@media (max-width: 480px) {
    .archive-free-header {
        padding-top: 100px;
    }
    .header-title {
        font-size: 1.75rem;
    }
    .directory-card {
        padding: 15px; /* CHANGED: Reduced padding for mobile */
    }
    .fixydo-directory-grid {
        grid-template-columns: 1fr;
    }
}