/* Main Layout */
.content {
    display: grid;
    grid-template-columns: 300px 1fr;
    gap: 2rem;
    max-width: 1400px;
    margin: 0 auto;
    padding: 2rem;
}

/* Search Panel */
.search-panel {
    background: var(--tertiary-color);
    padding: 1.5rem;
    border-radius: 12px;
    height: fit-content;
    position: sticky;
    top: 2rem;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
}

.search-panel h2 {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin-bottom: 1.5rem;
    color: var(--text-color);
    font-size: 1.3rem;
}

.search-panel h2 i {
    color: var(--primary-color);
}

.form-group {
    margin-bottom: 1.5rem;
}

.form-group label {
    display: block;
    margin-bottom: 0.5rem;
    color: var(--text-color);
    font-weight: 500;
}

.form-control {
    width: 100%;
    padding: 0.75rem;
    border: 1px solid #ddd;
    border-radius: 6px;
    font-size: 1rem;
    transition: border-color 0.3s;
}

.form-control:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(255, 159, 103, 0.1);
}

.search-buttons {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.search-buttons .btn {
    width: 100%;
    justify-content: center;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

/* Results Section */
.search-results {
    width: 100%;
}

.results-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 2rem;
    padding-bottom: 1rem;
    border-bottom: 2px solid var(--tertiary-color);
}

.results-header h3 {
    margin: 0;
    color: var(--text-color);
    font-size: 1.5rem;
}

.results-count {
    color: #666;
    font-size: 1rem;
}

.results-count span {
    color: var(--primary-color);
    font-weight: 700;
    font-size: 1.2rem;
}

/* Shelters Grid */
.shelters-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(350px, 1fr));
    gap: 2rem;
    margin-bottom: 2rem;
}

/* Shelter Card */
.shelter-card {
    background: white;
    border: 1px solid #ddd;
    border-radius: 12px;
    overflow: hidden;
    transition: all 0.3s ease;
    display: flex;
    flex-direction: column;
}

.shelter-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.12);
    border-color: var(--primary-color);
}

/* Shelter Header */
.shelter-header {
    background: linear-gradient(135deg, #FFF8F0 0%, #FFE4CC 100%);
    padding: 1.5rem;
    display: flex;
    align-items: flex-start;
    gap: 1rem;
    border-bottom: 1px solid #e0e0e0;
}

.shelter-icon {
    background: var(--primary-color);
    color: white;
    width: 50px;
    height: 50px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.shelter-icon i {
    font-size: 28px;
}

.shelter-title {
    flex: 1;
}

.shelter-title h3 {
    margin: 0 0 0.5rem 0;
    color: var(--text-color);
    font-size: 1.2rem;
    line-height: 1.3;
}

.shelter-status {
    display: inline-block;
    padding: 0.25rem 0.75rem;
    border-radius: 15px;
    font-size: 0.85rem;
    font-weight: 500;
}

.shelter-status.active {
    background: #4caf50;
    color: white;
}

.shelter-status.inactive {
    background: #9e9e9e;
    color: white;
}

/* Shelter Info */
.shelter-info {
    padding: 1.5rem;
    flex: 1;
}

.info-item {
    display: flex;
    gap: 1rem;
    margin-bottom: 1rem;
    align-items: flex-start;
}

.info-item i {
    color: var(--primary-color);
    font-size: 20px;
    margin-top: 2px;
}

.info-content {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
}

.info-label {
    font-size: 0.85rem;
    color: #888;
    font-weight: 500;
}

.info-value {
    color: var(--text-color);
    font-size: 0.95rem;
    word-break: break-word;
}

/* Capacity Info */
.capacity-info {
    margin-top: 1.5rem;
    padding-top: 1.5rem;
    border-top: 1px solid #e0e0e0;
}

.capacity-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 0.5rem;
}

.capacity-header > span:first-child {
    font-weight: 500;
    color: var(--text-color);
}

.capacity-ratio {
    font-weight: 700;
    font-size: 0.95rem;
}

.capacity-ratio.normal {
    color: #4caf50;
}

.capacity-ratio.high {
    color: #ff9800;
}

.capacity-ratio.full {
    color: #f44336;
}

.capacity-bar {
    width: 100%;
    height: 8px;
    background: #e0e0e0;
    border-radius: 10px;
    overflow: hidden;
}

.capacity-fill {
    height: 100%;
    border-radius: 10px;
    transition: width 0.5s ease;
}

.capacity-fill.normal {
    background: linear-gradient(90deg, #4caf50, #66bb6a);
}

.capacity-fill.high {
    background: linear-gradient(90deg, #ff9800, #ffa726);
}

.capacity-fill.full {
    background: linear-gradient(90deg, #f44336, #ef5350);
}

/* Shelter Actions */
.shelter-actions {
    padding: 1rem 1.5rem;
    background: #f9f9f9;
    display: flex;
    gap: 0.75rem;
    border-top: 1px solid #e0e0e0;
}

.shelter-actions .btn {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    padding: 0.75rem;
}

.shelter-actions .btn i {
    font-size: 18px;
}

/* No Results */
.no-results {
    grid-column: 1 / -1;
    text-align: center;
    padding: 4rem 2rem;
    color: #999;
}

.no-results i {
    font-size: 4rem;
    color: #ddd;
    margin-bottom: 1rem;
}

.no-results p {
    margin: 0.5rem 0;
    font-size: 1.1rem;
}

.no-results p:first-of-type {
    color: #666;
    font-weight: 500;
    font-size: 1.2rem;
}

/* Responsive Design */
@media (max-width: 1024px) {
    .content {
        grid-template-columns: 250px 1fr;
    }

    .shelters-grid {
        grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    }
}

@media (max-width: 768px) {
    .content {
        grid-template-columns: 1fr;
        padding: 1rem;
    }

    .search-panel {
        position: relative;
        top: 0;
    }

    .search-buttons {
        flex-direction: row;
    }

    .search-buttons .btn {
        width: 48%;
    }

    .shelters-grid {
        grid-template-columns: 1fr;
    }

    .results-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 0.5rem;
    }

    .shelter-actions {
        flex-direction: column;
    }

    .shelter-actions .btn {
        width: 100%;
    }
}

@media (max-width: 480px) {
    .shelter-header {
        padding: 1rem;
    }

    .shelter-icon {
        width: 40px;
        height: 40px;
    }

    .shelter-icon i {
        font-size: 24px;
    }

    .shelter-title h3 {
        font-size: 1.1rem;
    }

    .shelter-info {
        padding: 1rem;
    }
}
