/* Styles for Catalog Page */

.catalog-header {
    margin-bottom: 2rem;
    text-align: center;
}

.catalog-header h1 {
    font-size: 1.8rem;
    color: var(--text-color);
    margin-bottom: 0.5rem;
}

.catalog-header p {
    color: var(--text-muted);
    font-size: 0.95rem;
    margin-bottom: 1.5rem;
}

.search-bar {
    position: relative;
    max-width: 500px;
    margin: 0 auto;
}

.search-bar i {
    position: absolute;
    left: 1rem;
    top: 50%;
    transform: translateY(-50%);
    color: var(--text-muted);
}

.search-bar input {
    width: 100%;
    padding: 0.8rem 1rem 0.8rem 2.8rem;
    border-radius: 12px;
    border: 1px solid var(--border-color, #e5e7eb);
    background: var(--card-bg, #fff);
    font-size: 1rem;
    color: var(--text-color);
    outline: none;
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.05);
    transition: all 0.3s ease;
}

.search-bar input:focus {
    border-color: var(--primary-color, #10b981);
    box-shadow: 0 0 0 3px rgba(16, 185, 129, 0.1);
}

.catalog-section {
    margin-bottom: 2.5rem;
}

.catalog-section h2 {
    font-size: 1.2rem;
    color: var(--text-color);
    margin-bottom: 1rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    border-bottom: 2px solid rgba(0, 0, 0, 0.05);
    padding-bottom: 0.5rem;
}

.catalog-section h2 i {
    color: var(--primary-color, #10b981);
}

/* 3D Cards Grid */
.cards-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    /* Wider cards */
    gap: 1.5rem;
    width: 100%;
    /* Fill available space */
}

/* 3D Card Styles */
.app-card {
    background: var(--card-bg, #fff);
    border-radius: 16px;
    box-shadow:
        0 4px 6px -1px rgba(0, 0, 0, 0.1),
        0 2px 4px -1px rgba(0, 0, 0, 0.06),
        0 0 0 1px rgba(0, 0, 0, 0.02);
    /* Border subtle */
    transition: transform 0.3s cubic-bezier(0.34, 1.56, 0.64, 1), box-shadow 0.3s ease;
    overflow: hidden;
    position: relative;
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.app-card:hover {
    transform: translateY(-5px) scale(1.01);
    box-shadow:
        0 10px 15px -3px rgba(0, 0, 0, 0.1),
        0 4px 6px -2px rgba(0, 0, 0, 0.05);
    z-index: 10;
}

/* Front of the card */
.card-front {
    padding: 1.5rem;
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
}

.card-icon {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    background: linear-gradient(135deg, rgba(16, 185, 129, 0.1), rgba(16, 185, 129, 0.2));
    color: var(--primary-color, #10b981);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    margin-bottom: 1rem;
    box-shadow: inset 0 2px 4px rgba(255, 255, 255, 0.5);
}

.card-title {
    font-size: 1.1rem;
    font-weight: 600;
    margin-bottom: 0.5rem;
    color: var(--text-color);
}

.card-short-desc {
    font-size: 0.85rem;
    color: var(--text-muted);
    margin-bottom: 1rem;
    line-height: 1.4;
}

.btn-read-more {
    background: transparent;
    border: none;
    color: var(--primary-color, #10b981);
    font-size: 0.9rem;
    font-weight: 500;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 0.3rem;
    padding: 0.5rem 1rem;
    border-radius: 20px;
    transition: background 0.2s;
}

.btn-read-more:hover {
    background: rgba(16, 185, 129, 0.1);
}

.btn-read-more i {
    transition: transform 0.3s;
}

/* Expanded state icon rotation */
.btn-read-more[aria-expanded="true"] i {
    transform: rotate(180deg);
}

/* Details Section (Accordion) */
.card-details {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.4s ease-in-out, opacity 0.4s ease;
    opacity: 0;
    background: rgba(0, 0, 0, 0.02);
    /* Slight contrast */
    padding: 0 1.5rem;
    /* Padding applied inside via height animation */
}

.card-details p {
    font-size: 0.9rem;
    color: var(--text-color);
    line-height: 1.5;
    margin-bottom: 1rem;
}

.card-details.open {
    padding: 1rem 1.5rem 1.5rem 1.5rem;
    opacity: 1;
    /* max-height handled by JS (scrollHeight) */
    border-top: 1px solid rgba(0, 0, 0, 0.05);
}

.btn-open-app {
    display: block;
    width: 100%;
    padding: 0.8rem;
    background: var(--primary-color, #10b981);
    color: white;
    text-align: center;
    text-decoration: none;
    border-radius: 8px;
    font-weight: 500;
    transition: background 0.3s;
    box-shadow: 0 2px 4px rgba(16, 185, 129, 0.2);
}

.btn-open-app:hover {
    background: #059669;
    box-shadow: 0 4px 8px rgba(16, 185, 129, 0.3);
}