/* Letter-Based Category Template Styles */

/* Container */
.letter-category-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px;
}

/* View Toggle Controls */
.view-toggle-controls {
    display: flex;
    justify-content: flex-end;
    margin-bottom: 20px;
}

.view-btn {
    background: none;
    border: 1px solid #ddd;
    border-radius: 4px;
    padding: 8px 12px;
    margin-left: 10px;
    cursor: pointer;
    transition: all 0.3s ease;
}

.view-btn:hover {
    background-color: #f5f5f5;
}

.view-btn.active {
    background-color: #e0e0e0;
    border-color: #999;
}

.view-btn svg {
    color: #565656; /* Dark grey */
}

/* Category Header */
.category-header {
    margin-bottom: 30px;
    text-align: center;
}

.category-header h1 {
    font-size: 2.5rem;
    margin-bottom: 10px;
}

/* Single Column Modifier */
.grid-view.single-column .items-grid, 
.item-grid.single-column {
    flex-direction: column;
    gap: 30px;
    max-width: 800px;
    margin-left: auto;
    margin-right: auto;
}

.grid-view.single-column .item-card,
.item-grid.single-column .item-card {
    flex: none;
    width: 100%;
    border-color: #e0e0e0;
    border-radius: 12px;
    box-shadow: 0 4px 8px rgba(0,0,0,0.08);
    margin-bottom: 30px;
}

.grid-view.single-column .item-card:hover,
.item-grid.single-column .item-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 8px 25px rgba(0,0,0,0.15);
}

.grid-view.single-column .item-image,
.item-grid.single-column .item-image {
    height: 300px;
}

.grid-view.single-column .item-info,
.item-grid.single-column .item-info {
    padding: 25px;
}

.grid-view.single-column .item-info h3,
.item-grid.single-column .item-info h3 {
    font-size: 1.5rem;
    font-weight: 600;
    color: #2c3e50;
    border-bottom: 3px solid #e0e0e0;
    padding-bottom: 8px;
    display: inline-block;
    margin-bottom: 15px;
}

.grid-view.single-column .item-info p,
.item-grid.single-column .item-info p {
    margin: 0;
    font-size: 1.1rem;
    line-height: 1.6;
    color: #555;
    text-align: justify;
}

/* Original Responsive Design */
@media (max-width: 1024px) {
    .item-card {
        flex: 0 0 calc(50% - 10px);
    }
}

@media (max-width: 768px) {
    .item-card {
        flex: 0 0 calc(50% - 10px);
    }

    /* Single column responsive */
    .grid-view.single-column .items-grid, 
    .item-grid.single-column {
        max-width: 100%;
        gap: 25px;
        padding: 0 15px;
    }
    
    .grid-view.single-column .item-image,
    .item-grid.single-column .item-image {
        height: 250px;
    }
    
    .grid-view.single-column .item-info,
    .item-grid.single-column .item-info {
        padding: 20px;
    }
    
    .grid-view.single-column .item-info h3,
    .item-grid.single-column .item-info h3 {
        font-size: 1.3rem;
    }
    
    .grid-view.single-column .item-info p,
    .item-grid.single-column .item-info p {
        font-size: 1rem;
    }
}

@media (max-width: 480px) {
    .item-card {
        flex: 0 0 100%;
    }

    /* Single column mobile */
    .grid-view.single-column .items-grid, 
    .item-grid.single-column {
        gap: 20px;
        padding: 0 10px;
    }
    
    .grid-view.single-column .item-image,
    .item-grid.single-column .item-image {
        height: 200px;
    }
    
    .grid-view.single-column .item-info,
    .item-grid.single-column .item-info {
        padding: 18px;
    }
    
    .grid-view.single-column .item-info h3,
    .item-grid.single-column .item-info h3 {
        font-size: 1.2rem;
        margin-bottom: 12px;
    }
    
    .grid-view.single-column .item-info p,
    .item-grid.single-column .item-info p {
        font-size: 0.95rem;
        line-height: 1.5;
    }
}

/* Table View */
.table-view .items-grid {
    display: none;
}

.table-view .items-table {
    display: block;
    width: 100%;
    overflow-x: auto;
}

.items-table table {
    width: 100%;
    border-collapse: collapse;
    margin-bottom: 30px;
}

.items-table th, 
.items-table td {
    padding: 12px 15px;
    text-align: left;
    border-bottom: 1px solid #ddd;
}

.items-table th {
    background-color: #f5f5f5;
    font-weight: 600;
}

.items-table tr:hover {
    background-color: #f9f9f9;
}

/* BUTTONS */

.alphabet-navigation {
    margin-top: 40px;
    text-align: center;
}

.list-category-header {
    font-size: 1.2em;
    margin-bottom: 20px;
    text-align: center;
}

.alphabet-links {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 8px;
}

.list-small-alphabet-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    background-color: #f0f0f0;
    border: 1px solid #ccc;
    border-radius: 4px;
    box-shadow: 0 2px 2px rgba(0,0,0,0.1);
    font-weight: bold;
    text-decoration: none;
    color: #333;
    transition: all 0.2s ease;
}

.list-small-alphabet-button:hover {
    background-color: #e0e0e0;
    transform: translateY(-2px);
    box-shadow: 0 4px 4px rgba(0,0,0,0.15);
}

.list-small-alphabet-button:active {
    transform: translateY(0);
    box-shadow: 0 1px 2px rgba(0,0,0,0.1);
}

.list-alphabet-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 48px;
    height: 48px;
    background-color: #f0f0f0;
    border: 1px solid #ccc;
    border-radius: 4px;
    box-shadow: 0 2px 2px rgba(0,0,0,0.1);
    font-weight: bold;
    text-decoration: none;
    color: #333;
    transition: all 0.2s ease;
    font-size: 1.4em;
}

.list-alphabet-button:hover {
    background-color: #e0e0e0;
    transform: translateY(-2px);
    box-shadow: 0 4px 4px rgba(0,0,0,0.15);
}

.list-alphabet-button:active {
    transform: translateY(0);
    box-shadow: 0 1px 2px rgba(0,0,0,0.1);
}

/* Additional styles for the items-grid */
.items-grid {
    display: grid;
    /* Modified: Changed to show 3 items per row instead of auto-fill */
    grid-template-columns: repeat(3, 1fr);
    gap: 20px;
}

/* Responsive grid adjustments */
@media (max-width: 1024px) {
    .items-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 480px) {
    .items-grid {
        grid-template-columns: 1fr;
    }
}

.item-card {
    border: 1px solid #ddd;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.item-image {
    height: 200px;
    overflow: hidden;
}

.item-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s ease;
}

.item-image a:hover img {
    transform: scale(1.05);
}

.item-info {
    padding: 15px;
}

.item-info p {
    margin: 5px 0;
}

/* Zebra striping for table rows */
.zebra-table tr.even-row {
    background-color: #f9f9f9;
}

.zebra-table tr.odd-row {
    background-color: #ffffff;
}